From 4d2058b180951384bc3d6cfb8003fdb32edff7ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=8E=E6=B0=B8=E9=A1=BA?= <971387674@qq.com> Date: Thu, 11 Jul 2024 15:05:00 +0800 Subject: [PATCH] hotfix/2.14.2.2406.02 --- .../reportView/components/reportContent.js | 22 +++++++++++++------ 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/pc4mobx/hrmSalary/pages/reportView/components/reportContent.js b/pc4mobx/hrmSalary/pages/reportView/components/reportContent.js index a7808410..98486950 100644 --- a/pc4mobx/hrmSalary/pages/reportView/components/reportContent.js +++ b/pc4mobx/hrmSalary/pages/reportView/components/reportContent.js @@ -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" ?