Ver código fonte

'风机绩效榜新接口'

蒋珅 1 ano atrás
pai
commit
1fc1a877ad
3 arquivos alterados com 79 adições e 119 exclusões
  1. 50 102
      src/views/Decision/Decision1.vue
  2. 19 8
      src/views/Home/Home.vue
  3. 10 9
      src/views/sisView/index.vue

+ 50 - 102
src/views/Decision/Decision1.vue

@@ -87,34 +87,34 @@
 										{{ tableDataEnd.index }}
 									</td>
 									<td style="width: 150px">
-										{{ tableDataEnd.name }}
+										{{ tableDataEnd.uniformCode }}
 									</td>
 									<td>
-										{{ tableDataEnd.llfdl }}
+										{{ tableDataEnd.theoryGeneration }}
 									</td>
 									<td>
-										{{ tableDataEnd.sjfdl }}
+										{{ tableDataEnd.generatingCapacity }}
 									</td>
 									<td>
-										{{ tableDataEnd.speed }}
+										{{ tableDataEnd.meanWindSpeed }}
 									</td>
 									<td>
-										{{ tableDataEnd.fjhjx }}
+										{{ tableDataEnd.faultLossPower }}
 									</td>
 									<td>
-										{{ tableDataEnd.jhjx }}
+										{{ tableDataEnd.maintainLossPower }}
 									</td>
 									<td style="width: 80px">
-										{{ tableDataEnd.sl }}
+										{{ tableDataEnd.implicateLossPower }}
 									</td>
 									<td>
-										{{ tableDataEnd.xd }}
+										{{ tableDataEnd.limitLossPower }}
 									</td>
 									<td>
-										{{ tableDataEnd.xn }}
+										{{ tableDataEnd.performanceLossPower }}
 									</td>
 									<td>
-										{{ tableDataEnd.fnlly }}
+										{{ tableDataEnd.category }}
 									</td>
 								</tr>
 							</template>
@@ -134,7 +134,7 @@
 	import ToolbarPanel from "../../components/coms/panel/toolbar-panel.vue";
 	import Table from "./table.vue";
 	import partten from "@/helper/partten.js";
