From 87094d3f7708c465e0efb28e770e44bcb7bb31bd Mon Sep 17 00:00:00 2001 From: "mx00085@163.com" Date: Tue, 21 Feb 2023 17:05:50 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=B7=A6=E4=BE=A7=E5=AF=BC=E8=88=AA?= =?UTF-8?q?=E6=9B=B4=E6=94=B9=EF=BC=8C=E6=A6=82=E8=A7=88=E9=A1=B5=E9=9D=A2?= =?UTF-8?q?tab=E6=80=BB=E6=95=B0=E6=9B=B4=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/indexOvervoew.js | 2 ++ src/components/NavLeft.vue | 4 ++-- src/views/report/Overvoew.vue | 22 +++++++++++++++++----- 3 files changed, 21 insertions(+), 7 deletions(-) diff --git a/src/api/indexOvervoew.js b/src/api/indexOvervoew.js index f3d89da2..327bf0aa 100644 --- a/src/api/indexOvervoew.js +++ b/src/api/indexOvervoew.js @@ -23,3 +23,5 @@ export const boeuProjectPageList = (obj) => http.post('/boeu/project/pageList', // 学习数据列表 export const boeuStudyDataPageList = (obj) => http.post('/boeu/studyData/pageList', obj) +// 概览页面 tab头数据 +export const boeuAllTotal = (obj) => http.get('/boeu/all/total', obj) diff --git a/src/components/NavLeft.vue b/src/components/NavLeft.vue index 8da98bd7..0795c8af 100644 --- a/src/components/NavLeft.vue +++ b/src/components/NavLeft.vue @@ -817,9 +817,9 @@ export default { "selectedKeys", JSON.stringify([value.selectedKeys]) ); - state.openKeys = [value.openKeys]; + state.openKeys = [value.openKeys,value.openKeys2]; state.selectedKeys = [value.selectedKeys]; - state.openKeys2 = [value.openKeys]; + state.openKeys2 = [value.openKeys,value.openKeys2]; state.selectedKeys2 = [value.openKeys]; } }); diff --git a/src/views/report/Overvoew.vue b/src/views/report/Overvoew.vue index 3cdc2426..d1a9cab1 100644 --- a/src/views/report/Overvoew.vue +++ b/src/views/report/Overvoew.vue @@ -232,6 +232,21 @@ export default { selectedRowKeys: [], // 选中的列 option: [], }); + // 获取tab数据 + const getTabData = async () => { + const res = await api.boeuAllTotal({}); + if (res) { + const list = [ + { text: "项目", num: res.data?.projectTotal }, + { text: "学习路径图", num: res.data?.routerTotal }, + { text: "授课", num: res.data?.teachingTotal }, + { text: "课程", num: res.data?.courseTotal }, + { text: "考试", num: res.data?.examTotal }, + { text: "案例", num: res.data?.caseTotal }, + ]; + tabData.value = list; + } + }; // 重置按钮 const reset = async () => { state.creator = ""; @@ -1061,10 +1076,12 @@ export default { console.log("e", e, a); }; onMounted(() => { + getTabData(); getOrgList(); getTableData(); }); return { + getTabData, reset, getOrgList, onSelectChange, @@ -1251,7 +1268,6 @@ export default { .btn3 { margin-right: 0px; - .search { width: 17px; height: 18px; @@ -1263,10 +1279,6 @@ export default { // background: rgba(64, 158, 255, 0.76); background: rgba(64, 158, 255, 0.2); } - - // .btn3:active { - // background: #0982ff; - // } } }