From 35d7127fc428c97b520c777fa2ad8df209cb7c0a Mon Sep 17 00:00:00 2001 From: kclf <1195754634@qq.com> Date: Tue, 8 Nov 2022 16:12:24 +0800 Subject: [PATCH 1/7] =?UTF-8?q?=E6=B3=A8=E9=87=8A=E8=B0=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/indexEval.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/api/indexEval.js b/src/api/indexEval.js index f76de0b9..01f7794f 100644 --- a/src/api/indexEval.js +++ b/src/api/indexEval.js @@ -1,5 +1,5 @@ import http from "./config"; -import qs from 'qs'; +// import qs from 'qs'; /** * 接口传参数方式(get) From 880838e8b1bfd37ae77a887105930f342d2ed6ac Mon Sep 17 00:00:00 2001 From: zhangyc Date: Tue, 8 Nov 2022 16:12:42 +0800 Subject: [PATCH 2/7] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=AE=A8=E8=AE=BA?= =?UTF-8?q?=E4=BC=A0=E5=80=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/projectcenter/TaskAdd.vue | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/src/views/projectcenter/TaskAdd.vue b/src/views/projectcenter/TaskAdd.vue index 31969683..18064d82 100644 --- a/src/views/projectcenter/TaskAdd.vue +++ b/src/views/projectcenter/TaskAdd.vue @@ -1716,22 +1716,23 @@ export default { }; const showDrawerAddDiscuss = () => { state.adddiscussvisible = true; - }; + };s //打开编辑讨论的弹窗 - const showEditAddDiscuss = (id)=>{ + const showEditAddDiscuss = (id,eleId)=>{ state.editDiscussId = id + state.projectTaskId = eleId; state.adddiscussvisible = true; } - const showDrawerAddActive = () => { + const showDrawerAddActive = (id,eleId) => { state.addactivevisible = true; }; - const showDrawerAddEval = () => { + const showDrawerAddEval = (id,eleId) => { state.addevalvisible = true; }; - const showDrawerAddInvist = () => { + const showDrawerAddInvist = (id,eleId) => { state.addinvistvisible = true; }; - const showDrawerAddVote = () => { + const showDrawerAddVote = (id,eleId) => { state.addvotevisible = true; }; const showConfirm = () => { @@ -1831,7 +1832,7 @@ export default { state.EditLiveId = id; }; //打开测评的弹窗 - const showEditEvalDrawer = (id) => { + const showEditEvalDrawer = (id,eleId) => { console.log('222222222222222222222',id); state.addevalvisible = true; state.EditRefId = id; @@ -1845,17 +1846,17 @@ export default { showEditRefDrawer(id); } else if (type == "直播") { - showEditLiveDrawer(id); + showEditLiveDrawer(id,eleId),; } else if (type == "测评") { - showEditEvalDrawer(id) + showEditEvalDrawer(id,eleId) } else if (type == "评估") { - showDrawerAddInvist(id); + showDrawerAddInvist(id,eleId); } else if (type == "投票") { - showDrawerAddVote(id); + showDrawerAddVote(id,eleIdd); } else if (type == "讨论") { - showEditAddDiscuss(id); + showEditAddDiscuss(id,eleId); } else if (type == "活动") { - showDrawerAddActive(id); + showDrawerAddActive(id,eleId); }else if (type == "作业") { showDrawerAddHomework(id,eleId); }else if (type == "考试") { From ac807d9dc67abaaab842d9072335045d98c8b942 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B2=B3=E4=BD=B3=E9=91=AB?= Date: Tue, 8 Nov 2022 16:13:40 +0800 Subject: [PATCH 3/7] =?UTF-8?q?feat:=E8=AE=A8=E8=AE=BA=E8=8E=B7=E5=8F=96?= =?UTF-8?q?=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/indexDiscuss.js | 7 +- src/components/drawers/AddDiscuss.vue | 78 +++++++++---- src/views/projectcenter/TaskAdd.vue | 159 +++++++++++++++++++++++++- 3 files changed, 215 insertions(+), 29 deletions(-) diff --git a/src/api/indexDiscuss.js b/src/api/indexDiscuss.js index 5167f69c..7141214c 100644 --- a/src/api/indexDiscuss.js +++ b/src/api/indexDiscuss.js @@ -1,13 +1,16 @@ import http from "./config"; +//import qs from 'qs'; //创建讨论 export const createDiscuss = (obj) => http.post('/discuss/createDiscuss', obj); //获取讨论信息接口 -export const getDiscussDetail = (obj) => http.post('/discuss/getDiscussDetail', { params: obj }); +export const getDiscussDetail = (obj) => http.post('/discuss/getDiscussDetail', obj); //删除讨论接口 export const deleteDiscuss = (obj) => http.post('/discuss/deleteDiscuss', { params: obj }); //修改讨论接口 -export const updateDiscuss = (obj) => http.post('/discuss/updateDiscuss', obj ); \ No newline at end of file +export const updateDiscuss = (obj) => http.post('/discuss/updateDiscuss', obj ); +//修改阶段任务信息 +export const updateTask=(obj)=>http.post('/admin/project/editTask',obj) \ No newline at end of file diff --git a/src/components/drawers/AddDiscuss.vue b/src/components/drawers/AddDiscuss.vue index e13afc92..5005158b 100644 --- a/src/components/drawers/AddDiscuss.vue +++ b/src/components/drawers/AddDiscuss.vue @@ -144,13 +144,34 @@ export default { const closeDrawer = () => { ctx.emit("update:adddiscussVisible", false); ctx.emit("update:edit", false); + console.log("编辑状态",props.edit); state.inputV1 = ""; state.textV1 = ""; }; const afterVisibleChange = (bool) => { console.log("state", bool); + if(bool){ + if(props.isStudiscuss == false){ + if(props.edit){ + //编辑讨论 + console.log("props.editDiscussId",props.editDiscussId) + let formData = new FormData(); + formData.append('discussId',props.editDiscussId); + api.getDiscussDetail(formData).then(res => { + console.log('获取讨论信息成功',res.data.data) + //更新讨论信息 + state.inputV1 = res.data.data.discussName; + state.textV1 = res.data.data.discussExplain; + state.checkedC1 = res.data.data.discussSettings; + }).catch(err=>{ + console.log('获取讨论信息失败',err) + }) + + } + } + } }; - + //console.log("编辑状态",props.edit); //创建讨论(项目任务列表) const createDiscuss = () => { if (!state.inputV1) { @@ -169,26 +190,9 @@ export default { discussTag: "", //是否必修的标识 updateTime: "", //更新时间 updateUser: 0, //更新人 - projectId: 0, //项目id + projectId: props.projectId, //项目id }; - if(props.edit){ - //console.log("编辑"); - console.log("props.editDiscussId",props.editDiscussId) - - let obj = { - discussId: props.editDiscussId, - } - console.log(obj) - api - .getDiscussDetail(obj) - .then((res) => { - console.log("获取成功",res.data); - }) - .catch((err) => { - console.log("获取失败",err.data); - }) - - }else{ + if(props.edit == false){ api .createDiscuss(obj) .then((res) => { @@ -213,8 +217,7 @@ export default { console.log("新增关卡任务成功",res); setTimeout(()=>{ message.success("创建成功"); - ctx.emit("update:adddiscussVisible", false); - closeDrawer(); + ctx.emit("update:adddiscussVisible", false); state.addLoading=false },1000) }).catch(err => { @@ -229,7 +232,7 @@ export default { flag: true, name: obj.discussName, projectId: props.projectId, - projectTaskId: 0, + projectTaskId: "", stageId: props.chooseStageId, type: 8, }) @@ -248,10 +251,35 @@ export default { }) .catch((err) => { console.log("创建失败", err); - }); + }); + }else{ + api + .updateDiscuss(obj) + .then((res)=> { + console.log("更新成功",res) + let taskObj={ + courseId: res.data.data.discussId, + name: obj.discussName, + projectId: props.projectId, + projectTaskId: "", + stageId: props.stageId, + type: 8, + + } + api.updateTask(taskObj).then(taskRes=>{ + console.log('更新阶段任务成功',taskRes) + }).catch(taskErr=>{ + console.log('更新阶段任务失败',taskErr) + }) + }) + .catch((err) => { + console.log("更新失败",err) + }) } - + + }; + return { ...toRefs(state), afterVisibleChange, diff --git a/src/views/projectcenter/TaskAdd.vue b/src/views/projectcenter/TaskAdd.vue index 78618837..448471d9 100644 --- a/src/views/projectcenter/TaskAdd.vue +++ b/src/views/projectcenter/TaskAdd.vue @@ -306,7 +306,7 @@
任务列表
- +
+ + +
+
+
+
+
选择任务移动到阶段
+
+
+
+
+
已选中{{selectRow.length}}个任务
+
+ +
+
+ + +
+
+
+
@@ -993,6 +1031,7 @@ export default { selectedRowKeys: [], valuesname: "", valuesnotice: "", + visiblene: false,//移动任务弹窗 confirmModal: false, //确认添加阶段弹窗 cC: false, cancelModal: false, //确认取消阶段弹窗 @@ -1006,6 +1045,7 @@ export default { deleteActivityID: null, //删除活动id deleteID: "", selectRow: [], //选择行 + curLevel: [], //阶段名称 selectAll: 0, //0:未选择,1:全选,2:部分选择 }); console.log("projectId", state.projectId); @@ -1251,13 +1291,19 @@ export default { if (leng > 0) { //获取任务列表 let arr = res.data.data.stageList[0].taskList; + console.log('任务列表',arr) getTableData(arr); } let stagearr = res.data.data.stageList; - console.log(stagearr, 111111); + let arrlist = state.curLevel; + //console.log(stagearr, 111111); if (stagearr.length > 0) { getStageData(stagearr); + stagearr.map(value => { + console.log(value); + arrlist.push(); + }) } //给阶段id赋初始值 state.chooseStageId = leng > 0 ? stagearr[0].stageId : null; @@ -1638,6 +1684,12 @@ export default { getTask(); }); }; + const showChangeModal = () => { + state.visiblene = true; + } + const closeChangeModal = () => { + state.visiblene = false; + }; //移动任务到阶段 const moveTask = () => { let obj = { @@ -1917,6 +1969,8 @@ export default { closeCancel, showDelete, closeDelete, + showChangeModal, + closeChangeModal, changebgc, getTask, deleteLiveBroadcast, @@ -2095,6 +2149,107 @@ export default { } } } +.changeModal { + .ant-modal { + width: 549px !important; + height: 245px !important; + .ant-modal-content { + width: 549px !important; + height: 245px !important; + .ant-modal-body { + padding: 0 !important; + width: 549px !important; + height: 245px !important; + .con { + // background-color: #bfa; + width: 100%; + height: 100%; + + .header { + width: 100%; + display: flex; + height: 68px; + position: relative; + justify-content: center; + + background: linear-gradient( + rgba(78, 166, 255, 0.2) 0%, + rgba(78, 166, 255, 0) 100% + ); + .inhe { + width: 80%; + height: 100%; + display: flex; + justify-content: space-between; + align-items: center; + .mod { + left: 30px; + top: 27px; + position: absolute; + width: 18px; + height: 17px; + background-image: url(../../assets/images/leveladd/mod.png); + } + .tz { + color: #000000; + font-weight: 400; + font-size: 16px; + } + .mg { + width: 20px; + height: 20px; + background-image: url(../../assets/images/basicinfo/close22.png); + background-size: 100% 100%; + cursor: pointer; + } + } + } + .mid { + width: 100%; + display: flex; + height: 100%; + justify-content: center; + .inher { + width: 80%; + height: 100%; + .cur { + color: #6f6f6f; + font-size: 14px; + } + .select { + margin-top: 10px; + } + .btn { + width: 100%; + display: flex; + justify-content: center; + margin-top: 30px; + .sameb { + width: 100px; + height: 40px; + font-size: 14px; + + border-radius: 8px; + } + .btn1 { + color: #4ea6ff; + background: #ffffff; + border: 1px solid #4ea6ff; + } + .btn2 { + margin-left: 16px; + border: 0; + color: #ffffff; + background: #4ea6ff; + } + } + } + } + } + } + } + } +} .info { width: 78%; // background-color: lightcoral; From e14b5a2bce29be34378b0382bd5fab91fa1c74a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E7=86=99=E4=B8=9C?= <2195178163@qq.com> Date: Tue, 8 Nov 2022 16:56:03 +0800 Subject: [PATCH 4/7] =?UTF-8?q?feat=EF=BC=9A=E6=96=B0=E5=A2=9E=E5=85=B3?= =?UTF-8?q?=E5=8D=A1=E8=B7=AF=E5=BE=84=E4=B8=8B=20=E8=80=83=E8=AF=95?= =?UTF-8?q?=E5=92=8C=E4=BD=9C=E4=B8=9A=E7=9A=84=20=E5=88=A0=E9=99=A4?= =?UTF-8?q?=E3=80=81=E4=BF=AE=E6=94=B9=E3=80=81=E6=B7=BB=E5=8A=A0=EF=BC=8C?= =?UTF-8?q?=20=E5=A2=9E=E5=8A=A0loading=E6=95=88=E6=9E=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/drawers/AddHomework.vue | 70 ++++++++++++------ src/components/drawers/AddTest.vue | 89 +++++++++++++++++------ src/views/learningpath/LevelAddDetail.vue | 82 ++++++++++++++------- 3 files changed, 168 insertions(+), 73 deletions(-) diff --git a/src/components/drawers/AddHomework.vue b/src/components/drawers/AddHomework.vue index a571428d..fa3a1fe9 100644 --- a/src/components/drawers/AddHomework.vue +++ b/src/components/drawers/AddHomework.vue @@ -3,7 +3,7 @@ @after-visible-change="afterVisibleChange">
-
{{ EditWorkId ? '编辑' : '添加' }}作业
+
{{ edit ? '编辑' : '添加' }}作业
@@ -62,16 +62,20 @@ 确定
+
+ +
+ +