From 7838ced7cb9bb8c46a828f039e68f53f213498e4 Mon Sep 17 00:00:00 2001 From: Chengliang <1546584672@qq.com> Date: Fri, 13 Dec 2024 14:27:28 +0800 Subject: [PATCH] =?UTF-8?q?=E6=98=8E=E7=BB=86=E6=95=B0=E6=8D=AE=E5=B1=95?= =?UTF-8?q?=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pc4mobx/hrm/apis/report.js | 12 +++- .../report/BasicConditionAnalysis.js | 15 +++-- pc4mobx/hrm/components/report/ReportChart.js | 2 +- pc4mobx/hrm/stores/perStatusReport.js | 60 ++++++++++++++++++- 4 files changed, 80 insertions(+), 9 deletions(-) diff --git a/pc4mobx/hrm/apis/report.js b/pc4mobx/hrm/apis/report.js index 08cff45..f604899 100644 --- a/pc4mobx/hrm/apis/report.js +++ b/pc4mobx/hrm/apis/report.js @@ -40,4 +40,14 @@ export const exportExcel = (dataKey) => { return WeaTools.callApi('/api/ec/dev/table/export', 'POST', { dataKey: dataKey }) -} \ No newline at end of file +} + +export const getDetailTable = (params) => { + return WeaTools.callApi('/api/gainway/basicResource/linkTable', 'GET', params); +} + + +export const exportDetailExcel = (params) => { + return WeaTools.callApi('/api/ec/dev/table/export', 'POST', params) + } + diff --git a/pc4mobx/hrm/components/report/BasicConditionAnalysis.js b/pc4mobx/hrm/components/report/BasicConditionAnalysis.js index ca6db5a..3a1877b 100644 --- a/pc4mobx/hrm/components/report/BasicConditionAnalysis.js +++ b/pc4mobx/hrm/components/report/BasicConditionAnalysis.js @@ -230,7 +230,10 @@ class BasicConditionAnalysis extends React.Component { winWidth={winWidth} setGap={val => hrmPerStatusReport.setGap(val)} getData={tag => hrmPerStatusReport.getData(tag)} - showDialog = {() => hrmPerStatusReport.setDialogVisible(true)} + showDialog = {name => { + hrmPerStatusReport.name = name; + hrmPerStatusReport.setDialogVisible(true); + }} /> ) } @@ -278,7 +281,8 @@ class BasicConditionAnalysis extends React.Component { isApiOneFinished, isApiTwoFinished, authorityStore, - dialogVisible + dialogVisible, + name } = hrmPerStatusReport const btn = [ @@ -424,11 +428,10 @@ class BasicConditionAnalysis extends React.Component { hrmPerStatusReport.setDialogVisible(false)} - title={'明细数据'} + title={`明细数据(${name})`} visible={dialogVisible} - style={{ width: 800, height: 500 }} - hasScroll - buttons={} + style={{ width: 1200, height: 450 }} + buttons={} > { + this.tableStore = new TableStore(); + let cmd = this.getWholeCmd(this.pathname, this.tabKey); + + let p = { + cmd: cmd, + name: this.name, + ...this.params + }; + + if (this.searchCondition) { + p.keyword = this.searchCondition; + this.objToStr({ ...this.params, + keyword: this.searchCondition + }); + } + + if (this.pathname == 'basicConditionAnalysis' && (this.tabKey == '1' || this.tabKey == '3' || this.tabKey == '7') && !this.nonZeroVerification()) { + p.agearea = this.interval; + } + this.objToStr(this.params); + Api.getDetailTable(p).then((res) => { + this.dataKey = res.datas.datas; + this.tableStore.getDatas(res.datas.datas,1) + }); + } + + @action exportExcel = () => { + if (!this.dataKey) { + return false; + } + const child = ( + + ); + WeaLoadingGlobal.start({ + indicator: child, + tip: '正在导出请稍候...' + }); + const title = this.getTabName(); + const params = { + dataKey:this.dataKey, + filename:`${title}(${this.name})` + } + Api.exportDetailExcel(params).then(data => { + if (data.url) { + WeaLoadingGlobal.end(); + WeaLoadingGlobal.destroy(); + window.location.href = Util.addContentPath(data.url); + } + }) + } + + /**************** #QC3421143# 基本状况分析明细数据**************************/ setIntervalShow(bool) {