浏览代码

曲线偏差率计划发电量报警功能修改

lizaixun 4 年之前
父节点
当前提交
d78eadbf01

+ 113 - 52
src/views/rankingIndex/PlannedGeneration.vue

@@ -149,7 +149,7 @@
             <el-form :model="form">
                 <el-form :inline="true" :model="formInline" class="demo-form-inline" style="margin-left:3.5%">
                 <el-form-item label="风场:" >
-                    <el-select v-model="value"  placeholder="请选择" @change="projectData">
+                    <el-select v-model="value3"  placeholder="请选择" @change="projectData2">
                     <el-option
                         v-for="item in options"
                         :key="item.name"
@@ -159,9 +159,9 @@
                     </el-select>
                 </el-form-item>
                 <el-form-item label="项目:" >
-                    <el-select v-model="value2"  placeholder="请选择">
+                    <el-select v-model="value4"  placeholder="请选择">
                     <el-option
-                        v-for="item in options2"
+                        v-for="item in options3"
                         :key="item.name"
                         :label="item.name"
                         :value="item.id">
@@ -223,80 +223,61 @@
             </div>
         </el-dialog>
         <el-dialog title="修改信息" :visible.sync="dialogFormVisible2">
-            <el-form :model="form">
+            <el-form :model="form2">
                 <el-form :inline="true" :model="formInline" class="demo-form-inline" style="margin-left:3.5%">
                 <el-form-item label="风场:" >
-                    <el-select v-model="value"  placeholder="请选择" @change="projectData">
-                    <el-option
-                        v-for="item in options"
-                        :key="item.name"
-                        :label="item.name"
-                        :value="item.id">
-                    </el-option>
-                    </el-select>
+                    {{fc}}
                 </el-form-item>
                 <el-form-item label="项目:" >
-                    <el-select v-model="value2"  placeholder="请选择">
-                    <el-option
-                        v-for="item in options2"
-                        :key="item.name"
-                        :label="item.name"
-                        :value="item.id">
-                    </el-option>
-                    </el-select>
+                    {{xm}}
                 </el-form-item>
                  <el-form-item label="年份:" >
-                        <el-date-picker
-                        v-model="timeyear"
-                        type="year"
-                        placeholder="选择年"
-                        >
-                        </el-date-picker>
+                    {{nf}}
                 </el-form-item>
                 </el-form>
                 <el-form-item label="1月份计划发电量(万kWh)" :label-width="formLabelWidth">
-                    <el-input v-model="form.gc01" autocomplete="off"></el-input>
+                    <el-input v-model="form2.gc01" autocomplete="off"></el-input>
                 </el-form-item>
                 <el-form-item label="2月份计划发电量(万kWh)" :label-width="formLabelWidth">
-                    <el-input v-model="form.gc02" autocomplete="off"></el-input>
+                    <el-input v-model="form2.gc02" autocomplete="off"></el-input>
                 </el-form-item>
                 <el-form-item label="3月份计划发电量(万kWh)" :label-width="formLabelWidth">
-                    <el-input v-model="form.gc03" autocomplete="off"></el-input>
+                    <el-input v-model="form2.gc03" autocomplete="off"></el-input>
                 </el-form-item>
                 <el-form-item label="4月份计划发电量(万kWh)" :label-width="formLabelWidth">
-                    <el-input v-model="form.gc04" autocomplete="off"></el-input>
+                    <el-input v-model="form2.gc04" autocomplete="off"></el-input>
                 </el-form-item>
                 <el-form-item label="5月份计划发电量(万kWh)" :label-width="formLabelWidth">
-                    <el-input v-model="form.gc05" autocomplete="off"></el-input>
+                    <el-input v-model="form2.gc05" autocomplete="off"></el-input>
                 </el-form-item>
                 <el-form-item label="6月份计划发电量(万kWh)" :label-width="formLabelWidth">
-                    <el-input v-model="form.gc06" autocomplete="off"></el-input>
+                    <el-input v-model="form2.gc06" autocomplete="off"></el-input>
                 </el-form-item>
                 <el-form-item label="7月份计划发电量(万kWh)" :label-width="formLabelWidth">
