From b64ce03c624dddff5e45588ac1779ae3b8f3d88e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E6=99=93=E9=B8=BD?= Date: Fri, 28 Oct 2022 09:00:26 +0800 Subject: [PATCH] =?UTF-8?q?=E8=8E=B7=E5=8F=96=E5=AD=A6=E4=B9=A0=E8=B7=AF?= =?UTF-8?q?=E5=BE=84=E5=88=97=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/index1.js | 6 + src/components/drawers/ActiveAttendance.vue | 3 + src/views/courselibrary/CoursewareManage.vue | 39 +- src/views/learningpath/LearningPath.vue | 934 ++++++++++--------- src/views/learningpath/LevelAddDetail.vue | 1 - src/views/system/SystemManage.vue | 69 ++ 6 files changed, 573 insertions(+), 479 deletions(-) diff --git a/src/api/index1.js b/src/api/index1.js index a57c3bfc..8baf22aa 100644 --- a/src/api/index1.js +++ b/src/api/index1.js @@ -37,6 +37,12 @@ import http from "./config"; // 接口-请求 +//创建学习路径 +export const createLearnPath = (obj) => http.post('/admin/router/edit', obj, { + headers: { + 'token': '123' + } +}); // 获取学习路径图列表 export const getLearnPath = (obj) => http.post('/admin/router/list', obj); diff --git a/src/components/drawers/ActiveAttendance.vue b/src/components/drawers/ActiveAttendance.vue index f1004e56..8d882211 100644 --- a/src/components/drawers/ActiveAttendance.vue +++ b/src/components/drawers/ActiveAttendance.vue @@ -816,6 +816,9 @@ export default { } .opa { // background-color: #bfa; + .ant-checkbox + span { + margin-top: 5px; + } } } // .tab { diff --git a/src/views/courselibrary/CoursewareManage.vue b/src/views/courselibrary/CoursewareManage.vue index d4602bed..81da23d2 100644 --- a/src/views/courselibrary/CoursewareManage.vue +++ b/src/views/courselibrary/CoursewareManage.vue @@ -121,7 +121,9 @@
-
课程命名规则
+
+ 课程命名规则 +
-
课程命名规则
+
+ 课程命名规则 +
-
-
- 批量录入成绩 +
+
+ 批量录入成绩 +
+
+ 批量结业 +
+
+ 批量通过 +
+
+ 批量拒绝 +
-
- 批量结业 -
-
- 批量通过 -
-
- 批量拒绝 -
-
@@ -1691,6 +1695,7 @@ wrapClassName="DelModal" style="margin-top: 400px" @cancel="delete_exit" + :zIndex="9999" >
-
+
搜索
@@ -50,7 +50,6 @@
重置
-
-
@@ -253,14 +273,25 @@ />
归属组织
-
+
+ +
+
@@ -275,7 +306,7 @@ -->
路径说明
- -
{{ valuei.length }}/150
+ +
{{ pathIntro.length }}/150
@@ -550,6 +581,12 @@ import PowerList from "../../components/drawers/PowerList"; import QueryRight from "../../components/drawers/QueryRight"; import ManageRight from "../../components/drawers/ManageRight"; import * as api from "../../api/index1"; +import { message } from "ant-design-vue"; +function getBase64(img, callback) { + const reader = new FileReader(); + reader.addEventListener("load", () => callback(reader.result)); + reader.readAsDataURL(img); +} export default { name: "learningPath", components: { OwnerShip, PowerList, QueryRight, ManageRight }, @@ -583,117 +620,20 @@ export default { selectTime: null, sh: false, tableData: [ - { - key: 1, - number: 1, - manager: "产品经理上升路径", - state: "已发布", - creater: "管理员", - pubtime: "2022-07-20 14:00:03", - cretime: "2022-07-20 14:00:03", - haspub: false, - }, - { - key: 2, - number: 2, - manager: "程序员升级路径", - state: "草稿", - creater: "管理员", - pubtime: "2022-07-20 14:00:03", - cretime: "2022-07-20 14:00:03", - haspub: true, - }, - { - key: 3, - number: 3, - manager: "ui成长之路", - state: "已停用", - creater: "管理员", - pubtime: "2022-07-20 14:00:03", - cretime: "2022-07-20 14:00:03", - haspub: false, - }, - { - key: 4, - number: 4, - manager: "ui成长之路", - state: "草稿", - creater: "管理员", - pubtime: "2022-07-20 14:00:03", - cretime: "2022-07-20 14:00:03", - haspub: true, - }, - { - key: 4, - number: 4, - manager: "ui成长之路", - state: "草稿", - creater: "管理员", - pubtime: "2022-07-20 14:00:03", - cretime: "2022-07-20 14:00:03", - haspub: true, - }, - { - key: 4, - number: 4, - manager: "ui成长之路", - state: "草稿", - creater: "管理员", - pubtime: "2022-07-20 14:00:03", - cretime: "2022-07-20 14:00:03", - haspub: true, - }, - { - key: 4, - number: 4, - manager: "ui成长之路", - state: "草稿", - creater: "管理员", - pubtime: "2022-07-20 14:00:03", - cretime: "2022-07-20 14:00:03", - haspub: true, - }, - { - key: 4, - number: 4, - manager: "ui成长之路", - state: "草稿", - creater: "管理员", - pubtime: "2022-07-20 14:00:03", - cretime: "2022-07-20 14:00:03", - haspub: true, - }, - { - key: 4, - number: 4, - manager: "ui成长之路", - state: "草稿", - creater: "管理员", - pubtime: "2022-07-20 14:00:03", - cretime: "2022-07-20 14:00:03", - haspub: true, - }, - { - key: 4, - number: 4, - manager: "ui成长之路", - state: "草稿", - creater: "管理员", - pubtime: "2022-07-20 14:00:03", - cretime: "2022-07-20 14:00:03", - haspub: true, - }, - { - key: 4, - number: 4, - manager: "ui成长之路", - state: "草稿", - creater: "管理员", - pubtime: "2022-07-20 14:00:03", - cretime: "2022-07-20 14:00:03", - haspub: true, - }, - ], + // { + // key: 1, + // number: 1, + // manager: "产品经理上升路径", + // state: "已发布", + // creater: "管理员", + // pubtime: "2022-07-20 14:00:03", + // cretime: "2022-07-20 14:00:03", + // }, + ], //学习路径列表 + currentPage: 1, //当前页 + tableDataTotal: -1, //学习路径列表总数 + pageSize: 10, //每页10条数据 + imgData: [ { id: 1, @@ -727,15 +667,129 @@ export default { PLvisible: false, //授权名单抽屉 Queryvisible: false, //查看权抽屉 Managevisible: false, //管理权抽屉 - currentPage: 1, - tableDataTotal: 100, - pageSize: 10, + value1: "", value2: "", - valueE: "", + pathName: "", //创建/编辑路径图名称 + organization: "", //创建/编辑路径图归属组织 + organizationList: [ + { + id: 1, + value: "组织一", + label: "组织一", + }, + { + id: 2, + value: "组织二", + label: "组织二", + }, + { + id: 3, + value: "组织三", + label: "组织三", + }, + { + id: 4, + value: "组织四", + label: "组织四", + }, + ], //归属组织 + organizationSelectName: null, //归属组织选择名称 + organizationSelectId: null, //归属组织选择id + pathIntro: "", //路径说明 valueEE: "", - valuei: "", }); + + const selectProjectName = (value, index) => { + console.log("value", value, index); + }; + const expandTable = (e, a) => { + // console.log("惦记了"); + console.log("e", e, a); + }; + const handleOut = () => { + state.out = !state.out; + }; + const handleOut1 = () => { + state.out1 = !state.out1; + }; + const chooseImg = (item) => { + console.log(item); + state.learnPathBg = item.id; + }; + const showPub = () => { + state.pub = true; + }; + const closePub = () => { + state.pub = false; + }; + const showCopyModal = () => { + state.copyModal = true; + }; + const closeCopyModal = () => { + state.copyModal = false; + }; + const showStopModal = () => { + state.stopModal = true; + }; + const closeStopModal = () => { + state.stopModal = false; + }; + const showDeleteModal = () => { + state.deleteModal = true; + }; + const closeDeleteModal = () => { + state.deleteModal = false; + }; + const showStartModal = () => { + state.startModal = true; + }; + const closeStartModal = () => { + state.startModal = false; + }; + const showBackModal = () => { + state.backModal = true; + }; + const closeBackModal = () => { + state.backModal = false; + }; + const showOwner = () => { + state.Ownervisible = true; + }; + const showPower = () => { + state.PLvisible = true; + }; + const showQuery = () => { + state.Queryvisible = true; + }; + const showManage = () => { + state.Managevisible = true; + }; + const getTableDate = (tableData) => { + let data = tableData; + let array = []; + data.map((value, index) => { + let obj = { + id: value.routerId, + number: (state.currentPage - 1) * state.pageSize + index + 1, + manager: value.name, + state: + value.status === 0 + ? "草稿" + : value.status === 1 + ? "已发布" + : value.status === -1 + ? "已停用" + : "-", + creater: value.createName, + pubtime: value.publishTime, + cretime: value.createTime, + }; + array.push(obj); + }); + state.tableData = array; + }; + const tableDataFunc = () => { const columns = [ { @@ -796,236 +850,115 @@ export default { key: "opacation", width: 200, align: "center", - }, - ]; - return columns; - }; - //获取学习路径列表 - const getLearnPath = () => { - let obj = { - beginTime: 0, - endTime: 0, - name: "", - pageNo: 0, - pageSize: 0, - status: 0, - }; - api - .getLearnPath(obj) - .then((res) => { - console.log("获取路径列表数据", res); - }) - .catch((err) => { - console.log("获取学习路径失败", err); - }); - let getChapterObj = { - routerId: 0, - }; - api - .getChapter(getChapterObj) - .then((res) => { - console.log("获取关卡数据", res); - }) - .catch((err) => { - console.log("获取关卡数据失败", err); - }); - - // let editChapterObj = { - // name: "测试关卡", - // remark: "这是测试关卡说明", - // routerId: 0, - // }; - // api - // .editChapter(editChapterObj) - // .then((res) => { - // console.log("添加测试关卡数据", res); - // }) - // .catch((err) => { - // console.log("添加测试关卡数据失败", err); - // }); - }; - onMounted(() => { - // console.log("执行"); - getLearnPath(); - }); - const selectProjectName = (value, index) => { - console.log("value", value, index); - }; - const expandTable = (e, a) => { - // console.log("惦记了"); - console.log("e", e, a); - }; - const handleOut = () => { - state.out = !state.out; - }; - const handleOut1 = () => { - state.out1 = !state.out1; - }; - const chooseImg = (id) => { - console.log(id); - state.learnPathBg = id; - }; - const showPub = () => { - state.pub = true; - }; - const closePub = () => { - state.pub = false; - }; - const showCopyModal = () => { - state.copyModal = true; - }; - const closeCopyModal = () => { - state.copyModal = false; - }; - const showStopModal = () => { - state.stopModal = true; - }; - const closeStopModal = () => { - state.stopModal = false; - }; - const showDeleteModal = () => { - state.deleteModal = true; - }; - const closeDeleteModal = () => { - state.deleteModal = false; - }; - const showStartModal = () => { - state.startModal = true; - }; - const closeStartModal = () => { - state.startModal = false; - }; - const showBackModal = () => { - state.backModal = true; - }; - const closeBackModal = () => { - state.backModal = false; - }; - const showOwner = () => { - state.Ownervisible = true; - }; - const showPower = () => { - state.PLvisible = true; - }; - const showQuery = () => { - state.Queryvisible = true; - }; - const showManage = () => { - state.Managevisible = true; - }; - const getTableDate = () => { - let data = state.tableData; - data.map((value) => { - { - //单层项目 - value.opacation = ( -
-
- {value.state === "草稿" ? ( -
-
{ - showPub(); - }} - > - 发布 + scopedSlots: { customRender: "action" }, //引入的插槽 + customRender: (text) => { + // console.log(text); + return ( +
+
+ {text.record.state === "草稿" ? ( +
+
{ + showPub(); + }} + > + 发布 +
+
{ + state.out1 = true; + }} + > + 编辑 +
-
{ - state.out1 = true; - }} - > - 编辑 + ) : ( +
+ )} + {text.record.state === "已发布" ? ( +
+
{ + state.out1 = true; + }} + > + 编辑 +
-
- ) : ( -
- )} - {value.state === "已发布" ? ( -
-
{ - state.out1 = true; - }} - > - 编辑 + ) : ( +
+ )} + {text.record.state === "未发布" ? ( +
+
{ + showCopyModal(); + }} + > + 复制 +
-
- ) : ( -
- )} - {value.state === "已停用" ? ( -
-
{ - showCopyModal(); - }} - > - 复制 -
-
- ) : ( -
- )} -
-
- -
关卡
-
- - - -
{ - showPower(); - }} - > - 权限名单 -
-
- -
{ - showOwner(); - }} - > - 归属权 -
-
- -
{ - showQuery(); - }} - > - 查看权 -
-
- -
{ - showManage(); - }} - > - 管理权 -
-
-
-
-
- {value.state === "草稿" ? ( -
+ ) : ( +
+ )} +
+
+ +
关卡
+
+ + +
{ + showPower(); + }} + > + 权限名单 +
+
+ +
{ + showOwner(); + }} + > + 归属权 +
+
+ +
{ + showQuery(); + }} + > + 查看权 +
+
+ +
{ + showManage(); + }} + > + 管理权 +
+
+
+
+
+ {text.record.state === "草稿" ? ( -
- ) : ( -
- )} - {value.state === "已发布" ? ( -
- -
+ )} + {text.record.state === "已发布" ? ( +
+ -
{ - showCopyModal(); - }} + - 复制 -
- +
{ + showCopyModal(); + }} + > + 复制 +
+ - -
{ - showBackModal(); - }} + - 撤回 -
-
-
-
- ) : ( -
- )} - {value.state === "已停用" ? ( -
- - { + showBackModal(); + }} + > + 撤回 +
+ + +
+ ) : ( +
+ )} + {text.record.state === "未发布" ? ( +
+ -
{ - showStartModal(); - }} + - 启用 -
- +
{ + showStartModal(); + }} + > + 启用 +
+ - -
{ - showDeleteModal(); - }} + - 删除 -
-
-
-
- ) : ( -
- )} +
{ + showDeleteModal(); + }} + > + 删除 +
+ + +
+ ) : ( +
+ )} +
-
- ); - } - }); - state.tableData = data; + ); + }, + }, + ]; + return columns; }; - getTableDate(); + const selectorganization = (e, v) => { + console.log("eee", e, v); + state.organizationSelectName = e; + state.organizationSelectId = v.id; + }; + //创建学习路径图 + const createLearnPath = () => { + getBase64("../../assets/images/leveladd/2.png", (base64Url) => { + console.log("base64Url", base64Url); + }); + if (!state.pathName) return message.info("请输入路径图名称"); + if (!state.organizationSelectName) return message.info("请选择归属组织"); + if (!state.organizationSelectName) return message.info("请选择归属组织"); + // let obj = { + // name: "新建路径图测试", + // picUrl: "", + // remark: "新建路径图测试说明", + // status: 0, + // }; + // api + // .createLearnPath(obj) + // .then((res) => { + // console.log("创建成功", res); + // }) + // .catch((err) => { + // console.log("创建失败", err); + // }); + }; + //获取学习路径列表 + const getLearnPath = () => { + let obj = { + pageNo: state.currentPage, + pageSize: state.pageSize, + }; + api + .getLearnPath(obj) + .then((res) => { + if (res.status === 200) { + // console.log("获取路径列表数据", res.data.data); + let arr = res.data.data.rows; + // let array = []; + getTableDate(arr); + + // state.tableData = array; + // getTableDate(); + // console.log("tableData", array); + state.tableDataTotal = Number(res.data.data.total); + } + }) + .catch((err) => { + console.log("获取学习路径失败", err); + }); + // let getChapterObj = { + // routerId: 0, + // }; + // api + // .getChapter(getChapterObj) + // .then((res) => { + // console.log("获取关卡数据", res); + // }) + // .catch((err) => { + // console.log("获取关卡数据失败", err); + // }); + + // let editChapterObj = { + // name: "测试关卡", + // remark: "这是测试关卡说明", + // routerId: 0, + // }; + // api + // .editChapter(editChapterObj) + // .then((res) => { + // console.log("添加测试关卡数据", res); + // }) + // .catch((err) => { + // console.log("添加测试关卡数据失败", err); + // }); + }; + onMounted(() => { + // console.log("执行"); + getLearnPath(); + }); return { ...toRefs(state), selectProjectName, @@ -1188,6 +1202,8 @@ export default { chooseImg, showQuery, showManage, + createLearnPath, + selectorganization, }; }, }; @@ -1647,11 +1663,7 @@ export default { width: 412px; height: 212px; position: relative; - background: linear-gradient( - 180deg, - #FEF3DD, - #FFFAF0 - ); + background: linear-gradient(180deg, #fef3dd, #fffaf0); border-radius: 10px; .left { position: absolute; @@ -1668,7 +1680,7 @@ export default { top: 128px; left: 178px; font-size: 20px; - color: #FFB64E; + color: #ffb64e; font-weight: 500; } .text2 { @@ -1676,7 +1688,7 @@ export default { bottom: 32px; left: 174px; font-size: 14px; - color: #878B92; + color: #878b92; font-weight: 500; } .right { diff --git a/src/views/learningpath/LevelAddDetail.vue b/src/views/learningpath/LevelAddDetail.vue index ef360373..2586802d 100644 --- a/src/views/learningpath/LevelAddDetail.vue +++ b/src/views/learningpath/LevelAddDetail.vue @@ -798,7 +798,6 @@ export default { selectedRowKeys: [], isActive: false, gqxy_hs: true, - projectChecked: null, //项目单选框 }); const showDrawer = () => { diff --git a/src/views/system/SystemManage.vue b/src/views/system/SystemManage.vue index 4d32ae84..b1283f24 100644 --- a/src/views/system/SystemManage.vue +++ b/src/views/system/SystemManage.vue @@ -24,20 +24,50 @@
Option A + + +