企业管理

This commit is contained in:
2026-01-21 14:47:35 +08:00
parent a7f5e37aac
commit ab91458199
14 changed files with 385 additions and 261 deletions

View File

@@ -229,15 +229,26 @@ export const AdminGrpEditModal: React.FC<IProps> = (props) => {
<Button onClick={expandAll}></Button>
<Button onClick={collapseAll}></Button>
</Space>
<Tree
checkable
checkStrictly={false} // 父子联动
treeData={menuTree}
checkedKeys={checkedKeys}
expandedKeys={expandedKeys}
onExpand={(keys) => setExpandedKeys(keys)}
onCheck={(keys) => setCheckedKeys(keys as React.Key[])}
/>
<div
style={{
maxHeight: 360,
overflow: 'auto',
border: '1px solid #d9d9d9',
borderRadius: 6,
padding: 8,
background: '#fff',
}}
>
<Tree
checkable
checkStrictly={false} // 父子联动
treeData={menuTree}
checkedKeys={checkedKeys}
expandedKeys={expandedKeys}
onExpand={(keys) => setExpandedKeys(keys)}
onCheck={(keys) => setCheckedKeys(keys as React.Key[])}
/>
</div>
</Form.Item>
</Form>
</ModalPlugin>

View File

@@ -38,7 +38,13 @@ const AdminGrpSelect: React.FC<IProps> = (props) => {
return (
<Select
status={props.status}
showSearch
showSearch={{
// 搜索时使用 option.label 属性匹配
optionFilterProp: 'label',
// 下拉排序,可选
filterSort: (optionA, optionB) =>
(optionA?.label ?? '').toLowerCase().localeCompare((optionB?.label ?? '').toLowerCase()),
}}
allowClear={props.allowClear}
value={props.value}
onChange={(value) => {

View File

@@ -38,7 +38,13 @@ const AdminDepSelect: React.FC<IProps> = (props) => {
return (
<Select
status={props.status}
showSearch
showSearch={{
// 搜索时使用 option.label 属性匹配
optionFilterProp: 'label',
// 下拉排序,可选
filterSort: (optionA, optionB) =>
(optionA?.label ?? '').toLowerCase().localeCompare((optionB?.label ?? '').toLowerCase()),
}}
allowClear={props.allowClear}
value={props.value}
onChange={(value) => {