From 74b52ac5fca4e857f6349432284451c7c779db22 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 19:33:21 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E7=BC=96=E8=BE=91=E8=AE=A8=E8=AE=BA?= =?UTF-8?q?=E8=8E=B7=E5=8F=96=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/drawers/AddDiscuss.vue | 17 ++++++++++++----- src/views/projectcenter/TaskAdd.vue | 10 +++++++++- 2 files changed, 21 insertions(+), 6 deletions(-) diff --git a/src/components/drawers/AddDiscuss.vue b/src/components/drawers/AddDiscuss.vue index 2dea4b15..bc4903b2 100644 --- a/src/components/drawers/AddDiscuss.vue +++ b/src/components/drawers/AddDiscuss.vue @@ -168,14 +168,21 @@ export default { }; if(props.edit){ //console.log("编辑"); + console.log("props.editDiscussId",props.editDiscussId) + + let obj = { + discussId: props.editDiscussId, + } + console.log(obj) api - .updateDiscuss(obj) + .getDiscussDetail(obj) .then((res) => { - console.log("编辑成功", res); - message.success("编辑成功"); - closeDrawer(); + console.log("获取成功",res.data); }) - .catch((err) => console.log(err)); + .catch((err) => { + console.log("获取失败",err.data); + }) + }else{ api .createDiscuss(obj) diff --git a/src/views/projectcenter/TaskAdd.vue b/src/views/projectcenter/TaskAdd.vue index f675c128..4c7eb81a 100644 --- a/src/views/projectcenter/TaskAdd.vue +++ b/src/views/projectcenter/TaskAdd.vue @@ -852,6 +852,7 @@ export default { isLiveEdit: 1, //直播编辑 EditRefId: null, //要编辑的外链的id EditLiveId: null, //要编辑的直播的id + editDiscussId:null,//要编辑的讨论的id projectNameList: [ { id: 1, @@ -1776,6 +1777,11 @@ export default { const showDrawerAddDiscuss = () => { state.adddiscussvisible = true; }; + //打开编辑讨论的弹窗 + const showEditAddDiscuss = (id)=>{ + state.editDiscussId = id + state.adddiscussvisible = true; + } const showDrawerAddActive = () => { state.addactivevisible = true; }; @@ -1899,7 +1905,9 @@ export default { } else if (type == "投票") { showDrawerAddVote(id); } else if (type == "讨论") { - showDrawerAddDiscuss(id); + showEditAddDiscuss(id); + } else if (type == "活动") { + showDrawerAddActive(id); } }; return { From cecb5377d9b0bfcdb52c5880edc4fba3dff2a0db Mon Sep 17 00:00:00 2001 From: lixg Date: Mon, 7 Nov 2022 20:15:21 +0800 Subject: [PATCH 2/2] =?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 @@