From f4f024867b77a31cbb2f8fe599b38248dc9990dc 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, 13 Apr 2023 17:32:27 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BA=A7=E5=93=81-=E5=A4=9A=E8=AF=AD=E8=A8=80?= =?UTF-8?q?=E8=AF=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/customPaginationTable/index.js | 5 ++++- pc4mobx/hrmSalary/pages/mySalary/index.js | 13 +++++++------ pc4mobx/hrmSalary/pages/mySalary/payrollModal.js | 5 +++-- 3 files changed, 14 insertions(+), 9 deletions(-) diff --git a/pc4mobx/hrmSalary/components/customPaginationTable/index.js b/pc4mobx/hrmSalary/components/customPaginationTable/index.js index 72fcddd5..a1853c1d 100644 --- a/pc4mobx/hrmSalary/components/customPaginationTable/index.js +++ b/pc4mobx/hrmSalary/components/customPaginationTable/index.js @@ -1,6 +1,9 @@ import React, { PureComponent } from "react"; +import { WeaLocaleProvider } from "ecCom"; import CustomTable from "../../components/customTable"; +const getLabel = WeaLocaleProvider.getLabel; + class CustomPaginationTable extends PureComponent { shouldComponentUpdate(nextProps, nextState, nextContext) { return !(nextProps.columnIndex && this.props.columnIndex !== nextProps.columnIndex); @@ -15,7 +18,7 @@ class CustomPaginationTable extends PureComponent { this.props.onPageChange(value); }, total: this.props.total, - showTotal: total => `共 ${total} 条`, + showTotal: total => `${getLabel(83698, "共")} ${total} ${getLabel(18256, "条")}`, current: this.props.current, showSizeChanger: true, pageSizeOptions: ["10", "20", "50", "100"], diff --git a/pc4mobx/hrmSalary/pages/mySalary/index.js b/pc4mobx/hrmSalary/pages/mySalary/index.js index 6902836e..b41e87d3 100644 --- a/pc4mobx/hrmSalary/pages/mySalary/index.js +++ b/pc4mobx/hrmSalary/pages/mySalary/index.js @@ -1,7 +1,7 @@ import React from "react"; import { inject, observer } from "mobx-react"; import { DatePicker } from "antd"; -import { WeaNewScroll, WeaTop } from "ecCom"; +import { WeaLocaleProvider, WeaNewScroll, WeaTop } from "ecCom"; import { renderNoright } from "../../util"; // 渲染form数据的方法:因为多个页面都会使用,所以抽的公共方法在util中 import CustomTab from "../../components/customTab"; import moment from "moment"; @@ -10,6 +10,7 @@ import Authority from "./authority"; import CustomPaginationTable from "../../components/customPaginationTable"; import "./index.less"; +const getLabel = WeaLocaleProvider.getLabel; const { RangePicker } = DatePicker; @inject("mySalaryStore") @@ -63,7 +64,7 @@ export default class MySalary extends React.Component { return ( { this.handleView(record); - }}>查看 + }}>{getLabel(130277, "查看1")} ); } }); @@ -118,17 +119,17 @@ export default class MySalary extends React.Component { const topTab = [ { - title: "工资单", + title: getLabel(503, "工资单"), viewcondition: "0" }, { - title: "调薪记录", + title: getLabel(111, "调薪记录"), viewcondition: "2" } ]; const renderSearchOperationItem = () => { if (this.state.selectedKey === "0") { - return (