diff --git a/pc4mobx/hrmSalary/pages/mySalaryBenefits/index.js b/pc4mobx/hrmSalary/pages/mySalaryBenefits/index.js index 89d25e4d..3a221393 100644 --- a/pc4mobx/hrmSalary/pages/mySalaryBenefits/index.js +++ b/pc4mobx/hrmSalary/pages/mySalaryBenefits/index.js @@ -11,6 +11,7 @@ import SalaryAdjustmentRecords from "./components/SalaryAdjustmentRecords"; import { MonthRangePicker } from "../reportView/components/statisticalMicroSettingsSlide"; import moment from "moment"; import "./index.less"; +import LogDialog from "../../components/logViewModal"; const getLabel = WeaLocaleProvider.getLabel; @@ -18,9 +19,9 @@ class Index extends Component { constructor(props) { super(props); this.state = { - selectedKey: "1", + selectedKey: "1", logDialogVisible: false, salaryYearMonth: [ - moment().subtract(1, 'year').startOf("year").format("YYYY-MM"), + moment().subtract(1, "year").startOf("year").format("YYYY-MM"), moment().endOf("year").format("YYYY-MM") ] }; @@ -41,9 +42,18 @@ class Index extends Component { } return Dom; }; + onDropMenuClick = (key) => { + switch (key) { + case "log": + this.setState({ logDialogVisible: true }); + break; + default: + break; + } + }; render() { - const { selectedKey, salaryYearMonth } = this.state; + const { selectedKey, salaryYearMonth, logDialogVisible } = this.state; const tabs = [ { key: "1", title: getLabel(111, "工资单") }, { key: "2", title: getLabel(543150, "调薪记录") } @@ -61,8 +71,18 @@ class Index extends Component { iconBgcolor="#F14A2D" tabDatas={tabs} className="mySalary_wrapper" buttons={selectedKey === "1" ? btns : []} buttonSpace={10} selectedKey={selectedKey} onChange={selectedKey => this.setState({ selectedKey })} + showDropIcon onDropMenuClick={this.onDropMenuClick} + dropMenuDatas={[ + { + key: "log", icon: , + content: getLabel(545781, "操作日志") + } + ]} > {this.renderContent()} + {/*操作日志*/} + this.setState({ logDialogVisible: false })}/> ); }