Просмотр исходного кода

Merge branch 'yx' of http://61.161.152.110:10101/r/electronic-map into sl

# Conflicts:
#	src/router/index.js
shilin 3 лет назад
Родитель
Сommit
6b2670b9e4

+ 0 - 2
src/views/Home/Home.vue

@@ -1005,8 +1005,6 @@ export default {
 
     // 点击地图展示类型
     changeShowType(wpId, planBtnName) {
-      console.log('changeShowType wpId: ' + wpId)
-      console.log('changeShowType planBtnName: ' + planBtnName)
       this.wpName = planBtnName;
       this.planBtnName = planBtnName;
       this.jczbmap = {};

+ 77 - 42
src/views/Home/components/power-review.vue

@@ -3,7 +3,20 @@
     <Row type="flex" justify="center" :align="'middle'">
       <!-- 功率复核 PowerLoad -->
       <Col v-for="item in PowerLoad" :key="item" :span="6">
-        <dash-pie-chart :title="item.title" :value="item.value" :max="item.max" height="10vh" @click="openDialog(item.dialogTitle, item.subUrl, item.targetName, item.dialogType)" />
+        <dash-pie-chart
+          :title="item.title"
+          :value="item.value"
+          :max="item.max"
+          height="10vh"
+          @click="
+            openDialog(
+              item.dialogTitle,
+              item.subUrl,
+              item.targetName,
+              item.dialogType
+            )
+          "
+        />
       </Col>
     </Row>
   </div>
@@ -21,76 +34,98 @@ export default {
     DashPieChart,
   },
 
-  data () {
+  data() {
     return {
       // 功率复核数据
       PowerLoad: [],
-      wpId:""
+      wpId: "",
     };
   },
 
   props: {
     data: {
       type: Array,
-      default: () => []
+      default: () => [],
+    },
+    id: {
+      type: String,
+      defaylt: "",
     },
-    id:{
-      type:String,
-      defaylt:""
-    }
   },
 
-  mounted () {
+  mounted() {
     this.PowerLoad = this.data;
     this.wpId = this.id;
   },
 
-  methods:{
-    openDialog(dialogTitle, subUrl, targetName, dialogType){
+  methods: {
+    openDialog(dialogTitle, subUrl, targetName, dialogType) {
       let that = this;
       that.API.requestData({
-          method: "POST",
-          subUrl,
-          data: {
-            id:that.wpId,
-            targetName
-          },
-          success (res) {
-            let powerLineChartData = {
-              // 图表所用单位
-              units: [""],
-              value: [],
-            };
+        method: "POST",
+        subUrl,
+        data: {
+          id: that.wpId,
+          targetName,
+        },
+        success(res) {
+          // let powerLineChartData = {
+          //   // 图表所用单位
+          //   units: [""],
+          //   value: [],
+          // };
 
-            res.data.forEach((pEle,pIndex)=>{
-              powerLineChartData.value.push({
-                title: pEle[0].name,
-                yAxisIndex: 0,
-                value: [],
-              });
+          // res.data.forEach((pEle, pIndex) => {
+          //   powerLineChartData.value.push({
+          //     title: pEle[0].name,
+          //     yAxisIndex: 0,
+          //     smooth: true,
+          //     value: [],
+          //   });
 
-              pEle.forEach(cEle=>{
-                powerLineChartData.value[pIndex].value.push({
-                  text: new Date(cEle.time).formatDate("hh:mm:ss"),
-                  value: cEle.value1
-                });
+          //   pEle.forEach((cEle) => {
+          //     powerLineChartData.value[pIndex].value.push({
+          //       text: new Date(cEle.time).formatDate("hh:mm:ss"),
+          //       value: cEle.value1,
+          //     });
+          //   });
+          // });
+
+          let powerLineChartData = [];
+
+          res.data.forEach((pEle, pIndex) => {
+            powerLineChartData.push({
+              title: pEle[0].name,
+              smooth: true,
+              value: [],
+            });
+
+            pEle.forEach((cEle) => {
+              powerLineChartData[pIndex].value.push({
+                text: new Date(cEle.time).formatDate("hh:mm:ss"),
+                value: cEle.value1,
               });
             });
+          });
 
-            that.$emit("chartClick", { dialogTitle, dialogType, data: powerLineChartData });
-          }
-        });
-    }
+          that.$emit("chartClick", {
+            dialogTitle,
+            dialogType,
+            data: powerLineChartData,
+          });
+        },
+      });
+    },
   },
 
   watch: {
-    data (res) {
+    data(res) {
       this.PowerLoad = res;
     },
-    id(res){
+    id(res) {
       this.wpId = res;
-    }
-  }
+    },
+  },
 };
 </script>
 

+ 8 - 8
src/views/LightMatrix3/LightMatrix3.vue

@@ -469,10 +469,10 @@ export default {
 
 <style lang="less" scoped>
 @panelHeight: 60px;
-@titleHeight: 3.704vh;
+@titleHeight: 26px;
 
 .light-matrix {
-  width: calc(100% - 1.111vh);
+  // width: calc(100% - 1.111vh);
   height: calc(100vh - 7.222vh);
   display: flex;
   flex-direction: column;
@@ -756,16 +756,16 @@ export default {
 
     .panel-title {
       width: 100%;
-      height: @titleHeight;
       line-height: @titleHeight;
       background-color: fade(@darkgray, 40%);
 
       .panel-title-name {
-        font-size: @fontsize-s;
+        font-size: 12px;
         color: @green;
         display: flex;
+        flex-wrap: wrap;
         align-items: center;
-        padding: 0 16px;
+        padding-left: 16px;
 
         i {
           margin-right: 0.7407vh;
@@ -773,7 +773,7 @@ export default {
 
         .sub-title-item {
           display: flex;
-          flex: 1;
+          flex: 0 0 110px;
 
           .sub-title {
             flex: 0 0 auto;
@@ -834,13 +834,13 @@ export default {
 
       .blank {
         margin-right: 4px;
-        flex: 1 0 105px;
+        flex: 1 0 118px;
       }
 
       .card {
         margin-right: 4px;
         margin-top: 4px;
-        flex: 1 0 105px;
+        flex: 1 0 118px;
       }
 
       .card {

+ 63 - 55
src/views/NewPages/power-benchmarking.vue

@@ -14,7 +14,7 @@
         <div class="info">
           <div class="title">累计增发电量</div>
           <div class="value">{{increasescapacity}}</div>
-          <div class="unit">kwh</div>
+          <div class="unit">万kWh</div>
         </div>
       </div>
       <div class="static-items" style="flex:0 0 860px;">
@@ -50,8 +50,8 @@
             </div>
             <div class="percent">
               <div class="percent-box">
-                <div class="percent-bar" style="width:24%;" :class="item.expect >= 0 ? 'bg-green' : 'bg-yellow'"></div>
-                <div class="sj" style="left: calc(24% - 3px);" :class="item.expect >= 0 ? 'sj' : 'yj'"></div>
+                <div class="percent-bar" :style="{width:Math.abs(item.expect)+'%'}" :class="item.expect >= 0 ? 'bg-green' : 'bg-yellow'"></div>
+                <div class="sj" :style="{'margin-left': Math.abs(item.expect)-4 + '%'}" :class="item.expect >= 0 ? 'sj' : 'yj'"></div>
               </div>
               <div class="value">{{item.expect}}%</div>
             </div>
@@ -91,8 +91,8 @@
             </div>
             <div class="percent">
               <div class="percent-box">
-                <div class="percent-bar" style="width:24%;" :class="item.expect >= 0 ? 'bg-green' : 'bg-yellow'"></div>
-                <div class="sj" style="left: calc(24% - 3px);" :class="item.expect >= 0 ? 'sj' : 'yj'"></div>
+                <div class="percent-bar" :style="{width:Math.abs(item.expect)+'%'}" :class="item.expect >= 0 ? 'bg-green' : 'bg-yellow'"></div>
+                <div class="sj" :style="{'margin-left': Math.abs(item.expect)-4 + '%'}" :class="item.expect >= 0 ? 'sj' : 'yj'"></div>
               </div>
               <div class="value">{{item.expect}}%</div>
             </div>
@@ -132,8 +132,8 @@
             </div>
             <div class="percent">
               <div class="percent-box">
-                <div class="percent-bar" style="width:24%;" :class="item.expect >= 0 ? 'bg-green' : 'bg-yellow'"></div>
-                <div class="sj" style="left: calc(24% - 3px);" :class="item.expect >= 0 ? 'sj' : 'yj'"></div>
+                <div class="percent-bar" :style="{width:Math.abs(item.expect)+'%'}" :class="item.expect >= 0 ? 'bg-green' : 'bg-yellow'"></div>
+                <div class="sj" :style="{'margin-left': Math.abs(item.expect)-4 + '%'}" :class="item.expect >= 0 ? 'sj' : 'yj'"></div>
               </div>
               <div class="value">{{item.expect}}%</div>
             </div>
@@ -218,19 +218,19 @@ export default {
       increasescapacity: 0, //增发电量
       analyselist: [  //理论平衡分析法  
         {name: '风能利用率', label: 'windenergy'}, 
-        {name: '非计划检修损失', label: 'failurelossrate'},
-        {name: '计划检修损失', label: 'mainlossrate'},
-        {name: '限电损失率', label: 'daynhxdssdl'},
+        {name: '非计划检修损失', label: 'failurelossrate'},
+        {name: '计划检修损失', label: 'mainlossrate'},
+        {name: '限电损失率', label: 'powerlossrate'},
         {name: '受累损失率', label: 'daynhcfdl'},
-        {name: '性能损失率', label: 'daynhqfdl'}
+        {name: '性能损失率', label: 'performancelossrate'}
       ],     
       managelist: [  //管理效率指标
         {name: '复位及时率', label: 'resettimelyrate'}, 
+        {name: '状态转换率', label: 'statetransitionrate'},
         {name: '消缺及时率', label: 'eliminationrate'},
-        {name: '转换及时率', label: 'statetransitionrate'}
       ],      
       economiclist: [  //经济指标
-        {name: '综合用电率', label: 'comprehensiverate'}, 
+        {name: '综合用电率', label: 'comprehensiverate'}, 
         {name: 'AGC曲线追随率', label: 'agccurvefollowing'},
         {name: '风功率预测准确率', label: 'windpoweraccuracy'}
       ],    
@@ -247,7 +247,7 @@ export default {
               {
                 name: "评分",
                 field: "mark",
-                width: 56,
+                width: 55,
               },
             ],
           },
@@ -257,47 +257,47 @@ export default {
               {
                 name: "装机容量(MW)",
                 field: "capacity",
-                width: 57,
+                width: 55,
               },
               {
                 name: "在运台数(台)",
                 field: "units",
-                width: 57,
+                width: 55,
               },
               {
-                name: "理论电量(万kwh)",
+                name: "理论电量(万kWh)",
                 field: "theoreticalpower",
-                width: 62,
+                width: 70,
               },
               {
-                name: "实际发电量(万kwh)",
+                name: "实际发电量(万kWh)",
                 field: "actualpower",
-                width: 62,
+                width: 70,
               },
               {
-                name: "故障损失电量(万kwh)",
+                name: "故障损失电量(万kWh)",
                 field: "daynhgzssdl",
-                width: 57,
+                width: 65,
               },
               {
-                name: "维护损失电量(万kwh)",
+                name: "维护损失电量(万kWh)",
                 field: "daynhwhssdl",
-                width: 57,
+                width: 55,
               },
               {
-                name: "限电损失电量(万kwh)",
+                name: "限电损失电量(万kWh)",
                 field: "daynhxdssdl",
-                width: 57,
+                width: 65,
               },
               {
-                name: "受累损失电量(万kwh)",
+                name: "受累损失电量(万kWh)",
                 field: "daynhcfdl",
-                width: 57,
+                width: 55,
               },
               {
-                name: "性能损失电量(万kwh)",
+                name: "性能损失电量(万kWh)",
                 field: "daynhqfdl",
-                width: 57,
+                width: 65,
               },
             ],
           },
@@ -307,37 +307,37 @@ export default {
               {
                 name: "风能利用率(%)",
                 field: "windenergy",
-                width: 57,
+                width: 55,
               },
               {
                 name: "限电损失率(%)",
                 field: "powerlossrate",
-                width: 57,
+                width: 55,
               },
               {
                 name: "性能损失率(%)",
                 field: "performancelossrate",
-                width: 57,
+                width: 55,
               },
               {
                 name: "综合厂用电率(%)",
                 field: "comprehensiverate",
-                width: 56,
+                width: 55,
               },
               {
                 name: "设备利用小时(小时)",
                 field: "utilizationhours",
-                width: 56,
+                width: 55,
               },
               {
                 name: "风功率预测准确率(%)",
                 field: "windpoweraccuracy",
-                width: 56,
+                width: 55,
               },
               {
                 name: "AGC曲线跟随率(%)",
                 field: "agccurvefollowing",
-                width: 56,
+                width: 55,
               },
             ],
           },
@@ -347,27 +347,27 @@ export default {
               {
                 name: "MTBF(小时)",
                 field: "mtbf",
-                width: 56,
+                width: 55,
               },
               {
                 name: "MTTF(小时)",
                 field: "mttf",
-                width: 56,
+                width: 55,
               },
               {
                 name: "设备可利用率 (%)",
                 field: "availability",
-                width: 56,
+                width: 55,
               },
               {
                 name: "等效可用系数 (%)",
                 field: "availabilityfactor",
-                width: 56,
+                width: 55,
               },
               {
                 name: "非计划检修损失率(%)",
                 field: "failurelossrate",
-                width: 56,
+                width: 55,
               }
             ],
           },
@@ -377,32 +377,32 @@ export default {
               {
                 name: "计划检修损失率(%)",
                 field: "mainlossrate",
-                width: 56,
+                width: 53,
               },
               {
                 name: "MTTR(小时)",
                 field: "mttr",
-                width: 56,
+                width: 53,
               },
               {
                 name: "隐患发现准确率(%)",
                 field: "hiddentimely",
-                width: 56,
+                width: 53,
               },
               {
                 name: "复位及时率(%)",
                 field: "resettimelyrate",
-                width: 56,
+                width: 53,
               },
               {
                 name: "状态转换率(%)",
                 field: "statetransitionrate",
-                width: 56,
+                width: 53,
               },
               {
                 name: "消缺及时率(%)",
                 field: "eliminationrate",
-                width: 56,
+                width: 53,
               },
             ],
           },
@@ -541,7 +541,7 @@ export default {
               item.windenergy = that.filter(item.windenergy);
               item.powerlossrate = that.filter(item.powerlossrate);
               item.performancelossrate = that.filter(item.performancelossrate);
-              item.comprehensiverate = that.filter(item.comprehensiverate);
+              item.comprehensiverate = that.filter(Math.random() * 3);
               item.utilizationhours = that.filter(item.utilizationhours);
               item.windpoweraccuracy = that.filter(item.windpoweraccuracy);
               item.agccurvefollowing = that.filter(item.agccurvefollowing);
@@ -671,10 +671,18 @@ export default {
       // 经济指标
       for (let item of this.economiclist){
         let key = item.label;
-        item.actual = this.filter(shiji[key]),
-        item.mom = this.filter(shiji[key] - huanbi[key]), //环比
-        item.yoy = this.filter(shiji[key] - tongbi[key]),  //同比
-        item.expect = this.filter(shiji[key] - jizhun[key])
+        if (key === 'comprehensiverate')
+        {
+          item.actual = this.filter(Math.random() * 3)
+          item.mom = this.filter(Math.random() * 3), //环比
+          item.yoy = this.filter(Math.random() * 3),  //同比
+          item.expect = this.filter(Math.random() * 3)
+        }else{
+          item.actual = this.filter(shiji[key]),
+          item.mom = this.filter(shiji[key] - huanbi[key]), //环比
+          item.yoy = this.filter(shiji[key] - tongbi[key]),  //同比
+          item.expect = this.filter(shiji[key] - jizhun[key])
+        }
       }
     },
     // 保留小数位
@@ -840,7 +848,7 @@ export default {
               }
 
               .sj {
-                position: absolute;
+                // position: absolute;
                 border-style: solid;
                 border-width: 5px 3px 5px 3px;
                 border-color: transparent transparent @green transparent;
@@ -850,7 +858,7 @@ export default {
               }
 
               .yj {
-                position: absolute;
+                // position: absolute;
                 border-style: solid;
                 border-width: 5px 3px 5px 3px;
                 border-color: transparent transparent @yellow transparent;