From f1692b0669885cd400c807c6652222d81a641ec1 Mon Sep 17 00:00:00 2001 From: lixg Date: Wed, 16 Nov 2022 11:45:17 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E9=A1=B9=E7=9B=AE=E7=9A=84?= =?UTF-8?q?=E6=9F=A5=E7=9C=8B=E5=8F=8A=E5=AD=A6=E4=B9=A0=E8=B7=AF=E5=BE=84?= =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E7=9A=84=E5=A4=8D=E5=88=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/router/index.js | 12 +- src/views/learningpath/LearningPath.vue | 104 +- src/views/projectcenter/ClassAdd.vue | 1991 +++++++++++---------- src/views/projectcenter/ProjectAdd.vue | 20 +- src/views/projectcenter/ProjectManage.vue | 125 +- src/views/projectcenter/SonProject.vue | 27 +- 6 files changed, 1273 insertions(+), 1006 deletions(-) diff --git a/src/router/index.js b/src/router/index.js index 74803f23..c2134c99 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -1,4 +1,12 @@ -import { createRouter, createWebHashHistory } from 'vue-router'; +/* + * @Author: lixg lixg@dongwu-inc.com + * @Date: 2022-11-09 09:26:26 + * @LastEditors: lixg lixg@dongwu-inc.com + * @LastEditTime: 2022-11-16 09:56:16 + * @FilePath: /fe-manage/src/router/index.js + * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE + */ +import { createRouter,createWebHistory } from 'vue-router'; import routesConfig from './config'; console.log('routesConfig', routesConfig) @@ -12,7 +20,7 @@ const routes = [ ] const router = createRouter({ - history: createWebHashHistory(), + history: createWebHistory(), routes }) diff --git a/src/views/learningpath/LearningPath.vue b/src/views/learningpath/LearningPath.vue index 0221c0fe..6246c580 100644 --- a/src/views/learningpath/LearningPath.vue +++ b/src/views/learningpath/LearningPath.vue @@ -40,11 +40,11 @@
-
搜索
+
搜索
-
重置
+
重置
@@ -196,7 +196,7 @@ @click="chooseImg(item)" v-for="item in imgData" :key="item.key" - class="learnBgItem" + class="learnBgItem" :style="{ border: learnPathBg === item.id @@ -263,7 +263,7 @@ v-model:value="pathName" maxlength="20" style="border-radius: 4px" - placeholder="请输入学习路径名称" + placeholder="请输入学习路径名称" />
{{ pathName.length }}/20
@@ -430,11 +430,11 @@ 您确定要复制此路径吗
-
-
取消
+
+
取消
-
-
确定
+
+
确定
@@ -465,16 +465,16 @@
-
取消
+
取消
-
确定
+
确定
- +
-
取消
+
取消
-
确定
+
确定
@@ -525,10 +525,10 @@
-
取消
+
取消
-
确定
+
确定
@@ -556,10 +556,10 @@
-
取消
+
取消
-
确定
+
确定
@@ -724,6 +724,7 @@ export default { routeStudentsNum: 0, recallPathId: null, //撤回路径id stopPathId: null, //停用路径id + copyPathId: null, //复制路径iid lpLoading: false, }); @@ -816,12 +817,34 @@ export default { const closePub = () => { state.pub = false; }; + //显示复制窗口 const showCopyModal = () => { state.copyModal = true; }; + //关闭复制窗口 const closeCopyModal = () => { state.copyModal = false; }; + //确认复制 + const copyLearnPath = () => { + let obj = { + routerId: state.copyPathId, + type: 2, + }; + api + .handleLearnPath(obj) + .then((res) => { + console.log("复制成功", res); + message.destroy(); + message.success("复制成功"); + state.copyModal = false; + getLearnPath(); + }) + .catch((err) => { + console.log("复制失败", err); + }); + }; + //显示结束窗口 const showStopModal = () => { state.stopModal = true; @@ -1137,13 +1160,14 @@ export default { >
{ + state.copyPathId = text.record.id; showCopyModal(); }} > 复制
- +
{ + state.copyPathId = text.record.id; showCopyModal(); }} > @@ -1197,20 +1222,20 @@ export default { 撤回
- -
{ - state.stopPathId = text.record.id; - showStopModal(); - }} + - 结束 -
-
+
{ + state.stopPathId = text.record.id; + showStopModal(); + }} + > + 结束 +
+ ) : ( @@ -1230,6 +1255,7 @@ export default { >
{ + state.copyPathId = text.record.id; showCopyModal(); }} > @@ -1322,7 +1348,7 @@ export default { state.lpLoading = false; state.currentPage = 1; router.push("/leveladd"); - storage.set("routerId", res.data.data.routerId); + storage.set("routerId", res.data.data.routerId); // getLearnPath(); }, commonData.timeout); }) @@ -1491,6 +1517,7 @@ export default { closeCopyModal, showStopModal, closeStopModal, + copyLearnPath, stopLearnPath, showDeleteModal, closeDeleteModal, @@ -1645,20 +1672,19 @@ export default { cursor: pointer; } } - .learnBg{ + .learnBg { display: flex; flex-wrap: wrap; min-height: 110px; - .learnBgItem{ - border-radius: 8px; + .learnBgItem { + border-radius: 8px; width: 136px; height: 106px; background-size: 100%; background-repeat: no-repeat; - margin-bottom: 20px; - margin-right: 6px; - } - + margin-bottom: 20px; + margin-right: 6px; + } } } .info { diff --git a/src/views/projectcenter/ClassAdd.vue b/src/views/projectcenter/ClassAdd.vue index 369f8e5f..1dd9ddc0 100644 --- a/src/views/projectcenter/ClassAdd.vue +++ b/src/views/projectcenter/ClassAdd.vue @@ -1,55 +1,89 @@ diff --git a/src/views/projectcenter/ProjectAdd.vue b/src/views/projectcenter/ProjectAdd.vue index 9d48e5f9..deb832c8 100644 --- a/src/views/projectcenter/ProjectAdd.vue +++ b/src/views/projectcenter/ProjectAdd.vue @@ -28,6 +28,7 @@ placeholder="请输入项目名称" show-count :maxlength="30" + :disabled="viewDetail ? true : false" />
@@ -53,6 +54,7 @@ @change="classificationChange" allowClear showSearch + :disabled="viewDetail ? true : false" > @@ -86,6 +88,7 @@ action="/api/file/upload" :before-upload="beforeUpload" @change="handleChange" + :disabled="viewDetail ? true : false" > @@ -150,6 +154,7 @@ @change="classificationChange1" allowClear showSearch + :disabled="viewDetail ? true : false" > @@ -174,6 +179,7 @@ placeholder="自动带出 可修改" :options="classifyList2" @change="classificationChange2" + :disabled="viewDetail ? true : false" /> @@ -188,6 +194,7 @@ placeholder="请输入说明" show-count :maxlength="200" + :disabled="viewDetail ? true : false" /> @@ -196,7 +203,10 @@
同步学习记录
-
@@ -249,6 +260,7 @@ :options="classifyList4" @change="classificationChange4" placeholder="集团级/组织级/现地级/部门级" + :disabled="viewDetail ? true : false" /> @@ -261,7 +273,10 @@
是否BOEU实施
- 您确定要复制此路径吗
-
+
取消
-
+
确定
@@ -1093,6 +1093,7 @@ export default { finishProjectId: null, //结束的项目id deleteProjectId: null, //删除的项目id templateProjectId: null, //存为模版的项目id + copyProjectId: null, //复制项目id }); // 数据接入 - start - const router = useRouter(); @@ -1922,6 +1923,34 @@ export default { const closeStartModal = () => { state.startModal = false; }; + //打开确认复制弹窗 + const showCopyModal = (projectId) => { + state.copyModal = true; + state.copyProjectId = projectId; + }; + //关闭确认复制弹窗 + const closeCopyModal = () => { + state.copyModal = false; + }; + //确认复制 + const copyProject = () => { + let obj = { + projectId: state.copyProjectId, + type: 2, + }; + api + .handleProject(obj) + .then((res) => { + console.log("复制成功", res); + message.destroy(); + message.success("复制成功"); + state.copyModal = false; + getTableDate(); + }) + .catch((err) => { + console.log("复制失败", err); + }); + }; // 数据接入 - end - @@ -2119,7 +2148,7 @@ export default {
{ - showCopyModal(); + showCopyModal(value.record.projectId); }} > 复制 @@ -2190,7 +2219,7 @@ export default { { - // showCopyModal(); + // showCopyModal(value.record.projectId); // }} > @@ -2217,7 +2246,7 @@ export default {
{ - showCopyModal(); + showCopyModal(value.record.projectId); }} > 复制 @@ -2279,7 +2308,7 @@ export default { { - // showCopyModal(); + // showCopyModal(value.record.projectId); // }} >
@@ -2305,7 +2334,7 @@ export default {
{ - showCopyModal(); + showCopyModal(value.record.projectId); }} > 复制 @@ -2420,7 +2449,7 @@ export default {
{ - showCopyModal(); + showCopyModal(value.record.projectId); }} > 复制 @@ -2502,7 +2531,7 @@ export default {
{ - showCopyModal(); + showCopyModal(value.record.projectId); }} > 复制 @@ -2572,7 +2601,7 @@ export default {
{ - showCopyModal(); + showCopyModal(value.record.projectId); }} > 复制 @@ -2640,7 +2669,52 @@ export default { 编辑 ) : ( - + { + console.log("单层子项目的编辑"); + console.log(value); + + { + /* 判断是班级\单层项目\单层子项目 */ + } + if (value.record.parentId == "0") { + router.push({ + path: "/projectadd", + query: { + projectId: value.record.projectId, + name: value.record.name, + viewDetail:1, + }, + }); + } else { + if (value.record.isbj) { + router.push({ + path: "/classadd", + query: { + projectId: value.record.projectId, + name: value.record.paraentName, + edit: 0, + viewDetail:1, + }, + }); + } else { + router.push({ + path: "/sonproject", + query: { + projectId: value.record.projectId, + name: value.record.paraentName, + edit: 0, + viewDetail:1, + }, + }); + } + } + }} + style="cursor:pointer;" + class="operation1" + > + 查看 + )}
{ - showCopyModal(); + showCopyModal(value.record.projectId); }} > 复制 @@ -2774,16 +2848,16 @@ export default { // options={state.projectNameList} dropdownClassName="tabledropdown" > + +
{ + showCopyModal(value.record.projectId); + }} + > + 复制 +
+
- -
{ - showCopyModal(); - }} - > - 复制 -
-
{ showStartModal(value.record.projectId); @@ -2842,7 +2916,7 @@ export default {
{ - showCopyModal(); + showCopyModal(value.record.projectId); }} > 复制 @@ -2978,12 +3052,6 @@ export default { state.doublesonpro = true; state.sonproject = false; }; - const showCopyModal = () => { - state.copyModal = true; - }; - const closeCopyModal = () => { - state.copyModal = false; - }; const showProjOwner = () => { state.ProjOwnervisible = true; @@ -3098,6 +3166,7 @@ export default { finishProject, deleteProject, templateProject, + copyProject, }; }, }; diff --git a/src/views/projectcenter/SonProject.vue b/src/views/projectcenter/SonProject.vue index 040370df..be713def 100644 --- a/src/views/projectcenter/SonProject.vue +++ b/src/views/projectcenter/SonProject.vue @@ -26,7 +26,7 @@
子项目名称
- +
@@ -40,7 +40,7 @@ return triggerNode.parentNode || document.body; } " v-model:value="classifySelect" placeholder="四个养成" style="width: 100%" :options="classifyList" - @change="classificationChange" allowClear showSearch> + @change="classificationChange" allowClear showSearch :disabled="viewDetail ? true : false">
@@ -59,7 +59,7 @@ overflow: hidden; "> + :show-upload-list="false" action="/api/file/upload" :before-upload="beforeUpload" @change="handleChange" :disabled="viewDetail ? true : false"> + style="width: 100%; height: 40px; border-radius: 5px" @change="onRangeChange" :disabled="viewDetail ? true : false" />
@@ -98,7 +98,7 @@ return triggerNode.parentNode || document.body; } " :value="classifySelect1" mode="multiple" placeholder="请选择项目经理" style="width: 100%" :options="classifyList1" - @change="classificationChange1" allowClear showSearch> + @change="classificationChange1" allowClear showSearch :disabled="viewDetail ? true : false">
@@ -114,7 +114,7 @@ return triggerNode.parentNode || document.body; } " v-model:value="classifySelect2" placeholder="自动带出 可修改" :options="classifyList2" - @change="classificationChange2" /> + @change="classificationChange2" :disabled="viewDetail ? true : false" />
@@ -122,7 +122,7 @@
项目说明
- +
@@ -130,11 +130,11 @@
同步学习记录
- 同步课程学习记录(如学员在课程库中拥有课程的学习记录,自动免修该课程) + " >同步课程学习记录(如学员在课程库中拥有课程的学习记录,自动免修该课程)
@@ -148,7 +148,7 @@ return triggerNode.parentNode || document.body; } " v-model:value="classifySelect3" :options="classifyList3" @change="classificationChange3" - placeholder="集团级/组织级/现地级/部门级" /> + placeholder="集团级/组织级/现地级/部门级" :disabled="viewDetail ? true : false" />
@@ -162,7 +162,7 @@ return triggerNode.parentNode || document.body; } " v-model:value="classifySelect4" :options="classifyList4" @change="classificationChange4" - placeholder="集团级/组织级/现地级/部门级" /> + placeholder="集团级/组织级/现地级/部门级" :disabled="viewDetail ? true : false" />
@@ -171,7 +171,7 @@
是否BOEU实施
- + @change="classificationChange5" >