+import { Page, useVbenModal, type VbenFormProps } from '@vben/common-ui';
+import { getVxePopupContainer } from '@vben/utils';
+
+import { Modal, Popconfirm, Space, Tag } from 'ant-design-vue';
+import { ref, watch } from 'vue';
+
+import {
+ useVbenVxeGrid,
+ vxeCheckboxChecked,
+ type VxeGridProps,
+} from '#/adapter/vxe-table';
+
+import { commonDownloadExcel } from '#/utils/file/download';
+import { renderDict } from '#/utils/render';
+
+import { columns, querySchema } from './data';
+import warningModal from './warning-modal.vue';
+import warningDetail from './warning-detail.vue';
+import LevelSettingModal from './level-setting-modal.vue';
+import imgPng from '../../../../assets/algorithmManagement/image.png';
+
+// 假数据
+const mockData = ref([
+ {
+ id: 1,
+ alarmId: 'JWD-3434234',
+ alarmTime: '2025.07.21 12:20',
+ level: '特大',
+ alarmType: '越界侦测',
+ description: '温度高于80度发生火宅',
+ location: '1栋3号电梯旁',
+ processingStatus: '已完成',
+ processingDetails: '',
+ processingTime: '',
+ },
+ {
+ id: 2,
+ alarmId: 'JWD-3434235',
+ alarmTime: '2025.07.21 11:15',
+ level: '重要',
+ alarmType: '异常行为',
+ description: '人员异常聚集',
+ location: '2栋大厅',
+ processingStatus: '已完成',
+ processingDetails: '已派人员前往处理',
+ processingTime: '2025.07.21 11:30',
+ imgUrl: imgPng,
+ },
+ {
+ id: 3,
+ alarmId: 'JWD-3434236',
+ alarmTime: '2025.07.21 10:45',
+ level: '一般',
+ alarmType: '设备故障',
+ description: '摄像头离线',
+ location: '3栋走廊',
+ processingStatus: '已完成',
+ processingDetails: '已修复设备',
+ processingTime: '2025.07.21 11:00',
+ imgUrl: imgPng,
+ },
+ {
+ id: 4,
+ alarmId: 'JWD-3434236',
+ alarmTime: '2025.07.21 10:45',
+ level: '一般',
+ alarmType: '设备故障',
+ description: '摄像头离线',
+ location: '3栋走廊',
+ processingStatus: '已完成',
+ processingDetails: '已修复设备',
+ processingTime: '2025.07.21 11:00',
+ imgUrl: imgPng,
+ },
+]);
+
+const formOptions: VbenFormProps = {
+ commonConfig: {
+ labelWidth: 100,
+ componentProps: {
+ allowClear: true,
+ },
+ },
+ schema: querySchema(),
+ wrapperClass: 'grid-cols-1 md:grid-cols-2 lg:grid-cols-3',
+};
+
+const gridOptions: VxeGridProps = {
+ columns,
+ height: 'auto',
+ data: mockData.value,
+ pagerConfig: {
+ currentPage: 1,
+ pageSize: 10,
+ total: mockData.value.length,
+ },
+ rowConfig: {
+ keyField: 'id',
+ },
+ id: 'video-warning-processing-index',
+};
+
+const [BasicTable, tableApi] = useVbenVxeGrid({
+ formOptions,
+ gridOptions,
+});
+
+// 监听数据变化,强制重新渲染表格
+const tableKey = ref(0);
+watch(
+ mockData,
+ () => {
+ tableKey.value++;
+ },
+ { deep: true },
+);
+
+const [WarningModal, modalApi] = useVbenModal({
+ connectedComponent: warningModal,
+});
+
+const [WarningDetail, detailApi] = useVbenModal({
+ connectedComponent: warningDetail,
+});
+
+const [LevelSettingModalComp, levelModalApi] = useVbenModal({
+ connectedComponent: LevelSettingModal,
+});
+
+// 级别设置
+function handleLevelSetting(row: any) {
+ levelModalApi.setData({ id: row.id, level: row.level, data: mockData.value });
+ levelModalApi.open();
+}
+
+// 查看详情
+async function handleView(row: any) {
+ detailApi.setData({ id: row.id, data: mockData.value });
+ detailApi.open();
+}
+
+// 编辑
+async function handleEdit(row: any) {
+ modalApi.setData({ id: row.id, data: mockData.value });
+ modalApi.open();
+}
+
+// // 分配处理
+// function handleAssign(row: any) {
+// Modal.confirm({
+// title: '分配处理',
+// content: `确定要分配预警 ${row.alarmId} 给处理人员吗?`,
+// onOk() {
+// // 模拟分配处理
+// const index = mockData.value.findIndex((item: any) => item.id === row.id);
+// if (index !== -1) {
+// mockData.value[index].processingStatus = '处理中';
+// mockData.value[index].processingDetails = '已分配给处理人员';
+// mockData.value[index].processingTime = new Date().toLocaleString();
+// tableApi.query();
+// }
+// },
+// });
+// }
+
+// 删除
+async function handleDelete(row: any) {
+ const index = mockData.value.findIndex((item: any) => item.id === row.id);
+ if (index !== -1) {
+ mockData.value.splice(index, 1);
+ await tableApi.query();
+ }
+}
+
+// 批量删除
+function handleMultiDelete() {
+ const rows = tableApi.grid.getCheckboxRecords();
+ const ids = rows.map((row: any) => row.id);
+ Modal.confirm({
+ title: '提示',
+ okType: 'danger',
+ content: `确认删除选中的${ids.length}条记录吗?`,
+ onOk: async () => {
+ ids.forEach((id) => {
+ const index = mockData.value.findIndex((item: any) => item.id === id);
+ if (index !== -1) {
+ mockData.value.splice(index, 1);
+ }
+ });
+ await tableApi.query();
+ },
+ });
+}
+
+
+
+
+
+
+
+ {{ $t('pages.common.delete') }}
+
+
+
+
+
+
+
+ {{ $t('pages.common.info') }}
+
+
+ {{ $t('pages.common.edit') }}
+
+
+
+
+ {{ $t('pages.common.delete') }}
+
+
+
+
+
+
+
+
+
+
+
diff --git a/apps/web-antd/src/views/videoSystem/videoWarning/videoWarningHasDone/level-setting-modal.vue b/apps/web-antd/src/views/videoSystem/videoWarning/videoWarningHasDone/level-setting-modal.vue
new file mode 100644
index 00000000..1568374a
--- /dev/null
+++ b/apps/web-antd/src/views/videoSystem/videoWarning/videoWarningHasDone/level-setting-modal.vue
@@ -0,0 +1,45 @@
+
+
+
+ 特大
+ 重要
+ 一般
+
+
+
+
+
diff --git a/apps/web-antd/src/views/videoSystem/videoWarning/videoWarningHasDone/warning-detail.vue b/apps/web-antd/src/views/videoSystem/videoWarning/videoWarningHasDone/warning-detail.vue
new file mode 100644
index 00000000..9479a43b
--- /dev/null
+++ b/apps/web-antd/src/views/videoSystem/videoWarning/videoWarningHasDone/warning-detail.vue
@@ -0,0 +1,147 @@
+
+
+
+
+
+
+ {{ warningDetail.alarmId }}
+
+
+ {{ warningDetail.alarmTime }}
+
+
+
+ {{ warningDetail.level }}
+
+
+
+ {{ warningDetail.alarmType }}
+
+
+ {{ warningDetail.description }}
+
+
+ {{ warningDetail.location }}
+
+
+
+ {{ warningDetail.processingStatus }}
+
+
+
+ {{ 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
+ 处理人:张三
+
+
+ 类型:创建预警
+ 时间:2025-06-01 11:07:59
+ 处理人:张三
+
+
+
+
diff --git a/apps/web-antd/src/views/videoSystem/videoWarning/videoWarningHasDone/warning-modal.vue b/apps/web-antd/src/views/videoSystem/videoWarning/videoWarningHasDone/warning-modal.vue
new file mode 100644
index 00000000..125a333e
--- /dev/null
+++ b/apps/web-antd/src/views/videoSystem/videoWarning/videoWarningHasDone/warning-modal.vue
@@ -0,0 +1,122 @@
+
+
+
+
+
+
+
+
+
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 7639cf63..a6cae811 100644
--- a/apps/web-antd/src/views/videoSystem/videoWarning/videoWarningProcessing/data.ts
+++ b/apps/web-antd/src/views/videoSystem/videoWarning/videoWarningProcessing/data.ts
@@ -48,6 +48,11 @@ export const columns: VxeGridProps['columns'] = [
field: 'alarmTime',
width: 150,
},
+ {
+ title: '设备名称',
+ field: 'deviceName',
+ width: 150,
+ },
{
title: '级别',
field: 'level',
@@ -116,6 +121,11 @@ export const columns: VxeGridProps['columns'] = [
field: 'processingDetails',
width: 150,
},
+ {
+ title: '预期处理时间',
+ field: 'expectedProcessingTime',
+ width: 150,
+ },
{
title: '处理时间',
field: 'processingTime',
@@ -145,6 +155,7 @@ export const modalSchema: FormSchemaGetter = () => [
fieldName: 'alarmId',
component: 'Input',
rules: 'required',
+ disabled: true,
},
{
label: '预警时间',
@@ -156,6 +167,63 @@ export const modalSchema: FormSchemaGetter = () => [
showTime: true,
},
rules: 'required',
+ disabled: true,
+ },
+ {
+ label: '预警类型',
+ fieldName: 'alarmType',
+ component: 'Input',
+ rules: 'required',
+ disabled: true,
+ },
+ {
+ label: '描述',
+ fieldName: 'description',
+ component: 'Input',
+ formItemClass: 'col-span-2',
+ disabled: true,
+ },
+ {
+ label: '所在位置',
+ fieldName: 'location',
+ component: 'Input',
+ rules: 'required',
+ disabled: true,
+ },
+ {
+ label: '设备名称',
+ fieldName: 'deviceName',
+ component: 'Input',
+ rules: 'required',
+ disabled: true,
+ },
+ {
+ label: '处理情况',
+ fieldName: 'processingDetails',
+ component: 'Input',
+ componentProps: {
+ rows: 3,
+ },
+ formItemClass: 'col-span-2',
+ disabled: true,
+ },
+ {
+ label: '处理时间',
+ fieldName: 'processingTime',
+ component: 'DatePicker',
+ componentProps: {
+ format: 'YYYY.MM.DD HH:mm',
+ valueFormat: 'YYYY.MM.DD HH:mm',
+ showTime: true,
+ },
+ disabled: true,
+ },
+ {
+ label: '处理图片',
+ fieldName: 'imgUrl',
+ component: 'Input',
+ rules: 'required',
+ disabled: true,
},
{
label: '级别',
@@ -170,27 +238,6 @@ export const modalSchema: FormSchemaGetter = () => [
},
rules: 'selectRequired',
},
- {
- label: '预警类型',
- fieldName: 'alarmType',
- component: 'Input',
- rules: 'required',
- },
- {
- label: '描述',
- fieldName: 'description',
- component: 'InputTextArea',
- componentProps: {
- rows: 3,
- },
- formItemClass: 'col-span-2',
- },
- {
- label: '所在位置',
- fieldName: 'location',
- component: 'Input',
- rules: 'required',
- },
{
label: '处理状态',
fieldName: 'processingStatus',
@@ -205,22 +252,14 @@ export const modalSchema: FormSchemaGetter = () => [
rules: 'selectRequired',
},
{
- label: '处理情况',
- fieldName: 'processingDetails',
- component: 'InputTextArea',
- componentProps: {
- rows: 3,
- },
- formItemClass: 'col-span-2',
- },
- {
- label: '处理时间',
- fieldName: 'processingTime',
+ label: '预期处理时间',
+ fieldName: 'expectedProcessingTime',
component: 'DatePicker',
componentProps: {
format: 'YYYY.MM.DD HH:mm',
valueFormat: 'YYYY.MM.DD HH:mm',
showTime: true,
},
+ rules: 'required',
},
];
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 b7ca1380..7ff8410d 100644
--- a/apps/web-antd/src/views/videoSystem/videoWarning/videoWarningProcessing/index.vue
+++ b/apps/web-antd/src/views/videoSystem/videoWarning/videoWarningProcessing/index.vue
@@ -1,73 +1,3 @@
-
-
-
-
-
-
- {{ $t('pages.common.delete') }}
-
-
-
-
-
-
- 级别设置
-
-
- {{ $t('pages.common.info') }}
-
-
- {{ $t('pages.common.edit') }}
-
-
- 分配处理
-
-
-
- {{ $t('pages.common.delete') }}
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+ {{ $t('pages.common.delete') }}
+
+
+
+
+
+
+
+ {{ $t('pages.common.info') }}
+
+
+ {{ $t('pages.common.edit') }}
+
+
+ 分配处理
+
+
+
+ {{ $t('pages.common.delete') }}
+
+
+
+
+
+
+
+
+
+
diff --git a/apps/web-antd/src/views/videoSystem/videoWarning/videoWarningToDone/data.ts b/apps/web-antd/src/views/videoSystem/videoWarning/videoWarningToDone/data.ts
new file mode 100644
index 00000000..a6cae811
--- /dev/null
+++ b/apps/web-antd/src/views/videoSystem/videoWarning/videoWarningToDone/data.ts
@@ -0,0 +1,265 @@
+import type { FormSchemaGetter } from '#/adapter/form';
+import type { VxeGridProps } from '#/adapter/vxe-table';
+import { getDictOptions } from '#/utils/dict';
+import { renderDict } from '#/utils/render';
+import { h } from 'vue';
+
+export const querySchema: FormSchemaGetter = () => [
+ {
+ component: 'Input',
+ fieldName: 'alarmType',
+ label: '视频预警类型',
+ },
+ {
+ component: 'Select',
+ componentProps: {
+ options: [
+ { label: '特大', value: '特大' },
+ { label: '重要', value: '重要' },
+ { label: '一般', value: '一般' },
+ ],
+ },
+ fieldName: 'level',
+ label: '级别',
+ },
+ {
+ component: 'Select',
+ componentProps: {
+ options: [
+ { label: '待分配', value: '待分配' },
+ { label: '处理中', value: '处理中' },
+ { label: '已完成', value: '已完成' },
+ ],
+ },
+ fieldName: 'processingStatus',
+ label: '处理状态',
+ },
+];
+
+export const columns: VxeGridProps['columns'] = [
+ { type: 'checkbox', width: 60 },
+ {
+ title: '预警编号',
+ field: 'alarmId',
+ width: 150,
+ },
+ {
+ title: '预警时间',
+ field: 'alarmTime',
+ width: 150,
+ },
+ {
+ title: '设备名称',
+ field: 'deviceName',
+ width: 150,
+ },
+ {
+ title: '级别',
+ field: 'level',
+ width: 100,
+ slots: {
+ default: ({ row }: any) => {
+ const levelColors: Record
= {
+ 特大: 'red',
+ 重要: 'orange',
+ 一般: 'blue',
+ };
+ return h(
+ 'span',
+ {
+ style: {
+ color: levelColors[row.level] || '#666',
+ fontWeight: 'bold',
+ },
+ },
+ row.level,
+ );
+ },
+ },
+ },
+ {
+ title: '预警类型',
+ field: 'alarmType',
+ width: 120,
+ },
+ {
+ title: '描述',
+ field: 'description',
+ minWidth: 200,
+ },
+ {
+ title: '所在位置',
+ field: 'location',
+ width: 150,
+ },
+ {
+ title: '处理状态',
+ field: 'processingStatus',
+ width: 100,
+ slots: {
+ default: ({ row }: any) => {
+ const statusColors: Record = {
+ 待分配: 'red',
+ 处理中: 'orange',
+ 已完成: 'green',
+ };
+ return h(
+ 'span',
+ {
+ style: {
+ color: statusColors[row.processingStatus] || '#666',
+ fontWeight: 'bold',
+ },
+ },
+ row.processingStatus,
+ );
+ },
+ },
+ },
+ {
+ title: '处理情况',
+ field: 'processingDetails',
+ width: 150,
+ },
+ {
+ title: '预期处理时间',
+ field: 'expectedProcessingTime',
+ width: 150,
+ },
+ {
+ title: '处理时间',
+ field: 'processingTime',
+ width: 150,
+ },
+ {
+ field: 'action',
+ fixed: 'right',
+ slots: { default: 'action' },
+ title: '操作',
+ width: 380,
+ },
+];
+
+export const modalSchema: FormSchemaGetter = () => [
+ {
+ label: '主键',
+ fieldName: 'id',
+ component: 'Input',
+ dependencies: {
+ show: () => false,
+ triggerFields: [''],
+ },
+ },
+ {
+ label: '预警编号',
+ fieldName: 'alarmId',
+ component: 'Input',
+ rules: 'required',
+ disabled: true,
+ },
+ {
+ label: '预警时间',
+ fieldName: 'alarmTime',
+ component: 'DatePicker',
+ componentProps: {
+ format: 'YYYY.MM.DD HH:mm',
+ valueFormat: 'YYYY.MM.DD HH:mm',
+ showTime: true,
+ },
+ rules: 'required',
+ disabled: true,
+ },
+ {
+ label: '预警类型',
+ fieldName: 'alarmType',
+ component: 'Input',
+ rules: 'required',
+ disabled: true,
+ },
+ {
+ label: '描述',
+ fieldName: 'description',
+ component: 'Input',
+ formItemClass: 'col-span-2',
+ disabled: true,
+ },
+ {
+ label: '所在位置',
+ fieldName: 'location',
+ component: 'Input',
+ rules: 'required',
+ disabled: true,
+ },
+ {
+ label: '设备名称',
+ fieldName: 'deviceName',
+ component: 'Input',
+ rules: 'required',
+ disabled: true,
+ },
+ {
+ label: '处理情况',
+ fieldName: 'processingDetails',
+ component: 'Input',
+ componentProps: {
+ rows: 3,
+ },
+ formItemClass: 'col-span-2',
+ disabled: true,
+ },
+ {
+ label: '处理时间',
+ fieldName: 'processingTime',
+ component: 'DatePicker',
+ componentProps: {
+ format: 'YYYY.MM.DD HH:mm',
+ valueFormat: 'YYYY.MM.DD HH:mm',
+ showTime: true,
+ },
+ disabled: true,
+ },
+ {
+ label: '处理图片',
+ fieldName: 'imgUrl',
+ component: 'Input',
+ rules: 'required',
+ disabled: true,
+ },
+ {
+ label: '级别',
+ fieldName: 'level',
+ component: 'Select',
+ componentProps: {
+ options: [
+ { label: '特大', value: '特大' },
+ { label: '重要', value: '重要' },
+ { label: '一般', value: '一般' },
+ ],
+ },
+ rules: 'selectRequired',
+ },
+ {
+ label: '处理状态',
+ fieldName: 'processingStatus',
+ component: 'Select',
+ componentProps: {
+ options: [
+ { label: '待分配', value: '待分配' },
+ { label: '处理中', value: '处理中' },
+ { label: '已完成', value: '已完成' },
+ ],
+ },
+ rules: 'selectRequired',
+ },
+ {
+ label: '预期处理时间',
+ fieldName: 'expectedProcessingTime',
+ component: 'DatePicker',
+ componentProps: {
+ format: 'YYYY.MM.DD HH:mm',
+ valueFormat: 'YYYY.MM.DD HH:mm',
+ showTime: true,
+ },
+ rules: 'required',
+ },
+];
diff --git a/apps/web-antd/src/views/videoSystem/videoWarning/videoWarningToDone/index.vue b/apps/web-antd/src/views/videoSystem/videoWarning/videoWarningToDone/index.vue
new file mode 100644
index 00000000..cb074052
--- /dev/null
+++ b/apps/web-antd/src/views/videoSystem/videoWarning/videoWarningToDone/index.vue
@@ -0,0 +1,276 @@
+
+
+
+
+
+
+
+ {{ $t('pages.common.delete') }}
+
+
+
+
+
+
+
+ {{ $t('pages.common.info') }}
+
+
+ {{ $t('pages.common.edit') }}
+
+
+ 分配处理
+
+
+
+ {{ $t('pages.common.delete') }}
+
+
+
+
+
+
+
+
+
+
+
diff --git a/apps/web-antd/src/views/videoSystem/videoWarning/videoWarningToDone/level-setting-modal.vue b/apps/web-antd/src/views/videoSystem/videoWarning/videoWarningToDone/level-setting-modal.vue
new file mode 100644
index 00000000..1568374a
--- /dev/null
+++ b/apps/web-antd/src/views/videoSystem/videoWarning/videoWarningToDone/level-setting-modal.vue
@@ -0,0 +1,45 @@
+
+
+
+ 特大
+ 重要
+ 一般
+
+
+
+
+
diff --git a/apps/web-antd/src/views/videoSystem/videoWarning/videoWarningToDone/warning-detail.vue b/apps/web-antd/src/views/videoSystem/videoWarning/videoWarningToDone/warning-detail.vue
new file mode 100644
index 00000000..9479a43b
--- /dev/null
+++ b/apps/web-antd/src/views/videoSystem/videoWarning/videoWarningToDone/warning-detail.vue
@@ -0,0 +1,147 @@
+
+
+
+
+
+
+ {{ warningDetail.alarmId }}
+
+
+ {{ warningDetail.alarmTime }}
+
+
+
+ {{ warningDetail.level }}
+
+
+
+ {{ warningDetail.alarmType }}
+
+
+ {{ warningDetail.description }}
+
+
+ {{ warningDetail.location }}
+
+
+
+ {{ warningDetail.processingStatus }}
+
+
+
+ {{ 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
+ 处理人:张三
+
+
+ 类型:创建预警
+ 时间:2025-06-01 11:07:59
+ 处理人:张三
+
+
+
+
diff --git a/apps/web-antd/src/views/videoSystem/videoWarning/videoWarningToDone/warning-modal.vue b/apps/web-antd/src/views/videoSystem/videoWarning/videoWarningToDone/warning-modal.vue
new file mode 100644
index 00000000..78c338ea
--- /dev/null
+++ b/apps/web-antd/src/views/videoSystem/videoWarning/videoWarningToDone/warning-modal.vue
@@ -0,0 +1,121 @@
+
+
+
+
+
+
+
+