Преглед изворни кода

细小页面调整、BUG修复。

Koishi пре 1 година
родитељ
комит
2da49a187b

+ 5 - 2
src/components/alarmPopupa/index.vue

@@ -255,7 +255,7 @@ export default {
               rank: alarmItem.rank,
               class: `animate__bounceInRight lv${alarmItem.rank}`,
               isClose: alarmItem.isClose,
-              isCloseName: alarmItem.isClose ? "是" : "否",
+              isCloseName: alarmItem.isClose ? "已解除" : "未解除",
               alarmId: alarmItem.alarmId,
               alarmType: alarmItem.alarmType,
               alarmName: this.getAlarmName(alarmItem),
@@ -264,7 +264,10 @@ export default {
               oval: alarmItem.oval,
               triggerType: alarmItem.triggerType,
               ts: alarmItem.ts,
-              tsName: new Date(alarmItem.ts).formatDate("yyyy-MM-dd hh:mm:ss"),
+              tsName: new Date(alarmItem.ts).formatDate("MM-dd hh:mm:ss"),
+              fullTsName: new Date(alarmItem.ts).formatDate(
+                "yyyy-MM-dd hh:mm:ss"
+              ),
               deviceId: alarmItem.deviceId,
               deviceType: alarmItem.deviceType,
               faultCause: alarmItem.faultCause,

+ 0 - 9
src/pages/baseData/FanDataStatisticTable.vue

@@ -329,7 +329,6 @@ function getTableList() {
     modelId: state.modelId,
     alarmIds: state.alarmIds,
   }).then((res) => {
-    console.log(11111, res);
     if (res.length) {
       let tableData = [];
       let tHeard = [];
@@ -353,8 +352,6 @@ function getTableList() {
             }
             wtItem[`${cEle.alarmid}_count`] = cEle.count;
             wtItem[`${cEle.alarmid}_time`] = cEle.time;
-            // wtItem[`${cEle.alarmid}_count`] = getRandomInt(1, 1000);
-            // wtItem[`${cEle.alarmid}_time`] = getRandomInt(1, 1000);
             wtItem["wtname"] = cEle.windturbineCode;
           });
           tableData.push(wtItem);
@@ -369,12 +366,6 @@ function getTableList() {
   });
 }
 
-const getRandomInt = function (min, max) {
-  min = Math.ceil(min);
-  max = Math.floor(max);
-  return Math.floor(Math.random() * (max - min + 1)) + min;
-};
-
 const thSort = function (a, b, item) {
   return a[`${item.code}_count`] - b[`${item.code}_count`];
 };

+ 7 - 11
src/pages/safe/datasearch.vue

@@ -57,7 +57,7 @@
         </el-scrollbar>
       </div>
     </el-card>
-    <!-- <el-card class="box-card cardmid">
+    <el-card class="box-card cardmid">
       <el-input
         v-model="state.inputAI"
         style="margin-bottom: 10px"
@@ -73,7 +73,7 @@
         default-expand-all
         @node-click="handleNodeClick"
       />
-    </el-card> -->
+    </el-card>
     <el-card class="box-card cardright">
       <el-table :data="filterAIList" style="width: 100%" height="77vh">
         <el-table-column prop="uniformCode" label="点名" width="120" />
@@ -122,14 +122,9 @@
       v-model="dialogVisible"
       width="80%"
       :before-close="dialogClose"
