diff --git a/pc4mobx/hrmSalary/pages/reportView/index.js b/pc4mobx/hrmSalary/pages/reportView/index.js index 14be4f97..82f935e5 100644 --- a/pc4mobx/hrmSalary/pages/reportView/index.js +++ b/pc4mobx/hrmSalary/pages/reportView/index.js @@ -10,9 +10,10 @@ import { WeaLeftRightLayout, WeaLocaleProvider, WeaSelect, WeaTop } from "ecCom" import { message, Modal } from "antd"; import LeftTab from "./components/leftTab"; import ReportContent from "./components/reportContent"; -import StatisticalMicroSettingsSlide from "./components/statisticalMicroSettingsSlide"; -import TopBtns from "./components/topBtns"; +import StatisticalMicroSettingsSlide, { getSalaryMonthValue } from "./components/statisticalMicroSettingsSlide"; import { reportGetForm, reportStatisticsReportSave } from "../../apis/ruleconfig"; +import { convertToUrlString } from "../../util/url"; +import TopBtns from "./components/topBtns"; import "./index.less"; @@ -92,8 +93,13 @@ class Index extends Component { */ exportData = () => { const { report } = this.state; - const { id, dimensionId, isShare } = report; - window.open(`${window.location.origin}/api/bs/hrmsalary/report/statistics/report/exportData?id=${id}&dimensionId=${dimensionId}&isShare=${isShare}`, "_blank"); + const { id, dimensionId, isShare, timeType, salaryEndMonth: end, salaryStartMonth: start } = report; + const [salaryStartMonth, salaryEndMonth] = getSalaryMonthValue(timeType); + const payload = { + id, dimensionId, isShare, + salaryStartMonth: (salaryStartMonth || start) + "-01", salaryEndMonth: (salaryEndMonth || end) + "-01" + }; + window.open(`${window.location.origin}/api/bs/hrmsalary/report/statistics/report/exportData?${convertToUrlString(payload)}`, "_blank"); }; render() {