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