Merge branch 'master' of http://47.109.37.87:3000/by2025/admin-vben5
Some checks are pending
Gitea Actions Demo / Explore-Gitea-Actions (push) Waiting to run
Some checks are pending
Gitea Actions Demo / Explore-Gitea-Actions (push) Waiting to run
This commit is contained in:
@@ -1,4 +1,7 @@
|
|||||||
import type { PageQuery, BaseEntity } from '#/api/common';
|
import type { PageQuery, BaseEntity } from '#/api/common';
|
||||||
|
import type {
|
||||||
|
QuestionItemForm
|
||||||
|
} from "#/api/property/customerService/questionnaire/questionItem/model";
|
||||||
|
|
||||||
export interface QuestionVO {
|
export interface QuestionVO {
|
||||||
/**
|
/**
|
||||||
@@ -57,7 +60,7 @@ export interface QuestionForm extends BaseEntity {
|
|||||||
/**
|
/**
|
||||||
* 问题类型(1单行文本2多行文本3单选题4多选题5评分题6日期选择)
|
* 问题类型(1单行文本2多行文本3单选题4多选题5评分题6日期选择)
|
||||||
*/
|
*/
|
||||||
type?: string;
|
type: string;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 是否必填(1不必填2必填)
|
* 是否必填(1不必填2必填)
|
||||||
@@ -74,6 +77,21 @@ export interface QuestionForm extends BaseEntity {
|
|||||||
*/
|
*/
|
||||||
sort?: number;
|
sort?: number;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 选项
|
||||||
|
*/
|
||||||
|
questionnaireQuestionItems:QuestionItemForm[]
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 评分预览
|
||||||
|
*/
|
||||||
|
rate?:number;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 时间预览
|
||||||
|
*/
|
||||||
|
dateTime?:string;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface QuestionQuery extends PageQuery {
|
export interface QuestionQuery extends PageQuery {
|
@@ -1,4 +1,5 @@
|
|||||||
import type { PageQuery, BaseEntity } from '#/api/common';
|
import type { PageQuery, BaseEntity } from '#/api/common';
|
||||||
|
import type {QuestionForm} from "#/api/property/customerService/questionnaire/question/model";
|
||||||
|
|
||||||
export interface QuestionnaireVO {
|
export interface QuestionnaireVO {
|
||||||
/**
|
/**
|
||||||
@@ -74,6 +75,11 @@ export interface QuestionnaireForm extends BaseEntity {
|
|||||||
*/
|
*/
|
||||||
status?: string;
|
status?: string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 问题
|
||||||
|
*/
|
||||||
|
questionnaireQuestions:QuestionForm[];
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface QuestionnaireQuery extends PageQuery {
|
export interface QuestionnaireQuery extends PageQuery {
|
61
apps/web-antd/src/api/sis/alarmEventAttachments/index.ts
Normal file
61
apps/web-antd/src/api/sis/alarmEventAttachments/index.ts
Normal file
@@ -0,0 +1,61 @@
|
|||||||
|
import type { AlarmEventAttachmentsVO, AlarmEventAttachmentsForm, AlarmEventAttachmentsQuery } 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 alarmEventAttachmentsList(params?: AlarmEventAttachmentsQuery) {
|
||||||
|
return requestClient.get<PageResult<AlarmEventAttachmentsVO>>('/sis/alarmEventAttachments/list', { params });
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出【请填写功能名称】列表
|
||||||
|
* @param params
|
||||||
|
* @returns 【请填写功能名称】列表
|
||||||
|
*/
|
||||||
|
export function alarmEventAttachmentsExport(params?: AlarmEventAttachmentsQuery) {
|
||||||
|
return commonExport('/sis/alarmEventAttachments/export', params ?? {});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询【请填写功能名称】详情
|
||||||
|
* @param id id
|
||||||
|
* @returns 【请填写功能名称】详情
|
||||||
|
*/
|
||||||
|
export function alarmEventAttachmentsInfo(id: ID) {
|
||||||
|
return requestClient.get<AlarmEventAttachmentsVO>(`/sis/alarmEventAttachments/${id}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增【请填写功能名称】
|
||||||
|
* @param data
|
||||||
|
* @returns void
|
||||||
|
*/
|
||||||
|
export function alarmEventAttachmentsAdd(data: AlarmEventAttachmentsForm) {
|
||||||
|
return requestClient.postWithMsg<void>('/sis/alarmEventAttachments', data);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新【请填写功能名称】
|
||||||
|
* @param data
|
||||||
|
* @returns void
|
||||||
|
*/
|
||||||
|
export function alarmEventAttachmentsUpdate(data: AlarmEventAttachmentsForm) {
|
||||||
|
return requestClient.putWithMsg<void>('/sis/alarmEventAttachments', data);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除【请填写功能名称】
|
||||||
|
* @param id id
|
||||||
|
* @returns void
|
||||||
|
*/
|
||||||
|
export function alarmEventAttachmentsRemove(id: ID | IDS) {
|
||||||
|
return requestClient.deleteWithMsg<void>(`/sis/alarmEventAttachments/${id}`);
|
||||||
|
}
|
69
apps/web-antd/src/api/sis/alarmEventAttachments/model.d.ts
vendored
Normal file
69
apps/web-antd/src/api/sis/alarmEventAttachments/model.d.ts
vendored
Normal file
@@ -0,0 +1,69 @@
|
|||||||
|
import type { PageQuery, BaseEntity } from '#/api/common';
|
||||||
|
|
||||||
|
export interface AlarmEventAttachmentsVO {
|
||||||
|
/**
|
||||||
|
* 主键id
|
||||||
|
*/
|
||||||
|
id: string | number;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 事件id
|
||||||
|
*/
|
||||||
|
eventId: string | number;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 时间图片id
|
||||||
|
*/
|
||||||
|
ossId: string | number;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 1:图片,2:文件;3视频
|
||||||
|
*/
|
||||||
|
type: number;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface AlarmEventAttachmentsForm extends BaseEntity {
|
||||||
|
/**
|
||||||
|
* 主键id
|
||||||
|
*/
|
||||||
|
id?: string | number;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 事件id
|
||||||
|
*/
|
||||||
|
eventId?: string | number;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 时间图片id
|
||||||
|
*/
|
||||||
|
ossId?: string | number;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 1:图片,2:文件;3视频
|
||||||
|
*/
|
||||||
|
type?: number;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface AlarmEventAttachmentsQuery extends PageQuery {
|
||||||
|
/**
|
||||||
|
* 事件id
|
||||||
|
*/
|
||||||
|
eventId?: string | number;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 时间图片id
|
||||||
|
*/
|
||||||
|
ossId?: string | number;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 1:图片,2:文件;3视频
|
||||||
|
*/
|
||||||
|
type?: number;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 日期范围参数
|
||||||
|
*/
|
||||||
|
params?: any;
|
||||||
|
}
|
61
apps/web-antd/src/api/sis/alarmEvents/index.ts
Normal file
61
apps/web-antd/src/api/sis/alarmEvents/index.ts
Normal file
@@ -0,0 +1,61 @@
|
|||||||
|
import type { AlarmEventsVO, AlarmEventsForm, AlarmEventsQuery } 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 alarmEventsList(params?: AlarmEventsQuery) {
|
||||||
|
return requestClient.get<PageResult<AlarmEventsVO>>('/sis/alarmEvents/list', { params });
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出【请填写功能名称】列表
|
||||||
|
* @param params
|
||||||
|
* @returns 【请填写功能名称】列表
|
||||||
|
*/
|
||||||
|
export function alarmEventsExport(params?: AlarmEventsQuery) {
|
||||||
|
return commonExport('/sis/alarmEvents/export', params ?? {});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询【请填写功能名称】详情
|
||||||
|
* @param id id
|
||||||
|
* @returns 【请填写功能名称】详情
|
||||||
|
*/
|
||||||
|
export function alarmEventsInfo(id: ID) {
|
||||||
|
return requestClient.get<AlarmEventsVO>(`/sis/alarmEvents/${id}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增【请填写功能名称】
|
||||||
|
* @param data
|
||||||
|
* @returns void
|
||||||
|
*/
|
||||||
|
export function alarmEventsAdd(data: AlarmEventsForm) {
|
||||||
|
return requestClient.postWithMsg<void>('/sis/alarmEvents', data);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新【请填写功能名称】
|
||||||
|
* @param data
|
||||||
|
* @returns void
|
||||||
|
*/
|
||||||
|
export function alarmEventsUpdate(data: AlarmEventsForm) {
|
||||||
|
return requestClient.putWithMsg<void>('/sis/alarmEvents', data);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除【请填写功能名称】
|
||||||
|
* @param id id
|
||||||
|
* @returns void
|
||||||
|
*/
|
||||||
|
export function alarmEventsRemove(id: ID | IDS) {
|
||||||
|
return requestClient.deleteWithMsg<void>(`/sis/alarmEvents/${id}`);
|
||||||
|
}
|
159
apps/web-antd/src/api/sis/alarmEvents/model.d.ts
vendored
Normal file
159
apps/web-antd/src/api/sis/alarmEvents/model.d.ts
vendored
Normal file
@@ -0,0 +1,159 @@
|
|||||||
|
import type { PageQuery, BaseEntity } from '#/api/common';
|
||||||
|
|
||||||
|
export interface AlarmEventsVO {
|
||||||
|
/**
|
||||||
|
* 报警记录ID
|
||||||
|
*/
|
||||||
|
id: string | number;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 报警事件类型
|
||||||
|
*/
|
||||||
|
type: number;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 报警记录级别(1:一般,2:中级,3:紧急)
|
||||||
|
*/
|
||||||
|
level: number;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 报警设备ip
|
||||||
|
*/
|
||||||
|
deviceIp: string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 报警设备名称
|
||||||
|
*/
|
||||||
|
deviceName: string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设备所属区域id
|
||||||
|
*/
|
||||||
|
deviceGroupId: string | number;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设备所属区域名称
|
||||||
|
*/
|
||||||
|
deviceGroupName: string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设备告警时间
|
||||||
|
*/
|
||||||
|
reportTime: string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 1:未处理,2:已处理-忽略,3:已处理-生成工单
|
||||||
|
*/
|
||||||
|
state: number;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 工单id,需要state=3才会写入
|
||||||
|
*/
|
||||||
|
workOrderId: string | number;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface AlarmEventsForm extends BaseEntity {
|
||||||
|
/**
|
||||||
|
* 报警记录ID
|
||||||
|
*/
|
||||||
|
id?: string | number;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 报警事件类型
|
||||||
|
*/
|
||||||
|
type?: number;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 报警记录级别(1:一般,2:中级,3:紧急)
|
||||||
|
*/
|
||||||
|
level?: number;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 报警设备ip
|
||||||
|
*/
|
||||||
|
deviceIp?: string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 报警设备名称
|
||||||
|
*/
|
||||||
|
deviceName?: string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设备所属区域id
|
||||||
|
*/
|
||||||
|
deviceGroupId?: string | number;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设备所属区域名称
|
||||||
|
*/
|
||||||
|
deviceGroupName?: string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设备告警时间
|
||||||
|
*/
|
||||||
|
reportTime?: string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 1:未处理,2:已处理-忽略,3:已处理-生成工单
|
||||||
|
*/
|
||||||
|
state?: number;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 工单id,需要state=3才会写入
|
||||||
|
*/
|
||||||
|
workOrderId?: string | number;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface AlarmEventsQuery extends PageQuery {
|
||||||
|
/**
|
||||||
|
* 报警事件类型
|
||||||
|
*/
|
||||||
|
type?: number;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 报警记录级别(1:一般,2:中级,3:紧急)
|
||||||
|
*/
|
||||||
|
level?: number;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 报警设备ip
|
||||||
|
*/
|
||||||
|
deviceIp?: string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 报警设备名称
|
||||||
|
*/
|
||||||
|
deviceName?: string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设备所属区域id
|
||||||
|
*/
|
||||||
|
deviceGroupId?: string | number;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设备所属区域名称
|
||||||
|
*/
|
||||||
|
deviceGroupName?: string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设备告警时间
|
||||||
|
*/
|
||||||
|
reportTime?: string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 1:未处理,2:已处理-忽略,3:已处理-生成工单
|
||||||
|
*/
|
||||||
|
state?: number;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 工单id,需要state=3才会写入
|
||||||
|
*/
|
||||||
|
workOrderId?: string | number;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 日期范围参数
|
||||||
|
*/
|
||||||
|
params?: any;
|
||||||
|
}
|
@@ -291,7 +291,8 @@ function streamProxy(nodeData: any, cb: Function) {
|
|||||||
if (isSupportH265) {
|
if (isSupportH265) {
|
||||||
addStreamProxy(params).then((res) => cb(res));
|
addStreamProxy(params).then((res) => cb(res));
|
||||||
} else {
|
} else {
|
||||||
addFFmpegStreamProxy(params).then((res) => cb(res));
|
// addFFmpegStreamProxy(params).then((res) => cb(res));
|
||||||
|
addStreamProxy(params).then((res) => cb(res));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -1,8 +1,9 @@
|
|||||||
import type { FormSchemaGetter } from '#/adapter/form';
|
import type { FormSchemaGetter } from '#/adapter/form';
|
||||||
import type { VxeGridProps } from '#/adapter/vxe-table';
|
import type { VxeGridProps } from '#/adapter/vxe-table';
|
||||||
import { getDictOptions } from '#/utils/dict';
|
|
||||||
import { renderDict } from '#/utils/render';
|
|
||||||
import { h } from 'vue';
|
import { h } from 'vue';
|
||||||
|
import { getPopupContainer } from '@vben/utils';
|
||||||
|
import { getDictOptions } from '#/utils/dict';
|
||||||
|
import { DictEnum } from '@vben/constants';
|
||||||
|
|
||||||
export const querySchema: FormSchemaGetter = () => [
|
export const querySchema: FormSchemaGetter = () => [
|
||||||
{
|
{
|
||||||
@@ -13,11 +14,8 @@ export const querySchema: FormSchemaGetter = () => [
|
|||||||
{
|
{
|
||||||
component: 'Select',
|
component: 'Select',
|
||||||
componentProps: {
|
componentProps: {
|
||||||
options: [
|
getPopupContainer,
|
||||||
{ label: '特大', value: '特大' },
|
options: getDictOptions(DictEnum.alarm_level),
|
||||||
{ label: '重要', value: '重要' },
|
|
||||||
{ label: '一般', value: '一般' },
|
|
||||||
],
|
|
||||||
},
|
},
|
||||||
fieldName: 'level',
|
fieldName: 'level',
|
||||||
label: '级别',
|
label: '级别',
|
||||||
@@ -25,13 +23,10 @@ export const querySchema: FormSchemaGetter = () => [
|
|||||||
{
|
{
|
||||||
component: 'Select',
|
component: 'Select',
|
||||||
componentProps: {
|
componentProps: {
|
||||||
options: [
|
getPopupContainer,
|
||||||
{ label: '待分配', value: '待分配' },
|
options: getDictOptions(DictEnum.alarm_state),
|
||||||
{ label: '处理中', value: '处理中' },
|
|
||||||
{ label: '已完成', value: '已完成' },
|
|
||||||
],
|
|
||||||
},
|
},
|
||||||
fieldName: 'processingStatus',
|
fieldName: 'state',
|
||||||
label: '处理状态',
|
label: '处理状态',
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
@@ -40,29 +35,25 @@ export const columns: VxeGridProps['columns'] = [
|
|||||||
{ type: 'checkbox', width: 60 },
|
{ type: 'checkbox', width: 60 },
|
||||||
{
|
{
|
||||||
title: '预警编号',
|
title: '预警编号',
|
||||||
field: 'alarmId',
|
field: 'id',
|
||||||
width: 150,
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '预警时间',
|
title: '预警时间',
|
||||||
field: 'alarmTime',
|
field: 'reportTime',
|
||||||
width: 150,
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '设备名称',
|
title: '设备名称',
|
||||||
field: 'deviceName',
|
field: 'deviceName',
|
||||||
width: 150,
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '级别',
|
title: '级别',
|
||||||
field: 'level',
|
field: 'level',
|
||||||
width: 100,
|
|
||||||
slots: {
|
slots: {
|
||||||
default: ({ row }: any) => {
|
default: ({ row }: any) => {
|
||||||
const levelColors: Record<string, string> = {
|
const levelColors: Record<string, string> = {
|
||||||
特大: 'red',
|
1: 'red',
|
||||||
重要: 'orange',
|
2: 'orange',
|
||||||
一般: 'blue',
|
3: 'blue',
|
||||||
};
|
};
|
||||||
return h(
|
return h(
|
||||||
'span',
|
'span',
|
||||||
@@ -72,64 +63,31 @@ export const columns: VxeGridProps['columns'] = [
|
|||||||
fontWeight: 'bold',
|
fontWeight: 'bold',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
row.level,
|
row.levelName,
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '预警类型',
|
title: '预警类型',
|
||||||
field: 'alarmType',
|
field: 'alarmTypeName',
|
||||||
width: 120,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '描述',
|
|
||||||
field: 'description',
|
|
||||||
minWidth: 200,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '所在位置',
|
|
||||||
field: 'location',
|
|
||||||
width: 150,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '处理状态',
|
|
||||||
field: 'processingStatus',
|
|
||||||
width: 100,
|
|
||||||
slots: {
|
slots: {
|
||||||
default: ({ row }: any) => {
|
default: ({ row }: any) => {
|
||||||
const statusColors: Record<string, string> = {
|
return h('span', row.bigTypeName + '-' + row.smallTypeName);
|
||||||
待分配: 'red',
|
|
||||||
处理中: 'orange',
|
|
||||||
已完成: 'green',
|
|
||||||
};
|
|
||||||
return h(
|
|
||||||
'span',
|
|
||||||
{
|
|
||||||
style: {
|
|
||||||
color: statusColors[row.processingStatus] || '#666',
|
|
||||||
fontWeight: 'bold',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
row.processingStatus,
|
|
||||||
);
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '处理情况',
|
title: '处理状态',
|
||||||
field: 'processingDetails',
|
field: 'stateName',
|
||||||
width: 150,
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '预期处理时间',
|
title: '预期处理时间',
|
||||||
field: 'expectedProcessingTime',
|
field: 'processSt',
|
||||||
width: 150,
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '处理时间',
|
title: '处理时间',
|
||||||
field: 'processingTime',
|
field: 'processEt',
|
||||||
width: 150,
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'action',
|
field: 'action',
|
||||||
|
@@ -2,69 +2,21 @@
|
|||||||
import { Page, useVbenModal, type VbenFormProps } from '@vben/common-ui';
|
import { Page, useVbenModal, type VbenFormProps } from '@vben/common-ui';
|
||||||
import { getVxePopupContainer } from '@vben/utils';
|
import { getVxePopupContainer } from '@vben/utils';
|
||||||
|
|
||||||
import { Modal, Popconfirm, Space, Tag } from 'ant-design-vue';
|
import { Modal, Popconfirm, Space } from 'ant-design-vue';
|
||||||
import { ref, watch } from 'vue';
|
|
||||||
|
|
||||||
import {
|
import {
|
||||||
useVbenVxeGrid,
|
useVbenVxeGrid,
|
||||||
vxeCheckboxChecked,
|
vxeCheckboxChecked,
|
||||||
type VxeGridProps,
|
type VxeGridProps,
|
||||||
} from '#/adapter/vxe-table';
|
} from '#/adapter/vxe-table';
|
||||||
|
|
||||||
import { commonDownloadExcel } from '#/utils/file/download';
|
|
||||||
import { renderDict } from '#/utils/render';
|
|
||||||
|
|
||||||
import { columns, querySchema } from './data';
|
import { columns, querySchema } from './data';
|
||||||
import warningModal from './warning-modal.vue';
|
import warningModal from './warning-modal.vue';
|
||||||
import warningDetail from './warning-detail.vue';
|
import warningDetail from './warning-detail.vue';
|
||||||
import LevelSettingModal from './level-setting-modal.vue';
|
import LevelSettingModal from './level-setting-modal.vue';
|
||||||
import imgPng from '../../../../assets/algorithmManagement/image.png';
|
import { alarmEventsList, alarmEventsRemove } from '#/api/sis/alarmEvents';
|
||||||
|
import type { AlarmEventsForm } from '#/api/sis/alarmEvents/model';
|
||||||
// 假数据
|
|
||||||
const mockData = ref([
|
|
||||||
{
|
|
||||||
id: 1,
|
|
||||||
alarmId: 'JWD-3434234',
|
|
||||||
alarmTime: '2025.07.21 12:20',
|
|
||||||
level: '特大',
|
|
||||||
alarmType: '越界侦测',
|
|
||||||
description: '温度高于80度发生火宅',
|
|
||||||
location: '1栋3号电梯旁',
|
|
||||||
processingStatus: '待分配',
|
|
||||||
processingDetails: '',
|
|
||||||
processingTime: '',
|
|
||||||
deviceName: '监控设备',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: 2,
|
|
||||||
alarmId: 'JWD-3434235',
|
|
||||||
alarmTime: '2025.07.21 11:15',
|
|
||||||
level: '重要',
|
|
||||||
alarmType: '异常行为',
|
|
||||||
description: '人员异常聚集',
|
|
||||||
location: '2栋大厅',
|
|
||||||
processingStatus: '处理中',
|
|
||||||
processingDetails: '已派人员前往处理',
|
|
||||||
processingTime: '2025.07.21 11:30',
|
|
||||||
expectedProcessingTime: '2025.07.21 11:30',
|
|
||||||
deviceName: '门禁设备',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
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,
|
|
||||||
deviceName: '消防设备',
|
|
||||||
},
|
|
||||||
]);
|
|
||||||
|
|
||||||
|
/* 搜索栏配置 */
|
||||||
const formOptions: VbenFormProps = {
|
const formOptions: VbenFormProps = {
|
||||||
commonConfig: {
|
commonConfig: {
|
||||||
labelWidth: 100,
|
labelWidth: 100,
|
||||||
@@ -76,14 +28,31 @@ const formOptions: VbenFormProps = {
|
|||||||
wrapperClass: 'grid-cols-1 md:grid-cols-2 lg:grid-cols-3',
|
wrapperClass: 'grid-cols-1 md:grid-cols-2 lg:grid-cols-3',
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/* table栏配置 */
|
||||||
const gridOptions: VxeGridProps = {
|
const gridOptions: VxeGridProps = {
|
||||||
|
checkboxConfig: {
|
||||||
|
// 高亮
|
||||||
|
highlight: true,
|
||||||
|
// 翻页时保留选中状态
|
||||||
|
reserve: true,
|
||||||
|
// 点击行选中
|
||||||
|
// trigger: 'row',
|
||||||
|
},
|
||||||
|
// 需要使用i18n注意这里要改成getter形式 否则切换语言不会刷新
|
||||||
|
// columns: columns(),
|
||||||
columns,
|
columns,
|
||||||
height: 'auto',
|
height: 'auto',
|
||||||
data: mockData.value,
|
pagerConfig: {},
|
||||||
pagerConfig: {
|
proxyConfig: {
|
||||||
currentPage: 1,
|
ajax: {
|
||||||
pageSize: 10,
|
query: async ({ page }, formValues = {}) => {
|
||||||
total: mockData.value.length,
|
return await alarmEventsList({
|
||||||
|
pageNum: page.currentPage,
|
||||||
|
pageSize: page.pageSize,
|
||||||
|
...formValues,
|
||||||
|
});
|
||||||
|
},
|
||||||
|
},
|
||||||
},
|
},
|
||||||
rowConfig: {
|
rowConfig: {
|
||||||
keyField: 'id',
|
keyField: 'id',
|
||||||
@@ -97,14 +66,6 @@ const [BasicTable, tableApi] = useVbenVxeGrid({
|
|||||||
});
|
});
|
||||||
|
|
||||||
// 监听数据变化,强制重新渲染表格
|
// 监听数据变化,强制重新渲染表格
|
||||||
const tableKey = ref(0);
|
|
||||||
watch(
|
|
||||||
mockData,
|
|
||||||
() => {
|
|
||||||
tableKey.value++;
|
|
||||||
},
|
|
||||||
{ deep: true },
|
|
||||||
);
|
|
||||||
|
|
||||||
const [WarningModal, modalApi] = useVbenModal({
|
const [WarningModal, modalApi] = useVbenModal({
|
||||||
connectedComponent: warningModal,
|
connectedComponent: warningModal,
|
||||||
@@ -120,19 +81,19 @@ const [LevelSettingModalComp, levelModalApi] = useVbenModal({
|
|||||||
|
|
||||||
// 级别设置
|
// 级别设置
|
||||||
function handleLevelSetting(row: any) {
|
function handleLevelSetting(row: any) {
|
||||||
levelModalApi.setData({ id: row.id, level: row.level, data: mockData.value });
|
levelModalApi.setData({ id: row.id, level: row.level, data: row });
|
||||||
levelModalApi.open();
|
levelModalApi.open();
|
||||||
}
|
}
|
||||||
|
|
||||||
// 查看详情
|
// 查看详情
|
||||||
async function handleView(row: any) {
|
async function handleView(row: any) {
|
||||||
detailApi.setData({ id: row.id, data: mockData.value });
|
detailApi.setData({ id: row.id, data: row });
|
||||||
detailApi.open();
|
detailApi.open();
|
||||||
}
|
}
|
||||||
|
|
||||||
// 编辑
|
// 编辑
|
||||||
async function handleEdit(row: any) {
|
async function handleEdit(row: any) {
|
||||||
modalApi.setData({ id: row.id, data: mockData.value });
|
modalApi.setData({ id: row.id, data: row });
|
||||||
modalApi.open();
|
modalApi.open();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -143,7 +104,7 @@ function handleAssign(row: any) {
|
|||||||
content: `确定要分配预警 ${row.alarmId} 给处理人员吗?`,
|
content: `确定要分配预警 ${row.alarmId} 给处理人员吗?`,
|
||||||
onOk() {
|
onOk() {
|
||||||
// 模拟分配处理
|
// 模拟分配处理
|
||||||
const index = mockData.value.findIndex((item: any) => item.id === row.id);
|
const index = row.id;
|
||||||
if (index !== -1) {
|
if (index !== -1) {
|
||||||
// mockData.value[index].processingStatus = '处理中';
|
// mockData.value[index].processingStatus = '处理中';
|
||||||
// mockData.value[index].processingDetails = '已分配给处理人员';
|
// mockData.value[index].processingDetails = '已分配给处理人员';
|
||||||
@@ -156,9 +117,8 @@ function handleAssign(row: any) {
|
|||||||
|
|
||||||
// 删除
|
// 删除
|
||||||
async function handleDelete(row: any) {
|
async function handleDelete(row: any) {
|
||||||
const index = mockData.value.findIndex((item: any) => item.id === row.id);
|
const index = row.id;
|
||||||
if (index !== -1) {
|
if (index !== -1) {
|
||||||
mockData.value.splice(index, 1);
|
|
||||||
await tableApi.query();
|
await tableApi.query();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -166,18 +126,13 @@ async function handleDelete(row: any) {
|
|||||||
// 批量删除
|
// 批量删除
|
||||||
function handleMultiDelete() {
|
function handleMultiDelete() {
|
||||||
const rows = tableApi.grid.getCheckboxRecords();
|
const rows = tableApi.grid.getCheckboxRecords();
|
||||||
const ids = rows.map((row: any) => row.id);
|
const ids = rows.map((row: Required<AlarmEventsForm>) => row.id);
|
||||||
Modal.confirm({
|
Modal.confirm({
|
||||||
title: '提示',
|
title: '提示',
|
||||||
okType: 'danger',
|
okType: 'danger',
|
||||||
content: `确认删除选中的${ids.length}条记录吗?`,
|
content: `确认删除选中的${ids.length}条记录吗?`,
|
||||||
onOk: async () => {
|
onOk: async () => {
|
||||||
ids.forEach((id) => {
|
await alarmEventsRemove(ids);
|
||||||
const index = mockData.value.findIndex((item: any) => item.id === id);
|
|
||||||
if (index !== -1) {
|
|
||||||
mockData.value.splice(index, 1);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
await tableApi.query();
|
await tableApi.query();
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
@@ -185,11 +140,7 @@ function handleMultiDelete() {
|
|||||||
</script>
|
</script>
|
||||||
<template>
|
<template>
|
||||||
<Page :auto-content-height="true">
|
<Page :auto-content-height="true">
|
||||||
<BasicTable
|
<BasicTable class="flex-1 overflow-hidden" table-title="视频预警处理">
|
||||||
:key="tableKey"
|
|
||||||
class="flex-1 overflow-hidden"
|
|
||||||
table-title="视频预警处理"
|
|
||||||
>
|
|
||||||
<template #toolbar-tools>
|
<template #toolbar-tools>
|
||||||
<Space>
|
<Space>
|
||||||
<a-button
|
<a-button
|
||||||
@@ -249,7 +200,7 @@ function handleMultiDelete() {
|
|||||||
</BasicTable>
|
</BasicTable>
|
||||||
<WarningModal @reload="tableApi.query()" />
|
<WarningModal @reload="tableApi.query()" />
|
||||||
<WarningDetail />
|
<WarningDetail />
|
||||||
<LevelSettingModalComp @reload="tableKey++" />
|
<LevelSettingModalComp />
|
||||||
</Page>
|
</Page>
|
||||||
</template>
|
</template>
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
|
@@ -26,6 +26,13 @@ export const DictEnum = {
|
|||||||
SIS_ACCESS_CONTROL_DEVICE_TYPE: 'sis_access_control_device_type',
|
SIS_ACCESS_CONTROL_DEVICE_TYPE: 'sis_access_control_device_type',
|
||||||
SIS_LIB_TYPE: 'sis_lib_type',
|
SIS_LIB_TYPE: 'sis_lib_type',
|
||||||
WY_ZCSHZT: 'wy_zcshzt',
|
WY_ZCSHZT: 'wy_zcshzt',
|
||||||
|
|
||||||
|
// 事件上报字典key
|
||||||
|
alarm_state: "alarm_state",
|
||||||
|
alarm_level: "alarm_level",
|
||||||
|
event_big_type: "event_big_type",
|
||||||
|
event_small_type: "event_small_type",
|
||||||
|
|
||||||
} as const;
|
} as const;
|
||||||
|
|
||||||
export type DictEnumKey = keyof typeof DictEnum;
|
export type DictEnumKey = keyof typeof DictEnum;
|
||||||
|
Reference in New Issue
Block a user