diff --git a/package-lock.json b/package-lock.json index 8edd4d84..60967631 100644 --- a/package-lock.json +++ b/package-lock.json @@ -14,8 +14,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": { @@ -9658,6 +9660,11 @@ "websocket-driver": "^0.7.4" } }, + "node_modules/sortablejs": { + "version": "1.15.0", + "resolved": "https://registry.npmmirror.com/sortablejs/-/sortablejs-1.15.0.tgz", + "integrity": "sha512-bv9qgVMjUMf89wAvM6AxVvS/4MX3sPeN0+agqShejLU5z5GX4C75ow1O2e5k4L6XItUyAK3gH6AxSbXrOM5e8w==" + }, "node_modules/source-map": { "version": "0.6.1", "resolved": "https://registry.npmmirror.com/source-map/-/source-map-0.6.1.tgz", @@ -10601,6 +10608,22 @@ "node": ">=0.10.0" } }, + "node_modules/vuedraggable": { + "version": "4.1.0", + "resolved": "https://registry.npmmirror.com/vuedraggable/-/vuedraggable-4.1.0.tgz", + "integrity": "sha512-FU5HCWBmsf20GpP3eudURW3WdWTKIbEIQxh9/8GE806hydR9qZqRRxRE3RjqX7PkuLuMQG/A7n3cfj9rCEchww==", + "dependencies": { + "sortablejs": "1.14.0" + }, + "peerDependencies": { + "vue": "^3.0.1" + } + }, + "node_modules/vuedraggable/node_modules/sortablejs": { + "version": "1.14.0", + "resolved": "https://registry.npmmirror.com/sortablejs/-/sortablejs-1.14.0.tgz", + "integrity": "sha512-pBXvQCs5/33fdN1/39pPL0NZF20LeRbLQ5jtnheIPN9JQAaufGjKdWduZn4U7wCtVuzKhmRkI0DFYHYRbB2H1w==" + }, "node_modules/vuex": { "version": "4.0.2", "resolved": "https://registry.npmmirror.com/vuex/-/vuex-4.0.2.tgz", @@ -18839,6 +18862,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", @@ -19589,6 +19617,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 41b11993..cb6ab7b1 100644 --- a/package.json +++ b/package.json @@ -14,8 +14,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/index1.js b/src/api/index1.js index 42b3b5bd..9ec700ca 100644 --- a/src/api/index1.js +++ b/src/api/index1.js @@ -59,7 +59,8 @@ export const getRouterDetail = (routerId) => http.get('/admin/router/detail', { routerId: routerId, } }); - +//添加学员 +export const addStudent = (obj) => http.post('/admin/router/addStudent', obj); diff --git a/src/api/indexEval.js b/src/api/indexEval.js index 9967452d..cdf01640 100644 --- a/src/api/indexEval.js +++ b/src/api/indexEval.js @@ -33,11 +33,7 @@ import qs from 'qs'; * axios.post(`${this.$url}/test/testRequest`,data).then() * */ -// , { -// header: { -// 'token': '123', -// } -// } + // 接口-请求 @@ -48,7 +44,11 @@ export const createEvaluation = (obj) => http.post('/evaluation/createEvaluation export const fileUp = (obj) => http.post('/file/upload', obj, qs.stringify({ obj })); //删除测评信息 -export const deleteEvaluationById = (obj) => http.post('/evaluation/deleteEvaluationById', { params: obj }) +export const deleteEvaluationById = (obj) => http.post('/evaluation/deleteEvaluationById', { params: obj }, { + header: { + 'token': '123', + } +}) //根据ID获取测评信息详情 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/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/scss/common.scss b/src/assets/scss/common.scss index bbe805e6..d5affa62 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; diff --git a/src/components/OpenPages.vue b/src/components/OpenPages.vue index 6b3f37dd..02374b62 100644 --- a/src/components/OpenPages.vue +++ b/src/components/OpenPages.vue @@ -1,37 +1,51 @@ - - \ No newline at end of file diff --git a/src/components/drawers/AddEval.vue b/src/components/drawers/AddEval.vue index 3aeb0981..d90680df 100644 --- a/src/components/drawers/AddEval.vue +++ b/src/components/drawers/AddEval.vue @@ -91,7 +91,7 @@ 图片格式为图片格式为JPG/PNG 图片大小不可超过1MB @@ -179,9 +179,9 @@ export default { const beforeUpload = (file) => { const isJpgOrPng = - file.type === "image/jpeg" || file.type === "image/png"; + file.type === "image/jpg" || file.type === "image/png"; if (!isJpgOrPng) { - message.error("You can only upload JPG file!"); + message.error("You can upload JPG/PNG file!"); } const isLt2M = file.size / 1024 / 1024 < 1; if (!isLt2M) { @@ -229,21 +229,21 @@ export default { api .createEvaluation(obj) .then((res) => { - setTimeout(() => { console.log("创建成功", res); message.success("创建成功"); - closeDrawer(); - apitaskadd.addTask({ + closeDrawer(); + apitaskadd + .addTask({ courseId: 0, duration: 0, flag: true, - name: "", + name: obj.evaluationName, projectId: 28, projectTaskId: 0, stageId: 3, type: 10, - }); - }, 1000); + }, + ); }) .catch((err) => { console.log("创建失败", err); 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 9247ee49..0b5acf55 100644 --- a/src/components/drawers/AddHomework.vue +++ b/src/components/drawers/AddHomework.vue @@ -106,6 +106,7 @@ import { reactive, ref } from "vue"; import {message} from"ant-design-vue"; import { createWorkTask, queryWorkDetailById, updateWorkTaskUsing} from "@/api/indexWork"; +import { ProjectEditTask,RouterEditTask } from "@/api/indexTask" import dayjs from 'dayjs'; const rowSelection = ref({ @@ -133,7 +134,15 @@ export default { type: Boolean, default: false, }, - workId: { + flag: { + type: Number, + default: 0, + }, + projectTaskId: { + type: Number, + default: 0, + }, + routerTaskId: { type: Number, default: 0, } @@ -261,19 +270,60 @@ export default { if(id) { updateWorkTaskUsing(obj).then((res) => { console.log(res); - message.success(`编辑成功`) - closeDrawer(); }).catch((err) => { message.error(`编辑失败${err}`) }) } else { createWorkTask(obj).then((res)=>{ - message.success(`添加成功${res}`) - closeDrawer(); + console.log(res); }).catch((err)=>{ message.error(`添加失败${err}`) }) } + if(props.flag == 1) { + let editObj = { + "courseId": 0, + "duration": 0, + "flag": true, + "name": formState.workName, + "projectId": 0, + "projectTaskId": props.workId || '', + "stageId": 0, + "type": 4 + } + // 新增编辑或新增项目任务 + ProjectEditTask(editObj).then(res => { + console.log(` 编辑项目成功的打印 ${res}`); + message.success(`${props.workId? '编辑' : '新增'}阶段任务成功`) + closeDrawer(); + }).catch(err => { + message.error(`${props.workId? '编辑' : '新增'}阶段任务失败`) + console.log(` 编辑项目失败的打印 ${err}`); + }) + } else { + let editObj1 = { + "chapterId":36, + "courseId": 0, + "duration": 0, + "flag": true, + "name": formState.workName, + "routerId": 92, + "routerTaskId": 0, + "type": 4 + } + // 新增编辑或新增关卡任务 + RouterEditTask(editObj1).then(res => { + console.log(` 编辑关卡成功的打印 ${res}`); + message.success(`${props.workId? '编辑' : '新增'}关卡任务成功`) + closeDrawer(); + }).catch(err => { + message.error(`${props.workId? '编辑' : '新增'}关卡任务失败`) + console.log(` 编辑关卡失败的打印 ${err}`); + }) + } + + + }; return { afterVisibleChange, diff --git a/src/components/drawers/AddInvist.vue b/src/components/drawers/AddInvist.vue index 9ce178db..e3ea4e2c 100644 --- a/src/components/drawers/AddInvist.vue +++ b/src/components/drawers/AddInvist.vue @@ -202,21 +202,20 @@ export default { api .createAppraiseMessage(obj) .then((res) => { - setTimeout(() => { console.log("创建成功", res); message.success("创建成功"); closeDrawer(); - apitaskadd.addTask({ + apitaskadd + .addTask({ courseId: 0, duration: 0, flag: true, - name: "", + name: obj.appraiseName, projectId: 28, projectTaskId: 0, stageId: 3, type: 11, }); - }, 1000); }) .catch((err) => { console.log("创建失败", err); diff --git a/src/components/drawers/AddLevelAddStu.vue b/src/components/drawers/AddLevelAddStu.vue index 4d29f924..87ef5560 100644 --- a/src/components/drawers/AddLevelAddStu.vue +++ b/src/components/drawers/AddLevelAddStu.vue @@ -1051,7 +1051,7 @@ export default { .drawerMain { min-width: 600px; margin: 0px 32px 0px 32px; - // overflow-y: scroll; + // overflow-y: auto; display: flex; flex-direction: column; diff --git a/src/components/drawers/AddLevelImportStu.vue b/src/components/drawers/AddLevelImportStu.vue index 3385642e..4d2c4872 100644 --- a/src/components/drawers/AddLevelImportStu.vue +++ b/src/components/drawers/AddLevelImportStu.vue @@ -139,7 +139,7 @@ export default { }; - \ No newline at end of file + diff --git a/src/components/drawers/AddLive.vue b/src/components/drawers/AddLive.vue index e23e19f6..aa28a530 100644 --- a/src/components/drawers/AddLive.vue +++ b/src/components/drawers/AddLive.vue @@ -280,7 +280,7 @@
- +
@@ -643,15 +643,6 @@ export default { }); }; - //添加任务到数据库 - const addTask = () => {}; - - const done = () => { - createLiveBroadcast(); - addTask(); - // api.getLiveBroadcastInfor({}); - }; - return { ...toRefs(state), afterVisibleChange, @@ -664,7 +655,6 @@ export default { createLiveBroadcast, handleChange, beforeUpload, - done, }; }, }; diff --git a/src/components/drawers/AddTest.vue b/src/components/drawers/AddTest.vue index 830c2a8f..ec7403a9 100644 --- a/src/components/drawers/AddTest.vue +++ b/src/components/drawers/AddTest.vue @@ -85,6 +85,7 @@ @@ -100,6 +101,7 @@ @@ -197,6 +200,8 @@ import { reactive, ref } from "vue"; import {message} from"ant-design-vue"; import {createExamination,queryExaminationDetailById,updateExamination} from "@/api/indexExam" +import { ProjectEditTask } from "@/api/indexTask" + import dayjs from 'dayjs'; const rowSelection = ref({ checkStrictly: false, @@ -225,7 +230,7 @@ export default { }, examinationId: { type: Number, - default: 0, + default: -1, } }, setup(props, ctx) { @@ -429,21 +434,38 @@ export default { if(id) { updateExamination(obj).then((res)=>{ console.log(res); - message.success(`编辑成功`) - closeDrawer(); }).catch(()=>{ message.error(`编辑失败`) }) } else { - createExamination(obj).then((res)=>{ - message.success(`添加成功${res}`) - closeDrawer(); + createExamination(obj).then(()=>{ }).catch((err)=>{ message.error(`添加失败${err}`) }) } + let editObj = { + "courseId": 0, + "duration": 0, + "flag": true, + "name": "", + "projectId": 0, + "projectTaskId": props.examinationId || '', + "stageId": 0, + "type": 5 + } + // 新增编辑或新增项目 + ProjectEditTask(editObj).then(res => { + console.log(` 编辑项目成功的打印 ${res}`); + message.success(`${props.examinationId? '编辑' : '新增'}阶段任务成功`) + closeDrawer(); + }).catch(err => { + message.error(`${props.examinationId? '编辑' : '新增'}阶段任务失败`) + console.log(` 编辑项目失败的打印 ${err}`); + }) + + } const afterVisibleChange = (bool) => { console.log("formState", bool); diff --git a/src/components/drawers/AddVote.vue b/src/components/drawers/AddVote.vue index ffa87e4f..005d9c05 100644 --- a/src/components/drawers/AddVote.vue +++ b/src/components/drawers/AddVote.vue @@ -203,21 +203,20 @@ export default { api .createVote(obj) .then((res) => { - setTimeout(() => { console.log("创建成功", res); message.success("创建成功"); closeDrawer(); - apitaskadd.addTask({ + apitaskadd + .addTask({ courseId: 0, duration: 0, flag: true, - name: "", + name: obj.voteName, projectId: 28, projectTaskId: 0, stageId: 3, type: 12, }); - }, 1000); }) .catch((err) => { console.log("创建失败", err); 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/EntryScores.vue b/src/components/drawers/EntryScores.vue index fef7f769..34cbbb56 100644 --- a/src/components/drawers/EntryScores.vue +++ b/src/components/drawers/EntryScores.vue @@ -82,7 +82,7 @@ export default { }; - \ 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 49e1cc79..ddd8406c 100644 --- a/src/components/drawers/ProMess.vue +++ b/src/components/drawers/ProMess.vue @@ -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 fd665d1d..4754115b 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -6,8 +6,9 @@ export default createStore({ pagename: "学习路径", href: "/learningpath", active: true, - },] + },], + routerId: null, }, getters: { @@ -16,7 +17,11 @@ export default createStore({ chengeOpenpages(state, list) { // console.log('list', list) state.openpages = list - } + }, + chengeRouterId(state, routerId) { + // console.log('list', list) + state.routerId = routerId + }, }, actions: { }, 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 51ea5961..cefe7a20 100644 --- a/src/views/learningpath/LearningPath.vue +++ b/src/views/learningpath/LearningPath.vue @@ -1042,36 +1042,36 @@ 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", - query: { routerId: text.record.id }, }); + localStorage.setItem("routerId", text.record.id); }} > 管理 @@ -1220,13 +1220,26 @@ export default { ) : (
)} - {text.record.state === "未发布" ? ( + {text.record.state === "已停用" ? (
+ +
{ + showCopyModal(); + }} + > + 复制 +
+
- +
导入学员
@@ -899,7 +898,8 @@ 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 { useRoute } from "vue-router"; +// import { useStore } from "vuex"; import * as api from "../../api/index1"; export default { name: "LevelAdd", @@ -916,9 +916,10 @@ export default { }, methods: {}, setup() { - const routers = useRoute(); + // const routers = useRoute(); + // const store = useStore(); const state = reactive({ - routerId: routers.query.routerId, //学习路径页面传的学习路径id + routerId: localStorage.getItem("routerId"), //学习路径页面传的学习路径id gatename: null, //关卡名称 gatenamee: null, //学员管理关卡名称 deleteAll: false, //批量删除学员弹窗 @@ -1237,6 +1238,7 @@ export default { }, ], }); + console.log("store", state.routerId); const selectProjectName = (value, index) => { console.log("value", value, index); if (value === "批量删除") { @@ -1472,6 +1474,7 @@ export default { }); }; + //学员管理------------------------------------------------ return { ...toRefs(state), selectProjectName, @@ -2839,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 7e2638a9..511a680d 100644 --- a/src/views/learningpath/LevelAddDetail.vue +++ b/src/views/learningpath/LevelAddDetail.vue @@ -17,10 +17,10 @@ > -->
@@ -37,7 +37,7 @@
{{ item.name }}
@@ -159,20 +159,30 @@
-
+
作业
+ +
+ +
-
+
考试
+ +
+ +
@@ -512,67 +522,27 @@ 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 * as api from "../../api/indexLevel"; +import { GetRouterDetail, RouterDeleteTask } from "../../api/indexTask"; import { message } from "ant-design-vue"; export default { name: "LevelAddDetail", components: { AddStu, ImpStu, + AddHomework, + AddTest }, setup() { const state = reactive({ 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: "默认关卡", + } ], tableData: [ { @@ -586,50 +556,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: [ { @@ -814,10 +740,13 @@ export default { value2: "", selectedRowKeys: [], gqxy_hs: true, - isactive: -1, - isActive: false, + isactive: 0, projectChecked: null, //项目单选框 + addhomeworkvisible: false, + addtestvisible:false, updateChapterID: null, //修改关卡id + // 表示当前触发列表的id,用来发送编辑和删除 + ListChoosedId:0 }); //新建关卡 @@ -848,26 +777,67 @@ export default { } //编辑关卡 - 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 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 + }; + + // tableData数据赋值方法 + const dataAssignment = () => { + console.log((state.level)); + state.level[0].taskList.forEach((element,index) => { + state.tableData[index] = { + key:element.routerTaskId, + lei:checkType(element.type), + creater:element.name, + cretime:element.duration, + checked1:element.flag + } + }); + } + const getDetail = (index) => { + GetRouterDetail(92).then((res) => { + state.level = res.data.data.chapterList + console.log(state.level); + if(index == 0) { + // state.tableData[1] = { + // key: 2, + // lei: "在线", + // creater: "管理者课程", + // cretime: "60", + // checked1: true, + // } + dataAssignment(0) + } + }).catch((err) => { + message.error(err) + }) + } const closeDrawer = () => { state.visible = false; }; @@ -994,7 +964,7 @@ export default { 编辑 { - updateChapter(); + deleteLevelTask() }}>删除
@@ -1004,6 +974,10 @@ export default { ]; return columns; }; + const checkType = (index) => { + let typeRules = ["","在线","面授","案例","作业","考试","直播","外链","讨论","测评","评估","投票"]; + return typeRules[index]; + } const tableDataFunc2 = () => { const columns = [ { @@ -1188,6 +1162,7 @@ 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"; @@ -1196,7 +1171,7 @@ export default { }); const changebgc = (index) => { state.isactive = index; - state.isActive = !state.isActive; + dataAssignment(index); }; const gqxy_hShow = () => { state.gqxy_hs = !state.gqxy_hs; @@ -1207,6 +1182,15 @@ export default { const delete_exit = () => { state.deleteAll = false; }; + const deleteLevelTask = () => { + RouterDeleteTask(state.listChoosedId).then((res) => { + console.log(`删除成功${res}`); + message.success('删除成功') + }).catch((err) => { + console.log(`删除失败${err}`); + }) + } + return { ...toRefs(state), tableDataFunc, @@ -1226,7 +1210,10 @@ export default { delete_exit, drawertableColumns, editChapter, - updateChapter, + // updateChapter, + showDrawerAddHomework, + showDrawerAddTest, + deleteLevelTask, }; }, }; diff --git a/src/views/projectcenter/ClassAdd.vue b/src/views/projectcenter/ClassAdd.vue index b836d6ea..e2605ff5 100644 --- a/src/views/projectcenter/ClassAdd.vue +++ b/src/views/projectcenter/ClassAdd.vue @@ -1,53 +1,82 @@ - diff --git a/src/views/projectcenter/ProjectAdd.vue b/src/views/projectcenter/ProjectAdd.vue index f8c46024..e6e459d8 100644 --- a/src/views/projectcenter/ProjectAdd.vue +++ b/src/views/projectcenter/ProjectAdd.vue @@ -1,44 +1,68 @@ diff --git a/src/views/projectcenter/ProjectManage.vue b/src/views/projectcenter/ProjectManage.vue index d827e774..0d7cf5e9 100644 --- a/src/views/projectcenter/ProjectManage.vue +++ b/src/views/projectcenter/ProjectManage.vue @@ -14,6 +14,11 @@ placeholder="请输入项目经理" @change="sProjectOrderChange" allowClear showSearch>
+
+ + +
@@ -276,6 +281,73 @@
+ +
+ +
+
+ 编辑多层项目 +
+
+ +
+
+
+
+
+ +
+
项目名称:
+
+ +
+
+
+
+ +
+
分类:
+
+ +
+
+
+
+ +
+
项目经理:
+
+ +
+
+
+
+ +
+
资源归属:
+
+ +
+
+
+ 取消 + 确定 +
+
+
+
+
+ +
+ +
+
+ 编辑多层子项目 +
+
+ +
+
+
+
+ 项目归属: + {{ currentEdProjectName }} +
+
+
+ +
+
子项目名称:
+
+ +
+
+
+
+ +
+
分类:
+
+ +
+
+
+
+ +
+
子项目经理:
+
+ +
+
+
+
+ +
+
资源归属:
+
+ +
+
+
+ 取消 + 确定 +
+
+
+
+
@@ -498,36 +641,13 @@ export default { components: { ProjOwnerShip, ProjPowerList, ProjCheckShip, ProjManageShip }, setup() { const state = reactive({ - value6: "", - value7: "", - value8: "", - projectNameList: [ - { - id: 1, - value: "项目一", - label: "项目一", - }, - { - id: 2, - value: "项目二", - label: "项目二", - }, - { - id: 3, - value: "项目三", - label: "项目三", - }, - { - id: 4, - value: "项目四", - label: "项目四", - }, - ], projectName: null, selectTime: null, sonproject: false, estabish: false, doublepro: false, + eddoublepro: false, + eddoublesonpro: false, doublesonpro: false, copyModal: false, //复制弹窗 closeCopy: false, //复制弹窗关闭图标 @@ -546,6 +666,9 @@ export default { currentProjectId: '', currentProjectName: '', + currentEdProjectName: '', + + currentEditChildrensProjectId: '', }); // 数据接入 - start - @@ -553,7 +676,8 @@ export default { // 搜索数据 const sProjectName = ref(''); const sProjectOrder = ref(''); - const sProjectState = ref(''); + const sProjectCreate = ref(''); + const sProjectState = ref([]); const sProjectTime = ref(''); const sProjectStateList = ref([ @@ -573,6 +697,13 @@ export default { console.log('项目经理', key.target.value) managerid = key.target.value; } + + let createpeople = ''; + const sProjectCreateChange = (key) => { + console.log('项目创建人', key.target.value) + createpeople = key.target.value; + } + let status = ''; const sProjectStateChange = (key) => { console.log('项目状态', key) @@ -592,8 +723,10 @@ export default { const searchReset = () => { sProjectName.value = ""; sProjectOrder.value = ""; + sProjectCreate.value = ""; sProjectState.value = null; sProjectTime.value = null; + createpeople = ""; name = ""; beginTime = ""; endTime = ""; @@ -610,7 +743,8 @@ export default { endTime: endTime, status: status, name: name, - manager: managerid + manager: managerid, + createName: createpeople } let searchList = []; for (let i in obj) { @@ -652,6 +786,39 @@ export default { const value4 = ref(""); const value5 = ref([]); + + const edvalue1 = ref(""); + const edvalue2 = ref([]); + const edvalue3 = ref([]); + const edvalue4 = ref(""); + const edvalue5 = ref([]); + + let edname = ''; + const edclassificationChangeName = (key) => { + console.log(key) + edname = key; + } + + let edcategory = ''; + const edclassificationChange = (key) => { + console.log(key) + edcategory = key; + } + + let edmanage = ''; + let edmanageid = ''; + const edclassificationChange1 = (key) => { + console.log(key) + edmanage = key; + edmanageid = key; + } + + let edsource = ''; + const edclassificationChange5 = (key) => { + console.log(key) + edsource = key; + } + const classifyList5 = ref([ { value: 1, label: '项目一' }, { value: 2, label: '项目二' }, @@ -703,13 +870,29 @@ export default { } let obj = { - name: value1.value, - type: 1, - category: type, - manager: manager, - managerId: managerId, - sourceBelongId: sourceBelongId, - }; + "attach": "", + "beginTime": 0, + "boeFlag": 0, + "category": type, + "courseSyncFlag": 0, + "endTime": 0, + "level": 0, + "manager": manager, + "managerId": managerId, + "name": value1.value, + "notice": "", + "noticeFlag": 0, + "parentId": 0, + "picUrl": "", + "projectId": 0, + "remark": "", + "sourceBelongId": sourceBelongId, + "status": 0, + "systemId": 0, + "templateId": 0, + "type": 1 + } + console.log('创建多层项目提交的数据格式', obj); for (let i in errorMsgs) { console.log(obj[i]) @@ -734,9 +917,14 @@ export default { value4.value = ""; value5.value = []; state.doublepro = false; + message.destroy(); + message.success("创建成功"); + getTableDate(); } }).catch(err => { console.log(err) + message.destroy(); + message.error("创建失败,请检查当前网络状态。"); }) }; // 取消按钮 清空输入的数据 @@ -753,6 +941,29 @@ export default { state.doublepro = false; }; + // 编辑多层项目 + const editStoreyProject = () => { + let obj = { + projectId: 1, + name: edname, + category: edcategory, + manager: edmanage, + managerId: edmanageid, + sourceBelongId: edsource + } + if (obj.name !== "" || obj.category !== "" || obj.manager !== "" || obj.sourceBelongId !== "") { + alert("我需要编辑") + console.log(obj) + state.eddoublepro = false; + } else { + state.eddoublepro = false; + } + } + + const closeeditModal2 = () => { + state.eddoublepro = false; + } + // 创建单层子项目 (需要传入多层项目的ProjectID) const createChildProject = () => { console.log(state.currentProjectId) @@ -842,13 +1053,28 @@ export default { } let obj = { - name: value6.value, - type: 2, - category: categoryT, - manager: managerT, - managerId: managerIdT, - sourceBelongId: sourceBelongIdT, - }; + "attach": "", + "beginTime": 0, + "boeFlag": 0, + "category": categoryT, + "courseSyncFlag": 0, + "endTime": 0, + "level": 0, + "manager": managerT, + "managerId": managerIdT, + "name": value6.value, + "notice": "", + "noticeFlag": 0, + "parentId": state.currentProjectId, + "picUrl": "", + "projectId": 0, + "remark": "", + "sourceBelongId": sourceBelongIdT, + "status": 0, + "systemId": 0, + "templateId": 0, + "type": 2 + } console.log('创建多层子项目提交的数据格式', obj); for (let i in errorMsgs) { @@ -860,15 +1086,98 @@ export default { } } - value6.value = ""; - categoryT = ""; - managerT = ""; - managerIdT = ""; - sourceBelongIdT = ""; - value7.value = []; - value8.value = []; - value9.value = []; - state.doublesonpro = false; + api.createProject(obj).then(res => { + console.log(res) + if (res.status == 200 && res.data.code == 200) { + value6.value = ""; + categoryT = ""; + managerT = ""; + managerIdT = ""; + sourceBelongIdT = ""; + value7.value = []; + value8.value = []; + value9.value = []; + state.doublesonpro = false; + message.destroy(); + message.success("创建成功"); + getTableDate(); + } + }).catch(err => { + console.log(err) + message.destroy(); + message.error("创建失败,请检查当前网络状态。"); + }) + } + + // 编辑多层子项目 + const edvalue6 = ref(""); + const edvalue7 = ref([]); + const edvalue8 = ref([]); + const edvalue9 = ref(""); + + let editChildrensName = ''; + const edclassificationChange6 = (key) => { + console.log(key) + editChildrensName = key; + } + + let editChildrensCategory = ''; + const edclassificationChange2 = (key) => { + console.log(key) + editChildrensCategory = key; + } + + let editChildrensManege = ''; + let editChildrensManegeId = ''; + + const edclassificationChange3 = (key) => { + console.log(key) + editChildrensManege = key; + editChildrensManegeId = key; + } + + let editChildrensSource = ''; + const edclassificationChange4 = (key) => { + console.log(key) + editChildrensSource = key; + } + + const editChildsProject = () => { + let obj = { + "attach": "", + "beginTime": 0, + "boeFlag": 0, + "category": editChildrensCategory, + "courseSyncFlag": 0, + "endTime": 0, + "level": 0, + "manager": editChildrensManege, + "managerId": editChildrensManegeId, + "name": editChildrensName, + "notice": "", + "noticeFlag": 0, + "parentId": 0, + "picUrl": "", + "projectId": state.currentEditChildrensProjectId, + "remark": "", + "sourceBelongId": editChildrensSource, + "status": 0, + "systemId": 0, + "templateId": 0, + "type": 2 + } + + if (obj.name !== '' || obj.manager !== '' || obj.category !== '' || obj.sourceBelongId !== '') { + alert("我需要修改") + console.log("编辑多层子项目传递的参数", obj) + state.eddoublesonpro = false; + } else { + state.eddoublesonpro = false; + } + } + + const closeeditModal3 = () => { + state.eddoublesonpro = false; } @@ -925,10 +1234,12 @@ export default { { value.record.status == 0 ? "草稿" : - value.record.status == 1 ? + value.record.status == 1 && Number(value.record.beginTime) < Math.ceil(new Date().getTime / 1000) ? "进行中" : - value.record.status == 2 ? - "未开始" : "已结束" + value.record.status == 1 && Number(value.record.beginTime) > Math.ceil(new Date().getTime / 1000) ? + "未开始" : + value.record.status == 2 ? + "未开始" : "已结束" }
) @@ -966,7 +1277,19 @@ export default { return value.record.type === 1 ? ( value.record.status === 0 ? (
- 编辑 + { + state.eddoublepro = true; + console.log("多层项目编辑") + edvalue1.value = value.record.name; + {/* edvalue2.value = classifyList[value.record.category] */ } + edvalue2.value = classifyList.value[0]; + edvalue3.value = value.record.manager.split(); + edvalue4.value = "1,2" + edvalue5.value = classifyList5.value[0] + }} + style="cursor:pointer;" + class="operation1">编辑
- ) : value.record.status === "进行中" ? ( + ) : value.record.status === 1 ? (
查看
@@ -1180,7 +1503,20 @@ export default { ) : value.record.type === 2 ? ( value.record.status === 0 ? (
- 编辑 + { + console.log("多层子项目编辑", value) + state.currentEdProjectName = value.record.paraentName; + state.currentEditChildrensProjectId = value.record.projectId; + state.eddoublesonpro = true; + + edvalue6.value = value.record.name; + edvalue7.value = classifyList.value[0]; + edvalue8.value = value.record.manager.split(); + edvalue9.value = classifyList5.value[0] + }} + style="cursor:pointer;" + class="operation1">编辑
- ) : value.record.status === "进行中" ? ( + ) : value.record.status === 1 ? (
查看
@@ -1403,7 +1739,33 @@ export default { ) : (
{value.record.status === 0 ? ( - 编辑 + { + console.log("单层子项目的编辑") + console.log(value) + + {/* 判断是班级\单层项目\单层子项目 */ } + if (value.record.parentId == "0") { + router.push({ + path: '/projectadd', + query: { projectId: value.record.projectId, name: value.record.name } + }); + } else { + if (value.record.isbj) { + router.push({ + path: '/classadd', + query: { projectId: value.record.projectId, name: value.record.paraentName } + }); + } else { + router.push({ + path: '/sonproject', + query: { projectId: value.record.projectId, name: value.record.name } + }); + } + } + }} + style="cursor:pointer;" + class="operation1">编辑 ) : ( )} @@ -1456,7 +1818,12 @@ export default {
{value.record.status === 0 ? ( - 发布 + { + alert("发布项目") + }} + style="cursor:pointer" + class="operation3">发布 ) : ( { - value.children = value.subList; - value.key = value.projectId; + console.log('value %o', value) + if (value.type == 1) { + value.children = value.subList; + value.key = value.projectId; + + value.children.map((data) => { + if (data.type == 2) { + data.children = data.subList; + data.key = data.projectId; + // 传递给多层子项目项目归属名字 + data.paraentName = value.name; + data.subList.map((data2) => { + data2.paraentName = value.name + '/' + data.name; + data2.isbj = "class"; + }) + console.log('lalallalaa', data) + } + }) + + } + console.log("map-value", value.subList, value.children,); - // if (value.subList.length !== 0) { - // //多层项目 - // value.operation = - // value.status === "草稿" ? ( - //
- // 编辑 - //
- // - // - //
{ - // showProjPrower(); - // }} - // > - // 权限名单 - //
- //
- // - //
{ - // console.log("点击了111"); - // showProjOwner(); - // }} - // > - // 归属权 - //
- //
- // - //
{ - // console.log("点击了111"); - // showProjCheck(); - // }} - // > - // 查看权 - //
- //
- // - //
{ - // showProjManage(); - // }} - // > - // 管理权 - //
- //
- //
- //
- // { - // state.sonproject = true; - // }} - // > - // 创建子项目 - // - //
- // - // - // 基础信息 - // - // - //
{ - // showStartModal(); - // }} - // > - // 存为模板 - //
- //
- //
- //
- //
- // ) : value.status === "进行中" ? ( - //
- // 查看 - //
- // - // - //
{ - // showProjPrower(); - // }} - // > - // 权限名单 - //
- //
- // - //
{ - // console.log("点击了111"); - // showProjOwner(); - // }} - // > - // 归属权 - //
- //
- // - //
{ - // console.log("点击了111"); - // showProjCheck(); - // }} - // > - // 查看权 - //
- //
- // - //
{ - // showProjManage(); - // }} - // > - // 管理权 - //
- //
- //
- //
- // { - // showCopyModal(); - // }} - // > - // 复制 - // - // - //
- // ) : value.status === "已结束" ? ( - //
- // 查看 - //
- // - // - //
{ - // showProjPrower(); - // }} - // > - // 权限名单 - //
- //
- // - //
{ - // console.log("点击了111"); - // showProjOwner(); - // }} - // > - // 归属权 - //
- //
- // - //
{ - // console.log("点击了111"); - // showProjCheck(); - // }} - // > - // 查看权 - //
- //
- // - //
{ - // showProjManage(); - // }} - // > - // 管理权 - //
- //
- //
- //
- // { - // showCopyModal(); - // }} - // > - // 复制 - // - // { - // showDeleteModal(); - // }} - // > - // 删除 - // - //
- // ) : ( - //
- // ); - // value.subList.map((item) => { - // if (item.children) { - // //多层子项目 - // item.operation = - // item.state === "草稿" ? ( - //
- // 编辑 - //
- // - // - //
{ - // showProjPrower(); - // }} - // > - // 权限名单 - //
- //
- // - //
{ - // console.log("点击了111"); - // showProjOwner(); - // }} - // > - // 归属权 - //
- //
- // - //
{ - // console.log("点击了111"); - // showProjCheck(); - // }} - // > - // 查看权 - //
- //
- // - //
{ - // showProjManage(); - // }} - // > - // 管理权 - //
- //
- //
- //
- // - // 创建班级 - // - //
- // - // - //
{ - // showCopyModal(); - // }} - // > - // 复制 - //
- //
- // - //
{ - // showDeleteModal(); - // }} - // > - // 删除 - //
- //
- //
- //
- //
- // ) : item.state === "进行中" ? ( - //
- // 查看 - //
- // - // - //
{ - // showProjPrower(); - // }} - // > - // 权限名单 - //
- //
- // - //
{ - // console.log("点击了111"); - // showProjOwner(); - // }} - // > - // 归属权 - //
- //
- // - //
{ - // console.log("点击了111"); - // showProjCheck(); - // }} - // > - // 查看权 - //
- //
- // - //
{ - // showProjManage(); - // }} - // > - // 管理权 - //
- //
- //
- //
- - // - // 创建班级 - // - // { - // showCopyModal(); - // }} - // > - // 复制 - // - //
- // ) : item.state === "已结束" ? ( - //
- // 查看 - //
- // - // - //
{ - // showProjPrower(); - // }} - // > - // 权限名单 - //
- //
- // - //
{ - // console.log("点击了111"); - // showProjOwner(); - // }} - // > - // 归属权 - //
- //
- // - //
{ - // console.log("点击了111"); - // showProjCheck(); - // }} - // > - // 查看权 - //
- //
- // - //
{ - // showProjManage(); - // }} - // > - // 管理权 - //
- //
- //
- //
- // { - // showCopyModal(); - // }} - // > - // 复制 - // - // { - // showDeleteModal(); - // }} - // > - // 删除 - // - //
- // ) : ( - //
- // ); - - // item.children.map((a) => { - // //班级 - // a.operation = - // a.state === "草稿" ? ( - //
- // 编辑 - //
- // - // - //
{ - // showProjPrower(); - // }} - // > - // 权限名单 - //
- //
- // - //
{ - // console.log("点击了111"); - // showProjOwner(); - // }} - // > - // 归属权 - //
- //
- // - //
{ - // console.log("点击了111"); - // showProjCheck(); - // }} - // > - // 查看权 - //
- //
- // - //
{ - // showProjManage(); - // }} - // > - // 管理权 - //
- //
- //
- //
- // 发布 - //
- // - // - //
{ - // showCopyModal(); - // }} - // > - // 复制 - //
- //
- // - //
{ - // showDeleteModal(); - // }} - // > - // 删除 - //
- //
- // - //
{ - // showStartModal(); - // }} - // > - // 存为模板 - //
- //
- // - // - // 基础信息 - // - // - //
- //
- //
- // ) : a.state === "进行中" ? ( - //
- // - //
- // - // - //
{ - // showProjPrower(); - // }} - // > - // 权限名单 - //
- //
- // - //
{ - // console.log("点击了111"); - // showProjOwner(); - // }} - // > - // 归属权 - //
- //
- // - //
{ - // console.log("点击了111"); - // showProjCheck(); - // }} - // > - // 查看权 - //
- //
- // - //
{ - // showProjManage(); - // }} - // > - // 管理权 - //
- //
- //
- //
- // { - // showCopyModal(); - // }} - // > - // 复制 - // - //
- // - // - //
{ - // showBackModal(); - // }} - // > - // 撤回 - //
- //
- // - //
{ - // showStopModal(); - // }} - // > - // 结束 - //
- //
- // - //
{ - // showStartModal(); - // }} - // > - // 存为模板 - //
- //
- // - // - // 基础信息 - // - // - //
- //
- //
- // ) : a.state === "已结束" ? ( - //
- // - //
- // - // - //
{ - // showProjPrower(); - // }} - // > - // 权限名单 - //
- //
- // - //
{ - // console.log("点击了111"); - // showProjOwner(); - // }} - // > - // 归属权 - //
- //
- // - //
{ - // console.log("点击了111"); - // showProjCheck(); - // }} - // > - // 查看权 - //
- //
- // - //
{ - // showProjManage(); - // }} - // > - // 管理权 - //
- //
- //
- //
- // { - // showCopyModal(); - // }} - // > - // 复制 - // - // { - // showCopyModal(); - // }} - // > - // 复制 - // - //
- // - // - //
{ - // showDeleteModal(); - // }} - // > - // 删除 - //
- //
- // - //
{ - // showStartModal(); - // }} - // > - // 存为模板 - //
- //
- // - // - // 基础信息 - // - // - //
- //
- //
- // ) : a.state === "未开始" ? ( - //
- // - //
- // - // - //
{ - // showProjPrower(); - // }} - // > - // 权限名单 - //
- //
- // - //
{ - // console.log("点击了111"); - // showProjOwner(); - // }} - // > - // 归属权 - //
- //
- // - //
{ - // console.log("点击了111"); - // showProjCheck(); - // }} - // > - // 查看权 - //
- //
- // - //
{ - // showProjManage(); - // }} - // > - // 管理权 - //
- //
- //
- //
- // { - // showCopyModal(); - // }} - // > - // 复制 - // - //
- // - // - //
{ - // showStopModal(); - // }} - // > - // 结束 - //
- //
- // - //
{ - // showBackModal(); - // }} - // > - // 撤回 - //
- //
- // - //
{ - // showStartModal(); - // }} - // > - // 存为模板 - //
- //
- // - // - // 基础信息 - // - // - //
- //
- //
- // ) : ( - //
- // ); - // }); - // } else { - // //单层子项目 - // item.operation = - // item.state === "草稿" ? ( - //
- // 编辑 - //
- // - // - //
{ - // showProjPrower(); - // }} - // > - // 权限名单 - //
- //
- // - //
{ - // console.log("点击了111"); - // showProjOwner(); - // }} - // > - // 归属权 - //
- //
- // - //
{ - // console.log("点击了111"); - // showProjCheck(); - // }} - // > - // 查看权 - //
- //
- // - //
{ - // showProjManage(); - // }} - // > - // 管理权 - //
- //
- //
- //
- // 发布 - //
- // - // - //
{ - // showCopyModal(); - // }} - // > - // 复制 - //
- //
- // - //
{ - // showDeleteModal(); - // }} - // > - // 删除 - //
- //
- // - //
{ - // showStartModal(); - // }} - // > - // 存为模板 - //
- //
- // - // - // 基础信息 - // - // - //
- //
- //
- // ) : item.state === "进行中" ? ( - //
- // - //
- // - // - //
{ - // showProjPrower(); - // }} - // > - // 权限名单 - //
- //
- // - //
{ - // console.log("点击了111"); - // showProjOwner(); - // }} - // > - // 归属权 - //
- //
- // - //
{ - // console.log("点击了111"); - // showProjCheck(); - // }} - // > - // 查看权 - //
- //
- // - //
{ - // showProjManage(); - // }} - // > - // 管理权 - //
- //
- //
- //
- // { - // showCopyModal(); - // }} - // > - // 复制 - // - //
- // - // - //
{ - // showBackModal(); - // }} - // > - // 撤回 - //
- //
- // - //
{ - // showStopModal(); - // }} - // > - // 结束 - //
- //
- // - //
{ - // showStartModal(); - // }} - // > - // 存为模板 - //
- //
- // - // - // 基础信息 - // - // - //
- //
- //
- // ) : item.state === "已结束" ? ( - //
- // - //
- // - // - //
{ - // showProjPrower(); - // }} - // > - // 权限名单 - //
- //
- // - //
{ - // console.log("点击了111"); - // showProjOwner(); - // }} - // > - // 归属权 - //
- //
- // - //
{ - // console.log("点击了111"); - // showProjCheck(); - // }} - // > - // 查看权 - //
- //
- // - //
{ - // showProjManage(); - // }} - // > - // 管理权 - //
- //
- //
- //
- // { - // showCopyModal(); - // }} - // > - // 复制 - // - //
- // - // - //
{ - // showDeleteModal(); - // }} - // > - // 删除 - //
- //
- // - //
{ - // showStopModal(); - // }} - // > - // 结束 - //
- //
- // - //
{ - // showStartModal(); - // }} - // > - // 存为模板 - //
- //
- // - // - // 基础信息 - // - // - //
- //
- //
- // ) : item.state === "未开始" ? ( - //
- // - //
- // - // - //
{ - // showProjPrower(); - // }} - // > - // 权限名单 - //
- //
- // - //
{ - // console.log("点击了111"); - // showProjOwner(); - // }} - // > - // 归属权 - //
- //
- // - //
{ - // console.log("点击了111"); - // showProjCheck(); - // }} - // > - // 查看权 - //
- //
- // - //
{ - // showProjManage(); - // }} - // > - // 管理权 - //
- //
- //
- //
- // { - // showCopyModal(); - // }} - // > - // 复制 - // - //
- // - // - //
{ - // showBackModal(); - // }} - // > - // 撤回 - //
- //
- // - //
{ - // showStopModal(); - // }} - // > - // 结束 - //
- //
- // - //
{ - // showStartModal(); - // }} - // > - // 存为模板 - //
- //
- // - // - // 基础信息 - // - // - //
- //
- //
- // ) : ( - //
- // ); - // } - // }); - // } else { - // //单层项目 - // value.operation = ( - //
- // {value.status === "草稿" ? ( - // 编辑 - // ) : ( - // - // )} - //
- // - // - //
{ - // showProjPrower(); - // }} - // > - // 权限名单 - //
- //
- // - //
{ - // console.log("点击了111"); - // showProjOwner(); - // }} - // > - // 归属权 - //
- //
- // - //
{ - // console.log("点击了111"); - // showProjCheck(); - // }} - // > - // 查看权 - //
- //
- // - //
{ - // showProjManage(); - // }} - // > - // 管理权 - //
- //
- //
- //
- - // {value.status === "草稿" ? ( - // 发布 - // ) : ( - // { - // showCopyModal(); - // }} - // > - // 复制 - // - // )} - //
- // {value.status === "草稿" ? ( - // - // - //
{ - // showCopyModal(); - // }} - // > - // 复制 - //
- //
- // - //
{ - // showDeleteModal(); - // }} - // > - // 删除 - //
- //
- // - //
{ - // showStartModal(); - // }} - // > - // 存为模板 - //
- //
- // - // 基础信息 - // - //
- // ) : value.status === "进行中" ? ( - // - // - //
{ - // showStartModal(); - // }} - // > - // 存为模板 - //
- //
- // - //
{ - // showStopModal(); - // }} - // > - // 结束 - //
- //
- // - //
{ - // showBackModal(); - // }} - // > - // 撤回 - //
- //
- // - // 基础信息 - // - //
- // ) : value.status === "已结束" || - // value.status === "未开始" ? ( - // - // - //
{ - // showStartModal(); - // }} - // > - // 存为模板 - //
- //
- // - //
{ - // showDeleteModal(); - // }} - // > - // 删除 - //
- //
- // - // 基础信息 - // - //
- // ) : ( - //
- // )} - //
- //
- // ); - // } }); tableData.value = data; console.log("tableData", tableData); @@ -3282,19 +2171,45 @@ export default { value8, value9, + edvalue1, + edvalue2, + edvalue3, + edvalue4, + edvalue5, + edvalue6, + edvalue7, + edvalue8, + edvalue9, + + edclassificationChange2, + edclassificationChange3, + edclassificationChange4, + edclassificationChange6, + sProjectName, sProjectOrder, + sProjectCreate, sProjectState, sProjectTime, sProjectStateList, sProjectNameChange, sProjectOrderChange, + sProjectCreateChange, sProjectStateChange, sProjectTimeChange, searchReset, searchSubmit, createChildProject, - createChildsProject + createChildsProject, + + editStoreyProject, + closeeditModal2, + edclassificationChangeName, + edclassificationChange, + edclassificationChange1, + edclassificationChange5, + editChildsProject, + closeeditModal3 }; }, }; diff --git a/src/views/projectcenter/SonProject.vue b/src/views/projectcenter/SonProject.vue index 6174797b..1c0e547f 100644 --- a/src/views/projectcenter/SonProject.vue +++ b/src/views/projectcenter/SonProject.vue @@ -15,7 +15,9 @@
项目归属
-
{{ projectAscription }}
+
+ {{ projectAscription }} +
@@ -224,9 +226,10 @@ - diff --git a/src/views/projectcenter/TaskAdd.vue b/src/views/projectcenter/TaskAdd.vue index ef9df4b7..5164d94e 100644 --- a/src/views/projectcenter/TaskAdd.vue +++ b/src/views/projectcenter/TaskAdd.vue @@ -526,7 +526,14 @@