From cecb5377d9b0bfcdb52c5880edc4fba3dff2a0db Mon Sep 17 00:00:00 2001 From: lixg Date: Mon, 7 Nov 2022 20:15:21 +0800 Subject: [PATCH 01/11] =?UTF-8?q?feat:=E5=A2=9E=E5=8A=A0=E9=A1=B9=E7=9B=AE?= =?UTF-8?q?=E7=9A=84=E5=8F=91=E5=B8=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/index.js | 14 +- src/views/learningpath/LearningPath.vue | 51 +- src/views/projectcenter/ProjectManage.vue | 6476 ++++++++++++--------- 3 files changed, 3626 insertions(+), 2915 deletions(-) diff --git a/src/api/index.js b/src/api/index.js index 883c6a74..b0db5ad7 100644 --- a/src/api/index.js +++ b/src/api/index.js @@ -1,3 +1,11 @@ +/* + * @Author: lixg lixg@dongwu-inc.com + * @Date: 2022-11-07 17:06:45 + * @LastEditors: lixg lixg@dongwu-inc.com + * @LastEditTime: 2022-11-07 20:11:23 + * @FilePath: /fe-manage/src/api/index.js + * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE + */ import http from "./config"; // import qs from 'qs'; @@ -44,4 +52,8 @@ export const createProject = (obj) => http.post('/admin/project/edit', obj) export const getProjectList = (obj) => http.post('/admin/project/list', obj) // 获取项目详情信息(包含阶段及任务列表) -export const getProjectDetail = (obj) => http.get('/admin/project/detail', { params: obj }) \ No newline at end of file +export const getProjectDetail = (obj) => http.get('/admin/project/detail', { params: obj }) +//发布项目 +export const releaseProject=(obj)=>http.post('/admin/project/publish',obj) +//获取项目学员 +export const projectStudent=(obj)=>http.post('/admin/project/studentList',obj) \ No newline at end of file diff --git a/src/views/learningpath/LearningPath.vue b/src/views/learningpath/LearningPath.vue index 66b1263e..8b02c597 100644 --- a/src/views/learningpath/LearningPath.vue +++ b/src/views/learningpath/LearningPath.vue @@ -226,11 +226,13 @@ -
- +
+ +
- - @@ -590,7 +592,7 @@ import QueryRight from "../../components/drawers/QueryRight"; import ManageRight from "../../components/drawers/ManageRight"; import * as api from "../../api/index1"; import { message } from "ant-design-vue"; -import { toDate,commonData } from "../../api/method"; +import { toDate, commonData } from "../../api/method"; import { storage } from "../../api/storage"; export default { name: "learningPath", @@ -721,7 +723,7 @@ export default { recallPathId: null, //撤回路径id stopPathId: null, //停用路径id - lpLoading:false, + lpLoading: false, }); const selectProjectName = (value, index) => { @@ -1298,19 +1300,30 @@ export default { api .createLearnPath(obj) .then((res) => { - // console.log("创建成功", res); - // message.destroy(); - // message.success("创建成功"); - // router.push("/leveladd"); - setTimeout(() => { - console.log("创建成功", res); - message.destroy(); - message.success("创建成功"); - state.lpLoading = false; - state.currentPage = 1; - router.push("/leveladd"); - // getLearnPath(); - }, commonData.timeout); + let chapterObj = { + name: "关卡一", + remark: "", + routerId: res.data.data.routerId, + }; + //创建关卡 + api + .editChapter(chapterObj) + .then((chapterRes) => { + console.log("关卡创建成功", chapterRes); + setTimeout(() => { + console.log("创建成功", res); + message.destroy(); + message.success("创建成功"); + state.lpLoading = false; + state.currentPage = 1; + router.push("/leveladd"); + storage.set("routerId", res.data.data.routerId); + // getLearnPath(); + }, commonData.timeout); + }) + .catch((chapterErr) => { + console.log("关卡创建失败", chapterErr); + }); }) .catch((err) => { console.log("创建失败", err); diff --git a/src/views/projectcenter/ProjectManage.vue b/src/views/projectcenter/ProjectManage.vue index e7afb705..085f353d 100644 --- a/src/views/projectcenter/ProjectManage.vue +++ b/src/views/projectcenter/ProjectManage.vue @@ -1,56 +1,92 @@ From 1585c7b68ff34454f51b146277fea17d7d8dae9a Mon Sep 17 00:00:00 2001 From: dongwug Date: Tue, 8 Nov 2022 09:06:46 +0800 Subject: [PATCH 02/11] =?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 09/11] =?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 10/11] =?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 11/11] =?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 == "考试") {