From 577b3b5dc2af77cd748fa4cc4c8cf361aaa7fa53 Mon Sep 17 00:00:00 2001 From: Pengxiansen <2422914688@qq.com> Date: Sat, 1 Mar 2025 01:03:22 +0800 Subject: [PATCH 1/8] =?UTF-8?q?=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/growthpath.js | 2 +- src/api/indexOvervoew.js | 2 +- src/views/report/Operational.vue | 2 +- src/views/report/Overvoew.vue | 63 ++++++-- src/views/report/growthpathmap.vue | 222 ++++++++++++----------------- 5 files changed, 148 insertions(+), 143 deletions(-) diff --git a/src/api/growthpath.js b/src/api/growthpath.js index 526ec549..aaf46d06 100644 --- a/src/api/growthpath.js +++ b/src/api/growthpath.js @@ -87,7 +87,7 @@ export const taskCompletionRate = (growthId) => http.get('/professional/manageme export const getStudyStatisticsList = (data) => http.post('/professional/statics/getStudyStatisticsList', data) // 专业力列表 -export const boeuGrowthPlatePageList = (obj) => http.post('/boeu/growth/pageList', obj) +export const boeuGrowthPlatePageList = (obj) => http.post('/boeu/grow/pageList', obj) // 是否按顺序学习 diff --git a/src/api/indexOvervoew.js b/src/api/indexOvervoew.js index 4230c132..f73cd516 100644 --- a/src/api/indexOvervoew.js +++ b/src/api/indexOvervoew.js @@ -32,4 +32,4 @@ export const boeuCasePlatePageList = (obj) => http.post('/boeu/case/pageList', o // 专业力列表 -export const boeuGrowthPlatePageList = (obj) => http.post('/boeu/growth/pageList', obj) \ No newline at end of file +export const boeuGrowthPlatePageList = (obj) => http.post('/boeu/grow/pageList', obj) \ No newline at end of file diff --git a/src/views/report/Operational.vue b/src/views/report/Operational.vue index aedf7211..56129bd4 100644 --- a/src/views/report/Operational.vue +++ b/src/views/report/Operational.vue @@ -68,7 +68,7 @@
学习情况
-
+
导出学习情况
diff --git a/src/views/report/Overvoew.vue b/src/views/report/Overvoew.vue index b6bd7ba6..1de67b98 100644 --- a/src/views/report/Overvoew.vue +++ b/src/views/report/Overvoew.vue @@ -8,7 +8,7 @@ @@ -17,7 +17,7 @@ @@ -460,7 +460,19 @@ export default { if (!state.selectedRowKeys?.length) { return message.warning("请至少选择一条数据进行导出"); } else { - if (state.currentTab === 5) { + if (state.currentTab === 6) { + axios({ + method: "get", + url: "/report/boeu/grow/export", + params: { ids: `${state.selectedRowKeys}` }, + responseType: "blob", + headers: { + token: Cookies.get("token"), + }, + }).then((res) => { + downLoad(res.data, "专业力必修.xlsx"); + }); + } else if (state.currentTab === 5) { axios({ method: "get", url: "/report/boeu/case/export", @@ -537,7 +549,32 @@ export default { }; // 全部导出接口 const exportClickAll = async () => { - if (state.currentTab === 5) { + if (state.currentTab === 6) { + axios({ + method: "post", + url: "/report/boeu/grow/exportAll", + data: { + startTime: + typeof state.publishTime[0] === "undefined" + ? null + : state.publishTime[0] + " 00:00:01", + endTime: + typeof state.publishTime[1] === "undefined" + ? null + : state.publishTime[1] + " 23:59:59", + qualsLevelDesr: state.qualsLevelDesr, + stdPositionDesr: state.stdPositionDesr, + page: state.pageNo, + size: state.pageSize, + }, + responseType: "blob", + headers: { + token: Cookies.get("token"), + }, + }).then((res) => { + downLoad(res.data, "专业力必修.xlsx"); + }); + } else if (state.currentTab === 5) { axios({ method: "post", url: "/report/boeu/case/exportAll", @@ -1670,15 +1707,15 @@ export default { ]; } else if (index === 6) { columns.value = [ - { - title: "专业力必修", - dataIndex: "growthName", - key: "growthName", - width: 200, - ellipsis: true, - align: "center", - fixed: "left", - }, + // { + // title: "专业力必修", + // dataIndex: "growthName", + // key: "growthName", + // width: 200, + // ellipsis: true, + // align: "center", + // fixed: "left", + // }, { title: "标准岗位名称", dataIndex: "stdPositionDesr", diff --git a/src/views/report/growthpathmap.vue b/src/views/report/growthpathmap.vue index 91aa65e9..d2364d6e 100644 --- a/src/views/report/growthpathmap.vue +++ b/src/views/report/growthpathmap.vue @@ -48,7 +48,7 @@
- +
- `${((comLearnNum / learnNum) * 100).toFixed()}%`, + learnNum && `${((comLearnNum / learnNum) * 100).toFixed()}%`, }, { title: "发布时间", @@ -252,7 +250,7 @@ export default { ellipsis: true, key: "publishTime", align: "center", - width: 120, + width: 140, }, { title: "发布状态", @@ -270,38 +268,38 @@ export default { ellipsis: true, key: "createTime", align: "center", - width: 120, + width: 140, + }, + { + title: "操作", + dataIndex: "operation", + key: "operation", + width: 200, + align: "center", + fixed: "right", + customRender: ({ record }) => { + return ( +
+ { + oneCurrentExport(record); + }} + > + 导出学习记录 + +
+ ); + }, }, - // { - // title: "操作", - // dataIndex: "operation", - // key: "operation", - // width: 200, - // align: "center", - // fixed: "right", - // customRender: (record) => { - // return ( - //
- // { - // oneCurrentExport(record); - // }} - // > - // 导出学习记录 - // - //
- // ); - // }, - // }, ]); // 导出当前数据 const oneCurrentExport = (record) => { axios({ - method: "post", - url: "/report/boeu/router/exportCurrentRecord", - data: { routerId: `${record.record.boeRouterInfoId}` }, + method: "get", + url: "/report/boeu/grow/exportGrowth", + params: { ids: `${record.id}` }, responseType: "blob", headers: { token: Cookies.get("token"), @@ -357,103 +355,73 @@ export default { }; //导出详细信息 const exportbtnz = async () => { - if (state.selectedRowKeys?.length > 0) { - axios({ - method: "post", - url: "/report/boeu/router/exportCurrentRecord", - data: { routerIdList: state.selectedRowKeys }, - responseType: "blob", - headers: { - token: Cookies.get("token"), - }, - }).then((res) => { - downLoad(res.data, "专业力详细信息.xlsx"); - }), - (err) => { - message.error(err); - }; - } else { - const params = { - createName: state.createName, - // publishTime: state.publishTime, - startTime: - typeof state.publishTime[0] === "undefined" - ? null - : state.publishTime[0] + " 00:00:01", - endTime: - typeof state.publishTime[1] == "undefined" - ? null - : state.publishTime[1] + " 23:59:59", - routerName: state.routerName, - orgId: state.orgId ? state.orgId[state.orgId.length - 1] : null, - }; - axios({ - method: "post", - url: "/report/boeu/router/exportCurrentRecord", - data: params, - responseType: "blob", - headers: { - token: Cookies.get("token"), - }, - }).then((res) => { - if (res.data.status && res.data.status == 600) { - message.error(res.data.status); - } else { - downLoad(res.data, "专业力必修详细信息.xlsx"); - } - }), - (err) => { - message.error(err); - }; + if (!state.selectedRowKeys?.length) { + message.warning("请选择要导出的数据"); + return; } + const params = { + pageNum: state.pageNum, + pageSize: state.pageSize, + stdPositionDesr: state.stdPositionDesr, + qualsLevelDesr: state.qualsLevelDesr, + isPublished: state.isPublished, + ids: state.selectedRowKeys.toString(), + startTime: + typeof state.publishTime[0] === "undefined" + ? null + : state.publishTime[0] + " 00:00:01", + endTime: + typeof state.publishTime[1] == "undefined" + ? null + : state.publishTime[1] + " 23:59:59", + }; + axios({ + method: "get", + url: "/report/boeu/grow/exportGrowth", + params, + responseType: "blob", + headers: { + token: Cookies.get("token"), + }, + }).then((res) => { + downLoad(res.data, "专业力详细信息.xlsx"); + }), + (err) => { + message.error(err); + }; }; // 导出列表信息 const exportAllbtnz = async () => { - if (state.selectedRowKeys?.length > 0) { - axios({ - method: "post", - url: "/report/boeu/router/exportList", - data: { routerIdList: state.selectedRowKeys }, - responseType: "blob", - headers: { - token: Cookies.get("token"), - }, - }).then((res) => { - downLoad(res.data, "专业力必修列表信息.xlsx"); - }), - (err) => { - message.error(err); - }; - } else { - const params = { - createName: state.createName, - // publishTime: state.publishTime, - startTime: - typeof state.publishTime[0] === "undefined" - ? null - : state.publishTime[0] + " 00:00:01", - endTime: - typeof state.publishTime[1] == "undefined" - ? null - : state.publishTime[1] + " 23:59:59", - routerName: state.routerName, - orgId: state.orgId ? state.orgId[state.orgId.length - 1] : null, + const params = { + pageNum: state.pageNum, + pageSize: state.pageSize, + stdPositionDesr: state.stdPositionDesr, + qualsLevelDesr: state.qualsLevelDesr, + isPublished: state.isPublished, + ids: state.selectedRowKeys.toString(), + startTime: + typeof state.publishTime[0] === "undefined" + ? null + : state.publishTime[0] + " 00:00:01", + endTime: + typeof state.publishTime[1] == "undefined" + ? null + : state.publishTime[1] + " 23:59:59", + }; + axios({ + method: "post", + url: "/report/boeu/grow/exportGrowthAll", + data: params, + responseType: "blob", + headers: { + token: Cookies.get("token"), + }, + }).then((res) => { + downLoad(res.data, "专业力必修信息.xlsx"); + }), + (err) => { + message.error(err); }; - axios({ - method: "post", - url: "/report/boeu/router/exportList", - data: params, - responseType: "blob", - headers: { - token: Cookies.get("token"), - }, - }).then((res) => { - downLoad(res.data, "专业力必修信息.xlsx"); - }), - (err) => { - message.error(err); - }; - } }; onMounted(() => { state.tableLoading = true; From 05b5f4bea4c310aa8eab16148aa101f6a794db6a Mon Sep 17 00:00:00 2001 From: Pengxiansen <2422914688@qq.com> Date: Sat, 1 Mar 2025 01:27:27 +0800 Subject: [PATCH 2/8] =?UTF-8?q?=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/report/growthpathmap.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/views/report/growthpathmap.vue b/src/views/report/growthpathmap.vue index d2364d6e..b94cf8a1 100644 --- a/src/views/report/growthpathmap.vue +++ b/src/views/report/growthpathmap.vue @@ -226,7 +226,7 @@ export default { align: "center", width: 90, customRender: ({ record: { learningRatio } }) => - `${learningRatio * 100}%`, + learningRatio ? `${learningRatio * 100}%` : "0%", }, { title: "完成人数", From c1fc617b7d6c4094fea44759d98d20d099e1235b Mon Sep 17 00:00:00 2001 From: gengxin Date: Mon, 3 Mar 2025 18:57:04 +0800 Subject: [PATCH 3/8] =?UTF-8?q?=E5=AF=BC=E5=87=BA=E8=AF=A6=E7=BB=86?= =?UTF-8?q?=E5=AD=A6=E4=B9=A0=E8=AE=B0=E5=BD=95=20-=20loading=20=E6=9B=B4?= =?UTF-8?q?=E6=94=B9=202?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/utils/zipdownload.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/utils/zipdownload.js b/src/utils/zipdownload.js index 727a9ae9..f3cd5b84 100644 --- a/src/utils/zipdownload.js +++ b/src/utils/zipdownload.js @@ -6,8 +6,8 @@ const mimeMap = { xlsx: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', zip: 'application/zip' } -export function downLoadXlsx(str, filename) { - axios({ +export async function downLoadXlsx(str, filename) { + await axios({ method: 'get', url: str, responseType: 'blob', From ac2b6078075c1200442a3104b575b0cb5e693b71 Mon Sep 17 00:00:00 2001 From: gengxin Date: Mon, 3 Mar 2025 19:11:05 +0800 Subject: [PATCH 4/8] =?UTF-8?q?=E5=AF=BC=E5=87=BA=E8=AF=A6=E7=BB=86?= =?UTF-8?q?=E5=AD=A6=E4=B9=A0=E8=AE=B0=E5=BD=95=20-=20loading=20=E6=9B=B4?= =?UTF-8?q?=E6=94=B9=203?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../student/OnlineClassModelStudent.vue | 15 +++++---------- src/utils/zipdownload.js | 3 +++ 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/src/components/student/OnlineClassModelStudent.vue b/src/components/student/OnlineClassModelStudent.vue index b420fb4f..1fc7811f 100644 --- a/src/components/student/OnlineClassModelStudent.vue +++ b/src/components/student/OnlineClassModelStudent.vue @@ -92,7 +92,7 @@ - 导出详细学习记录 @@ -330,19 +330,14 @@ function reset() { function exportStu() { window.open(`${process.env.VUE_APP_BASE_API}/admin/student/exportOnlineStudent?type=3&&thirdType=8&pid=${searchParams.value.pid}`); } -const exportDisabled = ref(false); -const exportStudy = async () => { +const exportStudyLoading = ref(false) + +const exportStudy = () => { if(studentList.value.length == 0){ return message.warning('暂无可导出的学习记录') } - exportDisabled.value = true; - console.log("开始执行 gx 刷新"); - try { - await downLoadXlsx(`${process.env.VUE_APP_BASE_API}/admin/student/exportOnlineStudentDetail?type=4&&thirdType=8&pid=${searchParams.value.pid}`,'在线课学员学习记录'); - } finally { - exportDisabled.value = false; - } + const {loading: exportStudyLoading} = downLoadXlsx(`${process.env.VUE_APP_BASE_API}/admin/student/exportOnlineStudentDetail?type=4&&thirdType=8&pid=${searchParams.value.pid}`,'在线课学员学习记录'); } defineExpose({ searchStu, diff --git a/src/utils/zipdownload.js b/src/utils/zipdownload.js index f3cd5b84..661ffc5b 100644 --- a/src/utils/zipdownload.js +++ b/src/utils/zipdownload.js @@ -7,6 +7,7 @@ const mimeMap = { zip: 'application/zip' } export async function downLoadXlsx(str, filename) { + const loading = ref(true); await axios({ method: 'get', url: str, @@ -14,7 +15,9 @@ export async function downLoadXlsx(str, filename) { headers: { 'Authorization': 'Bearer ' + getCookieForName("token") } }).then(res => { resolveBlob(res, mimeMap.xlsx,filename) + loading.value = false; }) + return {loading}; } const baseUrl = process.env.VUE_APP_ACT_API export function downLoadZip(str, filename) { From 1ad9677c52bab7184dac24e81588b33f80734573 Mon Sep 17 00:00:00 2001 From: gengxin Date: Mon, 3 Mar 2025 19:15:27 +0800 Subject: [PATCH 5/8] =?UTF-8?q?=E5=AF=BC=E5=87=BA=E8=AF=A6=E7=BB=86?= =?UTF-8?q?=E5=AD=A6=E4=B9=A0=E8=AE=B0=E5=BD=95=20-=20loading=20=E6=9B=B4?= =?UTF-8?q?=E6=94=B9=203?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/student/OnlineClassModelStudent.vue | 10 +++------- src/utils/zipdownload.js | 8 ++------ 2 files changed, 5 insertions(+), 13 deletions(-) diff --git a/src/components/student/OnlineClassModelStudent.vue b/src/components/student/OnlineClassModelStudent.vue index 1fc7811f..c6ed39aa 100644 --- a/src/components/student/OnlineClassModelStudent.vue +++ b/src/components/student/OnlineClassModelStudent.vue @@ -92,8 +92,7 @@ - + 导出详细学习记录 @@ -330,14 +329,11 @@ function reset() { function exportStu() { window.open(`${process.env.VUE_APP_BASE_API}/admin/student/exportOnlineStudent?type=3&&thirdType=8&pid=${searchParams.value.pid}`); } - -const exportStudyLoading = ref(false) - -const exportStudy = () => { +function exportStudy() { if(studentList.value.length == 0){ return message.warning('暂无可导出的学习记录') } - const {loading: exportStudyLoading} = downLoadXlsx(`${process.env.VUE_APP_BASE_API}/admin/student/exportOnlineStudentDetail?type=4&&thirdType=8&pid=${searchParams.value.pid}`,'在线课学员学习记录'); + downLoadXlsx(`${process.env.VUE_APP_BASE_API}/admin/student/exportOnlineStudentDetail?type=4&&thirdType=8&pid=${searchParams.value.pid}`,'在线课学员学习记录') } defineExpose({ searchStu, diff --git a/src/utils/zipdownload.js b/src/utils/zipdownload.js index 661ffc5b..55d06244 100644 --- a/src/utils/zipdownload.js +++ b/src/utils/zipdownload.js @@ -1,23 +1,19 @@ import axios from 'axios' -import {ref} from 'vue' import {getCookieForName} from "@/api/method"; const mimeMap = { xlsx: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', zip: 'application/zip' } -export async function downLoadXlsx(str, filename) { - const loading = ref(true); - await axios({ +export function downLoadXlsx(str, filename) { + axios({ method: 'get', url: str, responseType: 'blob', headers: { 'Authorization': 'Bearer ' + getCookieForName("token") } }).then(res => { resolveBlob(res, mimeMap.xlsx,filename) - loading.value = false; }) - return {loading}; } const baseUrl = process.env.VUE_APP_ACT_API export function downLoadZip(str, filename) { From d083222c8f648dbd0dfdfed6153c87414a9d5c2c Mon Sep 17 00:00:00 2001 From: gengxin Date: Tue, 4 Mar 2025 13:29:41 +0800 Subject: [PATCH 6/8] =?UTF-8?q?=E5=AE=A1=E6=89=B9=E4=B8=AD=E5=BF=832?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/lecturer/OrganizationApproval.vue | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/views/lecturer/OrganizationApproval.vue b/src/views/lecturer/OrganizationApproval.vue index b3cb13ae..623d69c8 100644 --- a/src/views/lecturer/OrganizationApproval.vue +++ b/src/views/lecturer/OrganizationApproval.vue @@ -767,10 +767,10 @@ export default { moduleType:1 }; - if(objA.status == 0){ - objA.approvalType = null; //全部数据 - objA.status = null; - } + // if(objA.status == 0){ + // objA.approvalType = null; //全部数据 + // objA.status = null; + // } if(objA.status == 3){ //审核通过 objA.approvalType = 0; From 77df92eeca1725357f2781f4e96183e5c20ee80a Mon Sep 17 00:00:00 2001 From: gengxin Date: Tue, 4 Mar 2025 13:46:53 +0800 Subject: [PATCH 7/8] =?UTF-8?q?=E5=AE=A1=E6=89=B9=E4=B8=AD=E5=BF=833?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/lecturer/OrganizationApproval.vue | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/src/views/lecturer/OrganizationApproval.vue b/src/views/lecturer/OrganizationApproval.vue index 623d69c8..82466493 100644 --- a/src/views/lecturer/OrganizationApproval.vue +++ b/src/views/lecturer/OrganizationApproval.vue @@ -766,17 +766,7 @@ export default { approvalType:1, moduleType:1 }; - - // if(objA.status == 0){ - // objA.approvalType = null; //全部数据 - // objA.status = null; - // } - - if(objA.status == 3){ //审核通过 - objA.approvalType = 0; - - } - + queryTrainOrg(objA).then((res) => { tableData.value = res.data.data.records; state.tableDataTotal = Number(res.data.data.total); From 1314ae5f729986205ec82224ddacb2f42dbeca7d Mon Sep 17 00:00:00 2001 From: gengxin Date: Tue, 4 Mar 2025 17:48:58 +0800 Subject: [PATCH 8/8] =?UTF-8?q?=E5=AF=BC=E5=87=BA=E5=A4=84=E7=90=861?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/lecturer/MonthlyStatistics.vue | 4 ++-- src/views/lecturer/Organization.vue | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/views/lecturer/MonthlyStatistics.vue b/src/views/lecturer/MonthlyStatistics.vue index c26e0ec8..6b856c85 100644 --- a/src/views/lecturer/MonthlyStatistics.vue +++ b/src/views/lecturer/MonthlyStatistics.vue @@ -65,10 +65,10 @@ 导出 - 讲师月度费用下载 + 讲师费月度汇总 - 讲师费用详情下载 + 讲师费月度详情
diff --git a/src/views/lecturer/Organization.vue b/src/views/lecturer/Organization.vue index c7364351..176f1f8e 100644 --- a/src/views/lecturer/Organization.vue +++ b/src/views/lecturer/Organization.vue @@ -48,9 +48,10 @@ export default { const activeKeyFn = () => { setTimeout(() => { + console.log("organizationApprovalRef setTimeout",organizationApprovalRef) state.activeKey = '2'; organizationApprovalRef.value.getTableDate() - }, 5000); + }, 3000); }