mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-12 12:26:47 +08:00
fix:编辑面授课时,配置考试每次都为新建考试修改,不允许在原来考试基础上进行编辑。
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user