mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-08 02:16:45 +08:00
feat:增加学习路径的发布/停用/撤回
This commit is contained in:
@@ -43,14 +43,24 @@ export const uploadFile = (obj) => http.post('/test/testRequest', qs.stringify({
|
|||||||
export const createLearnPath = (obj) => http.post('/admin/router/edit', obj);
|
export const createLearnPath = (obj) => http.post('/admin/router/edit', obj);
|
||||||
// 获取学习路径图列表
|
// 获取学习路径图列表
|
||||||
export const getLearnPath = (obj) => http.post('/admin/router/list', obj);
|
export const getLearnPath = (obj) => http.post('/admin/router/list', obj);
|
||||||
//删除学习路径图
|
//学习路径图的发布、停用、删除
|
||||||
export const deleteLearnPath = (obj) => http.post('/admin/router/handle', obj);
|
export const handleLearnPath = (obj) => http.post('/admin/router/handle', obj);
|
||||||
|
|
||||||
//获取关卡
|
//获取关卡
|
||||||
export const getChapter = (obj) => http.post('/admin/router/detail', { params: obj });
|
export const getChapter = (obj) => http.post('/admin/router/detail', { params: obj });
|
||||||
|
|
||||||
//新建或编辑关卡
|
//新建或编辑关卡
|
||||||
export const editChapter = (obj) => http.post('/admin/router/editChapter', obj);
|
export const editChapter = (obj) => http.post('/admin/router/editChapter', obj);
|
||||||
|
//获取学员列表
|
||||||
|
export const getStudent = (obj) => http.post('/admin/router/studentList', obj);
|
||||||
|
//获取路径图详情-包含关卡及任务列表
|
||||||
|
export const getRouterDetail = (routerId) => http.get('/admin/router/detail', {
|
||||||
|
params: {
|
||||||
|
routerId: routerId,
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// 测试方法
|
// 测试方法
|
||||||
// import * as api from '../../api/index'
|
// import * as api from '../../api/index'
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ export default {
|
|||||||
href: "/learningpath",
|
href: "/learningpath",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "关卡",
|
name: "管理",
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
@@ -60,7 +60,7 @@ export default {
|
|||||||
href: "/learningpath",
|
href: "/learningpath",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "关卡",
|
name: "管理",
|
||||||
href: "/leveladd",
|
href: "/leveladd",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -75,7 +75,7 @@ export default {
|
|||||||
href: "/learningpath",
|
href: "/learningpath",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "关卡",
|
name: "管理",
|
||||||
href: "/leveladd",
|
href: "/leveladd",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -155,7 +155,7 @@ export default {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "查看",
|
name: "查看",
|
||||||
href:"/libraryadd",
|
href: "/libraryadd",
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -398,21 +398,21 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="modalMain">
|
<div class="modalMain">
|
||||||
<div class="projectname">产品经理上升路径</div>
|
<div class="projectname">产品经理上升路径</div>
|
||||||
<div class="projecttime">
|
<!-- <div class="projecttime">
|
||||||
<span class="timeti">路径时间:</span
|
<span class="timeti">路径时间:</span
|
||||||
><span class="timeme">2022/08/01-2022/08/30</span>
|
><span class="timeme">2022/08/01-2022/08/30</span>
|
||||||
</div>
|
</div> -->
|
||||||
<div class="projectbox">
|
<div class="projectbox">
|
||||||
<div class="promessage">
|
<div class="promessage">
|
||||||
<div class="messageme">路径信息</div>
|
<div class="messageme">路径信息</div>
|
||||||
<div class="messagege">当前路径共0个阶段,0个任务</div>
|
<div class="messagege">当前路径共0个关卡,0个任务</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="stumessage">
|
<div class="stumessage">
|
||||||
<div class="messageme1">学员信息</div>
|
<div class="messageme1">学员信息</div>
|
||||||
<div class="messagege1">路径共0名学员</div>
|
<div class="messagege1">路径共{{ routeStudentsNum }}名学员</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="send">
|
<!-- <div class="send">
|
||||||
<a-switch v-model:checked="checked" size="small" />
|
<a-switch v-model:checked="checked" size="small" />
|
||||||
<span class="sendtext">发送路径通知</span>
|
<span class="sendtext">发送路径通知</span>
|
||||||
</div>
|
</div>
|
||||||
@@ -423,10 +423,10 @@
|
|||||||
<a-checkbox v-model:checked="checkStu"
|
<a-checkbox v-model:checked="checkStu"
|
||||||
><span class="sendpeo">发给学员</span></a-checkbox
|
><span class="sendpeo">发给学员</span></a-checkbox
|
||||||
>
|
>
|
||||||
</div>
|
</div> -->
|
||||||
<div class="pubtn">
|
<div class="pubtn">
|
||||||
<a-button class="pubtn1" @click="closeModal">取消</a-button>
|
<a-button class="pubtn1" @click="closePub">取消</a-button>
|
||||||
<a-button class="pubtn2" @click="closeModal">发布</a-button>
|
<a-button class="pubtn2" @click="releaseLearnPath">发布</a-button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</a-modal>
|
</a-modal>
|
||||||
@@ -481,10 +481,10 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="del_btnbox">
|
<div class="del_btnbox">
|
||||||
<div class="del_btn btn1">
|
<div class="del_btn btn1">
|
||||||
<div class="btnText" @click="delete_exit">取消</div>
|
<div class="btnText" @click="closeStopModal">取消</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="del_btn btn2">
|
<div class="del_btn btn2">
|
||||||
<div class="btnText" @click="delete_exit">确定</div>
|
<div class="btnText" @click="stopLearnPath">确定</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -572,10 +572,10 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="del_btnbox">
|
<div class="del_btnbox">
|
||||||
<div class="del_btn btn1">
|
<div class="del_btn btn1">
|
||||||
<div class="btnText" @click="delete_exit">取消</div>
|
<div class="btnText" @click="closeBackModal">取消</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="del_btn btn2">
|
<div class="del_btn btn2">
|
||||||
<div class="btnText" @click="delete_exit">确定</div>
|
<div class="btnText" @click="recallPath">确定</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -726,6 +726,11 @@ export default {
|
|||||||
searchdate: null, //选择时间
|
searchdate: null, //选择时间
|
||||||
startTime: null, //开始时间
|
startTime: null, //开始时间
|
||||||
endTime: null, //结束时间
|
endTime: null, //结束时间
|
||||||
|
//发布---------------
|
||||||
|
releasePathId: null, //发布路径id
|
||||||
|
routeStudentsNum: 0,
|
||||||
|
recallPathId: null, //撤回路径id
|
||||||
|
stopPathId: null, //停用路径id
|
||||||
});
|
});
|
||||||
|
|
||||||
const selectProjectName = (value, index) => {
|
const selectProjectName = (value, index) => {
|
||||||
@@ -761,9 +766,58 @@ export default {
|
|||||||
console.log(id);
|
console.log(id);
|
||||||
state.learnPathBg2 = id;
|
state.learnPathBg2 = id;
|
||||||
};
|
};
|
||||||
const showPub = () => {
|
//发布弹窗
|
||||||
|
const showPub = (routerId) => {
|
||||||
state.pub = true;
|
state.pub = true;
|
||||||
|
state.releasePathId = routerId;
|
||||||
|
//获取学员总数
|
||||||
|
let obj = {
|
||||||
|
pageNo: 0,
|
||||||
|
pageSize: 0,
|
||||||
|
routerId: routerId,
|
||||||
|
};
|
||||||
|
api
|
||||||
|
.getStudent(obj)
|
||||||
|
.then((res) => {
|
||||||
|
if (res.status === 200) {
|
||||||
|
// console.log("res", res.data.data);
|
||||||
|
state.routeStudentsNum = res.data.data.total;
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.catch((err) => {
|
||||||
|
console.log("err", err);
|
||||||
|
});
|
||||||
|
//获取学习路径详细信息
|
||||||
|
api
|
||||||
|
.getRouterDetail(routerId)
|
||||||
|
.then((res) => {
|
||||||
|
console.log("学习路径详情", res);
|
||||||
|
})
|
||||||
|
.catch((err) => {
|
||||||
|
console.log("学习路径详情获取错误", err);
|
||||||
|
});
|
||||||
};
|
};
|
||||||
|
//确定发布
|
||||||
|
const releaseLearnPath = () => {
|
||||||
|
// console.log("state.releasePathId", state.releasePathId);
|
||||||
|
let obj = {
|
||||||
|
routerId: state.releasePathId,
|
||||||
|
type: 1,
|
||||||
|
};
|
||||||
|
api
|
||||||
|
.handleLearnPath(obj)
|
||||||
|
.then((res) => {
|
||||||
|
console.log("发布成功", res);
|
||||||
|
message.destroy();
|
||||||
|
message.success("发布成功");
|
||||||
|
state.pub = false;
|
||||||
|
getLearnPath();
|
||||||
|
})
|
||||||
|
.catch((err) => {
|
||||||
|
console.log("发布失败", err);
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
const closePub = () => {
|
const closePub = () => {
|
||||||
state.pub = false;
|
state.pub = false;
|
||||||
};
|
};
|
||||||
@@ -773,12 +827,34 @@ export default {
|
|||||||
const closeCopyModal = () => {
|
const closeCopyModal = () => {
|
||||||
state.copyModal = false;
|
state.copyModal = false;
|
||||||
};
|
};
|
||||||
|
//显示停用窗口
|
||||||
const showStopModal = () => {
|
const showStopModal = () => {
|
||||||
state.stopModal = true;
|
state.stopModal = true;
|
||||||
};
|
};
|
||||||
|
//关闭停用窗口
|
||||||
const closeStopModal = () => {
|
const closeStopModal = () => {
|
||||||
state.stopModal = false;
|
state.stopModal = false;
|
||||||
};
|
};
|
||||||
|
//确认停用
|
||||||
|
const stopLearnPath = () => {
|
||||||
|
let obj = {
|
||||||
|
routerId: state.stopPathId,
|
||||||
|
type: -1,
|
||||||
|
};
|
||||||
|
api
|
||||||
|
.handleLearnPath(obj)
|
||||||
|
.then((res) => {
|
||||||
|
console.log("停用成功", res);
|
||||||
|
message.destroy();
|
||||||
|
message.success("停用成功");
|
||||||
|
state.stopModal = false;
|
||||||
|
getLearnPath();
|
||||||
|
})
|
||||||
|
.catch((err) => {
|
||||||
|
console.log("停用失败", err);
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
const showDeleteModal = () => {
|
const showDeleteModal = () => {
|
||||||
state.deleteModal = true;
|
state.deleteModal = true;
|
||||||
};
|
};
|
||||||
@@ -792,12 +868,35 @@ export default {
|
|||||||
const closeStartModal = () => {
|
const closeStartModal = () => {
|
||||||
state.startModal = false;
|
state.startModal = false;
|
||||||
};
|
};
|
||||||
const showBackModal = () => {
|
//打开撤回弹窗
|
||||||
|
const showBackModal = (routerId) => {
|
||||||
state.backModal = true;
|
state.backModal = true;
|
||||||
|
state.recallPathId = routerId;
|
||||||
};
|
};
|
||||||
|
//关闭撤回弹窗
|
||||||
const closeBackModal = () => {
|
const closeBackModal = () => {
|
||||||
state.backModal = false;
|
state.backModal = false;
|
||||||
};
|
};
|
||||||
|
//确定撤回
|
||||||
|
const recallPath = () => {
|
||||||
|
let obj = {
|
||||||
|
routerId: state.recallPathId,
|
||||||
|
type: 0,
|
||||||
|
};
|
||||||
|
api
|
||||||
|
.handleLearnPath(obj)
|
||||||
|
.then((res) => {
|
||||||
|
console.log("撤回成功", res);
|
||||||
|
message.destroy();
|
||||||
|
message.success("撤回成功");
|
||||||
|
state.backModal = false;
|
||||||
|
getLearnPath();
|
||||||
|
})
|
||||||
|
.catch((err) => {
|
||||||
|
console.log("撤回失败", err);
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
const showOwner = () => {
|
const showOwner = () => {
|
||||||
state.Ownervisible = true;
|
state.Ownervisible = true;
|
||||||
};
|
};
|
||||||
@@ -913,7 +1012,8 @@ export default {
|
|||||||
style="cursor:pointer"
|
style="cursor:pointer"
|
||||||
class="jc"
|
class="jc"
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
showPub();
|
// console.log("text.record.", text.record);
|
||||||
|
showPub(text.record.id);
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
发布
|
发布
|
||||||
@@ -1047,6 +1147,7 @@ export default {
|
|||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
|
state.stopPathId = text.record.id;
|
||||||
showStopModal();
|
showStopModal();
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
@@ -1100,7 +1201,7 @@ export default {
|
|||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
showBackModal();
|
showBackModal(text.record.id);
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
撤回
|
撤回
|
||||||
@@ -1166,7 +1267,10 @@ export default {
|
|||||||
};
|
};
|
||||||
//创建学习路径图
|
//创建学习路径图
|
||||||
const createLearnPath = () => {
|
const createLearnPath = () => {
|
||||||
if (!state.pathName) return message.warning("请输入路径图名称");
|
if (!state.pathName) {
|
||||||
|
message.destroy();
|
||||||
|
return message.warning("请输入路径图名称");
|
||||||
|
}
|
||||||
// if (!state.organizationSelectName) return message.warning("请选择归属组织");
|
// if (!state.organizationSelectName) return message.warning("请选择归属组织");
|
||||||
// state.createLoading = true;
|
// state.createLoading = true;
|
||||||
let obj = {
|
let obj = {
|
||||||
@@ -1206,7 +1310,7 @@ export default {
|
|||||||
.getLearnPath(obj)
|
.getLearnPath(obj)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
if (res.status === 200) {
|
if (res.status === 200) {
|
||||||
console.log("获取路径列表数据", res.data.data);
|
// console.log("获取路径列表数据", res.data.data);
|
||||||
let arr = res.data.data.rows;
|
let arr = res.data.data.rows;
|
||||||
if (
|
if (
|
||||||
arr.length === 0 &&
|
arr.length === 0 &&
|
||||||
@@ -1237,7 +1341,7 @@ export default {
|
|||||||
type: -2,
|
type: -2,
|
||||||
};
|
};
|
||||||
api
|
api
|
||||||
.deleteLearnPath(obj)
|
.handleLearnPath(obj)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
console.log("删除成功", res);
|
console.log("删除成功", res);
|
||||||
message.success("删除成功");
|
message.success("删除成功");
|
||||||
@@ -1326,17 +1430,20 @@ export default {
|
|||||||
handleOut,
|
handleOut,
|
||||||
handleOut1,
|
handleOut1,
|
||||||
showPub,
|
showPub,
|
||||||
|
releaseLearnPath,
|
||||||
closePub,
|
closePub,
|
||||||
showCopyModal,
|
showCopyModal,
|
||||||
closeCopyModal,
|
closeCopyModal,
|
||||||
showStopModal,
|
showStopModal,
|
||||||
closeStopModal,
|
closeStopModal,
|
||||||
|
stopLearnPath,
|
||||||
showDeleteModal,
|
showDeleteModal,
|
||||||
closeDeleteModal,
|
closeDeleteModal,
|
||||||
showStartModal,
|
showStartModal,
|
||||||
closeStartModal,
|
closeStartModal,
|
||||||
showBackModal,
|
showBackModal,
|
||||||
closeBackModal,
|
closeBackModal,
|
||||||
|
recallPath,
|
||||||
showOwner,
|
showOwner,
|
||||||
showPower,
|
showPower,
|
||||||
tableDataFunc,
|
tableDataFunc,
|
||||||
|
|||||||
@@ -1115,7 +1115,7 @@ export default {
|
|||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
visiblene: false,
|
visiblene: false,
|
||||||
sh: false,
|
sh: false,
|
||||||
nodata: true,
|
nodata: false,
|
||||||
closeDeleteAll: false,
|
closeDeleteAll: false,
|
||||||
curLevel: "",
|
curLevel: "",
|
||||||
taskSyllabusActive: 0,
|
taskSyllabusActive: 0,
|
||||||
|
|||||||
@@ -90,6 +90,41 @@ export default {
|
|||||||
imageUrl: "",
|
imageUrl: "",
|
||||||
loading: false,
|
loading: false,
|
||||||
fileList: [],
|
fileList: [],
|
||||||
|
|
||||||
|
voteList: [
|
||||||
|
{
|
||||||
|
id: 1,
|
||||||
|
stem: "题干一", //题干
|
||||||
|
options: [
|
||||||
|
{
|
||||||
|
id: 1,
|
||||||
|
option: "选项一",
|
||||||
|
imgUrl: "",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 2,
|
||||||
|
option: "选项二",
|
||||||
|
imgUrl: "",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 2,
|
||||||
|
stem: "题干二", //题干
|
||||||
|
options: [
|
||||||
|
{
|
||||||
|
id: 1,
|
||||||
|
option: "选项一",
|
||||||
|
imgUrl: "",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 2,
|
||||||
|
option: "选项二",
|
||||||
|
imgUrl: "",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
],
|
||||||
});
|
});
|
||||||
|
|
||||||
const showDrawer = () => {
|
const showDrawer = () => {
|
||||||
|
|||||||
Reference in New Issue
Block a user