施工人员黑名单后端逻辑优化,增加前端页面
This commit is contained in:
63
src/api/project/constructionBlacklist/index.ts
Normal file
63
src/api/project/constructionBlacklist/index.ts
Normal file
@ -0,0 +1,63 @@
|
||||
import request from '@/utils/request';
|
||||
import { AxiosPromise } from 'axios';
|
||||
import { ConstructionBlacklistVO, ConstructionBlacklistForm, ConstructionBlacklistQuery } from '@/api/project/constructionBlacklist/types';
|
||||
|
||||
/**
|
||||
* 查询黑名单列表
|
||||
* @param query
|
||||
* @returns {*}
|
||||
*/
|
||||
|
||||
export const listConstructionBlacklist = (query?: ConstructionBlacklistQuery): AxiosPromise<ConstructionBlacklistVO[]> => {
|
||||
return request({
|
||||
url: '/project/constructionBlacklist/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 查询黑名单详细
|
||||
* @param id
|
||||
*/
|
||||
export const getConstructionBlacklist = (id: string | number): AxiosPromise<ConstructionBlacklistVO> => {
|
||||
return request({
|
||||
url: '/project/constructionBlacklist/' + id,
|
||||
method: 'get'
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 新增黑名单
|
||||
* @param data
|
||||
*/
|
||||
export const addConstructionBlacklist = (data: ConstructionBlacklistForm) => {
|
||||
return request({
|
||||
url: '/project/constructionBlacklist',
|
||||
method: 'post',
|
||||
data: data
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 修改黑名单
|
||||
* @param data
|
||||
*/
|
||||
export const updateConstructionBlacklist = (data: ConstructionBlacklistForm) => {
|
||||
return request({
|
||||
url: '/project/constructionBlacklist',
|
||||
method: 'put',
|
||||
data: data
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 删除黑名单
|
||||
* @param id
|
||||
*/
|
||||
export const delConstructionBlacklist = (id: string | number | Array<string | number>) => {
|
||||
return request({
|
||||
url: '/project/constructionBlacklist/' + id,
|
||||
method: 'delete'
|
||||
});
|
||||
};
|
69
src/api/project/constructionBlacklist/types.ts
Normal file
69
src/api/project/constructionBlacklist/types.ts
Normal file
@ -0,0 +1,69 @@
|
||||
export interface ConstructionBlacklistVO {
|
||||
/**
|
||||
* id
|
||||
*/
|
||||
id: string | number;
|
||||
/**
|
||||
* 名字
|
||||
*/
|
||||
userName: string;
|
||||
|
||||
/**
|
||||
* 身份证号码
|
||||
*/
|
||||
sfzNumber: string;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
remark: string;
|
||||
}
|
||||
|
||||
export interface ConstructionBlacklistForm extends BaseEntity {
|
||||
/**
|
||||
* 项目id
|
||||
*/
|
||||
projectId?: string | number;
|
||||
|
||||
/**
|
||||
* 用户id
|
||||
*/
|
||||
userId?: string | number;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
remark?: string;
|
||||
}
|
||||
|
||||
export interface ConstructionBlacklistQuery extends PageQuery {
|
||||
/**
|
||||
* 主键id
|
||||
*/
|
||||
id?: string | number;
|
||||
|
||||
/**
|
||||
* 项目id
|
||||
*/
|
||||
projectId?: string | number;
|
||||
|
||||
/**
|
||||
* 用户id
|
||||
*/
|
||||
userId?: string | number;
|
||||
|
||||
/**
|
||||
* 名字
|
||||
*/
|
||||
userName?: string;
|
||||
|
||||
/**
|
||||
* 身份证号码
|
||||
*/
|
||||
sfzNumber?: string;
|
||||
|
||||
/**
|
||||
* 日期范围参数
|
||||
*/
|
||||
params?: any;
|
||||
}
|
@ -43,7 +43,6 @@ export interface QuestionUserAnswerVO {
|
||||
* 文件地址
|
||||
*/
|
||||
file: string;
|
||||
|
||||
}
|
||||
|
||||
export interface QuestionUserAnswerForm extends BaseEntity {
|
||||
@ -91,11 +90,9 @@ export interface QuestionUserAnswerForm extends BaseEntity {
|
||||
* 文件地址
|
||||
*/
|
||||
file?: string;
|
||||
|
||||
}
|
||||
|
||||
export interface QuestionUserAnswerQuery extends PageQuery {
|
||||
|
||||
/**
|
||||
* 项目id
|
||||
*/
|
||||
@ -136,11 +133,8 @@ export interface QuestionUserAnswerQuery extends PageQuery {
|
||||
*/
|
||||
file?: string;
|
||||
|
||||
/**
|
||||
* 日期范围参数
|
||||
*/
|
||||
params?: any;
|
||||
/**
|
||||
* 日期范围参数
|
||||
*/
|
||||
params?: any;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
@ -4,6 +4,11 @@ export interface QuestionsConfigVO {
|
||||
*/
|
||||
id: string | number;
|
||||
|
||||
/**
|
||||
* 项目id
|
||||
*/
|
||||
projectId: string | number;
|
||||
|
||||
/**
|
||||
* 单选题(单位/道)
|
||||
*/
|
||||
@ -48,7 +53,6 @@ export interface QuestionsConfigVO {
|
||||
* 答题最大时间(单位/分钟)
|
||||
*/
|
||||
answerTime: number;
|
||||
|
||||
}
|
||||
|
||||
export interface QuestionsConfigForm extends BaseEntity {
|
||||
@ -57,6 +61,11 @@ export interface QuestionsConfigForm extends BaseEntity {
|
||||
*/
|
||||
id?: string | number;
|
||||
|
||||
/**
|
||||
* 项目id
|
||||
*/
|
||||
projectId: string | number;
|
||||
|
||||
/**
|
||||
* 单选题(单位/道)
|
||||
*/
|
||||
@ -101,11 +110,13 @@ export interface QuestionsConfigForm extends BaseEntity {
|
||||
* 答题最大时间(单位/分钟)
|
||||
*/
|
||||
answerTime?: number;
|
||||
|
||||
}
|
||||
|
||||
export interface QuestionsConfigQuery extends PageQuery {
|
||||
|
||||
/**
|
||||
* 项目id
|
||||
*/
|
||||
projectId: string | number;
|
||||
/**
|
||||
* 单选题(单位/道)
|
||||
*/
|
||||
@ -151,11 +162,8 @@ export interface QuestionsConfigQuery extends PageQuery {
|
||||
*/
|
||||
answerTime?: number;
|
||||
|
||||
/**
|
||||
* 日期范围参数
|
||||
*/
|
||||
params?: any;
|
||||
/**
|
||||
* 日期范围参数
|
||||
*/
|
||||
params?: any;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user