From b3f2be8b4a2b247787109e6641f8e721a57d5ba2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B2=B3=E4=BD=B3=E9=91=AB?= Date: Mon, 7 Nov 2022 17:02:25 +0800 Subject: [PATCH 01/19] =?UTF-8?q?feat:=E8=AE=A8=E8=AE=BA=E7=9A=84=E7=BC=96?= =?UTF-8?q?=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/drawers/AddActive.vue | 8 +++++++- src/components/drawers/AddDiscuss.vue | 25 +++++++++++++++++++++---- src/views/projectcenter/TaskAdd.vue | 5 +++++ 3 files changed, 33 insertions(+), 5 deletions(-) diff --git a/src/components/drawers/AddActive.vue b/src/components/drawers/AddActive.vue index 655b7a3f..030878b3 100644 --- a/src/components/drawers/AddActive.vue +++ b/src/components/drawers/AddActive.vue @@ -9,7 +9,8 @@ >
-
添加活动
+
编辑活动
+
添加活动
{ ctx.emit("update:addactiveVisible", false); + ctx.emit("update:edit", false); state.radioV1 = ""; state.inputV1 = ""; state.inputV2 = ""; diff --git a/src/components/drawers/AddDiscuss.vue b/src/components/drawers/AddDiscuss.vue index 8c92c0e3..2dea4b15 100644 --- a/src/components/drawers/AddDiscuss.vue +++ b/src/components/drawers/AddDiscuss.vue @@ -123,6 +123,10 @@ export default { chooseStageId: { type: Number, default: null, + }, + editDiscussId: { + type: Number, + default: null, } }, setup(props, ctx) { @@ -156,13 +160,24 @@ export default { createTime: "", //创建时间 createUser: 0, //创建人 discussFlag: "", //活动逻辑删除标识 - discussId: 0, //讨论Id + discussId: props.editDiscussId == null ? 0 : props.editDiscussId, //讨论Id discussTag: "", //是否必修的标识 updateTime: "", //更新时间 updateUser: 0, //更新人 projectId: 0, //项目id }; - api + if(props.edit){ + //console.log("编辑"); + api + .updateDiscuss(obj) + .then((res) => { + console.log("编辑成功", res); + message.success("编辑成功"); + closeDrawer(); + }) + .catch((err) => console.log(err)); + }else{ + api .createDiscuss(obj) .then((res) => { console.log("创建成功", res); @@ -175,7 +190,7 @@ export default { if(props.isStudiscuss){ let editObj1 = { chapterId:props.isactive, - courseId: 0, + courseId: res.data.data.discussId, duration: 0, flag: true, name: obj.discussName, @@ -193,7 +208,7 @@ export default { console.log("项目添加讨论"); apiTask .addTask({ - courseId: 0, + courseId: res.data.data.discussId, duration: 0, flag: true, name: obj.discussName, @@ -217,6 +232,8 @@ export default { .catch((err) => { console.log("创建失败", err); }); + } + }; return { ...toRefs(state), diff --git a/src/views/projectcenter/TaskAdd.vue b/src/views/projectcenter/TaskAdd.vue index a978fea0..d5cd61a6 100644 --- a/src/views/projectcenter/TaskAdd.vue +++ b/src/views/projectcenter/TaskAdd.vue @@ -212,6 +212,7 @@ v-model:edit="edit" v-model:projectId="projectId" v-model:chooseStageId="chooseStageId" + v-model:editDiscussId="editDiscussId" @changeData="updateTableData" />
@@ -230,6 +231,7 @@ @@ -1958,6 +1960,9 @@ export default { else if (type == "讨论") { showDrawerAddDiscuss(id) } + else if (type == "活动") { + showDrawerAddActive(id) + } } return { ...toRefs(state), From 536321fb76773a75810103a814e8551f59fccb00 Mon Sep 17 00:00:00 2001 From: lixg Date: Mon, 7 Nov 2022 18:05:48 +0800 Subject: [PATCH 02/19] =?UTF-8?q?style:=E6=B7=BB=E5=8A=A0loading?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package-lock.json | 56 ++++++++++++---------- src/assets/scss/common.scss | 16 ++++++- src/components/drawers/AddDiscuss.vue | 17 +++++-- src/components/drawers/DWF - 快捷方式.lnk | Bin 770 -> 0 bytes src/views/learningpath/LearningPath.vue | 16 ++++--- 5 files changed, 68 insertions(+), 37 deletions(-) delete mode 100644 src/components/drawers/DWF - 快捷方式.lnk diff --git a/package-lock.json b/package-lock.json index a5077801..9e4f0b78 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1414,11 +1414,6 @@ "integrity": "sha512-a5Sab1C4/icpTZVzZc5Ghpz88yQtGOyNqYXcZgOssB2uuAr+wF/MvN6bgtW32q7HHrvBki+BsZ0OuNv6EV3K9g==", "dev": true }, - "@popperjs/core": { - "version": "npm:@sxzz/popperjs-es@2.11.7", - "resolved": "https://registry.npmmirror.com/@sxzz/popperjs-es/-/popperjs-es-2.11.7.tgz", - "integrity": "sha512-Ccy0NlLkzr0Ex2FKvh2X+OyERHXJ88XJ1MXtsI9y9fGexlaXaVTPzBCRBwIxFkORuOb+uBqeu+RqnpgYTEZRUQ==" - }, "@sideway/address": { "version": "4.1.4", "resolved": "https://registry.npmmirror.com/@sideway/address/-/address-4.1.4.tgz", @@ -2029,6 +2024,29 @@ "webpack-merge": "^5.7.3", "webpack-virtual-modules": "^0.4.2", "whatwg-fetch": "^3.6.2" + }, + "dependencies": { + "@vue/vue-loader-v15": { + "version": "npm:vue-loader@15.10.0", + "resolved": "https://registry.npmmirror.com/vue-loader/-/vue-loader-15.10.0.tgz", + "integrity": "sha512-VU6tuO8eKajrFeBzMssFUP9SvakEeeSi1BxdTH5o3+1yUyrldp8IERkSdXlMI2t4kxF2sqYUDsQY+WJBxzBmZg==", + "dev": true, + "requires": { + "@vue/component-compiler-utils": "^3.1.0", + "hash-sum": "^1.0.2", + "loader-utils": "^1.1.0", + "vue-hot-reload-api": "^2.3.0", + "vue-style-loader": "^4.1.0" + }, + "dependencies": { + "hash-sum": { + "version": "1.0.2", + "resolved": "https://registry.npmmirror.com/hash-sum/-/hash-sum-1.0.2.tgz", + "integrity": "sha512-fUs4B4L+mlt8/XAtSOGMUO1TXmAelItBPtJG7CyHJfYTdDjwisntGO2JQz7oUsatOY9o68+57eziUVNw/mRHmA==", + "dev": true + } + } + } } }, "@vue/cli-shared-utils": { @@ -2272,27 +2290,6 @@ "resolved": "https://registry.npmmirror.com/@vue/shared/-/shared-3.2.39.tgz", "integrity": "sha512-D3dl2ZB9qE6mTuWPk9RlhDeP1dgNRUKC3NJxji74A4yL8M2MwlhLKUC/49WHjrNzSPug58fWx/yFbaTzGAQSBw==" }, - "@vue/vue-loader-v15": { - "version": "npm:vue-loader@15.10.0", - "resolved": "https://registry.npmmirror.com/vue-loader/-/vue-loader-15.10.0.tgz", - "integrity": "sha512-VU6tuO8eKajrFeBzMssFUP9SvakEeeSi1BxdTH5o3+1yUyrldp8IERkSdXlMI2t4kxF2sqYUDsQY+WJBxzBmZg==", - "dev": true, - "requires": { - "@vue/component-compiler-utils": "^3.1.0", - "hash-sum": "^1.0.2", - "loader-utils": "^1.1.0", - "vue-hot-reload-api": "^2.3.0", - "vue-style-loader": "^4.1.0" - }, - "dependencies": { - "hash-sum": { - "version": "1.0.2", - "resolved": "https://registry.npmmirror.com/hash-sum/-/hash-sum-1.0.2.tgz", - "integrity": "sha512-fUs4B4L+mlt8/XAtSOGMUO1TXmAelItBPtJG7CyHJfYTdDjwisntGO2JQz7oUsatOY9o68+57eziUVNw/mRHmA==", - "dev": true - } - } - }, "@vue/web-component-wrapper": { "version": "1.3.0", "resolved": "https://registry.npmmirror.com/@vue/web-component-wrapper/-/web-component-wrapper-1.3.0.tgz", @@ -3958,6 +3955,13 @@ "lodash-unified": "^1.0.2", "memoize-one": "^6.0.0", "normalize-wheel-es": "^1.2.0" + }, + "dependencies": { + "@popperjs/core": { + "version": "npm:@sxzz/popperjs-es@2.11.7", + "resolved": "https://registry.npmmirror.com/@sxzz/popperjs-es/-/popperjs-es-2.11.7.tgz", + "integrity": "sha512-Ccy0NlLkzr0Ex2FKvh2X+OyERHXJ88XJ1MXtsI9y9fGexlaXaVTPzBCRBwIxFkORuOb+uBqeu+RqnpgYTEZRUQ==" + } } }, "emoji-regex": { diff --git a/src/assets/scss/common.scss b/src/assets/scss/common.scss index d5affa62..1246b76f 100644 --- a/src/assets/scss/common.scss +++ b/src/assets/scss/common.scss @@ -437,4 +437,18 @@ textarea { } } -//弹窗-------------------------------------------------------- \ No newline at end of file +//弹窗-------------------------------------------------------- + +//loading-------------------------------------------------------- +.aeLoading { + width: 100%; + height: 100%; +background: rgba(0, 0, 0, 0.05); +display: flex; +align-items: center; +justify-content: center; +position: absolute; +left: 0; +top:0, +} +//loading-------------------------------------------------------- \ No newline at end of file diff --git a/src/components/drawers/AddDiscuss.vue b/src/components/drawers/AddDiscuss.vue index 8c92c0e3..90f9f4f7 100644 --- a/src/components/drawers/AddDiscuss.vue +++ b/src/components/drawers/AddDiscuss.vue @@ -67,6 +67,9 @@
+
+ +
From 1585c7b68ff34454f51b146277fea17d7d8dae9a Mon Sep 17 00:00:00 2001 From: dongwug Date: Tue, 8 Nov 2022 09:06:46 +0800 Subject: [PATCH 08/19] =?UTF-8?q?feat:=E8=AF=84=E4=BC=B0=E7=BC=96=E8=BE=91?= =?UTF-8?q?=E7=BC=96=E8=BE=91=E4=BC=A0id?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/drawers/AddEval.vue | 12 ++++++++++-- src/views/projectcenter/TaskAdd.vue | 6 +++--- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/src/components/drawers/AddEval.vue b/src/components/drawers/AddEval.vue index eb7db3d6..1486136c 100644 --- a/src/components/drawers/AddEval.vue +++ b/src/components/drawers/AddEval.vue @@ -103,6 +103,9 @@ + @@ -199,7 +213,7 @@ export default { width: 100%; display: flex; flex-direction: column; - border-bottom: 1px solid #F2F6FC; + border-bottom: 1px solid #f2f6fc; .text { font-size: 16px; color: #363636; @@ -211,33 +225,33 @@ export default { float: left; width: 130px; height: 40px; - border: 1px solid #4EA6FF; + border: 1px solid #4ea6ff; border-radius: 8px; margin-top: 29px; margin-left: 38px; text-align: center; padding-top: 7px; } - .goback { - float: right; - padding-right: 70px; - //padding-top: 37px; - position: relative; - .return { - display: inline-block; - width: 42px; - height: 42px; - margin-top: 17px; - margin-right: 10px; - background-image: url("../../assets/images/projectadd/return.png"); - } - .returntext { - display: inline-block; - position: absolute; - top: 27px; - color: #4EA6FF; - font-size: 14px; - } + .goback { + float: right; + padding-right: 70px; + //padding-top: 37px; + position: relative; + .return { + display: inline-block; + width: 42px; + height: 42px; + margin-top: 17px; + margin-right: 10px; + background-image: url("../../assets/images/projectadd/return.png"); + } + .returntext { + display: inline-block; + position: absolute; + top: 27px; + color: #4ea6ff; + font-size: 14px; + } } } .message { @@ -245,7 +259,7 @@ export default { display: flex; flex-direction: column; .title { - color: #4F5156; + color: #4f5156; font-size: 14px; margin-left: 38px; margin-top: 20px; @@ -258,13 +272,12 @@ export default { margin-left: 38px; margin-bottom: 20px; .name { - color: #999BA3; + color: #999ba3; font-size: 14px; } .descript { - color: #4F5156; - font-size:14px; - + color: #4f5156; + font-size: 14px; } } } @@ -279,15 +292,15 @@ export default { display: flex; flex-direction: column; .tableBox { - margin: 20px 38px 30px ; + margin: 20px 38px 30px; .opacationn { - color: #4EA6FF; + color: #4ea6ff; cursor: pointer; } th.ant-table-cell { - background-color:#EFF4FC !important; + background-color: #eff4fc !important; text-align: center; - color: #999BA3; + color: #999ba3; } td.ant-table-cell { text-align: center; diff --git a/src/views/research/ResearchAdd copy.vue b/src/views/research/ResearchAdd copy.vue new file mode 100644 index 00000000..b2ad3d38 --- /dev/null +++ b/src/views/research/ResearchAdd copy.vue @@ -0,0 +1,760 @@ + + + + diff --git a/src/views/research/ResearchAdd.vue b/src/views/research/ResearchAdd.vue index 85901793..3a97ca47 100644 --- a/src/views/research/ResearchAdd.vue +++ b/src/views/research/ResearchAdd.vue @@ -3,244 +3,45 @@
创建评估 - 返回 + + + + 返回 + +
创建评估类型
-
单选题
-
多选题
-
问答题
-
评分题
+
单选题
+
多选题
+
问答题
+
评分题
-
-
-
单选题
-
-
-
删除选项
-
-
-
-
- -
标题
-
-
- -
-
-
-
-
-
选项1
-
-
- -
-
-
删除
-
-
-
-
+添加图片
-
-
-
-
-
-
选项2
-
-
- -
-
-
删除
-
-
- -
图片名称1.jpg
- -
-
-
- 添加选项 -
-
-
-
-
-
问答题
-
-
-
删除选项
-
-
-
-
- -
标题
-
-
- -
-
-
-
-
描述
-
-
- -
-
-
-
-
-
评分题
-
-
-
删除选项
-
-
-
-
- -
标题
-
-
- -
-
-
-
-
最低分
-
-
- -
-
-
最高分
-
-
- -
-
-
-
非常满意
-
-
- {{ value.text }} -
- -
-
非常不满意
-
-
-
- -
配置权重
-
-
-
-
评估类型
-
整体评估
-
-
-
权重比例
-
20
-
%
-
-
-
+
+ + + +
@@ -248,7 +49,7 @@
保存 + 保存 + 取消 + 取消 +
+ diff --git a/src/views/research/components/ResearchAddItem.vue b/src/views/research/components/ResearchAddItem.vue new file mode 100644 index 00000000..231b7714 --- /dev/null +++ b/src/views/research/components/ResearchAddItem.vue @@ -0,0 +1,439 @@ + + + + diff --git a/src/views/research/components/ResearchAddMulti.vue b/src/views/research/components/ResearchAddMulti.vue new file mode 100644 index 00000000..d9be59ba --- /dev/null +++ b/src/views/research/components/ResearchAddMulti.vue @@ -0,0 +1,471 @@ + + + + diff --git a/src/views/research/components/ResearchAddPin.vue b/src/views/research/components/ResearchAddPin.vue new file mode 100644 index 00000000..6aa0b8c5 --- /dev/null +++ b/src/views/research/components/ResearchAddPin.vue @@ -0,0 +1,568 @@ + + + + diff --git a/src/views/research/components/ResearchAddSingle.vue b/src/views/research/components/ResearchAddSingle.vue new file mode 100644 index 00000000..10e974e6 --- /dev/null +++ b/src/views/research/components/ResearchAddSingle.vue @@ -0,0 +1,471 @@ + + + + diff --git a/vue.config.js b/vue.config.js index 6dbe03ab..00b489e9 100644 --- a/vue.config.js +++ b/vue.config.js @@ -1,17 +1,17 @@ -const { defineConfig } = require('@vue/cli-service') +const { defineConfig } = require("@vue/cli-service"); module.exports = defineConfig({ - transpileDependencies: true, - devServer: { - proxy: { - "/api": { - target: "http://111.231.196.214:30001/", - changeOrigin: true, - secure: false, - ws: false, - pathRewrite: { - "^/api": "", - }, - }, - }, - } -}) \ No newline at end of file + // transpileDependencies: true, + devServer: { + proxy: { + "/api": { + target: "http://111.231.196.214:30001/", //这里后台的地址模拟的;应该填写你们真实的后台接口 + changeOrigin: true, //表示是否改变原域名 + // secure: false, + // ws: false, //表示WebSocket协议 + pathRewrite: { + "^/api": "", + }, + }, + }, + }, +}); From ad72d86668e57b924d1e27a2f9206a7aa5329e98 Mon Sep 17 00:00:00 2001 From: dongwug Date: Tue, 8 Nov 2022 15:58:21 +0800 Subject: [PATCH 15/19] =?UTF-8?q?feat:=E5=88=A0=E9=99=A4=E6=8A=95=E7=A5=A8?= =?UTF-8?q?=E4=BF=A1=E6=81=AF=E6=8E=A5=E5=8F=A3=20=E8=8E=B7=E5=8F=96?= =?UTF-8?q?=E9=A2=98=E5=B9=B2=E4=BF=A1=E6=81=AF=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/drawers/AddVote.vue | 127 +++++++++++++++++++--------- src/components/drawers/CreVote.vue | 17 +++- src/views/projectcenter/TaskAdd.vue | 13 ++- 3 files changed, 113 insertions(+), 44 deletions(-) diff --git a/src/components/drawers/AddVote.vue b/src/components/drawers/AddVote.vue index cf784131..39681d3e 100644 --- a/src/components/drawers/AddVote.vue +++ b/src/components/drawers/AddVote.vue @@ -48,16 +48,34 @@
创建投票: -
- - -
传过来的name
- +
+ + +
+
+ 传过来的name +
+
+
- +
@@ -170,14 +188,15 @@ export default { const state = reactive({ inputV1: "", textV1: "", - creVote:false, + creVote: false, crevotevisible: false, time: undefined, basevote: "", endTimes: "", startTimes: "", - ascriptionId:"", - voteStemId:"", + ascriptionId: "", + voteStemId: "", + voteId:"", }); const closeDrawer = () => { ctx.emit("update:addvoteVisible", false); @@ -190,15 +209,45 @@ export default { state.crevotevisible = true; }; const changeVData = (data) => { - console.log('111', data); - state.creVote = data.creVote - state.ascriptionId = data.ascriptionId - state.voteStemId = data.voteStemId - console.log('222',state.creVote); - console.log('333',state.ascriptionId); - } + console.log("111", data); + state.creVote = data.creVote; + state.ascriptionId = data.ascriptionId; + state.voteStemId = data.voteStemId; + console.log("222", state.creVote); + console.log("333", state.ascriptionId); + }; const delBox = () => { state.creVote = false; + dleVoteStem() + }; + + //获取题干信息 + // const getStemText = () => { + // let objstem = { + // stemId: state.ascriptionId, + // ascriptionId: state.voteStemId, + // } + // api + // .queryStemByStemId(objstem) + // .then((res) => { + // console.log("获取成功", res); + // message.success("获取成功"); + // }) + // .catch((err) => { + // console.log(err); + // }); + // } + + //删除题干信息接口 + const dleVoteStem = () => { + let objdelstem = { + voteStemId:state.voteStemId + } + api.deleteVoteStem(objdelstem) + .then((res) => { + console.log('删除题干信息成功', res) + message.success('删除题干信息成功') + }) } //创建投票信息 const createVoteText = () => { @@ -227,17 +276,13 @@ export default { // }; let obj = { + ascriptionId: state.ascriptionId, baseVote: state.basevote, - createTime: "", createUser: 0, - stem: "", - stemId: 0, - updateTime: "", updateUser: 0, voteEndTime: state.endTimes, voteExplain: state.textV1, voteFlag: "", - voteId: 0, voteName: state.inputV1, voteStartTime: state.startTimes, voteTag: "", @@ -245,22 +290,23 @@ export default { api .createVote(obj) .then((res) => { - console.log("创建成功", res); + console.log("创建成功123", res); message.success("创建成功"); + ctx.emit("getData", res.data.data.voteId); closeDrawer(); if (props.learn == 0) - apitaskadd - .addTask({ - courseId: 0, - duration: 0, - flag: true, - name: obj.voteName, - projectId: props.projectId, - projectTaskId: 0, - stageId: props.chooseStageId, - type: 12, - }) - .then((res) => { + apitaskadd + .addTask({ + courseId: 0, + duration: 0, + flag: true, + name: obj.voteName, + projectId: props.projectId, + projectTaskId: 0, + stageId: props.chooseStageId, + type: 12, + }) + .then((res) => { console.log("调用项目添加接口后", res.data); //自定义事件给父组件传值 ctx.emit("changeData", false); @@ -271,7 +317,7 @@ export default { .catch((err) => { console.log(err); }); - else { + else { let editObj1 = { chapterId: 36, courseId: 0, @@ -282,7 +328,7 @@ export default { routerTaskId: 0, type: 12, }; - RouterEditTask(editObj1) + RouterEditTask(editObj1); } }) .catch((err) => { @@ -297,6 +343,7 @@ export default { changeVData, rowSelection, options1, + dleVoteStem, createVoteText, delBox, }; @@ -359,15 +406,15 @@ export default { color: #fff; margin-right: 10px; } - .fileTigan{ + .fileTigan { display: flex; align-items: center; padding: 3px 5px; background-color: rgba(42, 103, 209, 0.4); - span{ + span { margin-right: 5px; } - .delBox{ + .delBox { width: 13px; height: 13px; background-image: url(@/assets/images/basicinfo/ch.png); diff --git a/src/components/drawers/CreVote.vue b/src/components/drawers/CreVote.vue index f8f1cc35..fb0c3ebf 100644 --- a/src/components/drawers/CreVote.vue +++ b/src/components/drawers/CreVote.vue @@ -157,6 +157,7 @@ export default { console.log("state", bool); }; + //创建题干接口 const createQueTit = () => { if (!state.questions[0].inputV) { message.destroy(); @@ -170,11 +171,9 @@ export default { let obj = [ { ascriptionId: 0, - createTime: "", createUser: 0, optionDetailList: [ { - createTime: "", createUser: 0, optionId: 0, optionName: "", @@ -201,6 +200,20 @@ export default { console.log('res.data.data[0].ascriptionId',res.data.data[0].ascriptionId); console.log('res.data.data[0].voteStemId',res.data.data[0].voteStemId); message.success("创建成功"); + //获取题干信息 + let objstem = { + stemId: res.data.data[0].ascriptionId, + ascriptionId: res.data.data[0].voteStemId, + } + api + .queryStemByStemId(objstem) + .then((res) => { + console.log("获取成功", res); + message.success("获取成功"); + }) + .catch((err) => { + console.log(err); + }); let stemData = { creVote: state.creVote, ascriptionId: res.data.data[0].ascriptionId, diff --git a/src/views/projectcenter/TaskAdd.vue b/src/views/projectcenter/TaskAdd.vue index ad6cc7c0..a2e5360f 100644 --- a/src/views/projectcenter/TaskAdd.vue +++ b/src/views/projectcenter/TaskAdd.vue @@ -311,6 +311,7 @@ { + console.log("8989", data); + state.voteId = data.voteId; + } //数据变化 const updateTableData = (data) => { console.log("添加数据", data); @@ -1542,7 +1549,8 @@ export default { api .deleteTask(obj) .then((res) => { - console.log(res); + console.log(res,'gggggggggggggggg'); + // deleteVoteText(); }) .catch((err) => { console.log(err); @@ -1552,7 +1560,7 @@ export default { //删除投票信息 const deleteVoteText = () => { let obj = { - voteId: "", + voteId: state.voteId, }; apivote .deleteVoteMessage(obj) @@ -1905,6 +1913,7 @@ export default { deleteTask, editStage, updateTableData, + changeVData, changeRow, selectRowAll, changeCourseType, 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 16/19] =?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 17/19] =?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 18/19] =?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 19/19] =?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 @@ 确定
+
+ +
+ +