-      :title="
-        state.activeWT +
-        '_' +
-        state.activeAI +
-        '_' +
-        state.handleSearch?.name +
-        +'历史数据'
-      "
+      :title="`${state.activeWT}_${state.activeAI}_${
+        state.handleSearch?.name || ''
+      }历史数据`"
     >
       <div class="pickerFifter">
         <el-date-picker
@@ -242,6 +237,7 @@ onMounted(async () => {
 onUnmounted(() => {
   state.echarts?.clear(); //销毁
   clearInterval(state.Interval);
+  state.Interval = null;
 });
 const dialogClose = (done) => {
   state.echarts?.clear(); //销毁
@@ -550,6 +546,7 @@ const export2Excel = async () => {
 
   .cardmid {
     width: 10vw;
+    margin: 0 10px;
 
     .active {
       background: #afd5ff;
@@ -558,7 +555,6 @@ const export2Excel = async () => {
 
   .cardright {
     flex: 1;
-    margin-left: 10px;
   }
 }
 

+ 49 - 31
src/pages/safe/safecomponent.vue

@@ -18,10 +18,17 @@
       <el-table-column
         prop="tsName"
         label="报警时间"
-        width="150"
+        width="120"
         show-overflow-tooltip
       />
-      <el-table-column label="报警等级" show-overflow-tooltip>
+      <el-table-column prop="wpName" label="场站" show-overflow-tooltip />
+      <el-table-column prop="code" label="风机" width="50" show-overflow-tooltip />
+      <el-table-column
+        prop="description"
+        label="报警信息"
+        show-overflow-tooltip
+      />
+      <el-table-column label="级别" width="75" show-overflow-tooltip>
         <template #default="scope">
           <el-tag
             class="ml-2"
@@ -36,15 +43,8 @@
           >
         </template>
       </el-table-column>
-      <el-table-column
-        prop="description"
-        label="报警描述"
-        show-overflow-tooltip
-      />
-      <el-table-column
-        label="是否解除"
-        show-overflow-tooltip
-      >
+
+      <el-table-column label="状态" width="75" show-overflow-tooltip>
         <template #default="scope">
           <span
             :style="`color:${
@@ -75,25 +75,27 @@
         <el-table
           :data="dialogTableData"
           style="width: 100%"
-          height="420px"
+          height="620px"
           border
         >
           <el-table-column
-            prop="wpName"
-            label="场站"
+            prop="fullTsName"
+            label="报警时间"
             width="150"
             show-overflow-tooltip
           />
           <el-table-column
-            prop="tsName"
-            label="报警时间"
+            prop="wpName"
+            label="场站"
             width="150"
             show-overflow-tooltip
           />
-          <el-table-column prop="code" label="报警设备" show-overflow-tooltip />
+
+          <el-table-column prop="code" label="报警设备" width="100" show-overflow-tooltip />
           <el-table-column
             prop="characteristic"
             label="报警特征"
+            width="100"
             show-overflow-tooltip
           />
           <el-table-column label="报警描述">
@@ -105,7 +107,33 @@
               >
             </template>
           </el-table-column>
-          <el-table-column label="报警是否解除" show-overflow-tooltip>
+
+          <el-table-column
+            prop="faultCause"
+            label="报警故障原因"
+            show-overflow-tooltip
+          />
+          <el-table-column
+            prop="resolvent"
+            label="报警解决方法"
+            show-overflow-tooltip
+          />
+          <el-table-column label="级别" width="100" show-overflow-tooltip>
+            <template #default="scope">
+              <el-tag
+                class="ml-2"
+                :type="
+                  scope.row.lv === 5
+                    ? 'danger'
+                    : scope.row.lv === 4
+                    ? 'warning'
+                    : 'info'
+                "
+                >{{ scope.row.lvName }}</el-tag
+              >
+            </template>
+          </el-table-column>
+          <el-table-column label="报警是否解除" width="100" show-overflow-tooltip>
             <template #default="scope">
               <span
                 :style="`color:${
@@ -117,17 +145,7 @@
               >
             </template>
           </el-table-column>
-          <el-table-column
-            prop="faultCause"
-            label="报警故障原因"
-            show-overflow-tooltip
-          />
-          <el-table-column
-            prop="resolvent"
-            label="报警解决方法"
-            show-overflow-tooltip
-          />
-          <el-table-column label="操作">
+          <el-table-column label="操作" width="100">
             <template #default="scope">
               <el-button type="text" size="small" @click="confirm(scope.row)"
                 >确认本条</el-button
@@ -324,8 +342,8 @@ export default {
 <style lang="scss">
 .alarmDialog {
   .el-dialog__body {
-    height: 500px;
-    max-height: 500px;
+    height: 700px;
+    max-height: 700ox;
     padding: 0;
     overflow: hidden;
     .el-card {