This commit is contained in:
2025-06-25 18:50:39 +08:00
11 changed files with 785 additions and 43 deletions

View File

@ -0,0 +1,63 @@
import request from '@/utils/request';
import { AxiosPromise } from 'axios';
import { RecognizeRecordVO, RecognizeRecordForm, RecognizeRecordQuery } from '@/api/safety/recognizeRecord/types';
/**
* 查询识别记录列表
* @param query
* @returns {*}
*/
export const listRecognizeRecord = (query?: RecognizeRecordQuery): AxiosPromise<RecognizeRecordVO[]> => {
return request({
url: '/safety/recognizeRecord/list',
method: 'get',
params: query
});
};
/**
* 查询识别记录详细
* @param id
*/
export const getRecognizeRecord = (id: string | number): AxiosPromise<RecognizeRecordVO> => {
return request({
url: '/safety/recognizeRecord/' + id,
method: 'get'
});
};
/**
* 新增识别记录
* @param data
*/
export const addRecognizeRecord = (data: RecognizeRecordForm) => {
return request({
url: '/safety/recognizeRecord',
method: 'post',
data: data
});
};
/**
* 修改识别记录
* @param data
*/
export const updateRecognizeRecord = (data: RecognizeRecordForm) => {
return request({
url: '/safety/recognizeRecord',
method: 'put',
data: data
});
};
/**
* 删除识别记录
* @param id
*/
export const delRecognizeRecord = (id: string | number | Array<string | number>) => {
return request({
url: '/safety/recognizeRecord/' + id,
method: 'delete'
});
};

View File

@ -0,0 +1,123 @@
export interface RecognizeRecordVO {
id: any;
/**
* 设备名称
*/
deviceName: string;
/**
* 识别类别1无人机识别 2监控拍摄
*/
recordCategory: string;
/**
* 违章类型(多个逗号分隔)
*/
violationType: string;
/**
* 图片路径
*/
picture: string;
/**
* 图片路径Url
*/
pictureUrl: string;
/**
* 故障描述
*/
describe: string;
/**
* 创建时间
*/
createTime: string;
}
export interface RecognizeRecordForm extends BaseEntity {
/**
* 主键id
*/
id?: string | number;
/**
* 项目id
*/
projectId?: string | number;
/**
* 设备序列号
*/
deviceSerial?: string;
/**
* 设备名称
*/
deviceName?: string;
/**
* 识别类别1无人机识别 2监控拍摄
*/
recordCategory?: string;
/**
* 违章类型(多个逗号分隔)
*/
violationType?: string;
/**
* 图片路径
*/
picture?: string;
/**
* 违规数量
*/
num?: number;
/**
* 故障描述
*/
description?: string;
/**
* 备注
*/
remark?: string;
}
export interface RecognizeRecordQuery extends PageQuery {
/**
* 项目id
*/
projectId?: string | number;
/**
* 故障描述
*/
description?: string;
/**
* 设备名称
*/
deviceName?: string;
/**
* 识别类别1无人机识别 2监控拍摄
*/
recordCategory?: string;
/**
* 违章类型(多个逗号分隔)
*/
violationType?: string;
/**
* 创建时间
*/
createTime?: string;
/**
* 日期范围参数
*/
params?: any;
}

View File

@ -209,6 +209,18 @@ export const deptTreeSelect = (): AxiosPromise<DeptTreeVO[]> => {
});
};
/**
* 新增用户文件关联
* @param data 文件关联数据
*/
export const uploadCertList = (data: { userId: string | number; fileId: string }) => {
return request({
url: '/system/userFile',
method: 'post',
data: data
});
};
export default {
listUser,
getUser,

View File

@ -46,6 +46,7 @@ export interface UserVO extends BaseEntity {
postIds: any;
roleId: any;
admin: boolean;
filePath?: string;
}
/**
@ -65,6 +66,7 @@ export interface UserForm {
remark?: string;
postIds: string[];
roleIds: string[];
filePath?: string;
}
export interface UserInfoVO {