hotfix/2.14.2.2406.02
This commit is contained in:
parent
5a2ecefa6f
commit
4d2058b180
|
|
@ -6,7 +6,7 @@
|
|||
*/
|
||||
import React, { Component } from "react";
|
||||
import { Spin } from "antd";
|
||||
import { WeaEchart } from "ecCom";
|
||||
import { WeaEchart, WeaLocaleProvider } from "ecCom";
|
||||
import RightOptions from "./rightOptions";
|
||||
import ChartsRangeSettingsModal from "./chartsRangeSettingsModal";
|
||||
import { mapBarOptions, mapLineOptions, mapPieOptions } from "./condition";
|
||||
|
|
@ -15,6 +15,8 @@ import PovitpivotChartModal from "./povitpivotChartModal";
|
|||
import { getSalaryMonthValue } from "./statisticalMicroSettingsSlide";
|
||||
import "../index.less";
|
||||
|
||||
const getLabel = WeaLocaleProvider.getLabel;
|
||||
|
||||
class ReportContent extends Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
|
|
@ -33,7 +35,8 @@ class ReportContent extends Component {
|
|||
rangSet: {
|
||||
visible: false, reportId: "",
|
||||
rangeVal: {}
|
||||
}
|
||||
},
|
||||
pageInfo: { current: 0, pageSize: 10, total: 0 }
|
||||
};
|
||||
}
|
||||
|
||||
|
|
@ -76,24 +79,29 @@ class ReportContent extends Component {
|
|||
}
|
||||
};
|
||||
postMessageToChild = (payload) => {
|
||||
const i18n = {
|
||||
"共": getLabel(18609, "共"), "条": getLabel(18256, "条"),
|
||||
"总计": getLabel(523, "总计")
|
||||
};
|
||||
const childFrameObj = document.getElementById("atdTable");
|
||||
const { dataSource, columns, showSum, countResult } = payload;
|
||||
childFrameObj && childFrameObj.contentWindow.postMessage(JSON.stringify({
|
||||
dataSource, columns, showSum, countResult
|
||||
dataSource, columns, showSum, countResult, i18n
|
||||
}), "*");
|
||||
};
|
||||
reportStatisticsReportGetData = (params) => {
|
||||
const { pageInfo } = this.state;
|
||||
const { id, dimensionId, isShare, timeType, salaryEndMonth: end, salaryStartMonth: start } = params;
|
||||
const [salaryStartMonth, salaryEndMonth] = getSalaryMonthValue(timeType);
|
||||
const payload = {
|
||||
id, dimensionId, isShare,
|
||||
id, dimensionId, isShare, ...pageInfo,
|
||||
salaryStartMonth: (salaryStartMonth || start) + "-01", salaryEndMonth: (salaryEndMonth || end) + "-01"
|
||||
};
|
||||
this.setState({ loading: true });
|
||||
reportStatisticsReportGetData(payload).then(({ status, data }) => {
|
||||
this.setState({ loading: false });
|
||||
if (status && id.toString() === data.reportId.toString()) {
|
||||
const { countResult, columns, pageInfo: { list } } = data;
|
||||
const { countResult, columns, pageInfo: { list, pageNum, pageSize, total } } = data;
|
||||
this.setState({
|
||||
countResult,
|
||||
columns: _.map(columns, it => ({
|
||||
|
|
@ -244,8 +252,8 @@ class ReportContent extends Component {
|
|||
viewType === "dataView" ?
|
||||
<iframe
|
||||
style={{ border: 0, width: "100%", height: "100%" }}
|
||||
// src="http://localhost:7607/#/reportTable"
|
||||
src="/spa/hrmSalary/hrmSalaryCalculateDetail/index.html#/reportTable"
|
||||
src="http://localhost:7607/#/reportTable"
|
||||
// src="/spa/hrmSalary/hrmSalaryCalculateDetail/index.html#/reportTable"
|
||||
id="atdTable"
|
||||
/> : this.renderCharts()
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue