123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161 |
- 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}/paper/build`, datas);
- // };
- import folderPropStruct from "./datas/folderPropStruct.json";
- export const questionGroupStructListApi = (datas) => {
- return Promise.resolve({ data: folderPropStruct, filter: datas });
- };
- // edit paper
- export const paperDetailInfoApi = (paperId) => {
- return $httpWithMsg.post(`${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.get(`${QUESTION_API}/find_pending_trial_paper`, {
- params: datas,
- });
- };
- export const auditPaperAuditedPageListApi = (datas) => {
- return $httpWithMsg.get(`${QUESTION_API}/find_my_audit_paper`, {
- params: datas,
- });
- };
- export const auditPaperApplyPageListApi = (datas) => {
- return $httpWithMsg.get(`${QUESTION_API}/find_my_paper_status`, {
- params: datas,
- });
- };
- export const auditPaperUnsubmitPageListApi = (datas) => {
- return $httpWithMsg.get(`${QUESTION_API}/find_will_submit_paper`, {
- params: datas,
- });
- };
- export const auditPaperApi = (datas) => {
- // auditResult,auditRemark,paperIds
- return $httpWithMsg.post(`${QUESTION_API}/paper/audit`, 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 } }
- );
- };
- // build-paper
- 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 }
- );
- };
|