From 3efc67ce7ad0caf659f3338576152d2ef79cb9be Mon Sep 17 00:00:00 2001 From: Ggysh-7 <102372376+Ggysh-7@users.noreply.github.com> Date: Tue, 15 Nov 2022 10:48:53 +0800 Subject: [PATCH 1/6] =?UTF-8?q?feat:=E6=A8=A1=E4=BB=BF=E8=AF=84=E4=BC=B0?= =?UTF-8?q?=E8=A7=84=E8=8C=83=E5=9C=A8=E7=BA=BF=E6=8A=BD=E5=B1=89=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/drawers/AddOnline.vue | 378 ++++++++++++++++----------- src/views/projectcenter/TaskAdd.vue | 20 +- 2 files changed, 237 insertions(+), 161 deletions(-) diff --git a/src/components/drawers/AddOnline.vue b/src/components/drawers/AddOnline.vue index a7b5e9bb..ec1fa777 100644 --- a/src/components/drawers/AddOnline.vue +++ b/src/components/drawers/AddOnline.vue @@ -8,8 +8,9 @@ @after-visible-change="afterVisibleChange" >
-
-
添加在线
+
+
编辑在线
+
添加在线
课程编号:
@@ -48,7 +49,7 @@
搜索
-
+
重置
@@ -75,11 +76,14 @@ (_record, index) => (index % 2 === 1 ? 'table-striped' : null) " :row-selection="rowSelection" - :columns="columns1" - :data-source="tableData1" + :columns="tableDataFunc()" + :data-source="tableData" :loading="tableDataTotal === -1 ? true : false" + expandRowByClick="true" this.getMilitaryDeployment() + @expand="expandTable" :pagination="false" + filterMultiple:false />
- - + +
- \ No newline at end of file + \ No newline at end of file diff --git a/src/components/drawers/AddDiscuss.vue b/src/components/drawers/AddDiscuss.vue index b2166686..357bd86f 100644 --- a/src/components/drawers/AddDiscuss.vue +++ b/src/components/drawers/AddDiscuss.vue @@ -300,6 +300,7 @@ export default { .main_item { display: flex; align-items: center; + margin-top: 32px; margin-bottom: 32px; .signbox { width: 120px; diff --git a/src/components/drawers/AddEval.vue b/src/components/drawers/AddEval.vue index 06daaada..9221e473 100644 --- a/src/components/drawers/AddEval.vue +++ b/src/components/drawers/AddEval.vue @@ -322,6 +322,7 @@ export default { .main_item { display: flex; align-items: center; + margin-top: 32px; margin-bottom: 32px; .signbox { width: 120px; diff --git a/src/components/drawers/AddFaceteach.vue b/src/components/drawers/AddFaceteach.vue index cd42ca90..e8687d52 100644 --- a/src/components/drawers/AddFaceteach.vue +++ b/src/components/drawers/AddFaceteach.vue @@ -400,99 +400,116 @@ export default { .main_item { display: flex; align-items: center; - margin-bottom: 32px; - .signbox { - width: 120px; - display: flex; - justify-content: end; - align-items: center; - .sign { - margin-right: 5px; - } - } - .btnbox { - display: flex; - flex: 1; - align-items: center; - .xkbtn { - cursor: pointer; - width: 130px; - height: 40px; - background: #388be1; - border-radius: 8px; - border: 0; - margin-right: 8px; - color: #fff; - } - } - } - .main_item2 { - display: flex; - align-items: flex-start; - margin-bottom: 32px; - .signbox { - width: 120px; - display: flex; - justify-content: end; - align-items: center; - } - .kqszbox { - .qdqtbox { - margin-left: 5px; - cursor: pointer; - } - .qdbtn, - .qtbtn { - width: 75px; - height: 24px; - background: rgba(56, 139, 225, 0.16); - border-radius: 2px; - border: 1px solid #387df7; + margin-top: 32px; + margin-bottom: 32px; + + .signbox { + width: 120px; display: flex; + justify-content: end; align-items: center; - justify-content: center; - .btntext { - color: #387df7; + + .sign { + margin-right: 5px; } } - .setbox { + + .btnbox { display: flex; - flex-wrap: wrap; - margin-top: 10px; - margin-bottom: 24px; - .timerbox { - margin-top: 6px; - margin-right: 32px; + flex: 1; + align-items: center; + + .xkbtn { + cursor: pointer; + width: 130px; + height: 40px; + background: #388be1; + border-radius: 8px; + border: 0; + margin-right: 8px; + color: #fff; + } + } + } + + .main_item2 { + display: flex; + align-items: flex-start; + margin-bottom: 32px; + + .signbox { + width: 120px; + display: flex; + justify-content: end; + align-items: center; + } + + .kqszbox { + .qdqtbox { + margin-left: 5px; + cursor: pointer; + } + + .qdbtn, + .qtbtn { + width: 75px; + height: 24px; + background: rgba(56, 139, 225, 0.16); + border-radius: 2px; + border: 1px solid #387df7; display: flex; align-items: center; - flex-wrap: nowrap; + justify-content: center; + + .btntext { + color: #387df7; + } + } + + .setbox { + display: flex; + flex-wrap: wrap; + margin-top: 10px; + margin-bottom: 24px; + + .timerbox { + margin-top: 6px; + margin-right: 32px; + display: flex; + align-items: center; + flex-wrap: nowrap; + } + } + } + + .btnbox2 { + display: flex; + flex-direction: column; + justify-content: flex-start; + + .xkbtn { + cursor: pointer; + width: 130px; + height: 40px; + background: #388be1; + border-radius: 8px; + border: 0; + margin-right: 16px 8px 32px 0; + color: #fff; + margin-top: 16px; + margin-bottom: 60px; } } } - .btnbox2 { - display: flex; - flex-direction: column; - justify-content: flex-start; - .xkbtn { - cursor: pointer; - width: 130px; - height: 40px; - background: #388be1; - border-radius: 8px; - border: 0; - margin-right: 16px 8px 32px 0; - color: #fff; - margin-top: 16px; - margin-bottom: 60px; - } } - } - } - .main_right { - width: 337px; - .main_item { - display: flex; - align-items: center; + + .main_right { + width: 337px; + + .main_item { + display: flex; + align-items: center; + margin-top: 32px; margin-bottom: 32px; .signbox { width: 120px; diff --git a/src/components/drawers/AddHomework.vue b/src/components/drawers/AddHomework.vue index c3c75f15..71990ad7 100644 --- a/src/components/drawers/AddHomework.vue +++ b/src/components/drawers/AddHomework.vue @@ -488,6 +488,7 @@ export default { .main_item { display: flex; align-items: center; + margin-top: 32px; margin-bottom: 32px; .signbox { diff --git a/src/components/drawers/AddInvist.vue b/src/components/drawers/AddInvist.vue index dc7e3929..9d64ac8b 100644 --- a/src/components/drawers/AddInvist.vue +++ b/src/components/drawers/AddInvist.vue @@ -333,6 +333,7 @@ export default { .main_item { display: flex; align-items: center; + margin-top: 32px; margin-bottom: 32px; .fi_input { margin-right: 20px; diff --git a/src/components/drawers/AddLive.vue b/src/components/drawers/AddLive.vue index 43904a80..22c24f58 100644 --- a/src/components/drawers/AddLive.vue +++ b/src/components/drawers/AddLive.vue @@ -701,6 +701,7 @@ export default { .main_item { display: flex; align-items: center; + margin-top: 32px; margin-bottom: 32px; .signbox { width: 120px; diff --git a/src/components/drawers/AddOnline.vue b/src/components/drawers/AddOnline.vue index ec1fa777..34b6b274 100644 --- a/src/components/drawers/AddOnline.vue +++ b/src/components/drawers/AddOnline.vue @@ -49,7 +49,7 @@
搜索
-
+
重置
@@ -241,7 +241,7 @@ export default { const handelChangePage = (page, pageSize) => { state.currentPage = page; state.pageSize = pageSize; - getAllInvistText(); + getAllOnlineText(); }; const getTableDate = (tableData) => { let data = tableData; @@ -260,7 +260,7 @@ export default { state.tableData = array; }; //获取全部在线信息接口 - const getAllInvistText = () => { + const getAllOnlineText = () => { api .queryAssessmentDetailList({ assessmentName: "", @@ -323,13 +323,13 @@ export default { } } //重置在线信息 - const resetInvist = () => { + const resetOnline = () => { state.inputV1 = ""; - getAllInvistText(); + getAllOnlineText(); }; onMounted(() => { - // createInvist(); - getAllInvistText(); + // createOnline(); + getAllOnlineText(); }); return { ...toRefs(state), @@ -338,9 +338,10 @@ export default { tableDataFunc, rowSelection, handelChangePage, + getAllOnlineText, getTableDate, updateTask, - resetInvist, + resetOnline, }; }, }; @@ -371,6 +372,7 @@ export default { .main_items { display: flex; justify-content: space-between; + margin-top: 32px; margin-bottom: 12px; flex-wrap: wrap; .mi_ipts { diff --git a/src/components/drawers/AddTest.vue b/src/components/drawers/AddTest.vue index a56544a7..536a3db6 100644 --- a/src/components/drawers/AddTest.vue +++ b/src/components/drawers/AddTest.vue @@ -200,7 +200,7 @@
- - diff --git a/src/views/projectcenter/TaskPage.vue b/src/views/projectcenter/TaskPage.vue index 6a7c4608..cd27de75 100644 --- a/src/views/projectcenter/TaskPage.vue +++ b/src/views/projectcenter/TaskPage.vue @@ -419,23 +419,7 @@
二维码
@@ -1373,6 +1357,7 @@ + + + + + + diff --git a/src/components/drawers/AddActive.vue b/src/components/drawers/AddActive.vue index fb0719f1..0a265904 100644 --- a/src/components/drawers/AddActive.vue +++ b/src/components/drawers/AddActive.vue @@ -503,6 +503,7 @@ export default { border-radius: 8px; } .main_left { + margin-top:32px; padding-right: 30px; flex: 1; border-right: 1px solid #e8e8e8; diff --git a/src/components/drawers/AddCase.vue b/src/components/drawers/AddCase.vue index 93ad2825..86b9849b 100644 --- a/src/components/drawers/AddCase.vue +++ b/src/components/drawers/AddCase.vue @@ -227,6 +227,7 @@ } .contentMain { .main_items { + margin-top:32px; display: flex; justify-content: space-between; margin-bottom: 12px; diff --git a/src/components/drawers/AddDiscuss.vue b/src/components/drawers/AddDiscuss.vue index b2166686..e30307f1 100644 --- a/src/components/drawers/AddDiscuss.vue +++ b/src/components/drawers/AddDiscuss.vue @@ -294,6 +294,7 @@ export default { display: flex; justify-content: space-between; .main_left { + margin-top:32px; padding-right: 30px; flex: 1; border-right: 1px solid #e8e8e8; diff --git a/src/components/drawers/AddEval.vue b/src/components/drawers/AddEval.vue index 06daaada..3f894f99 100644 --- a/src/components/drawers/AddEval.vue +++ b/src/components/drawers/AddEval.vue @@ -316,6 +316,7 @@ export default { display: flex; justify-content: space-between; .main_left { + margin-top:32px; padding-right: 30px; flex: 1; border-right: 1px solid #e8e8e8; diff --git a/src/components/drawers/AddHomework.vue b/src/components/drawers/AddHomework.vue index c3c75f15..dbc751ac 100644 --- a/src/components/drawers/AddHomework.vue +++ b/src/components/drawers/AddHomework.vue @@ -245,7 +245,7 @@ export default { // }; const handleFinish = (values) => { console.log(values); - updateWork(props.workId); + updteHomeWork(); }; const handleFinishFailed = (errors) => { @@ -288,77 +288,40 @@ export default { console.log("state", bool); }; - const updateWork = () => { - state.addLoading = true; - if (props.edit) { - // 编辑任务 - myUpdateWorkTaskUsing(); - } else { - // 创建任务 - console.log("创建任务***************"); - myCreateWorkTask(); - } - }; + // 新增任务 - const myCreateWorkTask = () => { + const updteHomeWork = () => { let obj = { - createTime: "", - createUser: 0, submitEndTime: dayjs(formState.choosedTime[1]).format("YYYY-MM-DD"), submitStartTime: dayjs(formState.choosedTime[0]).format("YYYY-MM-DD"), - updateTime: "", - updateUser: 0, workEnclosureAddress: "", - workFlag: "", - workId: 0, + workId: props.edit?props.EditWorkId:0, workName: formState.workName, workRequirement: formState.workRequirement, - workTag: "", }; - createWorkTask(obj) + if(props.edit){ + updateWorkTaskUsing(obj) .then((res) => { - if (props.isLevel) { - // 如果是关卡页面进入 --------------------------------- - myRouterEditTask(res.data.data.workId); - } else { - myProjectEditTask(res.data.data.workId); - } + updateTask(res); + closeDrawer(); }) .catch((err) => { message.error(`添加失败${err}`); }); - }; - // 编辑任务 - const myUpdateWorkTaskUsing = () => { - let editObj = { - createTime: "", - createUser: 0, - submitEndTime: dayjs(formState.choosedTime[1]).format("YYYY-MM-DD"), - submitStartTime: dayjs(formState.choosedTime[0]).format("YYYY-MM-DD"), - updateTime: "", - updateUser: 0, - workEnclosureAddress: "", - workFlag: "", - workId: props.EditWorkId, - workName: formState.workName, - workRequirement: formState.workRequirement, - workTag: "", - }; - updateWorkTaskUsing(editObj) + }else{ + createWorkTask(obj) .then((res) => { - console.log(res); - if (props.isLevel) { - // 如果是关卡页面进入 --------------------------------- - myRouterEditTask(res.data.data.workId); - } else { - myProjectEditTask(res.data.data.workId); - } + updateTask(res); + closeDrawer(); }) .catch((err) => { - message.error(`编辑失败${err}`); + message.error(`添加失败${err}`); }); + } + }; + // 查询任务 const queryWork = () => { state.addLoading = true; @@ -381,57 +344,49 @@ export default { }); }; // 新增编辑或新增项目任务 - const myProjectEditTask = (workId) => { - let editObj = { - courseId: workId, - duration: 60, - flag: true, - name: formState.workName, - projectId: props.projectId, - projectTaskId: props.projectTaskId || 0, - stageId: props.chooseStageId, - type: 4, - }; - ProjectEditTask(editObj) - .then((res) => { - console.log(` 编辑项目成功的打印 ${res}`); - message.success(`${props.edit ? "编辑" : "新增"}阶段任务成功`); - ctx.emit("changeData", false); - state.addLoading = false; - closeDrawer(); - }) - .catch((err) => { - message.error(`${props.edit ? "编辑" : "新增"}阶段任务失败`); - console.log(` 编辑项目失败的打印 ${err}`); - }); - }; - // 新增编辑或新增关卡任务 - const myRouterEditTask = (testId) => { - let editObj1 = { + const updateTask = (res) => { + if(props.isLevel){ + let editObj1 = { chapterId: props.isactive, - courseId: testId, - duration: 30, - flag: true, - name: formState.workName, + courseId: res.data.data.workId, + name: res.data.data.workName, routerId: props.routerId, routerTaskId: props.routerTaskId || 0, type: 4, }; RouterEditTask(editObj1) - .then((res) => { - console.log(` 编辑关卡成功的打印 ${res}`); + .then(() => { message.success(`${props.edit ? "编辑" : "新增"}关卡任务成功`); ctx.emit("changeData", false); state.addLoading = false; - closeDrawer(); }) - .catch((err) => { + .catch(() => { message.error(`${props.edit ? "编辑" : "新增"}关卡任务失败`); - console.log(` 编辑关卡失败的打印 ${err}`); }); + }else{ + let editObj = { + courseId: res.data.data.workId, + name:res.data.data.workName, + projectId: props.edit?props.projectId:0, + projectTaskId: props.projectTaskId || 0, + stageId: props.chooseStageId, + type: 4, + }; + ProjectEditTask(editObj) + .then(() => { + message.success(`${props.edit ? "编辑" : "新增"}阶段任务成功`); + ctx.emit("changeData", false); + state.addLoading = false; + }) + .catch(() => { + message.error(`${props.edit ? "编辑" : "新增"}阶段任务失败`); + }); + } + }; + return { afterVisibleChange, closeDrawer, @@ -446,7 +401,6 @@ export default { formRef, // layout, rules, - updateWork, ...toRefs(state), }; }, @@ -484,6 +438,7 @@ export default { padding-right: 30px; flex: 1; border-right: 1px solid #e8e8e8; + margin-top:32px; .main_item { display: flex; diff --git a/src/components/drawers/AddInvist.vue b/src/components/drawers/AddInvist.vue index dc7e3929..31374fc8 100644 --- a/src/components/drawers/AddInvist.vue +++ b/src/components/drawers/AddInvist.vue @@ -18,51 +18,38 @@ />
+
+
+
+
+
+ 已选择 0 +
+
+ 已选择 1 条; + 名称: {{assessment.name}} + 题数: {{assessment.num}} + 创建人: {{assessment.creator}} + 创建时间: {{assessment.time}} +
+
+ +
- -
-
+ +
-
搜索
+
选择评估
+
+
-
- -
重置
-
-
-
- - -
-
+
@@ -70,19 +57,21 @@
+
+
diff --git a/src/views/learningpath/LevelAddDetail.vue b/src/views/learningpath/LevelAddDetail.vue index aea37d17..47e89683 100644 --- a/src/views/learningpath/LevelAddDetail.vue +++ b/src/views/learningpath/LevelAddDetail.vue @@ -908,7 +908,7 @@ 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 AddVote from "../../components/vote/AddVote.vue"; import AddLive from "../../components/drawers/AddLive.vue"; import AddRef from "../../components/drawers/AddRef.vue"; import * as api from "../../api/indexLevel"; diff --git a/src/views/projectcenter/TaskAdd.vue b/src/views/projectcenter/TaskAdd.vue index bfa79cc6..2ed5f715 100644 --- a/src/views/projectcenter/TaskAdd.vue +++ b/src/views/projectcenter/TaskAdd.vue @@ -877,10 +877,10 @@ import AddTest from "../../components/drawers/AddTest.vue"; import AddLive from "../../components/drawers/AddLive.vue"; import AddRef from "../../components/drawers/AddRef.vue"; import AddDiscuss from "../../components/drawers/AddDiscuss.vue"; -import AddActive from "../../components/drawers/AddActive.vue"; +import AddActive from "../../components/drawers/AddActive.vue";s import AddEval from "../../components/drawers/AddEval.vue"; import AddInvist from "../../components/drawers/AddInvist.vue"; -import AddVote from "../../components/drawers/AddVote.vue"; +import AddVote from "../../components/vote/AddVote.vue"; import { message } from "ant-design-vue"; import * as api from "../../api/indexTaskadd"; import * as apistage from "../../api/indexStage"; diff --git a/src/views/system/SystemManage.vue b/src/views/system/SystemManage.vue index 215b48f6..6c7271f8 100644 --- a/src/views/system/SystemManage.vue +++ b/src/views/system/SystemManage.vue @@ -98,7 +98,7 @@