Procházet zdrojové kódy

[Feat 0000] 喷淋监测系统页面开发

houzekong před 5 měsíci
rodič
revize
7393b9bf8a

+ 3 - 1
src/views/vent/monitorManager/sprayMonitor/component.vue

@@ -233,9 +233,11 @@
       const { msgTxt = [] } = await getDevice({ devicetype: 'sys', systemID: optionValue.value }).catch(() => {
         message.error('获取已绑定设备时发生了错误');
       });
+      const temp = {};
       msgTxt.forEach((item) => {
-        _.set(monitorData.value, item.type, item.datalist);
+        _.set(temp, item.type, item.datalist);
       });
+      monitorData.value = temp;
     }
   }
 

+ 16 - 24
src/views/vent/monitorManager/sprayMonitor/index.vue

@@ -4,14 +4,14 @@
     <MonitorComponent
       main-title="凝胶防灭火材料自动喷洒系统"
       :main-config="{
-        configs: defaultConfigs,
+        configs: configs,
       }"
       :monitor-history-config="{}"
       :handler-history-config="{}"
       :alarm-history-config="{}"
       strtype="sys_surface_juejin"
     >
-      <template #default="{ monitorData }">
+      <!-- <template #default="{ monitorData }">
         <div id="spray3D" class="w-full h-full">
           <a-spin :spinning="loading" />
           <div id="sprayCSS3D" v-show="!loading" style="width: 100%; height: 100%; position: absolute; overflow: hidden">
@@ -31,19 +31,16 @@
             </FourBorderBg>
           </div>
         </div>
-      </template>
+      </template> -->
     </MonitorComponent>
   </div>
 </template>
 <script setup lang="ts">
-  import { onMounted, ref } from 'vue';
-  import FourBorderBg from '/@/views/vent/comment/components/fourBorderBg.vue';
+  import { onMounted } from 'vue';
   import MonitorComponent from './component.vue';
   import { Config } from '../../deviceManager/configurationTable/types';
   import { useInitConfigs } from '../../home/configurable/hooks/useInit';
-  import { mountedThree, setModelType } from './spray.three';
 
-  const loading = ref(false);
   const defaultConfigs: Config[] = [
     {
       deviceType: '',
@@ -83,7 +80,7 @@
             items: [
               {
                 label: '在线数量',
-                value: '99',
+                value: '1',
               },
               {
                 label: '异常数量',
@@ -141,10 +138,10 @@
               },
               {
                 name: '工作状态',
-                prop: 'airStatus_str',
+                prop: 'readData.online_str',
               },
             ],
-            readFrom: '',
+            readFrom: 'spray_auto',
           },
         ],
         preset: [],
@@ -199,27 +196,23 @@
             items: [
               {
                 label: '绑定控制箱名称',
-                value: '${cumulativeFlow}',
+                value: '${spray_auto[0].strinstallpos}',
               },
               {
                 label: '控制箱地址',
-                value: '${heaterTemperature}',
-              },
-              {
-                label: '控制箱在线状态',
-                value: '${nitrogen}',
+                value: '${spray_auto[0].readData.snumber}',
               },
               {
                 label: '故障从机',
-                value: '${nitrogenContent}',
+                value: '${spray_auto[0].readData.Cjgz}',
               },
               {
                 label: '浮球液位报警',
-                value: '${nitrogenContent}',
+                value: '${spray_auto[0].readData.minimumgrouting}',
               },
               {
                 label: '输送管道压力',
-                value: '${nitrogenContent}',
+                value: '${spray_auto[0].readData.zjbhglpaV}',
               },
             ],
           },
@@ -229,12 +222,12 @@
             items: [
               {
                 label: '启动状态',
-                value: '0.97',
+                value: '${spray_auto[0].readData.online_str}',
                 color: 'blue',
               },
               {
                 label: '报警状态',
-                value: '84.4',
+                value: '${spray_auto[0].warnLevel_str}',
               },
             ],
           },
@@ -244,12 +237,12 @@
             items: [
               {
                 label: '启动状态',
-                value: '0.97',
+                value: '${spray_auto[0].readData.online_str}',
                 color: 'blue',
               },
               {
                 label: '故障状态',
-                value: '84.4',
+                value: '${spray_auto[0].readData.warnLevel_str}',
               },
             ],
           },
@@ -270,7 +263,6 @@
             icon: '/src/assets/images/home-container/configurable/tashanhome/partition-icon-2.png',
           },
         ],
-        mock: {},
       },
       showStyle: {
         size: 'width:440px;height:700px;',