From f9ffe051eb68b800dc05240c440bcaba2cb67fef Mon Sep 17 00:00:00 2001 From: lixg Date: Sun, 4 Dec 2022 14:16:13 +0800 Subject: [PATCH 1/3] =?UTF-8?q?fix:=E4=BF=AE=E6=94=B9=E5=90=8C=E6=AD=A5?= =?UTF-8?q?=E5=AD=A6=E4=B9=A0=E8=AE=B0=E5=BD=95=E9=80=89=E9=A1=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/config.js | 8 +- src/components/drawers/ProjCheckPower.vue | 875 +++++------- src/views/projectcenter/ProjectAdd.vue | 21 +- src/views/projectcenter/TaskPage.vue | 1530 +++++++++++---------- 4 files changed, 1154 insertions(+), 1280 deletions(-) diff --git a/src/api/config.js b/src/api/config.js index e70ef6e2..e8171905 100644 --- a/src/api/config.js +++ b/src/api/config.js @@ -2,10 +2,11 @@ * @Author: lixg lixg@dongwu-inc.com * @Date: 2022-11-21 14:32:52 * @LastEditors: lixg lixg@dongwu-inc.com - * @LastEditTime: 2022-12-04 11:13:37 + * @LastEditTime: 2022-12-04 13:27:07 * @FilePath: /fe-manage/src/api/config.js * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE */ +import { message } from "ant-design-vue"; import axios from "axios"; // import { getCookie } from '../api/method' // const Qs = require("qs"); @@ -23,6 +24,7 @@ const http = axios.create({ http.interceptors.request.use( (config) => { + // console.log('config', config) // const token = localStorage.getItem("token"); // // const token = getCookie('token') // // console.log('token', token) @@ -61,6 +63,10 @@ http.interceptors.response.use( return response; }, function (error) { + if (error.message == "timeout of 1ms exceeded") { + message.destroy() + message.error("请求超时") + } console.log("api error %o", error); return Promise.reject(error); } diff --git a/src/components/drawers/ProjCheckPower.vue b/src/components/drawers/ProjCheckPower.vue index 05e28a23..74775826 100644 --- a/src/components/drawers/ProjCheckPower.vue +++ b/src/components/drawers/ProjCheckPower.vue @@ -1,29 +1,29 @@ - - + \ No newline at end of file diff --git a/src/views/projectcenter/ProjectAdd.vue b/src/views/projectcenter/ProjectAdd.vue index e82d623d..9761f9e2 100644 --- a/src/views/projectcenter/ProjectAdd.vue +++ b/src/views/projectcenter/ProjectAdd.vue @@ -171,7 +171,19 @@
同步学习记录
- 同步课程学习记录(如学员在课程库中拥有课程的学习记录,自动免修该课程) +
@@ -317,6 +329,7 @@ export default { keyWord: "", }, classifyList5: [], + courseSyncFlag: false, }); onMounted(() => { @@ -349,6 +362,9 @@ export default { state.projectInfo.endTime, ]; state.projectInfo.parentName = routers.query.parentName; + state.courseSyncFlag = state.projectInfo.courseSyncFlag + ? true + : false; }); } @@ -432,6 +448,7 @@ export default { return; } state.projectInfo.type = 3; + state.projectInfo.courseSyncFlag = state.courseSyncFlag ? 1 : 0; api.createProject(state.projectInfo).then(() => { message.destroy(); message.success("编辑成功"); diff --git a/src/views/projectcenter/TaskPage.vue b/src/views/projectcenter/TaskPage.vue index 2c62cbb2..f0b4c9d7 100644 --- a/src/views/projectcenter/TaskPage.vue +++ b/src/views/projectcenter/TaskPage.vue @@ -3,7 +3,7 @@
- +
{{ name }}
@@ -11,29 +11,29 @@
起止时间:{{ startTime }}至{{ endTime }}
- +
{{ act }}
{{ act }}
@@ -43,9 +43,9 @@
-->
{{ item.stage }}
@@ -253,28 +253,28 @@
课程完成率
考试通过率
作业完成率
@@ -285,8 +285,8 @@
阶段任务总数
@@ -295,8 +295,8 @@
必修课
@@ -305,8 +305,8 @@
选修课
@@ -326,8 +326,8 @@ @@ -347,12 +347,12 @@
必修 选修 @@ -430,27 +430,36 @@
开始时间
- {{ - item.startTime !== null ? item.startTime: '' - }} + {{ item.startTime !== null ? item.startTime : "" }}
{{ - item.finishStuCnt && item.finishStuCnt !== null ? item.finishStuCnt : 0 - }}/{{ item.totalStuCnt && item.totalStuCnt !== null ? item.totalStuCnt : 0 }}人 + item.finishStuCnt && item.finishStuCnt !== null + ? item.finishStuCnt + : 0 + }}/{{ + item.totalStuCnt && item.totalStuCnt !== null + ? item.totalStuCnt + : 0 + }}人
{{ - (item.finishStuCnt && item.finishStuCnt !== null ? item.finishStuCnt : 0 / item.totalStuCnt && item.totalStuCnt !== null ? item.totalStuCnt : 0) * 100 + >{{ + (item.finishStuCnt && item.finishStuCnt !== null + ? item.finishStuCnt + : 0 / item.totalStuCnt && + item.totalStuCnt !== null + ? item.totalStuCnt + : 0) * 100 }}%
@@ -481,9 +490,9 @@ 考勤
-->
二维码
@@ -517,22 +526,22 @@
- +
- +
- +
创建任务 @@ -552,7 +561,7 @@
姓名:
小组名称:
@@ -631,18 +640,18 @@
- + 搜索
- + 重置
- + 添加学员
@@ -651,12 +660,12 @@ 导入学员
-->
- + 批量删除
- +
已选择
@@ -671,15 +680,15 @@
@@ -713,51 +722,51 @@
小组名称:
- + 搜索
- + 重置
- + 创建小组
- + 随机分组
{{ item.groupName }}
. . .. . .
编辑
删除
@@ -767,14 +776,14 @@
组长:{{ item.leaderName }}
进度
- +
组员名单 >
-
+
@@ -807,15 +816,11 @@
- - + + - - + +
@@ -969,9 +974,9 @@
封面图:
@@ -979,7 +984,7 @@
项目时间:
{{ startTime }} ~ {{ endTime }}{{ startTime }} ~ {{ endTime }}
@@ -1005,30 +1010,39 @@
同步学习记录:
同步课程学习记录(如学员在课程库中拥有课程的学习记录,自动免修该课程)同步课程学习记录(如学员在课程库中拥有课程的学习记录,自动免修该课程)
项目级别:
- +
培训体系:
- +
是否BOEU实施:
BOEU实施BOEU实施
@@ -1049,50 +1063,54 @@
上传上传 -
+
支持:pdf.ppt.pptx.doc.docx.xls.xlsx.jpeg.png.gif.zip
{{ - item.name - }} + item.name + }} 删除删除
@@ -1106,88 +1124,88 @@
- + - + - + - + - +
项目发布项目发布
@@ -1229,15 +1247,15 @@
- + 发送项目通知
发给老师发给老师 发给学员发给学员
@@ -1251,19 +1269,19 @@
@@ -1285,32 +1303,32 @@
小组名称:
小组长:
@@ -1325,12 +1343,12 @@
@@ -1358,11 +1376,11 @@
@@ -1390,11 +1408,11 @@
@@ -1423,12 +1441,12 @@
@@ -1458,11 +1476,11 @@
@@ -1487,30 +1505,30 @@
- +
项目发布项目发布
@@ -1575,11 +1593,11 @@
@@ -1607,11 +1625,11 @@
@@ -1641,11 +1659,11 @@
@@ -1672,9 +1690,9 @@