Browse Source

(sunzehao提交)问题修改

wangb 5 months atrás
parent
commit
eb45bd1b95

+ 4 - 2
src/views/IntegratedAlarm/reliability/customAnalyse/index.vue

@@ -186,10 +186,11 @@
                 class="bar-percent"
                 :style="{
                   width:
+                  scope.row[`${item.code}_count`] > 0 ?
                     (Math.ceil(scope.row[`${item.code}_count`]) /
                       Math.ceil(scope.column.realWidth)) *
                       100 +
-                    'px',
+                    'px' : '0px',
                 }"
               ></div>
               <!-- <span class="value">{{ row[`${item.code}_count`] }} 次</span> -->
@@ -213,10 +214,11 @@
                 class="bar-percent"
                 :style="{
                   width:
+                  scope.row[`${item.code}_time`] > 0 ?
                     (Math.ceil(scope.row[`${item.code}_time`]) /
                       Math.ceil(scope.column.realWidth)) *
                       100 +
-                    'px',
+                    'px' : '0px',
                 }"
               ></div>
               <!-- <span class="value">{{ row[`${item.code}_time`] }} 分钟</span> -->

+ 4 - 4
src/views/IntegratedAlarm/reliability/historyAnalyse/index.vue

@@ -187,8 +187,8 @@
                 }" -->
               <div
                 class="bar-percent"
-                :style="{width: (Math.ceil(scope.row[`${item.code}_count`]) / 
-                Math.ceil(scope.column.realWidth))*100 + 'px'}"
+                :style="{width: scope.row[`${item.code}_count`] > 0 ? (Math.ceil(scope.row[`${item.code}_count`]) / 
+                Math.ceil(scope.column.realWidth))*100 + 'px' : '0px'}"
               ></div>
               <!-- <span class="value">{{ row[`${item.code}_count`] }} 次</span> -->
               <span class="value">{{ getCalcValue(scope.row[`${item.code}_count`]) }} 次</span>
@@ -206,8 +206,8 @@
                 }" -->
               <div
                 class="bar-percent"
-                :style="{width: (Math.ceil(scope.row[`${item.code}_time`]) / 
-                Math.ceil(scope.column.realWidth))*100 + 'px'}"
+                :style="{width: scope.row[`${item.code}_time`] > 0 ? (Math.ceil(scope.row[`${item.code}_time`]) / 
+                Math.ceil(scope.column.realWidth))*100 + 'px' : '0px'}"
               ></div>
               <!-- <span class="value">{{ row[`${item.code}_time`] }} 分钟</span> -->
               <span class="value">{{ getCalcValue(scope.row[`${item.code}_time`]) }} 分钟</span>

+ 4 - 2
src/views/IntegratedAlarm/safe/components/safecomponent.vue

@@ -38,8 +38,9 @@
         width="50"
         show-overflow-tooltip
       />
+      <!-- :prop="alarmType==='custom' ? characteristic : description" -->
       <el-table-column
-        prop="description"
+        :prop="alarmType==='custom' ? 'characteristic' : 'description'"
         align="center"
         label="信息"
         show-overflow-tooltip
@@ -137,7 +138,7 @@
               <span
                 class="alertDescCursor"
                 @click="goToAlertDescPage(scope.row)"
-                >{{ scope.row.description || "--" }}</span
+                >{{ alarmType==='custom' ? scope.row.characteristic : scope.row.description || "--" }}</span
               >
             </template>
           </el-table-column>
@@ -310,6 +311,7 @@ export default {
       //   return b.ts - a.ts;
       // });
       this.alarmList = alarmList;
+      console.log("alarmList===>>>>", this.alarmList)
       if (!this.stopUpdate) {
         this.dialogTableData = dialogTableData;
       }

+ 5 - 5
src/views/home/index.vue

@@ -1130,7 +1130,7 @@ export default {
             symbol: "none",
           },
           {
-            name: "应发功率",
+            name: "理论功率",
             data: seriesGl,
             type: "line",
             symbol: "none",
@@ -1172,7 +1172,7 @@ export default {
             top: "20",
             itemWidth: 5,
             itemHeight: 5,
-            data: ["平均风速", "应发功率", "实际功率", "预测功率"],
+            data: ["平均风速", "理论功率", "实际功率", "预测功率"],
             textStyle: {
               color: theme ? "#1850B3" : "#fff",
             },
@@ -1563,7 +1563,7 @@ export default {
               unit: "MW",
             },
             {
-              title: "应发功率",
+              title: "理论功率",
               value: it.yfgl,
               max: res.data.rl,
               unit: "MW",
@@ -1606,7 +1606,7 @@ export default {
               symbol: "none",
             },
             {
-              name: "应发功率",
+              name: "理论功率",
               data: seriesGl,
               type: "line",
               symbol: "none",
@@ -2624,7 +2624,7 @@ export default {
           top: "5",
           itemWidth: 5,
           itemHeight: 5,
-          data: ["平均风速", "应发功率", "实际功率", "预测功率"],
+          data: ["平均风速", "理论功率", "实际功率", "预测功率"],
           textStyle: {
             color: theme ? "#1850B3" : "#fff",
           },