-
+
+ {text.record.state === "草稿" ? (
+
+
{
- router.push({
- path: "/leveladd",
- });
- storage.set("routerId", text.record.id);
+ // console.log("text.record.", text.record);
+ showPub(text.record);
}}
- >
- 管理
+ >
+ 发布
+
+
{
+ // console.log("text.record", text.record);
+
+ getLearnPathInfo(text.record.id);
+ }}
+ >
+ 编辑
+
-
+ )}
+ {text.record.state === "已发布" ? (
+
+
{
+ // state.out1 = true;
+ // state.pathName = text.record.manager;
+ // // state.pathBg = "";
+ // // state.organizationSelectName = null;
+ // // state.organizationSelectId = null;
+ // state.pathIntro = text.record.remark;
+ // state.editPathId = text.record.id;
+ }}
+ >
+
+ ) : (
+
+ )}
+ {
+ // text.record.state === "未发布" ? (
+ //
+ //
{
+ // showCopyModal();
+ // }}
+ // >
+ // 复制
+ //
+ //
+ // ) : (
+ //
+ // )
+ }
+
+
+
{
+ router.push({
+ path: "/leveladd",
+ });
+ storage.set("routerId", text.record.id);
+ }}
+ >
+ 管理
+
+ {/**
+ //
+
-
-
-
- {text.record.state === "草稿" ? (
-
+
+ {text.record.state === "草稿" ? (
+
+
+ {
+ state.copyPathId = text.record.id;
+ showCopyModal();
+ }}
>
-
- {
- state.copyPathId = text.record.id;
- showCopyModal();
- }}
- >
- 复制
-
-
-
-
- {
- state.deletePathId = text.record.id;
- // console.log("text.record", text.record);
- showDeleteModal();
- }}
- >
- 删除
-
-
-
- ) : (
-
- )}
- {text.record.state === "已发布" ? (
-
-
-
- {
- state.copyPathId = text.record.id;
- showCopyModal();
- }}
- >
- 复制
-
-
-
-
- {
- showBackModal(text.record.id);
- }}
- >
- 撤回
-
-
-
- {
- state.stopPathId = text.record.id;
- showStopModal();
- }}
- >
- 结束
-
-
-
+ 复制
- ) : (
-
- )}
- {text.record.state === "已结束" ? (
-
-
+
+
+ {
+ state.deletePathId = text.record.id;
+ // console.log("text.record", text.record);
+ showDeleteModal();
+ }}
+ >
+ 删除
+
+
+
+ ) : (
+
+ )}
+ {text.record.state === "已发布" ? (
+
+
+
+ {
+ state.copyPathId = text.record.id;
+ showCopyModal();
+ }}
>
-
- {
- state.copyPathId = text.record.id;
- showCopyModal();
- }}
- >
- 复制
-
-
- {/**
+ 复制
+
+
+
+
+ {
+ showBackModal(text.record.id);
+ }}
+ >
+ 撤回
+
+
+
+ {
+ state.stopPathId = text.record.id;
+ showStopModal();
+ }}
+ >
+ 结束
+
+
+
+
+ ) : (
+
+ )}
+ {text.record.state === "已结束" ? (
+
+
+
+ {
+ state.copyPathId = text.record.id;
+ showCopyModal();
+ }}
+ >
+ 复制
+
+
+ {/**
*/}
-
- {
- state.deletePathId = text.record.id;
- showDeleteModal();
- }}
- >
- 删除
-
-
-
-
- ) : (
-
- )}
-
+
+ {
+ state.deletePathId = text.record.id;
+ showDeleteModal();
+ }}
+ >
+ 删除
+
+
+
+
+ ) : (
+
+ )}
+
);
},
},
@@ -1471,7 +1485,7 @@ export default {
if (!state.validate) {
message.destroy();
message.warning("路径图名称重复");
- return
+ return;
}
state.lpLoading = true;
let obj = {
@@ -1483,49 +1497,49 @@ export default {
picUrl: state.pathBg,
};
api
- .createLearnPath(obj)
- .then((res) => {
- console.log("创建学习路径成功", res);
- if (res.data.code === 200) {
- 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);
- });
- //添加归属权 [id: '966735050643083264', name: '丁舟航']
- let selectPeopleArr = [
- {id: res.data.data.createId, name: res.data.data.createName},
- ];
- changeOwnership(
- "learnPath",
- res.data.data.routerId,
- selectPeopleArr
- );
- }
- })
- .catch((err) => {
- console.log("创建失败", err);
- // state.createLoading = false;
- });
+ .createLearnPath(obj)
+ .then((res) => {
+ console.log("创建学习路径成功", res);
+ if (res.data.code === 200) {
+ 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);
+ });
+ //添加归属权 [id: '966735050643083264', name: '丁舟航']
+ let selectPeopleArr = [
+ { id: res.data.data.createId, name: res.data.data.createName },
+ ];
+ changeOwnership(
+ "learnPath",
+ res.data.data.routerId,
+ selectPeopleArr
+ );
+ }
+ })
+ .catch((err) => {
+ console.log("创建失败", err);
+ // state.createLoading = false;
+ });
};
//获取学习路径列表
@@ -1541,26 +1555,26 @@ export default {
createName: state.createUser,
};
api
- .getLearnPath(obj)
- .then((res) => {
- if (res.data.code === 200) {
- console.log("获取路径列表数据", res.data);
- let arr = res.data.data.rows;
- if (
- arr.length === 0 &&
- res.data.data.total > 0 &&
- state.currentPage > 1
- ) {
- state.currentPage = state.currentPage - 1;
- getLearnPath();
- }
- getTableDate(arr);
- state.tableDataTotal = Number(res.data.data.total);
+ .getLearnPath(obj)
+ .then((res) => {
+ if (res.data.code === 200) {
+ console.log("获取路径列表数据", res.data);
+ let arr = res.data.data.rows;
+ if (
+ arr.length === 0 &&
+ res.data.data.total > 0 &&
+ state.currentPage > 1
+ ) {
+ state.currentPage = state.currentPage - 1;
+ getLearnPath();
}
- })
- .catch((err) => {
- console.log("获取学习路径失败", err);
- });
+ getTableDate(arr);
+ state.tableDataTotal = Number(res.data.data.total);
+ }
+ })
+ .catch((err) => {
+ console.log("获取学习路径失败", err);
+ });
};
//翻页
const changePagination = (page) => {
@@ -1575,22 +1589,22 @@ export default {
type: -2,
};
api
- .handleLearnPath(obj)
- .then((res) => {
- if (res.data.code === 200) {
- console.log("删除成功", res);
- message.destroy();
- message.success("删除成功");
- state.deleteModal = false;
- getLearnPath();
- }
- if (res.data.code === -1) {
- message.warning(res.data.msg);
- }
- })
- .catch((err) => {
- console.log("删除失败", err);
- });
+ .handleLearnPath(obj)
+ .then((res) => {
+ if (res.data.code === 200) {
+ console.log("删除成功", res);
+ message.destroy();
+ message.success("删除成功");
+ state.deleteModal = false;
+ getLearnPath();
+ }
+ if (res.data.code === -1) {
+ message.warning(res.data.msg);
+ }
+ })
+ .catch((err) => {
+ console.log("删除失败", err);
+ });
};
//获取路径图详细信息
@@ -1598,31 +1612,31 @@ export default {
// console.log("编辑学习路径图id", id);
//获取学习路径详情
api
- .getRouterDetail(id)
- .then((res) => {
- if (res.data.code === 200) {
- console.log("获取学习路径详情成功", res.data.data);
- let detail = res.data.data.routerInfo;
- state.pathName = detail.name;
- state.pathBg = detail.picUrl;
- state.pathBgId = "";
- state.organizationSelectName = detail.organizationName;
- state.organizationSelectId = detail.organizationId;
- state.pathIntro = detail.remark;
- state.editPathId = id;
- // console.log("state.imgData", state.imgData);
- let arr = state.imgData;
- for (let i = 0; i < arr.length; i++) {
- // console.log("arr[i].dictValue", arr[i].dictValue, state.pathBg);
- if (arr[i].dictValue === state.pathBg) {
- state.pathBgId = arr[i].dictCode;
- }
+ .getRouterDetail(id)
+ .then((res) => {
+ if (res.data.code === 200) {
+ console.log("获取学习路径详情成功", res.data.data);
+ let detail = res.data.data.routerInfo;
+ state.pathName = detail.name;
+ state.pathBg = detail.picUrl;
+ state.pathBgId = "";
+ state.organizationSelectName = detail.organizationName;
+ state.organizationSelectId = detail.organizationId;
+ state.pathIntro = detail.remark;
+ state.editPathId = id;
+ // console.log("state.imgData", state.imgData);
+ let arr = state.imgData;
+ for (let i = 0; i < arr.length; i++) {
+ // console.log("arr[i].dictValue", arr[i].dictValue, state.pathBg);
+ if (arr[i].dictValue === state.pathBg) {
+ state.pathBgId = arr[i].dictCode;
}
}
- })
- .catch((err) => {
- console.log("获取详情失败", err);
- });
+ }
+ })
+ .catch((err) => {
+ console.log("获取详情失败", err);
+ });
state.out1 = true;
};
//编辑学习路径图
@@ -1661,35 +1675,35 @@ export default {
status: 0,
};
api
- .createLearnPath(obj)
- .then((res) => {
- if (res.data.code === 200) {
- console.log("修改成功", res);
- message.destroy();
- message.success("修改成功");
- // state.createLoading = false;
- // state.currentPage = 1;
- state.out1 = false;
- // router.push("/leveladd");
- getLearnPath();
- // setTimeout(() => {
- // console.log("修改成功", res);
- // message.success("修改成功");
- // // state.createLoading = false;
- // // state.currentPage = 1;
- // state.out1 = false;
- // // router.push("/leveladd");
- // getLearnPath();
- // }, 1000);
- }
- if (res.data.code === -1) {
- message.warning(res.data.msg);
- }
- })
- .catch((err) => {
- console.log("修改失败", err);
+ .createLearnPath(obj)
+ .then((res) => {
+ if (res.data.code === 200) {
+ console.log("修改成功", res);
+ message.destroy();
+ message.success("修改成功");
// state.createLoading = false;
- });
+ // state.currentPage = 1;
+ state.out1 = false;
+ // router.push("/leveladd");
+ getLearnPath();
+ // setTimeout(() => {
+ // console.log("修改成功", res);
+ // message.success("修改成功");
+ // // state.createLoading = false;
+ // // state.currentPage = 1;
+ // state.out1 = false;
+ // // router.push("/leveladd");
+ // getLearnPath();
+ // }, 1000);
+ }
+ if (res.data.code === -1) {
+ message.warning(res.data.msg);
+ }
+ })
+ .catch((err) => {
+ console.log("修改失败", err);
+ // state.createLoading = false;
+ });
};
//选择状态
const selectStatusClassify = (e, v) => {
@@ -1709,11 +1723,11 @@ export default {
const searchLearnPath = () => {
state.currentPage = 1;
console.log(
- "pathnameSearch",
- state.pathnameSearch,
- state.statusClassify,
- state.startTime,
- state.endTime
+ "pathnameSearch",
+ state.pathnameSearch,
+ state.statusClassify,
+ state.startTime,
+ state.endTime
);
getLearnPath();
};
@@ -1784,33 +1798,33 @@ export default {
});
//添加权限
watch(
- () => state.addAuthList,
- (res) => {
- console.log("res", res, state.addAuthList);
- let obj = {
- type: 1,
- tag:
- state.authClassify === 1 ? 3 : state.authClassify === 2 ? 4 : null,
- opt: 3,
- deptList: res[1],
- groupList: res[2],
- refId: state.selectPathId,
- pageNo: 20,
- pageSize: 1,
- studentList: res[0],
- keyWord: "",
- };
- console.log("obj", obj);
- api
- .optionAuthPerm(obj)
- .then((res) => {
- console.log("添加授权成功", res);
- message.success("添加授权成功");
- })
- .catch((err) => {
- console.log("添加授权失败", err);
- });
- }
+ () => state.addAuthList,
+ (res) => {
+ console.log("res", res, state.addAuthList);
+ let obj = {
+ type: 1,
+ tag:
+ state.authClassify === 1 ? 3 : state.authClassify === 2 ? 4 : null,
+ opt: 3,
+ deptList: res[1],
+ groupList: res[2],
+ refId: state.selectPathId,
+ pageNo: 20,
+ pageSize: 1,
+ studentList: res[0],
+ keyWord: "",
+ };
+ console.log("obj", obj);
+ api
+ .optionAuthPerm(obj)
+ .then((res) => {
+ console.log("添加授权成功", res);
+ message.success("添加授权成功");
+ })
+ .catch((err) => {
+ console.log("添加授权失败", err);
+ });
+ }
);
return {
@@ -1897,8 +1911,8 @@ export default {
height: 68px;
background: linear-gradient(
- rgba(78, 166, 255, 0.2) 0%,
- rgba(78, 166, 255, 0) 100%
+ rgba(78, 166, 255, 0.2) 0%,
+ rgba(78, 166, 255, 0) 100%
);
display: flex;
align-items: center;
@@ -2198,8 +2212,8 @@ export default {
.modalHeader {
background: linear-gradient(
- rgba(78, 166, 255, 0.2) 0%,
- rgba(78, 166, 255, 0) 100%
+ rgba(78, 166, 255, 0.2) 0%,
+ rgba(78, 166, 255, 0) 100%
);
}
@@ -2237,9 +2251,9 @@ export default {
width: 280px;
height: 110px;
background: linear-gradient(
- 180deg,
- rgba(254, 243, 221, 1),
- rgba(255, 250, 240, 1)
+ 180deg,
+ rgba(254, 243, 221, 1),
+ rgba(255, 250, 240, 1)
);
border-radius: 10px;
margin-right: 7px;
@@ -2263,9 +2277,9 @@ export default {
width: 280px;
height: 110px;
background: linear-gradient(
- 180deg,
- rgba(221, 234, 255, 1),
- rgba(240, 248, 254, 1)
+ 180deg,
+ rgba(221, 234, 255, 1),
+ rgba(240, 248, 254, 1)
);
border-radius: 10px;
@@ -2377,8 +2391,8 @@ export default {
width: calc(100%);
height: 68px;
background: linear-gradient(
- rgba(78, 166, 255, 0.2) 0%,
- rgba(78, 166, 255, 0) 100%
+ rgba(78, 166, 255, 0.2) 0%,
+ rgba(78, 166, 255, 0) 100%
);
}
@@ -2735,8 +2749,8 @@ export default {
}
.ant-table-tbody
- > tr:hover:not(.ant-table-expanded-row):not(.ant-table-row-selected)
- > td {
+ > tr:hover:not(.ant-table-expanded-row):not(.ant-table-row-selected)
+ > td {
background: #f6f9fd;
}
}
diff --git a/src/views/projectcenter/ProjectManage.vue b/src/views/projectcenter/ProjectManage.vue
index e1d9a34f..6f865e48 100644
--- a/src/views/projectcenter/ProjectManage.vue
+++ b/src/views/projectcenter/ProjectManage.vue
@@ -179,7 +179,14 @@