123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229 |
- import { $httpWithMsg } from "../../plugins/axios";
- import { QUESTION_API } from "@/constants/constants";
- // common select
- export const courseQueryApi = (name, enable) => {
- return $httpWithMsg.get(`${QUESTION_API}/course/query`, {
- params: {
- name,
- enable: enable || undefined,
- },
- });
- };
- // build paper
- export const buildPaperApi = (datas, mode) => {
- return $httpWithMsg.post(`${QUESTION_API}/gen/paper/${mode}`, datas);
- };
- export const questionGroupStructListApi = (datas) => {
- return $httpWithMsg.post(
- `${QUESTION_API}/gen/paper/auto/distribute`,
- {},
- { params: datas }
- );
- };
- // build-paper-simple
- export const paperSimpleTypeDistributeApi = (courseId) => {
- return $httpWithMsg.post(
- `${QUESTION_API}/gen/paper/simple/type/distribute`,
- {},
- { params: { courseId } }
- );
- };
- export const paperSimpleCountDistributeApi = (params) => {
- return $httpWithMsg.post(
- `${QUESTION_API}/gen/paper/simple/count/distribute`,
- {},
- { params }
- );
- };
- // build-paper-auto:build-struct
- export const autoBuildPaperStructPageListApi = (params) => {
- return $httpWithMsg.post(`${QUESTION_API}/auto/struct/page`, {}, { params });
- };
- export const autoBuildPaperStructSaveApi = (datas) => {
- return $httpWithMsg.post(`${QUESTION_API}/auto/struct/save`, datas);
- };
- export const autoBuildPaperStructDeleteApi = (idList) => {
- return $httpWithMsg.post(
- `${QUESTION_API}/auto/struct/delete`,
- {},
- {
- params: { idList },
- }
- );
- };
- // edit paper
- export const paperDetailInfoApi = ({ paperId, seqMode }) => {
- return $httpWithMsg.post(
- `${QUESTION_API}/paper/data`,
- {},
- {
- params: { paperId, seqMode },
- }
- );
- };
- export const paperDetailApi = (paperId) => {
- return $httpWithMsg.get(`${QUESTION_API}/paper/${paperId}`, {});
- };
- export const paperSaveApi = (paper) => {
- return $httpWithMsg.post(`${QUESTION_API}/paper`, paper);
- };
- export const paperDeleteApi = (paperId) => {
- return $httpWithMsg.delete(`${QUESTION_API}/paper/${paperId}`, {});
- };
- // paper-info
- export const paperAuditInfoApi = ({ paperId, curPage, pageSize }) => {
- return $httpWithMsg.get(
- `${QUESTION_API}/paper/audit/page/${curPage}/${pageSize}`,
- {
- params: {
- paperId,
- },
- }
- );
- };
- export const paperBlueInfoApi = ({ paperId, coursePropertyId, rootOrgId }) => {
- return $httpWithMsg.get(`${QUESTION_API}/paper/blue`, {
- params: {
- id: paperId,
- coursePropertyId,
- rootOrgId,
- },
- });
- };
- export const paperQtypeInfoApi = ({ paperId, type }) => {
- return $httpWithMsg.get(`${QUESTION_API}/paper/question/type`, {
- params: {
- id: paperId,
- type,
- },
- });
- };
- export const paperBaseInfoApi = (paperId) => {
- return $httpWithMsg.get(`${QUESTION_API}/paper/basic/composition`, {
- params: {
- id: paperId,
- },
- });
- };
- export const paperDetailUpdateApi = (paperId, datas) => {
- return $httpWithMsg.post(
- `${QUESTION_API}/updatePaperDetail/${paperId}`,
- datas
- );
- };
- export const paperDetailMoveApi = ({ paperId, detailId, vector }) => {
- return $httpWithMsg.put(
- `${QUESTION_API}/paperDetail/${paperId}/${detailId}/${vector}`,
- {}
- );
- };
- export const paperDetailDeleteApi = ({ paperId, detailId }) => {
- return $httpWithMsg.delete(
- `${QUESTION_API}/paperDetail/${paperId}/${detailId}`,
- {}
- );
- };
- export const paperQuestionMoveApi = ({ detailId, unitid, vector }) => {
- return $httpWithMsg.put(
- `${QUESTION_API}/paperDetailUnit/${detailId}/${unitid}/${vector}`,
- {}
- );
- };
- export const paperQuestionDeleteApi = (unitid) => {
- return $httpWithMsg.delete(`${QUESTION_API}/paperDetailUnit/${unitid}`, {});
- };
- export const paperQuestionUnitDeleteApi = ({ unitid, questionId }) => {
- return $httpWithMsg.delete(
- `${QUESTION_API}/paper/deleteQuestion/${unitid}/${questionId}`,
- {}
- );
- };
- // audit-paper
- export const auditPaperWaitPageListApi = (datas) => {
- return $httpWithMsg.post(
- `${QUESTION_API}/find_pending_trial_paper`,
- {},
- {
- params: datas,
- }
- );
- };
- export const auditPaperAuditedPageListApi = (datas) => {
- return $httpWithMsg.post(
- `${QUESTION_API}/find_my_audit_paper`,
- {},
- {
- params: datas,
- }
- );
- };
- export const auditPaperApplyPageListApi = (datas) => {
- return $httpWithMsg.post(
- `${QUESTION_API}/find_my_paper_status`,
- {},
- {
- params: datas,
- }
- );
- };
- export const auditPaperUnsubmitPageListApi = (datas) => {
- return $httpWithMsg.post(
- `${QUESTION_API}/find_will_submit_paper`,
- {},
- {
- params: datas,
- }
- );
- };
- export const auditPaperApi = (datas) => {
- // auditResult,auditRemark,paperIds
- return $httpWithMsg.post(
- `${QUESTION_API}/paper/audit`,
- {},
- { params: datas }
- );
- };
- export const withdrawPaperApi = (paperIds) => {
- return $httpWithMsg.post(
- `${QUESTION_API}/paper/withdraw`,
- {},
- { params: { paperIds } }
- );
- };
- export const submitPaperApi = (paperIds) => {
- return $httpWithMsg.post(
- `${QUESTION_API}/paper/submit`,
- {},
- { params: { paperIds } }
- );
- };
- // paper-recycle
- export function paperRecycleListApi(data = {}) {
- return $httpWithMsg.post(
- `${QUESTION_API}/paper/recycle_find`,
- {},
- { params: data }
- );
- }
- export function recoverPaperApi(recycleParamList) {
- return $httpWithMsg.post(
- `${QUESTION_API}/paper/recycle_recover`,
- recycleParamList
- );
- }
- export function thoroughDeletePaperApi(recycleParamList) {
- return $httpWithMsg.post(
- `${QUESTION_API}/paper/recycle_clear`,
- recycleParamList
- );
- }
- export function clearPaperRecycleApi() {
- return $httpWithMsg.post(`${QUESTION_API}/paper/recycle_clear_all`, {});
- }
|