From f0429972f77e3e3b03be74f6e181e080483b7071 Mon Sep 17 00:00:00 2001 From: Pengxiansen <2422914688@qq.com> Date: Fri, 14 Feb 2025 14:04:16 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/growthpath/GrowthProject.vue | 1 - src/components/growthpath/StudentManage.vue | 3 +- src/views/growthpath/GrowthPath.vue | 23 --- src/views/growthpath/PathManage.vue | 165 +++++++++++++------- 4 files changed, 107 insertions(+), 85 deletions(-) diff --git a/src/components/growthpath/GrowthProject.vue b/src/components/growthpath/GrowthProject.vue index 2b336ed6..72fe66f8 100644 --- a/src/components/growthpath/GrowthProject.vue +++ b/src/components/growthpath/GrowthProject.vue @@ -240,7 +240,6 @@ async function confirm(record) { dialog({ content: "确定选择该项目吗?", ok: async () => { - formData.value.offteachers.splice(index, 1); // 新增 if (!selectData?.value?.id) { await saveTask({ diff --git a/src/components/growthpath/StudentManage.vue b/src/components/growthpath/StudentManage.vue index ccdb2422..c2f5bce8 100644 --- a/src/components/growthpath/StudentManage.vue +++ b/src/components/growthpath/StudentManage.vue @@ -251,6 +251,7 @@ + @@ -630,6 +631,7 @@ function closeDrawer() { GrowthDrawerRef.value.closeDrawer(); } function confirmDrawer(selectList) { + closeDrawer(); tableData.value.loading = true; addLearners({ growthId: props.id, @@ -639,7 +641,6 @@ function confirmDrawer(selectList) { tableData.value.loading = false; message.success("添加成功"); getStuList(); - closeDrawer() }) .catch((err) => { tableData.value.loading = false; diff --git a/src/views/growthpath/GrowthPath.vue b/src/views/growthpath/GrowthPath.vue index 00083f15..132003d8 100644 --- a/src/views/growthpath/GrowthPath.vue +++ b/src/views/growthpath/GrowthPath.vue @@ -232,26 +232,6 @@ -
-
-
- -
- 选择模板 -
-
- -
- 路径图
- 任务列表 -
-
-
-
说明 @@ -376,7 +356,6 @@ export default { statusPost: null, matchRules: "1", matchRulesVisible: false, - template: "2", statusPostMaps: [], statusPosts: null, editId: null, @@ -522,7 +501,6 @@ export default { state.pathWays = record.description; state.band = record.band; state.matchRules = record.matchRules || "1"; - state.template = state.template || "2"; state.bg_check = true; }; @@ -547,7 +525,6 @@ export default { description: state.pathWays, matchRules: state.matchRules, id: state.editId ? state.editId : null, - template: state.template, keepLearner: state.keepLearner, }; updatePostInfomation(params) diff --git a/src/views/growthpath/PathManage.vue b/src/views/growthpath/PathManage.vue index 655bb17b..7bc7e794 100644 --- a/src/views/growthpath/PathManage.vue +++ b/src/views/growthpath/PathManage.vue @@ -489,6 +489,23 @@
+
@@ -649,6 +666,9 @@ export default { commonData: null, showTimeText: null, onlineVisible: false, + total: 0, + pageSize: 99999, + pageNum: 1, spinning: false, tabFlag: true, homeworkData: {}, @@ -909,7 +929,7 @@ export default { "&chapterOrStageId=" + 0 + "&infoId=" + - state.routerId; + route.query.id; } // 考试 停用 if (item.taskType == 5) { @@ -926,7 +946,7 @@ export default { item.id + "&chapterOrStageId=0" + "&infoId=" + - state.routerId; + route.query.id; } else { codeUrl = window.location.protocol + @@ -935,88 +955,81 @@ export default { } } // 直播结束时间 - if (item.type == 6) { - let date1 = new Date(item.endTime).getTime(); + if (item.taskType == 6) { + let date1 = new Date(item.info.liveEndTime).getTime(); let date2 = new Date().getTime(); if (date1 < date2) return message.warning("当前直播已结束"); codeUrl = window.location.protocol + process.env.VUE_APP_H5 + "/liveboradcast?courseId=" + - item.courseId + - "&type=2&id=" + + item.info.id + + "&type=4&id=" + item.id + - "&chapterOrStageId=" + - item.chapterId + + "&chapterOrStageId=0" + "&infoId=" + - state.routerId; + route.query.id; } // 外链 - if (item.type == 7) { + if (item.taskType == 7) { codeUrl = window.location.protocol + process.env.VUE_APP_H5 + "/outerchain?courseId=" + - item.courseId + - "&type=2&id=" + + item.info.id + + "&type=4&id=" + item.id + - "&chapterOrStageId=" + - item.chapterId + + "&chapterOrStageId=0" + "&infoId=" + - state.routerId; + route.query.id; } //讨论 - if (item.type == 8) { + if (item.taskType == 8) { codeUrl = window.location.protocol + process.env.VUE_APP_H5 + "/discusspage?courseId=" + - item.courseId + - "&type=2&id=" + + item.info.id + + "&type=4&id=" + item.id + - "&chapterOrStageId=" + - item.chapterId + + "&chapterOrStageId=0" + "&infoId=" + - state.routerId; + route.query.id; } //活动 - if (item.type == 9) { - let date1 = new Date(item.endTime).getTime(); + if (item.taskType == 9) { + let date1 = new Date(item.info.activityEndTime).getTime(); let date2 = new Date().getTime(); if (date1 < date2) return message.warning("当前活动已结束"); codeUrl = window.location.protocol + process.env.VUE_APP_H5 + "/activitiespage?courseId=" + - item.courseId + - "&type=2&id=" + + item.info.id + + "&type=4&id=" + item.id + - "&chapterOrStageId=" + - item.chapterId + + "&chapterOrStageId=0" + "&infoId=" + - state.routerId; + route.query.id; } - //活动 - if (item.type == 10) { + //测评 + if (item.taskType == 10) { codeUrl = window.location.protocol + process.env.VUE_APP_H5 + "/evaluation?courseId=" + - item.courseId + - "&evaType=" + - item.evaType + - "&type=2&targetId=" + - item.targetId + + item.info.id + + "&type=4&targetId=" + + item.info.evaluationTypeId + "&id=" + item.id + - "&chapterOrStageId=" + - item.chapterId + + "&chapterOrStageId=0" + "&infoId=" + - state.routerId; + route.query.id; } // 评估 停用 - if (item.type == 11) { + if (item.taskType == 11) { // if (item.taskStatus == 1 || item.taskStatus == 2) // return message.error("该任务无法学习,请联系管理员进行替换。"); console.log("item", item); @@ -1024,41 +1037,38 @@ export default { window.location.protocol + process.env.VUE_APP_H5 + "/investigatpage?courseId=" + - item.courseId + - "&type=2&id=" + + item.info.id + + "&type=4&id=" + item.id + - "&chapterOrStageId=" + - item.chapterId + + "&chapterOrStageId=0" + "&infoId=" + - state.routerId; + route.query.id; } // 投票 - if (item.type == 12) { + if (item.taskType == 12) { codeUrl = window.location.protocol + process.env.VUE_APP_H5 + "/ballotpage?courseId=" + - item.courseId + + item.info.id + "&btype=2&id=" + item.id + - "&chapterOrStageId=" + - item.chapterId + - "&type=2&infoId=" + - state.routerId; + "&chapterOrStageId=0" + + "&type=4&infoId=" + + route.query.id; } // 项目 - if (item.type == 13) { + if (item.taskType == 13) { codeUrl = window.location.protocol + process.env.VUE_APP_H5 + "/projectdetails?type=2&projectId=" + - item.courseId + + item.taskId + "&id=" + item.id + - "&chapterOrStageId=" + - item.chapterId + - "&type=2&infoId=" + - state.routerId; + "&chapterOrStageId=0" + + "&type=4&infoId=" + + route.query.id; } state.codevisible = true; let obj = { @@ -1091,7 +1101,7 @@ export default { }; const showOnline = (item) => { console.log(item, "item"); - item.targetId = state.routerId; + item.targetId = route.query.id; state.showTimeText = item.name; state.commonData = item; state.onlineVisible = true; @@ -1103,13 +1113,13 @@ export default { state.TMvisibleExternal = true; state.examData = data; state.showTestText = data.name; - state.targetId = state.routerId; + state.targetId = route.query.id; } else { // 系统考试抽屉显示 state.TMvisible = true; state.examData = data; state.showTestText = data.name; - state.targetId = state.routerId; + state.targetId = route.query.id; } }; onMounted(() => { @@ -1123,12 +1133,17 @@ export default { const getListTask = () => { state.spinning = true; taskOutline({ - growthId: state.routerId, + growthId: route.query.id, type: state.courseType, + pageSize: state.pageSize, + pageNum: state.pageNum, }) .then((res) => { if (res.data.code == 200) { state.listTaskData = res.data.data.records; + // state.total = res.data.data.total; + // state.pageSize = res.data.data.pageSize; + // state.pageNum = res.data.data.pageNum; } state.spinning = false; }) @@ -1938,5 +1953,35 @@ export default { } } } + .tableBox { + padding-bottom: 20px; + margin: 20px 38px 30px; + ::v-deep .ant-select { + min-height: 32px; + .ant-select-selector { + min-height: 32px; + } + .ant-select-selection-item { + line-height: 32px; + } + } + ::v-deep .ant-pagination-options .ant-select-arrow { + display: block; + } + ::v-deep .ant-select-dropdown { + display: inline-block; + } + ::v-deep .ant-select-selection-item { + margin-left: 3px; + } + ::v-deep .ant-pagination-options-size-changer.ant-select { + width: 92px; + } + .pa { + width: 100%; + display: flex; + justify-content: center; + } + } }