0release/2.10.1.2401.01

This commit is contained in:
黎永顺 2024-02-20 15:45:31 +08:00
parent 0e5c97d447
commit 5afb7e107a
1 changed files with 32 additions and 2 deletions

View File

@ -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);