Selaa lähdekoodia

[Feat 0000] 预警联动控制-预警条目管理添加可关联预警功能

houzekong 1 päivä sitten
vanhempi
commit
0e596b83d0
1 muutettua tiedostoa jossa 17 lisäystä ja 2 poistoa
  1. 17 2
      src/views/vent/deviceManager/comment/warningTabel/index2.vue

+ 17 - 2
src/views/vent/deviceManager/comment/warningTabel/index2.vue

@@ -12,12 +12,12 @@
         </a-popconfirm>
       </template>
     </BasicTable>
-    <BaseModal @register="register" @add="onSubmit" @update="onSubmit" :form-schemas="workFaceWarningFormSchemas" />
+    <BaseModal @register="register" @add="onSubmit" @update="onSubmit" :destroy-on-close="true" :form-schemas="workFaceWarningSchemas" />
   </div>
 </template>
 
 <script lang="ts" name="system-user" setup>
-  import { BasicTable, TableAction } from '/@/components/Table';
+  import { BasicTable, FormSchema } from '/@/components/Table';
   import { useListPage } from '/@/hooks/system/useListPage';
   import BaseModal from './BaseModal1.vue';
   import { useModal } from '/@/components/Modal';
@@ -79,6 +79,21 @@
     //刷新列表
     reload();
   }
+
+  const workFaceWarningSchemas: FormSchema[] = [
+    ...workFaceWarningFormSchemas,
+    {
+      label: '关联条目',
+      field: 'relatedEntries',
+      component: 'ApiSelect',
+      componentProps: {
+        labelField: 'alarmName',
+        valueField: 'id',
+        resultField: 'records',
+        api: warningLogList.bind(null, { sysId: props.deviceId }),
+      },
+    },
+  ];
 </script>
 
 <style scoped></style>