-                    <el-input v-model="form.gc07" autocomplete="off"></el-input>
+                    <el-input v-model="form2.gc07" autocomplete="off"></el-input>
                 </el-form-item>
                 <el-form-item label="8月份计划发电量(万kWh)" :label-width="formLabelWidth">
-                    <el-input v-model="form.gc08" autocomplete="off"></el-input>
+                    <el-input v-model="form2.gc08" autocomplete="off"></el-input>
                 </el-form-item>
                 <el-form-item label="9月份计划发电量(万kWh)" :label-width="formLabelWidth">
-                    <el-input v-model="form.gc09" autocomplete="off"></el-input>
+                    <el-input v-model="form2.gc09" autocomplete="off"></el-input>
                 </el-form-item>
                 <el-form-item label="10月份计划发电量(万kWh)" :label-width="formLabelWidth">
-                    <el-input v-model="form.gc10" autocomplete="off"></el-input>
+                    <el-input v-model="form2.gc10" autocomplete="off"></el-input>
                 </el-form-item>
                 <el-form-item label="11月份计划发电量(万kWh)" :label-width="formLabelWidth">
-                    <el-input v-model="form.gc11" autocomplete="off"></el-input>
+                    <el-input v-model="form2.gc11" autocomplete="off"></el-input>
                 </el-form-item>
                 <el-form-item label="12月份计划发电量(万kWh)" :label-width="formLabelWidth">
-                    <el-input v-model="form.gc12" autocomplete="off"></el-input>
+                    <el-input v-model="form2.gc12" autocomplete="off"></el-input>
                 </el-form-item>
                 <el-form-item label="全年计划发电量(万kWh)" :label-width="formLabelWidth">
-                    <el-input v-model="form.generatingcapacity" autocomplete="off"></el-input>
+                    <el-input v-model="form2.generatingcapacity" autocomplete="off"></el-input>
                 </el-form-item>
             </el-form>
             <div slot="footer" class="dialog-footer">
-                <el-button @click="dialogFormVisible = false">取 消</el-button>
-                <el-button type="primary" @click="addSaveData()">保存</el-button>
+                <el-button @click="dialogFormVisible2 = false">取 消</el-button>
+                <el-button type="primary" @click="saveData()">保存</el-button>
             </div>
         </el-dialog>
        </div>
@@ -313,7 +294,7 @@ export default {
         project: "",
         line: "",
         },
-        timeyear:'2021',
+        timeyear:'',
         currentPage2: 1,
 	    pagesize: 10,
         gridData:[],
@@ -322,10 +303,13 @@ export default {
         charNameData:[],
         options: [],
         options2: [],
+        options3: [],
         orderByColumn:'',
         isAsc: '',
         value: '',
         value2:'',
+        value3:'',
+        value4:'',
         dialogFormVisible: false,
         dialogFormVisible2: false,
         form: {
@@ -343,7 +327,28 @@ export default {
           gc12: '',
           generatingcapacity: '',
         },
-        formLabelWidth: '200px'
+        form2: {
+          gc01: '',
+          gc02: '',
+          gc03: '',
+          gc04: '',
+          gc05: '',
+          gc06: '',
+          gc07: '',
+          gc08: '',
+          gc09: '',
+          gc10: '',
+          gc11: '',
+          gc12: '',
+          generatingcapacity: '',
+        },
+        formLabelWidth: '200px',
+        fcdialog:'',
+        fc:'',
+        xm:'',
+        nf:'',
+        modifyid:'',
+        modifyprojectid:'',
       }
     },
    
