cnhis-design-vue 3.1.46-beta.28 → 3.1.46-beta.29
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/components/form-config/index.d.ts +6 -6
- package/es/components/form-config/src/FormConfig.vue.d.ts +6 -6
- package/es/components/form-config/src/components/FormConfigCreator.vue.d.ts +3 -3
- package/es/components/form-config/src/components/FormConfigEdit.vue.d.ts +3 -3
- package/es/components/form-render/index.d.ts +3 -3
- package/es/components/form-render/src/FormRender.vue.d.ts +2 -2
- package/es/components/form-render/src/FormRenderWrapper.vue.d.ts +3 -3
- package/es/components/form-render/src/hooks/useOperationalForm.d.ts +1 -1
- package/es/components/form-render/src/hooks/useOperationalForm.js +1 -1
- package/es/components/form-render/src/types/index.d.ts +1 -7
- package/es/components/iho-table/index.d.ts +12 -0
- package/es/components/iho-table/src/IhoTable.vue.d.ts +12 -0
- package/es/components/iho-table/src/plugins/index.js +1 -1
- package/es/components/iho-table/src/plugins/operationalFormPlugin/index.d.ts +1 -0
- package/es/components/iho-table/src/plugins/operationalFormPlugin/index.js +1 -0
- package/es/components/iho-table/src/types/index.d.ts +2 -1
- package/es/components/index.css +1 -1
- package/es/components/info-header/index.d.ts +10 -10
- package/es/components/info-header/src/InfoHeader.vue.d.ts +10 -10
- package/es/components/info-header/src/components/infoDescription/index.vue.d.ts +3 -3
- package/es/components/info-header/src/components/patientInfo/index.vue.d.ts +3 -3
- package/es/components/select-person/index.d.ts +105 -3
- package/es/components/select-person/src/SearchOrgAndStaff.vue.d.ts +88 -0
- package/es/components/select-person/src/SearchOrgAndStaff.vue.js +1 -0
- package/es/components/select-person/src/SearchOrgAndStaff.vue2.js +1 -0
- package/es/components/select-person/src/SelectPerson.vue.d.ts +105 -1
- package/es/components/select-person/src/SelectPerson.vue2.js +1 -1
- package/es/components/select-person/src/types/enums.d.ts +4 -0
- package/es/components/select-person/src/types/enums.js +1 -0
- package/es/components/select-person/src/utils/index.d.ts +1 -1
- package/es/components/select-person/src/utils/index.js +1 -1
- package/es/components/select-person/style/index.css +1 -1
- package/es/components/shortcut-setter/index.d.ts +3 -3
- package/es/components/shortcut-setter/src/ShortcutSetter.vue.d.ts +3 -3
- package/es/components/table-export-field/src/components/ExportModal.vue2.js +1 -1
- package/es/shared/package.json.js +1 -1
- package/es/shared/types/business.d.ts +6 -0
- package/es/shared/utils/business.d.ts +6 -1
- package/es/shared/utils/business.js +1 -1
- package/es/shared/utils/index.js +1 -1
- package/package.json +2 -2
|
@@ -150,7 +150,7 @@ declare const InfoHeader: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
150
150
|
linebarAutoHidden: boolean;
|
|
151
151
|
bordered: string | boolean;
|
|
152
152
|
uniqueCacheData: boolean;
|
|
153
|
-
operationalForm: import("
|
|
153
|
+
operationalForm: import("../../../es/shared/types").FormOperationalConfig[];
|
|
154
154
|
}>>>;
|
|
155
155
|
};
|
|
156
156
|
}, {
|
|
@@ -305,7 +305,7 @@ declare const InfoHeader: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
305
305
|
linebarAutoHidden: boolean;
|
|
306
306
|
bordered: string | boolean;
|
|
307
307
|
uniqueCacheData: boolean;
|
|
308
|
-
operationalForm: import("
|
|
308
|
+
operationalForm: import("../../../es/shared/types").FormOperationalConfig[];
|
|
309
309
|
}>>>;
|
|
310
310
|
};
|
|
311
311
|
}>> & {
|
|
@@ -470,7 +470,7 @@ declare const InfoHeader: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
470
470
|
linebarAutoHidden: boolean;
|
|
471
471
|
bordered: string | boolean;
|
|
472
472
|
uniqueCacheData: boolean;
|
|
473
|
-
operationalForm: import("
|
|
473
|
+
operationalForm: import("../../../es/shared/types").FormOperationalConfig[];
|
|
474
474
|
}>>;
|
|
475
475
|
};
|
|
476
476
|
themeOverrides: import("naive-ui").GlobalThemeOverrides;
|
|
@@ -2601,7 +2601,7 @@ declare const InfoHeader: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
2601
2601
|
type: import("vue").PropType<import("..").FormLowCodeReactions.Config[]>;
|
|
2602
2602
|
};
|
|
2603
2603
|
operationalForm: {
|
|
2604
|
-
type: import("vue").PropType<import("
|
|
2604
|
+
type: import("vue").PropType<import("../../../es/shared/types").FormOperationalConfig[]>;
|
|
2605
2605
|
};
|
|
2606
2606
|
linebarAutoHidden: {
|
|
2607
2607
|
type: BooleanConstructor;
|
|
@@ -2741,7 +2741,7 @@ declare const InfoHeader: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
2741
2741
|
type: import("vue").PropType<import("..").FormLowCodeReactions.Config[]>;
|
|
2742
2742
|
};
|
|
2743
2743
|
operationalForm: {
|
|
2744
|
-
type: import("vue").PropType<import("
|
|
2744
|
+
type: import("vue").PropType<import("../../../es/shared/types").FormOperationalConfig[]>;
|
|
2745
2745
|
};
|
|
2746
2746
|
linebarAutoHidden: {
|
|
2747
2747
|
type: BooleanConstructor;
|
|
@@ -3209,7 +3209,7 @@ declare const InfoHeader: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
3209
3209
|
type: import("vue").PropType<import("..").FormLowCodeReactions.Config[]>;
|
|
3210
3210
|
};
|
|
3211
3211
|
operationalForm: {
|
|
3212
|
-
type: import("vue").PropType<import("
|
|
3212
|
+
type: import("vue").PropType<import("../../../es/shared/types").FormOperationalConfig[]>;
|
|
3213
3213
|
};
|
|
3214
3214
|
linebarAutoHidden: {
|
|
3215
3215
|
type: BooleanConstructor;
|
|
@@ -3488,7 +3488,7 @@ declare const InfoHeader: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
3488
3488
|
type: import("vue").PropType<import("..").FormLowCodeReactions.Config[]>;
|
|
3489
3489
|
};
|
|
3490
3490
|
operationalForm: {
|
|
3491
|
-
type: import("vue").PropType<import("
|
|
3491
|
+
type: import("vue").PropType<import("../../../es/shared/types").FormOperationalConfig[]>;
|
|
3492
3492
|
};
|
|
3493
3493
|
linebarAutoHidden: {
|
|
3494
3494
|
type: BooleanConstructor;
|
|
@@ -3628,7 +3628,7 @@ declare const InfoHeader: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
3628
3628
|
type: import("vue").PropType<import("..").FormLowCodeReactions.Config[]>;
|
|
3629
3629
|
};
|
|
3630
3630
|
operationalForm: {
|
|
3631
|
-
type: import("vue").PropType<import("
|
|
3631
|
+
type: import("vue").PropType<import("../../../es/shared/types").FormOperationalConfig[]>;
|
|
3632
3632
|
};
|
|
3633
3633
|
linebarAutoHidden: {
|
|
3634
3634
|
type: BooleanConstructor;
|
|
@@ -4096,7 +4096,7 @@ declare const InfoHeader: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
4096
4096
|
type: import("vue").PropType<import("..").FormLowCodeReactions.Config[]>;
|
|
4097
4097
|
};
|
|
4098
4098
|
operationalForm: {
|
|
4099
|
-
type: import("vue").PropType<import("
|
|
4099
|
+
type: import("vue").PropType<import("../../../es/shared/types").FormOperationalConfig[]>;
|
|
4100
4100
|
};
|
|
4101
4101
|
linebarAutoHidden: {
|
|
4102
4102
|
type: BooleanConstructor;
|
|
@@ -4292,7 +4292,7 @@ declare const InfoHeader: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
4292
4292
|
linebarAutoHidden: boolean;
|
|
4293
4293
|
bordered: string | boolean;
|
|
4294
4294
|
uniqueCacheData: boolean;
|
|
4295
|
-
operationalForm: import("
|
|
4295
|
+
operationalForm: import("../../../es/shared/types").FormOperationalConfig[];
|
|
4296
4296
|
}>>>;
|
|
4297
4297
|
};
|
|
4298
4298
|
}>> & {
|
|
@@ -150,7 +150,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
150
150
|
linebarAutoHidden: boolean;
|
|
151
151
|
bordered: string | boolean;
|
|
152
152
|
uniqueCacheData: boolean;
|
|
153
|
-
operationalForm: import("../../../../es/
|
|
153
|
+
operationalForm: import("../../../../es/shared/types").FormOperationalConfig[];
|
|
154
154
|
}>>>;
|
|
155
155
|
};
|
|
156
156
|
}, {
|
|
@@ -303,7 +303,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
303
303
|
linebarAutoHidden: boolean;
|
|
304
304
|
bordered: string | boolean;
|
|
305
305
|
uniqueCacheData: boolean;
|
|
306
|
-
operationalForm: import("../../../../es/
|
|
306
|
+
operationalForm: import("../../../../es/shared/types").FormOperationalConfig[];
|
|
307
307
|
}>>>;
|
|
308
308
|
};
|
|
309
309
|
}>> & {
|
|
@@ -464,7 +464,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
464
464
|
linebarAutoHidden: boolean;
|
|
465
465
|
bordered: string | boolean;
|
|
466
466
|
uniqueCacheData: boolean;
|
|
467
|
-
operationalForm: import("../../../../es/
|
|
467
|
+
operationalForm: import("../../../../es/shared/types").FormOperationalConfig[];
|
|
468
468
|
}>>;
|
|
469
469
|
};
|
|
470
470
|
themeOverrides: import("naive-ui").GlobalThemeOverrides;
|
|
@@ -2595,7 +2595,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
2595
2595
|
type: PropType<import("../../../../es/components/form-render").FormLowCodeReactions.Config[]>;
|
|
2596
2596
|
};
|
|
2597
2597
|
operationalForm: {
|
|
2598
|
-
type: PropType<import("../../../../es/
|
|
2598
|
+
type: PropType<import("../../../../es/shared/types").FormOperationalConfig[]>;
|
|
2599
2599
|
};
|
|
2600
2600
|
linebarAutoHidden: {
|
|
2601
2601
|
type: BooleanConstructor;
|
|
@@ -2735,7 +2735,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
2735
2735
|
type: PropType<import("../../../../es/components/form-render").FormLowCodeReactions.Config[]>;
|
|
2736
2736
|
};
|
|
2737
2737
|
operationalForm: {
|
|
2738
|
-
type: PropType<import("../../../../es/
|
|
2738
|
+
type: PropType<import("../../../../es/shared/types").FormOperationalConfig[]>;
|
|
2739
2739
|
};
|
|
2740
2740
|
linebarAutoHidden: {
|
|
2741
2741
|
type: BooleanConstructor;
|
|
@@ -3203,7 +3203,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
3203
3203
|
type: PropType<import("../../../../es/components/form-render").FormLowCodeReactions.Config[]>;
|
|
3204
3204
|
};
|
|
3205
3205
|
operationalForm: {
|
|
3206
|
-
type: PropType<import("../../../../es/
|
|
3206
|
+
type: PropType<import("../../../../es/shared/types").FormOperationalConfig[]>;
|
|
3207
3207
|
};
|
|
3208
3208
|
linebarAutoHidden: {
|
|
3209
3209
|
type: BooleanConstructor;
|
|
@@ -3482,7 +3482,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
3482
3482
|
type: PropType<import("../../../../es/components/form-render").FormLowCodeReactions.Config[]>;
|
|
3483
3483
|
};
|
|
3484
3484
|
operationalForm: {
|
|
3485
|
-
type: PropType<import("../../../../es/
|
|
3485
|
+
type: PropType<import("../../../../es/shared/types").FormOperationalConfig[]>;
|
|
3486
3486
|
};
|
|
3487
3487
|
linebarAutoHidden: {
|
|
3488
3488
|
type: BooleanConstructor;
|
|
@@ -3622,7 +3622,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
3622
3622
|
type: PropType<import("../../../../es/components/form-render").FormLowCodeReactions.Config[]>;
|
|
3623
3623
|
};
|
|
3624
3624
|
operationalForm: {
|
|
3625
|
-
type: PropType<import("../../../../es/
|
|
3625
|
+
type: PropType<import("../../../../es/shared/types").FormOperationalConfig[]>;
|
|
3626
3626
|
};
|
|
3627
3627
|
linebarAutoHidden: {
|
|
3628
3628
|
type: BooleanConstructor;
|
|
@@ -4090,7 +4090,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
4090
4090
|
type: PropType<import("../../../../es/components/form-render").FormLowCodeReactions.Config[]>;
|
|
4091
4091
|
};
|
|
4092
4092
|
operationalForm: {
|
|
4093
|
-
type: PropType<import("../../../../es/
|
|
4093
|
+
type: PropType<import("../../../../es/shared/types").FormOperationalConfig[]>;
|
|
4094
4094
|
};
|
|
4095
4095
|
linebarAutoHidden: {
|
|
4096
4096
|
type: BooleanConstructor;
|
|
@@ -4284,7 +4284,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
4284
4284
|
linebarAutoHidden: boolean;
|
|
4285
4285
|
bordered: string | boolean;
|
|
4286
4286
|
uniqueCacheData: boolean;
|
|
4287
|
-
operationalForm: import("../../../../es/
|
|
4287
|
+
operationalForm: import("../../../../es/shared/types").FormOperationalConfig[];
|
|
4288
4288
|
}>>>;
|
|
4289
4289
|
};
|
|
4290
4290
|
}>> & {
|
|
@@ -2168,7 +2168,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
2168
2168
|
type: import("vue").PropType<import("../../../../../../es/components/form-render").FormLowCodeReactions.Config[]>;
|
|
2169
2169
|
};
|
|
2170
2170
|
operationalForm: {
|
|
2171
|
-
type: import("vue").PropType<import("../../../../../../es/
|
|
2171
|
+
type: import("vue").PropType<import("../../../../../../es/shared/types").FormOperationalConfig[]>;
|
|
2172
2172
|
};
|
|
2173
2173
|
linebarAutoHidden: {
|
|
2174
2174
|
type: BooleanConstructor;
|
|
@@ -2308,7 +2308,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
2308
2308
|
type: import("vue").PropType<import("../../../../../../es/components/form-render").FormLowCodeReactions.Config[]>;
|
|
2309
2309
|
};
|
|
2310
2310
|
operationalForm: {
|
|
2311
|
-
type: import("vue").PropType<import("../../../../../../es/
|
|
2311
|
+
type: import("vue").PropType<import("../../../../../../es/shared/types").FormOperationalConfig[]>;
|
|
2312
2312
|
};
|
|
2313
2313
|
linebarAutoHidden: {
|
|
2314
2314
|
type: BooleanConstructor;
|
|
@@ -2776,7 +2776,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
2776
2776
|
type: import("vue").PropType<import("../../../../../../es/components/form-render").FormLowCodeReactions.Config[]>;
|
|
2777
2777
|
};
|
|
2778
2778
|
operationalForm: {
|
|
2779
|
-
type: import("vue").PropType<import("../../../../../../es/
|
|
2779
|
+
type: import("vue").PropType<import("../../../../../../es/shared/types").FormOperationalConfig[]>;
|
|
2780
2780
|
};
|
|
2781
2781
|
linebarAutoHidden: {
|
|
2782
2782
|
type: BooleanConstructor;
|
|
@@ -180,7 +180,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
180
180
|
type: import("vue").PropType<import("../../../../../../es/components/form-render").FormLowCodeReactions.Config[]>;
|
|
181
181
|
};
|
|
182
182
|
operationalForm: {
|
|
183
|
-
type: import("vue").PropType<import("
|
|
183
|
+
type: import("vue").PropType<import("../../../..").FormOperationalConfig[]>;
|
|
184
184
|
};
|
|
185
185
|
linebarAutoHidden: {
|
|
186
186
|
type: BooleanConstructor;
|
|
@@ -320,7 +320,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
320
320
|
type: import("vue").PropType<import("../../../../../../es/components/form-render").FormLowCodeReactions.Config[]>;
|
|
321
321
|
};
|
|
322
322
|
operationalForm: {
|
|
323
|
-
type: import("vue").PropType<import("
|
|
323
|
+
type: import("vue").PropType<import("../../../..").FormOperationalConfig[]>;
|
|
324
324
|
};
|
|
325
325
|
linebarAutoHidden: {
|
|
326
326
|
type: BooleanConstructor;
|
|
@@ -788,7 +788,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
788
788
|
type: import("vue").PropType<import("../../../../../../es/components/form-render").FormLowCodeReactions.Config[]>;
|
|
789
789
|
};
|
|
790
790
|
operationalForm: {
|
|
791
|
-
type: import("vue").PropType<import("
|
|
791
|
+
type: import("vue").PropType<import("../../../..").FormOperationalConfig[]>;
|
|
792
792
|
};
|
|
793
793
|
linebarAutoHidden: {
|
|
794
794
|
type: BooleanConstructor;
|
|
@@ -179,9 +179,6 @@ declare const SelectPerson: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
179
179
|
allCheckedKeys: (string | number)[];
|
|
180
180
|
isRemote: import("vue").ComputedRef<boolean>;
|
|
181
181
|
checkStrategyResult: import("vue").ComputedRef<any>;
|
|
182
|
-
treeOriginSetting: import("vue").ComputedRef<import("naive-ui/es/tree/src/interface").TreeOptionBase & {
|
|
183
|
-
[k: string]: unknown;
|
|
184
|
-
} & import("../../../es/shared/types").AnyObject>;
|
|
185
182
|
init: () => void;
|
|
186
183
|
getallCheckedKeysWithChild: (item: import("naive-ui").TreeOption) => void;
|
|
187
184
|
getallCheckedKeysWithParent: (item: import("naive-ui").TreeOption) => void;
|
|
@@ -197,6 +194,7 @@ declare const SelectPerson: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
197
194
|
setAllCheckedKeys: (tree: import("naive-ui").TreeOption[]) => void;
|
|
198
195
|
setAllCheckedKeysWithChild: (tree: import("naive-ui").TreeOption[]) => void;
|
|
199
196
|
setAllCheckedKeysWithParent: (tree: import("naive-ui").TreeOption[]) => void;
|
|
197
|
+
searchSetting: () => string;
|
|
200
198
|
onSearch: () => Promise<void>;
|
|
201
199
|
onClear: () => void;
|
|
202
200
|
setTreeCheckd: (tree: import("naive-ui").TreeOption[], checked: boolean) => void;
|
|
@@ -437,6 +435,110 @@ declare const SelectPerson: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
437
435
|
treeData: any[];
|
|
438
436
|
checkedKeys: (string | number)[];
|
|
439
437
|
}>;
|
|
438
|
+
SearchOrgAndStaff: import("vue").DefineComponent<{
|
|
439
|
+
treeData: {
|
|
440
|
+
type: import("vue").PropType<any[]>;
|
|
441
|
+
default: () => never[];
|
|
442
|
+
};
|
|
443
|
+
checkedKeys: {
|
|
444
|
+
type: import("vue").PropType<(string | number)[]>;
|
|
445
|
+
default: () => never[];
|
|
446
|
+
};
|
|
447
|
+
}, {
|
|
448
|
+
$message: import("naive-ui").MessageApi;
|
|
449
|
+
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
|
450
|
+
treeData: {
|
|
451
|
+
type: import("vue").PropType<any[]>;
|
|
452
|
+
default: () => never[];
|
|
453
|
+
};
|
|
454
|
+
checkedKeys: {
|
|
455
|
+
type: import("vue").PropType<(string | number)[]>;
|
|
456
|
+
default: () => never[];
|
|
457
|
+
};
|
|
458
|
+
}>> & {
|
|
459
|
+
onNotifyCheck?: ((...args: any[]) => any) | undefined;
|
|
460
|
+
}>>;
|
|
461
|
+
emit: (event: "notifyCheck", ...args: any[]) => void;
|
|
462
|
+
staffDataRef: import("vue").ComputedRef<any[]>;
|
|
463
|
+
staffList: import("vue").Ref<import("@vueuse/core").UseVirtualListItem<any>[]>;
|
|
464
|
+
staffContainerProps: {
|
|
465
|
+
ref: import("vue").Ref<any>;
|
|
466
|
+
onScroll: () => void;
|
|
467
|
+
style: Partial<CSSStyleDeclaration>;
|
|
468
|
+
};
|
|
469
|
+
staffWrapperProps: import("vue").ComputedRef<{
|
|
470
|
+
style: {
|
|
471
|
+
width: string;
|
|
472
|
+
height: string;
|
|
473
|
+
marginTop: string;
|
|
474
|
+
};
|
|
475
|
+
}>;
|
|
476
|
+
staffContainerStyleWithHeight: import("vue").ComputedRef<import("vue").CSSProperties>;
|
|
477
|
+
orgDataRef: import("vue").ComputedRef<any[]>;
|
|
478
|
+
orgList: import("vue").Ref<import("@vueuse/core").UseVirtualListItem<any>[]>;
|
|
479
|
+
orgContainerProps: {
|
|
480
|
+
ref: import("vue").Ref<any>;
|
|
481
|
+
onScroll: () => void;
|
|
482
|
+
style: Partial<CSSStyleDeclaration>;
|
|
483
|
+
};
|
|
484
|
+
orgWrapperProps: import("vue").ComputedRef<{
|
|
485
|
+
style: {
|
|
486
|
+
width: string;
|
|
487
|
+
height: string;
|
|
488
|
+
marginTop: string;
|
|
489
|
+
};
|
|
490
|
+
}>;
|
|
491
|
+
orgContainerStyleWithHeight: import("vue").ComputedRef<import("vue").CSSProperties>;
|
|
492
|
+
searchCheckKeys: import("vue").Ref<(string | number)[]>;
|
|
493
|
+
showSelectKeys: import("vue").Ref<(string | number)[]>;
|
|
494
|
+
handleClick: (tree: any) => void;
|
|
495
|
+
handleStaffClick: (baseKeys: (string | number)[], currentTree: {
|
|
496
|
+
[key: string]: any;
|
|
497
|
+
key: string | number;
|
|
498
|
+
children: any[];
|
|
499
|
+
parentNode: any;
|
|
500
|
+
}, value: string | number) => false | undefined;
|
|
501
|
+
findParent: (baseKeys: (string | number)[], currentTree: {
|
|
502
|
+
[key: string]: any;
|
|
503
|
+
key: string | number;
|
|
504
|
+
children: any[];
|
|
505
|
+
parentNode: any;
|
|
506
|
+
}) => false | undefined;
|
|
507
|
+
handleOrgClick: (baseKeys: (string | number)[], currentTree: {
|
|
508
|
+
[key: string]: any;
|
|
509
|
+
key: string | number;
|
|
510
|
+
children: any[];
|
|
511
|
+
parentNode: any;
|
|
512
|
+
}, value: string | number) => void;
|
|
513
|
+
handleFindChildren: (treeList: {
|
|
514
|
+
[key: string]: any;
|
|
515
|
+
key: string | number;
|
|
516
|
+
children: any[];
|
|
517
|
+
parentNode: any;
|
|
518
|
+
}[]) => void;
|
|
519
|
+
checkInitTree: (tree: {
|
|
520
|
+
[key: string]: any;
|
|
521
|
+
key: string | number;
|
|
522
|
+
children: any[];
|
|
523
|
+
parentNode: any;
|
|
524
|
+
}, baseKey: string | number) => false | undefined;
|
|
525
|
+
ref: typeof import("vue").ref;
|
|
526
|
+
NEmpty: any;
|
|
527
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "notifyCheck"[], "notifyCheck", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
528
|
+
treeData: {
|
|
529
|
+
type: import("vue").PropType<any[]>;
|
|
530
|
+
default: () => never[];
|
|
531
|
+
};
|
|
532
|
+
checkedKeys: {
|
|
533
|
+
type: import("vue").PropType<(string | number)[]>;
|
|
534
|
+
default: () => never[];
|
|
535
|
+
};
|
|
536
|
+
}>> & {
|
|
537
|
+
onNotifyCheck?: ((...args: any[]) => any) | undefined;
|
|
538
|
+
}, {
|
|
539
|
+
treeData: any[];
|
|
540
|
+
checkedKeys: (string | number)[];
|
|
541
|
+
}>;
|
|
440
542
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("check" | "checkWithLevel")[], "check" | "checkWithLevel", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
441
543
|
defaultList: {
|
|
442
544
|
type: import("vue").PropType<((string | number) | {
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import { ref, PropType, CSSProperties } from 'vue';
|
|
2
|
+
declare type IKey = string | number;
|
|
3
|
+
declare type ITreeOption = {
|
|
4
|
+
key: IKey;
|
|
5
|
+
children: any[];
|
|
6
|
+
parentNode: any;
|
|
7
|
+
[key: string]: any;
|
|
8
|
+
};
|
|
9
|
+
declare const _default: import("vue").DefineComponent<{
|
|
10
|
+
treeData: {
|
|
11
|
+
type: PropType<any[]>;
|
|
12
|
+
default: () => never[];
|
|
13
|
+
};
|
|
14
|
+
checkedKeys: {
|
|
15
|
+
type: PropType<IKey[]>;
|
|
16
|
+
default: () => never[];
|
|
17
|
+
};
|
|
18
|
+
}, {
|
|
19
|
+
$message: import("naive-ui").MessageApi;
|
|
20
|
+
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
|
21
|
+
treeData: {
|
|
22
|
+
type: PropType<any[]>;
|
|
23
|
+
default: () => never[];
|
|
24
|
+
};
|
|
25
|
+
checkedKeys: {
|
|
26
|
+
type: PropType<IKey[]>;
|
|
27
|
+
default: () => never[];
|
|
28
|
+
};
|
|
29
|
+
}>> & {
|
|
30
|
+
onNotifyCheck?: ((...args: any[]) => any) | undefined;
|
|
31
|
+
}>>;
|
|
32
|
+
emit: (event: "notifyCheck", ...args: any[]) => void;
|
|
33
|
+
staffDataRef: import("vue").ComputedRef<any[]>;
|
|
34
|
+
staffList: import("vue").Ref<import("@vueuse/core").UseVirtualListItem<any>[]>;
|
|
35
|
+
staffContainerProps: {
|
|
36
|
+
ref: import("vue").Ref<any>;
|
|
37
|
+
onScroll: () => void;
|
|
38
|
+
style: Partial<CSSStyleDeclaration>;
|
|
39
|
+
};
|
|
40
|
+
staffWrapperProps: import("vue").ComputedRef<{
|
|
41
|
+
style: {
|
|
42
|
+
width: string;
|
|
43
|
+
height: string;
|
|
44
|
+
marginTop: string;
|
|
45
|
+
};
|
|
46
|
+
}>;
|
|
47
|
+
staffContainerStyleWithHeight: import("vue").ComputedRef<CSSProperties>;
|
|
48
|
+
orgDataRef: import("vue").ComputedRef<any[]>;
|
|
49
|
+
orgList: import("vue").Ref<import("@vueuse/core").UseVirtualListItem<any>[]>;
|
|
50
|
+
orgContainerProps: {
|
|
51
|
+
ref: import("vue").Ref<any>;
|
|
52
|
+
onScroll: () => void;
|
|
53
|
+
style: Partial<CSSStyleDeclaration>;
|
|
54
|
+
};
|
|
55
|
+
orgWrapperProps: import("vue").ComputedRef<{
|
|
56
|
+
style: {
|
|
57
|
+
width: string;
|
|
58
|
+
height: string;
|
|
59
|
+
marginTop: string;
|
|
60
|
+
};
|
|
61
|
+
}>;
|
|
62
|
+
orgContainerStyleWithHeight: import("vue").ComputedRef<CSSProperties>;
|
|
63
|
+
searchCheckKeys: import("vue").Ref<IKey[]>;
|
|
64
|
+
showSelectKeys: import("vue").Ref<(string | number)[]>;
|
|
65
|
+
handleClick: (tree: any) => void;
|
|
66
|
+
handleStaffClick: (baseKeys: (string | number)[], currentTree: ITreeOption, value: string | number) => false | undefined;
|
|
67
|
+
findParent: (baseKeys: (string | number)[], currentTree: ITreeOption) => false | undefined;
|
|
68
|
+
handleOrgClick: (baseKeys: (string | number)[], currentTree: ITreeOption, value: string | number) => void;
|
|
69
|
+
handleFindChildren: (treeList: ITreeOption[]) => void;
|
|
70
|
+
checkInitTree: (tree: ITreeOption, baseKey: string | number) => false | undefined;
|
|
71
|
+
ref: typeof ref;
|
|
72
|
+
NEmpty: any;
|
|
73
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "notifyCheck"[], "notifyCheck", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
74
|
+
treeData: {
|
|
75
|
+
type: PropType<any[]>;
|
|
76
|
+
default: () => never[];
|
|
77
|
+
};
|
|
78
|
+
checkedKeys: {
|
|
79
|
+
type: PropType<IKey[]>;
|
|
80
|
+
default: () => never[];
|
|
81
|
+
};
|
|
82
|
+
}>> & {
|
|
83
|
+
onNotifyCheck?: ((...args: any[]) => any) | undefined;
|
|
84
|
+
}, {
|
|
85
|
+
treeData: any[];
|
|
86
|
+
checkedKeys: IKey[];
|
|
87
|
+
}>;
|
|
88
|
+
export default _default;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import r from"./SearchOrgAndStaff.vue2.js";import e from"../../../_virtual/_plugin-vue_export-helper.js";var a=e(r,[["__file","SearchOrgAndStaff.vue"]]);export{a as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{defineComponent as e,computed as t,ref as l,watch as a,openBlock as r,createElementBlock as n,Fragment as i,unref as s,createElementVNode as c,normalizeStyle as o,renderList as d,normalizeClass as p,toDisplayString as h,createCommentVNode as u,createBlock as f}from"vue";import{useMessage as v,NEmpty as y}from"naive-ui";import{isEqual as k}from"lodash-es";import{useVirtualList as m}from"@vueuse/core";const g={class:"searchOrgAndStaff"},_={key:0,class:"searchOption"},N=c("h4",{class:"title"},"联系人",-1),S=["onClick"],D={class:"title"},b={class:"desc"},C={key:1,class:"SearchOption"},O=c("h4",{class:"title"},"部门",-1),x=["onClick"],A={class:"title"},K={class:"desc"};var P=e({__name:"SearchOrgAndStaff",props:{treeData:{type:Array,default:()=>[]},checkedKeys:{type:Array,default:()=>[]}},emits:["notifyCheck"],setup(e,{emit:P}){var w;const E=e,H=v(),T=null!=(w=t((()=>E.treeData.filter((e=>!e.children)))))?w:[],{list:W,containerProps:j,wrapperProps:q}=m(T,{itemHeight:62,overscan:5}),z=t((()=>({...j.style,height:"308px"}))),B=t((()=>E.treeData.filter((e=>e.children&&e.children.length>0)))),{list:F,containerProps:G,wrapperProps:I}=m(B,{itemHeight:62,overscan:5}),J=t((()=>({...G.style,height:"308px"}))),L=l(E.checkedKeys),M=l([]);function Q(e){var t;if(L.value.find((t=>t===e.key)))return void H.info("当前项已被选择");if(e.disabled)return void H.info("当前项已被禁用");switch((null==(t=e.children)?void 0:t.length)>0?"org":"staff"){case"org":l=L.value,a=e,r=e.key,R(l,a,r),a.children.length>0&&V(a.children);break;case"staff":R(L.value,e,e.key)}var l,a,r;P("notifyCheck",L.value)}function R(e,t,l){var a;if(!(null==t?void 0:t.parentNode))return L.value=[...e,l],!1;const r=null==(a=t.parentNode)?void 0:a.key;if(e.includes(r))return L.value=e,H.info("当前项已存在于选择的部门中"),!1;if(t.parentNode.children){const a=t.parentNode.children.every((t=>[...e,l].includes(t.key)));if(a){const l=null==t?void 0:t.parentNode.children.map((e=>e.key)),r=e.filter((e=>!l.includes(e)));return a&&U(r,t.parentNode),!1}}R(e,t.parentNode,l)}function U(e,t){if(!t.parentNode||t.parentNode.children.length>1)return L.value=[...e,t.key],!1;U(e,t.parentNode)}function V(e){e.forEach((e=>{var t;if(L.value.includes(e.key)){const t=L.value.indexOf(e.key);L.value.splice(t,1)}(null==(t=e.children)?void 0:t.length)>0&&V(e.children)}))}function X(e,t){const l=E.checkedKeys;return!!e&&(l.includes(e.key)?(M.value.push(t),!1):void X(e.parentNode,t))}return a((()=>E.treeData),(e=>{e&&e.length>0&&(M.value=[],e.forEach((e=>{X(e,e.key)})))}),{deep:!0,immediate:!0}),a((()=>E.checkedKeys),((e,t)=>{k(e,t)||E.treeData.length>0&&(M.value=[],L.value=e,E.treeData.forEach((e=>{X(e,e.key)})))}),{immediate:!0}),(t,l)=>(r(),n("div",g,[e.treeData.length>0?(r(),n(i,{key:0},[s(T).length>0?(r(),n("div",_,[N,c("section",{class:"select-person__multipleWrapper",ref:s(j).ref,style:o(s(W).length>5?s(z):{}),onScroll:l[0]||(l[0]=(...e)=>s(j).onScroll&&s(j).onScroll(...e))},[c("section",{style:o(s(q).style)},[(r(!0),n(i,null,d(s(W),(e=>(r(),n("div",{class:"select-person__multiple-search",key:e.data.key},[c("div",{class:p(["search_item",e.data.disabled?"search_disabled":""]),onClick:t=>Q(e.data)},[c("span",D,h(e.data.title),1),c("p",b,h(e.data.tempTitle),1)],10,S)])))),128))],4)],36)])):u("v-if",!0),s(B).length>0?(r(),n("div",C,[O,c("section",{class:"person__OrgWrapper",ref:s(G).ref,style:o(s(F).length>5?s(J):{}),onScroll:l[1]||(l[1]=(...e)=>s(G).onScroll&&s(G).onScroll(...e))},[c("section",{style:o(s(I).style)},[(r(!0),n(i,null,d(s(F),(e=>(r(),n("div",{class:"select-person__multiple-search",key:e.data.key},[c("div",{class:p(["search_item",e.data.disabled?"search_disabled":""]),onClick:t=>Q(e.data)},[c("span",A,h(e.data.title),1),c("p",K,h(e.data.tempTitle),1)],10,x)])))),128))],4)],36)])):u("v-if",!0)],64)):(r(),f(s(y),{key:1,description:"暂无数据"}))]))}});export{P as default};
|
|
@@ -167,7 +167,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
167
167
|
allCheckedKeys: IKey[];
|
|
168
168
|
isRemote: import("vue").ComputedRef<boolean>;
|
|
169
169
|
checkStrategyResult: import("vue").ComputedRef<any>;
|
|
170
|
-
treeOriginSetting: import("vue").ComputedRef<ITreeOption>;
|
|
171
170
|
init: () => void;
|
|
172
171
|
getallCheckedKeysWithChild: (item: TreeOption) => void;
|
|
173
172
|
getallCheckedKeysWithParent: (item: TreeOption) => void;
|
|
@@ -183,6 +182,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
183
182
|
setAllCheckedKeys: (tree: TreeOption[]) => void;
|
|
184
183
|
setAllCheckedKeysWithChild: (tree: TreeOption[]) => void;
|
|
185
184
|
setAllCheckedKeysWithParent: (tree: TreeOption[]) => void;
|
|
185
|
+
searchSetting: () => string;
|
|
186
186
|
onSearch: () => Promise<void>;
|
|
187
187
|
onClear: () => void;
|
|
188
188
|
setTreeCheckd: (tree: TreeOption[], checked: boolean) => void;
|
|
@@ -411,6 +411,110 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
411
411
|
treeData: any[];
|
|
412
412
|
checkedKeys: (string | number)[];
|
|
413
413
|
}>;
|
|
414
|
+
SearchOrgAndStaff: import("vue").DefineComponent<{
|
|
415
|
+
treeData: {
|
|
416
|
+
type: PropType<any[]>;
|
|
417
|
+
default: () => never[];
|
|
418
|
+
};
|
|
419
|
+
checkedKeys: {
|
|
420
|
+
type: PropType<(string | number)[]>;
|
|
421
|
+
default: () => never[];
|
|
422
|
+
};
|
|
423
|
+
}, {
|
|
424
|
+
$message: import("naive-ui").MessageApi;
|
|
425
|
+
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
|
426
|
+
treeData: {
|
|
427
|
+
type: PropType<any[]>;
|
|
428
|
+
default: () => never[];
|
|
429
|
+
};
|
|
430
|
+
checkedKeys: {
|
|
431
|
+
type: PropType<(string | number)[]>;
|
|
432
|
+
default: () => never[];
|
|
433
|
+
};
|
|
434
|
+
}>> & {
|
|
435
|
+
onNotifyCheck?: ((...args: any[]) => any) | undefined;
|
|
436
|
+
}>>;
|
|
437
|
+
emit: (event: "notifyCheck", ...args: any[]) => void;
|
|
438
|
+
staffDataRef: import("vue").ComputedRef<any[]>;
|
|
439
|
+
staffList: import("vue").Ref<import("@vueuse/core").UseVirtualListItem<any>[]>;
|
|
440
|
+
staffContainerProps: {
|
|
441
|
+
ref: import("vue").Ref<any>;
|
|
442
|
+
onScroll: () => void;
|
|
443
|
+
style: Partial<CSSStyleDeclaration>;
|
|
444
|
+
};
|
|
445
|
+
staffWrapperProps: import("vue").ComputedRef<{
|
|
446
|
+
style: {
|
|
447
|
+
width: string;
|
|
448
|
+
height: string;
|
|
449
|
+
marginTop: string;
|
|
450
|
+
};
|
|
451
|
+
}>;
|
|
452
|
+
staffContainerStyleWithHeight: import("vue").ComputedRef<import("vue").CSSProperties>;
|
|
453
|
+
orgDataRef: import("vue").ComputedRef<any[]>;
|
|
454
|
+
orgList: import("vue").Ref<import("@vueuse/core").UseVirtualListItem<any>[]>;
|
|
455
|
+
orgContainerProps: {
|
|
456
|
+
ref: import("vue").Ref<any>;
|
|
457
|
+
onScroll: () => void;
|
|
458
|
+
style: Partial<CSSStyleDeclaration>;
|
|
459
|
+
};
|
|
460
|
+
orgWrapperProps: import("vue").ComputedRef<{
|
|
461
|
+
style: {
|
|
462
|
+
width: string;
|
|
463
|
+
height: string;
|
|
464
|
+
marginTop: string;
|
|
465
|
+
};
|
|
466
|
+
}>;
|
|
467
|
+
orgContainerStyleWithHeight: import("vue").ComputedRef<import("vue").CSSProperties>;
|
|
468
|
+
searchCheckKeys: import("vue").Ref<(string | number)[]>;
|
|
469
|
+
showSelectKeys: import("vue").Ref<(string | number)[]>;
|
|
470
|
+
handleClick: (tree: any) => void;
|
|
471
|
+
handleStaffClick: (baseKeys: (string | number)[], currentTree: {
|
|
472
|
+
[key: string]: any;
|
|
473
|
+
key: string | number;
|
|
474
|
+
children: any[];
|
|
475
|
+
parentNode: any;
|
|
476
|
+
}, value: string | number) => false | undefined;
|
|
477
|
+
findParent: (baseKeys: (string | number)[], currentTree: {
|
|
478
|
+
[key: string]: any;
|
|
479
|
+
key: string | number;
|
|
480
|
+
children: any[];
|
|
481
|
+
parentNode: any;
|
|
482
|
+
}) => false | undefined;
|
|
483
|
+
handleOrgClick: (baseKeys: (string | number)[], currentTree: {
|
|
484
|
+
[key: string]: any;
|
|
485
|
+
key: string | number;
|
|
486
|
+
children: any[];
|
|
487
|
+
parentNode: any;
|
|
488
|
+
}, value: string | number) => void;
|
|
489
|
+
handleFindChildren: (treeList: {
|
|
490
|
+
[key: string]: any;
|
|
491
|
+
key: string | number;
|
|
492
|
+
children: any[];
|
|
493
|
+
parentNode: any;
|
|
494
|
+
}[]) => void;
|
|
495
|
+
checkInitTree: (tree: {
|
|
496
|
+
[key: string]: any;
|
|
497
|
+
key: string | number;
|
|
498
|
+
children: any[];
|
|
499
|
+
parentNode: any;
|
|
500
|
+
}, baseKey: string | number) => false | undefined;
|
|
501
|
+
ref: typeof ref;
|
|
502
|
+
NEmpty: any;
|
|
503
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "notifyCheck"[], "notifyCheck", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
504
|
+
treeData: {
|
|
505
|
+
type: PropType<any[]>;
|
|
506
|
+
default: () => never[];
|
|
507
|
+
};
|
|
508
|
+
checkedKeys: {
|
|
509
|
+
type: PropType<(string | number)[]>;
|
|
510
|
+
default: () => never[];
|
|
511
|
+
};
|
|
512
|
+
}>> & {
|
|
513
|
+
onNotifyCheck?: ((...args: any[]) => any) | undefined;
|
|
514
|
+
}, {
|
|
515
|
+
treeData: any[];
|
|
516
|
+
checkedKeys: (string | number)[];
|
|
517
|
+
}>;
|
|
414
518
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("check" | "checkWithLevel")[], "check" | "checkWithLevel", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
415
519
|
defaultList: {
|
|
416
520
|
type: PropType<(IKey | ITag)[]>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineComponent as e,ref as l,computed as t,watch as n,openBlock as a,createBlock as u,unref as i,withCtx as r,createVNode as c,withKeys as o,createTextVNode as d,toDisplayString as s,withDirectives as h,vShow as v,createCommentVNode as p,
|
|
1
|
+
import{defineComponent as e,ref as l,computed as t,watch as n,openBlock as a,createBlock as u,unref as i,withCtx as r,createVNode as c,withKeys as o,createTextVNode as d,toDisplayString as s,withDirectives as h,vShow as v,createCommentVNode as p,createElementBlock as f,Fragment as y,mergeProps as k,createElementVNode as m,renderList as g}from"vue";import{NGrid as b,NGi as _,NSpace as S,NInputGroup as C,NInput as w,NButton as L,NCheckbox as x,NTree as j,NIcon as T,NTooltip as N}from"naive-ui";import{CloseCircleSharp as I}from"@vicons/ionicons5";import{searchFilterTree as D,getExpandedKeys as $}from"./utils/index.js";import{cloneDeep as B}from"lodash-es";import{SearchTypeConfig as F}from"./types/enums.js";import K from"./SearchMultiple.vue.js";import O from"./SearchOrgAndStaff.vue.js";const q={key:0},A={class:"c-select-person__scroll",style:{height:"342px"}};var E=e({__name:"SelectPerson",props:{defaultList:{type:Array,default:()=>[]},data:{type:Array,default:()=>[]},searchPlaceholder:{type:String,default:"输入关键字搜索"},searchButtonText:{type:String,default:"搜索"},wordbook:{type:Object,default:()=>({})},wordbookChild:{type:Object,default:()=>({})},showCount:{type:Boolean,default:!0},showClear:{type:Boolean,default:!0},multiple:{type:Boolean,default:!0},searchInner:{type:Boolean,default:!1},isSearchFilter:{type:Boolean,default:!1},treeSetting:{type:Object,default:()=>({})},queryLoadChildData:{type:Function,default:void 0},queryTreeSearch:{type:Function,default:()=>Promise.resolve([])}},emits:["check","checkWithLevel"],setup(e,{expose:E,emit:P}){const R=e,U=l(""),W=l(!1),G=l([]),H=l([]),M=l([]),z=l([]),J=l([]),Q=l(!1),V=B(function e(l){return l.forEach((l=>{var t;if(null==(t=l.children)?void 0:t.length){const t=ie(l.children,[]);l.innerItemsNum=t.length,l.innerLeafs=t,e(l.children)}})),re(l,"")}(R.data));let X=[];const Y=t((()=>!!R.queryLoadChildData)),Z=t((()=>{var e,l;return null!=(l=null==(e=null==R?void 0:R.treeSetting)?void 0:e.checkStrategy)?l:"child"}));function ee(e){e.disabled||e.children||!e.key||X.push(e.key)}function le(e){e.disabled||e.tempTitle||!e.key||X.push(e.key)}async function te(e){if(R.queryLoadChildData){const l=await R.queryLoadChildData(e);return l.children&&(l.children=l.children.map((e=>({...e,tempTitle:l.tempTitle?`${l.title}/${l.tempTitle}`:l.title})))),l}return e}function ne(e){var l;(null==(l=e.children)?void 0:l.every((e=>e.disabled)))&&(e.disabled=!0)}function ae({option:e}){var l;if((null==(l=e.children)?void 0:l.length)||Y.value&&!(null==e?void 0:e.isLeaf)){const l=R.wordbook.user_count_obj&&e[R.wordbook.user_count_obj]||"",t=l?`(${l})`:"";return c("span",null,[`${e.title}${t}`])}return c(N,{trigger:"hover"},{default:()=>c("span",null,[e.title]),trigger:()=>c("span",null,[e.title])})}function ue(e){return e[R.wordbookChild.user_name_obj]||e[R.wordbook.parent_name_obj]||e.orgName||e.title||""}function ie(e,l){return e.forEach((e=>{var t;(null==(t=e.children)?void 0:t.length)?ie(e.children,l):!e.disabled&&l.push(e)})),l}function re(e,l){return e&&0!==e.length?e.map((e=>{var t;const n=ue(e),a=l?`${n}/${l}`:n;return{...e,tempTitle:l,children:(null==(t=e.children)?void 0:t.length)?re(null==e?void 0:e.children,a):[]}})):[]}async function ce(){if(Q.value=!!U.value.trim(),Y.value)M.value=await R.queryTreeSearch(U.value);else{const e=function(){const e={[F.SEARCH_ORG_STAFF]:R.isSearchFilter,[F.SEARCH_ORG]:R.searchInner},l=Object.keys(e).find((l=>e[l]));return null!=l?l:""}();M.value=D(e,V,U.value)}H.value=M.value.length&&U.value?$(M.value):[]}function oe(){setTimeout((()=>{ce()}))}function de(e,l){var t,n;switch(null!=(n=null==(t=null==R?void 0:R.treeSetting)?void 0:t.checkStrategy)?n:"child"){case"child":!function(e,l){for(let t=0,n=e.length;t<n;t++){const n=e[t];if(!n.disabled&&(!n.children||n.isLeaf)&&(l&&!G.value.includes(n.key)&&G.value.push(n.key),!l)){const e=G.value.findIndex((e=>e===n.key));G.value.splice(e,1)}n.children&&de(n.children,l)}}(e,l);break;case"parent":!function(e,l){G.value=[];for(let t=0,n=e.length;t<n;t++){const n=e[t];if(!n.disabled&&!n.tempTitle&&(l&&!G.value.includes(n.key)&&G.value.push(n.key),!l)){const e=G.value.findIndex((e=>e===n.key));G.value.splice(e,1)}}}(e,l)}}function se(e){de(M.value,e)}function he(e){var l;for(let t=0,n=e.length;t<n;t++){const n=e[t],a=J.value.map((e=>e.key));G.value.includes(n.key)&&!a.includes(n.key)&&z.value.push({key:n.key,name:n.title,parentName:n.tempTitle,innerItemsNum:n.innerItemsNum,innerLeafs:n.innerLeafs}),(null==(l=n.children)?void 0:l.length)&&he(n.children)}}function ve(e){G.value=e}function pe(){G.value=[]}function fe(e){G.value=e}return function e(l,t){var n,a,u,i;for(let r=0,c=l.length;r<c;r++){const c=l[r];switch(c.title=ue(c),c.label=ue(c),c.parentNode=t,c.key||(c.key=c[R.wordbookChild.user_id_obj]||c[R.wordbook.parent_id_obj]||Date.now()),(null==(n=c.children)?void 0:n.length)?(e(c.children,c),ne(c)):0===(null==(a=c.children)?void 0:a.length)&&Reflect.deleteProperty(c,"children"),null!=(i=null==(u=null==R?void 0:R.treeSetting)?void 0:u.checkStrategy)?i:"child"){case"child":ee(c);break;case"parent":le(c)}}}(V,null),M.value=V,R.defaultList.length>0&&(Y.value?(R.defaultList.forEach((e=>G.value.push(e.key))),z.value=B(R.defaultList),J.value=B(R.defaultList)):(R.defaultList.forEach((e=>G.value.push(e))),he(V))),n((()=>G),(e=>{z.value=J.value.filter((l=>e.value.includes(l.key))),e.value.length&&he(Y.value?M.value:V),W.value=X.every((e=>z.value.findIndex((l=>l.key===e))>-1));const l=z.value.filter((l=>e.value.includes(l.key)));P("check",e.value),P("checkWithLevel",l)}),{deep:!0}),E({getCheckWithLevel:function(){const e=G.value,l=z.value.filter((l=>e.includes(l.key)));return null!=l?l:[]}}),(l,t)=>(a(),u(i(b),{cols:2,class:"c-select-person"},{default:r((()=>[c(i(_),null,{default:r((()=>[c(i(S),{vertical:"",style:{"padding-right":"12px","border-right":"1px solid #e8e8e8"}},{default:r((()=>[c(i(C),{style:{"margin-bottom":"12px"}},{default:r((()=>[c(i(w),{clearable:"",value:U.value,"onUpdate:value":t[0]||(t[0]=e=>U.value=e),placeholder:e.searchPlaceholder,onClear:oe,onKeyup:o(ce,["enter"])},null,8,["value","placeholder","onKeyup"]),c(i(L),{type:"primary",onClick:ce},{default:r((()=>[d(s(e.searchButtonText),1)])),_:1})])),_:1}),e.multiple&&!Q.value?h((a(),u(i(x),{key:0,checked:W.value,"onUpdate:checked":[t[1]||(t[1]=e=>W.value=e),se]},{default:r((()=>[d(" 全选 ")])),_:1},8,["checked"])),[[v,i(X).length<1e3]]):p("v-if",!0),p(" 支持选人 "),e.searchInner&&e.multiple&&Q.value&&"parent"===i(Z)?(a(),u(K,{key:1,treeData:M.value,checkedKeys:G.value,onNotifyCheck:fe},null,8,["treeData","checkedKeys"])):e.isSearchFilter&&e.multiple&&Q.value&&"parent"===i(Z)?(a(),f(y,{key:2},[p(" 同时兼容选人和选部门 "),c(O,{treeData:M.value,checkedKeys:G.value,onNotifyCheck:fe},null,8,["treeData","checkedKeys"])],2112)):(a(),u(i(j),k({key:3,"virtual-scroll":"",class:"c-select-person__scroll","checked-keys":G.value,"expanded-keys":H.value,"onUpdate:expanded-keys":t[2]||(t[2]=e=>H.value=e),checkable:e.multiple,cascade:"","allow-checking-not-loaded":"",selectable:!e.multiple,"selected-keys":G.value,"onUpdate:selected-keys":t[3]||(t[3]=e=>G.value=e),data:M.value,"check-strategy":"child","render-label":ae},e.treeSetting,{"onUpdate:checkedKeys":ve,onLoad:te}),null,16,["checked-keys","expanded-keys","checkable","selectable","selected-keys","data"]))])),_:1})])),_:1}),c(i(_),null,{default:r((()=>[c(i(S),{vertical:"",style:{"padding-left":"12px"}},{default:r((()=>[c(i(S),{justify:"space-between",style:{"margin-bottom":"20px"}},{default:r((()=>[e.showCount?(a(),f("span",q,"已选择:"+s(z.value.length),1)):p("v-if",!0),e.showClear?(a(),f("span",{key:1,class:"c-select-person__clear-btn",onClick:pe},"清空")):p("v-if",!0)])),_:1}),m("div",A,[(a(!0),f(y,null,g(z.value,(e=>(a(),f("span",{class:"c-select-person__tag-item",key:e.key},[d(s(e.name)+" "+s(e.parentName?`(${e.parentName})`:"")+" "+s(e.innerItemsNum?`(${e.innerItemsNum})`:"")+" ",1),c(i(T),{class:"tag-close",component:i(I),onClick:l=>function(e){G.value=G.value.filter((l=>l!==e.key))}(e)},null,8,["component","onClick"])])))),128))])])),_:1})])),_:1})])),_:1}))}});export{E as default};
|