From 18d55547787d0d6754cd434f2ad0de2b2987302b Mon Sep 17 00:00:00 2001 From: yuping <82253452@qq.com> Date: Tue, 6 Dec 2022 18:20:46 +0800 Subject: [PATCH] =?UTF-8?q?--=20=E6=97=B6=E9=97=B4=E6=90=9C=E7=B4=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package-lock.json | 35 +- package.json | 1 + src/views/courselibrary/CoursewareManage.vue | 12 +- src/views/examine/ProjectReviewed.vue | 5 + src/views/learningpath/LearningPath.vue | 1499 ++++++++++-------- src/views/projectcenter/ProjectManage.vue | 10 +- 6 files changed, 859 insertions(+), 703 deletions(-) diff --git a/package-lock.json b/package-lock.json index e6b33dde..2765a8ac 100644 --- a/package-lock.json +++ b/package-lock.json @@ -19,6 +19,7 @@ "html2canvas": "^1.4.1", "jquery": "^3.6.1", "mitt": "^3.0.0", + "moment": "^2.29.4", "qrcode.vue": "^3.3.3", "qs": "^6.11.0", "sortablejs": "^1.15.0", @@ -3578,8 +3579,6 @@ "resolved": "https://registry.npmmirror.com/ajv/-/ajv-8.11.0.tgz", "integrity": "sha512-wGgprdCvMalC0BztXvitD2hC04YffAvtsUn93JbGXYLAtCUO4xd17mCCZQxUOItiBwZvJScWo8NIvQMQ71rdpg==", "dev": true, - "optional": true, - "peer": true, "dependencies": { "fast-deep-equal": "^3.1.1", "json-schema-traverse": "^1.0.0", @@ -3591,9 +3590,7 @@ "version": "1.0.0", "resolved": "https://registry.npmmirror.com/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", - "dev": true, - "optional": true, - "peer": true + "dev": true }, "node_modules/ajv-keywords": { "version": "3.5.2", @@ -8046,6 +8043,14 @@ "integrity": "sha512-A/78XjoX2EmNvppVWEhM2oGk3x4lLxnkEA4jTbaK97QKSDjkIoOsKQlfylt/d3kKKi596Qy3NP5XrXJ6fZIC9Q==", "dev": true }, + "node_modules/moment": { + "version": "2.29.4", + "resolved": "https://registry.npmmirror.com/moment/-/moment-2.29.4.tgz", + "integrity": "sha512-5LC9SOxjSc2HF6vO2CyuTDNivEdoz2IvyJJGj6X8DJ0eFyfszE0QiEd+iXmBvUP3WHxSjFH/vIsA0EN00cgr8w==", + "engines": { + "node": "*" + } + }, "node_modules/mrmime": { "version": "1.0.1", "resolved": "https://registry.npmmirror.com/mrmime/-/mrmime-1.0.1.tgz", @@ -13718,6 +13723,7 @@ "integrity": "sha512-yl+5qhpjd8e1G4cMXfORkkBlvtPCIgmRf3IYCWYDKIQ7m+PPa5iTm4feiNmCMD6yGqQWMhhK/7M3oWGL9boKwg==", "dev": true, "requires": { + "@babel/core": "^7.12.16", "@babel/helper-compilation-targets": "^7.12.16", "@babel/helper-module-imports": "^7.12.13", "@babel/plugin-proposal-class-properties": "^7.12.13", @@ -13730,6 +13736,7 @@ "@vue/babel-plugin-jsx": "^1.0.3", "@vue/babel-preset-jsx": "^1.1.2", "babel-plugin-dynamic-import-node": "^2.3.3", + "core-js": "^3.8.3", "core-js-compat": "^3.8.3", "semver": "^7.3.4" }, @@ -14568,14 +14575,15 @@ "resolved": "https://registry.npmmirror.com/ajv-formats/-/ajv-formats-2.1.1.tgz", "integrity": "sha512-Wx0Kx52hxE7C18hkMEggYlEifqWZtYaRgouJor+WMdPnQyEK13vgEWyVNup7SoeeoLMsr4kf5h6dOW11I15MUA==", "dev": true, - "requires": {}, + "requires": { + "ajv": "^8.0.0" + }, "dependencies": { "ajv": { - "version": "https://registry.npmmirror.com/ajv/-/ajv-8.11.0.tgz", + "version": "8.11.0", + "resolved": "https://registry.npmmirror.com/ajv/-/ajv-8.11.0.tgz", "integrity": "sha512-wGgprdCvMalC0BztXvitD2hC04YffAvtsUn93JbGXYLAtCUO4xd17mCCZQxUOItiBwZvJScWo8NIvQMQ71rdpg==", "dev": true, - "optional": true, - "peer": true, "requires": { "fast-deep-equal": "^3.1.1", "json-schema-traverse": "^1.0.0", @@ -14587,9 +14595,7 @@ "version": "1.0.0", "resolved": "https://registry.npmmirror.com/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", - "dev": true, - "optional": true, - "peer": true + "dev": true } } }, @@ -18184,6 +18190,11 @@ "integrity": "sha512-A/78XjoX2EmNvppVWEhM2oGk3x4lLxnkEA4jTbaK97QKSDjkIoOsKQlfylt/d3kKKi596Qy3NP5XrXJ6fZIC9Q==", "dev": true }, + "moment": { + "version": "2.29.4", + "resolved": "https://registry.npmmirror.com/moment/-/moment-2.29.4.tgz", + "integrity": "sha512-5LC9SOxjSc2HF6vO2CyuTDNivEdoz2IvyJJGj6X8DJ0eFyfszE0QiEd+iXmBvUP3WHxSjFH/vIsA0EN00cgr8w==" + }, "mrmime": { "version": "1.0.1", "resolved": "https://registry.npmmirror.com/mrmime/-/mrmime-1.0.1.tgz", diff --git a/package.json b/package.json index e0c600e3..935c5f5b 100644 --- a/package.json +++ b/package.json @@ -19,6 +19,7 @@ "html2canvas": "^1.4.1", "jquery": "^3.6.1", "mitt": "^3.0.0", + "moment": "^2.29.4", "qrcode.vue": "^3.3.3", "qs": "^6.11.0", "sortablejs": "^1.15.0", diff --git a/src/views/courselibrary/CoursewareManage.vue b/src/views/courselibrary/CoursewareManage.vue index 37e03b73..18446694 100644 --- a/src/views/courselibrary/CoursewareManage.vue +++ b/src/views/courselibrary/CoursewareManage.vue @@ -52,6 +52,10 @@
@@ -3105,6 +3109,7 @@ import { Editor, Toolbar } from "@wangeditor/editor-for-vue"; import ProjectManager from "@/components/project/ProjectManagerNew"; import SeeModal from "./components/seeModal.vue"; +import * as moment from 'moment' //列表表格 const columns1 = [ @@ -4027,10 +4032,8 @@ export default defineComponent({ let startTime = ""; let endTime = ""; if (state.projectTime) { - startTime = parseInt( - new Date(state.projectTime[0].$d).getTime() / 1000 - ); - endTime = parseInt(new Date(state.projectTime[1].$d).getTime() / 1000); + startTime = state.projectTime[0] + endTime = state.projectTime[1] } let res = await list({ pageNo: state.currentPage1, @@ -5556,6 +5559,7 @@ export default defineComponent({ return { ...toRefs(state), getdateToDateFn, + moment, getdateToTimeFn, handlePostSure, handleDeleteKaike, diff --git a/src/views/examine/ProjectReviewed.vue b/src/views/examine/ProjectReviewed.vue index 477f1aad..a1135d21 100644 --- a/src/views/examine/ProjectReviewed.vue +++ b/src/views/examine/ProjectReviewed.vue @@ -52,6 +52,9 @@
import {onMounted, reactive, toRefs} from "vue"; import {auditedlist} from "../../api/indexAudit"; +import * as moment from 'moment' export default { name: "ProjectViewed", @@ -347,6 +351,7 @@ export default { ...toRefs(state), getProjList, changePagination, + moment, reset, closeProjAuditModal, showProjAuditModal, diff --git a/src/views/learningpath/LearningPath.vue b/src/views/learningpath/LearningPath.vue index 0d565ce2..142de040 100644 --- a/src/views/learningpath/LearningPath.vue +++ b/src/views/learningpath/LearningPath.vue @@ -6,21 +6,21 @@
@@ -31,10 +31,14 @@ style="width: 270px" /> -->
@@ -66,48 +70,48 @@
- +
- +
无数据
请添加路径
- +
@@ -116,20 +120,20 @@
- +
创建路径
@@ -137,17 +141,17 @@
路径图名称
{{ pathName.length }}/20
@@ -155,15 +159,15 @@
归属组织
- 查看更多 + 查看更多
路径说明
- +
{{ pathIntro.length }}/150
@@ -224,10 +228,10 @@
- +
@@ -235,20 +239,20 @@
- +
编辑路径
@@ -256,17 +260,17 @@
路径图名称
{{ pathName.length }}/20
@@ -274,15 +278,15 @@
归属组织
-->
- 查看更多 + 查看更多
路径说明
- +
{{ pathIntro.length }}/150
@@ -347,17 +351,17 @@
路径发布路径发布
@@ -420,11 +424,11 @@
@@ -450,11 +454,11 @@
@@ -484,11 +488,11 @@
@@ -514,11 +518,11 @@
@@ -544,11 +548,11 @@
@@ -584,23 +588,23 @@
路径图背景
{ - if (res.status === 200) { - // console.log("获取关卡、任务、学员统计数据", res.data); - state.routeStudentsNum = res.data.students; - state.routeChapters = res.data.chapters; - state.routeTasks = res.data.tasks; - } - }) - .catch((err) => { - console.log("err", err); - }); + .getLearnCount(router.id) + .then((res) => { + if (res.status === 200) { + // console.log("获取关卡、任务、学员统计数据", res.data); + state.routeStudentsNum = res.data.students; + state.routeChapters = res.data.chapters; + state.routeTasks = res.data.tasks; + } + }) + .catch((err) => { + console.log("err", err); + }); }; //确定发布 const releaseLearnPath = () => { @@ -877,22 +882,22 @@ export default { type: 1, }; api - .handleLearnPath(obj) - .then((res) => { - console.log("发布", res); - if (res.data.code === 200) { - message.destroy(); - message.success("发布成功"); - state.pub = false; - getLearnPath(); - } - if (res.data.code === -1) { - message.warning(res.data.msg); - } - }) - .catch((err) => { - console.log("发布失败", err); - }); + .handleLearnPath(obj) + .then((res) => { + console.log("发布", res); + if (res.data.code === 200) { + message.destroy(); + message.success("发布成功"); + state.pub = false; + getLearnPath(); + } + if (res.data.code === -1) { + message.warning(res.data.msg); + } + }) + .catch((err) => { + console.log("发布失败", err); + }); }; const closePub = () => { @@ -913,22 +918,22 @@ export default { type: 2, }; api - .handleLearnPath(obj) - .then((res) => { - if (res.data.code === 200) { - console.log("复制成功", res); - message.destroy(); - message.success("复制成功"); - state.copyModal = 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.copyModal = false; + getLearnPath(); + } + if (res.data.code === -1) { + message.warning(res.data.msg); + } + }) + .catch((err) => { + console.log("复制失败", err); + }); }; //显示结束窗口 @@ -946,22 +951,22 @@ export default { type: -1, }; api - .handleLearnPath(obj) - .then((res) => { - if (res.data.code === 200) { - console.log("停用成功", res); - message.destroy(); - message.success("停用成功"); - state.stopModal = 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.stopModal = false; + getLearnPath(); + } + if (res.data.code === -1) { + message.warning(res.data.msg); + } + }) + .catch((err) => { + console.log("停用失败", err); + }); }; const showDeleteModal = () => { @@ -993,22 +998,22 @@ export default { type: 0, }; api - .handleLearnPath(obj) - .then((res) => { - if (res.data.code === 200) { - console.log("撤回成功", res); - message.destroy(); - message.success("撤回成功"); - state.backModal = 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.backModal = false; + getLearnPath(); + } + if (res.data.code === -1) { + message.warning(res.data.msg); + } + }) + .catch((err) => { + console.log("撤回失败", err); + }); }; const showOwner = (id) => { @@ -1038,26 +1043,26 @@ export default { number: (state.currentPage - 1) * state.pageSize + index + 1, manager: value.name ? value.name : "-", state: - value.status === 0 - ? "草稿" - : value.status === 1 - ? "已发布" - : value.status === -1 - ? "已结束" - : "-", + value.status === 0 + ? "草稿" + : value.status === 1 + ? "已发布" + : value.status === -1 + ? "已结束" + : "-", creater: value.createName ? value.createName : "-", pubtime: value.publishTime - ? toDate(value.publishTime, "Y-M-D h:m:s") - : "-", + ? value.publishTime + : "-", cretime: value.createTime - ? toDate(value.createTime, "Y-M-D h:m:s") - : "-", + ? value.createTime + : "-", remark: value.remark ? value.remark : "-", }; array.push(obj); }); state.tableData = array; - console.log(array,tableData) + console.log(array, tableData) }; const tableDataFunc = () => { @@ -1121,282 +1126,282 @@ export default { width: 200, align: "center", fixed: "right", - scopedSlots: { customRender: "action" }, //引入的插槽 + scopedSlots: {customRender: "action"}, //引入的插槽 customRender: (text) => { // console.log(text); return ( -
-
- {text.record.state === "草稿" ? ( -
-
{ - // console.log("text.record.", text.record); - showPub(text.record); - }} - > - 发布 -
-
{ - // console.log("text.record", text.record); +
+
+ {text.record.state === "草稿" ? ( +
+
{ + // 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); - }} - > - 管理 + 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(); + // }} + // > + // 复制 + //
+ //
+ // ) : ( + //
+ // ) + }
- - -
+
{ - showPower(text.record.id); + router.push({ + path: "/leveladd", + }); + storage.set("routerId", text.record.id); }} - > - 权限名单 -
- - -
{ - showOwner(text.record.id); - }} - > - 归属权 -
-
- -
{ - showQuery(text.record.id); - }} - > - 查看权 -
-
- -
{ - showManage(text.record.id); - }} - > - 管理权 -
-
- -
-
- {text.record.state === "草稿" ? ( - - + 管理 +
+ +
{ - state.copyPathId = text.record.id; - showCopyModal(); - }} + onClick={() => { + showPower(text.record.id); + }} > - 复制 + 权限名单
- - +
{ - state.deletePathId = text.record.id; - // console.log("text.record", text.record); - showDeleteModal(); - }} + onClick={() => { + showOwner(text.record.id); + }} > - 删除 + 归属权 +
+
+ +
{ + showQuery(text.record.id); + }} + > + 查看权 +
+
+ +
{ + showManage(text.record.id); + }} + > + 管理权
- ) : ( -
- )} - {text.record.state === "已发布" ? ( -
- - +
+ {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(); - }} +
{ + state.deletePathId = text.record.id; + // console.log("text.record", text.record); + showDeleteModal(); + }} + > + 删除 +
+ + + ) : ( +
+ )} + {text.record.state === "已发布" ? ( +
+ - 结束 -
- - -
- ) : ( -
- )} - {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(); + }} + > + 复制 +
+
+ {/** + +
{ showStartModal(); }} - > - 启用 -
-
- */} + > + 启用 +
+
+ */} - -
{ - state.deletePathId = text.record.id; - showDeleteModal(); - }} - > - 删除 -
-
-
-
- ) : ( -
- )} + +
{ + state.deletePathId = text.record.id; + showDeleteModal(); + }} + > + 删除 +
+
+
+
+ ) : ( +
+ )} +
-
); }, }, @@ -1432,49 +1437,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; + }); }; //获取学习路径列表 @@ -1484,30 +1489,30 @@ export default { pageSize: state.pageSize, name: state.pathnameSearch, status: state.statusClassify, - beginTime: state.startTime, - endTime: state.endTime, + beginTime: state.searchdate ? state.searchdate[0] : '', + endTime: state.searchdate ? state.searchdate[1] : '', }; 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(); + .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); } - getTableDate(arr); - state.tableDataTotal = Number(res.data.data.total); - } - }) - .catch((err) => { - console.log("获取学习路径失败", err); - }); + }) + .catch((err) => { + console.log("获取学习路径失败", err); + }); }; //翻页 const changePagination = (page) => { @@ -1522,22 +1527,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); + }); }; //获取路径图详细信息 @@ -1545,31 +1550,31 @@ export default { // console.log("编辑学习路径图id", id); //获取学习路径详情 api - .getRouterDetail(id) - .then((res) => { - if (res.data.code === 200) { - let detail = res.data.data.routerInfo; - // console.log("获取详情成功", detail); - 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) { + let detail = res.data.data.routerInfo; + // console.log("获取详情成功", detail); + 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; }; //编辑学习路径图 @@ -1604,35 +1609,35 @@ export default { status: 0, }; api - .createLearnPath(obj) - .then((res) => { - if (res.data.code === 200) { - console.log("修改成功", res); - message.destroy(); - message.success("修改成功"); + .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; - // 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) => { @@ -1652,11 +1657,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(); }; @@ -1727,38 +1732,39 @@ 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 { ...toRefs(state), selectProjectName, + moment, expandTable, handleOut, handleOut1, @@ -1807,17 +1813,21 @@ export default { display: block; clear: both; } + .CreatePath { .ant-modal { width: 680px !important; height: 528px !important; + .ant-modal-content { width: 680px !important; height: 528px !important; + .ant-modal-body { width: 680px !important; height: 528px !important; padding: 0 !important; + .out { display: block; position: absolute; @@ -1830,28 +1840,32 @@ export default { left: 50%; top: 50%; transform: translate(-50%, -50%); + .top { width: 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% ); display: flex; align-items: center; + .topimg { width: 18px; height: 18px; margin-left: 27px; margin-top: -2px; } + .topc { color: #000000; font-size: 16px; margin-left: 8px; } } + .mid { width: 100%; height: 100%; @@ -1859,11 +1873,13 @@ export default { display: flex; flex-direction: column; align-items: center; + .d { // margin-top: 8px; // color: #ff4e4e; margin-left: -5px; } + .name { width: 78%; // background-color: lightcoral; @@ -1878,16 +1894,19 @@ export default { font-size: 14px; margin-left: 7px; } + .in { margin-left: 14px; width: 81%; position: relative; + .ant-input { border-radius: 5px; // height: 120%; width: 100%; height: 40px; } + .showcount { position: absolute; right: 10px; @@ -1896,6 +1915,7 @@ export default { } } } + .bac { width: 78%; // background-color: lightcoral; @@ -1906,12 +1926,14 @@ export default { margin-top: 18px; color: #ff4e4e; } + .inname { color: #6f6f6f; font-size: 14px; margin-left: 7px; margin-top: 15px; } + .in { margin-left: 14px; width: 81%; @@ -1926,11 +1948,13 @@ export default { cursor: pointer; } } + .learnBg { display: flex; flex-wrap: wrap; min-height: 110px; max-height: 300px; + .learnBgItem { border-radius: 8px; width: 136px; @@ -1940,6 +1964,7 @@ export default { margin-bottom: 20px; margin-right: 6px; } + .learnBgMore { display: flex; align-items: center; @@ -1953,6 +1978,7 @@ export default { } } } + .info { width: 78%; // background-color: lightcoral; @@ -1968,10 +1994,12 @@ export default { margin-left: 26px; margin-top: 15px; } + .in { margin-left: 14px; width: 81%; position: relative; + .ant-input { border-radius: 5px; // height: 120%; @@ -1979,6 +2007,7 @@ export default { height: 130px; resize: none; } + .showcount { position: absolute; right: 10px; @@ -1987,12 +2016,14 @@ export default { } } } + .btn { width: 33%; margin-top: 30px; display: flex; justify-content: space-between; margin-bottom: 30px; + .samtn { width: 100px; height: 40px; @@ -2001,10 +2032,12 @@ export default { border-radius: 8px; cursor: pointer; } + .btn1 { background-color: #fff; color: #4ea6ff; } + .btn2 { background-color: #4ea6ff; color: #fff; @@ -2016,20 +2049,25 @@ export default { } } } + .learnBgMoreModal { .ant-modal { width: 680px !important; height: 528px !important; + .ant-modal-content { width: 680px !important; height: 528px !important; + .ant-modal-body { width: 680px !important; height: 528px !important; padding: 0 !important; + .main { display: flex; flex-direction: column; + .top { padding-left: 51px; padding-right: 51px; @@ -2038,6 +2076,7 @@ export default { align-items: center; justify-content: space-between; cursor: pointer; + .topc { font-size: 16px; font-weight: bold; @@ -2045,6 +2084,7 @@ export default { line-height: 36px; } } + .imagesBox { display: flex; // justify-content: space-between; @@ -2054,6 +2094,7 @@ export default { margin-top: 20px; height: 350px; overflow-y: auto; + .learnBgItem { border-radius: 8px; width: 136px; @@ -2064,6 +2105,7 @@ export default { margin-right: 10px; } } + .btn { width: 100%; position: absolute; @@ -2071,6 +2113,7 @@ export default { margin-top: 30px; display: flex; justify-content: center; + .samtn { width: 100px; height: 40px; @@ -2079,10 +2122,12 @@ export default { border-radius: 8px; cursor: pointer; } + .btn1 { background-color: #fff; color: #4ea6ff; } + .btn2 { background-color: #4ea6ff; color: #fff; @@ -2094,16 +2139,19 @@ export default { } } } + .pub { .ant-modal { .ant-modal-body { padding: 0; + .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% ); } + .modalMain { .projectname { color: rgba(79, 81, 86, 1); @@ -2112,33 +2160,39 @@ export default { margin-left: 62px; font-weight: 500; } + .projecttime { margin-left: 221px; + .timeti { color: rgba(153, 155, 163, 1); font-size: 14px; line-height: 36px; } + .timeme { color: rgba(79, 81, 86, 1); font-size: 14px; line-height: 36px; } } + .projectbox { margin-top: 26px; display: flex; justify-content: center; + .promessage { 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; + .messageme { color: rgba(255, 182, 78, 1); font-size: 14px; @@ -2146,21 +2200,24 @@ export default { margin-top: 17px; margin-left: 30px; } + .messagege { color: rgba(153, 155, 163, 1); font-size: 14px; margin-left: 30px; } } + .stumessage { 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; + .messageme1 { color: rgba(78, 166, 255, 1); font-size: 14px; @@ -2168,6 +2225,7 @@ export default { margin-top: 17px; margin-left: 30px; } + .messagege1 { color: rgba(153, 155, 163, 1); font-size: 14px; @@ -2175,26 +2233,32 @@ export default { } } } + .send { margin-top: 30px; margin-left: 61px; + .sendtext { margin-left: 11px; color: rgba(109, 117, 132, 1); font-size: 14px; } } + .ckb { margin-top: 20px; margin-left: 62px; + .sendpeo { color: rgba(109, 117, 132, 1); font-size: 14px; } + .ant-checkbox-inner { border-radius: 4px; } } + .pubtn { display: flex; justify-content: center; @@ -2213,6 +2277,7 @@ export default { align-items: center; background: rgba(255, 255, 255, 1); } + .pubtn2 { width: 100px; height: 40px; @@ -2230,17 +2295,21 @@ export default { } } } + .CopyModal { .ant-modal { width: 424px !important; height: 258px !important; + .ant-modal-content { width: 424px !important; height: 258px !important; + .ant-modal-body { width: 424px !important; height: 258px !important; padding: 0 !important; + .delete { z-index: 999; width: 424px; @@ -2257,19 +2326,22 @@ 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% ); } + .del_main { width: 100%; position: relative; + .header { display: flex; align-items: center; padding-top: 20px; padding-left: 26px; font-size: 16px; + .icon { width: 16px; height: 16px; @@ -2277,6 +2349,7 @@ export default { background-image: url(@/assets/images/taskpage/gan.png); background-size: 100% 100%; } + .close_exit { position: absolute; right: 42px; @@ -2287,6 +2360,7 @@ export default { background-size: 100% 100%; } } + .body { width: 100%; margin: 34px auto 56px auto; @@ -2296,6 +2370,7 @@ export default { flex-direction: column; // background-color: red; position: relative; + .back { position: absolute; top: 30px; @@ -2304,10 +2379,12 @@ export default { color: #666666; } } + .del_btnbox { display: flex; margin: 30px auto; justify-content: center; + .del_btn { width: 100px; height: 40px; @@ -2319,17 +2396,20 @@ export default { flex-shrink: 0; cursor: pointer; + .btnText { font-size: 14px; font-weight: 400; line-height: 40px; } } + .btn1 { border: 1px solid rgba(64, 158, 255, 1); color: #4ea6ff; margin-right: 14px; } + .btn2 { background-color: #4ea6ff; color: #ffffff; @@ -2341,6 +2421,7 @@ export default { } } } + .learningPath { width: 100%; // height: 100%; @@ -2355,22 +2436,26 @@ export default { //background: red; justify-content: center; align-items: center; + .nodata_box { width: 412px; height: 212px; position: relative; background: linear-gradient(180deg, #fef3dd, #fffaf0); border-radius: 10px; + .left { position: absolute; top: 18px; left: 0; } + .center { position: absolute; top: 32px; left: 170px; } + .text1 { position: absolute; top: 128px; @@ -2379,6 +2464,7 @@ export default { color: #ffb64e; font-weight: 500; } + .text2 { position: absolute; bottom: 32px; @@ -2387,6 +2473,7 @@ export default { color: #878b92; font-weight: 500; } + .right { position: absolute; bottom: 18px; @@ -2394,6 +2481,7 @@ export default { } } } + .filter { margin-left: 35px; margin-right: 35px; @@ -2401,17 +2489,21 @@ export default { display: flex; justify-content: space-between; flex-wrap: wrap; + .filterItems { display: flex; flex-wrap: wrap; + .pathnameInp { margin-right: 20px; margin-bottom: 20px; } + .select { margin-right: 20px; margin-bottom: 20px; } + .btn { padding: 0px 26px 0px 26px; height: 38px; @@ -2424,9 +2516,11 @@ export default { margin-right: 14px; flex-shrink: 0; cursor: pointer; + .search { background-size: 100%; } + .btnText { font-size: 14px; font-weight: 400; @@ -2435,6 +2529,7 @@ export default { margin-left: 5px; } } + .btnn { padding: 0px 26px 0px 26px; height: 38px; @@ -2447,9 +2542,11 @@ export default { margin-right: 14px; flex-shrink: 0; cursor: pointer; + .search { background-size: 100%; } + .btnText { font-size: 14px; font-weight: 400; @@ -2458,6 +2555,7 @@ export default { margin-left: 5px; } } + .btn1 { .search { width: 15px; @@ -2465,6 +2563,7 @@ export default { background-image: url("../../assets/images/courseManage/search0.png"); } } + .btn2 { .search { width: 16px; @@ -2472,25 +2571,32 @@ export default { background-image: url("../../assets/images/courseManage/reset1.png"); } } + .btn1:hover { background: rgba(64, 158, 255, 0.76); + .search { background-image: url("../../assets/images/courseManage/search0.png"); } + .btnText { color: #ffffff; } } + .btn1:active { background: #0982ff; } + .btn2:hover { background: rgba(64, 158, 255, 0.1); } + .btn2:active { background: rgba(64, 158, 255, 0.2); } } + .btns { display: flex; // flex-wrap: wrap; @@ -2506,9 +2612,11 @@ export default { margin-right: 14px; flex-shrink: 0; cursor: pointer; + .search { background-size: 100%; } + .btnText { font-size: 14px; font-weight: 400; @@ -2517,28 +2625,35 @@ export default { margin-left: 5px; } } + .btn3 { margin-right: 0px; + .search { width: 17px; height: 18px; background-image: url("../../assets/images/courseManage/add0.png"); } } + .btn3:hover { background: rgba(64, 158, 255, 0.76); + .search { background-image: url("../../assets/images/courseManage/add0.png"); } + .btnText { color: #ffffff; } } + .btn3:active { background: #0982ff; } } } + .tableBox { // margin: 20px 38px 30px; margin: 10px 35px 0px 35px; @@ -2548,13 +2663,15 @@ 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; } } + .tableBox { padding-bottom: 20px; + .pa { // position: absolute; // bottom: 20px; @@ -2569,13 +2686,16 @@ export default { // bottom: -40px; } } + .operation { display: flex; justify-content: right; + .nSelect { .fb { display: flex; white-space: nowrap; + .jc { color: #4ea6ff; font-size: 14px; @@ -2585,12 +2705,14 @@ export default { } } } + .tableSelect { // margin-right: 20px; display: flex; align-items: center; justify-content: right; white-space: nowrap; + .g1 { color: #4ea6ff; font-size: 14px; @@ -2606,6 +2728,7 @@ export default { .opa { display: flex; justify-content: right; + .opacation { font-size: 14px; font-weight: 400; @@ -2615,12 +2738,15 @@ export default { .activecls { display: inline-block; } + .errorCls { display: none; } + .more { position: relative; height: 100%; + .moreArrow { width: 13px; height: 7px; @@ -2630,6 +2756,7 @@ export default { margin: 2px; margin-left: 7px; } + .moreItems { width: 80px; height: 70px; @@ -2644,9 +2771,11 @@ export default { z-index: 999; } } + .more:hover .moreArrow { background-image: url("../../assets/images/navtop/up.png"); } + .more:hover .moreItems { display: block; } diff --git a/src/views/projectcenter/ProjectManage.vue b/src/views/projectcenter/ProjectManage.vue index 3c366c35..bc9c6c63 100644 --- a/src/views/projectcenter/ProjectManage.vue +++ b/src/views/projectcenter/ProjectManage.vue @@ -49,6 +49,9 @@
- {{ projectInfo.parentId ? '可创建班级,通过班级填写基础信息并创建任务' : '包含子项目,分为多层子项目和单层子项目,多层子项目可创建班级,通过班级填写基础信息并创建任务' }} + {{ + projectInfo.parentId ? '可创建班级,通过班级填写基础信息并创建任务' : '包含子项目,分为多层子项目和单层子项目,多层子项目可创建班级,通过班级填写基础信息并创建任务' + }}
@@ -810,7 +815,7 @@ import ProjectManager from "@/components/project/ProjectManagerNew"; import ProjectClass from "@/components/project/ProjectClass"; import OrgClass from "@/components/project/OrgClass"; import dayjs from "dayjs"; - +import * as moment from 'moment' export default { name: "projectManage", @@ -1745,6 +1750,7 @@ export default { return { ...toRefs(state), dayjs, + moment, reFinashedProject, showBackFinashModal, timeChange,