diff --git a/package-lock.json b/package-lock.json index f9476b22..379ccd42 100644 --- a/package-lock.json +++ b/package-lock.json @@ -14906,9 +14906,9 @@ } }, "dayjs": { - "version": "1.11.5", - "resolved": "https://registry.npmmirror.com/dayjs/-/dayjs-1.11.5.tgz", - "integrity": "sha512-CAdX5Q3YW3Gclyo5Vpqkgpj8fSdLQcRuzfX6mC6Phy0nfJ0eGYOeS7m4mt2plDWLAtA4TqTakvbboHvUxfe4iA==" + "version": "1.11.6", + "resolved": "https://registry.npmmirror.com/dayjs/-/dayjs-1.11.6.tgz", + "integrity": "sha512-zZbY5giJAinCG+7AGaw0wIhNZ6J8AhWuSXKvuc1KAyMiRsvGQWqh4L+MomvhdAYjN+lqvVCMq1I41e3YHvXkyQ==" }, "debug": { "version": "4.3.4", @@ -19007,6 +19007,11 @@ "websocket-driver": "^0.7.4" } }, + "sortablejs": { + "version": "1.15.0", + "resolved": "https://registry.npmmirror.com/sortablejs/-/sortablejs-1.15.0.tgz", + "integrity": "sha512-bv9qgVMjUMf89wAvM6AxVvS/4MX3sPeN0+agqShejLU5z5GX4C75ow1O2e5k4L6XItUyAK3gH6AxSbXrOM5e8w==" + }, "source-map": { "version": "0.6.1", "resolved": "https://registry.npmmirror.com/source-map/-/source-map-0.6.1.tgz", @@ -19775,6 +19780,21 @@ } } }, + "vuedraggable": { + "version": "4.1.0", + "resolved": "https://registry.npmmirror.com/vuedraggable/-/vuedraggable-4.1.0.tgz", + "integrity": "sha512-FU5HCWBmsf20GpP3eudURW3WdWTKIbEIQxh9/8GE806hydR9qZqRRxRE3RjqX7PkuLuMQG/A7n3cfj9rCEchww==", + "requires": { + "sortablejs": "1.14.0" + }, + "dependencies": { + "sortablejs": { + "version": "1.14.0", + "resolved": "https://registry.npmmirror.com/sortablejs/-/sortablejs-1.14.0.tgz", + "integrity": "sha512-pBXvQCs5/33fdN1/39pPL0NZF20LeRbLQ5jtnheIPN9JQAaufGjKdWduZn4U7wCtVuzKhmRkI0DFYHYRbB2H1w==" + } + } + }, "vuex": { "version": "4.0.2", "resolved": "https://registry.npmmirror.com/vuex/-/vuex-4.0.2.tgz", diff --git a/package.json b/package.json index ec2d5ef6..7f47e397 100644 --- a/package.json +++ b/package.json @@ -15,8 +15,10 @@ "element-plus": "^2.2.17", "jquery": "^3.6.1", "qs": "^6.11.0", + "sortablejs": "^1.15.0", "vue": "^3.2.13", "vue-router": "^4.0.3", + "vuedraggable": "^4.1.0", "vuex": "^4.0.0" }, "devDependencies": { diff --git a/src/App.vue b/src/App.vue index b6b111f7..7ab55e6d 100644 --- a/src/App.vue +++ b/src/App.vue @@ -75,7 +75,7 @@ export default defineComponent({ flex: 1 1 auto; // flex-shrink: 0; display: flex; - overflow-y: scroll; + overflow-y: auto; // display: flex; // flex: 1 1 auto; width: calc(100% - 40px); diff --git a/src/api/index.js b/src/api/index.js index ca3a832a..b0db5ad7 100644 --- a/src/api/index.js +++ b/src/api/index.js @@ -1,3 +1,11 @@ +/* + * @Author: lixg lixg@dongwu-inc.com + * @Date: 2022-11-07 17:06:45 + * @LastEditors: lixg lixg@dongwu-inc.com + * @LastEditTime: 2022-11-07 20:11:23 + * @FilePath: /fe-manage/src/api/index.js + * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE + */ import http from "./config"; // import qs from 'qs'; @@ -37,35 +45,15 @@ import http from "./config"; // 接口-请求 -// 创建编辑单层项目 -export const createProject = (obj) => http.post('/admin/project/edit', { - "attach": obj.attach, - "beginTime": obj.beginTime, - "boeFlag": obj.boeFlag, - "category": obj.category, - "courseSyncFlag": obj.courseSyncFlag, - "endTime": obj.endTime, - "level": obj.level, - "manager": obj.manager, - "managerId": obj.managerId, - "name": obj.name, - "notice": obj.notice, - "noticeFlag": obj.noticeFlag, - "picUrl": obj.picUrl, - "remark": obj.remark, - "sourceBelongId": obj.sourceBelongId, - "status": obj.status, - "systemId": obj.systemId, - "templateId": obj.templateId, - "type": obj.type -}) - -// 创建多层项目 -export const createStoreyProject = () => http.post('/admin/project/edit', { - -}) +// 创建编辑单层项目(type=3)/ 多层项目(type=1)/ 多层子项目(type=2) +export const createProject = (obj) => http.post('/admin/project/edit', obj) // 获取项目列表 -export const getProjectList = () => http.post('/admin/project/list', { +export const getProjectList = (obj) => http.post('/admin/project/list', obj) -}) \ No newline at end of file +// 获取项目详情信息(包含阶段及任务列表) +export const getProjectDetail = (obj) => http.get('/admin/project/detail', { params: obj }) +//发布项目 +export const releaseProject=(obj)=>http.post('/admin/project/publish',obj) +//获取项目学员 +export const projectStudent=(obj)=>http.post('/admin/project/studentList',obj) \ No newline at end of file diff --git a/src/api/index1.js b/src/api/index1.js index 6141767f..16e7ee9d 100644 --- a/src/api/index1.js +++ b/src/api/index1.js @@ -1,3 +1,11 @@ +/* + * @Author: lixg lixg@dongwu-inc.com + * @Date: 2022-11-04 22:45:31 + * @LastEditors: lixg lixg@dongwu-inc.com + * @LastEditTime: 2022-11-06 16:48:50 + * @FilePath: /fe-manage/src/api/index1.js + * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE + */ import http from "./config"; import qs from 'qs'; @@ -40,25 +48,35 @@ export const uploadFile = (obj) => http.post('/test/testRequest', qs.stringify({ // 接口-请求 //创建学习路径 -export const createLearnPath = (obj) => http.post('/admin/router/edit', obj, { - headers: { - 'token': '123' - } -}); +export const createLearnPath = (obj) => http.post('/admin/router/edit', obj); // 获取学习路径图列表 export const getLearnPath = (obj) => http.post('/admin/router/list', obj); -//删除学习路径图 -export const deleteLearnPath = (obj) => http.post('/admin/router/handle', obj, { - headers: { - 'token': '123' - } -}); +//学习路径图的发布、停用、删除 +export const handleLearnPath = (obj) => http.post('/admin/router/handle', obj); //获取关卡 export const getChapter = (obj) => http.post('/admin/router/detail', { params: obj }); //新建或编辑关卡 export const editChapter = (obj) => http.post('/admin/router/editChapter', obj); +//获取学员列表 +export const getStudent = (obj) => http.post('/admin/router/studentList', obj); +//获取路径图详情-包含关卡及任务列表 +export const getRouterDetail = (routerId) => http.get('/admin/router/detail', { + params: { + routerId: routerId, + } +}); +//添加学员 +export const addStudent = (obj) => http.post('/admin/router/addStudent', obj); + + +//项目基础信息----------------------------------- +//项目积分榜单 +export const scoreRank = (obj) => http.post('/admin/project/scoreRank', obj); +//排行榜 +export const billboard = (obj) => http.post('/admin/project/billboard', obj); +//项目基础信息----------------------------------- // 测试方法 // import * as api from '../../api/index' diff --git a/src/api/indexEval.js b/src/api/indexEval.js index 50e8a8e3..f76de0b9 100644 --- a/src/api/indexEval.js +++ b/src/api/indexEval.js @@ -1,5 +1,5 @@ import http from "./config"; -// import qs from 'qs'; +import qs from 'qs'; /** * 接口传参数方式(get) @@ -46,8 +46,12 @@ export const fileUp = (data) => }); //删除测评信息 -export const deleteEvaluationById = (obj) => - http.post("/evaluation/deleteEvaluationById", { params: obj }); +export const deleteEvaluationById = (obj) => http.post('/evaluation/deleteEvaluationById', { params: obj }, { + header: { + 'token': '123', + } +}) + //根据ID获取测评信息详情 export const queryEvaluationDetailById = (obj) => diff --git a/src/api/indexExam.js b/src/api/indexExam.js index fc9a30af..727dd42c 100644 --- a/src/api/indexExam.js +++ b/src/api/indexExam.js @@ -8,7 +8,10 @@ export const createExamination = (obj) => http.post('/examination/createExaminat // 根据Id删除考试信息 export const deleteExaminationById = (obj) => http.post('/examination/deleteExaminationById',obj); // 根据ID获取考试信息详情 -export const queryExaminationDetailById = (obj) => http.post('/examination/queryExaminationDetailById',obj); +export const queryExaminationDetailById = (obj) => http.post('/examination/queryExaminationDetailById',obj,{headers: { + 'Content-Type': 'application/x-www-form-urlencoded;charset=UTF-8' +} +}); // 创建考试信息接口 export const updateExamination = (obj) => http.post('/examination/updateExamination',obj); diff --git a/src/api/indexExternalChain.js b/src/api/indexExternalChain.js index 9de46f42..6bc219d3 100644 --- a/src/api/indexExternalChain.js +++ b/src/api/indexExternalChain.js @@ -1,19 +1,39 @@ import http from "./config"; //创建外链接口 -export const createExternalChain = (obj) => http.post('/link/createLinks', obj) +export const createExternalChain = (obj) => http.post('/link/createLinks', obj, { + headers: { + 'token': '123' + } +}) //外链信息删除接口 -export const deleteLink = (obj) => http.post('/link/deleteLink', { params: obj }) +export const deleteLink = (obj) => http.post('/link/deleteLink', { params: obj }, { + headers: { + 'token': '123' + } +}) //获取外链详细信息接口 -export const getLink = (obj) => http.post('/link/getOne', { params: obj }) +export const getLink = (obj) => http.post('/link/getOne', obj) // 更新外链数据 -export const updateLinks = (obj) => http.post('/link/updateLinks', obj) +export const updateLinks = (obj) => http.post('/link/updateLinks', obj, { + headers: { + 'token': '123' + } +}) //修改为必修的接口 -export const updateToCompulsory = (obj) => http.post('/link/updateToCompulsory', { params: obj }) +export const updateToCompulsory = (obj) => http.post('/link/updateToCompulsory', { params: obj }, { + headers: { + 'token': '123' + } +}) //修改为选修的接口 -export const updateToElective = (obj) => http.post('/link/updateToElective', { params: obj }) \ No newline at end of file +export const updateToElective = (obj) => http.post('/link/updateToElective', { params: obj }, { + headers: { + 'token': '123' + } +}) \ No newline at end of file diff --git a/src/api/indexInvist.js b/src/api/indexInvist.js index 550a5803..31bb417f 100644 --- a/src/api/indexInvist.js +++ b/src/api/indexInvist.js @@ -43,13 +43,15 @@ export const createAppraiseMessage = (obj) => http.post('/survey/createAppraiseM //删除评估信息 export const deleteAppraise = (obj) => http.post('/survey/deleteAppraise', { params: obj }) - //根据ID获取评估信息详情 export const queryAppraiseDetailById = (obj) => http.post('/survey/queryAppraiseDetailById', { params: obj }) //修改评估信息 export const updateAppraiseMessage = (obj) => http.post('/survey/updateAppraiseMessage', obj) +//获取全部评估信息接口 +export const queryAssessmentDetailList = (obj) => http.post('/assessment/queryAssessmentDetailList', obj) + // 测试方法 // import * as api from '../../api/index' diff --git a/src/api/indexLevel.js b/src/api/indexLevel.js index 39e22fcd..4cfe5d58 100644 --- a/src/api/indexLevel.js +++ b/src/api/indexLevel.js @@ -1,8 +1,12 @@ import http from "./config"; -//新建或编辑关卡 -export const editChapter = (obj) => http.post('/admin/router/editChapter', obj, { - headers: { - 'token': '123' - } -}); \ No newline at end of file +//新建关卡 +export const editChapter = (obj) => http.post('/admin/router/editChapter', obj); +//编辑关卡 +export const updateChapter = (obj) => http.post('/admin/router/editChapter', obj); + +//删除任务 +export const deleteTask = (obj) => http.delete('/admin/router/deleteTask',{params: obj}); + +//移动任务到关卡 +export const moveTask = (obj) => http.post('/admin/router/moveTask',obj); diff --git a/src/api/indexLiveBroadcast.js b/src/api/indexLiveBroadcast.js index ef05e98e..1f5bb7a6 100644 --- a/src/api/indexLiveBroadcast.js +++ b/src/api/indexLiveBroadcast.js @@ -4,10 +4,22 @@ import http from "./config"; export const getLiveBroadcastInfor = (obj) => http.get('/liveBroadcast', { params: obj }) //创建直播接口 -export const createLiveBroadcast = (obj) => http.post('/liveBroadcast/createLiveBroadcast', obj) +export const createLiveBroadcast = (obj) => http.post('/liveBroadcast/createLiveBroadcast', obj, { + headers: { + 'token': '123' + } +}) //直播信息删除接口 -export const deleteLiveBroadcast = (obj) => http.post('/liveBroadcast/deleteLiveBroadcast', obj) +export const deleteLiveBroadcast = (obj) => http.post('/liveBroadcast/deleteLiveBroadcast', obj, { + headers: { + 'token': '123' + } +}) //直播信息修改接口 -export const updateLiveBroadcastMessage = (obj) => http.post('/liveBroadcast/updateLiveBroadcastMessage', obj) \ No newline at end of file +export const updateLiveBroadcastMessage = (obj) => http.post('/liveBroadcast/updateLiveBroadcastMessage', obj, { + headers: { + 'token': '123' + } +}) \ No newline at end of file diff --git a/src/api/indexMovetask.js b/src/api/indexMovetask.js new file mode 100644 index 00000000..a0fee2ca --- /dev/null +++ b/src/api/indexMovetask.js @@ -0,0 +1,4 @@ +import http from "./config"; + +//移动任务到阶段 +export const moveTask = (obj) => http.post('/admin/project/moveTask',obj) \ No newline at end of file diff --git a/src/api/indexStage.js b/src/api/indexStage.js new file mode 100644 index 00000000..1e6a2587 --- /dev/null +++ b/src/api/indexStage.js @@ -0,0 +1,4 @@ +import http from "./config"; + +//添加阶段 +export const editStage = (obj) => http.post('/admin/project/editStage', obj); \ No newline at end of file diff --git a/src/api/indexStudy.js b/src/api/indexStudy.js new file mode 100644 index 00000000..d948affb --- /dev/null +++ b/src/api/indexStudy.js @@ -0,0 +1,3 @@ +import http from "./config"; +//路径图删除任务 +export const deleteStudyTask = (obj) => http.delete('/admin/router/deleteTask', { params: obj }) \ No newline at end of file diff --git a/src/api/indexTask.js b/src/api/indexTask.js new file mode 100644 index 00000000..534f95e7 --- /dev/null +++ b/src/api/indexTask.js @@ -0,0 +1,14 @@ +import http from "./config"; + + +// 获取路径图详情-包含关卡及任务列表 +export const GetRouterDetail = (routerId) => http.get(`/admin/router/detail?routerId=${routerId}`) + +// 新建或编辑阶段任务 +export const ProjectEditTask = (obj) => http.post('/admin/project/editTask',obj) +// 新建或编辑关卡任务 +export const RouterEditTask = (obj) => http.post('/admin/router/editTask',obj) +// 删除关卡任务 +export const RouterDeleteTask = (obj) => http.post('/admin/router/deleteTask',obj); +// 删除项目任务 +export const ProjectDeleteTask = (obj) => http.delete('/admin/project/deleteTask',obj); \ No newline at end of file diff --git a/src/api/indexTaskadd.js b/src/api/indexTaskadd.js index 07b87987..dd8001d2 100644 --- a/src/api/indexTaskadd.js +++ b/src/api/indexTaskadd.js @@ -1,13 +1,14 @@ import http from "./config"; - //获取任务列表 -export const getTask = (obj) => - http.get( - "/admin/project/detail", - { params: obj }, - { - headers: { - token: "123", - }, - } - ); +export const getTask = (obj) => http.get('/admin/project/detail', { params: obj }, { + headers: { + 'token': '123' + } +}) + +//项目里的新建或编辑阶段任务 +export const addTask = (obj) => http.post('/admin/project/editTask', obj) + + +//项目里的删除任务 +export const deleteTask = (obj) => http.delete('/admin/project/deleteTask', { params: obj }) diff --git a/src/api/indexVote.js b/src/api/indexVote.js index e69de29b..fd1a7437 100644 --- a/src/api/indexVote.js +++ b/src/api/indexVote.js @@ -0,0 +1,81 @@ +import http from "./config"; +import qs from 'qs'; + + +/** + * 接口传参数方式(get) + * axios.get('/user', { + * params: { + * id: 12345, + * name: user + * } + * }).then(res => console.log(res)) + * + * 接口传参三种方式(post/put/patch) + * + * 1.'Content-Type'= 'multipart/form-data',传参格式为 formData。 + * (全局请求头:'Content-Type'= 'application/x-www-form-urlencoded') + * (request的Header:'Content-Type'= 'multipart/form-data') + * var formData=new FormData(); + * formData.append('user',123456);formData.append('pass',12345678); + * axios.post("/notice",formData).then() + * + * 2.'Content-Type'= 'application/x-www-form-urlencoded',传参格式为 query 形式,使用$qs.stringify。 + * (全局请求头:'Content-Type'= 'application/x-www-form-urlencoded') + * (request的Header:'Content-Type'= 'application/x-www-form-urlencoded') + * let data = {"code":"1234","name":"yyyy"}; + * axios.post(`${this.$url}/test/testRequest`,qs.stringify({data})).then() + * + * 3.'Content-Type'= 'application/json,传参格式为 raw (JSON格式)。 + * (全局请求头:'Content-Type'= 'application/x-www-form-urlencoded') + * (request的Header:'Content-Type'= 'application/json;charset=UTF-8') + * let data = {"code":"1234","name":"yyyy"} + * axios.post(`${this.$url}/test/testRequest`,data).then() + * + */ +// , { +// header: { +// 'token': '123', +// } +// } + +// 接口-请求 + +//基础票数上传接口 +export const baseVoteupload = (obj) => http.post('/vote/baseVoteupload', obj) + +//创建题干信息接口 +export const createOptionMessage = (obj) => http.post('/vote/createOptionMessage', obj) + +//投票信息创建接口 +export const createVote = (obj) => http.post('/vote/createVote', obj) + +//删除投票信息 +export const deleteVoteMessage = (obj) => http.post('/vote/deleteVoteMessage', { params: obj }) + +//删除题干信息接口 +export const deleteVoteStem = (obj) => http.post('/vote/deleteVoteStem', { params: obj }) + +//删除题选项息接口 +export const deleteVoteStemOption = (obj) => http.post('/vote/deleteVoteStemOption', { params: obj }) + +//修改投票信息接口 +export const editVote = (obj) => http.post('/vote/editVote', obj) + +//根据题干ID获取题干信息 +export const queryStemByStemId = (obj) => http.post('/vote/queryStemByStemId', { params: obj }) + +//修改题干信息接口 +export const updateStemMessage = (obj) => http.post('/vote/updateStemMessage', obj); + +//上传组件 +export const fileUp = (obj) => http.post('/file/upload', obj, qs.stringify({ obj })); + + +// 测试方法 +// import * as api from '../../api/index' +// api.getLearnPath({}).then(res => { +// console.log(res) +// }).catch(err => { +// console.log(err) +// }) diff --git a/src/api/indexWork.js b/src/api/indexWork.js index 2bff6660..af189946 100644 --- a/src/api/indexWork.js +++ b/src/api/indexWork.js @@ -9,8 +9,11 @@ export const createWorkTask = (obj) => // 删除作业信息接口 export const deleteWorkTask = (obj) => http.post("/work/deleteWorkTask", obj); // 根据ID获取作业信息详情 -export const queryWorkDetailById = (obj) => - http.post("/work/queryWorkDetailById", obj); +export const queryWorkDetailById = (obj) => http.post('/work/queryWorkDetailById',obj,{ + headers: { + 'Content-Type': 'application/x-www-form-urlencoded;charset=UTF-8' + } +}); // 修改作业信息接口 export const updateWorkTaskUsing = (obj) => http.post("/work/updateWorkTask", obj); diff --git a/src/api/method.js b/src/api/method.js index ca7d2367..21d43e0c 100644 --- a/src/api/method.js +++ b/src/api/method.js @@ -1,3 +1,4 @@ + function formatNumber(n) { n = n.toString(); return n[1] ? n : "0" + n; @@ -161,8 +162,12 @@ function autoComma(number) { return 0; } } +const commonData={ + timeout:50 +} export { toDate, getWeek, autoComma, + commonData, } \ No newline at end of file diff --git a/src/api/storage.js b/src/api/storage.js new file mode 100644 index 00000000..b274231f --- /dev/null +++ b/src/api/storage.js @@ -0,0 +1,51 @@ +/** + * 封装操作localstorage本地存储的方法 + */ +export const storage = { + //存储 + set(key, value) { + localStorage.setItem(key, JSON.stringify(value)) + }, + //取出数据 + get(key) { + const value = localStorage.getItem(key) + if (value && value != "undefined" && value != "null") { + return JSON.parse(value) + } + }, + // 删除数据 + remove(key) { + localStorage.removeItem(key) + }, + // 获取所有数据 + getAllStorage() { + return JSON.parse(window.localStorage.getItem() || "{}") + }, + // 删除所有数据 + removeAllLocalStorage() { + window.localStorage.clear() + return { message: "ok" } + } +}; + +/** + * 封装操作sessionStorage本地存储的方法 + */ +export const sessionStorage = { + //存储 + set(key, value) { + window.sessionStorage.setItem(key, JSON.stringify(value)) + }, + //取出数据 + get(key) { + const value = window.sessionStorage.getItem(key) + if (value && value != "undefined" && value != "null") { + return JSON.parse(value) + } + return null + }, + // 删除数据 + remove(key) { + window.sessionStorage.removeItem(key) + } +} \ No newline at end of file diff --git a/src/assets/images/notSelect.png b/src/assets/images/notSelect.png new file mode 100644 index 00000000..33d633a6 Binary files /dev/null and b/src/assets/images/notSelect.png differ diff --git a/src/assets/images/select.png b/src/assets/images/select.png new file mode 100644 index 00000000..70d9089e Binary files /dev/null and b/src/assets/images/select.png differ diff --git a/src/assets/images/selectAll.png b/src/assets/images/selectAll.png new file mode 100644 index 00000000..d796f599 Binary files /dev/null and b/src/assets/images/selectAll.png differ diff --git a/src/assets/scss/common.scss b/src/assets/scss/common.scss index bbe805e6..09f462c8 100644 --- a/src/assets/scss/common.scss +++ b/src/assets/scss/common.scss @@ -345,14 +345,14 @@ textarea { .drawerMain { min-width: 700px; margin: 0px 32px 0px 32px; - overflow-x: scroll; + overflow-x: auto; display: flex; flex-direction: column; height: 100%; .contentMain { flex: 1; - overflow-y: scroll; + overflow-y: auto; } } @@ -376,7 +376,7 @@ textarea { .drawerMain { min-width: 700px; margin: 0px 32px 0px 32px; - overflow-x: scroll; + overflow-x: auto; display: flex; flex-direction: column; } @@ -392,7 +392,7 @@ textarea { .ant-modal { height: calc(100% - 200px); background-color: rgba(255, 255, 255, 1); - // overflow-y: scroll; + // overflow-y: auto; min-width: 900px; max-width: 1300px; padding: 0; @@ -428,7 +428,7 @@ textarea { .modalMain { height: 0px; flex: 1 1 auto; - overflow-y: scroll; + overflow-y: auto; margin-top: 7px; margin: 0px 52px; @@ -437,4 +437,18 @@ textarea { } } -//弹窗-------------------------------------------------------- \ No newline at end of file +//弹窗-------------------------------------------------------- + +//loading-------------------------------------------------------- +.aeLoading { + width: 100%; + height: 100%; +background: rgba(0, 0, 0, 0.2); +display: flex; +align-items: center; +justify-content: center; +position: absolute; +left: 0; +top:0, +} +//loading-------------------------------------------------------- \ No newline at end of file diff --git a/src/components/BreadCrumb.vue b/src/components/BreadCrumb.vue index 2e84c237..2abfc972 100644 --- a/src/components/BreadCrumb.vue +++ b/src/components/BreadCrumb.vue @@ -33,7 +33,10 @@ export default { // console.log("监听路由"); console.log("new:" + n + ",old:" + o); - if (n === "/learningpath" || n === "/LearningPath") { + if ( + n.indexOf("/learningpath") !== -1 || + n.indexOf("/LearningPath") !== -1 + ) { state.list = [ { name: "学习路径", @@ -42,25 +45,28 @@ export default { }, ]; } - if (n === "/leveladd" || n === "/LevelAdd") { + if (n.indexOf("/leveladd") !== -1 || n.indexOf("/LevelAdd") !== -1) { state.list = [ { name: "学习路径", href: "/learningpath", }, { - name: "关卡", + name: "管理", }, ]; } - if (n === "/leveladddetail" || n === "/LevelAddDetail") { + if ( + n.indexOf("/leveladddetail") !== -1 || + n.indexOf("/LevelAddDetail") !== -1 + ) { state.list = [ { name: "学习路径", href: "/learningpath", }, { - name: "关卡", + name: "管理", href: "/leveladd", }, { @@ -68,14 +74,17 @@ export default { }, ]; } - if (n === "/levelcheck" || n === "/LevelCheck") { + if ( + n.indexOf("/levelcheck") !== -1 || + n.indexOf("/LevelCheck") !== -1 + ) { state.list = [ { name: "学习路径", href: "/learningpath", }, { - name: "关卡", + name: "管理", href: "/leveladd", }, { @@ -83,7 +92,10 @@ export default { }, ]; } - if (n === "/projectmanage" || n === "/ProjectManage") { + if ( + n.indexOf("/projectmanage") !== -1 || + n.indexOf("/ProjectManage") !== -1 + ) { state.list = [ { name: "项目中心", @@ -96,7 +108,10 @@ export default { }, ]; } - if (n === "/projectadd" || n === "/ProjectAdd") { + if ( + n.indexOf("/projectadd") !== -1 || + n.indexOf("/ProjectAdd") !== -1 + ) { state.list = [ { name: "项目", @@ -107,7 +122,7 @@ export default { }, ]; } - if (n === "/taskpage" || n === "/TaskPage") { + if (n.indexOf("/taskpage") !== -1 || n.indexOf("/TaskPage") !== -1) { state.list = [ { name: "项目", @@ -118,7 +133,7 @@ export default { }, ]; } - if (n === "/taskadd" || n === "/TaskAdd") { + if (n.indexOf("/taskadd") !== -1 || n.indexOf("/TaskAdd") !== -1) { state.list = [ { name: "项目", @@ -135,7 +150,10 @@ export default { }, ]; } - if (n === "/templatelibrary" || n === "/TemplateLibrary") { + if ( + n.indexOf("/templatelibrary") !== -1 || + n.indexOf("/TemplateLibrary") !== -1 + ) { state.list = [ { name: "项目中心", @@ -145,7 +163,10 @@ export default { }, ]; } - if (n === "/libraryadd" || n === "/LibraryAdd") { + if ( + n.indexOf("/libraryadd") !== -1 || + n.indexOf("/LibraryAdd") !== -1 + ) { state.list = [ { name: "项目中心", @@ -159,7 +180,10 @@ export default { }, ]; } - if (n === "/coursemanage" || n === "/CourseManage") { + if ( + n.indexOf("/coursemanage") !== -1 || + n.indexOf("/CourseManage") !== -1 + ) { state.list = [ { name: "课程库", @@ -172,7 +196,10 @@ export default { }, ]; } - if (n === "/coursewaremanage" || n === "/CoursewareManage") { + if ( + n.indexOf("/coursewaremanage") !== -1 || + n.indexOf("/CoursewareManage") !== -1 + ) { state.list = [ { name: "课程库", @@ -182,7 +209,10 @@ export default { }, ]; } - if (n === "/researchmanage" || n === "/ResearchManage") { + if ( + n.indexOf("/researchmanage") !== -1 || + n.indexOf("/ResearchManage") !== -1 + ) { state.list = [ { name: "评估管理", @@ -191,7 +221,10 @@ export default { }, ]; } - if (n === "/managepage" || n === "/ManagePage") { + if ( + n.indexOf("/managepage") !== -1 || + n.indexOf("/ManagePage") !== -1 + ) { state.list = [ { name: "评估管理", @@ -204,7 +237,10 @@ export default { ]; } - if (n === "/researchadd" || n === "/ResearchAdd") { + if ( + n.indexOf("/researchadd") !== -1 || + n.indexOf("/ResearchAdd") !== -1 + ) { state.list = [ { name: "评估管理", @@ -217,14 +253,20 @@ export default { ]; } - if (n === "/certificatecenter" || n === "/CertificateCenter") { + if ( + n.indexOf("/certificatecenter") !== -1 || + n.indexOf("/CertificateCenter") !== -1 + ) { state.list = [ { name: "证书中心", }, ]; } - if (n === "/systemmanage" || n === "/SystemManage") { + if ( + n.indexOf("/systemmanage") !== -1 || + n.indexOf("/SystemManage") !== -1 + ) { state.list = [ { name: "系统管理", diff --git a/src/components/OpenPages.vue b/src/components/OpenPages.vue index 6b3f37dd..f8c24091 100644 --- a/src/components/OpenPages.vue +++ b/src/components/OpenPages.vue @@ -1,111 +1,122 @@ - diff --git a/src/components/drawers/ActiveAttendance.vue b/src/components/drawers/ActiveAttendance.vue index cf548d5e..51b8fb33 100644 --- a/src/components/drawers/ActiveAttendance.vue +++ b/src/components/drawers/ActiveAttendance.vue @@ -709,7 +709,7 @@ export default { .drawerMain { min-width: 600px; margin: 0px 32px 0px 32px; - // overflow-x: scroll; + // overflow-x: auto; display: flex; flex-direction: column; height: 100%; diff --git a/src/components/drawers/AddActive.vue b/src/components/drawers/AddActive.vue index 53a2f6fe..030878b3 100644 --- a/src/components/drawers/AddActive.vue +++ b/src/components/drawers/AddActive.vue @@ -9,7 +9,8 @@ >
-
添加活动
+
编辑活动
+
添加活动
+
+ +
活动时间:
@@ -218,6 +225,8 @@ - - \ No newline at end of file diff --git a/src/components/drawers/AddEval.vue b/src/components/drawers/AddEval.vue index 80639dde..2f3ea0c4 100644 --- a/src/components/drawers/AddEval.vue +++ b/src/components/drawers/AddEval.vue @@ -9,7 +9,8 @@ >
-
添加测评
+
编辑测评
+
添加测评
Upload
+ 图片格式为JPG/PNG 图片大小不可超过1MB
@@ -99,15 +103,20 @@
+ - - - \ No newline at end of file diff --git a/src/components/drawers/AddFaceteach.vue b/src/components/drawers/AddFaceteach.vue index 412dfb7a..cd42ca90 100644 --- a/src/components/drawers/AddFaceteach.vue +++ b/src/components/drawers/AddFaceteach.vue @@ -380,6 +380,7 @@ export default { display: flex; justify-content: space-between; align-items: center; + flex-shrink: 0; .headerTitle { font-size: 18px; font-weight: 600; diff --git a/src/components/drawers/AddGroup.vue b/src/components/drawers/AddGroup.vue index 9179fc1d..0606e0a7 100644 --- a/src/components/drawers/AddGroup.vue +++ b/src/components/drawers/AddGroup.vue @@ -104,7 +104,7 @@ export default { .drawerMain { min-width: 600px; margin: 0px 32px 0px 32px; - overflow-x: scroll; + overflow-x: auto; display: flex; flex-direction: column; .header { diff --git a/src/components/drawers/AddHomework.vue b/src/components/drawers/AddHomework.vue index f1fb1d21..a571428d 100644 --- a/src/components/drawers/AddHomework.vue +++ b/src/components/drawers/AddHomework.vue @@ -1,116 +1,78 @@ - \ No newline at end of file + diff --git a/src/components/drawers/AddLive.vue b/src/components/drawers/AddLive.vue index 65cdc135..d7e04481 100644 --- a/src/components/drawers/AddLive.vue +++ b/src/components/drawers/AddLive.vue @@ -127,9 +127,10 @@
Upload
+
支持图片格式为jpg/jpeg/png 图片最大为2MB
-
+
直播链接:
@@ -288,8 +289,10 @@ import { reactive, toRefs, ref } from "vue"; import { message } from "ant-design-vue"; import * as api from "../../api/indexLiveBroadcast"; +import * as apiTask from "../../api/indexTaskadd"; import { toDate } from "@/api/method"; - +import { RouterEditTask } from "@/api/indexTask"; +// import { useRouter } from "vue-router"; function getBase64(img, callback) { const reader = new FileReader(); reader.addEventListener("load", () => callback(reader.result)); @@ -301,50 +304,7 @@ const options1 = ref([ label: "请选择状态", }, ]); -// const columns1 = [ -// { -// title: "课程编号", -// width: "20%", -// dataIndex: "num", -// key: "num", -// align: "center", -// }, -// { -// title: "名称", -// width: "20%", -// dataIndex: "name", -// key: "name", -// align: "center", -// }, -// { -// title: "内容分类", -// width: "13%", -// dataIndex: "content", -// key: "content", -// align: "center", -// }, -// { -// title: "授课教师", -// width: "13%", -// dataIndex: "teacher", -// key: "teacher", -// align: "center", -// }, -// { -// title: "创建人", -// width: "13%", -// dataIndex: "creator", -// key: "creator", -// align: "center", -// }, -// { -// title: "完成时间", -// width: "20%", -// dataIndex: "time", -// key: "time", -// align: "center", -// }, -// ]; + const rowSelection = ref({ checkStrictly: false, onChange: (selectedRowKeys, selectedRows) => { @@ -370,8 +330,21 @@ export default { type: Boolean, default: false, }, + isStudy: { + type: Number, + default: null, + }, + projectId: { + type: Number, + default: null, + }, + chooseStageId: { + type: Number, + default: null, + }, }, setup(props, ctx) { + // const router = useRouter(); const state = reactive({ tableData1: [ { @@ -477,9 +450,11 @@ export default { checkedC1: "", checkedC2: true, playback: false, + obj: {}, //要传的obj数据 }); const closeDrawer = () => { ctx.emit("update:addliveVisible", false); + console.log(props, "props"); state.radioV1 = ""; state.playback = false; state.inputV6 = ""; @@ -528,7 +503,9 @@ export default { }; const beforeUpload = (file) => { const isJpgOrPng = - file.type === "image/jpeg" || file.type === "image/png"; + file.type === "image/jpeg" || + file.type === "image/png" || + file.type === "image/jpg"; if (!isJpgOrPng) { message.error("You can only upload JPG file!"); @@ -545,15 +522,25 @@ export default { //创建直播 const createLiveBroadcast = () => { - if (!state.inputV1) return message.warning("请输入直播名称"); - if (!state.time) return message.warning("请输入直播时间"); - if (!state.inputV2) return message.warning("请输入直播时长"); + if (!state.inputV1) { + message.destroy(); + return message.warning("请输入直播名称"); + } + if (!state.time) { + message.destroy(); + return message.warning("请输入直播时间"); + } + if (!state.inputV2) { + message.destroy(); + return message.warning("请输入直播时长"); + } const regular = /^[+]{0,1}(\d+)$/; if (!regular.test(state.inputV2)) { + message.destroy(); return message.warning("直播时长需大于0"); } - // if (!state.inputV3) return message.info("请输入授课老师"); + if (!state.inputV3) return message.warning("请输入授课老师"); let check = state.checkedC2 * 1; // let startTime = state.time[0].$d; // let endTime = state.time[1].$d; @@ -567,9 +554,11 @@ export default { new Date(state.time[1].$d).getTime() / 1000, "Y-M-D" ); - let obj = { + + state.obj = { afterSignIn: state.inputV6, beforeSignIn: state.inputV7, + assessmentId: 0, createTime: "", createUser: 0, // liveCover: state.fileList,//直播封面 @@ -591,15 +580,58 @@ export default { updateTime: "", updateUser: 0, }; + let name = state.inputV1; api - .createLiveBroadcast(obj) + .createLiveBroadcast(state.obj) .then((res) => { - console.log(res.data.data, 1111); - console.log(state, 2222); + console.log("调用添加直播接口后", res.data.data); + // console.log(state, 2222); message.success("提交成功"); closeDrawer(); - // state = {} + if (props.isStudy == 1) { + console.log("hhhhh", name); + let objj = { + chapterId: 36, + courseId: 0, + duration: state.obj.liveDuration, + flag: true, + name: name, + routerId: 92, + routerTaskId: 0, + type: 6, + }; + RouterEditTask(objj) + .then((res) => { + console.log(res, 11111); + }) + .catch((err) => { + console.log(err, 1111); + }); + } else { + apiTask + .addTask({ + courseId: 0, + duration: state.obj.liveDuration, + flag: true, + name: state.obj.liveName, + projectId: props.projectId, + projectTaskId: 0, + stageId: props.chooseStageId, + type: 6, + }) + .then((res) => { + console.log("调用项目添加接口后", res.data); + //自定义事件给父组件传值 + ctx.emit("changeData", false); + //重新获取任务列表 + // apiTask.getTask({ projectId: 28 }); + // router.push("/taskadd"); + }) + .catch((err) => { + console.log(err); + }); + } }) .catch((err) => { console.log(err, 2222); @@ -634,6 +666,7 @@ export default { display: flex; justify-content: space-between; align-items: center; + flex-shrink: 0; .headerTitle { font-size: 18px; font-weight: 600; diff --git a/src/components/drawers/AddOnline.vue b/src/components/drawers/AddOnline.vue index 746c63dc..a7b5e9bb 100644 --- a/src/components/drawers/AddOnline.vue +++ b/src/components/drawers/AddOnline.vue @@ -295,6 +295,7 @@ export default { display: flex; justify-content: space-between; align-items: center; + flex-shrink: 0; .headerTitle { font-size: 18px; font-weight: 600; diff --git a/src/components/drawers/AddRef.vue b/src/components/drawers/AddRef.vue index 8b782a28..28e78e79 100644 --- a/src/components/drawers/AddRef.vue +++ b/src/components/drawers/AddRef.vue @@ -3,19 +3,20 @@ :visible="addrefVisible" class="drawerStyle addrefDrawer" width="80%" - title="添加外链" placement="right" @after-visible-change="afterVisibleChange" >
-
添加外链
+
{{ title }}外链
+
@@ -69,6 +70,7 @@
+
@@ -76,10 +78,13 @@
- - - \ No newline at end of file + \ No newline at end of file diff --git a/src/components/drawers/AddTest.vue b/src/components/drawers/AddTest.vue index c65e9e46..a534386a 100644 --- a/src/components/drawers/AddTest.vue +++ b/src/components/drawers/AddTest.vue @@ -3,167 +3,150 @@ :visible="addtestVisible" class="drawerStyle addtestDrawer" width="80%" - title="添加作业" placement="right" @after-visible-change="afterVisibleChange" >
-
添加考试
+
{{EditTestId ? "编辑" : "添加" }}考试
+
-
-
- -
- 考试名称: -
+ + maxlength="20"/> +
-
- 考试说明: -
-
+ -
+
-
-
- -
- 选择考试: -
+ + +
-
-
- -
- 考试时间: -
+ + +
-
-
- -
- 考试时长: -
+ + - 分钟 + + + 分钟
-
-
- -
- 考试限制: -
- 允许重复考试 + 考试限制 + + -1表示无限制 + >-1表示无限制 + + +
-
- 显示答案: -
- + + + 允许查看 不允许查看 + +
-
- 显示解析: -
- + + + 允许查看 不允许查看 + +
-
- 评分模式: -
-
- + + + 最高一次 @@ -171,46 +154,54 @@ >最后一次 -
+
-
- 及格线: -
+ + + +
-
- 试题排列: -
- + + + 试题乱序 试题排序 全部乱序 + +
- - + 取消 + 确定
+
- - \ No newline at end of file diff --git a/src/components/drawers/ChangeGroup.vue b/src/components/drawers/ChangeGroup.vue index 52b2ce32..6447ff12 100644 --- a/src/components/drawers/ChangeGroup.vue +++ b/src/components/drawers/ChangeGroup.vue @@ -89,7 +89,7 @@ export default { .drawerMain { min-width: 600px; margin: 0px 32px 0px 32px; - overflow-x: scroll; + overflow-x: auto; display: flex; flex-direction: column; .header { diff --git a/src/components/drawers/CheckStu.vue b/src/components/drawers/CheckStu.vue index 1e35333f..0b32c086 100644 --- a/src/components/drawers/CheckStu.vue +++ b/src/components/drawers/CheckStu.vue @@ -223,7 +223,7 @@ export default { .drawerMain { min-width: 600px; margin: 0px 32px 0px 32px; - overflow-x: scroll; + overflow-x: auto; display: flex; flex-direction: column; .header { diff --git a/src/components/drawers/CheckStuMess.vue b/src/components/drawers/CheckStuMess.vue index 34b824f3..70966a0b 100644 --- a/src/components/drawers/CheckStuMess.vue +++ b/src/components/drawers/CheckStuMess.vue @@ -78,7 +78,7 @@ export default { .drawerMain { min-width: 600px; margin: 0px 32px 0px 32px; - overflow-x: scroll; + overflow-x: auto; display: flex; flex-direction: column; .header { diff --git a/src/components/drawers/CreVote.vue b/src/components/drawers/CreVote.vue index d3c43f77..f8f1cc35 100644 --- a/src/components/drawers/CreVote.vue +++ b/src/components/drawers/CreVote.vue @@ -17,87 +17,85 @@ />
-
- -
- 题干: + 投票名称
-
-
-
- +
+ +
+
+
+
+
+ +
+ 题干
- 选项1: -
-
- - + 上传图片 -
-
-
-
-
- +
+
- 选项2:
-
- - + 上传图片 - 删除 +
+
+
+
+ +
+ {{ o.title }} +
+
+ + + 上传图片 + 删除 +
+
-
-
-
-
-
添加选项
+
+
+
+
添加选项
+
- +
- \ No newline at end of file + diff --git a/src/components/drawers/FaceManage.vue b/src/components/drawers/FaceManage.vue index a615ab51..48960ef2 100644 --- a/src/components/drawers/FaceManage.vue +++ b/src/components/drawers/FaceManage.vue @@ -385,7 +385,7 @@ export default { }; - \ No newline at end of file + diff --git a/src/components/drawers/FaceStu.vue b/src/components/drawers/FaceStu.vue index a5da82ea..f7c39cbd 100644 --- a/src/components/drawers/FaceStu.vue +++ b/src/components/drawers/FaceStu.vue @@ -722,7 +722,7 @@ export default { .drawerMain { min-width: 600px; margin: 0px 32px 0px 32px; - overflow-x: scroll; + overflow-x: auto; display: flex; flex-direction: column; .header { diff --git a/src/components/drawers/ManageRight.vue b/src/components/drawers/ManageRight.vue index 3ff545b2..65bdbfc9 100644 --- a/src/components/drawers/ManageRight.vue +++ b/src/components/drawers/ManageRight.vue @@ -831,7 +831,7 @@ export default { .drawerMain { min-width: 550px; margin: 0px 32px 0px 32px; - // overflow-y: scroll; + // overflow-y: auto; display: flex; flex-direction: column; diff --git a/src/components/drawers/MemberList.vue b/src/components/drawers/MemberList.vue index cc142a0a..f10227a1 100644 --- a/src/components/drawers/MemberList.vue +++ b/src/components/drawers/MemberList.vue @@ -25,7 +25,7 @@ placeholder="请输入姓名" />
- +
@@ -67,18 +67,18 @@
+ >
- +
提示
@@ -123,7 +123,6 @@
- - \ No newline at end of file + diff --git a/src/components/drawers/OwnPower.vue b/src/components/drawers/OwnPower.vue index 4e765153..f2de47ca 100644 --- a/src/components/drawers/OwnPower.vue +++ b/src/components/drawers/OwnPower.vue @@ -78,17 +78,17 @@ }" />
-
- -
+
+ +
@@ -160,16 +160,16 @@ />
- -
+ +
@@ -243,16 +243,16 @@ />
- -
+ +
@@ -306,8 +306,8 @@
- - - - \ No newline at end of file + diff --git a/src/components/drawers/Ownership.vue b/src/components/drawers/Ownership.vue index f7cf2d5d..2f8c229e 100644 --- a/src/components/drawers/Ownership.vue +++ b/src/components/drawers/Ownership.vue @@ -786,7 +786,7 @@ export default { .drawerMain { min-width: 550px; margin: 0px 32px 0px 32px; - // overflow-y: scroll; + // overflow-y: auto; display: flex; flex-direction: column; diff --git a/src/components/drawers/PowerList.vue b/src/components/drawers/PowerList.vue index dc14bc8f..db21a8f0 100644 --- a/src/components/drawers/PowerList.vue +++ b/src/components/drawers/PowerList.vue @@ -329,7 +329,7 @@ export default { }; - \ No newline at end of file + diff --git a/src/components/drawers/ProMess.vue b/src/components/drawers/ProMess.vue index 5c365471..ddd8406c 100644 --- a/src/components/drawers/ProMess.vue +++ b/src/components/drawers/ProMess.vue @@ -3,7 +3,7 @@ :visible="Provisible" class="drawerStyle promess" placement="right" - width="50%" + width="70%" @after-visible-change="afterVisibleChange" >
@@ -17,12 +17,14 @@
- 班级名称: - 产品经理管理-腾飞班1 + 班级名称: + 产品经理管理-腾飞班1
- 说明: - 班级说明,此班级为产品经理班级,其他岗位不要进入请大家按照规定时间进行任务学习 + 说明: + 班级说明,此班级为产品经理班级,其他岗位不要进入请大家按照规定时间进行任务学习
@@ -30,7 +32,6 @@
- - \ No newline at end of file + diff --git a/src/components/drawers/ProjCheckPower.vue b/src/components/drawers/ProjCheckPower.vue index a802c8ff..78ac83f6 100644 --- a/src/components/drawers/ProjCheckPower.vue +++ b/src/components/drawers/ProjCheckPower.vue @@ -80,18 +80,17 @@ />
- + +
-
-
@@ -162,18 +161,17 @@ />
- + +
-
- @@ -246,18 +244,17 @@ />
- + +
- - @@ -789,7 +786,7 @@ export default { .drawerMain { min-width: 550px; margin: 0px 32px 0px 32px; - // overflow-y: scroll; + // overflow-y: auto; display: flex; flex-direction: column; diff --git a/src/components/drawers/ProjManagePower.vue b/src/components/drawers/ProjManagePower.vue index 35e1b42c..949ad4e5 100644 --- a/src/components/drawers/ProjManagePower.vue +++ b/src/components/drawers/ProjManagePower.vue @@ -80,18 +80,17 @@ />
- + +
- - @@ -162,18 +161,17 @@ />
- + +
- -
@@ -246,18 +244,17 @@ />
- + +
- - @@ -789,7 +786,7 @@ export default { .drawerMain { min-width: 550px; margin: 0px 32px 0px 32px; - // overflow-y: scroll; + // overflow-y: auto; display: flex; flex-direction: column; diff --git a/src/components/drawers/ProjPowerList.vue b/src/components/drawers/ProjPowerList.vue index 7ecd7d38..1bf31e58 100644 --- a/src/components/drawers/ProjPowerList.vue +++ b/src/components/drawers/ProjPowerList.vue @@ -59,16 +59,16 @@
- -
+ +
- - \ No newline at end of file + diff --git a/src/components/drawers/TestManage.vue b/src/components/drawers/TestManage.vue index d2dbd1d7..a71722cc 100644 --- a/src/components/drawers/TestManage.vue +++ b/src/components/drawers/TestManage.vue @@ -365,7 +365,7 @@ export default { .drawerMain { min-width: 520px; margin: 0px 32px 0px 32px; - // overflow-x: scroll; + // overflow-x: auto; display: flex; flex-direction: column; position: relative; diff --git a/src/components/drawers/TimeManage.vue b/src/components/drawers/TimeManage.vue index f71b9c75..e15764a2 100644 --- a/src/components/drawers/TimeManage.vue +++ b/src/components/drawers/TimeManage.vue @@ -318,11 +318,11 @@ export default { // } // } .TimeManage { - // overflow-x: scroll; + // overflow-x: auto; .drawerMain { min-width: 550px; margin: 0px 32px 0px 32px; - overflow-x: scroll; + overflow-x: auto; display: flex; flex-direction: column; .noticebox { diff --git a/src/components/drawers/ViewAssess.vue b/src/components/drawers/ViewAssess.vue index 3df8b914..f068b7fa 100644 --- a/src/components/drawers/ViewAssess.vue +++ b/src/components/drawers/ViewAssess.vue @@ -17,73 +17,86 @@
-
评估名称:
-
产品经理面授课评估
+
评估名称:
+
产品经理面授课评估
-
评估说明:
-
-
+
评估说明:
+
-
-
-
评估类型:
-
单选
+
+
评估类型:
+
单选
+
+
+
题干:
+
+ 这个课程你觉得对你有用吗?
-
-
题干:
-
这个课程你觉得对你有用吗?
+
+ +
+
选择1:
+ 有用
- -
-
选择1:
- 有用 -
-
-
选择2:
- 没用 -
-
- +
+
选择2:
+ 没用 +
+
-
-
评估类型:
-
问答题
+
+
评估类型:
+
问答题
+
+
+
标题:
+
+ 对这个课程有什么建议吗?
-
-
标题:
-
对这个课程有什么建议吗?
-
-
-
描述:
-
希望以后这样的课程能够躲开,让我们多多了解!
+
+
+
描述:
+
+ 希望以后这样的课程能够躲开,让我们多多了解!
+
-
-
评估类型:
-
评分题
+
+
评估类型:
+
评分题
+
+
+
标题:
+
+ 请给当前课程打分
-
-
标题:
-
请给当前课程打分
-
-
-
非常不满意
-
-
1
-
2
-
3
-
4
-
5
-
6
-
7
-
8
-
9
-
10
-
-
非常满意
+
+
+
非常不满意
+
+
1
+
2
+
3
+
4
+
5
+
6
+
7
+
8
+
9
+
10
+
非常满意
+
@@ -131,7 +144,7 @@ export default { .drawerMain { min-width: 600px; margin: 0px 32px 0px 32px; - overflow-x: scroll; + overflow-x: auto; display: flex; flex-direction: column; .header { @@ -160,13 +173,13 @@ export default { margin-top: 10px; margin-left: 10px; .assname { - font-size: 16px; - color: #333333; - font-weight: 500; + font-size: 16px; + color: #333333; + font-weight: 500; } .asscontent { - color: #999999; - font-size: 16px; + color: #999999; + font-size: 16px; } } .assessbox { @@ -175,66 +188,65 @@ export default { display: flex; flex-direction: column; .box1 { + display: flex; + margin-top: 20px; + margin-left: 36px; + align-items: center; + .asstype { + color: rgba(51, 51, 51, 1); + font-size: 14px; + font-weight: 500; + } + .typename { + width: 80px; + height: 32px; + //margin-left: 10px; + border-radius: 4px; + border: 1px solid rgba(64, 158, 255, 1); display: flex; - margin-top: 20px; - margin-left: 36px; + justify-content: center; align-items: center; - .asstype { - color: rgba(51, 51, 51, 1); - font-size: 14px; - font-weight: 500; - } - .typename { - width: 80px; - height: 32px; - //margin-left: 10px; - border-radius: 4px; - border: 1px solid rgba(64, 158, 255, 1); - display: flex; - justify-content: center; - align-items: center; - color: rgba(64, 158, 255, 1); - font-size: 14px; - background: rgba(64,158,255,0.1); - } + color: rgba(64, 158, 255, 1); + font-size: 14px; + background: rgba(64, 158, 255, 0.1); + } } .lastbox { + display: flex; + align-items: center; + margin-left: 30px; + .sorcetext { + color: rgba(153, 153, 153, 1); + font-size: 14px; + } + .sorcebox { display: flex; - align-items: center; - margin-left: 30px; - .sorcetext { - color: rgba(153, 153, 153, 1); - font-size: 14px; + .numbox { + width: 32px; + height: 32px; + display: flex; + justify-content: center; + align-items: center; + background: rgba(64, 158, 255, 1); + color: #ffffff; + font-size: 14px; + border-radius: 4px; + margin: 20px 5px; + cursor: pointer; } - .sorcebox { - display: flex; - .numbox { - width: 32px; - height: 32px; - display: flex; - justify-content: center; - align-items: center; - background: rgba(64, 158, 255, 1); - color: #FFFFFF; - font-size: 14px; - border-radius: 4px; - margin: 20px 5px; - cursor: pointer; - } - .numbox1 { - width: 32px; - height: 32px; - display: flex; - justify-content: center; - align-items: center; - border: 1px solid rgba(151, 151, 151, 0.29); - color: rgba(0, 0, 0, 0.6500); - margin: 20px 5px; - cursor: pointer; - border-radius: 4px; - } + .numbox1 { + width: 32px; + height: 32px; + display: flex; + justify-content: center; + align-items: center; + border: 1px solid rgba(151, 151, 151, 0.29); + color: rgba(0, 0, 0, 0.65); + margin: 20px 5px; + cursor: pointer; + border-radius: 4px; } - + } } } } diff --git a/src/components/drawers/WorkDetail.vue b/src/components/drawers/WorkDetail.vue index d5256d52..33228d92 100644 --- a/src/components/drawers/WorkDetail.vue +++ b/src/components/drawers/WorkDetail.vue @@ -89,7 +89,7 @@ export default { }; - \ No newline at end of file + diff --git a/src/components/drawers/WorkManage.vue b/src/components/drawers/WorkManage.vue index bd655f9b..9348356b 100644 --- a/src/components/drawers/WorkManage.vue +++ b/src/components/drawers/WorkManage.vue @@ -366,7 +366,7 @@ export default { }; - \ No newline at end of file + diff --git a/src/store/index.js b/src/store/index.js index 677c4a6e..e58b00ac 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -13,6 +13,7 @@ export default createStore({ ], assessmentName: "", + routerId: null, }, getters: {}, mutations: { @@ -20,6 +21,10 @@ export default createStore({ // console.log('list', list) state.openpages = list; }, + chengeRouterId(state, routerId) { + // console.log('list', list) + state.routerId = routerId; + }, SET_assessmentName(state, name) { state.assessmentName = name; diff --git a/src/views/TestPage.vue b/src/views/TestPage.vue index 7cdfd951..046eadf1 100644 --- a/src/views/TestPage.vue +++ b/src/views/TestPage.vue @@ -20,7 +20,6 @@ export default { name: "TestPage", setup() { const state = reactive({}); - return { ...toRefs(state), }; @@ -30,14 +29,10 @@ export default { $(document).ready(function () { var range = { x: 0, y: 0 }; //鼠标元素偏移量 var lastPos = { x: 0, y: 0, x1: 0, y1: 0 }; //拖拽对象的四个坐标 - var tarPos = { x: 0, y: 0, x1: 0, y1: 0 }; //目标元素对象的坐标初始化 - var theDiv = null, move = false; - var choose = false; //拖拽对象 拖拽状态 选中状态 - // var theDivId = 0; // var theDivHeight = 0; var theDivHalf = 0; @@ -101,7 +96,6 @@ $(document).ready(function () { if (!choose) { return false; } - if (!move) { //恢复对象的初始样式 diff --git a/src/views/learningpath/LearningPath.vue b/src/views/learningpath/LearningPath.vue index 1b1867e2..8b02c597 100644 --- a/src/views/learningpath/LearningPath.vue +++ b/src/views/learningpath/LearningPath.vue @@ -4,25 +4,21 @@
-
- + + />
@@ -35,19 +31,20 @@ style="width: 270px" /> -->
-
搜索
+
搜索
-
重置
+
重置
@@ -229,23 +226,13 @@
+
+ +
- @@ -401,21 +388,21 @@
产品经理上升路径
-
+
路径信息
-
当前路径共0个阶段,0个任务
+
当前路径共0个关卡,0个任务
学员信息
-
路径共0名学员
+
路径共{{ routeStudentsNum }}名学员
-
+
- 取消 - 发布 + 取消 + 发布
@@ -484,10 +471,10 @@
-
取消
+
取消
-
确定
+
确定
@@ -575,10 +562,10 @@
-
取消
+
取消
-
确定
+
确定
@@ -605,7 +592,8 @@ import QueryRight from "../../components/drawers/QueryRight"; import ManageRight from "../../components/drawers/ManageRight"; import * as api from "../../api/index1"; import { message } from "ant-design-vue"; -import { toDate } from "../../api/method"; +import { toDate, commonData } from "../../api/method"; +import { storage } from "../../api/storage"; export default { name: "learningPath", components: { OwnerShip, PowerList, QueryRight, ManageRight }, @@ -613,28 +601,6 @@ export default { setup() { const router = useRouter(); const state = reactive({ - projectNameList: [ - { - id: 1, - value: "项目一", - label: "项目一", - }, - { - id: 2, - value: "项目二", - label: "项目二", - }, - { - id: 3, - value: "项目三", - label: "项目三", - }, - { - id: 4, - value: "项目四", - label: "项目四", - }, - ], out: false, out1: false, number: null, @@ -692,6 +658,8 @@ export default { value1: "", value2: "", + // + //创建、编辑------------------------- pathName: "", //创建/编辑路径图名称 organizationList: [ { @@ -722,6 +690,40 @@ export default { createLoading: false, //创建路径loading deletePathId: null, //删除路径id editPathId: null, //修改路径id + //搜索------------------------------ + pathnameSearch: null, //搜索路径名称 + statusList: [ + { + id: 1, + value: "草稿", + label: "草稿", + classify: 0, + }, + { + id: 2, + value: "已发布", + label: "已发布", + classify: 1, + }, + { + id: 3, + value: "已停用", + label: "已停用", + classify: -1, + }, + ], + statusValue: null, //状态 + statusClassify: null, //选择状态类型 + searchdate: null, //选择时间 + startTime: null, //开始时间 + endTime: null, //结束时间 + //发布--------------- + releasePathId: null, //发布路径id + routeStudentsNum: 0, + recallPathId: null, //撤回路径id + stopPathId: null, //停用路径id + + lpLoading: false, }); const selectProjectName = (value, index) => { @@ -757,9 +759,58 @@ export default { console.log(id); state.learnPathBg2 = id; }; - const showPub = () => { + //发布弹窗 + const showPub = (routerId) => { state.pub = true; + state.releasePathId = routerId; + //获取学员总数 + let obj = { + pageNo: 0, + pageSize: 0, + routerId: routerId, + }; + api + .getStudent(obj) + .then((res) => { + if (res.status === 200) { + // console.log("res", res.data.data); + state.routeStudentsNum = res.data.data.total; + } + }) + .catch((err) => { + console.log("err", err); + }); + //获取学习路径详细信息 + api + .getRouterDetail(routerId) + .then((res) => { + console.log("学习路径详情", res); + }) + .catch((err) => { + console.log("学习路径详情获取错误", err); + }); }; + //确定发布 + const releaseLearnPath = () => { + // console.log("state.releasePathId", state.releasePathId); + let obj = { + routerId: state.releasePathId, + type: 1, + }; + api + .handleLearnPath(obj) + .then((res) => { + console.log("发布成功", res); + message.destroy(); + message.success("发布成功"); + state.pub = false; + getLearnPath(); + }) + .catch((err) => { + console.log("发布失败", err); + }); + }; + const closePub = () => { state.pub = false; }; @@ -769,12 +820,34 @@ export default { const closeCopyModal = () => { state.copyModal = false; }; + //显示停用窗口 const showStopModal = () => { state.stopModal = true; }; + //关闭停用窗口 const closeStopModal = () => { state.stopModal = false; }; + //确认停用 + const stopLearnPath = () => { + let obj = { + routerId: state.stopPathId, + type: -1, + }; + api + .handleLearnPath(obj) + .then((res) => { + console.log("停用成功", res); + message.destroy(); + message.success("停用成功"); + state.stopModal = false; + getLearnPath(); + }) + .catch((err) => { + console.log("停用失败", err); + }); + }; + const showDeleteModal = () => { state.deleteModal = true; }; @@ -788,12 +861,35 @@ export default { const closeStartModal = () => { state.startModal = false; }; - const showBackModal = () => { + //打开撤回弹窗 + const showBackModal = (routerId) => { state.backModal = true; + state.recallPathId = routerId; }; + //关闭撤回弹窗 const closeBackModal = () => { state.backModal = false; }; + //确定撤回 + const recallPath = () => { + let obj = { + routerId: state.recallPathId, + type: 0, + }; + api + .handleLearnPath(obj) + .then((res) => { + console.log("撤回成功", res); + message.destroy(); + message.success("撤回成功"); + state.backModal = false; + getLearnPath(); + }) + .catch((err) => { + console.log("撤回失败", err); + }); + }; + const showOwner = () => { state.Ownervisible = true; }; @@ -909,7 +1005,8 @@ export default { style="cursor:pointer" class="jc" onClick={() => { - showPub(); + // console.log("text.record.", text.record); + showPub(text.record.id); }} > 发布 @@ -938,45 +1035,52 @@ export default {
{ - 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; + // 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(); - }} - > - 复制 -
+ >
) : (
)} + { + // text.record.state === "未发布" ? ( + //
+ //
{ + // showCopyModal(); + // }} + // > + // 复制 + //
+ //
+ // ) : ( + //
+ // ) + }
- -
管理
-
+
{ + router.push({ + path: "/leveladd", + }); + storage.set("routerId", text.record.id); + }} + > + 管理 +
@@ -1022,7 +1126,6 @@ export default {
{ + state.stopPathId = text.record.id; showStopModal(); }} > @@ -1075,7 +1179,6 @@ export default {
{ - showBackModal(); + showBackModal(text.record.id); }} > 撤回 @@ -1110,14 +1213,26 @@ export default { ) : (
)} - {text.record.state === "未发布" ? ( + {text.record.state === "已停用" ? (
+ +
{ + showCopyModal(); + }} + > + 复制 +
+
{ - if (!state.pathName) return message.info("请输入路径图名称"); - // if (!state.organizationSelectName) return message.info("请选择归属组织"); - // state.createLoading = true; + if (!state.pathName) { + message.destroy(); + return message.warning("请输入路径图名称"); + } + + // if (!state.organizationSelectName){ + // message.destroy(); + // return message.warning("请选择归属组织"); + // } + state.lpLoading = true; let obj = { name: state.pathName, picUrl: "", @@ -1178,14 +1300,30 @@ export default { api .createLearnPath(obj) .then((res) => { - setTimeout(() => { - console.log("创建成功", res); - message.success("创建成功"); - // state.createLoading = false; - state.currentPage = 1; - router.push("/leveladd"); - // getLearnPath(); - }, 1000); + 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); + }); }) .catch((err) => { console.log("创建失败", err); @@ -1197,12 +1335,16 @@ export default { let obj = { pageNo: state.currentPage, pageSize: state.pageSize, + name: state.pathnameSearch, + status: state.statusClassify, + beginTime: state.startTime, + endTime: state.endTime, }; api .getLearnPath(obj) .then((res) => { if (res.status === 200) { - console.log("获取路径列表数据", res.data.data); + // console.log("获取路径列表数据", res.data.data); let arr = res.data.data.rows; if ( arr.length === 0 && @@ -1219,31 +1361,6 @@ export default { .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); - // }); }; //翻页 const changePagination = (page) => { @@ -1258,9 +1375,10 @@ export default { type: -2, }; api - .deleteLearnPath(obj) + .handleLearnPath(obj) .then((res) => { console.log("删除成功", res); + message.destroy(); message.success("删除成功"); state.deleteModal = false; getLearnPath(); @@ -1271,8 +1389,15 @@ export default { }; //编辑学习路径图 const editLearnPath = () => { - if (!state.pathName) return message.info("请输入路径图名称"); - // if (!state.organizationSelectName) return message.info("请选择归属组织"); + if (!state.pathName) { + message.destroy(); + return message.warning("请输入路径图名称"); + } + + // if (!state.organizationSelectName){ + // message.destroy(); + // return message.warning("请选择归属组织"); + // } // state.createLoading = true; let obj = { routerId: state.editPathId, @@ -1284,21 +1409,66 @@ export default { api .createLearnPath(obj) .then((res) => { - setTimeout(() => { - console.log("修改成功", res); - message.success("修改成功"); - // state.createLoading = false; - // state.currentPage = 1; - state.out1 = false; - // router.push("/leveladd"); - getLearnPath(); - }, 1000); + 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); }) .catch((err) => { console.log("修改失败", err); // state.createLoading = false; }); }; + //选择状态 + const selectStatusClassify = (e, v) => { + // console.log("eee", e, v); + state.statusValue = e; + state.statusClassify = v.classify; + }; + //修改时间 + const searchTimeChange = (e, date) => { + let startTime = date[0] + " 00:00:00"; + let endTime = date[1] + " 23:59:59"; + state.startTime = new Date(startTime).getTime() / 1000; + state.endTime = new Date(endTime).getTime() / 1000; + console.log("e", state.startTime, state.endTime); + }; + //搜索学习路径 + const searchLearnPath = () => { + state.currentPage = 1; + console.log( + "pathnameSearch", + state.pathnameSearch, + state.statusClassify, + state.startTime, + state.endTime + ); + getLearnPath(); + }; + //重置学习路径 + const resetLearnPath = () => { + state.currentPage = 1; + state.pathnameSearch = null; + state.statusValue = null; + state.statusClassify = null; + state.searchdate = null; + state.startTime = null; + state.endTime = null; + getLearnPath(); + }; onMounted(() => { // console.log("执行"); getLearnPath(); @@ -1310,17 +1480,20 @@ export default { handleOut, handleOut1, showPub, + releaseLearnPath, closePub, showCopyModal, closeCopyModal, showStopModal, closeStopModal, + stopLearnPath, showDeleteModal, closeDeleteModal, showStartModal, closeStartModal, showBackModal, closeBackModal, + recallPath, showOwner, showPower, tableDataFunc, @@ -1333,6 +1506,10 @@ export default { changePagination, deleteLearnPath, editLearnPath, + selectStatusClassify, + searchTimeChange, + searchLearnPath, + resetLearnPath, }; }, }; @@ -1837,6 +2014,10 @@ export default { .filterItems { display: flex; flex-wrap: wrap; + .pathnameInp { + margin-right: 20px; + margin-bottom: 20px; + } .select { margin-right: 20px; margin-bottom: 20px; @@ -2023,6 +2204,7 @@ export default { .g1 { color: #4ea6ff; font-size: 14px; + cursor: pointer; } } } diff --git a/src/views/learningpath/LevelAdd.vue b/src/views/learningpath/LevelAdd.vue index 0c0c09ba..f5708800 100644 --- a/src/views/learningpath/LevelAdd.vue +++ b/src/views/learningpath/LevelAdd.vue @@ -42,6 +42,7 @@ class="tab" v-model:activeKey="activeKey" size="large" + @change="changeTabs" :tabBarStyle="{ marginLeft: '10px' }" > @@ -257,7 +258,7 @@
- +
导入学员
@@ -898,6 +896,11 @@ import TimeManage from "../../components/drawers/TimeManage"; import TestManage from "../../components/drawers/TestManage"; import FaceManage from "../../components/drawers/FaceManage"; import WorkManage from "../../components/drawers/WorkManage"; +// import { useRoute } from "vue-router"; +// import { useStore } from "vuex"; +import * as api from "../../api/index1"; +import { storage } from "../../api/storage"; + export default { name: "LevelAdd", components: { @@ -913,7 +916,10 @@ export default { }, methods: {}, setup() { + // const routers = useRoute(); + // const store = useStore(); const state = reactive({ + routerId: storage.get("routerId") ?JSON.parse(storage.get("routerId")) : null, //学习路径页面传的学习路径id gatename: null, //关卡名称 gatenamee: null, //学员管理关卡名称 deleteAll: false, //批量删除学员弹窗 @@ -1115,7 +1121,7 @@ export default { pageSize: 10, visiblene: false, sh: false, - nodata: true, + nodata: false, closeDeleteAll: false, curLevel: "", taskSyllabusActive: 0, @@ -1232,6 +1238,7 @@ export default { }, ], }); + // console.log("store", state.routerId); const selectProjectName = (value, index) => { console.log("value", value, index); if (value === "批量删除") { @@ -1441,6 +1448,33 @@ export default { const closehuodModal = () => { state.huodModal = false; }; + + const changeTabs = (e) => { + console.log("切换tabs", e, state.routerId); + //学员管理 + if (e == 3) { + getStudent(); + } + }; + //学员管理------------------------------------------------ + //获取学员列表 + const getStudent = () => { + let obj = { + routerId: state.routerId, + pageNo: 1, + pageSize: 10, + }; + api + .getStudent(obj) + .then((res) => { + console.log("获取学员列表", res); + }) + .catch((err) => { + console.log("获取学员列表失败", err); + }); + }; + + //学员管理------------------------------------------------ return { ...toRefs(state), selectProjectName, @@ -1470,6 +1504,7 @@ export default { showhuodModal, closehuodModal, closezhibModal, + changeTabs, }; }, }; @@ -2807,6 +2842,10 @@ export default { } } } + .ant-select-selection-item { + padding-left: 15px; + color: #4ea6ff; + } } } .talk { diff --git a/src/views/learningpath/LevelAddDetail.vue b/src/views/learningpath/LevelAddDetail.vue index bee8fb92..e491e9d3 100644 --- a/src/views/learningpath/LevelAddDetail.vue +++ b/src/views/learningpath/LevelAddDetail.vue @@ -15,12 +15,49 @@ v-for="item in level" :key="item.id" > --> -
+ + + + -
+ +
-->
@@ -60,6 +94,12 @@
+
+ +
关卡名称:
{{ value1.length }}/20
+
关卡说明:
-
+
作业
-
-
-
-
-
- -
-
考试
+ +
+
+
+ +
+
考试
+
+ +
+ +
+
+
+
+
@@ -177,7 +242,7 @@
-
+
@@ -185,7 +250,7 @@
-
+
@@ -194,7 +259,7 @@
-
+
@@ -203,34 +268,63 @@
-
+
测评
+ +
+ +
+
-
+
评估
+ +
+ +
+
-
+
投票
+ +
+ +
+
-
+
任务列表
-
+
移动到任务阶段
@@ -259,20 +353,170 @@
- +
+
+ + +
类型
+
+
任务名称
+
必修/选修
+
时长
+
+ 操作 +
+
+ + +
@@ -467,6 +711,26 @@ + +
+ +
+ + +
+ +
+
+ + + + + + + +
+
+
+
+
+ 提示 +
+
+
+ 您确定要删除此任务吗 +
+
+
+
取消
+
+
+
确定
+
+
+
+
+
@@ -504,72 +813,58 @@ import { reactive, toRefs, onMounted, onUnmounted } from "vue"; import AddStu from "../../components/drawers/AddLevelAddStu"; import ImpStu from "../../components/drawers/AddLevelImportStu"; +import AddHomework from "../../components/drawers/AddHomework.vue"; +import AddTest from "../../components/drawers/AddTest.vue"; +import AddDiscuss from "../../components/drawers/AddDiscuss.vue"; +import AddActive from "../../components/drawers/AddActive.vue"; +import AddEval from "../../components/drawers/AddEval.vue"; +import AddInvist from "../../components/drawers/AddInvist.vue"; +import AddVote from "../../components/drawers/AddVote.vue"; +import AddLive from "../../components/drawers/AddLive.vue"; +import AddRef from "../../components/drawers/AddRef.vue"; import * as api from "../../api/indexLevel"; +import { GetRouterDetail } from "../../api/indexTask"; import { message } from "ant-design-vue"; +import { storage } from "../../api/storage"; +import { deleteStudyTask } from "../../api/indexStudy"; +import draggable from "vuedraggable"; export default { name: "LevelAddDetail", components: { AddStu, ImpStu, + AddHomework, + AddDiscuss, + AddActive, + AddTest, + AddEval, + AddInvist, + AddVote, + AddLive, + AddRef, + draggable, }, setup() { const state = reactive({ + routerId: storage.get("routerId") + ? JSON.parse(storage.get("routerId")) + : null, level: [ { - id: "1", - tit: "关卡1关卡1关卡1关卡1关卡1关卡1", - name: "初级产品经理fewfewfwefwefe", - }, - { - id: "2", - tit: "关卡2", - name: "中级产品经理", - }, - { - id: "2", - tit: "关卡2", - name: "中级产品经理", - }, - { - id: "2", - tit: "关卡2", - name: "中级产品经理", - }, - { - id: "2", - tit: "关卡2", - name: "中级产品经理", - }, - { - id: "2", - tit: "关卡2", - name: "中级产品经理", - }, - { - id: "2", - tit: "关卡2", - name: "中级产品经理", - }, - { - id: "2", - tit: "关卡2", - name: "中级产品经理", - }, - { - id: "2", - tit: "关卡2", - name: "中级产品经理", - }, - { - id: "2", - tit: "关卡2", - name: "中级产品经理", + chapterId: "1", + remark: "关卡说明", + name: "默认关卡", }, ], + isRefEdit: 1, //外链编辑 + isLiveEdit: 1, //直播编辑 + EditRefId: null, //要编辑的外链的id + EditLiveId: null, //要编辑的直播的id tableData: [ { key: 1, lei: "在线", + routerTaskId: 0, // state: "已发布", creater: "管理者课程", // pubtime: "2022-07-20 14:00:03", @@ -578,50 +873,6 @@ export default { checked1: false, checkedd: false, }, - { - key: 2, - lei: "面授", - // state: "草稿", - creater: "管理者面授", - // pubtime: "2022-07-20 14:00:03", - cretime: "20分钟", - haspub: true, - checked1: false, - checkedd: false, - }, - { - key: 3, - lei: "作业", - // state: "已停用", - creater: "管理者作业", - // pubtime: "2022-07-20 14:00:03", - cretime: "60分钟", - haspub: false, - checked1: false, - checkedd: false, - }, - { - key: 4, - lei: "考试", - // state: "草稿", - creater: "管理者考试", - // pubtime: "2022-07-20 14:00:03", - cretime: "20分钟", - haspub: true, - checked1: false, - checkedd: false, - }, - { - key: 5, - lei: "案例", - // state: "草稿", - creater: "腾飞班1案例", - // pubtime: "2022-07-20 14:00:03", - cretime: "-", - haspub: true, - checked1: true, - checkedd: false, - }, ], tableData2: [ { @@ -797,27 +1048,54 @@ export default { visible: false, AddSvisible: false, //添加学员抽屉 AddImpStuvisible: false, //导入学员抽屉 + addlivevisible: false, //添加直播抽屉 + addrefvisible: false, //添加外链抽屉 modal: false, clos: false, stm_hs: false, deleteAll: false, closeDeleteAll: false, + deleteModal: false, // 删除弹窗 + deleteID: "", // 要删除的任务的id + editID: "", // 要编辑的任务id + isStudy: 1, + cC: false, value1: "", value2: "", selectedRowKeys: [], + edit: false, //是否点击编辑 + learn: 0, gqxy_hs: true, - isactive: -1, - isActive: false, + isactive: 0, projectChecked: null, //项目单选框 + adddiscussvisible: false, //讨论抽屉 + isStudiscuss: false, + addactivevisible: false, //活动抽屉 + addhomeworkvisible: false, + addtestvisible: false, + addevalvisible: false, + addinvistvisible: false, + addvotevisible: false, + // 表示当前触发列表的id,用来发送编辑和删除 + ListChoosedId: 0, + selectRow: [], //选择行 + selectAll: 0, //0:未选择,1:全选,2:部分选择 }); - - //新建或编辑关卡 + const showDrawerAddDiscuss = () => { + state.adddiscussvisible = true; + state.isStudiscuss = true; + }; + const showDrawerAddActive = () => { + state.addactivevisible = true; + state.isStudiscuss = true; + }; + //新建关卡 const editChapter = () => { - if(!state.value1) return message.warning("请输入关卡名称"); + if (!state.value1) return message.warning("请输入关卡名称"); let obj = { name: state.value1, remark: state.value2, - routerId: 0, + routerId: state.routerId, }; api .editChapter(obj) @@ -836,10 +1114,90 @@ export default { .catch((err) => { console.log("创建失败", err); }); - } + }; + + //编辑关卡 + // const updateChapter = () => { + // let obj = { + // chapterId: state.updateChapterID, + // name: "", + // remark:"", + // routerId: 0, + // }; + // api + // .updateChapter(obj) + // .then((res) => { + // console.log("修改成功",res); + // message.success("修改成功"); + // }) + // .catch((err) => { + // console.log("修改失败",err); + // }) + // }; const showDrawer = () => { state.visible = true; }; + // 作业和考试的抽屉 + const showDrawerAddHomework = () => { + state.addhomeworkvisible = true; + state.ListChoosedId = 0; + }; + const showDrawerAddTest = () => { + state.addtestvisible = true; + state.ListChoosedId = 0; + }; + //测试评估投票抽屉 + const showDrawerAddEval = () => { + state.addevalvisible = true; + state.learn = 1; + }; + const showDrawerAddInvist = () => { + state.addinvistvisible = true; + state.learn = 1; + }; + const showDrawerAddVote = () => { + state.addvotevisible = true; + state.learn = 1; + }; + + // tableData数据赋值方法 + const dataAssignment = (id) => { + console.log(state.level); + for (let i = 0; i < state.level.length; i++) { + if (state.level[i].chapterId === id) { + let array = []; + state.level[i].taskList.forEach((element) => { + let obj = { + id: element.routerTaskId, + key: element.routerTaskId, + lei: checkType(element.type), + creater: element.name, + cretime: element.duration, + checked1: element.flag, + routerTaskId: element.routerTaskId, + courseId: element.courseId, + }; + array.push(obj); + }); + state.tableData = array; + } + } + }; + const getDetail = (index) => { + GetRouterDetail(state.routerId) + .then((res) => { + state.level = res.data.data.chapterList; + console.log(state.level); + if (index == 0 && state.level.length > 0) { + dataAssignment(state.level[0].chapterId); + state.isactive = state.level[0].chapterId; + } + state.deleteModal = false; + }) + .catch((err) => { + message.error(err); + }); + }; const closeDrawer = () => { state.visible = false; }; @@ -860,119 +1218,145 @@ export default { const showImpStu = () => { state.AddImpStuvisible = true; }; - const tableDataFunc = () => { - const columns = [ - { - title: "类型", - dataIndex: "state", - // width: "30%", - key: "state", - width: 60, - align: "left", - className: "classify", - scopedSlots: { customRender: "action" }, //引入的插槽 - customRender: (text) => { - // console.log(text.record.checked1); - return ( -
-
{ - console.log("点击了"); - }} - >
- {text.record.lei} - - {/** -
- - {text.record.lei} - -*/} -
- ); - }, - }, - { - title: "任务名称", - dataIndex: "creater", - // width: "30%", - key: "creater", - width: 200, - align: "center", - className: "h", - }, - { - title: "必修/选修", - dataIndex: "pubtime", - key: "pubtime", - // width: 100, - align: "center", - className: "h", - scopedSlots: { customRender: "action" }, //引入的插槽 - customRender: (text) => { - // console.log(text.record.checked1); - return ( -
-
- { - console.log("点击了"); - text.record.checked1 = !text.record.checked1; - }} - /> -
-
- 必修 -
-
选修
-
-
-
- ); - }, - }, - { - title: "时长", - dataIndex: "cretime", - key: "cretime", - // width: 100, - align: "center", - className: "h", - }, - { - title: "操作", - className: "h", - dataIndex: "opacation", - key: "opacation", - // width: 100, - align: "center", - scopedSlots: { customRender: "action" }, //引入的插槽 - customRender: () => { - return ( -
-
- - 编辑 - - 删除 -
-
- ); - }, - }, + // const tableDataFunc = () => { + // const columns = [ + // { + // title: "类型", + // dataIndex: "state", + // // width: "30%", + // key: "state", + // width: 60, + // align: "left", + // className: "classify", + // scopedSlots: { customRender: "action" }, //引入的插槽 + // customRender: (text) => { + // // console.log(text.record.checked1); + // return ( + //
+ //
{ + // console.log("点击了"); + // }} + // >
+ // {text.record.lei} + //
+ // ); + // }, + // }, + // { + // title: "任务名称", + // dataIndex: "creater", + // // width: "30%", + // key: "creater", + // width: 200, + // align: "center", + // className: "h", + // }, + // { + // title: "必修/选修", + // dataIndex: "pubtime", + // key: "pubtime", + // // width: 100, + // align: "center", + // className: "h", + // scopedSlots: { customRender: "action" }, //引入的插槽 + // customRender: (text) => { + // // console.log(text.record.checked1); + // return ( + //
+ //
+ // { + // console.log("点击了"); + // text.record.checked1 = !text.record.checked1; + // }} + // /> + //
+ //
+ // 必修 + //
+ //
选修
+ //
+ //
+ //
+ // ); + // }, + // }, + // { + // title: "时长", + // dataIndex: "cretime", + // key: "cretime", + // // width: 100, + // align: "center", + // className: "h", + // }, + // { + // title: "操作", + // className: "h", + // dataIndex: "opacation", + // key: "opacation", + // // width: 100, + // align: "center", + // scopedSlots: { customRender: "action" }, //引入的插槽 + // customRender: (e) => { + // return ( + //
+ //
+ // { + // console.log("编辑id", e.record.routerTaskId); + // console.log("编辑类型", e.record.lei); + // state.editID = e.record.routerTaskId; + // //state.addhomeworkvisible = true; + // }} + // > + // 编辑 + // + // { + // showDeleteModal(e.record.routerTaskId); + // }} + // > + // 删除 + // + //
+ //
+ // ); + // }, + // }, + // ]; + // return columns; + // }; + const checkType = (index) => { + let typeRules = [ + "", + "在线", + "面授", + "案例", + "作业", + "考试", + "直播", + "外链", + "讨论", + "活动", + "测评", + "评估", + "投票", ]; - return columns; + return typeRules[index]; }; const tableDataFunc2 = () => { const columns = [ @@ -990,13 +1374,6 @@ export default { return (
{text.record.name} - - {/** -
- - {text.record.lei} - -*/}
); }, @@ -1158,15 +1535,18 @@ export default { document.getElementsByTagName("main")[0].style.background = "rgb(245, 247, 250,1)"; document.getElementsByTagName("main")[0].style.boxShadow = "none"; + getDetail(0); }); onUnmounted(() => { document.getElementsByTagName("main")[0].style.background = "#ffffff"; document.getElementsByTagName("main")[0].style.boxShadow = "0px 1px 35px 0px rgba(118, 136, 166, 0.07)"; }); - const changebgc = (index) => { - state.isactive = index; - state.isActive = !state.isActive; + const changebgc = (chapterId) => { + state.isactive = chapterId; + state.selectRow = []; //选择行 + state.selectAll = 0; //0:未选择,1:全选,2:部分选择 + dataAssignment(chapterId); }; const gqxy_hShow = () => { state.gqxy_hs = !state.gqxy_hs; @@ -1176,10 +1556,162 @@ export default { }; const delete_exit = () => { state.deleteAll = false; + deletecTaskAll(); + }; + const showDeleteModal = (id) => { + state.deleteID = id; + console.log(id); + state.deleteModal = true; + }; + const closeConfirm = () => { + state.deleteModal = false; + state.deleteID = ""; + state.editID = ""; + }; + const deleteLevelTask = () => { + deleteStudyTask({ routerTaskIds: state.deleteID }).then((res) => + console.log("删除成功", res) + ); + // RouterDeleteTask(state.listChoosedId) + // .then((res) => { + // console.log(`删除成功${res}`); + // message.success("删除成功"); + // }) + // .catch((err) => { + // console.log(`删除失败${err}`); + // }); + }; + + const showDrawerAddLive = () => { + state.addlivevisible = true; + }; + const showDrawerAddRef = () => { + state.addrefvisible = true; + }; + + const closeDeleteModel = () => { + state.deleteModal = false; + state.deleteID = ""; + }; + // 子组件触发的清空 editid 事件 + const clearEditData = () => { + state.editID = ""; + getDetail(0); + }; + + //选择单个任务 + const changeRow = (e) => { + //selectRow:已经选择的任务的id数组 + let arr = state.selectRow; + if (e.target.checked) { + arr.push(e.target.id); + } else { + arr.map((value, index) => { + if (value == e.target.id) { + arr.splice(index, 1); + } + }); + } + state.selectRow = arr; + //判断是否是全部选择或者是全部未选择来修改selectAll框的样式 + if (arr.length !== 0) { + if (arr.length === state.tableData.length) { + state.selectAll = 1; + } else { + state.selectAll = 2; + } + } else { + state.selectAll = 0; + } + console.log("state.selectRow", state.selectRow, state.selectAll); + }; + //全选任务或全不选任务 + const selectRowAll = () => { + let arr = state.tableData; + let array = []; + if (state.selectAll === 0 || state.selectAll === 2) { + arr.map((value) => { + // console.log("value", value, index); + value.checked = true; + array.push(value.id); + // if (value == e.target.id) { + // arr.splice(index, 1); + // } + state.selectAll = 1; + }); + } else { + array = []; + arr.map((value) => { + // console.log("value", value, index); + value.checked = false; + state.selectAll = 0; + }); + } + state.tableData = arr; + state.selectRow = array; + }; + //批量删除任务 + const deletecTaskAll = () => { + let arr = state.selectRow; + console.log("选择的行信息", arr); + arr.map((value) => { + let obj = { + routerTaskIds: value, + }; + console.log("value", value); + api + .deleteTask(obj) + .then((res) => { + console.log(res); + message.destroy(); + message.success("批量删除成功"); + }) + .catch((err) => { + console.log(err); + }); + }); + }; + //移动任务到关卡 + const moveTask = () => { + let obj = { + chapterId: state.isactive, + routerTaskIdList: state.selectRow, + }; + api + .moveTask(obj) + .then((res) => { + console.log("移动成功", res); + message.destroy(); + message.success("移动成功"); + }) + .catch((err) => { + console.log("移动失败", err); + }); + }; + //打开编辑外链的弹窗 + const showEditRefDrawer = (id) => { + state.addrefvisible = true; + state.isRefEdit = 2; + state.EditRefId = id; + }; + //打开编辑直播的弹窗 + const showEditLiveDrawer = (id) => { + state.addlivevisible = true; + state.isLiveEdit = 2; + state.EditLiveId = id; + }; + //编辑的按钮 + const decideType = (type, id) => { + console.log(type, id); + if (type == "外链") { + showEditRefDrawer(id); + } else if (type == "直播") { + showEditLiveDrawer(id); + } }; return { ...toRefs(state), - tableDataFunc, + // tableDataFunc, tableDataFunc2, showDrawer, closeDrawer, @@ -1194,14 +1726,147 @@ export default { gqxy_hShow, showDeleteALLModal, delete_exit, + closeConfirm, drawertableColumns, editChapter, + // updateChapter, + showDrawerAddHomework, + showDrawerAddTest, + showDrawerAddEval, + showDrawerAddInvist, + showDrawerAddVote, + deleteLevelTask, + showDrawerAddLive, + showDrawerAddRef, + closeDeleteModel, + clearEditData, + showDrawerAddDiscuss, + showDrawerAddActive, + selectRowAll, + changeRow, + deletecTaskAll, + moveTask, + showDeleteModal, + showEditRefDrawer, + showEditLiveDrawer, + decideType, }; }, }; + + diff --git a/src/views/projectcenter/ProjectAdd.vue b/src/views/projectcenter/ProjectAdd.vue index 5fcfc04b..e21cafdd 100644 --- a/src/views/projectcenter/ProjectAdd.vue +++ b/src/views/projectcenter/ProjectAdd.vue @@ -1,68 +1,44 @@ diff --git a/src/views/projectcenter/ProjectManage.vue b/src/views/projectcenter/ProjectManage.vue index f33c592a..085f353d 100644 --- a/src/views/projectcenter/ProjectManage.vue +++ b/src/views/projectcenter/ProjectManage.vue @@ -1,60 +1,92 @@ - diff --git a/src/views/projectcenter/SonProject.vue b/src/views/projectcenter/SonProject.vue index 0f5291e3..571946c0 100644 --- a/src/views/projectcenter/SonProject.vue +++ b/src/views/projectcenter/SonProject.vue @@ -1,528 +1,1061 @@ + diff --git a/src/views/projectcenter/TaskAdd.vue b/src/views/projectcenter/TaskAdd.vue index 96753fa5..31969683 100644 --- a/src/views/projectcenter/TaskAdd.vue +++ b/src/views/projectcenter/TaskAdd.vue @@ -15,25 +15,36 @@
添加阶段
-
-
-
{{ item.tit }}
-
{{ item.name }}
-
-
- - -
-
+ +
@@ -128,7 +139,16 @@
- +
@@ -142,7 +162,16 @@
- +
@@ -154,11 +183,19 @@
直播
- +
- +
- +
@@ -170,7 +207,16 @@
- +
@@ -184,7 +230,14 @@
- +
@@ -198,7 +251,13 @@
- +
@@ -212,7 +271,14 @@
- +
@@ -226,7 +292,13 @@
- +
@@ -239,7 +311,13 @@
投票
- +
@@ -249,8 +327,8 @@
任务列表
- -
+ +
--> -
- +
+
+ + +
类型
+
+
任务名称
+
必修/选修
+
时长
+
+ 操作 +
+
+ + + + +