From 584341aeebf3da85f3fa43e4bb7de58b334b144d Mon Sep 17 00:00:00 2001 From: wyx Date: Thu, 9 Feb 2023 15:36:38 +0800 Subject: [PATCH 01/16] =?UTF-8?q?fix:=E4=BF=AE=E5=A4=8D=E9=A1=B9=E7=9B=AE?= =?UTF-8?q?=E6=8A=95=E7=A5=A8=E6=B4=BB=E5=8A=A8=E7=AE=A1=E7=90=86=E5=88=97?= =?UTF-8?q?=E8=A1=A8=E5=AD=A6=E5=91=98=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/drawers/project/ProjectOnlineManage.vue | 2 +- src/components/drawers/router/RouterCommonManage.vue | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/drawers/project/ProjectOnlineManage.vue b/src/components/drawers/project/ProjectOnlineManage.vue index a747c609..0f16e949 100644 --- a/src/components/drawers/project/ProjectOnlineManage.vue +++ b/src/components/drawers/project/ProjectOnlineManage.vue @@ -340,7 +340,7 @@ export default { // 获取数据 function getData() { - if (props.datasource.type == 11 || props.datasource.type == 9 || props.datasource.type == 6 || props.datasource.type == 7 || props.datasource.type == 3) { + if (props.datasource.type == 11 || props.datasource.type == 9 || props.datasource.type == 6 || props.datasource.type == 7 || props.datasource.type == 8 || props.datasource.type == 3) { // 此处为获取评估学员的接口 - 如后续还有用到此接口的公共任务可直接在if里面加||判断即可 console.log("我是传递的查询参数", { pageNo: state.currentPage, diff --git a/src/components/drawers/router/RouterCommonManage.vue b/src/components/drawers/router/RouterCommonManage.vue index b9580ff7..8148c4b0 100644 --- a/src/components/drawers/router/RouterCommonManage.vue +++ b/src/components/drawers/router/RouterCommonManage.vue @@ -344,7 +344,7 @@ export default { // 获取数据 function getData() { - if (props.datasource.type == 11 || props.datasource.type == 9 || props.datasource.type == 6 || props.datasource.type == 7 || props.datasource.type == 3) { + if (props.datasource.type == 11 || props.datasource.type == 9 || props.datasource.type == 6 || props.datasource.type == 7 || props.datasource.type == 8 || props.datasource.type == 3) { // 此处为获取评估学员的接口 - 如后续还有用到此接口的公共任务可直接在if里面加||判断即可 console.log("我是传递的查询参数", { pageNo: state.currentPage, From be4b4d0c2e4514c4146044db5f4b000c50365bb8 Mon Sep 17 00:00:00 2001 From: lixg Date: Thu, 9 Feb 2023 15:45:35 +0800 Subject: [PATCH 02/16] =?UTF-8?q?feat:=E4=BF=AE=E6=94=B9=E8=AF=81=E4=B9=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../drawers/project/AddCertificate.vue | 6 +- .../student/TableCertificateStudent.vue | 80 ++++- src/views/learningpath/LevelAdd.vue | 20 +- src/views/projectcenter/TaskPage.vue | 330 ++++++++++++++---- 4 files changed, 338 insertions(+), 98 deletions(-) diff --git a/src/components/drawers/project/AddCertificate.vue b/src/components/drawers/project/AddCertificate.vue index 2b6684f1..71698ba6 100644 --- a/src/components/drawers/project/AddCertificate.vue +++ b/src/components/drawers/project/AddCertificate.vue @@ -307,7 +307,7 @@ id="inputNumber" v-model:value="score" :min="1" - :max="100" + :max="projectPoints" style="width: 70px" :disabled="condition !== 5" /> @@ -320,7 +320,7 @@ margin-left: 5px; " > - 分可获得,当前项目积分为 10 分 + 分可获得,当前项目积分为 {{ projectPoints }} 分 ", state.projectId,period, type); - console.log('我是查询榜单传递的数据',{ + console.log("projectId----->", state.projectId, period, type); + console.log("我是查询榜单传递的数据", { projectId: state.projectId, // 项目id name: "", // 名字,没有则传空字符串 - startTime: state.rankStartTime?state.rankStartTime:0, // 数据查询的起始时间 10位时间戳 - endTime: state.rankEndTime?state.rankEndTime:0, + startTime: state.rankStartTime ? state.rankStartTime : 0, // 数据查询的起始时间 10位时间戳 + endTime: state.rankEndTime ? state.rankEndTime : 0, size: 10, // 前多少名 type: Number(state.valuestu3), // 查询类型 0 学员积分榜 1 小组积分榜 - }) + }); let obj = { projectId: 290, // 项目id name: "", // 名字,没有则传空字符串 - startTime: state.rankStartTime?state.rankStartTime:0, // 数据查询的起始时间 10位时间戳 - endTime: state.rankEndTime?state.rankEndTime:0, + startTime: state.rankStartTime ? state.rankStartTime : 0, // 数据查询的起始时间 10位时间戳 + endTime: state.rankEndTime ? state.rankEndTime : 0, size: 10, // 前多少名 type: Number(state.valuestu3), // 查询类型 0 学员积分榜 1 小组积分榜 }; - + api .scoreRank(obj) .then((res) => { console.log("获取项目积分-榜单", res); - if(res.data.code==200){ + if (res.data.code == 200) { state.datascore = res.data.data; state.datascoreg = res.data.data; state.xuefentabledata = res.data.data; state.scoreRankLoading = false; - }else{ + } else { state.datascore = []; state.datascoreg = []; state.xuefentabledata = []; @@ -2848,7 +2854,7 @@ export default { .catch((err) => { console.log("获取项目积分-榜单失败", err); message.destroy(); - message.error('榜单获取失败'); + message.error("榜单获取失败"); state.datascore = []; state.datascoreg = []; state.xuefentabledata = []; @@ -2861,29 +2867,31 @@ export default { state.processRankLoading = true; let obj = { projectId: 290, // 项目id - startTime: state.rankStartTime?state.rankStartTime:0, // 数据查询的起始时间 10位时间戳 - endTime: state.rankEndTime?state.rankEndTime:0, + startTime: state.rankStartTime ? state.rankStartTime : 0, // 数据查询的起始时间 10位时间戳 + endTime: state.rankEndTime ? state.rankEndTime : 0, stageId: state.valuestu2, // 阶段ID type: Number(state.valuestu3), // 查询类型 0 学员积分榜 1 小组积分榜 - } + }; - console.log('我是获取得项目进度排行榜--》', obj) - api.completionRank(obj).then(res=>{ - console.log('项目进度榜单获取',res) - if(res.data.datas){ - state.jindutabledata = res.data.datas; - state.processRankLoading = false; - }else{ + console.log("我是获取得项目进度排行榜--》", obj); + api + .completionRank(obj) + .then((res) => { + console.log("项目进度榜单获取", res); + if (res.data.datas) { + state.jindutabledata = res.data.datas; + state.processRankLoading = false; + } else { + state.jindutabledata = []; + state.processRankLoading = false; + } + }) + .catch((err) => { + console.log(err); state.jindutabledata = []; state.processRankLoading = false; - } - - }).catch(err=>{ - console.log(err) - state.jindutabledata = []; - state.processRankLoading = false; - }) - } + }); + }; // 排行榜 - end @@ -2948,27 +2956,30 @@ export default { } } levelList.stageList = res.data.data.stageList; - - if(levelList.stageList.length==1){ + + if (levelList.stageList.length == 1) { // 无解段任务 - state.rankjieduan = [{value:0, label:'无阶段'}]; + state.rankjieduan = [{ value: 0, label: "无阶段" }]; state.valuestu2 = 0; - }else{ + } else { // 有阶段任务 - let arrStage = [] - for(let i=0; i', res.data.data.stageList) + console.log( + "----------------------------------->", + res.data.data.stageList + ); //暂时传个固定的id用 到时候看数据里面是否有在更换 // state.projectTaskId = res.data.data.stageList[0].taskList[0].projectTaskId @@ -3221,13 +3232,13 @@ export default { }; //考试管理的抽屉 const showTest = (name, id, data) => { - if(data.startTime==null && data.endTime==null){ + if (data.startTime == null && data.endTime == null) { // 外部考试抽屉显示 state.TMvisibleExternal = true; state.examData = data; state.showTestText = name; state.projectTaskId = id; - }else{ + } else { // 系统考试抽屉显示 state.TMvisible = true; state.examData = data; @@ -3633,7 +3644,6 @@ export default { scoreRank(); // 获取项目进度排行榜 completionRank(); - } else if (e == 3) { state.tabFlag = true; } else { @@ -3641,8 +3651,8 @@ export default { state.tabFlag = false; } - if(e!=7){ -state.ischeckCertificate=false + if (e != 7) { + state.ischeckCertificate = false; } console.log("切换了", state.tabFlag); }; @@ -4578,8 +4588,205 @@ state.ischeckCertificate=false return typeRules[type]; }; + // 判断当前任务已结束及时间意义上的结束 提示用户 + function judgeTaskIsEnd(type, endTimes, status) { + // type 任务类型 endTime 结束时间 status 任务状态 (状态 0 未完成 1 已完成 2 未开始 3 已结束) + console.log(type, endTimes, status); + let isEnd = false; + let nowTime = new Date().getTime(); + let endTime = new Date().getTime(endTimes); + switch (type) { + case 1: + status == 3 + ? (isEnd = true) + : nowTime > endTime + ? (isEnd = true) + : (isEnd = false); + break; + case 3: + status == 3 + ? (isEnd = true) + : nowTime > endTime + ? (isEnd = true) + : (isEnd = false); + break; + case 5: + status == 3 + ? (isEnd = true) + : nowTime > endTime + ? (isEnd = true) + : (isEnd = false); + break; + case 7: + status == 3 + ? (isEnd = true) + : nowTime > endTime + ? (isEnd = true) + : (isEnd = false); + break; + case 10: + status == 3 + ? (isEnd = true) + : nowTime > endTime + ? (isEnd = true) + : (isEnd = false); + break; + } + return isEnd; + } //显示二维码弹窗 const showCodeModel = (item) => { + if (judgeTaskIsEnd(item.type, state.endTime, state.status)) { + message.error("当前任务已结束"); + return; + } + console.log("item", item); + let codeUrl = ""; + // 在线课 停用 -- 暂时没有在线课停用标记 + if (item.type == 1) { + if (item.taskStatus == 1 || item.taskStatus == 2) + return message.error("该任务无法学习,请联系管理员进行替换。"); + window.open( + window.location.protocol + + import.meta.env.VITE_BOE_ONLINE_CLASS_URL + + item.targetId, + "_top" + ); + } + if (item.type == 2) { + let date1 = new Date(item.endTime).getTime(); + let date2 = new Date().getTime(); + if (date1 < date2) return message.warning("当前面授课已结束"); + if (item.taskStatus == 1 || item.taskStatus == 2) + return message.error("该任务无法学习,请联系管理员进行替换。"); + codeUrl = + window.location.protocol + + process.env.VUE_APP_H5 + + "/externalexam?courseId=" + + item.courseId; + } + + if (item.type == 4) { + let date1 = new Date(item.endTime).getTime(); + let date2 = new Date().getTime(); + if (date1 < date2) return message.warning("当前作业已结束"); + codeUrl = + window.location.protocol + + process.env.VUE_APP_H5 + + "/homeworkpage?courseId=" + + item.courseId + + "&type=1&id=" + + item.projectTaskId; + } + // 考试 停用 + if (item.type == 5) { + if (item.taskStatus == 1 || item.taskStatus == 2) + return message.error("该任务无法学习,请联系管理员进行替换。"); + // 此处判断外部考试跳转 + if (item.startTime == null || item.endTime == null) { + codeUrl = + window.location.protocol + + process.env.VUE_APP_H5 + + "/externalexam?courseId=" + + item.courseId; + } + } + // 直播结束时间 + if (item.type == 6) { + let date1 = new Date(item.endTime).getTime(); + let date2 = new Date().getTime(); + if (date1 < date2) return message.warning("当前直播已结束"); + codeUrl = + window.location.protocol + + process.env.VUE_APP_H5 + + "/livebroadcast?courseId=" + + item.courseId + + "&type=1&id=" + + item.projectTaskId; + } + // 外链 + if (item.type == 7) { + codeUrl = + window.location.protocol + + process.env.VUE_APP_H5 + + "/outerchain?courseId=" + + item.courseId + + "&type=1&id=" + + item.projectTaskId + + "&status=" + + item.status + + "&chapterOrStageId=" + + item.stageId + + "&infoId=" + + state.projectId; + } + //讨论 + if (item.type == 8) { + codeUrl = + window.location.protocol + + process.env.VUE_APP_H5 + + "/discusspage?courseId=" + + item.courseId + + "&type=1&id=" + + item.projectTaskId; + } + //活动 + if (item.type == 9) { + let date1 = new Date(item.endTime).getTime(); + let date2 = new Date().getTime(); + if (date1 < date2) return message.warning("当前活动已结束"); + codeUrl = + window.location.protocol + + process.env.VUE_APP_H5 + + "/activitiespage?courseId=" + + item.courseId + + "&type=1&id=" + + item.projectTaskId; + } + //活动 + if (item.type == 10) { + codeUrl = + window.location.protocol + + process.env.VUE_APP_H5 + + "/evaluation?courseId=" + + item.courseId + + "&evaType=" + + item.evaType + + "&targetId=" + + item.targetId; + } + + // 评估 停用 + if (item.type == 11) { + if (item.taskStatus == 1 || item.taskStatus == 2) + return message.error("该任务无法学习,请联系管理员进行替换。"); + codeUrl = + window.location.protocol + + process.env.VUE_APP_H5 + + "/investigatage?courseId=" + + item.courseId + + "&type=1&id=" + + item.projectTaskId + + "&chapterOrStageId=" + + item.stageId + + "&infoId=" + + state.projectId; + } + // 投票 + if (item.type == 12) { + codeUrl = + window.location.protocol + + process.env.VUE_APP_H5 + + "/ballotpage?courseId=" + + item.courseId + + "&btype=2&id=" + + item.projectTaskId + + "&chapterOrStageId=" + + item.chapterId + + "&infoId=" + + state.projectId; + } + state.codevisible = true; let obj = { title: "[" + checkType(item.type) + "]二维码", @@ -4594,7 +4801,7 @@ state.ischeckCertificate=false let obj = { title: "[项目]二维码", name: state.name, - url: codeUrl, + // url: codeUrl, }; state.codeInfo = obj; }; @@ -4821,7 +5028,6 @@ state.ischeckCertificate=false completionRank, jdSelectChange, jdSelectChange1, - }; }, }; From 759e0e7316a9e583db701a1d65c4905786ad06a3 Mon Sep 17 00:00:00 2001 From: wyx Date: Thu, 9 Feb 2023 16:45:48 +0800 Subject: [PATCH 03/16] =?UTF-8?q?feat:=E5=A2=9E=E5=8A=A0=E9=A1=B9=E7=9B=AE?= =?UTF-8?q?-=E6=8E=92=E8=A1=8C=E6=A6=9C-=E5=AD=A6=E6=97=B6=E6=8E=92?= =?UTF-8?q?=E8=A1=8C=E6=A6=9C=E6=95=B0=E6=8D=AE=E6=8E=A5=E5=85=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/index1.js | 2 + src/views/projectcenter/TaskPage.vue | 125 +++++++++++++-------------- 2 files changed, 60 insertions(+), 67 deletions(-) diff --git a/src/api/index1.js b/src/api/index1.js index 9c103b32..574be75b 100644 --- a/src/api/index1.js +++ b/src/api/index1.js @@ -91,6 +91,8 @@ export const editLearnInfo = (obj) => http.post('/admin/router/editInfo', obj) export const scoreRank = (params) => http.get('/points/top/list', { params }) // 项目进度排行 export const completionRank = (params) => http.get('/stu/project/rank_list/completion_list', { params }) +// 项目学时排行榜 +export const studytimeRank = (params) => http.get('/stu/project/rank_list/study_time_list', { params }) //排行榜 export const billboard = (obj) => http.post("/admin/project/billboard", obj); //项目基础信息----------------------------------- diff --git a/src/views/projectcenter/TaskPage.vue b/src/views/projectcenter/TaskPage.vue index fe36f710..61fd6582 100644 --- a/src/views/projectcenter/TaskPage.vue +++ b/src/views/projectcenter/TaskPage.vue @@ -955,6 +955,7 @@
@@ -965,7 +966,7 @@ { - if (text.record.rank == "1") { + if (text.record.index == "1") { return ( ); - } else if (text.record.rank == "2") { + } else if (text.record.index == "2") { return ( ); - } else if (text.record.rank == "3") { + } else if (text.record.index == "3") { return ( ); } else { - return
{text.record.rank}
; + return
{text.record.index}
; } }, }, @@ -2624,8 +2574,8 @@ export default { { title: "时长", - dataIndex: "jd", - key: "jd", + dataIndex: "timeStr", + key: "timeStr", width: 50, align: "center", className: "h", @@ -2806,6 +2756,10 @@ export default { console.log(e) completionRank(); } + const xsSelectChange = (e) => { + console.log(e) + studytimeRank(); + } //项目积分榜单 const scoreRank = (period, type) => { state.scoreRankLoading = true; @@ -2821,7 +2775,7 @@ export default { type: Number(state.valuestu3), // 查询类型 0 学员积分榜 1 小组积分榜 }) let obj = { - projectId: 290, // 项目id + projectId: state.projectId, // 项目id name: "", // 名字,没有则传空字符串 startTime: state.rankStartTime?state.rankStartTime:0, // 数据查询的起始时间 10位时间戳 endTime: state.rankEndTime?state.rankEndTime:0, @@ -2860,7 +2814,7 @@ export default { const completionRank = () => { state.processRankLoading = true; let obj = { - projectId: 290, // 项目id + projectId: state.projectId, // 项目id startTime: state.rankStartTime?state.rankStartTime:0, // 数据查询的起始时间 10位时间戳 endTime: state.rankEndTime?state.rankEndTime:0, stageId: state.valuestu2, // 阶段ID @@ -2885,6 +2839,34 @@ export default { }) } + // 项目学时榜单 + const studytimeRank = () => { + state.studytimeRankLoading = true; + let obj = { + projectId: state.projectId, // 项目id + startTime: state.rankStartTime?state.rankStartTime:0, // 数据查询的起始时间 10位时间戳 + endTime: state.rankEndTime?state.rankEndTime:0, + type: Number(state.valuestu4), // 查询类型 0 学员积分榜 1 小组积分榜 + } + + console.log('我是获取得项目学时排行榜--》', obj) + api.studytimeRank(obj).then(res=>{ + console.log('项目学时榜单获取',res) + if(res.data.datas){ + state.xueshitabledata = res.data.datas; + state.studytimeRankLoading = false; + }else{ + state.xueshitabledata = []; + state.studytimeRankLoading = false; + } + + }).catch(err=>{ + console.log(err) + state.xueshitabledata = []; + state.studytimeRankLoading = false; + }) + } + // 排行榜 - end const levelList = reactive({ @@ -3633,6 +3615,8 @@ export default { scoreRank(); // 获取项目进度排行榜 completionRank(); + // 获取学时排行榜 + studytimeRank(); } else if (e == 3) { state.tabFlag = true; @@ -3690,6 +3674,8 @@ state.ischeckCertificate=false scoreRank(); // 获取项目进度排行榜 completionRank(); + // 获取学时排行榜 + studytimeRank(); }; //重置 const rankReset = () => { @@ -3702,6 +3688,8 @@ state.ischeckCertificate=false scoreRank(); // 获取项目进度排行榜 completionRank(); + // 获取学时排行榜 + studytimeRank(); }; // end -----排行榜----------------排行榜----------------------排行榜-----------排行榜---------- @@ -4822,6 +4810,9 @@ state.ischeckCertificate=false jdSelectChange, jdSelectChange1, + studytimeRank, + xsSelectChange + }; }, }; From 5082b756a405cb99cacfdd176d80dc637b0daea9 Mon Sep 17 00:00:00 2001 From: wyx Date: Thu, 9 Feb 2023 17:36:22 +0800 Subject: [PATCH 04/16] =?UTF-8?q?fix:=E9=A1=B9=E7=9B=AE/=E8=B7=AF=E5=BE=84?= =?UTF-8?q?=E5=9B=BE-=E4=BD=9C=E4=B8=9A=E7=AE=A1=E7=90=86-=E6=88=90?= =?UTF-8?q?=E7=BB=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/drawers/project/ProjectHomeWorkManage.vue | 2 +- src/components/drawers/router/RouterHomeworkManage.vue | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/drawers/project/ProjectHomeWorkManage.vue b/src/components/drawers/project/ProjectHomeWorkManage.vue index 7634364a..96ab145c 100644 --- a/src/components/drawers/project/ProjectHomeWorkManage.vue +++ b/src/components/drawers/project/ProjectHomeWorkManage.vue @@ -347,7 +347,7 @@ export default {
{text.record.workScore || text.record.workScore == 0 - ? text.record.workScore + ? text.record.workScore < 0 ?"-":text.record.workScore : "-"}
diff --git a/src/components/drawers/router/RouterHomeworkManage.vue b/src/components/drawers/router/RouterHomeworkManage.vue index 7c2cb826..4c102d35 100644 --- a/src/components/drawers/router/RouterHomeworkManage.vue +++ b/src/components/drawers/router/RouterHomeworkManage.vue @@ -341,7 +341,7 @@ export default {
{text.record.workScore || text.record.workScore == 0 - ? text.record.workScore + ? text.record.workScore < 0 ?"-":text.record.workScore : "-"}
From 89ab60f743aa29580a78b783a33b155219635ebc Mon Sep 17 00:00:00 2001 From: wyx Date: Thu, 9 Feb 2023 18:07:26 +0800 Subject: [PATCH 05/16] =?UTF-8?q?fix:=E9=A1=B9=E7=9B=AE/=E8=B7=AF=E5=BE=84?= =?UTF-8?q?=E5=9B=BE-=E5=AD=A6=E5=91=98=E6=9F=A5=E7=9C=8B-=E5=B7=B2?= =?UTF-8?q?=E8=8E=B7=E8=AF=81=E4=B9=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/drawers/CheckStu.vue | 9 ++++----- src/components/drawers/SeeStu.vue | 9 ++++----- src/views/learningpath/LevelCheck.vue | 3 +-- 3 files changed, 9 insertions(+), 12 deletions(-) diff --git a/src/components/drawers/CheckStu.vue b/src/components/drawers/CheckStu.vue index 56d52bae..5c286b41 100644 --- a/src/components/drawers/CheckStu.vue +++ b/src/components/drawers/CheckStu.vue @@ -47,20 +47,19 @@ /{{pro.totalReqCnt}}
- +
{{ pro.name }}
diff --git a/src/components/drawers/SeeStu.vue b/src/components/drawers/SeeStu.vue index 3c073df3..64c4df78 100644 --- a/src/components/drawers/SeeStu.vue +++ b/src/components/drawers/SeeStu.vue @@ -48,22 +48,21 @@ /{{ totalReqCnt }}
- +
{{ name }}
diff --git a/src/views/learningpath/LevelCheck.vue b/src/views/learningpath/LevelCheck.vue index dd17d536..e6a07608 100644 --- a/src/views/learningpath/LevelCheck.vue +++ b/src/views/learningpath/LevelCheck.vue @@ -61,8 +61,7 @@
From 63641d55b7303d4e4f28cda765eeab7e494df870 Mon Sep 17 00:00:00 2001 From: wyx Date: Fri, 10 Feb 2023 11:53:38 +0800 Subject: [PATCH 06/16] =?UTF-8?q?feat:=E5=A2=9E=E5=8A=A0=E5=A4=96=E9=83=A8?= =?UTF-8?q?=E8=80=83=E8=AF=95=E8=80=83=E8=AF=95=E6=88=90=E7=BB=A9=E5=AF=BC?= =?UTF-8?q?=E5=85=A5=EF=BC=8C=E5=A2=9E=E5=8A=A0=E5=86=85=E9=83=A8=E8=80=83?= =?UTF-8?q?=E8=AF=95=E5=A4=96=E9=83=A8=E8=80=83=E8=AF=95=E5=88=9B=E5=BB=BA?= =?UTF-8?q?=E6=97=B6=E5=8F=82=E6=95=B0=E5=8C=BA=E5=88=86=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/drawers/AddTest.vue | 24 ++++++++++++-------- src/components/drawers/ExportAchievement.vue | 2 +- 2 files changed, 16 insertions(+), 10 deletions(-) diff --git a/src/components/drawers/AddTest.vue b/src/components/drawers/AddTest.vue index e1ee545c..cbde5a74 100644 --- a/src/components/drawers/AddTest.vue +++ b/src/components/drawers/AddTest.vue @@ -689,7 +689,7 @@ export default { } // 新建外部考试 CreateExternalExam(state.test1).then( async res=>{ - console.log(res) + console.log('新建外部考试返回的参数',res) // 添加更新到任务 await updateTask1(res); }).catch(err=>{ @@ -711,6 +711,7 @@ export default { return message.warning("请先选中关卡"); } let editObj1 = { + examType: 1, chapterId: props.isactive, duration: res.data.data.examinationDuration, courseId: res.data.data.examinationId, @@ -732,6 +733,7 @@ export default { }); } else if (props.isLevel == 2) { let editObj = { + examType: 1, courseId: res.data.data.examinationId, duration: res.data.data.examinationDuration, name: res.data.data.examinationName, @@ -753,6 +755,7 @@ export default { }); } else if (props.isLevel == 3) { addTempTask({ + examType: 1, courseId: res.data.data.examinationId, duration: res.data.data.examinationDuration, name: res.data.data.examinationName, @@ -775,9 +778,9 @@ export default { }; // 外部考试 const updateTask1 = (res) => { - state.EditTestId = res.data.data.externalId; + state.EditTestId = res.data.data.examinationId; if (props.faceLevel) { - state.EditTestId = res.data.data.externalId; + state.EditTestId = res.data.data.examinationId; state.paperName = ""; closeDrawer(); } else { @@ -787,9 +790,10 @@ export default { return message.warning("请先选中关卡"); } let editObj1 = { + examType: 2, chapterId: props.isactive, - courseId: res.data.data.externalId, - name: res.data.data.externalName, + courseId: res.data.data.examinationId, + name: res.data.data.examinationName, routerId: props.routerId, routerTaskId: props.routerTaskId || 0, type: 5, @@ -807,8 +811,9 @@ export default { }); } else if (props.isLevel == 2) { let editObj = { - courseId: res.data.data.externalId, - name: res.data.data.externalName, + examType: 2, + courseId: res.data.data.examinationId, + name: res.data.data.examinationName, projectId: props.projectId, projectTaskId: props.projectTaskId || 0, stageId: props.chooseStageId || 0, @@ -827,8 +832,9 @@ export default { }); } else if (props.isLevel == 3) { addTempTask({ - courseId: res.data.data.externalId, - name: res.data.data.externalName, + examType: 2, + courseId: res.data.data.examinationId, + name: res.data.data.examinationName, projectTemplateId: props.projectTemplateId, projectTaskId: props.projectTaskId || 0, stageId: props.chooseStageId || 0, diff --git a/src/components/drawers/ExportAchievement.vue b/src/components/drawers/ExportAchievement.vue index e00e50ff..50a60742 100644 --- a/src/components/drawers/ExportAchievement.vue +++ b/src/components/drawers/ExportAchievement.vue @@ -235,7 +235,7 @@ const state = reactive({ fileType: ["xls", "xlsx"], importScore: - process.env.VUE_APP_BASE_API + "/admin/external/exam/manage/importExternalExamScore", + process.env.VUE_APP_BASE_API + "/admin/external/exam/manage/ImportExternalScore", uploadpercent: -1, uploadErr: false, //上传失败 addLoading: false, From 962f55dee58e100dda881afa6d75e1f51131fe3d Mon Sep 17 00:00:00 2001 From: wyx Date: Fri, 10 Feb 2023 17:07:33 +0800 Subject: [PATCH 07/16] =?UTF-8?q?fix:=E5=A4=96=E9=83=A8=E8=80=83=E8=AF=95?= =?UTF-8?q?=E5=AF=BC=E5=85=A5=E6=88=90=E7=BB=A9=E5=8F=82=E6=95=B0=E8=B0=83?= =?UTF-8?q?=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/drawers/ExportAchievement.vue | 23 ++++++++++--------- .../project/ProjectExternalExamManage.vue | 12 ++++++++-- .../RouterExaminationExternalManage.vue | 11 +++++++-- 3 files changed, 31 insertions(+), 15 deletions(-) diff --git a/src/components/drawers/ExportAchievement.vue b/src/components/drawers/ExportAchievement.vue index 50a60742..efe4e941 100644 --- a/src/components/drawers/ExportAchievement.vue +++ b/src/components/drawers/ExportAchievement.vue @@ -37,7 +37,7 @@ :showUploadList="false" :data="{ type: type, - targetId: Number(id), + targetId: Number(targetId), chapterId:chapterId, taskId:taskId }" @@ -250,6 +250,7 @@ template: process.env.VUE_APP_UP_LOAD_STUDENT_SCORE_TEMPLATE }); const closeDrawer = () => { + ctx.emit("closeDraw",true); ctx.emit("update:eScorevisibleExternalExternal", false); state.fileList = []; state.uploadpercent = -1; @@ -286,6 +287,13 @@ if (status === "done") { state.fileName = info.file.name; let i = 0; + let timeouts = setTimeout(() => { + clearInterval(timer) + state.addLoading = false; + message.destroy(); + message.error(`文件导入超时`); + }, 30000); + let timer = setInterval(() => { let uid = info.file.response.data; api @@ -306,25 +314,18 @@ state.downloadErrUrl = res.data.data.url; console.log("props.getStudent", props.getStudent); clearInterval(timer); + clearTimeout(timeouts); } - }else{ - state.addLoading = false; - message.destroy(); - message.error(`文件导入超时`); } }) .catch((err) => { state.addLoading = false; clearInterval(timer); + clearTimeout(timeouts); console.log("查询导入状态失败", err); }); }, 500); - setTimeout(() => { - clearInterval(timer) - state.addLoading = false; - message.destroy(); - message.error(`文件导入超时`); - }, 30000); + } else if (status === "error") { state.uploadErr = true; message.error(`${info.file.name}上传失败`); diff --git a/src/components/drawers/project/ProjectExternalExamManage.vue b/src/components/drawers/project/ProjectExternalExamManage.vue index 0c803a56..cdeb5c3d 100644 --- a/src/components/drawers/project/ProjectExternalExamManage.vue +++ b/src/components/drawers/project/ProjectExternalExamManage.vue @@ -116,10 +116,11 @@
@@ -368,6 +369,7 @@ // 获取数据 function getData() { + state.loadingData = true; api.QueryExternalExamManageDetail({ chapterId: props.datasource.stageId, pageNo: state.currentPage, @@ -410,6 +412,11 @@ window.open(`${process.env.VUE_APP_BASE_API}/admin/external/exam/manage/exportExternalExam?chapterId=${props.datasource.stageId}&type=${2}&targetId=${props.datasource.projectId}&taskId=${props.datasource.projectTaskId}`) } + const closeDraw = (e) => { + console.log('我关闭了导入成绩弹框吗', e) + getData(); + } + return { ...toRefs(state), selectProjectName, @@ -422,7 +429,8 @@ searchTableData, reseatTableData, changePaginationStu, - exportData + exportData, + closeDraw }; }, }; diff --git a/src/components/drawers/router/RouterExaminationExternalManage.vue b/src/components/drawers/router/RouterExaminationExternalManage.vue index 6a88cf5b..69c05627 100644 --- a/src/components/drawers/router/RouterExaminationExternalManage.vue +++ b/src/components/drawers/router/RouterExaminationExternalManage.vue @@ -115,10 +115,11 @@
@@ -368,9 +369,14 @@ const clearLine = () => { state.selectedRowKeys = []; }; + const closeDraw = (e) => { + console.log('我关闭了导入成绩弹框吗', e) + getData(); + } // 获取数据 function getData() { + state.loadingData = true; api.QueryExternalExamManageDetail({ chapterId: props.datasource.chapterId, pageNo: state.currentPage, @@ -425,7 +431,8 @@ searchTableData, reseatTableData, changePaginationStu, - exportData + exportData, + closeDraw }; }, }; From 1b4bb2b5eeda7934f7e09434af6be8497754ca52 Mon Sep 17 00:00:00 2001 From: wyx Date: Fri, 10 Feb 2023 17:55:42 +0800 Subject: [PATCH 08/16] =?UTF-8?q?feat:=E5=A2=9E=E5=8A=A0=E5=86=85=E9=83=A8?= =?UTF-8?q?=E8=80=83=E8=AF=95=EF=BC=8C=E5=A4=96=E9=83=A8=E8=80=83=E8=AF=95?= =?UTF-8?q?=E7=BC=96=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/indexExam.js | 4 +- src/components/drawers/AddTest.vue | 167 +++++++++++++++------- src/views/learningpath/LevelAddDetail.vue | 8 +- src/views/projectcenter/TaskAdd.vue | 10 +- 4 files changed, 121 insertions(+), 68 deletions(-) diff --git a/src/api/indexExam.js b/src/api/indexExam.js index 9f3bdbeb..8ecca77d 100644 --- a/src/api/indexExam.js +++ b/src/api/indexExam.js @@ -22,4 +22,6 @@ export const queryExaminationAloneExtendList = (obj) => http.post('/examination/ // 对接三方考试任务保存接口-三方 export const examinationTaskSave = (obj) => http.post('/examination/examinationTaskSave', obj); //编辑考试信息 -export const updateExamination = (obj) => http.post('/examination/updateExamination', obj); \ No newline at end of file +export const updateExamination = (obj) => http.post('/examination/updateExamination', obj); +//编辑外部考试信息 +export const updateExternalExam = (obj) => http.post('/external/exam/updateExternalExam', obj); diff --git a/src/components/drawers/AddTest.vue b/src/components/drawers/AddTest.vue index cbde5a74..3a0a1803 100644 --- a/src/components/drawers/AddTest.vue +++ b/src/components/drawers/AddTest.vue @@ -17,21 +17,44 @@
- - +
+ + + +
+
+ + + +
+
@@ -366,6 +389,8 @@ import {message} from "ant-design-vue"; import { createExamination, queryExaminationDetailById, + updateExamination, + updateExternalExam } from "@/api/indexExam"; // updateExamination, import STest from "./SelectTest.vue"; @@ -496,6 +521,12 @@ export default { scoringModel: 2, questionArrangement: 4, }; + + state.test1 = { + externalName: '', + source: '', + externalExplain: null + } }; const closeDrawer = () => { @@ -522,7 +553,7 @@ export default { console.log("props", props); if (props.addtestVisible && props.EditTestId && props.EditTestId >0) { // 该页面显示同时 edit为true 时,发送查询请求, - // queryTest(); + queryTest(); } if (bool) { state.test.showAnswers = 1; @@ -541,22 +572,36 @@ export default { const queryTest = () => { queryExaminationDetailById({examinationId: props.EditTestId}) .then((res) => { - state.test = res.data.data; - state.test.showAnswers = Number(state.test.showAnswers); - state.test.showAnalysis = Number(state.test.showAnalysis); - state.test.scoringModel = Number(state.test.scoringModel); - state.test.questionArrangement = Number( - state.test.questionArrangement - ); - state.test.chooseTime = [ - dayjs(res.data.data.examinationStartTime, "YYYY-MM-DD HH:mm"), - dayjs(res.data.data.examinationEndTime, "YYYY-MM-DD HH:mm"), - ]; - state.paperName = state.test.examinationTestName; - // state.paperId=dayjs - state.paperId = state.test.examinationTestId; + console.log(res) + // 判断获取的考试 + if(res.data.data.examType==2){ + state.isOuter = 2; + // 外部考试 + state.test1 = { + externalName: res.data.data.examinationName, + source: res.data.data.source, + externalExplain: res.data.data.examinationExplain + } + }else{ + // 系统考试 + state.isOuter = 1; + state.test = res.data.data; + state.test.showAnswers = Number(state.test.showAnswers); + state.test.showAnalysis = Number(state.test.showAnalysis); + state.test.scoringModel = Number(state.test.scoringModel); + state.test.questionArrangement = Number( + state.test.questionArrangement + ); + state.test.chooseTime = [ + dayjs(res.data.data.examinationStartTime, "YYYY-MM-DD HH:mm"), + dayjs(res.data.data.examinationEndTime, "YYYY-MM-DD HH:mm"), + ]; + state.paperName = state.test.examinationTestName; + // state.paperId=dayjs + state.paperId = state.test.examinationTestId; - console.log("querytest", state.test); + console.log("querytest", state.test); + } }) .catch(() => { //message.error(`查询失败`); @@ -630,18 +675,18 @@ export default { - // if (props.EditTestId > 0) { - // // 编辑任务 - // updateExamination(state.test) - // .then(async (res) => { - // await updateTask(res); - // // closeDrawer(); - // }) - // .catch(() => { - // message.destroy(); - // message.error(`编辑失败`); - // }); - // } else { + if (props.EditTestId > 0) { + // 编辑任务 + updateExamination(state.test) + .then(async (res) => { + await updateTask(res); + // closeDrawer(); + }) + .catch(() => { + message.destroy(); + message.error(`编辑失败`); + }); + } else { // 创建任务 createExamination(state.test) .then(async (res) => { @@ -652,7 +697,7 @@ export default { message.destroy(); message.error(`创建失败`); }); - // } + } }else{ // 创建外部考试 console.log('我是点了外部考试') @@ -687,14 +732,34 @@ export default { } } - // 新建外部考试 - CreateExternalExam(state.test1).then( async res=>{ - console.log('新建外部考试返回的参数',res) - // 添加更新到任务 - await updateTask1(res); - }).catch(err=>{ - console.log(err) - }) + + if (props.EditTestId > 0) { + console.log('我要开始编辑外部考试任务了 啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊') + let obj = { + examinationId:props.EditTestId, + examinationName:state.test1.externalName, + examinationExplain:state.test1.externalExplain, + source:state.test1.source + } + updateExternalExam(obj) + .then(async (res) => { + await updateTask1(res); + // closeDrawer(); + }) + .catch(() => { + message.destroy(); + message.error(`编辑失败`); + }); + }else{ + // 新建外部考试 + CreateExternalExam(state.test1).then( async res=>{ + console.log('新建外部考试返回的参数',res) + // 添加更新到任务 + await updateTask1(res); + }).catch(err=>{ + console.log(err) + }) + } } }; // 系统考试 diff --git a/src/views/learningpath/LevelAddDetail.vue b/src/views/learningpath/LevelAddDetail.vue index fdf0686d..03cf16c0 100644 --- a/src/views/learningpath/LevelAddDetail.vue +++ b/src/views/learningpath/LevelAddDetail.vue @@ -545,7 +545,7 @@ ">
- 编辑 - - 删除 diff --git a/src/views/projectcenter/TaskAdd.vue b/src/views/projectcenter/TaskAdd.vue index a8543b6f..1444fbd3 100644 --- a/src/views/projectcenter/TaskAdd.vue +++ b/src/views/projectcenter/TaskAdd.vue @@ -507,7 +507,7 @@ ">
- 编辑 - - 删除 From 5aa26b6f37da47903a7743ddd0846c080658706a Mon Sep 17 00:00:00 2001 From: wyx Date: Fri, 10 Feb 2023 18:14:41 +0800 Subject: [PATCH 09/16] =?UTF-8?q?style:=E7=B3=BB=E7=BB=9F=E8=80=83?= =?UTF-8?q?=E8=AF=95=E7=BC=96=E8=BE=91=E4=BB=85=E8=83=BD=E7=BC=96=E8=BE=91?= =?UTF-8?q?=E8=80=83=E8=AF=95=E5=BC=80=E5=A7=8B=E5=92=8C=E7=BB=93=E6=9D=9F?= =?UTF-8?q?=E6=97=B6=E9=97=B4=E8=AE=BE=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/drawers/AddTest.vue | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/src/components/drawers/AddTest.vue b/src/components/drawers/AddTest.vue index 3a0a1803..65f4d923 100644 --- a/src/components/drawers/AddTest.vue +++ b/src/components/drawers/AddTest.vue @@ -71,6 +71,7 @@
选择试卷:
-
- + {{ paperName }} @@ -145,6 +146,7 @@
允许重复考试: -
@@ -241,6 +247,7 @@
@@ -259,6 +266,7 @@
@@ -279,6 +287,7 @@
From 0a6c3151a6f8c5f9f1646200d45deeb255f4bfc1 Mon Sep 17 00:00:00 2001 From: wyx Date: Fri, 10 Feb 2023 19:20:54 +0800 Subject: [PATCH 10/16] =?UTF-8?q?fix:=E5=A4=96=E9=83=A8=E8=80=83=E8=AF=95?= =?UTF-8?q?=E4=BB=BB=E5=8A=A1=E7=8A=B6=E6=80=81=E5=88=A4=E6=96=AD=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/drawers/project/ProjectExternalExamManage.vue | 2 +- .../drawers/router/RouterExaminationExternalManage.vue | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/drawers/project/ProjectExternalExamManage.vue b/src/components/drawers/project/ProjectExternalExamManage.vue index cdeb5c3d..dde5557c 100644 --- a/src/components/drawers/project/ProjectExternalExamManage.vue +++ b/src/components/drawers/project/ProjectExternalExamManage.vue @@ -321,7 +321,7 @@ align: "center", ellipsis: true, className: "h", - customRender: ({record:{status}}) => ({0:'未开始',1:'进行中',9:'已完成'}[status] || '未开始'), + customRender: ({record:{status}}) => ({0:'未开始',1:'进行中',null:'进行中',2:'已完成'}[status] || '未开始'), }, ], loadingData: true diff --git a/src/components/drawers/router/RouterExaminationExternalManage.vue b/src/components/drawers/router/RouterExaminationExternalManage.vue index 69c05627..6decdfec 100644 --- a/src/components/drawers/router/RouterExaminationExternalManage.vue +++ b/src/components/drawers/router/RouterExaminationExternalManage.vue @@ -325,7 +325,7 @@ align: "center", ellipsis: true, className: "h", - customRender: ({record:{status}}) => ({0:'未开始',1:'进行中',9:'已完成'}[status] || '未开始'), + customRender: ({record:{status}}) => ({0:'未开始',1:'进行中',null:'进行中',2:'已完成'}[status] || '未开始'), }, ], loadingData: true From 319cb31c68e961791455644d8eac43e913ec9188 Mon Sep 17 00:00:00 2001 From: lixg Date: Sat, 11 Feb 2023 11:21:17 +0800 Subject: [PATCH 11/16] =?UTF-8?q?feat:=E4=BF=AE=E6=94=B9=E9=9D=A2=E6=8E=88?= =?UTF-8?q?=E8=AF=BE=E8=B7=B3=E8=BD=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/learningpath/LevelAdd.vue | 6 ++++-- src/views/projectcenter/TaskPage.vue | 4 ++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/views/learningpath/LevelAdd.vue b/src/views/learningpath/LevelAdd.vue index 03741470..6037764d 100644 --- a/src/views/learningpath/LevelAdd.vue +++ b/src/views/learningpath/LevelAdd.vue @@ -2597,8 +2597,10 @@ export default { codeUrl = window.location.protocol + process.env.VUE_APP_H5 + - "/externalexam?courseId=" + - item.courseId; + "/faceteach?type=2&courseId=" + + item.courseId + + "&id=" + + item.projectTaskId; } if (item.type == 4) { diff --git a/src/views/projectcenter/TaskPage.vue b/src/views/projectcenter/TaskPage.vue index b550b071..cfbfb9a3 100644 --- a/src/views/projectcenter/TaskPage.vue +++ b/src/views/projectcenter/TaskPage.vue @@ -4662,8 +4662,8 @@ export default { codeUrl = window.location.protocol + process.env.VUE_APP_H5 + - "/externalexam?courseId=" + - item.courseId; + "/faceteach?type=2&courseId=" + + item.courseId+'&id='+ item.projectTaskId; } if (item.type == 4) { From b20462b2bb4a7170dabfe7a88278848b6ca9f58c Mon Sep 17 00:00:00 2001 From: quhongwei <1632078442@qq.com> Date: Sun, 12 Feb 2023 18:38:51 +0800 Subject: [PATCH 12/16] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/projectcenter/ProjectManage.vue | 28 +++++++++++------------ 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/src/views/projectcenter/ProjectManage.vue b/src/views/projectcenter/ProjectManage.vue index 513bf238..808a66ee 100644 --- a/src/views/projectcenter/ProjectManage.vue +++ b/src/views/projectcenter/ProjectManage.vue @@ -100,10 +100,10 @@ 编辑 创建子项目 创建班级 - 提交审核 - 撤回审核 + 提交审核 + 撤回审核 发布 - 撤回发布 + 撤回发布 管理 权限名单 @@ -111,10 +111,10 @@ 管理权 - 复制 - 删除 - 存为模版 - 结束 + 复制 + 删除 + 存为模版 + 结束 撤回 @@ -1200,9 +1200,9 @@ export default { state.stopModal = false; }; //打开删除弹窗 - const showDeleteModal = (projectId) => { + const showDeleteModal = (id) => { state.deleteModal = true; - state.deleteProjectId = projectId; + state.deleteProjectId = id; }; //确认删除 const deleteProject = () => { @@ -1463,7 +1463,7 @@ export default { if (data && data.length) { data.forEach((e) => { e.parentName = parentName; - e.key = e.projectId; + e.key = e.id; initDataSublist( (parentName ? parentName + "——" : "") + e.name, e.subList @@ -1480,7 +1480,7 @@ export default { router.push({ path: "/projectadd", query: { - projectId: record.projectId, + projectId: record.id, parentId: record.parentId, parentName: record.parentName, }, @@ -1595,7 +1595,7 @@ export default { function createSub(record){ state.projectInfo = { parentName: record.name, - parentId: record.projectId, + parentId: record.id, name: "", sourceBelongId: record.sourceBelongId, sourceBelongName: record.sourceBelongName, @@ -1611,7 +1611,7 @@ export default { router.push({ path: "/projectadd", query: { - parentId: record.projectId, + parentId: record.id, parentName: record.parentName + "——" + record.name, ptojectType: 3, } @@ -1621,7 +1621,7 @@ export default { function baseInfo(record){ router.push({ path: "/taskpage", - query: { projectId: record.projectId }, + query: { projectId: record.id }, }); storage.set("projectId", record.projectId); } From 6d5ad2474b2c987a9ac4e309a5e8566f9b51a801 Mon Sep 17 00:00:00 2001 From: yuping <82253452@qq.com> Date: Sun, 12 Feb 2023 19:02:06 +0800 Subject: [PATCH 13/16] =?UTF-8?q?--demand=20=E5=AD=97=E5=85=B8=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/App.vue | 30 +- src/api/index1.js | 2 +- src/components/project/ProjectLevel.vue | 6 +- src/components/project/TrainClass.vue | 7 +- .../student/OnlineClassModelStudent.vue | 604 ++++++++++++++++++ src/views/courselibrary/CoursewareManage.vue | 65 +- src/views/courselibrary/OnlineManage.vue | 94 ++- src/views/courselibrary/courseModal.vue | 212 +----- src/views/learningpath/LearningPath.vue | 24 +- src/views/projectcenter/ProjectAdd.vue | 6 +- 10 files changed, 703 insertions(+), 347 deletions(-) create mode 100644 src/components/student/OnlineClassModelStudent.vue diff --git a/src/App.vue b/src/App.vue index 7fd4f129..01712ba0 100644 --- a/src/App.vue +++ b/src/App.vue @@ -52,17 +52,14 @@ function beforeunloadHandler() { function init() { getUserInfo(); - initDict("faceclassPic"); - initDict("faceclassClass"); - initDict("faceclassScene"); - initDict("projectLevel"); - initDict("projectSys"); - initDict("pathmapPic"); - initDict("projectClass"); - initDict("projectPic"); - initDict("sysType"); getMemberInfo(); getUserPermission(); + initDict("content_type"); //内容分类 + initDict("project_level"); //项目级别 + initDict("project_sys"); //培训分类 + initDict("project_pic"); //项目封面 + initDict("router_pic"); //路径图封面 + initDict("course_pic"); //课程封面 } function unloadHandler() { @@ -91,17 +88,8 @@ async function getUserInfo() { store.commit("SET_USER", userInfo.data.data); } -async function initDict(key, localStory = false) { - let list; - if (localStory) { - list = localStorage.getItem(key); - if (list) { - store.commit("SET_DICT", {key, data: JSON.parse(list)}); - return; - } - } - list = await getDictList(key); - localStory && localStorage.setItem(key, JSON.stringify(list)); +async function initDict(key) { + const list = await getDictList(key); store.commit("SET_DICT", {key, data: list}); } @@ -111,7 +99,7 @@ function getUserPermission(){ }) } -const getDictList = (param) => api1.getDictTree({setCode: param,}).then((res) => res.data.data); +const getDictList = (param) => api1.getDictTree({code: param,}).then((res) => res.data.data); \ No newline at end of file diff --git a/src/views/courselibrary/CoursewareManage.vue b/src/views/courselibrary/CoursewareManage.vue index d86f25bd..45fdfd80 100644 --- a/src/views/courselibrary/CoursewareManage.vue +++ b/src/views/courselibrary/CoursewareManage.vue @@ -51,8 +51,8 @@ tree-default-expand-all :fieldNames="{ children: 'children', - label: 'dictName', - value: 'dictCode', + label: 'name', + value: 'code', }" :tree-data="sysTypeOptions" > @@ -2712,7 +2712,7 @@ export default defineComponent({ state.viewpowervisible = true; }; - const sysTypeOptions = computed(() => store.state.sysType); + const sysTypeOptions = computed(() => store.state.content_type); // console.log('12344', sysTypeOptions) @@ -3211,63 +3211,6 @@ export default defineComponent({ //获取分类、场景、封面图、-----------字典配置------------------------------- const optionsUrl = ref([]); - const getDictList = (param) => { - let obj = { - pageNo: 1, - pageSize: 10000, - setCode: param, - }; - api1 - .getDict(obj) - .then((res) => { - console.log("获取字典成功", res); - if (res.data.code === 200) { - if (param === "faceclassPic") { - let arr = res.data.data.rows; - let newArr = []; - arr.forEach((item) => { - newArr.push({ - value: item.dictValue, - label: item.dictName, - }); - }); - optionsUrl.value = newArr; - // if (res.data.data.rows.length > 0) { - // state.imageUrl = res.data.data.rows[0].dictValue; - // } - } - if (param === "faceclassClass") { - // let arr = res.data.data.rows; - // let newArr = []; - // arr.forEach((item) => { - // newArr.push({ - // value: item.dictCode, - // label: item.dictName, - // }); - // }); - // console.log(newArr) - options2.value = state.options2222; - } - if (param === "faceclassScene") { - let arr = res.data.data.rows; - let newArr = []; - arr.forEach((item) => { - newArr.push({ - value: item.dictCode, - label: item.dictName, - }); - }); - options3.value = newArr; - } - } - }) - .catch((err) => { - console.log("获取字典失败", err); - }); - }; - getDictList("faceclassClass"); - getDictList("faceclassScene"); - getDictList("faceclassPic"); //获取分类、场景、封面图、----------------字典配置--------------------------- //渲染学员管理操作 @@ -3584,8 +3527,6 @@ export default defineComponent({ state.qdms_inputV1 = state.xzinputV1; state.xzinputV1 = ""; - console.log("qdms_inputV1", state.qdms_inputV1); - getDictList("faceclassPic"); getTea(); } if (state.bs_hs && state.valueE1 == 1) { diff --git a/src/views/courselibrary/OnlineManage.vue b/src/views/courselibrary/OnlineManage.vue index ebf0e321..ef046e8c 100644 --- a/src/views/courselibrary/OnlineManage.vue +++ b/src/views/courselibrary/OnlineManage.vue @@ -7,10 +7,10 @@ * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE --> - - - - + .btn2 { + cursor: pointer; + width: 100px; + height: 40px; + background: #4ea6ff; + border-radius: 8px; + border: 0; + margin-left: 15px; + color: #fff; + } +} + \ No newline at end of file diff --git a/src/views/courselibrary/courseModal.vue b/src/views/courselibrary/courseModal.vue index e2b7ebf7..32d6bde1 100644 --- a/src/views/courselibrary/courseModal.vue +++ b/src/views/courselibrary/courseModal.vue @@ -85,7 +85,7 @@
+ :alt="item.name" @click="choicePic(item.value)" />
@@ -894,13 +894,13 @@ export default { }; const chooseImg = (item) => { console.log(item); - state.pathBgId = item.dictCode; - state.pathBg = item.dictValue; + state.pathBgId = item.code; + state.pathBg = item.value; }; const chooseImg2 = (item) => { // console.log(item); - state.pathBgId = item.dictCode; - state.pathBg = item.dictValue; + state.pathBgId = item.code; + state.pathBg = item.value; }; //发布弹窗 const showPub = (router) => { @@ -1502,7 +1502,7 @@ export default { // state.imgData = ; // } }); - const imgData = computed(() => store.state.pathmapPic); + const imgData = computed(() => store.state.router_pic); //添加权限 watch( () => state.addAuthList, diff --git a/src/views/projectcenter/ProjectAdd.vue b/src/views/projectcenter/ProjectAdd.vue index abbab9fa..16410465 100644 --- a/src/views/projectcenter/ProjectAdd.vue +++ b/src/views/projectcenter/ProjectAdd.vue @@ -362,9 +362,9 @@ export default { state.projectInfo.picUrl = value; }; onMounted(() => { - state.projectPic = store.state.projectPic.map((e) => ({ - value: e.dictValue, - label: e.dictName, + state.projectPic = store.state.project_pic.map((e) => ({ + value: e.value, + label: e.name, })); state.viewDetail = routers.query.viewDetail; getProjectInfo(); From 727fd1578da5542f6e6b1595e755600de5f94074 Mon Sep 17 00:00:00 2001 From: lixg Date: Sun, 12 Feb 2023 19:44:22 +0800 Subject: [PATCH 14/16] =?UTF-8?q?feat:=E5=A2=9E=E5=8A=A0=E5=B0=8F=E7=BB=84?= =?UTF-8?q?=E5=AF=BC=E5=85=A5=E5=AF=BC=E5=87=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/index1.js | 6 +- src/api/indexProjStu.js | 6 +- src/components/drawers/ExportAchievement.vue | 1165 +++++++++-------- src/components/drawers/MemberList.vue | 50 +- .../drawers/project/ImpoterGroupLeader.vue | 652 +++++++++ src/components/student/ChangeGroupModal.vue | 50 +- src/views/projectcenter/TaskPage.vue | 133 +- 7 files changed, 1402 insertions(+), 660 deletions(-) create mode 100644 src/components/drawers/project/ImpoterGroupLeader.vue diff --git a/src/api/index1.js b/src/api/index1.js index 574be75b..e618b57a 100644 --- a/src/api/index1.js +++ b/src/api/index1.js @@ -2,7 +2,7 @@ * @Author: lixg lixg@dongwu-inc.com * @Date: 2022-11-04 22:45:31 * @LastEditors: lixg lixg@dongwu-inc.com - * @LastEditTime: 2023-02-09 09:36:11 + * @LastEditTime: 2023-02-11 16:22:43 * @FilePath: /fe-manage/src/api/index1.js * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE */ @@ -220,3 +220,7 @@ export const updateStuCert = (obj) => http.post('/admin/certificate/updateStuCer // 外部考试导入成绩 export const ImportExternalExamScore = (obj) => http.post('/admin/external/exam/manage/importExternalExamScore', obj, { headers: { "Content-Type": "multipart/form-data" } }) +//分组 +export const changeGroupByStudentId = (obj) => http.post('/admin/student/changeGroupByStudentId', obj) +//导入小组 +export const importGroup = (uuid) => http.post('/admin/studentGroup/importGroup/{pid}', { params: { uuid: uuid } }) \ No newline at end of file diff --git a/src/api/indexProjStu.js b/src/api/indexProjStu.js index 87b495e2..115388a0 100644 --- a/src/api/indexProjStu.js +++ b/src/api/indexProjStu.js @@ -2,7 +2,7 @@ * @Author: lixg lixg@dongwu-inc.com * @Date: 2022-11-18 14:09:43 * @LastEditors: lixg lixg@dongwu-inc.com - * @LastEditTime: 2022-12-05 15:27:36 + * @LastEditTime: 2023-02-11 18:55:44 * @FilePath: /fe-manage/src/api/indexProjStu.js * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE */ @@ -42,4 +42,6 @@ export const setScoreRule = (obj) => http.post('/admin/project/setScoreRule', ob export const studentScoreList = (obj) => http.post('/admin/project/studentScoreList', obj) //添加项目学员 -export const addStudent = (obj) => http.post('/admin/project/addStudent', obj) \ No newline at end of file +export const addStudent = (obj) => http.post('/admin/project/addStudent', obj) +//获取组员名单 +export const groupMemberList = (obj) => http.post('/admin/studentGroup/groupMemberList', obj) \ No newline at end of file diff --git a/src/components/drawers/ExportAchievement.vue b/src/components/drawers/ExportAchievement.vue index efe4e941..3e081c19 100644 --- a/src/components/drawers/ExportAchievement.vue +++ b/src/components/drawers/ExportAchievement.vue @@ -1,653 +1,654 @@ +
+ +
+ +
+ + + }; + + //上传文件 + const handleChange = (info) => { + if (info) { + var FileExt = info.file.name.replace(/.+\./, ""); + if (["xls", "xlsx"].indexOf(FileExt.toLowerCase()) === -1) { + state.fileList = []; + state.uploadpercent = -1; + message.destroy(); + message.error("请上传正确的文件格式"); + return; + } + } + + state.addLoading = true; + state.uploadpercent = parseInt(info.file.percent); + console.log("我是文件上传的进度---------->", info.file.percent); + const status = info.file.status; + if (status !== "uploading") { + // console.log(info.file, info.fileList); + } + if (status === "done") { + state.fileName = info.file.name; + let i = 0; + let timeouts = setTimeout(() => { + clearInterval(timer); + state.addLoading = false; + message.destroy(); + message.error(`文件导入超时`); + }, 30000); + + let timer = setInterval(() => { + let uid = info.file.response.data; + api + .getImportStatus(uid) + .then((res) => { + console.log("查询导入状态", res); + if (res.data.code === 200) { + if (res.data.data.status !== "START") { + i++; + if (i === 1) { + message.destroy(); + message.success(`${info.file.name}上传成功`); + state.addLoading = false; + props.searchTaskList && props.searchTaskList(); + } + state.succNum = res.data.data.successNum; + state.errNum = res.data.data.failedNum; + state.downloadErrUrl = res.data.data.url; + console.log("props.getStudent", props.getStudent); + clearInterval(timer); + clearTimeout(timeouts); + } + } + }) + .catch((err) => { + state.addLoading = false; + clearInterval(timer); + clearTimeout(timeouts); + console.log("查询导入状态失败", err); + }); + }, 500); + } else if (status === "error") { + state.uploadErr = true; + message.error(`${info.file.name}上传失败`); + } + }; + const beforeUpload = (file) => { + return new Promise((resolve, reject) => { + // const isJpgOrPng = + // file.name.indexOf(".xlsx") !== "-1" || + // file.name.indexOf(".xls") !== "-1"; + + // if (!isJpgOrPng) { + // message.destroy(); + // message.error("仅支持xls、xlsx格式!"); + // return reject(false); + // } + const formData = new FormData(); + formData.append("uploadFile", file); + // let progress = { percent: 1 }; + + // const intervalId = setInterval(() => { + // if (progress.percent < 100) { + // progress.percent++; + // file.onProgress(progress); + // } else { + // clearInterval(intervalId); + // } + // }, 100); + api.batchImportScore(formData).then((res) => { + if (res.data.code === 200) { + console.log("上传成功", res); + return reject(true); + } + }); + return reject(false); + }); + }; + const handleUpload = (e) => { + console.log("handleUpload", e); + }; + + //删除 + const removeUpload = () => { + state.fileList = []; + state.uploadpercent = -1; + state.uploadErr = false; //上传失败 + state.succNum = 0; + state.errNum = 0; + state.downloadErrUrl = null; + state.addLoading = false; + }; + // 下载失败数据 + const downloadEeeorData = () => { + if (state.downloadErrUrl !== "") { + window.open(process.env.VUE_APP_FILE_PATH + state.downloadErrUrl); + } + }; + function downTemplate() { + console.log(state.locationHref + state.template); + window.open(state.locationHref + state.template); + } + + return { + ...toRefs(state), + afterVisibleChange, + closeDrawer, + handleChange, + downTemplate, + BATCH_IMPORT_SCORE, + beforeUpload, + handleUpload, + removeUpload, + downloadEeeorData, + }; + }, +}; + +} + \ No newline at end of file diff --git a/src/components/drawers/MemberList.vue b/src/components/drawers/MemberList.vue index 3475b8ba..8bfa6830 100644 --- a/src/components/drawers/MemberList.vue +++ b/src/components/drawers/MemberList.vue @@ -81,11 +81,11 @@ onChange: onSelectChange, }" /> - +
import { toRefs, reactive } from "vue"; // import StuAdd from "./StuAdd.vue"; -import { getProjStu, removeGroupStudent } from "../../api/indexProjStu"; +import { + // getProjStu, + removeGroupStudent, + groupMemberList, +} from "../../api/indexProjStu"; import { toDate } from "../../api/method"; import { message } from "ant-design-vue"; import AddGroupMembers from "./AddGroupMembers.vue"; @@ -232,21 +236,21 @@ export default { className: "h", }, // { - // title: "岗位", - // dataIndex: "gangw", - // key: "gangw", - // width: 60, - // align: "center", - // className: "h", + // title: "岗位", + // dataIndex: "gangw", + // key: "gangw", + // width: 60, + // align: "center", + // className: "h", // }, // { - // title: "进度", - // dataIndex: "progress", - // key: "progress", - // width: 60, - // align: "center", - // className: "h", - // }, + // title: "进度", + // dataIndex: "progress", + // key: "progress", + // width: 60, + // align: "center", + // className: "h", + // }, { title: "操作", dataIndex: "operations", @@ -330,8 +334,7 @@ export default { gangw: value.userInfoBo.jobName, //岗位 completeStageCnt: value.completeStageCnt, //当前完成阶段数 totalStageCnt: value.totalStageCnt, //总阶段数 - progress: value.completeStageCnt + "/" + value.totalStageCnt, - + progress: value.completeStageCnt + "/" + value.totalStageCnt, stutime: toDate(value.beginStudyTime / 1000, "Y-M-D"), //开始学习时间 }; @@ -339,20 +342,17 @@ export default { }); state.tabledata = array; }; - //获取学员列表 + //获取组员列表 const getStu = (obj) => { let objf = obj || { - deptIds: [], //部门 - groupName: "", - name: "", + studentName: "", pageNo: state.currentPage, pageSize: 10, - projectId: props.projectId, - topFlag: "", + pid: props.projectId, groupId: props.chooseGroupId, //暂时写死 }; state.tableDataTotal = -1; - getProjStu(objf).then((res) => { + groupMemberList(objf).then((res) => { console.log(res.data.data, "获取学员列表"); if (res.data.code === 200) { state.total = res.data.data.total; diff --git a/src/components/drawers/project/ImpoterGroupLeader.vue b/src/components/drawers/project/ImpoterGroupLeader.vue new file mode 100644 index 00000000..f5eb9355 --- /dev/null +++ b/src/components/drawers/project/ImpoterGroupLeader.vue @@ -0,0 +1,652 @@ + + + + + \ No newline at end of file diff --git a/src/components/student/ChangeGroupModal.vue b/src/components/student/ChangeGroupModal.vue index 316ace72..47374414 100644 --- a/src/components/student/ChangeGroupModal.vue +++ b/src/components/student/ChangeGroupModal.vue @@ -2,7 +2,7 @@ * @Author: lixg lixg@dongwu-inc.com * @Date: 2022-12-20 17:00:37 * @LastEditors: lixg lixg@dongwu-inc.com - * @LastEditTime: 2023-01-31 16:14:39 + * @LastEditTime: 2023-02-11 15:06:13 * @FilePath: /fe-manage/src/components/student/ChangeLevelModal.vue * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE --> @@ -28,11 +28,12 @@
@@ -58,7 +59,8 @@ diff --git a/src/views/projectcenter/TaskPage.vue b/src/views/projectcenter/TaskPage.vue index 16bf5ef4..4d61e645 100644 --- a/src/views/projectcenter/TaskPage.vue +++ b/src/views/projectcenter/TaskPage.vue @@ -725,7 +725,7 @@ {{ record.topFlag ? "取消优秀" : "优秀学员" }} - 换组 @@ -761,10 +761,10 @@ 随机分组
-
+
导出小组
-
+
导入小组长
@@ -806,7 +806,7 @@ @click="showMemberList(item.projectGroupId)" >
组员名单 >
-
+
@@ -1676,6 +1676,24 @@ />
+
+
+ +
+
组员人数:
+
+ +
+
- + + + +