违规记录

This commit is contained in:
Teo
2025-07-23 11:47:11 +08:00
parent e7b0b54f01
commit d503e64098
15 changed files with 1114 additions and 146 deletions

View File

@ -0,0 +1,63 @@
import request from '@/utils/request';
import { AxiosPromise } from 'axios';
import { ViolationRecordVO, ViolationRecordForm, ViolationRecordQuery } from '@/api/safety/violationRecord/types';
/**
* 查询违规记录列表
* @param query
* @returns {*}
*/
export const listViolationRecord = (query?: ViolationRecordQuery): AxiosPromise<ViolationRecordVO[]> => {
return request({
url: '/safety/violationRecord/list',
method: 'get',
params: query
});
};
/**
* 查询违规记录详细
* @param id
*/
export const getViolationRecord = (id: string | number): AxiosPromise<ViolationRecordVO> => {
return request({
url: '/safety/violationRecord/' + id,
method: 'get'
});
};
/**
* 新增违规处理人
* @param data
*/
export const addViolationRecord = (data: any) => {
return request({
url: '/safety/violationRecord/handler',
method: 'post',
data: data
});
};
/**
* 修改违规记录
* @param data
*/
export const updateViolationRecord = (data: ViolationRecordForm) => {
return request({
url: '/safety/violationRecord',
method: 'put',
data: data
});
};
/**
* 删除违规记录
* @param id
*/
export const delViolationRecord = (id: string | number | Array<string | number>) => {
return request({
url: '/safety/violationRecord/' + id,
method: 'delete'
});
};

View File

@ -0,0 +1,241 @@
export interface ViolationRecordVO {
/**
* 主键id
*/
id: string | number;
/**
* 项目id
*/
projectId: string | number;
/**
* 违章等级id
*/
levelId: string | number;
/**
* 违章类型
*/
violationType: string;
/**
* 违章时间
*/
violationTime: string;
/**
* 违章处理人id
*/
handlerId: string | number;
/**
* 整改措施
*/
measure: string;
/**
* 整改时间
*/
rectificationTime: string;
/**
* 复查情况
*/
review: string;
/**
* 复查状态1通过 2未通过
*/
reviewType: string;
/**
* 复查时间
*/
reviewTime: string;
/**
* 处理流程类型(0仅通知 1通知整改复查)
*/
processType: string;
/**
* 工单状态1通知 2整改 3复查
*/
status: string;
/**
* 备注
*/
remark: string;
}
export interface ViolationRecordForm extends BaseEntity {
/**
* 主键id
*/
id?: string | number;
/**
* 项目id
*/
projectId?: string | number;
/**
* 违章等级id
*/
levelId?: string | number;
/**
* 识别记录id
*/
recognizeId?: string | number;
/**
* 违章类型
*/
violationType?: string;
/**
* 违章时间
*/
violationTime?: string;
/**
* 违章处理人id
*/
handlerId?: string | number;
/**
* 处理期限
*/
disposeDeadline?: string;
/**
* 处理时间
*/
disposeTime?: string;
/**
* 整改措施
*/
measure?: string;
/**
* 整改时间
*/
rectificationTime?: string;
/**
* 复查情况
*/
review?: string;
/**
* 复查状态1通过 2未通过
*/
reviewType?: string;
/**
* 复查时间
*/
reviewTime?: string;
/**
* 处理流程类型(0仅通知 1通知整改复查)
*/
processType?: string;
/**
* 工单状态1通知 2整改 3复查
*/
status?: string;
/**
* 备注
*/
remark?: string;
}
export interface ViolationRecordQuery extends PageQuery {
/**
* 主键id
*/
id?: string | number;
/**
* 项目id
*/
projectId?: string | number;
/**
* 违章类型
*/
violationType?: string;
/**
* 违章时间
*/
violationTime?: string;
/**
* 违章处理人id
*/
handlerId?: string | number;
/**
* 处理期限
*/
disposeDeadline?: string;
/**
* 处理时间
*/
disposeTime?: string;
/**
* 整改措施
*/
measure?: string;
/**
* 整改时间
*/
rectificationTime?: string;
/**
* 复查情况
*/
review?: string;
/**
* 复查状态1通过 2未通过
*/
reviewType?: string;
/**
* 复查时间
*/
reviewTime?: string;
/**
* 处理流程类型(0仅通知 1通知整改复查)
*/
processType?: string;
/**
* 工单状态1通知 2整改 3复查
*/
status?: string;
/**
* 日期范围参数
*/
params?: any;
}

View File

@ -11,6 +11,14 @@ export function listPost(query: { pageNum: number; pageSize: number }): AxiosPro
});
}
// 查询岗位列表
export function listTreeByProject(projectId: string): AxiosPromise<PostVO[]> {
return request({
url: '/system/dept/list/treeByProjectId/' + projectId,
method: 'get'
});
}
// 查询岗位详细
export function getPost(postId: string | number): AxiosPromise<PostVO> {
return request({