@@ -368,9 +373,56 @@ export default {
         })
         },
         tableDatawindturbineName(val){
-          this.dialogFormVisible = true;
+          this.dialogFormVisible2 = true;
           this.fanData = val;
           console.log(this.fanData)
+          var modifyData = new URLSearchParams();
+          modifyData.append('projectid',this.fanData.projectid);
+          modifyData.append('year',this.fanData.year);
+          this.$http.post('/projectplan/getSingleProjectPlan',modifyData).then((res) => {
+                console.log(res.data.data)
+                this.modifyid = res.data.data.id;
+                this.modifyprojectid = res.data.data.projectid;
+                this.fc = res.data.data.windpowerName;
+                this.xm = res.data.data.projectName;
+                this.nf = res.data.data.year;
+                this.form2.gc01 = res.data.data.gc01;
+                this.form2.gc02 = res.data.data.gc02;
+                this.form2.gc03 = res.data.data.gc03;
+                this.form2.gc04 = res.data.data.gc04;
+                this.form2.gc05 = res.data.data.gc05;
+                this.form2.gc06 = res.data.data.gc06;
+                this.form2.gc07 = res.data.data.gc07;
+                this.form2.gc08 = res.data.data.gc08;
+                this.form2.gc09 = res.data.data.gc09;
+                this.form2.gc10 = res.data.data.gc10;
+                this.form2.gc11 = res.data.data.gc11;
+                this.form2.gc12 = res.data.data.gc12;
+                this.form2.generatingcapacity = res.data.data.generatingcapacity;
+            })
+        },
+        saveData(){
+            var addSaveData = new URLSearchParams();
+            addSaveData.append('id',this.modifyid);
+            addSaveData.append('projectid',this.modifyprojectid);
+            addSaveData.append('generatingcapacity',this.form2.generatingcapacity);
+            addSaveData.append('year',this.nf);
+            addSaveData.append('gc01',this.form2.gc01);
+            addSaveData.append('gc02',this.form2.gc02);
+            addSaveData.append('gc03',this.form2.gc03);
+            addSaveData.append('gc04',this.form2.gc04);
+            addSaveData.append('gc05',this.form2.gc05);
+            addSaveData.append('gc06',this.form2.gc06);
+            addSaveData.append('gc07',this.form2.gc07);
+            addSaveData.append('gc08',this.form2.gc08);
+            addSaveData.append('gc09',this.form2.gc09);
+            addSaveData.append('gc10',this.form2.gc10);
+            addSaveData.append('gc11',this.form2.gc11);
+            addSaveData.append('gc12',this.form2.gc12);
+            this.$http.post('/projectplan/saveData',addSaveData).then((res) => {
+                console.log(res.data)
+            })
+            this.dialogFormVisible2 = false;
         },
         headStyle() {
           return "text-align:center"
@@ -389,8 +441,13 @@ export default {
                 this.options2 = res.data.data;
             })
         },
+        projectData2(){
+            this.$http.get('/powercompare/projectAjax?wpIds=' + this.value3).then((res) =>{
+                this.options3 = res.data.data;
+            })
+        },
         callAndSpeedData(){
-            this.$http.get('/powercompare/windfarmAjax').then((res) => {
+            this.$http.get('/powercompare/windfarmAllAjax').then((res) => {
                 this.options = res.data.data;
             })
             var plannedGenerationData = new URLSearchParams();
@@ -402,11 +459,15 @@ export default {
                 console.log(this.gridData)
             })
         },
+        modifyData(){
+            
+
+        },
         addSaveData(){
-            console.log(this.fanData.gc01)
+            console.log(this.value3)
             var addSaveData = new URLSearchParams();
-            addSaveData.append('id',this.value);
-            addSaveData.append('projectid',this.value2);
+            addSaveData.append('id',this.value3);
+            addSaveData.append('projectid',this.value4);
             addSaveData.append('generatingcapacity',this.form.generatingcapacity);
             addSaveData.append('year',this.timeyear);
             addSaveData.append('gc01',this.form.gc01);
@@ -426,10 +487,10 @@ export default {
             })
             this.dialogFormVisible = false;
         },
-        modifyData(a,b,c){
-            this.dialogFormVisible2 = true;
-            console.log(a,b,c)
-        },
+        // modifyData(a,b,c){
+        //     this.dialogFormVisible2 = true;
+        //     console.log(a,b,c)
+        // },
         toExcel(){
             excelHelper.exportExcel("callthepolicetable","负荷率排行榜",".xls",true);
         },

+ 1 - 1
src/views/rankingIndex/RankingCallThePolice.vue

