diff --git a/src/components/drawers/AddTest.vue b/src/components/drawers/AddTest.vue index 93f843de..b1bff03b 100644 --- a/src/components/drawers/AddTest.vue +++ b/src/components/drawers/AddTest.vue @@ -309,8 +309,8 @@ import {message} from "ant-design-vue"; import { createExamination, queryExaminationDetailById, - updateExamination, } from "@/api/indexExam"; +// updateExamination, import STest from "./SelectTest.vue"; import {ProjectEditTask, RouterEditTask} from "@/api/indexTask"; import {addTempTask} from "../../api/indexTaskadd"; @@ -456,7 +456,7 @@ export default { console.log("props", props); if (props.addtestVisible && props.EditTestId && props.EditTestId >0) { // 该页面显示同时 edit为true 时,发送查询请求, - queryTest(); + // queryTest(); } if (bool) { state.test.showAnswers = 1; @@ -553,18 +553,18 @@ export default { } - if (props.EditTestId > 0) { - // 编辑任务 - updateExamination(state.test) - .then(async (res) => { - await updateTask(res); - // closeDrawer(); - }) - .catch(() => { - message.destroy(); - message.error(`编辑失败`); - }); - } else { + // if (props.EditTestId > 0) { + // // 编辑任务 + // updateExamination(state.test) + // .then(async (res) => { + // await updateTask(res); + // // closeDrawer(); + // }) + // .catch(() => { + // message.destroy(); + // message.error(`编辑失败`); + // }); + // } else { // 创建任务 createExamination(state.test) .then(async (res) => { @@ -575,7 +575,7 @@ export default { message.destroy(); message.error(`创建失败`); }); - } + // } }; const updateTask = (res) => { state.EditTestId = res.data.data.examinationId;