diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/components/welfareAdvanceSearchPannel/index.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/components/welfareAdvanceSearchPannel/index.js index 11fb3505..334b851e 100644 --- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/components/welfareAdvanceSearchPannel/index.js +++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/components/welfareAdvanceSearchPannel/index.js @@ -5,13 +5,14 @@ * Date: 2023/10/31 */ import React, { Component } from "react"; -import { WeaLocaleProvider } from "ecCom"; +import { WeaLocaleProvider, WeaTools } from "ecCom"; import { Button } from "antd"; import { inject, observer } from "mobx-react"; import { getSaCondition } from "../../../../../apis/archive"; import { getSearchs } from "../../../../../util"; const getLabel = WeaLocaleProvider.getLabel; +const getKey = WeaTools.getKey; @inject("archivesStore") @observer @@ -27,7 +28,36 @@ class WelfareAdvanceSearchPannel extends Component { getSaCondition().then(({ status, data }) => { if (status) { this.setState({ - searchConditions: data.condition + searchConditions: _.map(data.condition, item => ({ + ...item, items: _.map(item.items, o => { + if (getKey(o) === "departmentIdsStr" || getKey(o) === "positionsStr" || getKey(o) === "subcompanyIdsStr") { + return { + ...o, browserConditionParam: { + completeParams: {}, + conditionDataParams: {}, + dataParams: {}, + destDataParams: {}, + hasAddBtn: false, + hasAdvanceSerach: false, + idSeparator: ",", + isAutoComplete: 1, + isDetail: 0, + isMultCheckbox: false, + isSingle: false, + icon: "icon-coms-hrm", + linkUrl: "", + pageSize: 10, + quickSearchName: "", + replaceDatas: [], + title: "", + type: getKey(o) === "departmentIdsStr" ? "57" : getKey(o) === "positionsStr" ? "278" : "194", + viewAttr: 2 + } + }; + } + return { ...o }; + }) + })) }, () => { const { archivesStore: { welfareForm } } = this.props; welfareForm.initFormFields(this.state.searchConditions);