安全考试
This commit is contained in:
@ -84,7 +84,7 @@ export interface ProjectTeamForemanResp {
|
||||
* 班组id
|
||||
*/
|
||||
id: string | number;
|
||||
|
||||
foremanList: foremanQuery[];
|
||||
/**
|
||||
* 班组名称
|
||||
*/
|
||||
@ -94,7 +94,9 @@ export interface ProjectTeamForemanResp {
|
||||
* 项目id
|
||||
*/
|
||||
projectId: string | number;
|
||||
}
|
||||
|
||||
export interface foremanQuery {
|
||||
/**
|
||||
* 班组长id
|
||||
*/
|
||||
|
@ -61,3 +61,15 @@ export const delQuestionUserAnswer = (id: string | number | Array<string | numbe
|
||||
method: 'delete'
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 上传线下考试试卷存储
|
||||
* @param data
|
||||
*/
|
||||
export const uploadQuestionUserAnswer = (data: any) => {
|
||||
return request({
|
||||
url: '/safety/questionUserAnswer/upload/zip',
|
||||
method: 'post',
|
||||
data: data
|
||||
});
|
||||
};
|
||||
|
@ -1,33 +1,17 @@
|
||||
export interface QuestionUserAnswerVO {
|
||||
/**
|
||||
* 主键id
|
||||
*/
|
||||
id: string | number;
|
||||
|
||||
/**
|
||||
* 项目id
|
||||
*/
|
||||
projectId: string | number;
|
||||
|
||||
/**
|
||||
* 用户id
|
||||
*/
|
||||
userId: string | number;
|
||||
|
||||
/**
|
||||
* 题库id列表
|
||||
*/
|
||||
bankIdList: Array<string | number>;
|
||||
|
||||
/**
|
||||
* 答案列表
|
||||
*/
|
||||
answerList: Array<string>;
|
||||
|
||||
/**
|
||||
* 得分
|
||||
*/
|
||||
score: number;
|
||||
id: string | number;
|
||||
file: string;
|
||||
/**
|
||||
* 考试类型(1线上考试 2线下考试)
|
||||
*/
|
||||
/**
|
||||
* 考试时间(时间戳/秒)
|
||||
*/
|
||||
examTime: number;
|
||||
|
||||
/**
|
||||
* 用时时间(时间戳/秒)
|
||||
@ -38,11 +22,6 @@ export interface QuestionUserAnswerVO {
|
||||
* 及格线/总分(格式:60,100)
|
||||
*/
|
||||
pass: string;
|
||||
|
||||
/**
|
||||
* 文件地址
|
||||
*/
|
||||
file: string;
|
||||
}
|
||||
|
||||
export interface QuestionUserAnswerForm extends BaseEntity {
|
||||
@ -50,7 +29,7 @@ export interface QuestionUserAnswerForm extends BaseEntity {
|
||||
* 主键id
|
||||
*/
|
||||
id?: string | number;
|
||||
|
||||
teamId?: string | number;
|
||||
/**
|
||||
* 项目id
|
||||
*/
|
||||
@ -64,18 +43,23 @@ export interface QuestionUserAnswerForm extends BaseEntity {
|
||||
/**
|
||||
* 题库id列表
|
||||
*/
|
||||
bankIdList: Array<string | number>;
|
||||
bankId?: string | number;
|
||||
|
||||
/**
|
||||
* 答案列表
|
||||
*/
|
||||
answerList: Array<string>;
|
||||
answer?: string;
|
||||
|
||||
/**
|
||||
* 得分
|
||||
*/
|
||||
score?: number;
|
||||
|
||||
/**
|
||||
* 考试时间(时间戳/秒)
|
||||
*/
|
||||
examTime?: number;
|
||||
|
||||
/**
|
||||
* 用时时间(时间戳/秒)
|
||||
*/
|
||||
@ -93,45 +77,16 @@ export interface QuestionUserAnswerForm extends BaseEntity {
|
||||
}
|
||||
|
||||
export interface QuestionUserAnswerQuery extends PageQuery {
|
||||
/**
|
||||
* 项目id
|
||||
*/
|
||||
projectId?: string | number;
|
||||
|
||||
/**
|
||||
* 用户id
|
||||
*/
|
||||
userId?: string | number;
|
||||
|
||||
teamId?: string | number;
|
||||
projectId?: string | number;
|
||||
/**
|
||||
* 题库id列表
|
||||
* 考试类型(1线上考试 2线下考试)
|
||||
*/
|
||||
bankIdList: Array<string | number>;
|
||||
|
||||
/**
|
||||
* 答案列表
|
||||
*/
|
||||
answerList: Array<string>;
|
||||
|
||||
/**
|
||||
* 得分
|
||||
*/
|
||||
score?: number;
|
||||
|
||||
/**
|
||||
* 用时时间(时间戳/秒)
|
||||
*/
|
||||
takeTime?: number;
|
||||
|
||||
/**
|
||||
* 及格线/总分(格式:60,100)
|
||||
*/
|
||||
pass?: string;
|
||||
|
||||
/**
|
||||
* 文件地址
|
||||
*/
|
||||
file?: string;
|
||||
examType?: string;
|
||||
|
||||
/**
|
||||
* 日期范围参数
|
||||
|
63
src/api/safety/questionsCategory/index.ts
Normal file
63
src/api/safety/questionsCategory/index.ts
Normal file
@ -0,0 +1,63 @@
|
||||
import request from '@/utils/request';
|
||||
import { AxiosPromise } from 'axios';
|
||||
import { QuestionsCategoryVO, QuestionsCategoryForm, QuestionsCategoryQuery } from '@/api/safety/questionsCategory/types';
|
||||
|
||||
/**
|
||||
* 查询题库类别列表
|
||||
* @param query
|
||||
* @returns {*}
|
||||
*/
|
||||
|
||||
export const listQuestionsCategory = (query?: QuestionsCategoryQuery): AxiosPromise<QuestionsCategoryVO[]> => {
|
||||
return request({
|
||||
url: '/safety/questionsCategory/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 查询题库类别详细
|
||||
* @param id
|
||||
*/
|
||||
export const getQuestionsCategory = (id: string | number): AxiosPromise<QuestionsCategoryVO> => {
|
||||
return request({
|
||||
url: '/safety/questionsCategory/' + id,
|
||||
method: 'get'
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 新增题库类别
|
||||
* @param data
|
||||
*/
|
||||
export const addQuestionsCategory = (data: QuestionsCategoryForm) => {
|
||||
return request({
|
||||
url: '/safety/questionsCategory',
|
||||
method: 'post',
|
||||
data: data
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 修改题库类别
|
||||
* @param data
|
||||
*/
|
||||
export const updateQuestionsCategory = (data: QuestionsCategoryForm) => {
|
||||
return request({
|
||||
url: '/safety/questionsCategory',
|
||||
method: 'put',
|
||||
data: data
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 删除题库类别
|
||||
* @param id
|
||||
*/
|
||||
export const delQuestionsCategory = (id: string | number | Array<string | number>) => {
|
||||
return request({
|
||||
url: '/safety/questionsCategory/' + id,
|
||||
method: 'delete'
|
||||
});
|
||||
};
|
41
src/api/safety/questionsCategory/types.ts
Normal file
41
src/api/safety/questionsCategory/types.ts
Normal file
@ -0,0 +1,41 @@
|
||||
export interface QuestionsCategoryVO {
|
||||
/**
|
||||
* 题库类别
|
||||
*/
|
||||
categoryName: string;
|
||||
id: string | number;
|
||||
}
|
||||
|
||||
export interface QuestionsCategoryForm extends BaseEntity {
|
||||
/**
|
||||
* 主键id
|
||||
*/
|
||||
id?: string | number;
|
||||
|
||||
/**
|
||||
* 项目id
|
||||
*/
|
||||
projectId?: string | number;
|
||||
|
||||
/**
|
||||
* 题库类别
|
||||
*/
|
||||
categoryName?: string;
|
||||
}
|
||||
|
||||
export interface QuestionsCategoryQuery extends PageQuery {
|
||||
/**
|
||||
* 项目id
|
||||
*/
|
||||
projectId?: string | number;
|
||||
|
||||
/**
|
||||
* 题库类别
|
||||
*/
|
||||
categoryName?: string;
|
||||
|
||||
/**
|
||||
* 日期范围参数
|
||||
*/
|
||||
params?: any;
|
||||
}
|
@ -1,4 +1,4 @@
|
||||
import request from '@/utils/request';
|
||||
import request, { download } from '@/utils/request';
|
||||
import { OssQuery, OssVO } from './types';
|
||||
import { AxiosPromise } from 'axios';
|
||||
|
||||
@ -26,3 +26,8 @@ export function delOss(ossId: string | number | Array<string | number>) {
|
||||
method: 'delete'
|
||||
});
|
||||
}
|
||||
|
||||
// 下载OSS对象存储
|
||||
export function downLoadOss(ossId: string | number | Array<string | number>) {
|
||||
return download('/safety/questionUserAnswer/exportFile', { userIdList: ossId }, '安全考试.zip');
|
||||
}
|
||||
|
Reference in New Issue
Block a user