-import { cacher } from '@antv/x6/lib/util/function/function';
+    import { cacher } from '@antv/x6/lib/util/function/function';
 	export default {
 		components: {
 			ToolbarPanel,
@@ -157,49 +157,49 @@ import { cacher } from '@antv/x6/lib/util/function/function';
 						},
 						{
 							name: "名称",
-							field: "name",
+							field: "uniformCode",
 							width: "150px",
 							is_num: false,
 							is_light: false,
 						},
 						{
 							name: "理论发电量",
-							field: "llfdl",
+							field: "theoryGeneration",
 							is_num: false,
 							is_light: false,
 							sortable: true,
 						},
 						{
 							name: "SCADA发电量",
-							field: "sjfdl",
+							field: "generatingCapacity",
 							is_num: false,
 							is_light: false,
 							sortable: true,
 						},
 						{
 							name: "风速",
-							field: "speed",
+							field: "meanWindSpeed",
 							is_num: false,
 							is_light: false,
 							sortable: true,
 						},
 						{
 							name: "非计划检修",
-							field: "fjhjx",
+							field: "faultLossPower",
 							is_num: false,
 							is_light: false,
 							sortable: true,
 						},
 						{
 							name: "计划检修",
-							field: "jhjx",
+							field: "maintainLossPower",
 							is_num: false,
 							is_light: false,
 							sortable: true,
 						},
 						{
 							name: "受累",
-							field: "sl",
+							field: "implicateLossPower",
 							width: "80px",
 							is_num: false,
 							is_light: false,
@@ -207,21 +207,21 @@ import { cacher } from '@antv/x6/lib/util/function/function';
 						},
 						{
 							name: "限电",
-							field: "xd",
+							field: "limitLossPower",
 							is_num: false,
 							is_light: false,
 							sortable: true,
 						},
 						{
 							name: "性能",
-							field: "xn",
+							field: "performanceLossPower",
 							is_num: false,
 							is_light: false,
 							sortable: true,
 						},
 						{
 							name: "风能利用率%",
-							field: "fnlly",
+							field: "category",
 							is_num: false,
 							is_light: false,
 							sortable: true,
@@ -355,45 +355,9 @@ import { cacher } from '@antv/x6/lib/util/function/function';
 			
 			AjaxCommon() {
 				var that = this;
-                   that.API.requestData({
-					method: "GET",
-					baseURL: "http://192.168.1.67:8133/",
-					subUrl: "benchmarking/fjjxb",
-					data: {
-						wpids: that.value1,
-						projectids: that.value2,
-						lineids: that.value3,
-						beginDate: that.value4,
-						endDate: that.value5,
-						type: that.TypeClass,
-						target: "",
-						sort: "",
-					},
-				success(res) {
-						console.log('661',res);
-						res.data.forEach((ele)=>{
-							that.nbdata.push({
-								uniformCode: ele.uniformCode,
-								theoryGeneration:ele.theoryGeneration,
-								meanWindSpeed: ele.meanWindSpeed,
-								generatingCapacity:ele.generatingCapacity,
-								faultLossPower:ele.faultLossPower,
-								maintainLossPower:ele.maintainLossPower,
-								implicateLossPower:ele.implicateLossPower,
-								limitLossPower:ele.limitLossPower,
-								performanceLossPower:ele.performanceLossPower,
-								category:ele.category
-							});
-						})
-				},
-				// fail(error){
-				// 	console.log('01',error);
-				// 	that.nbdata=null
-				// }
-                  })
 				that.API.requestData({
 					method: "GET",
-					baseURL: "http://10.155.32.4:9001/",
+					baseURL: "http://192.168.1.67:8133/",
 					subUrl: "benchmarking/fjjxb",
 					data: {
 						wpids: that.value1,
@@ -407,23 +371,6 @@ import { cacher } from '@antv/x6/lib/util/function/function';
 					},
 					success(res) {
 						console.log('666',res);
-						// if(that.nbdata!=null){
-							res.data.forEach((item1)=>{
-                            that.nbdata.forEach((item2)=>{
-							if(item1.name === item2.uniformCode){
-								item1.llfdl=item2.theoryGeneration,
-								item1.sjfdl=item2.generatingCapacity,
-								item1.speed = item2.meanWindSpeed,
-								item1.fjhjx=item2.faultLossPower,
-								item1.jhjx= item2.maintainLossPower,
-								item1.sl=item2.implicateLossPower,
-								item1.xd=item2.limitLossPower,
-								item1.xn= item2.performanceLossPower,
-								item1.fnlly= item2.category
-							}
-							})
-							})
-							// }
 						var name = [],
 							data = [],
 							llfdl = [],
@@ -436,38 +383,38 @@ import { cacher } from '@antv/x6/lib/util/function/function';
 								"性能损失",
 							],
 							data2 = []; //项目列表
-						if (that.value1.length) {
-							let arr = [];
-							let hj = res.data.pop();
-							res.data.forEach((ele, index) => {
-								arr[ele.id.split('_')[1] - 1] = ele
-							})
-							arr.push(hj);
-							res.data = arr;
-						}
+						// if (that.value1.length) {
+						// 	let arr = [];
+						// 	let hj = res.data.pop();
+						// 	res.data.forEach((ele, index) => {
+						// 		arr[ele.id.split('_')[1] - 1] = ele
+						// 	})
+						// 	arr.push(hj);
+						// 	res.data = arr;
+						// }
 						res.data.forEach((item, index) => {
-							name.push(item.name);
+							name.push(item.uniformCode);
 							data.push([
-								item.sjfdl,
-								item.jhjx,
-								item.fjhjx,
-								item.xd,
-								item.sl,
-								item.xn,
+								item.generatingCapacity,
+								item.maintainLossPower,
+								item.faultLossPower,
+								item.limitLossPower,
+								item.implicateLossPower,
+								item.performanceLossPower,
 							]);
-							llfdl.push(item.llfdl);
+							llfdl.push(item.theoryGeneration);
 							data2.push({
 								index: index + 1,
-								name: item.name,
-								llfdl: item.llfdl,
-								sjfdl: item.sjfdl,
-								speed: item.speed,
-								fjhjx: item.fjhjx,
-								jhjx: item.jhjx,
-								sl: item.sl,
-								xd: item.xd,
-								xn: item.xn,
-								fnlly: item.fnlly,
+								uniformCode: item.uniformCode,
+								theoryGeneration: item.theoryGeneration,
+								generatingCapacity: item.generatingCapacity,
+								meanWindSpeed: item.meanWindSpeed,
+								faultLossPower: item.faultLossPower,
+								maintainLossPower: item.maintainLossPower,
+								implicateLossPower: item.implicateLossPower,
+								limitLossPower: item.limitLossPower,
+								performanceLossPower: item.performanceLossPower,
+								category: item.category,
 								is_light: false,
 							});
 						});
@@ -490,6 +437,7 @@ import { cacher } from '@antv/x6/lib/util/function/function';
 								legend: legend,
 								data: arr1,
 							};
+							console.log(that.lineData,that.bardata);
 						}
 						that.tableDataEnd = data2[data2.length - 1];
 						data2.pop();

+ 19 - 8
src/views/Home/Home.vue

@@ -834,6 +834,7 @@ export default {
   },
   data() {
     return {
+      bba:"",
       historyWpId: "",
       historyPlanBtnName: "",
       timmer: null, // 计时器
@@ -993,7 +994,11 @@ export default {
                 that.wpId === "-2" || that.wpId.indexOf("GDC") !== -1
                   ? "日照强度"
                   : "风速",
-              value: res.data.jczbmap.ssfs,
+              value:
+               that.wpId === "-2" || that.wpId.indexOf("GDC") !== -1
+                  ? that.bba
+                  : `${res.data.jczbmap.ssfs}`,
+               
               dialogTitle:
                 that.wpId == 0
                   ? "详情"
@@ -1057,12 +1062,12 @@ export default {
             },
             {
               name: "实际发电量",
-              value: res.data.jczbmap.rfdl,
+              value: that.rdlmap.rfdl ,
               // total: res.data.jczbmap.rfdlsx,
               total:
-                res.data.jczbmap.rycfdl >= res.data.jczbmap.rfdl
+                res.data.jczbmap.rycfdl >= that.rdlmap.rfdl
                   ? res.data.jczbmap.rycfdl+1
-                  : res.data.jczbmap.rfdl+1,
+                  : that.rdlmap.rfdl+1,
             },
             {
               name: "当月预测电量",
@@ -1075,12 +1080,12 @@ export default {
             },
             {
               name: "实际发电量",
-              value: res.data.jczbmap.yfdl,
+              value: that.rdlmap.yfdl,
               // total: res.data.jczbmap.yfdlsx,
               total:
-                res.data.jczbmap.yycfdl >= res.data.jczbmap.yfdl
+                res.data.jczbmap.yycfdl >= that.rdlmap.yfdl
                   ? res.data.jczbmap.yycfdl + 1
-                  : res.data.jczbmap.yfdl + 1,
+                  : that.rdlmap.yfdl + 1,
             },
           ];
 
@@ -1228,6 +1233,13 @@ export default {
         },
         success(res) {
           //  console.log(189,res);
+            let nbrdlmap=[]
+          nbrdlmap=res.data.rdlmap
+          const lastItem = nbrdlmap[nbrdlmap.length - 1];  // 获取最后一项对象
+          const desiredProperty = lastItem.speed;  // 获取某个属性的值
+           that.bba=desiredProperty
+          //  console.log(that.bba);
+               
           let rdlKey = ["value1", "value2", "value3", "speed"];
           let dw = {
             units: "",
@@ -1429,7 +1441,6 @@ export default {
         },
         success(res) {
           console.log(123,res);
-          console.log('bba',res);
           that.dialogShow = true;
           that.dialogData = res.data;
           that.dialogType = dialogType;

+ 10 - 9
src/views/sisView/index.vue

@@ -202,7 +202,7 @@
           <div class="itemNum">{{ little.gfzjrl }}</div>
           <div class="itemUnit">MW</div>
           <div class="itemName">日照强度</div>
-          <div class="itemNum">{{ items.gfrzqd }}</div>
+          <div class="itemNum">{{ little.rzqd }}</div>
           <div class="itemUnit">W/㎡</div>
           <div class="itemName">实时功率</div>
           <div class="itemNum">{{ items.gfssgl }}</div>
@@ -235,7 +235,7 @@
           <div class="itemNum">{{ little.dwkfdl }}</div>
           <div class="itemUnit">万kWh</div>
           <div class="itemName">武日强度</div>
-          <div class="itemNum">{{ items.dwkrzqd }}</div>
+          <div class="itemNum">{{ little.dwkrzqd }}</div>
           <div class="itemUnit">W/㎡</div>
           <div class="itemName">武功率</div>
           <div class="itemNum">{{ items.dwkgl }}</div>
@@ -246,7 +246,7 @@
           <div class="itemNum">{{ little.plfdl }}</div>
           <div class="itemUnit">万kWh</div>
           <div class="itemName">平日强度</div>
-          <div class="itemNum">{{ items.plrzqd }}</div>
+          <div class="itemNum">{{ little.plrzqd }}</div>
           <div class="itemUnit">W/㎡</div>
           <div class="itemName">平功率</div>
           <div class="itemNum">{{ items.plgl }}</div>
@@ -257,7 +257,7 @@
           <div class="itemNum">{{ little.xhfdl }}</div>
           <div class="itemUnit">万kWh</div>
           <div class="itemName">宣日强度</div>
-          <div class="itemNum">{{ items.xhrzqd }}</div>
+          <div class="itemNum">{{ little.xhrzqd }}</div>
           <div class="itemUnit">W/㎡</div>
           <div class="itemName">宣功率</div>
           <div class="itemNum">{{ items.xhgl }}</div>
@@ -268,7 +268,7 @@
           <div class="itemNum">{{ little.mchfdl }}</div>
           <div class="itemUnit">万kWh</div>
           <div class="itemName">马日强度</div>
-          <div class="itemNum">{{ items.mchrzqd }}</div>
+          <div class="itemNum">{{ little.mchrzqd }}</div>
           <div class="itemUnit">W/㎡</div>
           <div class="itemName">马功率</div>
           <div class="itemNum">{{ items.mchgl }}</div>
@@ -279,23 +279,23 @@
           <div class="itemNum">{{ little.hzjfdl }}</div>
           <div class="itemUnit">万kWh</div>
           <div class="itemName">海日强度</div>
-          <div class="itemNum">{{ items.hzjrzqd }}</div>
+          <div class="itemNum">{{ little.hzjrzqd }}</div>
           <div class="itemUnit">W/㎡</div>
           <div class="itemName">海功率</div>
           <div class="itemNum">{{ items.hzjgl }}</div>
           <div class="itemUnit">MW</div>
         </div>
-         <!-- <div class="contentItem">
+         <div class="contentItem">
           <div class="itemName">埃发电量</div>
           <div class="itemNum">{{ little.akfdl }}</div>
           <div class="itemUnit">万kWh</div>
           <div class="itemName">埃日强度</div>
-          <div class="itemNum">{{ items.akrzqd }}</div>
+          <div class="itemNum">{{ little.akrzqd }}</div>
           <div class="itemUnit">W/㎡</div>
           <div class="itemName">埃功率</div>
           <div class="itemNum">{{ items.akgl }}</div>
           <div class="itemUnit">MW</div>
-        </div> -->
+        </div>
       </div>
     </div>
   </div>
@@ -352,6 +352,7 @@ export default {
         },
       });
     },
+    
     viewAjax1() {
       let that = this;
       that.API.requestData({