Просмотр исходного кода

[Feat 0000] 预警联动控制添加解除后附属功能的部分支持

houzekong 1 месяц назад
Родитель
Сommit
20336ed6a4

+ 5 - 0
src/views/vent/deviceManager/comment/DeviceModal.vue

@@ -62,6 +62,11 @@
           <ManagerWarningTable v-else :deviceId="deviceData.id" />
         </template>
       </a-tab-pane>
+      <a-tab-pane v-if="deviceType == 'managesys'" key="14" tab="配置预警解除后控制设备">
+        <template v-if="activeKey == '14'">
+          <ManagerWarningTable :deviceId="deviceData.id" :monitor-type="3" />
+        </template>
+      </a-tab-pane>
       <a-tab-pane key="7" tab="摄像头配置">
         <EditRowTable
           :columns="cameraColumns"

+ 4 - 3
src/views/vent/deviceManager/comment/warningTabel/index1.vue

@@ -20,7 +20,7 @@
       </a-table>
     </div>
   </div>
-  <BaseModal @register="register" @add="onSubmit" @update="onSubmit" :form-schemas="formSchemas" :monitor-type="'1'" />
+  <BaseModal @register="register" @add="onSubmit" @update="onSubmit" :form-schemas="formSchemas" :monitor-type="monitorType" />
 </template>
 
 <script lang="ts" setup>
@@ -33,6 +33,7 @@
 
   const props = defineProps({
     deviceId: { type: String },
+    monitorType: { type: Number, default: 1 },
   });
 
   const formSchemas = controlFormSchemas({ id: props.deviceId });
@@ -46,7 +47,7 @@
   }
 
   async function getDataSource() {
-    const result = await workFaceWarningList({ sysId: props.deviceId, monitorType: 1, alarmId: activeID.value, pageSize: 100000 }); // 控制1 监测2
+    const result = await workFaceWarningList({ sysId: props.deviceId, monitorType: props.monitorType, alarmId: activeID.value, pageSize: 100000 }); // 控制1 监测2
     dataSource.value = result.records;
   }
 
@@ -79,7 +80,7 @@
     if (flag == 'update') {
       await workFaceWarningEdit({ ...values });
     } else {
-      await workFaceWarningAdd({ ...values, monitorType: 1, sysId: props.deviceId, alarmId: activeID.value });
+      await workFaceWarningAdd({ ...values, monitorType: props.monitorType, sysId: props.deviceId, alarmId: activeID.value });
     }
     closeModal();
     //刷新列表

+ 24 - 0
src/views/vent/deviceManager/comment/warningTabel/index2.vue

@@ -93,6 +93,30 @@
         api: warningLogList.bind(null, { sysId: props.deviceId }),
       },
     },
+    {
+      label: '预警后自动控制',
+      field: 'isAutoControl',
+      component: 'RadioGroup',
+      componentProps: {
+        //options里面由一个一个的radio组成,支持disabled
+        options: [
+          { label: '是', value: true },
+          { label: '否', value: false },
+        ],
+      },
+    },
+    {
+      label: '解除后自动复位',
+      field: 'isAutoReset',
+      component: 'RadioGroup',
+      componentProps: {
+        //options里面由一个一个的radio组成,支持disabled
+        options: [
+          { label: '是', value: true },
+          { label: '否', value: false },
+        ],
+      },
+    },
   ];
 </script>