From db7b3538805181a5f3b14fe20028da71025ba78f Mon Sep 17 00:00:00 2001 From: zhusiyu <410827992@qq.com> Date: Tue, 11 Oct 2022 08:14:43 +0800 Subject: [PATCH] =?UTF-8?q?=E7=89=A9=E5=93=81=E5=AE=9E=E7=94=A8=E7=BB=9F?= =?UTF-8?q?=E8=AE=A1=E3=80=81=E6=80=BB=E7=BB=93=E7=BB=9F=E8=AE=A1=EF=BC=8C?= =?UTF-8?q?=E9=83=A8=E9=97=A8=E6=8C=89=E9=92=AE=E6=8E=A5=E5=8F=A3=E5=A4=84?= =?UTF-8?q?=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../goodsUseCensusLarge/departmentLarge.vue | 32 +++- .../goodsUseCensusLarge/mechanismLarge.vue | 1 - .../goodsUseCensusSmall/departmentSmall.vue | 19 ++- .../component/myLargeSummary.vue | 5 +- .../oa/summaryRecord/component/submitInfo.vue | 40 +++-- .../summaryRecord/component/totalRecord.vue | 150 ++++++++++-------- .../moduleCom/oa/summaryRecord/interConfig.js | 2 +- .../oa/summaryRecord/summaryRecord.vue | 122 ++++++++++---- .../oa/summaryRecord/summaryRecordLarge.vue | 32 +++- 9 files changed, 282 insertions(+), 121 deletions(-) diff --git a/src/views/screenAdaptation/pages/adminCenter/moduleCom/oa/goodsUseCensus/components/goodsUseCensusLarge/departmentLarge.vue b/src/views/screenAdaptation/pages/adminCenter/moduleCom/oa/goodsUseCensus/components/goodsUseCensusLarge/departmentLarge.vue index 3a2e72f..0db60b1 100644 --- a/src/views/screenAdaptation/pages/adminCenter/moduleCom/oa/goodsUseCensus/components/goodsUseCensusLarge/departmentLarge.vue +++ b/src/views/screenAdaptation/pages/adminCenter/moduleCom/oa/goodsUseCensus/components/goodsUseCensusLarge/departmentLarge.vue @@ -59,6 +59,8 @@ depObjs: [], selectDeps: [], chartsOption: {}, + selected_data: {}, + deptId: this.BaseConfig.person_info_my.dep_id, } }, props: ['dataFlag'], @@ -85,6 +87,19 @@ this.depNames = depNames; this.selectDeps = depObjs; }, + selected_data: { + handler(select_data) { + if (select_data.length == 0) { + this.deptId = this.BaseConfig.person_info_my.dep_id; + } else { + this.deptId = select_data[select_data.length - 1].id + this.byPeople() + this.bySupplies() + this.byEveryday() + } + }, + immediate: true + }, }, components: { AIcon: Icon, @@ -110,8 +125,13 @@ if (echart == null) { echart = echarts.init(document.getElementById('deptmain')); } - console.log('this.chartsOption', this.chartsOption) + //console.log('this.chartsOption', this.chartsOption) echart.setOption(this.chartsOption) + window.addEventListener("resize", () => { + if (myEchart) { + myEchart.resize() + } + }) }, // 点击部门按钮 showDepts() { @@ -126,6 +146,7 @@ selectComplete: function (selectedData) { this.depObjs = selectedData; this.showDepPanel = false; + this.selected_data = selectedData }, //更改结束日期 endDate(end_date) { @@ -168,9 +189,10 @@ }, // 领用物品统计 bySupplies() { + this.spinning = true let param = { person_id: this.BaseConfig.userInfo.person_id,//登录人ID - dept_id: this.BaseConfig.person_info_my.dep_id,//data_flag=2时必填 + dept_id: this.deptId,//data_flag=2时必填 org_id: this.BaseConfig.person_info_my.bureau_id, //登录人机构ID data_flag: this.dataFlag,// 当=1时表示统计本人,2本部门,3本机构 start_date: this.begin_date, //开始日期,例2020-12-15,非必填 @@ -195,9 +217,10 @@ }, // 成员领用统计 byPeople() { + this.spinning = true let param = { person_id: this.BaseConfig.userInfo.person_id,//登录人ID - dept_id: this.BaseConfig.person_info_my.dep_id,//data_flag=2时必填 + dept_id: this.deptId,//data_flag=2时必填 org_id: this.BaseConfig.person_info_my.bureau_id, //登录人机构ID data_flag: this.dataFlag,// 当=1时表示统计本人,2本部门,3本机构 start_date: this.begin_date, //开始日期,例2020-12-15,非必填 @@ -222,9 +245,10 @@ }, //每日领用对比数据 byEveryday() { + this.spinning = true let param = { person_id: this.BaseConfig.userInfo.person_id,//登录人ID - dept_id: this.BaseConfig.person_info_my.dep_id,//data_flag=2时必填 + dept_id: this.deptId,//data_flag=2时必填 org_id: this.BaseConfig.person_info_my.bureau_id, //登录人机构ID data_flag: this.dataFlag,// 当=1时表示统计本人,2本部门,3本机构 start_date: this.begin_date, //开始日期,例2020-12-15,非必填 diff --git a/src/views/screenAdaptation/pages/adminCenter/moduleCom/oa/goodsUseCensus/components/goodsUseCensusLarge/mechanismLarge.vue b/src/views/screenAdaptation/pages/adminCenter/moduleCom/oa/goodsUseCensus/components/goodsUseCensusLarge/mechanismLarge.vue index cea0818..7ca1f70 100644 --- a/src/views/screenAdaptation/pages/adminCenter/moduleCom/oa/goodsUseCensus/components/goodsUseCensusLarge/mechanismLarge.vue +++ b/src/views/screenAdaptation/pages/adminCenter/moduleCom/oa/goodsUseCensus/components/goodsUseCensusLarge/mechanismLarge.vue @@ -73,7 +73,6 @@ if (echart == null) { echart = echarts.init(document.getElementById('deptmain')); } - console.log('this.chartsOption', this.chartsOption) echart.setOption(this.chartsOption) }, //更改结束日期 diff --git a/src/views/screenAdaptation/pages/adminCenter/moduleCom/oa/goodsUseCensus/components/goodsUseCensusSmall/departmentSmall.vue b/src/views/screenAdaptation/pages/adminCenter/moduleCom/oa/goodsUseCensus/components/goodsUseCensusSmall/departmentSmall.vue index 19c4528..8ca2cbd 100644 --- a/src/views/screenAdaptation/pages/adminCenter/moduleCom/oa/goodsUseCensus/components/goodsUseCensusSmall/departmentSmall.vue +++ b/src/views/screenAdaptation/pages/adminCenter/moduleCom/oa/goodsUseCensus/components/goodsUseCensusSmall/departmentSmall.vue @@ -146,6 +146,8 @@ optionBot: {}, top_eachrts_show: true, bot_eachrts_show: true, + selected_data: {}, + deptId: this.BaseConfig.person_info_my.dep_id, } }, watch: { @@ -171,6 +173,18 @@ this.depNames = depNames; this.selectDeps = depObjs; }, + selected_data: { + handler(select_data) { + if (select_data.length == 0) { + this.deptId = this.BaseConfig.person_info_my.dep_id; + } else { + this.deptId = select_data[select_data.length - 1].id + this.byPeople() + this.bySupplies() + } + }, + immediate: true + }, }, props: ['dataFlag'], components: { @@ -213,7 +227,7 @@ bySupplies() { let param = { person_id: this.BaseConfig.userInfo.person_id,//登录人ID - dept_id: this.BaseConfig.person_info_my.dep_id,//data_flag=2时必填 + dept_id: this.deptId,//data_flag=2时必填 org_id: this.BaseConfig.person_info_my.bureau_id, //登录人机构ID data_flag: this.dataFlag,// 当=1时表示统计本人,2本部门,3本机构 start_date: this.begin_date, //开始日期,例2020-12-15,非必填 @@ -250,7 +264,7 @@ byPeople() { let param = { person_id: this.BaseConfig.userInfo.person_id,//登录人ID - dept_id: this.BaseConfig.person_info_my.dep_id,//data_flag=2时必填 + dept_id: this.deptId,//data_flag=2时必填 org_id: this.BaseConfig.person_info_my.bureau_id, //登录人机构ID data_flag: this.dataFlag,// 当=1时表示统计本人,2本部门,3本机构 start_date: this.begin_date, //开始日期,例2020-12-15,非必填 @@ -294,6 +308,7 @@ selectComplete(selectedData) { this.depObjs = selectedData; this.showDepPanel = false; + this.selected_data = selectedData }, //更改结束日期 endDate(end_date) { diff --git a/src/views/screenAdaptation/pages/adminCenter/moduleCom/oa/summaryRecord/component/myLargeSummary.vue b/src/views/screenAdaptation/pages/adminCenter/moduleCom/oa/summaryRecord/component/myLargeSummary.vue index f268513..124c1cc 100644 --- a/src/views/screenAdaptation/pages/adminCenter/moduleCom/oa/summaryRecord/component/myLargeSummary.vue +++ b/src/views/screenAdaptation/pages/adminCenter/moduleCom/oa/summaryRecord/component/myLargeSummary.vue @@ -100,6 +100,7 @@ end_date: "", totalRecordJson: {}, spinning: true, + dataSearchTime: this.searchTime, } }, mounted() { @@ -112,7 +113,7 @@ searchTime: { handler(time) { if (time !== "") { - this.searchTime = time; + this.dataSearchTime = time; this.getNowTime(); } }, @@ -122,7 +123,7 @@ methods: { //我的总结-总结概览 workSummaryPersonOverview() { - let timeStr = this.searchTime; + let timeStr = this.dataSearchTime; if (timeStr !== "") { let startDate = timeStr.split("|")[0]; let endDate = timeStr.split("|")[1]; diff --git a/src/views/screenAdaptation/pages/adminCenter/moduleCom/oa/summaryRecord/component/submitInfo.vue b/src/views/screenAdaptation/pages/adminCenter/moduleCom/oa/summaryRecord/component/submitInfo.vue index 3b42bcc..9c77232 100644 --- a/src/views/screenAdaptation/pages/adminCenter/moduleCom/oa/summaryRecord/component/submitInfo.vue +++ b/src/views/screenAdaptation/pages/adminCenter/moduleCom/oa/summaryRecord/component/submitInfo.vue @@ -83,6 +83,11 @@ type: Number, searchTime: String, largeSummary: Boolean, + selectedData: { + type: Object, + default: () => { + } + } }, data() { return { @@ -392,6 +397,7 @@ {id: 4, value: "周报"}, ], tabKey: 5, + deptId: this.BaseConfig.person_info_my.dep_id, } }, watch: { @@ -414,8 +420,8 @@ immediate: true }, searchTime: { - handler(time) { - if (time !== "") { + handler(time, oldTime) { + if (time !== "" && oldTime != time && oldTime != 'undefined') { this.searchTime = time; if (this.type === 1) { this.getWorkSummaryPersonCycleStatistics(); @@ -428,6 +434,17 @@ }, immediate: true }, + selectedData: { + handler(select_data) { + if (select_data.length == 0) { + this.deptId = this.BaseConfig.person_info_my.dep_id; + } else { + this.deptId = select_data[0].id + this.getWorkSummaryDeptPersonOverview() + } + }, + immediate: true + }, }, mounted() { if (this.type !== 1) { @@ -465,6 +482,7 @@ this.tabChange(tabKey, index); }, getWorkSummaryPersonCycleStatistics: function () { + this.spinning1 = true let timeStr = this.searchTime; if (timeStr !== "") { let startDate = timeStr.split("|")[0]; @@ -493,6 +511,7 @@ } }, getWorkSummaryDeptPersonOverview: function () { + this.spinning2 = true let timeStr = this.searchTime; if (timeStr !== "") { let startDate = timeStr.split("|")[0]; @@ -501,25 +520,26 @@ begin_date: moment(parseInt(startDate)).format("YYYY-MM-DD"), end_date: moment(parseInt(endDate)).format("YYYY-MM-DD"), org_id: this.BaseConfig.person_info_my.bureau_id, - dept_id: this.BaseConfig.person_info_my.dep_id, + dept_id: this.deptId, }; this.InterfaceConfig.callInterface([{ - url: interConfig.getWorkSummaryDeptPersonOverview.url, + url: interConfig.workSummaryDeptPersonOverview.url, params: param, - method: interConfig.getWorkSummaryDeptPersonOverview.method, - isTestLogin: interConfig.getWorkSummaryDeptPersonOverview.isTestLogin, + method: interConfig.workSummaryDeptPersonOverview.method, + isTestLogin: interConfig.workSummaryDeptPersonOverview.isTestLogin, }], (result) => { + this.spinning2 = false let resData = result[0].data; if (resData.code === 2000) { let dataSource = resData.data.person_list;//1学年2学期3月报4周报5日报 this.dataSourceDept = dataSource - this.spinning2 = false this.changeType(); } }) } }, getWorkSummaryOrgDeptOverview: function () { + this.spinning3 = true let timeStr = this.searchTime; if (timeStr !== "") { let startDate = timeStr.split("|")[0]; @@ -530,10 +550,10 @@ org_id: this.BaseConfig.person_info_my.bureau_id, }; this.InterfaceConfig.callInterface([{ - url: interConfig.getWorkSummaryOrgDeptOverview.url, + url: interConfig.workSummaryOrgDeptOverview.url, params: param, - method: interConfig.getWorkSummaryOrgDeptOverview.method, - isTestLogin: interConfig.getWorkSummaryOrgDeptOverview.isTestLogin, + method: interConfig.workSummaryOrgDeptOverview.method, + isTestLogin: interConfig.workSummaryOrgDeptOverview.isTestLogin, }], (result) => { let resData = result[0].data; //console.log('小块机构表格', resData) diff --git a/src/views/screenAdaptation/pages/adminCenter/moduleCom/oa/summaryRecord/component/totalRecord.vue b/src/views/screenAdaptation/pages/adminCenter/moduleCom/oa/summaryRecord/component/totalRecord.vue index ad3eefc..582bbe5 100644 --- a/src/views/screenAdaptation/pages/adminCenter/moduleCom/oa/summaryRecord/component/totalRecord.vue +++ b/src/views/screenAdaptation/pages/adminCenter/moduleCom/oa/summaryRecord/component/totalRecord.vue @@ -1,44 +1,45 @@ @@ -47,20 +48,27 @@ * type: person 累计汇总 dept 部门汇总 org 机构汇总 * * */ - import interConfig from '../interConfig'; - import moment from 'moment'; - import {Spin} from 'ant-design-vue'; + import interConfig from '../interConfig' + import moment from 'moment' + import {Spin} from 'ant-design-vue' + export default { props: { type: Number, searchTime: String, + selectedData: { + type: Object, + default: () => { + } + } }, data() { return { title: "", totalRecordJson: {}, - spinning: false, + spinning: true, + deptId: this.BaseConfig.person_info_my.dep_id, } }, watch: { @@ -68,10 +76,13 @@ handler(val) { if (val === 1) { this.title = "总结概览"; + this.deptBtnShow = false } else if (val === 2) { this.title = "部门总结汇总"; + this.deptBtnShow = true } else if (val === 3) { this.title = "机构总结汇总"; + this.deptBtnShow = false } this.type = val; this.getRecordData(); @@ -79,14 +90,25 @@ immediate: true }, searchTime: { - handler(time) { - if (time !== "") { + handler(time, oldTime) { + if (time !== "" && oldTime != time && oldTime != 'undefined') { this.searchTime = time; this.getRecordData(); } }, immediate: true - } + }, + selectedData: { + handler(select_data) { + if (select_data.length == 0) { + this.deptId = this.BaseConfig.person_info_my.dep_id; + } else { + this.deptId = select_data[0].id + this.getRecordData() + } + }, + immediate: true + }, }, methods: { getRecordData: function () { @@ -103,19 +125,20 @@ let method = ""; let isTestLogin = ""; if (this.type === 1) { - url = interConfig.workSummaryPersonStatistics.url; + url = interConfig.workSummaryPersonOverview.url; param.person_id = this.BaseConfig.userInfo.person_id; - method = interConfig.workSummaryPersonStatistics.method; - isTestLogin = interConfig.workSummaryPersonStatistics.isTestLogin; + method = interConfig.workSummaryPersonOverview.method; + isTestLogin = interConfig.workSummaryPersonOverview.isTestLogin; } else if (this.type === 2) { - url = interConfig.workSummaryDeptStatistics.url; - param.dept_id = this.BaseConfig.person_info_my.dep_id; - method = interConfig.workSummaryDeptStatistics.method; - isTestLogin = interConfig.workSummaryDeptStatistics.isTestLogin; + url = interConfig.workSummaryDeptOverview.url; + // param.dept_id = this.BaseConfig.person_info_my.dep_id; + param.dept_id = this.deptId; + method = interConfig.workSummaryDeptOverview.method; + isTestLogin = interConfig.workSummaryDeptOverview.isTestLogin; } else if (this.type === 3) { - url = interConfig.workSummaryOrgStatistics.url; - method = interConfig.workSummaryOrgStatistics.method; - isTestLogin = interConfig.workSummaryOrgStatistics.isTestLogin; + url = interConfig.workSummaryOrgOverview.url; + method = interConfig.workSummaryOrgOverview.method; + isTestLogin = interConfig.workSummaryOrgOverview.isTestLogin; } this.spinning = true; this.InterfaceConfig.callInterface([{ @@ -124,25 +147,18 @@ method: method, isTestLogin: isTestLogin, }], (result) => { - this.showLoading = false; + this.spinning = false; let resData = result[0].data; - // console.log('我的总结-总结概览', resData.data) - if (result[0].status === 200) { - if (resData.code === 2000) { - this.spinning = false; - this.totalRecordJson = resData.data; - } else { - this.spinning = false; - } - } else { - this.spinning = false; + //console.log('我的总结-总结概览', resData) + if (resData.code === 2000) { + this.totalRecordJson = resData.data; } }) } - } + }, }, components: { - ASpin: Spin + ASpin: Spin, } } diff --git a/src/views/screenAdaptation/pages/adminCenter/moduleCom/oa/summaryRecord/interConfig.js b/src/views/screenAdaptation/pages/adminCenter/moduleCom/oa/summaryRecord/interConfig.js index 26877ff..442de01 100644 --- a/src/views/screenAdaptation/pages/adminCenter/moduleCom/oa/summaryRecord/interConfig.js +++ b/src/views/screenAdaptation/pages/adminCenter/moduleCom/oa/summaryRecord/interConfig.js @@ -95,7 +95,7 @@ export default { method: 'get', isTestLogin: true }, - //我的总结-总结概览 + //我的总结-总结概览 √√√√√√《总结-个人》工作总结概览 "workSummaryPersonOverview": { url: '/intellioa/workSummary/workSummaryPersonOverview', method: 'get', diff --git a/src/views/screenAdaptation/pages/adminCenter/moduleCom/oa/summaryRecord/summaryRecord.vue b/src/views/screenAdaptation/pages/adminCenter/moduleCom/oa/summaryRecord/summaryRecord.vue index 1c63549..5c0f237 100644 --- a/src/views/screenAdaptation/pages/adminCenter/moduleCom/oa/summaryRecord/summaryRecord.vue +++ b/src/views/screenAdaptation/pages/adminCenter/moduleCom/oa/summaryRecord/summaryRecord.vue @@ -1,16 +1,20 @@