From 86d5b720fea9da5ba747aa2bde5310ca2345472a Mon Sep 17 00:00:00 2001 From: wuyx Date: Wed, 2 Nov 2022 18:32:00 +0800 Subject: [PATCH 1/4] =?UTF-8?q?feat:=E5=A2=9E=E5=8A=A0=E7=8F=AD=E7=BA=A7?= =?UTF-8?q?=E5=88=9B=E5=BB=BA=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/projectcenter/ClassAdd.vue | 1361 +++++++++++++-------- src/views/projectcenter/ProjectManage.vue | 12 +- 2 files changed, 860 insertions(+), 513 deletions(-) diff --git a/src/views/projectcenter/ClassAdd.vue b/src/views/projectcenter/ClassAdd.vue index af9fbaf7..b836d6ea 100644 --- a/src/views/projectcenter/ClassAdd.vue +++ b/src/views/projectcenter/ClassAdd.vue @@ -1,536 +1,875 @@ + diff --git a/src/views/projectcenter/ProjectManage.vue b/src/views/projectcenter/ProjectManage.vue index 495d7576..d827e774 100644 --- a/src/views/projectcenter/ProjectManage.vue +++ b/src/views/projectcenter/ProjectManage.vue @@ -1228,9 +1228,17 @@ export default { - +
{ + router.push({ + path: '/classadd', + query: { projectId: value.record.projectId, name: value.record.name } + }); + }} + style={{ cursor: "pointer" }} + to="/classadd" class="operation3"> 创建班级 - +
Date: Wed, 2 Nov 2022 19:49:34 +0800 Subject: [PATCH 2/4] =?UTF-8?q?feat:=E5=A2=9E=E5=8A=A0=E5=AD=A6=E4=B9=A0?= =?UTF-8?q?=E8=B7=AF=E5=BE=84=E7=9A=84=E5=8F=91=E5=B8=83/=E5=81=9C?= =?UTF-8?q?=E7=94=A8/=E6=92=A4=E5=9B=9E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/index1.js | 14 ++- src/components/BreadCrumb.vue | 8 +- src/views/learningpath/LearningPath.vue | 145 ++++++++++++++++++++---- src/views/learningpath/LevelAdd.vue | 2 +- src/views/system/SystemManage.vue | 35 ++++++ 5 files changed, 178 insertions(+), 26 deletions(-) diff --git a/src/api/index1.js b/src/api/index1.js index 34e6f565..1b315788 100644 --- a/src/api/index1.js +++ b/src/api/index1.js @@ -43,14 +43,24 @@ export const uploadFile = (obj) => http.post('/test/testRequest', qs.stringify({ export const createLearnPath = (obj) => http.post('/admin/router/edit', obj); // 获取学习路径图列表 export const getLearnPath = (obj) => http.post('/admin/router/list', obj); -//删除学习路径图 -export const deleteLearnPath = (obj) => http.post('/admin/router/handle', obj); +//学习路径图的发布、停用、删除 +export const handleLearnPath = (obj) => http.post('/admin/router/handle', obj); //获取关卡 export const getChapter = (obj) => http.post('/admin/router/detail', { params: obj }); //新建或编辑关卡 export const editChapter = (obj) => http.post('/admin/router/editChapter', obj); +//获取学员列表 +export const getStudent = (obj) => http.post('/admin/router/studentList', obj); +//获取路径图详情-包含关卡及任务列表 +export const getRouterDetail = (routerId) => http.get('/admin/router/detail', { + params: { + routerId: routerId, + } +}); + + // 测试方法 // import * as api from '../../api/index' diff --git a/src/components/BreadCrumb.vue b/src/components/BreadCrumb.vue index 1229413b..3124ba72 100644 --- a/src/components/BreadCrumb.vue +++ b/src/components/BreadCrumb.vue @@ -49,7 +49,7 @@ export default { href: "/learningpath", }, { - name: "关卡", + name: "管理", }, ]; } @@ -60,7 +60,7 @@ export default { href: "/learningpath", }, { - name: "关卡", + name: "管理", href: "/leveladd", }, { @@ -75,7 +75,7 @@ export default { href: "/learningpath", }, { - name: "关卡", + name: "管理", href: "/leveladd", }, { @@ -155,7 +155,7 @@ export default { }, { name: "查看", - href:"/libraryadd", + href: "/libraryadd", }, ]; } diff --git a/src/views/learningpath/LearningPath.vue b/src/views/learningpath/LearningPath.vue index f18a3419..6a8dc79f 100644 --- a/src/views/learningpath/LearningPath.vue +++ b/src/views/learningpath/LearningPath.vue @@ -398,21 +398,21 @@
产品经理上升路径
-
+
路径信息
-
当前路径共0个阶段,0个任务
+
当前路径共0个关卡,0个任务
学员信息
-
路径共0名学员
+
路径共{{ routeStudentsNum }}名学员
-
+
- 取消 - 发布 + 取消 + 发布
@@ -481,10 +481,10 @@
-
取消
+
取消
-
确定
+
确定
@@ -572,10 +572,10 @@
-
取消
+
取消
-
确定
+
确定
@@ -726,6 +726,11 @@ export default { searchdate: null, //选择时间 startTime: null, //开始时间 endTime: null, //结束时间 + //发布--------------- + releasePathId: null, //发布路径id + routeStudentsNum: 0, + recallPathId: null, //撤回路径id + stopPathId: null, //停用路径id }); const selectProjectName = (value, index) => { @@ -761,9 +766,58 @@ export default { console.log(id); state.learnPathBg2 = id; }; - const showPub = () => { + //发布弹窗 + const showPub = (routerId) => { state.pub = true; + state.releasePathId = routerId; + //获取学员总数 + let obj = { + pageNo: 0, + pageSize: 0, + routerId: routerId, + }; + api + .getStudent(obj) + .then((res) => { + if (res.status === 200) { + // console.log("res", res.data.data); + state.routeStudentsNum = res.data.data.total; + } + }) + .catch((err) => { + console.log("err", err); + }); + //获取学习路径详细信息 + api + .getRouterDetail(routerId) + .then((res) => { + console.log("学习路径详情", res); + }) + .catch((err) => { + console.log("学习路径详情获取错误", err); + }); }; + //确定发布 + const releaseLearnPath = () => { + // console.log("state.releasePathId", state.releasePathId); + let obj = { + routerId: state.releasePathId, + type: 1, + }; + api + .handleLearnPath(obj) + .then((res) => { + console.log("发布成功", res); + message.destroy(); + message.success("发布成功"); + state.pub = false; + getLearnPath(); + }) + .catch((err) => { + console.log("发布失败", err); + }); + }; + const closePub = () => { state.pub = false; }; @@ -773,12 +827,34 @@ export default { const closeCopyModal = () => { state.copyModal = false; }; + //显示停用窗口 const showStopModal = () => { state.stopModal = true; }; + //关闭停用窗口 const closeStopModal = () => { state.stopModal = false; }; + //确认停用 + const stopLearnPath = () => { + let obj = { + routerId: state.stopPathId, + type: -1, + }; + api + .handleLearnPath(obj) + .then((res) => { + console.log("停用成功", res); + message.destroy(); + message.success("停用成功"); + state.stopModal = false; + getLearnPath(); + }) + .catch((err) => { + console.log("停用失败", err); + }); + }; + const showDeleteModal = () => { state.deleteModal = true; }; @@ -792,12 +868,35 @@ export default { const closeStartModal = () => { state.startModal = false; }; - const showBackModal = () => { + //打开撤回弹窗 + const showBackModal = (routerId) => { state.backModal = true; + state.recallPathId = routerId; }; + //关闭撤回弹窗 const closeBackModal = () => { state.backModal = false; }; + //确定撤回 + const recallPath = () => { + let obj = { + routerId: state.recallPathId, + type: 0, + }; + api + .handleLearnPath(obj) + .then((res) => { + console.log("撤回成功", res); + message.destroy(); + message.success("撤回成功"); + state.backModal = false; + getLearnPath(); + }) + .catch((err) => { + console.log("撤回失败", err); + }); + }; + const showOwner = () => { state.Ownervisible = true; }; @@ -913,7 +1012,8 @@ export default { style="cursor:pointer" class="jc" onClick={() => { - showPub(); + // console.log("text.record.", text.record); + showPub(text.record.id); }} > 发布 @@ -1047,6 +1147,7 @@ export default { >
{ + state.stopPathId = text.record.id; showStopModal(); }} > @@ -1100,7 +1201,7 @@ export default { >
{ - showBackModal(); + showBackModal(text.record.id); }} > 撤回 @@ -1166,7 +1267,10 @@ export default { }; //创建学习路径图 const createLearnPath = () => { - if (!state.pathName) return message.warning("请输入路径图名称"); + if (!state.pathName) { + message.destroy(); + return message.warning("请输入路径图名称"); + } // if (!state.organizationSelectName) return message.warning("请选择归属组织"); // state.createLoading = true; let obj = { @@ -1206,7 +1310,7 @@ export default { .getLearnPath(obj) .then((res) => { if (res.status === 200) { - console.log("获取路径列表数据", res.data.data); + // console.log("获取路径列表数据", res.data.data); let arr = res.data.data.rows; if ( arr.length === 0 && @@ -1237,7 +1341,7 @@ export default { type: -2, }; api - .deleteLearnPath(obj) + .handleLearnPath(obj) .then((res) => { console.log("删除成功", res); message.success("删除成功"); @@ -1326,17 +1430,20 @@ export default { handleOut, handleOut1, showPub, + releaseLearnPath, closePub, showCopyModal, closeCopyModal, showStopModal, closeStopModal, + stopLearnPath, showDeleteModal, closeDeleteModal, showStartModal, closeStartModal, showBackModal, closeBackModal, + recallPath, showOwner, showPower, tableDataFunc, diff --git a/src/views/learningpath/LevelAdd.vue b/src/views/learningpath/LevelAdd.vue index 0c0c09ba..9558cdd0 100644 --- a/src/views/learningpath/LevelAdd.vue +++ b/src/views/learningpath/LevelAdd.vue @@ -1115,7 +1115,7 @@ export default { pageSize: 10, visiblene: false, sh: false, - nodata: true, + nodata: false, closeDeleteAll: false, curLevel: "", taskSyllabusActive: 0, diff --git a/src/views/system/SystemManage.vue b/src/views/system/SystemManage.vue index 9f5e3800..12d39867 100644 --- a/src/views/system/SystemManage.vue +++ b/src/views/system/SystemManage.vue @@ -90,6 +90,41 @@ export default { imageUrl: "", loading: false, fileList: [], + + voteList: [ + { + id: 1, + stem: "题干一", //题干 + options: [ + { + id: 1, + option: "选项一", + imgUrl: "", + }, + { + id: 2, + option: "选项二", + imgUrl: "", + }, + ], + }, + { + id: 2, + stem: "题干二", //题干 + options: [ + { + id: 1, + option: "选项一", + imgUrl: "", + }, + { + id: 2, + option: "选项二", + imgUrl: "", + }, + ], + }, + ], }); const showDrawer = () => { From e42b67d4833b3ba8d9c4504984840652b372fe12 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E7=86=99=E4=B8=9C?= <2195178163@qq.com> Date: Wed, 2 Nov 2022 20:23:32 +0800 Subject: [PATCH 3/4] =?UTF-8?q?feat=EF=BC=9A=E5=9C=A8=E4=BD=9C=E4=B8=9A?= =?UTF-8?q?=E5=92=8C=E8=80=83=E8=AF=95drawer=E4=B8=AD=E6=96=B0=E5=A2=9E?= =?UTF-8?q?=E7=BC=96=E8=BE=91=C2=B7=E6=9F=A5=E8=AF=A2.=E5=88=A0=E9=99=A4?= =?UTF-8?q?=E5=8A=9F=E8=83=BD=20fix:=20=E6=97=B6=E9=97=B4=E6=A0=8F?= =?UTF-8?q?=E6=98=BE=E7=A4=BAbug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/indexExam.js | 5 +- src/api/indexWork.js | 6 +- src/components/drawers/AddHomework.vue | 86 +++++++++++++++++--------- src/components/drawers/AddTest.vue | 86 ++++++++++++++++++-------- 4 files changed, 127 insertions(+), 56 deletions(-) diff --git a/src/api/indexExam.js b/src/api/indexExam.js index fc9a30af..727dd42c 100644 --- a/src/api/indexExam.js +++ b/src/api/indexExam.js @@ -8,7 +8,10 @@ export const createExamination = (obj) => http.post('/examination/createExaminat // 根据Id删除考试信息 export const deleteExaminationById = (obj) => http.post('/examination/deleteExaminationById',obj); // 根据ID获取考试信息详情 -export const queryExaminationDetailById = (obj) => http.post('/examination/queryExaminationDetailById',obj); +export const queryExaminationDetailById = (obj) => http.post('/examination/queryExaminationDetailById',obj,{headers: { + 'Content-Type': 'application/x-www-form-urlencoded;charset=UTF-8' +} +}); // 创建考试信息接口 export const updateExamination = (obj) => http.post('/examination/updateExamination',obj); diff --git a/src/api/indexWork.js b/src/api/indexWork.js index 49ab456a..d44b72eb 100644 --- a/src/api/indexWork.js +++ b/src/api/indexWork.js @@ -8,7 +8,11 @@ export const createWorkTask = (obj) => http.post('/work/createWorkTask',obj,{ // 删除作业信息接口 export const deleteWorkTask = (obj) => http.post('/work/deleteWorkTask',obj); // 根据ID获取作业信息详情 -export const queryWorkDetailById = (obj) => http.post('/work/queryWorkDetailById',obj); +export const queryWorkDetailById = (obj) => http.post('/work/queryWorkDetailById',obj,{ + headers: { + 'Content-Type': 'application/x-www-form-urlencoded;charset=UTF-8' + } +}); // 修改作业信息接口 export const updateWorkTaskUsing = (obj) => http.post('/work/updateWorkTask',obj); diff --git a/src/components/drawers/AddHomework.vue b/src/components/drawers/AddHomework.vue index e5f6f5fc..9247ee49 100644 --- a/src/components/drawers/AddHomework.vue +++ b/src/components/drawers/AddHomework.vue @@ -3,13 +3,12 @@ :visible="addhomeworkVisible" class="drawerStyle addhomeworkDrawer" width="80%" - title="添加作业" placement="right" @after-visible-change="afterVisibleChange" >
-
添加作业
+
{{workId ? '编辑':'添加' }}作业
@@ -81,7 +80,7 @@ action="/api/file/upload" @change="handleChange" > - +
@@ -106,8 +105,8 @@