Browse Source

指标首页bug修改

chenminghua 3 years ago
parent
commit
768a21fe29
1 changed files with 63 additions and 55 deletions
  1. 63 55
      src/views/NewPages/power-benchmarking.vue

+ 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;