This commit is contained in:
@@ -1,12 +1,12 @@
|
||||
import type {
|
||||
ArrangementVO,
|
||||
ArrangementForm,
|
||||
ArrangementQuery,
|
||||
ArrangementVO,
|
||||
arrangmentListQuery,
|
||||
AttendanceUserGroup,
|
||||
} from './model';
|
||||
|
||||
import type { ID, IDS } from '#/api/common';
|
||||
import type { PageResult } from '#/api/common';
|
||||
import type { ID, IDS, PageResult } from '#/api/common';
|
||||
|
||||
import { requestClient } from '#/api/request';
|
||||
|
||||
@@ -21,6 +21,7 @@ export function arrangementList(params?: ArrangementQuery) {
|
||||
{ params },
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据月份查询排班列表
|
||||
* @param params
|
||||
@@ -92,3 +93,14 @@ export function queryScheduleView(params?: arrangmentListQuery) {
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询某天排班人员详情列表
|
||||
* @param params
|
||||
* @returns 排班列表
|
||||
*/
|
||||
|
||||
export function queryCurrentSchedu() {
|
||||
return requestClient.get<AttendanceUserGroup[]>(
|
||||
'/property/AttendanceUserGroup/query/currentDay',
|
||||
);
|
||||
}
|
||||
|
61
apps/web-antd/src/api/sis/alarmEventProcess/index.ts
Normal file
61
apps/web-antd/src/api/sis/alarmEventProcess/index.ts
Normal file
@@ -0,0 +1,61 @@
|
||||
import type { AlarmEventProcessVO, AlarmEventProcessForm, AlarmEventProcessQuery } from './model';
|
||||
|
||||
import type { ID, IDS } from '#/api/common';
|
||||
import type { PageResult } from '#/api/common';
|
||||
|
||||
import { commonExport } from '#/api/helper';
|
||||
import { requestClient } from '#/api/request';
|
||||
|
||||
/**
|
||||
* 查询告警信息处理流程记录列表
|
||||
* @param params
|
||||
* @returns 告警信息处理流程记录列表
|
||||
*/
|
||||
export function alarmEventProcessList(params?: AlarmEventProcessQuery) {
|
||||
return requestClient.get<PageResult<AlarmEventProcessVO>>('/sis/alarmEventProcess/list', { params });
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出告警信息处理流程记录列表
|
||||
* @param params
|
||||
* @returns 告警信息处理流程记录列表
|
||||
*/
|
||||
export function alarmEventProcessExport(params?: AlarmEventProcessQuery) {
|
||||
return commonExport('/sis/alarmEventProcess/export', params ?? {});
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询告警信息处理流程记录详情
|
||||
* @param id id
|
||||
* @returns 告警信息处理流程记录详情
|
||||
*/
|
||||
export function alarmEventProcessInfo(id: ID) {
|
||||
return requestClient.get<AlarmEventProcessVO>(`/sis/alarmEventProcess/${id}`);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增告警信息处理流程记录
|
||||
* @param data
|
||||
* @returns void
|
||||
*/
|
||||
export function alarmEventProcessAdd(data: AlarmEventProcessForm) {
|
||||
return requestClient.postWithMsg<void>('/sis/alarmEventProcess', data);
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新告警信息处理流程记录
|
||||
* @param data
|
||||
* @returns void
|
||||
*/
|
||||
export function alarmEventProcessUpdate(data: AlarmEventProcessForm) {
|
||||
return requestClient.putWithMsg<void>('/sis/alarmEventProcess', data);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除告警信息处理流程记录
|
||||
* @param id id
|
||||
* @returns void
|
||||
*/
|
||||
export function alarmEventProcessRemove(id: ID | IDS) {
|
||||
return requestClient.deleteWithMsg<void>(`/sis/alarmEventProcess/${id}`);
|
||||
}
|
147
apps/web-antd/src/api/sis/alarmEventProcess/model.d.ts
vendored
Normal file
147
apps/web-antd/src/api/sis/alarmEventProcess/model.d.ts
vendored
Normal file
@@ -0,0 +1,147 @@
|
||||
import type { PageQuery, BaseEntity } from '#/api/common';
|
||||
|
||||
export interface AlarmEventProcessVO {
|
||||
/**
|
||||
* 主键id
|
||||
*/
|
||||
id: string | number;
|
||||
|
||||
/**
|
||||
* 告警记录主键id
|
||||
*/
|
||||
alarmId: string | number;
|
||||
|
||||
/**
|
||||
* 指派人员id
|
||||
*/
|
||||
solveId: string | number;
|
||||
|
||||
/**
|
||||
* 指派人员名称
|
||||
*/
|
||||
solveName: string;
|
||||
|
||||
/**
|
||||
* 工单问题回复内容
|
||||
*/
|
||||
workReply: string;
|
||||
|
||||
/**
|
||||
* 处理时间
|
||||
*/
|
||||
workReplyTime: string;
|
||||
|
||||
/**
|
||||
* 是否已接受任务 0:未接收;1:已接收
|
||||
*/
|
||||
receiveTaskTag: number;
|
||||
|
||||
/**
|
||||
* 10: 已上报待确认
|
||||
20:已确认待处理
|
||||
30: 处理中
|
||||
31:升级-转工单
|
||||
32:升级-协助
|
||||
40:已解决
|
||||
50:已关闭
|
||||
*/
|
||||
state: number;
|
||||
|
||||
}
|
||||
|
||||
export interface AlarmEventProcessForm extends BaseEntity {
|
||||
/**
|
||||
* 主键id
|
||||
*/
|
||||
id?: string | number;
|
||||
|
||||
/**
|
||||
* 告警记录主键id
|
||||
*/
|
||||
alarmId?: string | number;
|
||||
|
||||
/**
|
||||
* 指派人员id
|
||||
*/
|
||||
solveId?: string | number;
|
||||
|
||||
/**
|
||||
* 指派人员名称
|
||||
*/
|
||||
solveName?: string;
|
||||
|
||||
/**
|
||||
* 工单问题回复内容
|
||||
*/
|
||||
workReply?: string;
|
||||
|
||||
/**
|
||||
* 处理时间
|
||||
*/
|
||||
workReplyTime?: string;
|
||||
|
||||
/**
|
||||
* 是否已接受任务 0:未接收;1:已接收
|
||||
*/
|
||||
receiveTaskTag?: number;
|
||||
|
||||
/**
|
||||
* 10: 已上报待确认
|
||||
20:已确认待处理
|
||||
30: 处理中
|
||||
31:升级-转工单
|
||||
32:升级-协助
|
||||
40:已解决
|
||||
50:已关闭
|
||||
*/
|
||||
state?: number;
|
||||
|
||||
}
|
||||
|
||||
export interface AlarmEventProcessQuery extends PageQuery {
|
||||
/**
|
||||
* 告警记录主键id
|
||||
*/
|
||||
alarmId?: string | number;
|
||||
|
||||
/**
|
||||
* 指派人员id
|
||||
*/
|
||||
solveId?: string | number;
|
||||
|
||||
/**
|
||||
* 指派人员名称
|
||||
*/
|
||||
solveName?: string;
|
||||
|
||||
/**
|
||||
* 工单问题回复内容
|
||||
*/
|
||||
workReply?: string;
|
||||
|
||||
/**
|
||||
* 处理时间
|
||||
*/
|
||||
workReplyTime?: string;
|
||||
|
||||
/**
|
||||
* 是否已接受任务 0:未接收;1:已接收
|
||||
*/
|
||||
receiveTaskTag?: number;
|
||||
|
||||
/**
|
||||
* 10: 已上报待确认
|
||||
20:已确认待处理
|
||||
30: 处理中
|
||||
31:升级-转工单
|
||||
32:升级-协助
|
||||
40:已解决
|
||||
50:已关闭
|
||||
*/
|
||||
state?: number;
|
||||
|
||||
/**
|
||||
* 日期范围参数
|
||||
*/
|
||||
params?: any;
|
||||
}
|
@@ -1,18 +1,30 @@
|
||||
import type { AlarmEventsVO, AlarmEventsForm, AlarmEventsQuery } from './model';
|
||||
import type { AlarmEventsForm, AlarmEventsQuery, AlarmEventsVO } 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 alarmEventsList(params?: AlarmEventsQuery) {
|
||||
return requestClient.get<PageResult<AlarmEventsVO>>('/sis/alarmEvents/list', { params });
|
||||
return requestClient.get<PageResult<AlarmEventsVO>>('/sis/alarmEvents/list', {
|
||||
params,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询【请填写功能名称】列表
|
||||
* @param params
|
||||
* @returns 【请填写功能名称】列表
|
||||
*/
|
||||
export function alarmEventsListCurr(params?: AlarmEventsQuery) {
|
||||
return requestClient.get<PageResult<AlarmEventsVO>>('/sis/alarmEvents/list/curr', {
|
||||
params,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -59,3 +71,25 @@ export function alarmEventsUpdate(data: AlarmEventsForm) {
|
||||
export function alarmEventsRemove(id: ID | IDS) {
|
||||
return requestClient.deleteWithMsg<void>(`/sis/alarmEvents/${id}`);
|
||||
}
|
||||
|
||||
/**
|
||||
* 告警指派
|
||||
* @returns void
|
||||
*/
|
||||
export function taskAssignment(params: any) {
|
||||
return requestClient.postWithMsg<void>(
|
||||
`/sis/alarmEvents/assignment`,
|
||||
params ?? {},
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* 告警处理完成
|
||||
* @returns void
|
||||
*/
|
||||
export function alarmEventComplete(params: any) {
|
||||
return requestClient.postWithMsg<void>(
|
||||
`/sis/alarmEvents/complete`,
|
||||
params ?? {},
|
||||
);
|
||||
}
|
||||
|
@@ -5,8 +5,7 @@ import { DictEnum } from '@vben/constants';
|
||||
import { getPopupContainer } from '@vben/utils';
|
||||
|
||||
import { getDictOptions } from '#/utils/dict';
|
||||
import { renderDict } from '#/utils/render'
|
||||
import { log } from 'console'
|
||||
import { renderDict } from '#/utils/render';
|
||||
|
||||
export const querySchema: FormSchemaGetter = () => [
|
||||
{
|
||||
@@ -48,11 +47,11 @@ export const columns: VxeGridProps['columns'] = [
|
||||
{
|
||||
title: '性别',
|
||||
field: 'sex',
|
||||
slots:{
|
||||
default: ({row}) =>{
|
||||
return renderDict(row.sex, 'sys_user_sex')
|
||||
}
|
||||
}
|
||||
slots: {
|
||||
default: ({ row }) => {
|
||||
return renderDict(row.sex, 'sys_user_sex');
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
title: '邮箱',
|
||||
@@ -65,11 +64,11 @@ export const columns: VxeGridProps['columns'] = [
|
||||
{
|
||||
title: '证件类型',
|
||||
field: 'certificateType',
|
||||
slots:{
|
||||
default: ({row}) =>{
|
||||
return renderDict(row.certificateType, 'sys_certificate_type')
|
||||
}
|
||||
}
|
||||
slots: {
|
||||
default: ({ row }) => {
|
||||
return renderDict(row.certificateType, 'sys_certificate_type');
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
title: '证件号码',
|
||||
@@ -84,7 +83,7 @@ export const columns: VxeGridProps['columns'] = [
|
||||
field: 'rosterType',
|
||||
slots: {
|
||||
default: ({ row }) => {
|
||||
return renderDict(row.rosterType, 'roster_type')
|
||||
return renderDict(row.rosterType, 'roster_type');
|
||||
},
|
||||
},
|
||||
width: 100,
|
||||
@@ -99,8 +98,8 @@ export const columns: VxeGridProps['columns'] = [
|
||||
];
|
||||
|
||||
const test = getDictOptions('roster_type');
|
||||
test.forEach(item => {
|
||||
console.log('item',item)
|
||||
test.forEach((item) => {
|
||||
console.log('item', item);
|
||||
});
|
||||
|
||||
export const modalSchema: FormSchemaGetter = () => [
|
||||
|
@@ -1,8 +1,12 @@
|
||||
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';
|
||||
import { getPopupContainer } from '@vben/utils';
|
||||
import { getDictOptions } from '#/utils/dict';
|
||||
import { DictEnum } from '@vben/constants';
|
||||
|
||||
export const fallImg =
|
||||
'data:image/png;base64,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';
|
||||
|
||||
export const querySchema: FormSchemaGetter = () => [
|
||||
{
|
||||
@@ -13,56 +17,50 @@ export const querySchema: FormSchemaGetter = () => [
|
||||
{
|
||||
component: 'Select',
|
||||
componentProps: {
|
||||
options: [
|
||||
{ label: '特大', value: '特大' },
|
||||
{ label: '重要', value: '重要' },
|
||||
{ label: '一般', value: '一般' },
|
||||
],
|
||||
getPopupContainer,
|
||||
options: getDictOptions(DictEnum.alarm_level, true),
|
||||
},
|
||||
fieldName: 'level',
|
||||
label: '级别',
|
||||
},
|
||||
{
|
||||
/*{
|
||||
component: 'Select',
|
||||
componentProps: {
|
||||
options: [
|
||||
{ label: '待分配', value: '待分配' },
|
||||
{ label: '处理中', value: '处理中' },
|
||||
{ label: '已完成', value: '已完成' },
|
||||
],
|
||||
getPopupContainer,
|
||||
options: getDictOptions(DictEnum.alarm_state, true),
|
||||
},
|
||||
fieldName: 'processingStatus',
|
||||
fieldName: 'state',
|
||||
label: '处理状态',
|
||||
},
|
||||
},*/
|
||||
];
|
||||
|
||||
export const columns: VxeGridProps['columns'] = [
|
||||
{ type: 'checkbox', width: 60 },
|
||||
{
|
||||
title: '预警编号',
|
||||
field: 'alarmId',
|
||||
width: 150,
|
||||
field: 'id',
|
||||
},
|
||||
{
|
||||
title: '预警时间',
|
||||
field: 'alarmTime',
|
||||
width: 150,
|
||||
field: 'reportTime',
|
||||
},
|
||||
{
|
||||
title: '设备ip',
|
||||
field: 'deviceIp',
|
||||
},
|
||||
{
|
||||
title: '设备名称',
|
||||
field: 'deviceName',
|
||||
width: 150,
|
||||
},
|
||||
{
|
||||
title: '级别',
|
||||
field: 'level',
|
||||
width: 100,
|
||||
slots: {
|
||||
default: ({ row }: any) => {
|
||||
const levelColors: Record<string, string> = {
|
||||
特大: 'red',
|
||||
重要: 'orange',
|
||||
一般: 'blue',
|
||||
1: 'red',
|
||||
2: 'orange',
|
||||
3: 'blue',
|
||||
};
|
||||
return h(
|
||||
'span',
|
||||
@@ -72,64 +70,31 @@ export const columns: VxeGridProps['columns'] = [
|
||||
fontWeight: 'bold',
|
||||
},
|
||||
},
|
||||
row.level,
|
||||
row.levelName,
|
||||
);
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
title: '预警类型',
|
||||
field: 'alarmType',
|
||||
width: 120,
|
||||
field: 'alarmTypeName',
|
||||
slots: {
|
||||
default: ({ row }: any) => {
|
||||
return h('span', row.bigTypeName + '-' + row.smallTypeName);
|
||||
},
|
||||
{
|
||||
title: '描述',
|
||||
field: 'description',
|
||||
minWidth: 200,
|
||||
},
|
||||
{
|
||||
title: '所在位置',
|
||||
field: 'location',
|
||||
width: 150,
|
||||
},
|
||||
{
|
||||
title: '处理状态',
|
||||
field: 'processingStatus',
|
||||
width: 100,
|
||||
slots: {
|
||||
default: ({ row }: any) => {
|
||||
const statusColors: Record<string, string> = {
|
||||
待分配: 'red',
|
||||
处理中: 'orange',
|
||||
已完成: 'green',
|
||||
};
|
||||
return h(
|
||||
'span',
|
||||
{
|
||||
style: {
|
||||
color: statusColors[row.processingStatus] || '#666',
|
||||
fontWeight: 'bold',
|
||||
},
|
||||
},
|
||||
row.processingStatus,
|
||||
);
|
||||
},
|
||||
},
|
||||
field: 'stateName',
|
||||
},
|
||||
{
|
||||
title: '处理情况',
|
||||
field: 'processingDetails',
|
||||
width: 150,
|
||||
title: '创建时间',
|
||||
field: 'createTime',
|
||||
},
|
||||
{
|
||||
title: '预期处理时间',
|
||||
field: 'expectedProcessingTime',
|
||||
width: 150,
|
||||
},
|
||||
{
|
||||
title: '处理时间',
|
||||
field: 'processingTime',
|
||||
width: 150,
|
||||
title: '创建人',
|
||||
field: 'createBy',
|
||||
},
|
||||
{
|
||||
field: 'action',
|
||||
@@ -152,22 +117,22 @@ 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',
|
||||
valueFormat: 'YYYY.MM.DD HH:mm',
|
||||
showTime: true,
|
||||
},
|
||||
rules: 'required',
|
||||
disabled: true,
|
||||
rules: 'required',
|
||||
},
|
||||
{
|
||||
label: '预警类型',
|
||||
@@ -177,89 +142,107 @@ export const modalSchema: FormSchemaGetter = () => [
|
||||
disabled: true,
|
||||
},
|
||||
{
|
||||
label: '描述',
|
||||
fieldName: 'description',
|
||||
label: '设备名称',
|
||||
fieldName: 'deviceIp',
|
||||
component: 'Input',
|
||||
formItemClass: 'col-span-2',
|
||||
disabled: true,
|
||||
},
|
||||
{
|
||||
label: '所在位置',
|
||||
fieldName: 'location',
|
||||
component: 'Input',
|
||||
rules: 'required',
|
||||
disabled: true,
|
||||
},
|
||||
{
|
||||
label: '设备名称',
|
||||
fieldName: 'deviceName',
|
||||
disabled: true,
|
||||
component: 'Input',
|
||||
rules: 'required',
|
||||
disabled: true,
|
||||
},
|
||||
{
|
||||
label: '处理情况',
|
||||
fieldName: 'processingDetails',
|
||||
component: 'Input',
|
||||
label: '重要级别',
|
||||
fieldName: 'level',
|
||||
component: 'Select',
|
||||
disabled: true,
|
||||
componentProps: {
|
||||
rows: 3,
|
||||
getPopupContainer,
|
||||
options: getDictOptions(DictEnum.alarm_level, true),
|
||||
},
|
||||
formItemClass: 'col-span-2',
|
||||
disabled: true,
|
||||
rules: 'selectRequired',
|
||||
},
|
||||
{
|
||||
label: '处理时间',
|
||||
fieldName: 'processingTime',
|
||||
label: '创建时间',
|
||||
fieldName: 'createTime',
|
||||
component: 'DatePicker',
|
||||
disabled: true,
|
||||
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',
|
||||
disabled: true,
|
||||
componentProps: {
|
||||
options: [
|
||||
{ label: '待分配', value: '待分配' },
|
||||
{ label: '处理中', value: '处理中' },
|
||||
{ label: '已完成', value: '已完成' },
|
||||
],
|
||||
getPopupContainer,
|
||||
options: getDictOptions(DictEnum.alarm_state, true),
|
||||
},
|
||||
fieldName: 'state',
|
||||
rules: 'selectRequired',
|
||||
},
|
||||
{
|
||||
label: '预期处理时间',
|
||||
fieldName: 'expectedProcessingTime',
|
||||
component: 'DatePicker',
|
||||
label: '描述',
|
||||
disabled: true,
|
||||
fieldName: 'description',
|
||||
component: 'Textarea',
|
||||
formItemClass: 'col-span-2',
|
||||
componentProps: {
|
||||
format: 'YYYY.MM.DD HH:mm',
|
||||
valueFormat: 'YYYY.MM.DD HH:mm',
|
||||
showTime: true,
|
||||
rows: 3,
|
||||
},
|
||||
},
|
||||
// 插入分割线
|
||||
{
|
||||
component: 'Divider',
|
||||
fieldName: '_divider',
|
||||
formItemClass: 'col-span-2',
|
||||
hideLabel: true,
|
||||
renderComponentContent: () => {
|
||||
return {
|
||||
default: () => h('div', '处理'),
|
||||
};
|
||||
},
|
||||
},
|
||||
|
||||
{
|
||||
label: '处理人',
|
||||
fieldName: 'solveId',
|
||||
component: 'Select',
|
||||
},
|
||||
|
||||
{
|
||||
label: '联系电话',
|
||||
fieldName: 'phonenumber',
|
||||
component: 'Input',
|
||||
},
|
||||
|
||||
{
|
||||
label: '邮箱',
|
||||
fieldName: 'email',
|
||||
component: 'Input',
|
||||
},
|
||||
|
||||
{
|
||||
label: '所在部门',
|
||||
fieldName: 'deptName',
|
||||
component: 'Input',
|
||||
disabled: true,
|
||||
},
|
||||
|
||||
{
|
||||
label: '备注',
|
||||
fieldName: 'remark',
|
||||
component: 'Textarea',
|
||||
formItemClass: 'col-span-2',
|
||||
componentProps: {
|
||||
rows: 3,
|
||||
},
|
||||
rules: 'required',
|
||||
},
|
||||
];
|
||||
|
@@ -2,79 +2,20 @@
|
||||
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 { Modal, Popconfirm, Space } from 'ant-design-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,
|
||||
},
|
||||
]);
|
||||
import { alarmEventsList, alarmEventsRemove } from '#/api/sis/alarmEvents';
|
||||
import type { AlarmEventsForm } from '#/api/sis/alarmEvents/model';
|
||||
|
||||
/* 搜索栏配置 */
|
||||
const formOptions: VbenFormProps = {
|
||||
commonConfig: {
|
||||
labelWidth: 100,
|
||||
@@ -86,14 +27,32 @@ const formOptions: VbenFormProps = {
|
||||
wrapperClass: 'grid-cols-1 md:grid-cols-2 lg:grid-cols-3',
|
||||
};
|
||||
|
||||
/* table栏配置 */
|
||||
const gridOptions: VxeGridProps = {
|
||||
checkboxConfig: {
|
||||
// 高亮
|
||||
highlight: true,
|
||||
// 翻页时保留选中状态
|
||||
reserve: true,
|
||||
// 点击行选中
|
||||
// trigger: 'row',
|
||||
},
|
||||
// 需要使用i18n注意这里要改成getter形式 否则切换语言不会刷新
|
||||
// columns: columns(),
|
||||
columns,
|
||||
height: 'auto',
|
||||
data: mockData.value,
|
||||
pagerConfig: {
|
||||
currentPage: 1,
|
||||
pageSize: 10,
|
||||
total: mockData.value.length,
|
||||
pagerConfig: {},
|
||||
proxyConfig: {
|
||||
ajax: {
|
||||
query: async ({ page }, formValues = {}) => {
|
||||
return await alarmEventsList({
|
||||
pageNum: page.currentPage,
|
||||
pageSize: page.pageSize,
|
||||
states: [40,50],
|
||||
...formValues,
|
||||
});
|
||||
},
|
||||
},
|
||||
},
|
||||
rowConfig: {
|
||||
keyField: 'id',
|
||||
@@ -107,14 +66,6 @@ const [BasicTable, tableApi] = useVbenVxeGrid({
|
||||
});
|
||||
|
||||
// 监听数据变化,强制重新渲染表格
|
||||
const tableKey = ref(0);
|
||||
watch(
|
||||
mockData,
|
||||
() => {
|
||||
tableKey.value++;
|
||||
},
|
||||
{ deep: true },
|
||||
);
|
||||
|
||||
const [WarningModal, modalApi] = useVbenModal({
|
||||
connectedComponent: warningModal,
|
||||
@@ -124,51 +75,22 @@ 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.setData({ id: row.id, data: row });
|
||||
detailApi.open();
|
||||
}
|
||||
|
||||
// 编辑
|
||||
async function handleEdit(row: any) {
|
||||
modalApi.setData({ id: row.id, data: mockData.value });
|
||||
modalApi.setData({ id: row.id, data: row });
|
||||
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);
|
||||
const index = row.id;
|
||||
if (index !== -1) {
|
||||
mockData.value.splice(index, 1);
|
||||
await tableApi.query();
|
||||
}
|
||||
}
|
||||
@@ -176,18 +98,13 @@ async function handleDelete(row: any) {
|
||||
// 批量删除
|
||||
function handleMultiDelete() {
|
||||
const rows = tableApi.grid.getCheckboxRecords();
|
||||
const ids = rows.map((row: any) => row.id);
|
||||
const ids = rows.map((row: Required<AlarmEventsForm>) => 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 alarmEventsRemove(ids);
|
||||
await tableApi.query();
|
||||
},
|
||||
});
|
||||
@@ -195,11 +112,7 @@ function handleMultiDelete() {
|
||||
</script>
|
||||
<template>
|
||||
<Page :auto-content-height="true">
|
||||
<BasicTable
|
||||
:key="tableKey"
|
||||
class="flex-1 overflow-hidden"
|
||||
table-title="视频预警处理"
|
||||
>
|
||||
<BasicTable class="flex-1 overflow-hidden" table-title="视频预警处理">
|
||||
<template #toolbar-tools>
|
||||
<Space>
|
||||
<a-button
|
||||
@@ -227,19 +140,7 @@ function handleMultiDelete() {
|
||||
>
|
||||
{{ $t('pages.common.info') }}
|
||||
</ghost-button>
|
||||
<ghost-button
|
||||
v-access:code="['video:warning:edit']"
|
||||
@click.stop="handleEdit(row)"
|
||||
>
|
||||
{{ $t('pages.common.edit') }}
|
||||
</ghost-button>
|
||||
<!-- <ghost-button
|
||||
v-access:code="['video:warning:assign']"
|
||||
@click.stop="handleAssign(row)"
|
||||
:disabled="row.processingStatus === '已完成'"
|
||||
>
|
||||
分配处理
|
||||
</ghost-button> -->
|
||||
|
||||
<Popconfirm
|
||||
:get-popup-container="getVxePopupContainer"
|
||||
placement="left"
|
||||
@@ -259,7 +160,6 @@ function handleMultiDelete() {
|
||||
</BasicTable>
|
||||
<WarningModal @reload="tableApi.query()" />
|
||||
<WarningDetail />
|
||||
<LevelSettingModalComp @reload="tableKey++" />
|
||||
</Page>
|
||||
</template>
|
||||
<style scoped lang="scss">
|
||||
|
@@ -1,45 +0,0 @@
|
||||
<template>
|
||||
<BasicModal>
|
||||
<RadioGroup v-model:value="selectedLevel">
|
||||
<Radio value="特大">特大</Radio>
|
||||
<Radio value="重要">重要</Radio>
|
||||
<Radio value="一般">一般</Radio>
|
||||
</RadioGroup>
|
||||
</BasicModal>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { ref } from 'vue';
|
||||
import { useVbenModal } from '@vben/common-ui';
|
||||
import { RadioGroup, Radio } from 'ant-design-vue';
|
||||
|
||||
const emit = defineEmits<{ reload: [] }>();
|
||||
|
||||
const selectedLevel = ref('一般');
|
||||
|
||||
const [BasicModal, modalApi] = useVbenModal({
|
||||
class: 'w-[360px]',
|
||||
title: '设置级别',
|
||||
onOpenChange: async (isOpen) => {
|
||||
if (!isOpen) return null;
|
||||
const { level } = modalApi.getData() as { level?: string };
|
||||
selectedLevel.value = level || '一般';
|
||||
},
|
||||
onConfirm: handleConfirm,
|
||||
});
|
||||
|
||||
function handleConfirm() {
|
||||
const { id, data } = modalApi.getData() as {
|
||||
id: number | string;
|
||||
data: any[];
|
||||
};
|
||||
if (id != null && data) {
|
||||
const idx = data.findIndex((item: any) => item.id === id);
|
||||
if (idx !== -1) {
|
||||
data[idx].level = selectedLevel.value;
|
||||
}
|
||||
}
|
||||
emit('reload');
|
||||
modalApi.close();
|
||||
}
|
||||
</script>
|
@@ -1,22 +1,23 @@
|
||||
<script setup lang="ts">
|
||||
import { shallowRef } from 'vue';
|
||||
import { ref, shallowRef } from 'vue';
|
||||
import { useVbenModal } from '@vben/common-ui';
|
||||
import {
|
||||
Descriptions,
|
||||
DescriptionsItem,
|
||||
Tag,
|
||||
Timeline,
|
||||
TimelineItem,
|
||||
} from 'ant-design-vue';
|
||||
import { Descriptions, DescriptionsItem, Image, Tag } from 'ant-design-vue';
|
||||
import { queryAlarmEventAttachmentsList } from '#/api/sis/alarmEventAttachments';
|
||||
import type { AlarmEventAttachmentsVO } from '#/api/sis/alarmEventAttachments/model';
|
||||
import { fallImg } from './data';
|
||||
import { alarmEventProcessList } from '#/api/sis/alarmEventProcess';
|
||||
import type { AlarmEventProcessVO } from '#/api/sis/alarmEventProcess/model';
|
||||
|
||||
const [BasicModal, modalApi] = useVbenModal({
|
||||
onOpenChange: handleOpenChange,
|
||||
onClosed() {
|
||||
warningDetail.value = null;
|
||||
// warningDetail.value = null;
|
||||
modalApi.close();
|
||||
},
|
||||
});
|
||||
|
||||
const warningDetail = shallowRef<any>(null);
|
||||
const currFiles = ref<AlarmEventAttachmentsVO[]>([]);
|
||||
|
||||
async function handleOpenChange(open: boolean) {
|
||||
if (!open) {
|
||||
@@ -27,15 +28,31 @@ async function handleOpenChange(open: boolean) {
|
||||
id: number | string;
|
||||
data: any[];
|
||||
};
|
||||
|
||||
// 从传递的数据中查找对应的记录
|
||||
const record = data.find((item: any) => item.id === id);
|
||||
if (record) {
|
||||
warningDetail.value = record;
|
||||
if (data) {
|
||||
warningDetail.value = data;
|
||||
}
|
||||
|
||||
// 加载事件附件信息
|
||||
currFiles.value = await queryAlarmEventAttachmentsList(id);
|
||||
// 加载处理流程
|
||||
loadProcessList();
|
||||
modalApi.modalLoading(false);
|
||||
}
|
||||
|
||||
const process = ref<AlarmEventProcessVO[]>([]);
|
||||
|
||||
function loadProcessList() {
|
||||
const data = modalApi.getData();
|
||||
const params = {
|
||||
pageNum: 1,
|
||||
pageSize: 50,
|
||||
alarmId: data.id,
|
||||
};
|
||||
alarmEventProcessList(params).then((res) => {
|
||||
const { rows = [] } = res;
|
||||
process.value = rows;
|
||||
});
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
@@ -43,7 +60,7 @@ async function handleOpenChange(open: boolean) {
|
||||
:footer="false"
|
||||
:fullscreen-button="false"
|
||||
title="预警详情"
|
||||
class="w-[70%]"
|
||||
class="w-[60%]"
|
||||
>
|
||||
<Descriptions
|
||||
v-if="warningDetail"
|
||||
@@ -54,11 +71,13 @@ async function handleOpenChange(open: boolean) {
|
||||
style="margin-bottom: 30px"
|
||||
>
|
||||
<DescriptionsItem label="预警编号">
|
||||
{{ warningDetail.alarmId }}
|
||||
{{ warningDetail.id }}
|
||||
</DescriptionsItem>
|
||||
|
||||
<DescriptionsItem label="预警时间">
|
||||
{{ warningDetail.alarmTime }}
|
||||
{{ warningDetail.reportTime }}
|
||||
</DescriptionsItem>
|
||||
|
||||
<DescriptionsItem label="级别">
|
||||
<Tag
|
||||
:color="
|
||||
@@ -69,79 +88,66 @@ async function handleOpenChange(open: boolean) {
|
||||
: 'blue'
|
||||
"
|
||||
>
|
||||
{{ warningDetail.level }}
|
||||
{{ warningDetail.levelName }}
|
||||
</Tag>
|
||||
</DescriptionsItem>
|
||||
|
||||
<DescriptionsItem label="预警类型">
|
||||
{{ warningDetail.alarmType }}
|
||||
{{ warningDetail.bigTypeName + ' - ' + warningDetail.smallTypeName }}
|
||||
</DescriptionsItem>
|
||||
|
||||
<DescriptionsItem label="设备ip"
|
||||
>{{ warningDetail.deviceIp }}
|
||||
</DescriptionsItem>
|
||||
|
||||
<DescriptionsItem label="设备ip"
|
||||
>{{ warningDetail.deviceName }}
|
||||
</DescriptionsItem>
|
||||
|
||||
<DescriptionsItem label="描述" :span="2">
|
||||
{{ warningDetail.description }}
|
||||
</DescriptionsItem>
|
||||
|
||||
<DescriptionsItem label="所在位置">
|
||||
{{ warningDetail.location }}
|
||||
{{ warningDetail.deviceName }}
|
||||
</DescriptionsItem>
|
||||
|
||||
<DescriptionsItem label="处理状态">
|
||||
<Tag
|
||||
:color="
|
||||
warningDetail.processingStatus === '待分配'
|
||||
? 'red'
|
||||
: warningDetail.processingStatus === '处理中'
|
||||
? 'orange'
|
||||
: 'green'
|
||||
"
|
||||
>
|
||||
{{ warningDetail.processingStatus }}
|
||||
<Tag>
|
||||
{{ warningDetail.stateName }}
|
||||
</Tag>
|
||||
</DescriptionsItem>
|
||||
|
||||
<DescriptionsItem label="处理情况" :span="2">
|
||||
{{ warningDetail.processingDetails || '-' }}
|
||||
</DescriptionsItem>
|
||||
<DescriptionsItem label="处理时间">
|
||||
|
||||
<DescriptionsItem label="处理时间" :span="2">
|
||||
{{ warningDetail.processingTime || '-' }}
|
||||
</DescriptionsItem>
|
||||
<DescriptionsItem label="设备名称">
|
||||
{{ warningDetail.deviceName || '-' }}
|
||||
</DescriptionsItem>
|
||||
<DescriptionsItem
|
||||
label="预处理时间"
|
||||
v-if="warningDetail.processingStatus === '处理中'"
|
||||
>
|
||||
{{ warningDetail.expectedProcessingTime || '-' }}
|
||||
</DescriptionsItem>
|
||||
<DescriptionsItem
|
||||
label="处理图片"
|
||||
v-if="warningDetail.processingStatus === '已完成'"
|
||||
>
|
||||
<img
|
||||
:src="warningDetail.imgUrl"
|
||||
alt="处理图片"
|
||||
style="max-width: 200px; max-height: 150px"
|
||||
|
||||
<DescriptionsItem :span="1" label="附件信息">
|
||||
<div class="file-box">
|
||||
<div class="img-box" v-for="item in currFiles">
|
||||
<Image
|
||||
style="width: 120px; height: 120px"
|
||||
:src="item.imagePath"
|
||||
:fallback="fallImg"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</DescriptionsItem>
|
||||
|
||||
<DescriptionsItem :span="1" label="报警视频"></DescriptionsItem>
|
||||
</Descriptions>
|
||||
<Timeline>
|
||||
<TimelineItem>
|
||||
<p style="display: flex">类型:已完成</p>
|
||||
<p>时间:2025-06-01 11:07:59</p>
|
||||
<p>处理人:张三</p>
|
||||
</TimelineItem>
|
||||
<TimelineItem>
|
||||
<p style="display: flex">类型:处理异常</p>
|
||||
<p>时间:2025-06-01 11:07:59</p>
|
||||
<p>处理人:张三</p>
|
||||
<p>异常原因:时长不够</p>
|
||||
</TimelineItem>
|
||||
<TimelineItem>
|
||||
<p style="display: flex">类型:处理中</p>
|
||||
<p>时间:2025-06-01 11:07:59</p>
|
||||
<p>处理人:张三</p>
|
||||
</TimelineItem>
|
||||
<TimelineItem>
|
||||
<p style="display: flex">类型:创建预警</p>
|
||||
<p>时间:2025-06-01 11:07:59</p>
|
||||
<p>处理人:张三</p>
|
||||
</TimelineItem>
|
||||
</Timeline>
|
||||
</BasicModal>
|
||||
</template>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.file-box {
|
||||
.img-box {
|
||||
float: left;
|
||||
margin-left: 5px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
@@ -1,21 +1,20 @@
|
||||
<script setup lang="ts">
|
||||
import { computed, ref } from 'vue';
|
||||
import { ref } from 'vue';
|
||||
|
||||
import { useVbenModal } from '@vben/common-ui';
|
||||
import { $t } from '@vben/locales';
|
||||
import { cloneDeep } from '@vben/utils';
|
||||
|
||||
import { useVbenForm } from '#/adapter/form';
|
||||
import { defaultFormValueGetter, useBeforeCloseDiff } from '#/utils/popup';
|
||||
|
||||
import { modalSchema } from './data';
|
||||
import { queryCurrentSchedu } from '#/api/property/attendanceManagement/arrangement';
|
||||
import type { AttendanceUserGroup } from '#/api/property/attendanceManagement/arrangement/model';
|
||||
import { taskAssignment } from '#/api/sis/alarmEvents';
|
||||
|
||||
const emit = defineEmits<{ reload: [] }>();
|
||||
|
||||
const isUpdate = ref(false);
|
||||
const title = computed(() => {
|
||||
return isUpdate.value ? $t('pages.common.edit') : $t('pages.common.add');
|
||||
});
|
||||
|
||||
const [BasicForm, formApi] = useVbenForm({
|
||||
commonConfig: {
|
||||
@@ -36,7 +35,7 @@ const { onBeforeClose, markInitialized, resetInitialized } = useBeforeCloseDiff(
|
||||
currentGetter: defaultFormValueGetter(formApi),
|
||||
},
|
||||
);
|
||||
|
||||
let currentSelectData: any = null;
|
||||
const [BasicModal, modalApi] = useVbenModal({
|
||||
class: 'w-[70%]',
|
||||
fullscreenButton: false,
|
||||
@@ -52,18 +51,55 @@ const [BasicModal, modalApi] = useVbenModal({
|
||||
isUpdate.value = !!id;
|
||||
|
||||
if (isUpdate.value && id) {
|
||||
// 更新表单属性
|
||||
const userList: AttendanceUserGroup[] = await queryCurrentSchedu();
|
||||
const arr = userList.map((item) => {
|
||||
const { remoteUserVo, deptName } = item;
|
||||
return {
|
||||
label: remoteUserVo.nickName,
|
||||
value: remoteUserVo.userId,
|
||||
deptName: deptName,
|
||||
phonenumber: remoteUserVo.phonenumber,
|
||||
email: remoteUserVo.email,
|
||||
userName: remoteUserVo.userName,
|
||||
nickName: remoteUserVo.nickName,
|
||||
};
|
||||
});
|
||||
formApi.updateSchema([
|
||||
{
|
||||
componentProps: {
|
||||
options: arr,
|
||||
onChange: async (_value: any, data: any) => {
|
||||
const {
|
||||
deptName = '',
|
||||
email = '',
|
||||
phonenumber = '',
|
||||
nickName = '',
|
||||
} = data;
|
||||
const formData = cloneDeep(await formApi.getValues());
|
||||
formData.phonenumber = phonenumber;
|
||||
formData.email = email;
|
||||
formData.deptName = deptName;
|
||||
currentSelectData = data;
|
||||
formApi.setValues(formData);
|
||||
},
|
||||
},
|
||||
fieldName: 'solveId',
|
||||
},
|
||||
]);
|
||||
|
||||
// 从传递的数据中查找对应的记录
|
||||
const { data } = modalApi.getData() as {
|
||||
id: number | string;
|
||||
data: any[];
|
||||
data: any;
|
||||
};
|
||||
const record = data.find((item: any) => item.id === id);
|
||||
if (record) {
|
||||
await formApi.setValues(record);
|
||||
if (data) {
|
||||
// 处理预警上报类型
|
||||
data.alarmType = `${data.bigTypeName} - ${data.smallTypeName}`;
|
||||
await formApi.setValues(data);
|
||||
}
|
||||
}
|
||||
await markInitialized();
|
||||
|
||||
modalApi.modalLoading(false);
|
||||
},
|
||||
});
|
||||
@@ -75,16 +111,18 @@ async function handleConfirm() {
|
||||
if (!valid) {
|
||||
return;
|
||||
}
|
||||
// 表单数据
|
||||
const formData = cloneDeep(await formApi.getValues());
|
||||
|
||||
// 更新表格数据
|
||||
const { data } = modalApi.getData() as { id: number | string; data: any[] };
|
||||
const index = data.findIndex((item: any) => item.id === formData.id);
|
||||
if (index !== -1) {
|
||||
// 更新数据
|
||||
Object.assign(data[index], formData);
|
||||
}
|
||||
|
||||
const params = {
|
||||
alarmId: formData.id,
|
||||
solveId: currentSelectData.value,
|
||||
solveName: `${currentSelectData.userName}(${currentSelectData.nickName})`,
|
||||
solvePhone: currentSelectData.phonenumber,
|
||||
solveEmail: currentSelectData.email,
|
||||
remark: formData.remark,
|
||||
};
|
||||
await taskAssignment(params);
|
||||
resetInitialized();
|
||||
emit('reload');
|
||||
modalApi.close();
|
||||
@@ -102,11 +140,10 @@ async function handleClosed() {
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<BasicModal :title="title">
|
||||
<BasicForm />
|
||||
<BasicModal title="处理">
|
||||
<BasicForm></BasicForm>
|
||||
</BasicModal>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
/* 使用 :deep() 穿透 scoped 样式,影响子组件 */
|
||||
:deep(.ant-input[disabled]),
|
||||
|
@@ -23,7 +23,7 @@ export const querySchema: FormSchemaGetter = () => [
|
||||
fieldName: 'level',
|
||||
label: '级别',
|
||||
},
|
||||
{
|
||||
/*{
|
||||
component: 'Select',
|
||||
componentProps: {
|
||||
getPopupContainer,
|
||||
@@ -31,7 +31,7 @@ export const querySchema: FormSchemaGetter = () => [
|
||||
},
|
||||
fieldName: 'state',
|
||||
label: '处理状态',
|
||||
},
|
||||
},*/
|
||||
];
|
||||
|
||||
export const columns: VxeGridProps['columns'] = [
|
||||
@@ -44,6 +44,10 @@ export const columns: VxeGridProps['columns'] = [
|
||||
title: '预警时间',
|
||||
field: 'reportTime',
|
||||
},
|
||||
{
|
||||
title: '设备ip',
|
||||
field: 'deviceIp',
|
||||
},
|
||||
{
|
||||
title: '设备名称',
|
||||
field: 'deviceName',
|
||||
@@ -85,12 +89,12 @@ export const columns: VxeGridProps['columns'] = [
|
||||
field: 'stateName',
|
||||
},
|
||||
{
|
||||
title: '预期处理时间',
|
||||
field: 'servBeginTime',
|
||||
title: '创建时间',
|
||||
field: 'createTime',
|
||||
},
|
||||
{
|
||||
title: '处理时间',
|
||||
field: 'servEndTime',
|
||||
title: '创建人',
|
||||
field: 'createBy',
|
||||
},
|
||||
{
|
||||
field: 'action',
|
||||
@@ -127,78 +131,56 @@ export const modalSchema: FormSchemaGetter = () => [
|
||||
valueFormat: 'YYYY.MM.DD HH:mm',
|
||||
showTime: true,
|
||||
},
|
||||
rules: 'required',
|
||||
disabled: true,
|
||||
rules: 'required',
|
||||
},
|
||||
{
|
||||
label: '预警类型',
|
||||
fieldName: 'bigTypeName',
|
||||
fieldName: 'alarmType',
|
||||
component: 'Input',
|
||||
rules: 'required',
|
||||
disabled: true,
|
||||
},
|
||||
{
|
||||
label: '描述',
|
||||
fieldName: 'description',
|
||||
label: '设备名称',
|
||||
fieldName: 'deviceIp',
|
||||
component: 'Input',
|
||||
formItemClass: 'col-span-2',
|
||||
disabled: true,
|
||||
},
|
||||
/* {
|
||||
label: '所在位置',
|
||||
fieldName: 'location',
|
||||
component: 'Input',
|
||||
rules: 'required',
|
||||
disabled: true,
|
||||
},*/
|
||||
},
|
||||
{
|
||||
label: '设备名称',
|
||||
fieldName: 'deviceName',
|
||||
disabled: true,
|
||||
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: '级别',
|
||||
label: '重要级别',
|
||||
fieldName: 'level',
|
||||
component: 'Select',
|
||||
disabled: true,
|
||||
componentProps: {
|
||||
getPopupContainer,
|
||||
options: getDictOptions(DictEnum.alarm_level, true),
|
||||
},
|
||||
rules: 'selectRequired',
|
||||
},
|
||||
{
|
||||
label: '创建时间',
|
||||
fieldName: 'createTime',
|
||||
component: 'DatePicker',
|
||||
disabled: true,
|
||||
componentProps: {
|
||||
format: 'YYYY.MM.DD HH:mm',
|
||||
valueFormat: 'YYYY.MM.DD HH:mm',
|
||||
showTime: true,
|
||||
},
|
||||
},
|
||||
{
|
||||
label: '处理状态',
|
||||
component: 'Select',
|
||||
disabled: true,
|
||||
componentProps: {
|
||||
getPopupContainer,
|
||||
options: getDictOptions(DictEnum.alarm_state, true),
|
||||
@@ -206,16 +188,61 @@ export const modalSchema: FormSchemaGetter = () => [
|
||||
fieldName: 'state',
|
||||
rules: 'selectRequired',
|
||||
},
|
||||
{
|
||||
label: '描述',
|
||||
disabled: true,
|
||||
fieldName: 'description',
|
||||
component: 'Textarea',
|
||||
formItemClass: 'col-span-2',
|
||||
componentProps: {
|
||||
rows: 3,
|
||||
},
|
||||
},
|
||||
// 插入分割线
|
||||
{
|
||||
component: 'Divider',
|
||||
fieldName: '_divider',
|
||||
formItemClass: 'col-span-2',
|
||||
hideLabel: true,
|
||||
renderComponentContent: () => {
|
||||
return {
|
||||
default: () => h('div', '处理'),
|
||||
};
|
||||
},
|
||||
},
|
||||
|
||||
{
|
||||
label: '预期处理时间',
|
||||
fieldName: 'expectedProcessingTime',
|
||||
component: 'DatePicker',
|
||||
componentProps: {
|
||||
format: 'YYYY.MM.DD HH:mm',
|
||||
valueFormat: 'YYYY.MM.DD HH:mm',
|
||||
showTime: true,
|
||||
label: '处理人',
|
||||
fieldName: 'solveId',
|
||||
component: 'Select',
|
||||
},
|
||||
|
||||
{
|
||||
label: '联系电话',
|
||||
fieldName: 'phonenumber',
|
||||
component: 'Input',
|
||||
},
|
||||
|
||||
{
|
||||
label: '邮箱',
|
||||
fieldName: 'email',
|
||||
component: 'Input',
|
||||
},
|
||||
|
||||
{
|
||||
label: '所在部门',
|
||||
fieldName: 'deptName',
|
||||
component: 'Input',
|
||||
disabled: true,
|
||||
},
|
||||
|
||||
{
|
||||
label: '备注',
|
||||
fieldName: 'remark',
|
||||
component: 'Textarea',
|
||||
formItemClass: 'col-span-2',
|
||||
componentProps: {
|
||||
rows: 3,
|
||||
},
|
||||
rules: 'required',
|
||||
},
|
||||
];
|
||||
|
@@ -12,7 +12,6 @@ import {
|
||||
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 { alarmEventsList, alarmEventsRemove } from '#/api/sis/alarmEvents';
|
||||
import type { AlarmEventsForm } from '#/api/sis/alarmEvents/model';
|
||||
|
||||
@@ -49,6 +48,7 @@ const gridOptions: VxeGridProps = {
|
||||
return await alarmEventsList({
|
||||
pageNum: page.currentPage,
|
||||
pageSize: page.pageSize,
|
||||
state: 10,
|
||||
...formValues,
|
||||
});
|
||||
},
|
||||
@@ -75,16 +75,6 @@ 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: row });
|
||||
levelModalApi.open();
|
||||
}
|
||||
|
||||
// 查看详情
|
||||
async function handleView(row: any) {
|
||||
detailApi.setData({ id: row.id, data: row });
|
||||
@@ -97,17 +87,6 @@ async function handleEdit(row: any) {
|
||||
modalApi.open();
|
||||
}
|
||||
|
||||
// 分配处理
|
||||
function handleAssign(row: any) {
|
||||
Modal.confirm({
|
||||
title: '分配处理',
|
||||
content: `确定要分配预警 ${row.alarmId} 给处理人员吗?`,
|
||||
onOk() {
|
||||
//查询当前排班的人员信息
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
// 删除
|
||||
async function handleDelete(row: any) {
|
||||
const index = row.id;
|
||||
@@ -161,19 +140,14 @@ function handleMultiDelete() {
|
||||
>
|
||||
{{ $t('pages.common.info') }}
|
||||
</ghost-button>
|
||||
|
||||
<ghost-button
|
||||
v-access:code="['video:warning:edit']"
|
||||
@click.stop="handleEdit(row)"
|
||||
>
|
||||
{{ $t('pages.common.edit') }}
|
||||
</ghost-button>
|
||||
<ghost-button
|
||||
v-access:code="['video:warning:assign']"
|
||||
@click.stop="handleAssign(row)"
|
||||
:disabled="row.processingStatus === '已完成'"
|
||||
>
|
||||
分配处理
|
||||
处理
|
||||
</ghost-button>
|
||||
|
||||
<Popconfirm
|
||||
:get-popup-container="getVxePopupContainer"
|
||||
placement="left"
|
||||
@@ -193,7 +167,6 @@ function handleMultiDelete() {
|
||||
</BasicTable>
|
||||
<WarningModal @reload="tableApi.query()" />
|
||||
<WarningDetail />
|
||||
<LevelSettingModalComp />
|
||||
</Page>
|
||||
</template>
|
||||
<style scoped lang="scss">
|
||||
|
@@ -1,45 +0,0 @@
|
||||
<template>
|
||||
<BasicModal>
|
||||
<RadioGroup v-model:value="selectedLevel">
|
||||
<Radio value="特大">特大</Radio>
|
||||
<Radio value="重要">重要</Radio>
|
||||
<Radio value="一般">一般</Radio>
|
||||
</RadioGroup>
|
||||
</BasicModal>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { ref } from 'vue';
|
||||
import { useVbenModal } from '@vben/common-ui';
|
||||
import { RadioGroup, Radio } from 'ant-design-vue';
|
||||
|
||||
const emit = defineEmits<{ reload: [] }>();
|
||||
|
||||
const selectedLevel = ref('一般');
|
||||
|
||||
const [BasicModal, modalApi] = useVbenModal({
|
||||
class: 'w-[360px]',
|
||||
title: '设置级别',
|
||||
onOpenChange: async (isOpen) => {
|
||||
if (!isOpen) return null;
|
||||
const { level } = modalApi.getData() as { level?: string };
|
||||
selectedLevel.value = level || '一般';
|
||||
},
|
||||
onConfirm: handleConfirm,
|
||||
});
|
||||
|
||||
function handleConfirm() {
|
||||
const { id, data } = modalApi.getData() as {
|
||||
id: number | string;
|
||||
data: any[];
|
||||
};
|
||||
if (id != null && data) {
|
||||
const idx = data.findIndex((item: any) => item.id === id);
|
||||
if (idx !== -1) {
|
||||
data[idx].level = selectedLevel.value;
|
||||
}
|
||||
}
|
||||
emit('reload');
|
||||
modalApi.close();
|
||||
}
|
||||
</script>
|
@@ -1,17 +1,12 @@
|
||||
<script setup lang="ts">
|
||||
import { ref, shallowRef } from 'vue';
|
||||
import { useVbenModal } from '@vben/common-ui';
|
||||
import {
|
||||
Descriptions,
|
||||
DescriptionsItem,
|
||||
Image,
|
||||
Tag,
|
||||
Timeline,
|
||||
TimelineItem,
|
||||
} from 'ant-design-vue';
|
||||
import { Descriptions, DescriptionsItem, Image, Tag } from 'ant-design-vue';
|
||||
import { queryAlarmEventAttachmentsList } from '#/api/sis/alarmEventAttachments';
|
||||
import type { AlarmEventAttachmentsVO } from '#/api/sis/alarmEventAttachments/model';
|
||||
import { fallImg } from './data';
|
||||
import { alarmEventProcessList } from '#/api/sis/alarmEventProcess';
|
||||
import type { AlarmEventProcessVO } from '#/api/sis/alarmEventProcess/model';
|
||||
|
||||
const [BasicModal, modalApi] = useVbenModal({
|
||||
onOpenChange: handleOpenChange,
|
||||
@@ -22,23 +17,6 @@ const [BasicModal, modalApi] = useVbenModal({
|
||||
});
|
||||
|
||||
const warningDetail = shallowRef<any>(null);
|
||||
|
||||
// 时间线显示条件配置
|
||||
const timelineConfig = {
|
||||
已完成: ['已完成'],
|
||||
处理异常: ['已完成', '处理异常'],
|
||||
处理中: ['已完成', '处理中', '处理异常'],
|
||||
};
|
||||
|
||||
function showTimelineItem(type: string): boolean {
|
||||
const currentStatus = warningDetail.value?.processingStatus;
|
||||
return (
|
||||
timelineConfig[type as keyof typeof timelineConfig]?.includes(
|
||||
currentStatus,
|
||||
) || false
|
||||
);
|
||||
}
|
||||
|
||||
const currFiles = ref<AlarmEventAttachmentsVO[]>([]);
|
||||
|
||||
async function handleOpenChange(open: boolean) {
|
||||
@@ -50,15 +28,31 @@ async function handleOpenChange(open: boolean) {
|
||||
id: number | string;
|
||||
data: any[];
|
||||
};
|
||||
|
||||
// 从传递的数据中查找对应的记录
|
||||
if (data) {
|
||||
warningDetail.value = data;
|
||||
}
|
||||
// 加载事件附件信息
|
||||
currFiles.value = await queryAlarmEventAttachmentsList(id);
|
||||
// 加载处理流程
|
||||
loadProcessList();
|
||||
modalApi.modalLoading(false);
|
||||
}
|
||||
|
||||
const process = ref<AlarmEventProcessVO[]>([]);
|
||||
|
||||
function loadProcessList() {
|
||||
const data = modalApi.getData();
|
||||
const params = {
|
||||
pageNum: 1,
|
||||
pageSize: 50,
|
||||
alarmId: data.id,
|
||||
};
|
||||
alarmEventProcessList(params).then((res) => {
|
||||
const { rows = [] } = res;
|
||||
process.value = rows;
|
||||
});
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
@@ -146,41 +140,6 @@ async function handleOpenChange(open: boolean) {
|
||||
|
||||
<DescriptionsItem :span="1" label="报警视频"></DescriptionsItem>
|
||||
</Descriptions>
|
||||
|
||||
<Timeline>
|
||||
<TimelineItem v-if="warningDetail.processingStatus === '已完成'">
|
||||
<p style="display: flex">类型:已完成</p>
|
||||
<p>时间:2025-06-01 11:07:59</p>
|
||||
<p>处理人:张三</p>
|
||||
</TimelineItem>
|
||||
<TimelineItem
|
||||
v-if="
|
||||
warningDetail.processingStatus === '已完成' ||
|
||||
warningDetail.processingStatus === '处理异常'
|
||||
"
|
||||
>
|
||||
<p style="display: flex">类型:处理异常</p>
|
||||
<p>时间:2025-06-01 11:07:59</p>
|
||||
<p>处理人:张三</p>
|
||||
<p>异常原因:时长不够</p>
|
||||
</TimelineItem>
|
||||
<TimelineItem
|
||||
v-if="
|
||||
warningDetail.processingStatus === '已完成' ||
|
||||
warningDetail.processingStatus === '处理中' ||
|
||||
warningDetail.processingStatus === '处理异常'
|
||||
"
|
||||
>
|
||||
<p style="display: flex">类型:处理中</p>
|
||||
<p>时间:2025-06-01 11:07:59</p>
|
||||
<p>处理人:张三</p>
|
||||
</TimelineItem>
|
||||
<TimelineItem>
|
||||
<p style="display: flex">类型:创建预警</p>
|
||||
<p>时间:2025-06-01 11:07:59</p>
|
||||
<p>处理人:张三</p>
|
||||
</TimelineItem>
|
||||
</Timeline>
|
||||
</BasicModal>
|
||||
</template>
|
||||
|
||||
|
@@ -1,21 +1,20 @@
|
||||
<script setup lang="ts">
|
||||
import { computed, ref } from 'vue';
|
||||
import { ref } from 'vue';
|
||||
|
||||
import { useVbenModal } from '@vben/common-ui';
|
||||
import { $t } from '@vben/locales';
|
||||
import { cloneDeep } from '@vben/utils';
|
||||
|
||||
import { useVbenForm } from '#/adapter/form';
|
||||
import { defaultFormValueGetter, useBeforeCloseDiff } from '#/utils/popup';
|
||||
|
||||
import { modalSchema } from './data';
|
||||
import { queryCurrentSchedu } from '#/api/property/attendanceManagement/arrangement';
|
||||
import type { AttendanceUserGroup } from '#/api/property/attendanceManagement/arrangement/model';
|
||||
import { taskAssignment } from '#/api/sis/alarmEvents';
|
||||
|
||||
const emit = defineEmits<{ reload: [] }>();
|
||||
|
||||
const isUpdate = ref(false);
|
||||
const title = computed(() => {
|
||||
return isUpdate.value ? $t('pages.common.edit') : $t('pages.common.add');
|
||||
});
|
||||
|
||||
const [BasicForm, formApi] = useVbenForm({
|
||||
commonConfig: {
|
||||
@@ -36,7 +35,7 @@ const { onBeforeClose, markInitialized, resetInitialized } = useBeforeCloseDiff(
|
||||
currentGetter: defaultFormValueGetter(formApi),
|
||||
},
|
||||
);
|
||||
|
||||
let currentSelectData: any = null;
|
||||
const [BasicModal, modalApi] = useVbenModal({
|
||||
class: 'w-[70%]',
|
||||
fullscreenButton: false,
|
||||
@@ -52,13 +51,51 @@ const [BasicModal, modalApi] = useVbenModal({
|
||||
isUpdate.value = !!id;
|
||||
|
||||
if (isUpdate.value && id) {
|
||||
// 更新表单属性
|
||||
const userList: AttendanceUserGroup[] = await queryCurrentSchedu();
|
||||
const arr = userList.map((item) => {
|
||||
const { remoteUserVo, deptName } = item;
|
||||
return {
|
||||
label: remoteUserVo.nickName,
|
||||
value: remoteUserVo.userId,
|
||||
deptName: deptName,
|
||||
phonenumber: remoteUserVo.phonenumber,
|
||||
email: remoteUserVo.email,
|
||||
userName: remoteUserVo.userName,
|
||||
nickName: remoteUserVo.nickName,
|
||||
};
|
||||
});
|
||||
formApi.updateSchema([
|
||||
{
|
||||
componentProps: {
|
||||
options: arr,
|
||||
onChange: async (_value: any, data: any) => {
|
||||
const {
|
||||
deptName = '',
|
||||
email = '',
|
||||
phonenumber = '',
|
||||
nickName = '',
|
||||
} = data;
|
||||
const formData = cloneDeep(await formApi.getValues());
|
||||
formData.phonenumber = phonenumber;
|
||||
formData.email = email;
|
||||
formData.deptName = deptName;
|
||||
currentSelectData = data;
|
||||
formApi.setValues(formData);
|
||||
},
|
||||
},
|
||||
fieldName: 'solveId',
|
||||
},
|
||||
]);
|
||||
|
||||
// 从传递的数据中查找对应的记录
|
||||
const { data } = modalApi.getData() as {
|
||||
id: number | string;
|
||||
data: any[];
|
||||
data: any;
|
||||
};
|
||||
if (data) {
|
||||
console.log(data)
|
||||
// 处理预警上报类型
|
||||
data.alarmType = `${data.bigTypeName} - ${data.smallTypeName}`;
|
||||
await formApi.setValues(data);
|
||||
}
|
||||
}
|
||||
@@ -74,16 +111,18 @@ async function handleConfirm() {
|
||||
if (!valid) {
|
||||
return;
|
||||
}
|
||||
// 表单数据
|
||||
const formData = cloneDeep(await formApi.getValues());
|
||||
|
||||
// 更新表格数据
|
||||
const { data } = modalApi.getData() as { id: number | string; data: any[] };
|
||||
const index = data.findIndex((item: any) => item.id === formData.id);
|
||||
if (index !== -1) {
|
||||
// 更新数据
|
||||
Object.assign(data[index], formData);
|
||||
}
|
||||
|
||||
const params = {
|
||||
alarmId: formData.id,
|
||||
solveId: currentSelectData.value,
|
||||
solveName: `${currentSelectData.userName}(${currentSelectData.nickName})`,
|
||||
solvePhone: currentSelectData.phonenumber,
|
||||
solveEmail: currentSelectData.email,
|
||||
remark: formData.remark,
|
||||
};
|
||||
await taskAssignment(params);
|
||||
resetInitialized();
|
||||
emit('reload');
|
||||
modalApi.close();
|
||||
@@ -101,8 +140,8 @@ async function handleClosed() {
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<BasicModal :title="title">
|
||||
<BasicForm />
|
||||
<BasicModal title="处理">
|
||||
<BasicForm></BasicForm>
|
||||
</BasicModal>
|
||||
</template>
|
||||
<style scoped>
|
||||
|
@@ -1,8 +1,13 @@
|
||||
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';
|
||||
import { getPopupContainer } from '@vben/utils';
|
||||
import { getDictOptions } from '#/utils/dict';
|
||||
import { DictEnum } from '@vben/constants';
|
||||
import { uploadApi } from '#/api';
|
||||
|
||||
export const fallImg =
|
||||
'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMIAAADDCAYAAADQvc6UAAABRWlDQ1BJQ0MgUHJvZmlsZQAAKJFjYGASSSwoyGFhYGDIzSspCnJ3UoiIjFJgf8LAwSDCIMogwMCcmFxc4BgQ4ANUwgCjUcG3awyMIPqyLsis7PPOq3QdDFcvjV3jOD1boQVTPQrgSkktTgbSf4A4LbmgqISBgTEFyFYuLykAsTuAbJEioKOA7DkgdjqEvQHEToKwj4DVhAQ5A9k3gGyB5IxEoBmML4BsnSQk8XQkNtReEOBxcfXxUQg1Mjc0dyHgXNJBSWpFCYh2zi+oLMpMzyhRcASGUqqCZ16yno6CkYGRAQMDKMwhqj/fAIcloxgHQqxAjIHBEugw5sUIsSQpBobtQPdLciLEVJYzMPBHMDBsayhILEqEO4DxG0txmrERhM29nYGBddr//5/DGRjYNRkY/l7////39v///y4Dmn+LgeHANwDrkl1AuO+pmgAAADhlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAAqACAAQAAAABAAAAwqADAAQAAAABAAAAwwAAAAD9b/HnAAAHlklEQVR4Ae3dP3PTWBSGcbGzM6GCKqlIBRV0dHRJFarQ0eUT8LH4BnRU0NHR0UEFVdIlFRV7TzRksomPY8uykTk/zewQfKw/9znv4yvJynLv4uLiV2dBoDiBf4qP3/ARuCRABEFAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghgg0Aj8i0JO4OzsrPv69Wv+hi2qPHr0qNvf39+iI97soRIh4f3z58/u7du3SXX7Xt7Z2enevHmzfQe+oSN2apSAPj09TSrb+XKI/f379+08+A0cNRE2ANkupk+ACNPvkSPcAAEibACyXUyfABGm3yNHuAECRNgAZLuYPgEirKlHu7u7XdyytGwHAd8jjNyng4OD7vnz51dbPT8/7z58+NB9+/bt6jU/TI+AGWHEnrx48eJ/EsSmHzx40L18+fLyzxF3ZVMjEyDCiEDjMYZZS5wiPXnyZFbJaxMhQIQRGzHvWR7XCyOCXsOmiDAi1HmPMMQjDpbpEiDCiL358eNHurW/5SnWdIBbXiDCiA38/Pnzrce2YyZ4//59F3ePLNMl4PbpiL2J0L979+7yDtHDhw8vtzzvdGnEXdvUigSIsCLAWavHp/+qM0BcXMd/q25n1vF57TYBp0a3mUzilePj4+7k5KSLb6gt6ydAhPUzXnoPR0dHl79WGTNCfBnn1uvSCJdegQhLI1vvCk+fPu2ePXt2tZOYEV6/fn31dz+shwAR1sP1cqvLntbEN9MxA9xcYjsxS1jWR4AIa2Ibzx0tc44fYX/16lV6NDFLXH+YL32jwiACRBiEbf5KcXoTIsQSpzXx4N28Ja4BQoK7rgXiydbHjx/P25TaQAJEGAguWy0+2Q8PD6/Ki4R8EVl+bzBOnZY95fq9rj9zAkTI2SxdidBHqG9+skdw43borCXO/ZcJdraPWdv22uIEiLA4q7nvvCug8WTqzQveOH26fodo7g6uFe/a17W3+nFBAkRYENRdb1vkkz1CH9cPsVy/jrhr27PqMYvENYNlHAIesRiBYwRy0V+8iXP8+/fvX11Mr7L7ECueb/r48eMqm7FuI2BGWDEG8cm+7G3NEOfmdcTQw4h9/55lhm7DekRYKQPZF2ArbXTAyu4kDYB2YxUzwg0gi/41ztHnfQG26HbGel/crVrm7tNY+/1btkOEAZ2M05r4FB7r9GbAIdxaZYrHdOsgJ/wCEQY0J74TmOKnbxxT9n3FgGGWWsVdowHtjt9Nnvf7yQM2aZU/TIAIAxrw6dOnAWtZZcoEnBpNuTuObWMEiLAx1HY0ZQJEmHJ3HNvGCBBhY6jtaMoEiJB0Z29vL6ls58vxPcO8/zfrdo5qvKO+d3Fx8Wu8zf1dW4p/cPzLly/dtv9Ts/EbcvGAHhHyfBIhZ6NSiIBTo0LNNtScABFyNiqFCBChULMNNSdAhJyNSiECRCjUbEPNCRAhZ6NSiAARCjXbUHMCRMjZqBQiQIRCzTbUnAARcjYqhQgQoVCzDTUnQIScjUohAkQo1GxDzQkQIWejUogAEQo121BzAkTI2agUIkCEQs021JwAEXI2KoUIEKFQsw01J0CEnI1KIQJEKNRsQ80JECFno1KIABEKNdtQcwJEyNmoFCJAhELNNtScABFyNiqFCBChULMNNSdAhJyNSiECRCjUbEPNCRAhZ6NSiAARCjXbUHMCRMjZqBQiQIRCzTbUnAARcjYqhQgQoVCzDTUnQIScjUohAkQo1GxDzQkQIWejUogAEQo121BzAkTI2agUIkCEQs021JwAEXI2KoUIEKFQsw01J0CEnI1KIQJEKNRsQ80JECFno1KIABEKNdtQcwJEyNmoFCJAhELNNtScABFyNiqFCBChULMNNSdAhJyNSiECRCjUbEPNCRAhZ6NSiAARCjXbUHMCRMjZqBQiQIRCzTbUnAARcjYqhQgQoVCzDTUnQIScjUohAkQo1GxDzQkQIWejUogAEQo121BzAkTI2agUIkCEQs021JwAEXI2KoUIEKFQsw01J0CEnI1KIQJEKNRsQ80JECFno1KIABEKNdtQcwJEyNmoFCJAhELNNtScABFyNiqFCBChULMNNSdAhJyNSiEC/wGgKKC4YMA4TAAAAABJRU5ErkJggg==';
|
||||
|
||||
export const querySchema: FormSchemaGetter = () => [
|
||||
{
|
||||
@@ -13,56 +18,50 @@ export const querySchema: FormSchemaGetter = () => [
|
||||
{
|
||||
component: 'Select',
|
||||
componentProps: {
|
||||
options: [
|
||||
{ label: '特大', value: '特大' },
|
||||
{ label: '重要', value: '重要' },
|
||||
{ label: '一般', value: '一般' },
|
||||
],
|
||||
getPopupContainer,
|
||||
options: getDictOptions(DictEnum.alarm_level, true),
|
||||
},
|
||||
fieldName: 'level',
|
||||
label: '级别',
|
||||
},
|
||||
{
|
||||
/*{
|
||||
component: 'Select',
|
||||
componentProps: {
|
||||
options: [
|
||||
{ label: '待分配', value: '待分配' },
|
||||
{ label: '处理中', value: '处理中' },
|
||||
{ label: '已完成', value: '已完成' },
|
||||
],
|
||||
getPopupContainer,
|
||||
options: getDictOptions(DictEnum.alarm_state, true),
|
||||
},
|
||||
fieldName: 'processingStatus',
|
||||
fieldName: 'state',
|
||||
label: '处理状态',
|
||||
},
|
||||
},*/
|
||||
];
|
||||
|
||||
export const columns: VxeGridProps['columns'] = [
|
||||
{ type: 'checkbox', width: 60 },
|
||||
{
|
||||
title: '预警编号',
|
||||
field: 'alarmId',
|
||||
width: 150,
|
||||
field: 'id',
|
||||
},
|
||||
{
|
||||
title: '预警时间',
|
||||
field: 'alarmTime',
|
||||
width: 150,
|
||||
field: 'reportTime',
|
||||
},
|
||||
{
|
||||
title: '设备ip',
|
||||
field: 'deviceIp',
|
||||
},
|
||||
{
|
||||
title: '设备名称',
|
||||
field: 'deviceName',
|
||||
width: 150,
|
||||
},
|
||||
{
|
||||
title: '级别',
|
||||
field: 'level',
|
||||
width: 100,
|
||||
slots: {
|
||||
default: ({ row }: any) => {
|
||||
const levelColors: Record<string, string> = {
|
||||
特大: 'red',
|
||||
重要: 'orange',
|
||||
一般: 'blue',
|
||||
1: 'red',
|
||||
2: 'orange',
|
||||
3: 'blue',
|
||||
};
|
||||
return h(
|
||||
'span',
|
||||
@@ -72,64 +71,31 @@ export const columns: VxeGridProps['columns'] = [
|
||||
fontWeight: 'bold',
|
||||
},
|
||||
},
|
||||
row.level,
|
||||
row.levelName,
|
||||
);
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
title: '预警类型',
|
||||
field: 'alarmType',
|
||||
width: 120,
|
||||
field: 'alarmTypeName',
|
||||
slots: {
|
||||
default: ({ row }: any) => {
|
||||
return h('span', row.bigTypeName + '-' + row.smallTypeName);
|
||||
},
|
||||
{
|
||||
title: '描述',
|
||||
field: 'description',
|
||||
minWidth: 200,
|
||||
},
|
||||
{
|
||||
title: '所在位置',
|
||||
field: 'location',
|
||||
width: 150,
|
||||
},
|
||||
{
|
||||
title: '处理状态',
|
||||
field: 'processingStatus',
|
||||
width: 100,
|
||||
slots: {
|
||||
default: ({ row }: any) => {
|
||||
const statusColors: Record<string, string> = {
|
||||
待分配: 'red',
|
||||
处理中: 'orange',
|
||||
已完成: 'green',
|
||||
};
|
||||
return h(
|
||||
'span',
|
||||
{
|
||||
style: {
|
||||
color: statusColors[row.processingStatus] || '#666',
|
||||
fontWeight: 'bold',
|
||||
},
|
||||
},
|
||||
row.processingStatus,
|
||||
);
|
||||
},
|
||||
},
|
||||
field: 'stateName',
|
||||
},
|
||||
{
|
||||
title: '处理情况',
|
||||
field: 'processingDetails',
|
||||
width: 150,
|
||||
title: '创建时间',
|
||||
field: 'createTime',
|
||||
},
|
||||
{
|
||||
title: '预期处理时间',
|
||||
field: 'expectedProcessingTime',
|
||||
width: 150,
|
||||
},
|
||||
{
|
||||
title: '处理时间',
|
||||
field: 'processingTime',
|
||||
width: 150,
|
||||
title: '处理人',
|
||||
field: 'solveName',
|
||||
},
|
||||
{
|
||||
field: 'action',
|
||||
@@ -152,22 +118,22 @@ 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',
|
||||
valueFormat: 'YYYY.MM.DD HH:mm',
|
||||
showTime: true,
|
||||
},
|
||||
rules: 'required',
|
||||
disabled: true,
|
||||
rules: 'required',
|
||||
},
|
||||
{
|
||||
label: '预警类型',
|
||||
@@ -177,89 +143,146 @@ export const modalSchema: FormSchemaGetter = () => [
|
||||
disabled: true,
|
||||
},
|
||||
{
|
||||
label: '描述',
|
||||
fieldName: 'description',
|
||||
label: '设备名称',
|
||||
fieldName: 'deviceIp',
|
||||
component: 'Input',
|
||||
formItemClass: 'col-span-2',
|
||||
disabled: true,
|
||||
},
|
||||
{
|
||||
label: '所在位置',
|
||||
fieldName: 'location',
|
||||
component: 'Input',
|
||||
rules: 'required',
|
||||
disabled: true,
|
||||
},
|
||||
{
|
||||
label: '设备名称',
|
||||
fieldName: 'deviceName',
|
||||
disabled: true,
|
||||
component: 'Input',
|
||||
rules: 'required',
|
||||
disabled: true,
|
||||
},
|
||||
{
|
||||
label: '处理情况',
|
||||
fieldName: 'processingDetails',
|
||||
component: 'Input',
|
||||
label: '重要级别',
|
||||
fieldName: 'level',
|
||||
component: 'Select',
|
||||
disabled: true,
|
||||
componentProps: {
|
||||
rows: 3,
|
||||
getPopupContainer,
|
||||
options: getDictOptions(DictEnum.alarm_level, true),
|
||||
},
|
||||
formItemClass: 'col-span-2',
|
||||
disabled: true,
|
||||
rules: 'selectRequired',
|
||||
},
|
||||
{
|
||||
label: '处理时间',
|
||||
fieldName: 'processingTime',
|
||||
label: '创建时间',
|
||||
fieldName: 'createTime',
|
||||
component: 'DatePicker',
|
||||
disabled: true,
|
||||
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',
|
||||
disabled: true,
|
||||
componentProps: {
|
||||
options: [
|
||||
{ label: '待分配', value: '待分配' },
|
||||
{ label: '处理中', value: '处理中' },
|
||||
{ label: '已完成', value: '已完成' },
|
||||
],
|
||||
getPopupContainer,
|
||||
options: getDictOptions(DictEnum.alarm_state, true),
|
||||
},
|
||||
fieldName: 'state',
|
||||
rules: 'selectRequired',
|
||||
},
|
||||
{
|
||||
label: '预期处理时间',
|
||||
fieldName: 'expectedProcessingTime',
|
||||
component: 'DatePicker',
|
||||
label: '描述',
|
||||
disabled: true,
|
||||
fieldName: 'description',
|
||||
component: 'Textarea',
|
||||
formItemClass: 'col-span-2',
|
||||
componentProps: {
|
||||
format: 'YYYY.MM.DD HH:mm',
|
||||
valueFormat: 'YYYY.MM.DD HH:mm',
|
||||
showTime: true,
|
||||
rows: 3,
|
||||
},
|
||||
},
|
||||
|
||||
{
|
||||
label: '处理人',
|
||||
fieldName: 'solveName',
|
||||
component: 'Input',
|
||||
},
|
||||
{
|
||||
label: '处理人电话',
|
||||
fieldName: 'solvePhone',
|
||||
component: 'Input',
|
||||
},
|
||||
|
||||
{
|
||||
label: '处理人邮箱',
|
||||
fieldName: 'solveEmail',
|
||||
component: 'Input',
|
||||
},
|
||||
// 插入分割线
|
||||
{
|
||||
component: 'Divider',
|
||||
fieldName: '_divider',
|
||||
formItemClass: 'col-span-2',
|
||||
hideLabel: true,
|
||||
renderComponentContent: () => {
|
||||
return {
|
||||
default: () => h('div', '处理'),
|
||||
};
|
||||
},
|
||||
},
|
||||
|
||||
{
|
||||
label: '备注',
|
||||
fieldName: 'remark',
|
||||
component: 'Textarea',
|
||||
formItemClass: 'col-span-2',
|
||||
componentProps: {
|
||||
rows: 2,
|
||||
},
|
||||
},
|
||||
|
||||
{
|
||||
component: 'Upload',
|
||||
componentProps: {
|
||||
// 更多属性见:https://ant.design/components/upload-cn
|
||||
accept: '.png,.jpg,.jpeg',
|
||||
// 自动携带认证信息
|
||||
customRequest: upload_file,
|
||||
disabled: false,
|
||||
maxCount: 2,
|
||||
multiple: false,
|
||||
showUploadList: true,
|
||||
// 上传列表的内建样式,支持四种基本样式 text, picture, picture-card 和 picture-circle
|
||||
listType: 'picture-card',
|
||||
},
|
||||
fieldName: 'files',
|
||||
label: '附件',
|
||||
renderComponentContent: () => {
|
||||
return {
|
||||
default: () => '上传附件',
|
||||
};
|
||||
},
|
||||
rules: 'required',
|
||||
},
|
||||
];
|
||||
|
||||
interface UploadFileParams {
|
||||
file: File;
|
||||
onError?: (error: Error) => void;
|
||||
onProgress?: (progress: { percent: number }) => void;
|
||||
onSuccess?: (data: any, file: File) => void;
|
||||
}
|
||||
|
||||
async function upload_file({
|
||||
file,
|
||||
onError,
|
||||
onProgress,
|
||||
onSuccess,
|
||||
}: UploadFileParams) {
|
||||
try {
|
||||
onProgress?.({ percent: 0 });
|
||||
const data = await uploadApi(file);
|
||||
onProgress?.({ percent: 100 });
|
||||
onSuccess?.(data, file);
|
||||
} catch (error) {
|
||||
onError?.(error instanceof Error ? error : new Error(String(error)));
|
||||
}
|
||||
}
|
||||
|
@@ -2,76 +2,20 @@
|
||||
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 { Modal, Popconfirm, Space } from 'ant-design-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',
|
||||
},
|
||||
{
|
||||
id: 3,
|
||||
alarmId: 'JWD-3434236',
|
||||
alarmTime: '2025.07.21 10:45',
|
||||
level: '一般',
|
||||
alarmType: '设备故障',
|
||||
description: '摄像头离线',
|
||||
location: '3栋走廊',
|
||||
processingStatus: '待分配',
|
||||
processingDetails: '已修复设备',
|
||||
processingTime: '2025.07.21 11:00',
|
||||
},
|
||||
{
|
||||
id: 4,
|
||||
alarmId: 'JWD-3434236',
|
||||
alarmTime: '2025.07.21 10:45',
|
||||
level: '一般',
|
||||
alarmType: '设备故障',
|
||||
description: '摄像头离线',
|
||||
location: '3栋走廊',
|
||||
processingStatus: '待分配',
|
||||
processingDetails: '等待接受',
|
||||
processingTime: '2025.07.21 11:00',
|
||||
},
|
||||
]);
|
||||
import {alarmEventsList, alarmEventsListCurr, alarmEventsRemove} from '#/api/sis/alarmEvents';
|
||||
import type { AlarmEventsForm } from '#/api/sis/alarmEvents/model';
|
||||
|
||||
/* 搜索栏配置 */
|
||||
const formOptions: VbenFormProps = {
|
||||
commonConfig: {
|
||||
labelWidth: 100,
|
||||
@@ -83,14 +27,32 @@ const formOptions: VbenFormProps = {
|
||||
wrapperClass: 'grid-cols-1 md:grid-cols-2 lg:grid-cols-3',
|
||||
};
|
||||
|
||||
/* table栏配置 */
|
||||
const gridOptions: VxeGridProps = {
|
||||
checkboxConfig: {
|
||||
// 高亮
|
||||
highlight: true,
|
||||
// 翻页时保留选中状态
|
||||
reserve: true,
|
||||
// 点击行选中
|
||||
// trigger: 'row',
|
||||
},
|
||||
// 需要使用i18n注意这里要改成getter形式 否则切换语言不会刷新
|
||||
// columns: columns(),
|
||||
columns,
|
||||
height: 'auto',
|
||||
data: mockData.value,
|
||||
pagerConfig: {
|
||||
currentPage: 1,
|
||||
pageSize: 10,
|
||||
total: mockData.value.length,
|
||||
pagerConfig: {},
|
||||
proxyConfig: {
|
||||
ajax: {
|
||||
query: async ({ page }, formValues = {}) => {
|
||||
return await alarmEventsListCurr({
|
||||
pageNum: page.currentPage,
|
||||
pageSize: page.pageSize,
|
||||
states: [20, 30, 31, 32],
|
||||
...formValues,
|
||||
});
|
||||
},
|
||||
},
|
||||
},
|
||||
rowConfig: {
|
||||
keyField: 'id',
|
||||
@@ -104,14 +66,6 @@ const [BasicTable, tableApi] = useVbenVxeGrid({
|
||||
});
|
||||
|
||||
// 监听数据变化,强制重新渲染表格
|
||||
const tableKey = ref(0);
|
||||
watch(
|
||||
mockData,
|
||||
() => {
|
||||
tableKey.value++;
|
||||
},
|
||||
{ deep: true },
|
||||
);
|
||||
|
||||
const [WarningModal, modalApi] = useVbenModal({
|
||||
connectedComponent: warningModal,
|
||||
@@ -121,51 +75,22 @@ 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.setData({ id: row.id, data: row });
|
||||
detailApi.open();
|
||||
}
|
||||
|
||||
// 编辑
|
||||
async function handleEdit(row: any) {
|
||||
modalApi.setData({ id: row.id, data: mockData.value });
|
||||
modalApi.setData({ id: row.id, data: row });
|
||||
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);
|
||||
const index = row.id;
|
||||
if (index !== -1) {
|
||||
mockData.value.splice(index, 1);
|
||||
await tableApi.query();
|
||||
}
|
||||
}
|
||||
@@ -173,18 +98,13 @@ async function handleDelete(row: any) {
|
||||
// 批量删除
|
||||
function handleMultiDelete() {
|
||||
const rows = tableApi.grid.getCheckboxRecords();
|
||||
const ids = rows.map((row: any) => row.id);
|
||||
const ids = rows.map((row: Required<AlarmEventsForm>) => 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 alarmEventsRemove(ids);
|
||||
await tableApi.query();
|
||||
},
|
||||
});
|
||||
@@ -192,11 +112,7 @@ function handleMultiDelete() {
|
||||
</script>
|
||||
<template>
|
||||
<Page :auto-content-height="true">
|
||||
<BasicTable
|
||||
:key="tableKey"
|
||||
class="flex-1 overflow-hidden"
|
||||
table-title="视频预警处理"
|
||||
>
|
||||
<BasicTable class="flex-1 overflow-hidden" table-title="视频预警处理">
|
||||
<template #toolbar-tools>
|
||||
<Space>
|
||||
<a-button
|
||||
@@ -224,19 +140,14 @@ function handleMultiDelete() {
|
||||
>
|
||||
{{ $t('pages.common.info') }}
|
||||
</ghost-button>
|
||||
|
||||
<ghost-button
|
||||
v-access:code="['video:warning:edit']"
|
||||
@click.stop="handleEdit(row)"
|
||||
>
|
||||
{{ $t('pages.common.edit') }}
|
||||
</ghost-button>
|
||||
<ghost-button
|
||||
v-access:code="['video:warning:assign']"
|
||||
@click.stop="handleAssign(row)"
|
||||
:disabled="row.processingStatus === '已完成'"
|
||||
>
|
||||
分配处理
|
||||
处理
|
||||
</ghost-button>
|
||||
|
||||
<Popconfirm
|
||||
:get-popup-container="getVxePopupContainer"
|
||||
placement="left"
|
||||
@@ -256,7 +167,6 @@ function handleMultiDelete() {
|
||||
</BasicTable>
|
||||
<WarningModal @reload="tableApi.query()" />
|
||||
<WarningDetail />
|
||||
<LevelSettingModalComp @reload="tableKey++" />
|
||||
</Page>
|
||||
</template>
|
||||
<style scoped lang="scss">
|
||||
|
@@ -1,45 +0,0 @@
|
||||
<template>
|
||||
<BasicModal>
|
||||
<RadioGroup v-model:value="selectedLevel">
|
||||
<Radio value="特大">特大</Radio>
|
||||
<Radio value="重要">重要</Radio>
|
||||
<Radio value="一般">一般</Radio>
|
||||
</RadioGroup>
|
||||
</BasicModal>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { ref } from 'vue';
|
||||
import { useVbenModal } from '@vben/common-ui';
|
||||
import { RadioGroup, Radio } from 'ant-design-vue';
|
||||
|
||||
const emit = defineEmits<{ reload: [] }>();
|
||||
|
||||
const selectedLevel = ref('一般');
|
||||
|
||||
const [BasicModal, modalApi] = useVbenModal({
|
||||
class: 'w-[360px]',
|
||||
title: '设置级别',
|
||||
onOpenChange: async (isOpen) => {
|
||||
if (!isOpen) return null;
|
||||
const { level } = modalApi.getData() as { level?: string };
|
||||
selectedLevel.value = level || '一般';
|
||||
},
|
||||
onConfirm: handleConfirm,
|
||||
});
|
||||
|
||||
function handleConfirm() {
|
||||
const { id, data } = modalApi.getData() as {
|
||||
id: number | string;
|
||||
data: any[];
|
||||
};
|
||||
if (id != null && data) {
|
||||
const idx = data.findIndex((item: any) => item.id === id);
|
||||
if (idx !== -1) {
|
||||
data[idx].level = selectedLevel.value;
|
||||
}
|
||||
}
|
||||
emit('reload');
|
||||
modalApi.close();
|
||||
}
|
||||
</script>
|
@@ -1,22 +1,23 @@
|
||||
<script setup lang="ts">
|
||||
import { shallowRef } from 'vue';
|
||||
import { ref, shallowRef } from 'vue';
|
||||
import { useVbenModal } from '@vben/common-ui';
|
||||
import {
|
||||
Descriptions,
|
||||
DescriptionsItem,
|
||||
Tag,
|
||||
Timeline,
|
||||
TimelineItem,
|
||||
} from 'ant-design-vue';
|
||||
import { Descriptions, DescriptionsItem, Image, Tag } from 'ant-design-vue';
|
||||
import { queryAlarmEventAttachmentsList } from '#/api/sis/alarmEventAttachments';
|
||||
import type { AlarmEventAttachmentsVO } from '#/api/sis/alarmEventAttachments/model';
|
||||
import { fallImg } from './data';
|
||||
import { alarmEventProcessList } from '#/api/sis/alarmEventProcess';
|
||||
import type { AlarmEventProcessVO } from '#/api/sis/alarmEventProcess/model';
|
||||
|
||||
const [BasicModal, modalApi] = useVbenModal({
|
||||
onOpenChange: handleOpenChange,
|
||||
onClosed() {
|
||||
warningDetail.value = null;
|
||||
// warningDetail.value = null;
|
||||
modalApi.close();
|
||||
},
|
||||
});
|
||||
|
||||
const warningDetail = shallowRef<any>(null);
|
||||
const currFiles = ref<AlarmEventAttachmentsVO[]>([]);
|
||||
|
||||
async function handleOpenChange(open: boolean) {
|
||||
if (!open) {
|
||||
@@ -27,15 +28,31 @@ async function handleOpenChange(open: boolean) {
|
||||
id: number | string;
|
||||
data: any[];
|
||||
};
|
||||
|
||||
// 从传递的数据中查找对应的记录
|
||||
const record = data.find((item: any) => item.id === id);
|
||||
if (record) {
|
||||
warningDetail.value = record;
|
||||
if (data) {
|
||||
warningDetail.value = data;
|
||||
}
|
||||
|
||||
// 加载事件附件信息
|
||||
currFiles.value = await queryAlarmEventAttachmentsList(id);
|
||||
// 加载处理流程
|
||||
loadProcessList();
|
||||
modalApi.modalLoading(false);
|
||||
}
|
||||
|
||||
const process = ref<AlarmEventProcessVO[]>([]);
|
||||
|
||||
function loadProcessList() {
|
||||
const data = modalApi.getData();
|
||||
const params = {
|
||||
pageNum: 1,
|
||||
pageSize: 50,
|
||||
alarmId: data.id,
|
||||
};
|
||||
alarmEventProcessList(params).then((res) => {
|
||||
const { rows = [] } = res;
|
||||
process.value = rows;
|
||||
});
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
@@ -43,7 +60,7 @@ async function handleOpenChange(open: boolean) {
|
||||
:footer="false"
|
||||
:fullscreen-button="false"
|
||||
title="预警详情"
|
||||
class="w-[70%]"
|
||||
class="w-[60%]"
|
||||
>
|
||||
<Descriptions
|
||||
v-if="warningDetail"
|
||||
@@ -54,11 +71,13 @@ async function handleOpenChange(open: boolean) {
|
||||
style="margin-bottom: 30px"
|
||||
>
|
||||
<DescriptionsItem label="预警编号">
|
||||
{{ warningDetail.alarmId }}
|
||||
{{ warningDetail.id }}
|
||||
</DescriptionsItem>
|
||||
|
||||
<DescriptionsItem label="预警时间">
|
||||
{{ warningDetail.alarmTime }}
|
||||
{{ warningDetail.reportTime }}
|
||||
</DescriptionsItem>
|
||||
|
||||
<DescriptionsItem label="级别">
|
||||
<Tag
|
||||
:color="
|
||||
@@ -69,79 +88,66 @@ async function handleOpenChange(open: boolean) {
|
||||
: 'blue'
|
||||
"
|
||||
>
|
||||
{{ warningDetail.level }}
|
||||
{{ warningDetail.levelName }}
|
||||
</Tag>
|
||||
</DescriptionsItem>
|
||||
|
||||
<DescriptionsItem label="预警类型">
|
||||
{{ warningDetail.alarmType }}
|
||||
{{ warningDetail.bigTypeName + ' - ' + warningDetail.smallTypeName }}
|
||||
</DescriptionsItem>
|
||||
|
||||
<DescriptionsItem label="设备ip"
|
||||
>{{ warningDetail.deviceIp }}
|
||||
</DescriptionsItem>
|
||||
|
||||
<DescriptionsItem label="设备ip"
|
||||
>{{ warningDetail.deviceName }}
|
||||
</DescriptionsItem>
|
||||
|
||||
<DescriptionsItem label="描述" :span="2">
|
||||
{{ warningDetail.description }}
|
||||
</DescriptionsItem>
|
||||
|
||||
<DescriptionsItem label="所在位置">
|
||||
{{ warningDetail.location }}
|
||||
{{ warningDetail.deviceName }}
|
||||
</DescriptionsItem>
|
||||
|
||||
<DescriptionsItem label="处理状态">
|
||||
<Tag
|
||||
:color="
|
||||
warningDetail.processingStatus === '待分配'
|
||||
? 'red'
|
||||
: warningDetail.processingStatus === '处理中'
|
||||
? 'orange'
|
||||
: 'green'
|
||||
"
|
||||
>
|
||||
{{ warningDetail.processingStatus }}
|
||||
<Tag>
|
||||
{{ warningDetail.stateName }}
|
||||
</Tag>
|
||||
</DescriptionsItem>
|
||||
|
||||
<DescriptionsItem label="处理情况" :span="2">
|
||||
{{ warningDetail.processingDetails || '-' }}
|
||||
</DescriptionsItem>
|
||||
<DescriptionsItem label="处理时间">
|
||||
|
||||
<DescriptionsItem label="处理时间" :span="2">
|
||||
{{ warningDetail.processingTime || '-' }}
|
||||
</DescriptionsItem>
|
||||
<DescriptionsItem label="设备名称">
|
||||
{{ warningDetail.deviceName || '-' }}
|
||||
</DescriptionsItem>
|
||||
<DescriptionsItem
|
||||
label="预处理时间"
|
||||
v-if="warningDetail.processingStatus === '处理中'"
|
||||
>
|
||||
{{ warningDetail.expectedProcessingTime || '-' }}
|
||||
</DescriptionsItem>
|
||||
<DescriptionsItem
|
||||
label="处理图片"
|
||||
v-if="warningDetail.processingStatus === '已完成'"
|
||||
>
|
||||
<img
|
||||
:src="warningDetail.imgUrl"
|
||||
alt="处理图片"
|
||||
style="max-width: 200px; max-height: 150px"
|
||||
|
||||
<DescriptionsItem :span="1" label="附件信息">
|
||||
<div class="file-box">
|
||||
<div class="img-box" v-for="item in currFiles">
|
||||
<Image
|
||||
style="width: 120px; height: 120px"
|
||||
:src="item.imagePath"
|
||||
:fallback="fallImg"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</DescriptionsItem>
|
||||
|
||||
<DescriptionsItem :span="1" label="报警视频"></DescriptionsItem>
|
||||
</Descriptions>
|
||||
<Timeline>
|
||||
<TimelineItem>
|
||||
<p style="display: flex">类型:已完成</p>
|
||||
<p>时间:2025-06-01 11:07:59</p>
|
||||
<p>处理人:张三</p>
|
||||
</TimelineItem>
|
||||
<TimelineItem>
|
||||
<p style="display: flex">类型:处理异常</p>
|
||||
<p>时间:2025-06-01 11:07:59</p>
|
||||
<p>处理人:张三</p>
|
||||
<p>异常原因:时长不够</p>
|
||||
</TimelineItem>
|
||||
<TimelineItem>
|
||||
<p style="display: flex">类型:处理中</p>
|
||||
<p>时间:2025-06-01 11:07:59</p>
|
||||
<p>处理人:张三</p>
|
||||
</TimelineItem>
|
||||
<TimelineItem>
|
||||
<p style="display: flex">类型:创建预警</p>
|
||||
<p>时间:2025-06-01 11:07:59</p>
|
||||
<p>处理人:张三</p>
|
||||
</TimelineItem>
|
||||
</Timeline>
|
||||
</BasicModal>
|
||||
</template>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.file-box {
|
||||
.img-box {
|
||||
float: left;
|
||||
margin-left: 5px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
@@ -1,22 +1,18 @@
|
||||
<script setup lang="ts">
|
||||
import { computed, ref } from 'vue';
|
||||
import { ref } from 'vue';
|
||||
|
||||
import { useVbenModal } from '@vben/common-ui';
|
||||
import { $t } from '@vben/locales';
|
||||
import { cloneDeep } from '@vben/utils';
|
||||
|
||||
import { useVbenForm } from '#/adapter/form';
|
||||
import { defaultFormValueGetter, useBeforeCloseDiff } from '#/utils/popup';
|
||||
|
||||
import { modalSchema } from './data';
|
||||
import { alarmEventComplete } from '#/api/sis/alarmEvents';
|
||||
|
||||
const emit = defineEmits<{ reload: [] }>();
|
||||
|
||||
const isUpdate = ref(false);
|
||||
const title = computed(() => {
|
||||
return isUpdate.value ? $t('pages.common.edit') : $t('pages.common.add');
|
||||
});
|
||||
|
||||
const [BasicForm, formApi] = useVbenForm({
|
||||
commonConfig: {
|
||||
formItemClass: 'col-span-1',
|
||||
@@ -36,7 +32,7 @@ const { onBeforeClose, markInitialized, resetInitialized } = useBeforeCloseDiff(
|
||||
currentGetter: defaultFormValueGetter(formApi),
|
||||
},
|
||||
);
|
||||
|
||||
let currentSelectData: any = null;
|
||||
const [BasicModal, modalApi] = useVbenModal({
|
||||
class: 'w-[70%]',
|
||||
fullscreenButton: false,
|
||||
@@ -55,15 +51,15 @@ const [BasicModal, modalApi] = useVbenModal({
|
||||
// 从传递的数据中查找对应的记录
|
||||
const { data } = modalApi.getData() as {
|
||||
id: number | string;
|
||||
data: any[];
|
||||
data: any;
|
||||
};
|
||||
const record = data.find((item: any) => item.id === id);
|
||||
if (record) {
|
||||
await formApi.setValues(record);
|
||||
if (data) {
|
||||
// 处理预警上报类型
|
||||
data.alarmType = `${data.bigTypeName} - ${data.smallTypeName}`;
|
||||
await formApi.setValues(data);
|
||||
}
|
||||
}
|
||||
await markInitialized();
|
||||
|
||||
modalApi.modalLoading(false);
|
||||
},
|
||||
});
|
||||
@@ -75,16 +71,23 @@ async function handleConfirm() {
|
||||
if (!valid) {
|
||||
return;
|
||||
}
|
||||
// 表单数据
|
||||
const formData = cloneDeep(await formApi.getValues());
|
||||
// 处理数据
|
||||
console.log(formData);
|
||||
const { files = [] } = formData;
|
||||
const ossids: string[] = [];
|
||||
files.forEach((file: any) => {
|
||||
const ossId = file.response.ossId;
|
||||
ossids.push(ossId);
|
||||
});
|
||||
|
||||
// 更新表格数据
|
||||
const { data } = modalApi.getData() as { id: number | string; data: any[] };
|
||||
const index = data.findIndex((item: any) => item.id === formData.id);
|
||||
if (index !== -1) {
|
||||
// 更新数据
|
||||
Object.assign(data[index], formData);
|
||||
}
|
||||
|
||||
const params = {
|
||||
alarmId: formData.id,
|
||||
remark: formData.remark,
|
||||
attachments: ossids,
|
||||
};
|
||||
await alarmEventComplete(params);
|
||||
resetInitialized();
|
||||
emit('reload');
|
||||
modalApi.close();
|
||||
@@ -102,8 +105,8 @@ async function handleClosed() {
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<BasicModal :title="title">
|
||||
<BasicForm />
|
||||
<BasicModal title="处理">
|
||||
<BasicForm></BasicForm>
|
||||
</BasicModal>
|
||||
</template>
|
||||
<style scoped>
|
||||
|
@@ -27,8 +27,8 @@ export default defineConfig(async () => {
|
||||
changeOrigin: true,
|
||||
rewrite: (path) => path.replace(/^\/api/, ''),
|
||||
// mock代理目标地址
|
||||
// target: 'http://127.0.0.1:8080',
|
||||
target: 'http://183.230.235.66:11010/api',
|
||||
target: 'http://127.0.0.1:8080',
|
||||
// target: 'http://183.230.235.66:11010/api',
|
||||
ws: true,
|
||||
},
|
||||
},
|
||||
|
Reference in New Issue
Block a user