diff --git a/pc4mobx/hrmSalary/pages/historicalPayroll/index.js b/pc4mobx/hrmSalary/pages/historicalPayroll/index.js index 51e21047..342a69a2 100644 --- a/pc4mobx/hrmSalary/pages/historicalPayroll/index.js +++ b/pc4mobx/hrmSalary/pages/historicalPayroll/index.js @@ -26,10 +26,7 @@ class Index extends Component { render() { const { dateRange } = this.state; - const index1 = window.location.hash.lastIndexOf("/") + 1, index2 = window.location.hash.lastIndexOf("?"); - const employeeId = window.location.hash.slice(index1, index2); - console.log(WeaTools.getUrlParams(), window.location); - console.log(window.parent, window.parent.location.href); + const employeeId = WeaTools.getUrlParams().hrmResourceID; return (
diff --git a/pc4mobx/hrmSalary/pages/salaryAdjustmentRecords/index.js b/pc4mobx/hrmSalary/pages/salaryAdjustmentRecords/index.js index 4d35cfa3..5399f8dd 100644 --- a/pc4mobx/hrmSalary/pages/salaryAdjustmentRecords/index.js +++ b/pc4mobx/hrmSalary/pages/salaryAdjustmentRecords/index.js @@ -5,7 +5,7 @@ * Date: 2024/1/25 */ import React, { Component } from "react"; -import { WeaLocaleProvider } from "ecCom"; +import { WeaLocaleProvider, WeaTools } from "ecCom"; import SalaryAdjustmentRecords from "../mySalaryBenefits/components/SalaryAdjustmentRecords"; import "../historicalPayroll/index.less"; @@ -13,8 +13,7 @@ const getLabel = WeaLocaleProvider.getLabel; class Index extends Component { render() { - const index1 = window.location.hash.lastIndexOf("/") + 1, index2 = window.location.hash.lastIndexOf("?"); - const employeeId = window.location.hash.slice(index1, index2); + const employeeId = WeaTools.getUrlParams().hrmResourceID; return (