From e15cabe75068004f878e4924d01b3404f6d1d8c2 Mon Sep 17 00:00:00 2001 From: yuping <82253452@qq.com> Date: Wed, 1 Feb 2023 23:25:21 +0800 Subject: [PATCH] =?UTF-8?q?--demand=20=E6=B7=BB=E5=8A=A0=E6=9D=83=E9=99=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/learningpath/LearningPath.vue | 43 ++++++++++++++++++++++++- 1 file changed, 42 insertions(+), 1 deletion(-) diff --git a/src/views/learningpath/LearningPath.vue b/src/views/learningpath/LearningPath.vue index c3fec016..1490d941 100644 --- a/src/views/learningpath/LearningPath.vue +++ b/src/views/learningpath/LearningPath.vue @@ -1125,6 +1125,7 @@ export default { pubtime: value.publishTime ? value.publishTime : "-", cretime: value.createTime ? value.createTime : "-", remark: value.remark ? value.remark : "-", + permissions: value.permissions, }; array.push(obj); }); @@ -1553,6 +1554,45 @@ export default { storage.set("routerId", id); } + const getLearnPathInfo = (id) => { + // 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; + let arr = imgData.value; + arr.forEach((item) => { + if (item.dictValue === state.pathBg) { + state.pathBgId = item.dictCode; + + } + }); + + //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); + }); + state.out1 = true; + }; + return { ...toRefs(state), imgData, @@ -1595,7 +1635,8 @@ export default { resetLearnPath, showLearnBgMore, closeLearnBgMore, - checkPer + checkPer, + getLearnPathInfo }; }, };