|
|
@@ -647,9 +647,6 @@ export default function IsolationWork({ subMenu }: IsolationWorkProps) {
|
|
|
const inDropdown = !!target.closest?.('.ant-select-dropdown');
|
|
|
|
|
|
if (!inWrap && !inDropdown) {
|
|
|
- // 不控制 open,直接 blur 让 antd 自己收起下拉,避免影响 Form 取值
|
|
|
- workflowTemplateSelectRef.current?.blur?.();
|
|
|
- jobCategorySelectRef.current?.blur?.();
|
|
|
setWorkflowTemplateDropdownVisible(false);
|
|
|
setJobCategoryDropdownVisible(false);
|
|
|
}
|
|
|
@@ -4557,8 +4554,11 @@ export default function IsolationWork({ subMenu }: IsolationWorkProps) {
|
|
|
allowClear
|
|
|
showSearch
|
|
|
disabled={isViewMode}
|
|
|
+ open={workflowTemplateDropdownVisible}
|
|
|
onDropdownVisibleChange={setWorkflowTemplateDropdownVisible}
|
|
|
- onClear={() => setWorkflowTemplateDropdownVisible(false)}
|
|
|
+ onClear={() => {
|
|
|
+ setWorkflowTemplateDropdownVisible(false);
|
|
|
+ }}
|
|
|
filterOption={(input, option) =>
|
|
|
(option?.label ?? '').toLowerCase().includes(input.toLowerCase())
|
|
|
}
|
|
|
@@ -4568,6 +4568,9 @@ export default function IsolationWork({ subMenu }: IsolationWorkProps) {
|
|
|
label: item.name,
|
|
|
value: item.id,
|
|
|
}))}
|
|
|
+ onSelect={() => {
|
|
|
+ setWorkflowTemplateDropdownVisible(false);
|
|
|
+ }}
|
|
|
onChange={(value) => {
|
|
|
setWorkflowTemplateDropdownVisible(false);
|
|
|
if (value) {
|
|
|
@@ -4604,9 +4607,18 @@ export default function IsolationWork({ subMenu }: IsolationWorkProps) {
|
|
|
placeholder={t('common.jobCategoryPlaceholder')}
|
|
|
allowClear
|
|
|
disabled={isViewMode}
|
|
|
+ open={jobCategoryDropdownVisible}
|
|
|
onDropdownVisibleChange={setJobCategoryDropdownVisible}
|
|
|
- onSelect={() => setJobCategoryDropdownVisible(false)}
|
|
|
- onClear={() => setJobCategoryDropdownVisible(false)}
|
|
|
+ onSelect={() => {
|
|
|
+ setJobCategoryDropdownVisible(false);
|
|
|
+ }}
|
|
|
+ onClear={() => {
|
|
|
+ setJobCategoryDropdownVisible(false);
|
|
|
+ }}
|
|
|
+ onChange={() => {
|
|
|
+ // 保险:某些端 onSelect 不触发时,onChange 兜底收起
|
|
|
+ setJobCategoryDropdownVisible(false);
|
|
|
+ }}
|
|
|
>
|
|
|
{workTypeDictList.map((item) => (
|
|
|
<Select.Option key={item.id} value={item.value}>
|