import { Collapse, Form } from 'antd'; import _ from 'lodash'; import CustomTree from '../CustomTree'; import type { BindDataFromProps } from './BindDataFrom'; const BindDataItem = (props: BindDataFromProps) => { const { flagList, isAllowApply, disabledIds, isHaveDate, isHaveDay, isHaveCheckBox, activeKey, setActiveKey, selectMap, getSelectOptions, appId, customRender, checkInterceptor, isOtherUser, fixedIds, disabled, showAllSelect, } = props; return ( { setActiveKey?.(Array.isArray(val) ? val : [val]); // 把打开以后没有请求的key都查出来 const diffArr = _.difference(val, _.keys(selectMap)); if (diffArr.length > 0) { // 因为每次只能打开一个,所以只会出现一个key,所以直接取第一个 getSelectOptions?.(parseInt(diffArr[0], 10)); } }} defaultActiveKey={['1']} > {flagList?.map((item) => ( {item.requiredForPermApply === 1 && ( * )} {item.name} {item.uniqueKey ? ` (${item.uniqueKey})` : ''} } > ))} ); }; export default BindDataItem;