@@ -169,7 +169,7 @@ export default {
             callThePolicRateChartData.append('type',this.value);
 			callThePolicRateChartData.append('beginDate',this.beginDate);
             callThePolicRateChartData.append('endDate',this.endDate);
-            this.$http.post('/leaderboard/querywarningStatisticalPie',callThePolicRateChartData).then((res) => {
+            this.$http.post('/leaderboard/querywarningStatistical',callThePolicRateChartData).then((res) => {
                 this.gridDataChart = res.data.data
                 for(let i=0;i<this.gridDataChart.length;i++){
                     this.charFreData.push(this.gridDataChart[i].frequency);

+ 34 - 6
src/views/rankingIndex/RankingCurveDeviationRate.vue

@@ -25,17 +25,21 @@
                     </el-form-item>
                     <el-form-item label="年份:">
                         <el-date-picker
-                        v-model="timeyear"
+                        value-format="yyyy"
+                        v-model="year"
                         type="year"
                         placeholder="选择年"
+                        format="yyyy"
                         >
                         </el-date-picker>
                     </el-form-item>
                     <el-form-item label="月份:">
                         <el-date-picker
-                        v-model="timemonth"
+                        value-format="yyyy-MM"
+                        v-model="month"
                         type="month"
-                        placeholder="选择月">
+                        placeholder="选择月"
+                        format="yyyy-MM">
                         </el-date-picker>
                     </el-form-item>
                     <el-form-item>
@@ -110,6 +114,9 @@
               prop="windturbineid"
               label="风机"
                width="260">
+               <template slot-scope="scope" > 
+                  <div @click="clickCopy('1')" :style="{color:'#000000'}">{{scope.row.windturbineid}}</div>
+              </template> 
             </el-table-column>
             <el-table-column
             :sortable="'custom'"
@@ -188,8 +195,10 @@ export default {
             value2:'',
             options: [],
             time:'2021-01-01',
-            timemonth:'1',
-            timeyear:'2021',
+            timemonth:'',
+            month:'2021-01',
+            timeyear:'',
+            year:'2021',
             title:'月曲线偏差率排行榜',
             daymonth:'',
             dayyear:'',
@@ -228,9 +237,13 @@ export default {
             this.DeviceRatData();
         },
         clickCopy(e) {
+            console.log(e)
              this.type = e;
         },
         tableDatawindturbineName(val) {
+            if(this.type == "1"){
+                this.dialogFormVisible = false;
+            }else{
         //   console.log(val);
           this.dialogFormVisible = true;
           this.Xdata = [];
@@ -242,7 +255,14 @@ export default {
             this.eldialogtitle = '月曲线偏差率排行';
             deviceRateChartData.append('type',this.type);
             deviceRateChartData.append('wtId',this.fanData.windturbineid);
-            deviceRateChartData.append('year',this.timeyear);
+            this.timeyear = this.year.toString();
+            deviceRateChartData.append('year',this.timeyear);  
+            this.timemonth = this.month.toString();
+            if(this.timemonth.substring(6,7) < 10){
+                this.timemonth = this.timemonth.substring(6,7);
+            }else{
+                this.timemonth = this.timemonth.substring(5,7)
+            }      
             deviceRateChartData.append('month',this.timemonth);
             this.$http.post('/leaderboard/curveMonthchatAjax',deviceRateChartData).then((res) =>{
                 this.ChartData = res.data.data.datas;
@@ -274,6 +294,7 @@ export default {
                 })
             })
            }
+            }
         },
         changeTableSort(column){
 			this.orderByColumn = column.prop;
@@ -296,7 +317,14 @@ export default {
                 deviceRatData.append('orderByColumn',this.orderByColumn);
                 deviceRatData.append('isAsc',this.isAsc);
                 deviceRatData.append('wpId',this.value);
+                this.timeyear = this.year.toString();  
                 deviceRatData.append('year',this.timeyear);
+                this.timemonth = this.month.toString();
+                if(this.timemonth.substring(6,7) < 10){
+                    this.timemonth = this.timemonth.substring(6,7);
+                }else{
+                    this.timemonth = this.timemonth.substring(5,7)
+                }    
                 deviceRatData.append('month',this.timemonth);
                 this.$http.post("/leaderboard/curvefittingmonthmainList",deviceRatData).then((res) => {
                     this.gridData = res.data.data;