明细数据展示
This commit is contained in:
parent
b73ef8e8a5
commit
7838ced7cb
|
|
@ -40,4 +40,14 @@ export const exportExcel = (dataKey) => {
|
||||||
return WeaTools.callApi('/api/ec/dev/table/export', 'POST', {
|
return WeaTools.callApi('/api/ec/dev/table/export', 'POST', {
|
||||||
dataKey: dataKey
|
dataKey: dataKey
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
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)
|
||||||
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -230,7 +230,10 @@ class BasicConditionAnalysis extends React.Component {
|
||||||
winWidth={winWidth}
|
winWidth={winWidth}
|
||||||
setGap={val => hrmPerStatusReport.setGap(val)}
|
setGap={val => hrmPerStatusReport.setGap(val)}
|
||||||
getData={tag => hrmPerStatusReport.getData(tag)}
|
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,
|
isApiOneFinished,
|
||||||
isApiTwoFinished,
|
isApiTwoFinished,
|
||||||
authorityStore,
|
authorityStore,
|
||||||
dialogVisible
|
dialogVisible,
|
||||||
|
name
|
||||||
} = hrmPerStatusReport
|
} = hrmPerStatusReport
|
||||||
|
|
||||||
const btn = [
|
const btn = [
|
||||||
|
|
@ -424,11 +428,10 @@ class BasicConditionAnalysis extends React.Component {
|
||||||
|
|
||||||
<WeaDialog
|
<WeaDialog
|
||||||
onCancel={() =>hrmPerStatusReport.setDialogVisible(false)}
|
onCancel={() =>hrmPerStatusReport.setDialogVisible(false)}
|
||||||
title={'明细数据'}
|
title={`明细数据(${name})`}
|
||||||
visible={dialogVisible}
|
visible={dialogVisible}
|
||||||
style={{ width: 800, height: 500 }}
|
style={{ width: 1200, height: 450 }}
|
||||||
hasScroll
|
buttons={<Button type="primary" onClick={() => hrmPerStatusReport.exportExcel()}>导出明细</Button>}
|
||||||
buttons={<Button type="primary">导出明细</Button>}
|
|
||||||
>
|
>
|
||||||
<WeaTable ecId={`${this && this.props && this.props.ecId || ''}_WeaTable@pgmg3x`}
|
<WeaTable ecId={`${this && this.props && this.props.ecId || ''}_WeaTable@pgmg3x`}
|
||||||
comsWeaTableStore={tableStore}
|
comsWeaTableStore={tableStore}
|
||||||
|
|
|
||||||
|
|
@ -203,7 +203,7 @@ class ReportChart extends React.Component {
|
||||||
if (pathname !== 'basicConditionAnalysis') return false;
|
if (pathname !== 'basicConditionAnalysis') return false;
|
||||||
if (cmd == 'AgeRp' || cmd == 'SexRp' || cmd == 'SeniorityRp' || cmd == 'EduRp') {
|
if (cmd == 'AgeRp' || cmd == 'SexRp' || cmd == 'SeniorityRp' || cmd == 'EduRp') {
|
||||||
console.log("params", params);
|
console.log("params", params);
|
||||||
showDialog();
|
showDialog(params.name);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -16,8 +16,10 @@ import {
|
||||||
import {
|
import {
|
||||||
i18n
|
i18n
|
||||||
} from '../public/i18n';
|
} from '../public/i18n';
|
||||||
|
import * as Util from '../util/index';
|
||||||
import {
|
import {
|
||||||
WeaLocaleProvider
|
WeaLocaleProvider,
|
||||||
|
WeaLoadingGlobal
|
||||||
} from 'ecCom';
|
} from 'ecCom';
|
||||||
import AuthorityStore from './domain/authority.js';
|
import AuthorityStore from './domain/authority.js';
|
||||||
const getLabel = WeaLocaleProvider.getLabel;
|
const getLabel = WeaLocaleProvider.getLabel;
|
||||||
|
|
@ -548,11 +550,67 @@ export class HrmPerStatusReport {
|
||||||
/**************** #QC3421143# 基本状况分析明细数据**************************/
|
/**************** #QC3421143# 基本状况分析明细数据**************************/
|
||||||
@observable dialogVisible = false;
|
@observable dialogVisible = false;
|
||||||
@observable tableStore = new TableStore();
|
@observable tableStore = new TableStore();
|
||||||
|
@observable name = '';
|
||||||
|
@observable dataKey = '';
|
||||||
|
|
||||||
setDialogVisible(bool) {
|
setDialogVisible(bool) {
|
||||||
|
bool && this.getDetailTable();
|
||||||
this.dialogVisible = bool;
|
this.dialogVisible = bool;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@action getDetailTable = () => {
|
||||||
|
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 = (
|
||||||
|
<img style={{ height: 5 }} src="/images/loading_wev8.gif" alt="" />
|
||||||
|
);
|
||||||
|
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# 基本状况分析明细数据**************************/
|
/**************** #QC3421143# 基本状况分析明细数据**************************/
|
||||||
|
|
||||||
setIntervalShow(bool) {
|
setIntervalShow(bool) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue