From 4bc18e0e4ce100192a6da9b5bc94fbebc53ba7d1 Mon Sep 17 00:00:00 2001 From: 15683799673 Date: Sun, 17 Aug 2025 07:03:48 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=86=E9=A2=91=E5=91=8A=E8=AD=A6=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../api/sis/alarmEventAttachments/index.ts | 36 +++-- .../api/sis/alarmEventAttachments/model.d.ts | 2 + .../videoWarningProcessing/data.ts | 38 +++-- .../videoWarningProcessing/index.vue | 9 +- .../videoWarningProcessing/warning-detail.vue | 143 ++++++++++-------- .../videoWarningProcessing/warning-modal.vue | 7 +- 6 files changed, 132 insertions(+), 103 deletions(-) diff --git a/apps/web-antd/src/api/sis/alarmEventAttachments/index.ts b/apps/web-antd/src/api/sis/alarmEventAttachments/index.ts index 14be4aca..2b6f3abb 100644 --- a/apps/web-antd/src/api/sis/alarmEventAttachments/index.ts +++ b/apps/web-antd/src/api/sis/alarmEventAttachments/index.ts @@ -1,18 +1,30 @@ -import type { AlarmEventAttachmentsVO, AlarmEventAttachmentsForm, AlarmEventAttachmentsQuery } from './model'; +import type { + AlarmEventAttachmentsForm, + AlarmEventAttachmentsQuery, + AlarmEventAttachmentsVO, +} from './model'; -import type { ID, IDS } from '#/api/common'; -import type { PageResult } from '#/api/common'; +import type { ID, IDS, PageResult } from '#/api/common'; import { commonExport } from '#/api/helper'; import { requestClient } from '#/api/request'; /** -* 查询【请填写功能名称】列表 -* @param params -* @returns 【请填写功能名称】列表 -*/ + * 查询【请填写功能名称】列表 + * @param params + * @returns 【请填写功能名称】列表 + */ export function alarmEventAttachmentsList(params?: AlarmEventAttachmentsQuery) { - return requestClient.get>('/sis/alarmEventAttachments/list', { params }); + return requestClient.get>( + '/sis/alarmEventAttachments/list', + { params }, + ); +} + +export function queryAlarmEventAttachmentsList(id: ID) { + return requestClient.get( + '/sis/alarmEventAttachments/query/' + id, + ); } /** @@ -20,7 +32,9 @@ export function alarmEventAttachmentsList(params?: AlarmEventAttachmentsQuery) { * @param params * @returns 【请填写功能名称】列表 */ -export function alarmEventAttachmentsExport(params?: AlarmEventAttachmentsQuery) { +export function alarmEventAttachmentsExport( + params?: AlarmEventAttachmentsQuery, +) { return commonExport('/sis/alarmEventAttachments/export', params ?? {}); } @@ -30,7 +44,9 @@ export function alarmEventAttachmentsExport(params?: AlarmEventAttachmentsQuery) * @returns 【请填写功能名称】详情 */ export function alarmEventAttachmentsInfo(id: ID) { - return requestClient.get(`/sis/alarmEventAttachments/${id}`); + return requestClient.get( + `/sis/alarmEventAttachments/${id}`, + ); } /** diff --git a/apps/web-antd/src/api/sis/alarmEventAttachments/model.d.ts b/apps/web-antd/src/api/sis/alarmEventAttachments/model.d.ts index 779e6f32..fc27cd23 100644 --- a/apps/web-antd/src/api/sis/alarmEventAttachments/model.d.ts +++ b/apps/web-antd/src/api/sis/alarmEventAttachments/model.d.ts @@ -16,6 +16,8 @@ export interface AlarmEventAttachmentsVO { */ ossId: string | number; + imagePath: string; + /** * 1:图片,2:文件;3视频 */ diff --git a/apps/web-antd/src/views/videoSystem/videoWarning/videoWarningProcessing/data.ts b/apps/web-antd/src/views/videoSystem/videoWarning/videoWarningProcessing/data.ts index 989bc049..9984b434 100644 --- a/apps/web-antd/src/views/videoSystem/videoWarning/videoWarningProcessing/data.ts +++ b/apps/web-antd/src/views/videoSystem/videoWarning/videoWarningProcessing/data.ts @@ -5,6 +5,9 @@ import { getPopupContainer } from '@vben/utils'; import { getDictOptions } from '#/utils/dict'; import { DictEnum } from '@vben/constants'; +export const fallImg = + 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMIAAADDCAYAAADQvc6UAAABRWlDQ1BJQ0MgUHJvZmlsZQAAKJFjYGASSSwoyGFhYGDIzSspCnJ3UoiIjFJgf8LAwSDCIMogwMCcmFxc4BgQ4ANUwgCjUcG3awyMIPqyLsis7PPOq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mHJ3HNvGCBBhY6jtaMoEiJB0Z29vL6ls58vxPcO8/zfrdo5qvKO+d3Fx8Wu8zf1dW4p/cPzLly/dtv9Ts/EbcvGAHhHyfBIhZ6NSiIBTo0LNNtScABFyNiqFCBChULMNNSdAhJyNSiECRCjUbEPNCRAhZ6NSiAARCjXbUHMCRMjZqBQiQIRCzTbUnAARcjYqhQgQoVCzDTUnQIScjUohAkQo1GxDzQkQIWejUogAEQo121BzAkTI2agUIkCEQs021JwAEXI2KoUIEKFQsw01J0CEnI1KIQJEKNRsQ80JECFno1KIABEKNdtQcwJEyNmoFCJAhELNNtScABFyNiqFCBChULMNNSdAhJyNSiECRCjUbEPNCRAhZ6NSiAARCjXbUHMCRMjZqBQiQIRCzTbUnAARcjYqhQgQoVCzDTUnQIScjUohAkQo1GxDzQkQIWejUogAEQo121BzAkTI2agUIkCEQs021JwAEXI2KoUIEKFQsw01J0CEnI1KIQJEKNRsQ80JECFno1KIABEKNdtQcwJEyNmoFCJAhELNNtScABFyNiqFCBChULMNNSdAhJyNSiECRCjUbEPNCRAhZ6NSiAARCjXbUHMCRMjZqBQiQIRCzTbUnAARcjYqhQgQoVCzDTUnQIScjUohAkQo1GxDzQkQIWejUogAEQo121BzAkTI2agUIkCEQs021JwAEXI2KoUIEKFQsw01J0CEnI1KIQJEKNRsQ80JECFno1KIABEKNdtQcwJEyNmoFCJAhELNNtScABFyNiqFCBChULMNNSdAhJyNSiEC/wGgKKC4YMA4TAAAAABJRU5ErkJggg=='; + export const querySchema: FormSchemaGetter = () => [ { component: 'Input', @@ -15,7 +18,7 @@ export const querySchema: FormSchemaGetter = () => [ component: 'Select', componentProps: { getPopupContainer, - options: getDictOptions(DictEnum.alarm_level), + options: getDictOptions(DictEnum.alarm_level, true), }, fieldName: 'level', label: '级别', @@ -24,7 +27,7 @@ export const querySchema: FormSchemaGetter = () => [ component: 'Select', componentProps: { getPopupContainer, - options: getDictOptions(DictEnum.alarm_state), + options: getDictOptions(DictEnum.alarm_state, true), }, fieldName: 'state', label: '处理状态', @@ -83,11 +86,11 @@ export const columns: VxeGridProps['columns'] = [ }, { title: '预期处理时间', - field: 'processSt', + field: 'servBeginTime', }, { title: '处理时间', - field: 'processEt', + field: 'servEndTime', }, { field: 'action', @@ -110,14 +113,14 @@ export const modalSchema: FormSchemaGetter = () => [ }, { label: '预警编号', - fieldName: 'alarmId', + fieldName: 'id', component: 'Input', rules: 'required', disabled: true, }, { label: '预警时间', - fieldName: 'alarmTime', + fieldName: 'reportTime', component: 'DatePicker', componentProps: { format: 'YYYY.MM.DD HH:mm', @@ -129,7 +132,7 @@ export const modalSchema: FormSchemaGetter = () => [ }, { label: '预警类型', - fieldName: 'alarmType', + fieldName: 'bigTypeName', component: 'Input', rules: 'required', disabled: true, @@ -141,13 +144,13 @@ export const modalSchema: FormSchemaGetter = () => [ formItemClass: 'col-span-2', disabled: true, }, - { + /* { label: '所在位置', fieldName: 'location', component: 'Input', rules: 'required', disabled: true, - }, + },*/ { label: '设备名称', fieldName: 'deviceName', @@ -188,27 +191,22 @@ export const modalSchema: FormSchemaGetter = () => [ fieldName: 'level', component: 'Select', componentProps: { - options: [ - { label: '特大', value: '特大' }, - { label: '重要', value: '重要' }, - { label: '一般', value: '一般' }, - ], + getPopupContainer, + options: getDictOptions(DictEnum.alarm_level, true), }, rules: 'selectRequired', }, { label: '处理状态', - fieldName: 'processingStatus', component: 'Select', componentProps: { - options: [ - { label: '待分配', value: '待分配' }, - { label: '处理中', value: '处理中' }, - { label: '已完成', value: '已完成' }, - ], + getPopupContainer, + options: getDictOptions(DictEnum.alarm_state, true), }, + fieldName: 'state', rules: 'selectRequired', }, + { label: '预期处理时间', fieldName: 'expectedProcessingTime', diff --git a/apps/web-antd/src/views/videoSystem/videoWarning/videoWarningProcessing/index.vue b/apps/web-antd/src/views/videoSystem/videoWarning/videoWarningProcessing/index.vue index d15a9ad5..ffcf1197 100644 --- a/apps/web-antd/src/views/videoSystem/videoWarning/videoWarningProcessing/index.vue +++ b/apps/web-antd/src/views/videoSystem/videoWarning/videoWarningProcessing/index.vue @@ -103,14 +103,7 @@ function handleAssign(row: any) { title: '分配处理', content: `确定要分配预警 ${row.alarmId} 给处理人员吗?`, onOk() { - // 模拟分配处理 - const index = row.id; - if (index !== -1) { - // mockData.value[index].processingStatus = '处理中'; - // mockData.value[index].processingDetails = '已分配给处理人员'; - // mockData.value[index].processingTime = new Date().toLocaleString(); - tableApi.query(); - } + //查询当前排班的人员信息 }, }); } diff --git a/apps/web-antd/src/views/videoSystem/videoWarning/videoWarningProcessing/warning-detail.vue b/apps/web-antd/src/views/videoSystem/videoWarning/videoWarningProcessing/warning-detail.vue index e6907e18..ea3b7619 100644 --- a/apps/web-antd/src/views/videoSystem/videoWarning/videoWarningProcessing/warning-detail.vue +++ b/apps/web-antd/src/views/videoSystem/videoWarning/videoWarningProcessing/warning-detail.vue @@ -1,19 +1,23 @@ @@ -56,7 +66,7 @@ async function handleOpenChange(open: boolean) { :footer="false" :fullscreen-button="false" title="预警详情" - class="w-[70%]" + class="w-[60%]" > - {{ warningDetail.alarmId }} + {{ warningDetail.id }} + - {{ warningDetail.alarmTime }} + {{ warningDetail.reportTime }} + - {{ warningDetail.level }} + {{ warningDetail.levelName }} + - {{ warningDetail.alarmType }} + {{ warningDetail.bigTypeName + ' - ' + warningDetail.smallTypeName }} + + {{ warningDetail.deviceIp }} + + + {{ warningDetail.deviceName }} + + {{ warningDetail.description }} + - {{ warningDetail.location }} + {{ warningDetail.deviceName }} + - - {{ warningDetail.processingStatus }} + + {{ warningDetail.stateName }} + {{ warningDetail.processingDetails || '-' }} - + + {{ warningDetail.processingTime || '-' }} - - {{ warningDetail.deviceName || '-' }} - - - {{ warningDetail.expectedProcessingTime || '-' }} - - - 处理图片 + + +
+
+ +
+
+ +
- - + +

类型:已完成

时间:2025-06-01 11:07:59

处理人:张三

- +

类型:处理异常

时间:2025-06-01 11:07:59

处理人:张三

异常原因:时长不够

- +

类型:处理中

时间:2025-06-01 11:07:59

处理人:张三

@@ -171,3 +183,12 @@ async function handleOpenChange(open: boolean) {
+ + diff --git a/apps/web-antd/src/views/videoSystem/videoWarning/videoWarningProcessing/warning-modal.vue b/apps/web-antd/src/views/videoSystem/videoWarning/videoWarningProcessing/warning-modal.vue index 78c338ea..a3ac1cef 100644 --- a/apps/web-antd/src/views/videoSystem/videoWarning/videoWarningProcessing/warning-modal.vue +++ b/apps/web-antd/src/views/videoSystem/videoWarning/videoWarningProcessing/warning-modal.vue @@ -57,13 +57,12 @@ const [BasicModal, modalApi] = useVbenModal({ id: number | string; data: any[]; }; - const record = data.find((item: any) => item.id === id); - if (record) { - await formApi.setValues(record); + if (data) { + console.log(data) + await formApi.setValues(data); } } await markInitialized(); - modalApi.modalLoading(false); }, });