From a58d7b0835b212f663308ec6048e665f5ba57724 Mon Sep 17 00:00:00 2001 From: yuping <82253452@qq.com> Date: Fri, 17 Feb 2023 21:51:42 +0800 Subject: [PATCH] =?UTF-8?q?--fix=20=E5=A4=8D=E5=88=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/App.vue | 2 + src/views/courselibrary/CoursewareManage.vue | 71 +++++++------------- 2 files changed, 27 insertions(+), 46 deletions(-) diff --git a/src/App.vue b/src/App.vue index 85df1c49..24fde76b 100644 --- a/src/App.vue +++ b/src/App.vue @@ -59,6 +59,8 @@ function init() { initDict("project_pic"); //项目封面 initDict("router_pic"); //路径图封面 initDict("course_pic"); //课程封面 + initDict("job_type"); //岗位 + initDict("band"); //band } function unloadHandler() { diff --git a/src/views/courselibrary/CoursewareManage.vue b/src/views/courselibrary/CoursewareManage.vue index 6ce4945a..fe3bf93f 100644 --- a/src/views/courselibrary/CoursewareManage.vue +++ b/src/views/courselibrary/CoursewareManage.vue @@ -712,7 +712,7 @@ { + state.tableCoursePlanLoading = true // let datas = state.tableData6; let beginTime = ""; let endTime = ""; @@ -3374,6 +3374,7 @@ export default defineComponent({ }; console.log("获取开obj", obj, state.selectTime); let res = await planList(obj); + state.tableCoursePlanLoading = false console.log("开课res", res); const {rows, total, pageNo} = res.data.data; state.tableDataTotal222 = total; @@ -3945,48 +3946,31 @@ export default defineComponent({ state.addLoading = true; if (state.del_hs) { - console.log(11111111); if (state.offcourseId && state.offcoursePlanId && state.studentId) { - console.log(111111); - handleStudent({ + await handleStudent({ offcoursePlanId: state.offcoursePlanId, score: "", studentIds: [state.studentId], type: 5, - }).then((res) => { - if (res.data.code === 200) { - getTableDate2(); - delete_exit1(); - } - }); + }) + getTableDate2(); + delete_exit1(); } else if (state.offcourseId && state.offcoursePlanId) { - console.log(2222222); - deletePlan({ - offcoursePlanId: state.offcoursePlanId, - }).then((res) => { - if (res.data.code === 200) { - getTableDate3(); - delete_exit1(); - } - }); + state.tableCoursePlanLoading = true; + delete_exit1(); + await deletePlan({offcoursePlanId: state.offcoursePlanId,}) + getTableDate3(); } else if (state.offcourseId) { - console.log(3333333); - handle({ - offcourseId: state.offcourseId, - type: -1, - }).then((res) => { - if (res.data.code === 200) { - message.destroy(); - message.success("删除成功"); - getTableDate(); - delete_exit1(); - } - }); + state.tableLoading = true; + delete_exit1(); + message.success("删除成功"); + await handle({offcourseId: state.offcourseId, type: -1,}) + getTableDate(); } } if (state.copy_hs) { if (state.offcourseId && state.offcoursePlanId) { - state.tableLoading = true; + state.tableCoursePlanLoading = true; message.success("复制成功"); delete_exit1(); rest(); @@ -4002,20 +3986,15 @@ export default defineComponent({ } } if (state.nouse_hs) { - console.log(3333333333); if (state.offcourseId) { - console.log(87887); - handle({ + state.tableLoading = true; + message.success("操作成功"); + delete_exit1(); + await handle({ offcourseId: state.offcourseId, type: -2, - }).then((res) => { - if (res.data.code === 200) { - message.destroy(); - message.success("操作成功"); - getTableDate(); - delete_exit1(); - } - }); + }) + getTableDate(); } } };