mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-14 13:26: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 http from "./config";
|
||||||
// import qs from 'qs';
|
// 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 getProjectList = (obj) => http.post('/admin/project/list', obj)
|
||||||
|
|
||||||
// 获取项目详情信息(包含阶段及任务列表)
|
// 获取项目详情信息(包含阶段及任务列表)
|
||||||
export const getProjectDetail = (obj) => http.get('/admin/project/detail', { params: 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){
|
if(props.edit){
|
||||||
//console.log("编辑");
|
//console.log("编辑");
|
||||||
|
console.log("props.editDiscussId",props.editDiscussId)
|
||||||
|
|
||||||
|
let obj = {
|
||||||
|
discussId: props.editDiscussId,
|
||||||
|
}
|
||||||
|
console.log(obj)
|
||||||
api
|
api
|
||||||
.updateDiscuss(obj)
|
.getDiscussDetail(obj)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
console.log("编辑成功", res);
|
console.log("获取成功",res.data);
|
||||||
message.success("编辑成功");
|
|
||||||
closeDrawer();
|
|
||||||
})
|
})
|
||||||
.catch((err) => console.log(err));
|
.catch((err) => {
|
||||||
|
console.log("获取失败",err.data);
|
||||||
|
})
|
||||||
|
|
||||||
}else{
|
}else{
|
||||||
api
|
api
|
||||||
.createDiscuss(obj)
|
.createDiscuss(obj)
|
||||||
|
|||||||
@@ -226,11 +226,13 @@
|
|||||||
<button class="samtn btn2" @click="createLearnPath">确定</button>
|
<button class="samtn btn2" @click="createLearnPath">确定</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="aeLoading" :style="{display:lpLoading?'flex':'none'}">
|
<div
|
||||||
<a-spin :spinning="lpLoading" tip="添加中..." />
|
class="aeLoading"
|
||||||
|
:style="{ display: lpLoading ? 'flex' : 'none' }"
|
||||||
|
>
|
||||||
|
<a-spin :spinning="lpLoading" tip="添加中..." />
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
|
|
||||||
</a-modal>
|
</a-modal>
|
||||||
|
|
||||||
<!-- 编辑路径弹窗 -->
|
<!-- 编辑路径弹窗 -->
|
||||||
@@ -590,7 +592,7 @@ import QueryRight from "../../components/drawers/QueryRight";
|
|||||||
import ManageRight from "../../components/drawers/ManageRight";
|
import ManageRight from "../../components/drawers/ManageRight";
|
||||||
import * as api from "../../api/index1";
|
import * as api from "../../api/index1";
|
||||||
import { message } from "ant-design-vue";
|
import { message } from "ant-design-vue";
|
||||||
import { toDate,commonData } from "../../api/method";
|
import { toDate, commonData } from "../../api/method";
|
||||||
import { storage } from "../../api/storage";
|
import { storage } from "../../api/storage";
|
||||||
export default {
|
export default {
|
||||||
name: "learningPath",
|
name: "learningPath",
|
||||||
@@ -721,7 +723,7 @@ export default {
|
|||||||
recallPathId: null, //撤回路径id
|
recallPathId: null, //撤回路径id
|
||||||
stopPathId: null, //停用路径id
|
stopPathId: null, //停用路径id
|
||||||
|
|
||||||
lpLoading:false,
|
lpLoading: false,
|
||||||
});
|
});
|
||||||
|
|
||||||
const selectProjectName = (value, index) => {
|
const selectProjectName = (value, index) => {
|
||||||
@@ -1298,19 +1300,30 @@ export default {
|
|||||||
api
|
api
|
||||||
.createLearnPath(obj)
|
.createLearnPath(obj)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
// console.log("创建成功", res);
|
let chapterObj = {
|
||||||
// message.destroy();
|
name: "关卡一",
|
||||||
// message.success("创建成功");
|
remark: "",
|
||||||
// router.push("/leveladd");
|
routerId: res.data.data.routerId,
|
||||||
setTimeout(() => {
|
};
|
||||||
console.log("创建成功", res);
|
//创建关卡
|
||||||
message.destroy();
|
api
|
||||||
message.success("创建成功");
|
.editChapter(chapterObj)
|
||||||
state.lpLoading = false;
|
.then((chapterRes) => {
|
||||||
state.currentPage = 1;
|
console.log("关卡创建成功", chapterRes);
|
||||||
router.push("/leveladd");
|
setTimeout(() => {
|
||||||
// getLearnPath();
|
console.log("创建成功", res);
|
||||||
}, commonData.timeout);
|
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) => {
|
.catch((err) => {
|
||||||
console.log("创建失败", err);
|
console.log("创建失败", err);
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -851,6 +851,8 @@ export default {
|
|||||||
isRefEdit: 1, //外链编辑
|
isRefEdit: 1, //外链编辑
|
||||||
isLiveEdit: 1, //直播编辑
|
isLiveEdit: 1, //直播编辑
|
||||||
EditRefId: null, //要编辑的外链的id
|
EditRefId: null, //要编辑的外链的id
|
||||||
|
EditLiveId: null, //要编辑的直播的id
|
||||||
|
editDiscussId:null,//要编辑的讨论的id
|
||||||
EditEvalId:null,
|
EditEvalId:null,
|
||||||
projectNameList: [
|
projectNameList: [
|
||||||
{
|
{
|
||||||
@@ -1743,6 +1745,11 @@ export default {
|
|||||||
const showDrawerAddDiscuss = () => {
|
const showDrawerAddDiscuss = () => {
|
||||||
state.adddiscussvisible = true;
|
state.adddiscussvisible = true;
|
||||||
};
|
};
|
||||||
|
//打开编辑讨论的弹窗
|
||||||
|
const showEditAddDiscuss = (id)=>{
|
||||||
|
state.editDiscussId = id
|
||||||
|
state.adddiscussvisible = true;
|
||||||
|
}
|
||||||
const showDrawerAddActive = () => {
|
const showDrawerAddActive = () => {
|
||||||
state.addactivevisible = true;
|
state.addactivevisible = true;
|
||||||
};
|
};
|
||||||
@@ -1867,18 +1874,16 @@ export default {
|
|||||||
}
|
}
|
||||||
else if (type == "直播") {
|
else if (type == "直播") {
|
||||||
showEditLiveDrawer(id);
|
showEditLiveDrawer(id);
|
||||||
}
|
} else if (type == "测评") {
|
||||||
else if (type == "测评") {
|
showDrawerAddEval(id);
|
||||||
showEditEvalDrawer(id)
|
} else if (type == "评估") {
|
||||||
}
|
showDrawerAddInvist(id);
|
||||||
else if (type == "评估") {
|
} else if (type == "投票") {
|
||||||
showDrawerAddInvist(id)
|
showDrawerAddVote(id);
|
||||||
}
|
} else if (type == "讨论") {
|
||||||
else if (type == "投票") {
|
showEditAddDiscuss(id);
|
||||||
showDrawerAddVote(id)
|
} else if (type == "活动") {
|
||||||
}
|
showDrawerAddActive(id);
|
||||||
else if (type == "讨论") {
|
|
||||||
showDrawerAddDiscuss(id)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return {
|
return {
|
||||||
|
|||||||
Reference in New Issue
Block a user