|
@@ -62,7 +62,7 @@
|
|
|
>
|
|
>
|
|
|
<td v-for="col in config.type === 'C' ? config.columns : filterDeviceColumns" :key="col.dataIndex || col.prop" class="table-cell">
|
|
<td v-for="col in config.type === 'C' ? config.columns : filterDeviceColumns" :key="col.dataIndex || col.prop" class="table-cell">
|
|
|
<template v-if="config.type === 'C' && col.prop === 'operation'">
|
|
<template v-if="config.type === 'C' && col.prop === 'operation'">
|
|
|
- <span class="text-look" @click="handleEditClick(row)">确认</span>
|
|
|
|
|
|
|
+ <span class="text-look" @click="handleEditClick(row)">编辑</span>
|
|
|
</template>
|
|
</template>
|
|
|
<template v-else>
|
|
<template v-else>
|
|
|
<span class="text-ellipsis" :title="getCellText(row, col)">
|
|
<span class="text-ellipsis" :title="getCellText(row, col)">
|
|
@@ -83,6 +83,7 @@
|
|
|
:select-sys-alarm-id="currentSelectInfo.alarmId"
|
|
:select-sys-alarm-id="currentSelectInfo.alarmId"
|
|
|
:select-sys-id="currentSelectInfo.sysId"
|
|
:select-sys-id="currentSelectInfo.sysId"
|
|
|
/>
|
|
/>
|
|
|
|
|
+ <RuleTableModal @register="register" @update="onSubmit" :destroy-on-close="true" :form-schemas="workFaceWarningSchemas" />
|
|
|
</div>
|
|
</div>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
@@ -96,14 +97,15 @@ import { getAlarmLogList } from '../../configurable.api';
|
|
|
import { getTableHeaderColumns } from '/@/hooks/web/useWebColumns';
|
|
import { getTableHeaderColumns } from '/@/hooks/web/useWebColumns';
|
|
|
import { func } from 'vue-types';
|
|
import { func } from 'vue-types';
|
|
|
import { useLinkRuleStore } from '/@/store/modules/linkRule';
|
|
import { useLinkRuleStore } from '/@/store/modules/linkRule';
|
|
|
-
|
|
|
|
|
|
|
+import RuleTableModal from '../../../../deviceManager/comment/warningTabel/RuleTableModal.vue';
|
|
|
|
|
+import { FormSchema } from '/@/components/Table';
|
|
|
|
|
+import { warningLogEdit, warningLogList } from '../../../../deviceManager/comment/warningTabel/warning.api';
|
|
|
|
|
+import { workFaceWarningFormSchemas } from '../../../../deviceManager/comment/warningTabel/warning.data';
|
|
|
const FIXED_STRTYPE = 'sys_openair_fire';
|
|
const FIXED_STRTYPE = 'sys_openair_fire';
|
|
|
const deviceType = ref('managesys');
|
|
const deviceType = ref('managesys');
|
|
|
const isUpdate = ref(false);
|
|
const isUpdate = ref(false);
|
|
|
-
|
|
|
|
|
const instanceId = ref(`${Date.now()}_${Math.floor(Math.random() * 10000)}`);
|
|
const instanceId = ref(`${Date.now()}_${Math.floor(Math.random() * 10000)}`);
|
|
|
const [registerModal, { openModal, closeModal }] = useModal(instanceId.value);
|
|
const [registerModal, { openModal, closeModal }] = useModal(instanceId.value);
|
|
|
-
|
|
|
|
|
const linkRuleStore = useLinkRuleStore();
|
|
const linkRuleStore = useLinkRuleStore();
|
|
|
const emit = defineEmits(['row-change']);
|
|
const emit = defineEmits(['row-change']);
|
|
|
const currentSelectInfo = ref({
|
|
const currentSelectInfo = ref({
|
|
@@ -149,7 +151,56 @@ const props = defineProps<{
|
|
|
selectedRow?: any | null;
|
|
selectedRow?: any | null;
|
|
|
}>();
|
|
}>();
|
|
|
|
|
|
|
|
-const handleEditClick = (row: any) => {};
|
|
|
|
|
|
|
+const handleEditClick = (row: any) => {
|
|
|
|
|
+ openModalRule(true, {
|
|
|
|
|
+ isUpdate: true,
|
|
|
|
|
+ record: row,
|
|
|
|
|
+ });
|
|
|
|
|
+};
|
|
|
|
|
+
|
|
|
|
|
+const workFaceWarningSchemas: FormSchema[] = [
|
|
|
|
|
+ ...workFaceWarningFormSchemas,
|
|
|
|
|
+ {
|
|
|
|
|
+ label: '关联条目',
|
|
|
|
|
+ field: 'relatedEntries',
|
|
|
|
|
+ component: 'ApiSelect',
|
|
|
|
|
+ componentProps: {
|
|
|
|
|
+ labelField: 'alarmName',
|
|
|
|
|
+ valueField: 'id',
|
|
|
|
|
+ resultField: 'records',
|
|
|
|
|
+ api: warningLogList.bind(null, { sysId: currentSelectInfo.value.sysId }),
|
|
|
|
|
+ },
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ 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 },
|
|
|
|
|
+ ],
|
|
|
|
|
+ },
|
|
|
|
|
+ },
|
|
|
|
|
+];
|
|
|
|
|
+const [register, { openModal: openModalRule, closeModal: closeModalRule }] = useModal();
|
|
|
|
|
+async function onSubmit(flag, values) {
|
|
|
|
|
+ await warningLogEdit(values);
|
|
|
|
|
+ closeModalRule();
|
|
|
|
|
+}
|
|
|
// C类型数据源
|
|
// C类型数据源
|
|
|
const tableList = ref<any[]>([]);
|
|
const tableList = ref<any[]>([]);
|
|
|
// D类型数据源
|
|
// D类型数据源
|