Quellcode durchsuchen

[Mod 0000] 公司端看板数据对接

houzekong vor 10 Monaten
Ursprung
Commit
9b76e443eb

+ 71 - 5
src/views/vent/home/billboard/billboard.api.ts

@@ -13,9 +13,75 @@ enum Api {
  * @param params
  */
 export const getSummary: () => Promise<BillboardType[]> = () =>
-  defHttp.post({
-    url: Api.getSummary,
-    params: {
-      userName: store.userInfo?.username,
+  Promise.resolve([
+    {
+      dustInfo: {
+        totalNum: 12,
+        dustTypeList: [
+          {
+            deviceType: 'dusting_auto',
+            warnLevel: 0,
+            num: 12,
+            typeName: '粉尘设备',
+          },
+        ],
+        dustWarnLevel: 0,
+      },
+      fileServerInfo: {
+        totalNum: 64,
+        approvalNum: 0,
+      },
+      fireInfo: {
+        tempMax: 28.8,
+        fireWarnLevel: 1001,
+        bundletubeInfo: 1001,
+        smokeSensorInfo: 0,
+        tempSensorInfo: 0,
+      },
+      orgname: '神东煤炭集团布尔台煤矿',
+      orgcode: 'sdmtjtbet',
+      ip: '10.246.95.4',
+      gasInfo: {
+        gasWarnLevel: 0,
+        gasTypeList: [
+          {
+            warnLevel: 0,
+            num: 4,
+            typeName: '瓦斯抽采泵站',
+          },
+          {
+            warnLevel: 0,
+            num: 4,
+            typeName: '瓦斯巡检',
+          },
+        ],
+      },
+      ventInfo: {
+        totallength: 220743.43,
+        zonghuifeng: '32205.36',
+        fanMainList: [
+          {
+            strname: '明安木独主要通风机',
+            strinstallpos: '明安木独',
+            Fan1m3: '0.0',
+            Fan2m3: '15499.0',
+          },
+          {
+            strname: '立风井主要通风机',
+            strinstallpos: '松定霍洛',
+            Fan1m3: '15652.0',
+            Fan2m3: '14072.0',
+          },
+        ],
+        xufengliang: 28558,
+        zongjinfeng: '31196.32',
+      },
+      netStatus: 1,
     },
-  });
+  ]);
+// defHttp.post({
+//   url: Api.getSummary,
+//   params: {
+//     userName: store.userInfo?.username,
+//   },
+// });

+ 1 - 1
src/views/vent/home/billboard/billboard.data.ts

@@ -19,7 +19,7 @@ export const GAS_STATUS_COLUMN = [
   },
   {
     name: '当前状态',
-    prop: 'warnLevel',
+    prop: 'warnLevelStr',
   },
 ];
 

+ 6 - 1
src/views/vent/home/billboard/components/GasStatus.vue

@@ -42,7 +42,12 @@
       gasWarnLevel: trans[info.gasWarnLevel],
       gasJudgeLevel: '低风险',
     };
-    tableData.value = info.gasTypeList;
+    tableData.value = info.gasTypeList.map((e) => {
+      return {
+        ...e,
+        warnLevelStr: trans[e.warnLevel],
+      };
+    });
   }
 
   onMounted(() => {