mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-14 05:16:45 +08:00
合并
This commit is contained in:
@@ -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';
|
||||
|
||||
@@ -45,3 +53,7 @@ export const getProjectList = (obj) => http.post('/admin/project/list', obj)
|
||||
|
||||
// 获取项目详情信息(包含阶段及任务列表)
|
||||
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)
|
||||
@@ -173,14 +173,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)
|
||||
|
||||
@@ -226,11 +226,13 @@
|
||||
<button class="samtn btn2" @click="createLearnPath">确定</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="aeLoading" :style="{display:lpLoading?'flex':'none'}">
|
||||
<div
|
||||
class="aeLoading"
|
||||
:style="{ display: lpLoading ? 'flex' : 'none' }"
|
||||
>
|
||||
<a-spin :spinning="lpLoading" tip="添加中..." />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</a-modal>
|
||||
|
||||
<!-- 编辑路径弹窗 -->
|
||||
@@ -1298,10 +1300,16 @@ export default {
|
||||
api
|
||||
.createLearnPath(obj)
|
||||
.then((res) => {
|
||||
// console.log("创建成功", res);
|
||||
// message.destroy();
|
||||
// message.success("创建成功");
|
||||
// router.push("/leveladd");
|
||||
let chapterObj = {
|
||||
name: "关卡一",
|
||||
remark: "",
|
||||
routerId: res.data.data.routerId,
|
||||
};
|
||||
//创建关卡
|
||||
api
|
||||
.editChapter(chapterObj)
|
||||
.then((chapterRes) => {
|
||||
console.log("关卡创建成功", chapterRes);
|
||||
setTimeout(() => {
|
||||
console.log("创建成功", res);
|
||||
message.destroy();
|
||||
@@ -1309,9 +1317,14 @@ export default {
|
||||
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);
|
||||
// state.createLoading = false;
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -851,6 +851,8 @@ export default {
|
||||
isRefEdit: 1, //外链编辑
|
||||
isLiveEdit: 1, //直播编辑
|
||||
EditRefId: null, //要编辑的外链的id
|
||||
EditLiveId: null, //要编辑的直播的id
|
||||
editDiscussId:null,//要编辑的讨论的id
|
||||
EditEvalId:null,
|
||||
projectNameList: [
|
||||
{
|
||||
@@ -1743,6 +1745,11 @@ export default {
|
||||
const showDrawerAddDiscuss = () => {
|
||||
state.adddiscussvisible = true;
|
||||
};
|
||||
//打开编辑讨论的弹窗
|
||||
const showEditAddDiscuss = (id)=>{
|
||||
state.editDiscussId = id
|
||||
state.adddiscussvisible = true;
|
||||
}
|
||||
const showDrawerAddActive = () => {
|
||||
state.addactivevisible = true;
|
||||
};
|
||||
@@ -1867,18 +1874,16 @@ export default {
|
||||
}
|
||||
else if (type == "直播") {
|
||||
showEditLiveDrawer(id);
|
||||
}
|
||||
else if (type == "测评") {
|
||||
showEditEvalDrawer(id)
|
||||
}
|
||||
else if (type == "评估") {
|
||||
showDrawerAddInvist(id)
|
||||
}
|
||||
else if (type == "投票") {
|
||||
showDrawerAddVote(id)
|
||||
}
|
||||
else if (type == "讨论") {
|
||||
showDrawerAddDiscuss(id)
|
||||
} else if (type == "测评") {
|
||||
showDrawerAddEval(id);
|
||||
} else if (type == "评估") {
|
||||
showDrawerAddInvist(id);
|
||||
} else if (type == "投票") {
|
||||
showDrawerAddVote(id);
|
||||
} else if (type == "讨论") {
|
||||
showEditAddDiscuss(id);
|
||||
} else if (type == "活动") {
|
||||
showDrawerAddActive(id);
|
||||
}
|
||||
}
|
||||
return {
|
||||
|
||||
Reference in New Issue
Block a user