| | |
| | | import { Button, Space, Input, Tree } from 'antd'; |
| | | import { CloseOutlined } from '@ant-design/icons'; |
| | | import './index.less'; |
| | | import MyModal from '../MyModal'; |
| | | import * as $$ from '../../utils/utility'; |
| | | import { Modal } from '@arco-design/web-react'; |
| | | |
| | | const { Search } = Input; |
| | | |
| | |
| | | }; |
| | | |
| | | function handleSearch(value, dataList) { |
| | | |
| | | console.log('value, dataList', value, dataList); |
| | | const newExpandedKeys = dataList |
| | | .map((item) => { |
| | | if (item.label.indexOf(value) > -1) { |
| | |
| | | return null; |
| | | }) |
| | | .filter((item, i, self) => item && self.indexOf(item) === i); |
| | | |
| | | console.log('newExpandedKeys',newExpandedKeys); |
| | | setExpandedKeys(newExpandedKeys); |
| | | setSearchValue(value); |
| | | setAutoExpandParent(true); |
| | |
| | | return loop(data); |
| | | }, [searchValue, data]); |
| | | |
| | | // 默认调解员查询'22_00024-4' |
| | | // 默认调解员查询'22_00024-4' |
| | | const searchRole = type === 'person' ? { roleCode: '22_00024-4' } : {}; |
| | | |
| | | console.log(checkedKeys.keys,'checkedKeys.keyscheckedKeys.keys') |
| | |
| | | setData(res.data || []); |
| | | } |
| | | } |
| | | console.log(checkKeys,'checkKeys') |
| | | console.log(checkedKeys,'checkedKeys') |
| | | if (checkKeys.length !== 0) { |
| | | let keys = []; |
| | | checkKeys.forEach((x) => keys.push(x.value)); |
| | |
| | | const nameStr = type === 'person' ? '人员' : type === 'unit' ? '组织' : '部门'; |
| | | |
| | | return ( |
| | | <MyModal visible={!!visible} title={`选择${nameStr}`} width={560} footer={false} onCancel={onClose}> |
| | | <Modal |
| | | visible={!!visible} |
| | | title={`选择${nameStr}`} |
| | | footer={null} |
| | | onCancel={onClose} |
| | | unmountOnExit={true} |
| | | maskClosable={false} |
| | | style={{ width: '560px' }} |
| | | > |
| | | <div className="selectObjModal-main"> |
| | | <div className="selectObjModal-left"> |
| | | <div className="selectObjModal-left-search"> |
| | |
| | | checkedKeys={checkedKeys.keys} |
| | | treeData={treeData} |
| | | fieldNames={{ title: 'label', key: 'value' }} |
| | | height={400} |
| | | /> |
| | | ) : ( |
| | | $$.MyEmpty() |
| | |
| | | </Button> |
| | | </Space> |
| | | </div> |
| | | </MyModal> |
| | | </Modal> |
| | | ); |
| | | }; |
| | | |