From e978022eaa03c076b18c851a7c0852402e80fd1c Mon Sep 17 00:00:00 2001 From: zhangyongtian <1181606322@qq.com> Date: Fri, 06 Sep 2024 16:38:42 +0800 Subject: [PATCH] feat: 识别文字 --- gz-customerSystem/src/components/SelectObjModal/selectPerson.jsx | 28 ++++++++++++++++------------ 1 files changed, 16 insertions(+), 12 deletions(-) diff --git a/gz-customerSystem/src/components/SelectObjModal/selectPerson.jsx b/gz-customerSystem/src/components/SelectObjModal/selectPerson.jsx index a3943e4..4a9c2e0 100644 --- a/gz-customerSystem/src/components/SelectObjModal/selectPerson.jsx +++ b/gz-customerSystem/src/components/SelectObjModal/selectPerson.jsx @@ -2,7 +2,7 @@ * @Author: dminyi 1301963064@qq.com * @Date: 2024-08-29 17:41:09 * @LastEditors: dminyi 1301963064@qq.com - * @LastEditTime: 2024-08-29 20:03:51 + * @LastEditTime: 2024-09-04 15:16:56 * @FilePath: \gzDyh\gz-customerSystem\src\components\SelectObjModal\selectPerson.jsx * @Description: 选择经办人 */ @@ -11,8 +11,8 @@ 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; @@ -31,7 +31,7 @@ * onClose, // 关闭 * onOk, // 点击确定的回调 */ -const SelectObjModal = ({ visible = false, checkKeys = [], type = 'person', isCheckbox = false, searchData = {}, onClose, onOk }) => { +const SelectObjModal = ({ visible = false, checkKeys = [], type = 'person', isCheckbox = false, searchData = {}, onClose, onOk, }) => { const [data, setData] = useState([]); const [checkedKeys, setCheckedKeys] = useState({ keys: [], items: [] }); @@ -97,8 +97,6 @@ }; function handleSearch(value, dataList) { - - console.log('value, dataList', value, dataList); const newExpandedKeys = dataList .map((item) => { if (item.label.indexOf(value) > -1) { @@ -107,8 +105,6 @@ return null; }) .filter((item, i, self) => item && self.indexOf(item) === i); - - console.log('newExpandedKeys',newExpandedKeys); setExpandedKeys(newExpandedKeys); setSearchValue(value); setAutoExpandParent(true); @@ -150,9 +146,10 @@ 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') useEffect(() => { if (!visible) return; // 获取数据 @@ -164,8 +161,6 @@ setData(res.data || []); } } - console.log(checkKeys,'checkKeys') - console.log(checkedKeys,'checkedKeys') if (checkKeys.length !== 0) { let keys = []; checkKeys.forEach((x) => keys.push(x.value)); @@ -179,7 +174,15 @@ 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"> @@ -202,6 +205,7 @@ checkedKeys={checkedKeys.keys} treeData={treeData} fieldNames={{ title: 'label', key: 'value' }} + height={400} /> ) : ( $$.MyEmpty() @@ -227,7 +231,7 @@ </Button> </Space> </div> - </MyModal> + </Modal> ); }; -- Gitblit v1.8.0