告警页面逻辑修改
This commit is contained in:
@@ -1,11 +1,20 @@
|
||||
<script setup lang="ts">
|
||||
import { ref, shallowRef } from 'vue';
|
||||
import { useVbenModal } from '@vben/common-ui';
|
||||
import { Descriptions, DescriptionsItem, Image, Tag,Divider } from 'ant-design-vue';
|
||||
import {
|
||||
Descriptions,
|
||||
DescriptionsItem,
|
||||
Divider,
|
||||
Image,
|
||||
Tag,
|
||||
} from 'ant-design-vue';
|
||||
import { queryAlarmEventAttachmentsList } from '#/api/sis/alarmEventAttachments';
|
||||
import type { AlarmEventAttachmentsVO } from '#/api/sis/alarmEventAttachments/model';
|
||||
import { fallImg } from '../../common';
|
||||
import {alarmEventProcessList, queryResult} from '#/api/sis/alarmEventProcess';
|
||||
import {
|
||||
alarmEventProcessList,
|
||||
queryResult,
|
||||
} from '#/api/sis/alarmEventProcess';
|
||||
import type { AlarmEventProcessVO } from '#/api/sis/alarmEventProcess/model';
|
||||
|
||||
const [BasicModal, modalApi] = useVbenModal({
|
||||
@@ -34,8 +43,8 @@ async function handleOpenChange(open: boolean) {
|
||||
}
|
||||
// 加载事件附件信息
|
||||
currFiles.value = await queryAlarmEventAttachmentsList(id);
|
||||
const d = await queryResult(id)
|
||||
console.log(d)
|
||||
const d = await queryResult(id);
|
||||
console.log(d);
|
||||
// 加载处理流程
|
||||
loadProcessList();
|
||||
modalApi.modalLoading(false);
|
||||
@@ -80,11 +89,11 @@ function loadProcessList() {
|
||||
</DescriptionsItem>
|
||||
|
||||
<DescriptionsItem label="设备IP"
|
||||
>{{ warningDetail.deviceIp }}
|
||||
>{{ warningDetail.deviceIp }}
|
||||
</DescriptionsItem>
|
||||
|
||||
<DescriptionsItem label="设备名称"
|
||||
>{{ warningDetail.deviceName }}
|
||||
>{{ warningDetail.deviceName }}
|
||||
</DescriptionsItem>
|
||||
<DescriptionsItem label="预警位置" :span="2">
|
||||
{{ warningDetail.deviceName }}
|
||||
@@ -131,7 +140,8 @@ function loadProcessList() {
|
||||
:column="2"
|
||||
bordered
|
||||
:labelStyle="{ width: '120px' }"
|
||||
style="margin-bottom: 30px">
|
||||
style="margin-bottom: 30px"
|
||||
>
|
||||
<DescriptionsItem label="处理状态">
|
||||
<Tag>
|
||||
{{ warningDetail.stateName }}
|
||||
|
@@ -34,6 +34,15 @@ export const querySchema: FormSchemaGetter = () => [
|
||||
fieldName: 'level',
|
||||
label: '预警级别',
|
||||
},
|
||||
{
|
||||
component: 'Select',
|
||||
componentProps: {
|
||||
getPopupContainer,
|
||||
options: getDictOptions(DictEnum.alarm_state, true),
|
||||
},
|
||||
fieldName: 'state',
|
||||
label: '事件状态',
|
||||
},
|
||||
];
|
||||
|
||||
export const columns: VxeGridProps['columns'] = [
|
||||
|
@@ -48,7 +48,7 @@ const gridOptions: VxeGridProps = {
|
||||
return await alarmEventsList({
|
||||
pageNum: page.currentPage,
|
||||
pageSize: page.pageSize,
|
||||
state: 10,
|
||||
// state: 10,
|
||||
...formValues,
|
||||
});
|
||||
},
|
||||
|
@@ -11,7 +11,6 @@ import type { AlarmEventProcessVO } from '#/api/sis/alarmEventProcess/model';
|
||||
const [BasicModal, modalApi] = useVbenModal({
|
||||
onOpenChange: handleOpenChange,
|
||||
onClosed() {
|
||||
// warningDetail.value = null;
|
||||
modalApi.close();
|
||||
},
|
||||
});
|
||||
|
@@ -17,7 +17,6 @@ import type { AlarmEventProcessVO } from '#/api/sis/alarmEventProcess/model';
|
||||
const [BasicModal, modalApi] = useVbenModal({
|
||||
onOpenChange: handleOpenChange,
|
||||
onClosed() {
|
||||
// warningDetail.value = null;
|
||||
modalApi.close();
|
||||
},
|
||||
});
|
||||
|
@@ -32,7 +32,6 @@ const { onBeforeClose, markInitialized, resetInitialized } = useBeforeCloseDiff(
|
||||
currentGetter: defaultFormValueGetter(formApi),
|
||||
},
|
||||
);
|
||||
let currentSelectData: any = null;
|
||||
const [BasicModal, modalApi] = useVbenModal({
|
||||
class: 'w-[70%]',
|
||||
fullscreenButton: false,
|
||||
@@ -89,8 +88,8 @@ async function handleConfirm() {
|
||||
};
|
||||
await alarmEventComplete(params);
|
||||
resetInitialized();
|
||||
emit('reload');
|
||||
modalApi.close();
|
||||
emit('reload');
|
||||
} catch (error) {
|
||||
console.error(error);
|
||||
} finally {
|
||||
|
Reference in New Issue
Block a user