inl-ui 0.1.72 → 0.1.73
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/dist/components/index.cjs +122 -96
- package/dist/components/index.d.ts +22 -1
- package/dist/components/index.js +122 -96
- package/dist/index.cjs +183 -99
- package/dist/index.d.ts +23 -2
- package/dist/index.js +183 -99
- package/package.json +2 -2
|
@@ -11296,7 +11296,7 @@ const defaultPropNames = {
|
|
|
11296
11296
|
peopleUserName: "userName"
|
|
11297
11297
|
};
|
|
11298
11298
|
const PeopleSelect = vue.defineComponent({
|
|
11299
|
-
emits: ["update:value"],
|
|
11299
|
+
emits: ["update:value", "update:open", "change", "close"],
|
|
11300
11300
|
props: {
|
|
11301
11301
|
list: {
|
|
11302
11302
|
type: Array,
|
|
@@ -11306,6 +11306,14 @@ const PeopleSelect = vue.defineComponent({
|
|
|
11306
11306
|
type: Array,
|
|
11307
11307
|
default: () => []
|
|
11308
11308
|
},
|
|
11309
|
+
open: {
|
|
11310
|
+
type: Boolean,
|
|
11311
|
+
default: void 0
|
|
11312
|
+
},
|
|
11313
|
+
renderBtn: {
|
|
11314
|
+
type: Boolean,
|
|
11315
|
+
default: true
|
|
11316
|
+
},
|
|
11309
11317
|
buttonText: {
|
|
11310
11318
|
type: String,
|
|
11311
11319
|
default: "\u6DFB\u52A0\u4EBA\u5458"
|
|
@@ -11336,7 +11344,11 @@ const PeopleSelect = vue.defineComponent({
|
|
|
11336
11344
|
}) {
|
|
11337
11345
|
const mixPropNames = Object.assign(defaultPropNames, props.propNames);
|
|
11338
11346
|
vue.provide("propNames", mixPropNames);
|
|
11339
|
-
const
|
|
11347
|
+
const modalOpen = vue.ref(false);
|
|
11348
|
+
vue.watch(() => props.open, val => {
|
|
11349
|
+
if (val === void 0) return;
|
|
11350
|
+
modalOpen.value = val;
|
|
11351
|
+
});
|
|
11340
11352
|
const formatList = vue.computed(() => {
|
|
11341
11353
|
const copyList = ___default["default"].cloneDeep(props.list);
|
|
11342
11354
|
formatTree(copyList, props.renderNameTree, mixPropNames.peopleList, mixPropNames.peopleId);
|
|
@@ -11355,8 +11367,8 @@ const PeopleSelect = vue.defineComponent({
|
|
|
11355
11367
|
const initSelect = () => {
|
|
11356
11368
|
selectPeopleList.value = getUserListById(formatList.value, props.value, mixPropNames.peopleId);
|
|
11357
11369
|
};
|
|
11358
|
-
vue.watch([() => props.value, formatList,
|
|
11359
|
-
if (
|
|
11370
|
+
vue.watch([() => props.value, formatList, modalOpen], () => {
|
|
11371
|
+
if (modalOpen.value) initSelect();
|
|
11360
11372
|
});
|
|
11361
11373
|
const selectedKeys = vue.computed(() => selectPeopleList.value.map(item => item.id));
|
|
11362
11374
|
const handleSelect = (val, e) => {
|
|
@@ -11408,100 +11420,114 @@ const PeopleSelect = vue.defineComponent({
|
|
|
11408
11420
|
const handleCommit = () => {
|
|
11409
11421
|
const idList = selectPeopleList.value.map(item => item[mixPropNames.peopleId]);
|
|
11410
11422
|
emit("update:value", idList);
|
|
11411
|
-
|
|
11423
|
+
emit("change", idList);
|
|
11424
|
+
modalOpen.value = false;
|
|
11425
|
+
emit("update:open", modalOpen.value);
|
|
11412
11426
|
};
|
|
11413
|
-
const onClose = () =>
|
|
11414
|
-
|
|
11415
|
-
"
|
|
11416
|
-
}
|
|
11417
|
-
|
|
11418
|
-
|
|
11419
|
-
|
|
11420
|
-
|
|
11421
|
-
|
|
11422
|
-
|
|
11423
|
-
|
|
11424
|
-
|
|
11425
|
-
|
|
11426
|
-
|
|
11427
|
-
|
|
11428
|
-
|
|
11429
|
-
|
|
11430
|
-
|
|
11431
|
-
"
|
|
11432
|
-
|
|
11433
|
-
|
|
11434
|
-
"
|
|
11435
|
-
|
|
11436
|
-
"
|
|
11437
|
-
|
|
11438
|
-
"
|
|
11439
|
-
"
|
|
11440
|
-
"
|
|
11441
|
-
|
|
11442
|
-
"
|
|
11443
|
-
"zoomedDep": zoomedList.value?.[0],
|
|
11444
|
-
"onCheck": handleSelectNode
|
|
11445
|
-
}, null), vue.createVNode(vue.resolveComponent("a-tree"), {
|
|
11446
|
-
"class": "tree",
|
|
11447
|
-
"checkable": true,
|
|
11448
|
-
"showLine": true,
|
|
11449
|
-
"blockNode": true,
|
|
11450
|
-
"autoExpandParent": true,
|
|
11451
|
-
"fieldNames": {
|
|
11452
|
-
children: "subList",
|
|
11453
|
-
key: "id",
|
|
11454
|
-
title: "name"
|
|
11455
|
-
},
|
|
11456
|
-
"treeData": zoomedList.value || formatList.value,
|
|
11457
|
-
"checkedKeys": selectedKeys.value,
|
|
11458
|
-
"onCheck": handleSelect,
|
|
11459
|
-
"onSelect": (keys, {
|
|
11460
|
-
node
|
|
11461
|
-
}) => handleSelectNode(node),
|
|
11462
|
-
"expandedKeys": expandKeys.value,
|
|
11463
|
-
"onUpdate:expandedKeys": $event => expandKeys.value = $event
|
|
11464
|
-
}, {
|
|
11465
|
-
title: node => vue.createVNode("div", {
|
|
11466
|
-
"class": "node-title"
|
|
11467
|
-
}, [vue.createVNode("span", {
|
|
11468
|
-
"class": "name"
|
|
11469
|
-
}, [node.name]), node.isDep && vue.createVNode("span", {
|
|
11470
|
-
"class": "count"
|
|
11471
|
-
}, [node.peopleCount, "\u4EBA"])])
|
|
11472
|
-
})]), vue.createVNode("div", {
|
|
11473
|
-
"class": "right"
|
|
11474
|
-
}, [vue.createVNode("div", {
|
|
11475
|
-
"class": "header"
|
|
11476
|
-
}, [vue.createVNode("h2", {
|
|
11477
|
-
"class": "title"
|
|
11478
|
-
}, ["\u5DF2\u9009\u4EBA\u5458", vue.createVNode("span", {
|
|
11479
|
-
"class": "select-text"
|
|
11480
|
-
}, ["\uFF08\u5DF2\u9009\u62E9", vue.createVNode("em", null, [selectPeopleList.value.length]), "\u4EBA\uFF09"])]), vue.createVNode(vue.resolveComponent("a-button"), {
|
|
11481
|
-
"type": "link",
|
|
11482
|
-
"disabled": !selectPeopleList.value.length,
|
|
11483
|
-
"onClick": handleClear
|
|
11427
|
+
const onClose = () => {
|
|
11428
|
+
selectPeopleList.value = [];
|
|
11429
|
+
emit("close");
|
|
11430
|
+
};
|
|
11431
|
+
return () => {
|
|
11432
|
+
let trigger = null;
|
|
11433
|
+
if (props.renderBtn || slots.default) {
|
|
11434
|
+
trigger = vue.createVNode("div", {
|
|
11435
|
+
"style": "display: inline-block;",
|
|
11436
|
+
"onClick": () => {
|
|
11437
|
+
modalOpen.value = true;
|
|
11438
|
+
}
|
|
11439
|
+
}, [typeof slots.default === "function" ? slots.default() : vue.createVNode(vue.resolveComponent("a-button"), {
|
|
11440
|
+
"type": "primary"
|
|
11441
|
+
}, {
|
|
11442
|
+
default: () => [props.buttonText]
|
|
11443
|
+
})]);
|
|
11444
|
+
}
|
|
11445
|
+
return vue.createVNode("div", {
|
|
11446
|
+
"class": "people-select-cpn"
|
|
11447
|
+
}, [trigger, vue.createVNode(vue.resolveComponent("a-modal"), {
|
|
11448
|
+
"wrapClassName": "people-select-cpn-modal",
|
|
11449
|
+
"title": "\u6DFB\u52A0\u4EBA\u5458",
|
|
11450
|
+
"centered": true,
|
|
11451
|
+
"width": 900,
|
|
11452
|
+
"onOk": handleCommit,
|
|
11453
|
+
"onCancel": () => emit("update:open", false),
|
|
11454
|
+
"afterClose": onClose,
|
|
11455
|
+
"visible": modalOpen.value,
|
|
11456
|
+
"onUpdate:visible": $event => modalOpen.value = $event
|
|
11484
11457
|
}, {
|
|
11485
|
-
default: () => ["
|
|
11486
|
-
|
|
11487
|
-
"
|
|
11488
|
-
|
|
11489
|
-
|
|
11490
|
-
|
|
11491
|
-
"
|
|
11492
|
-
"
|
|
11493
|
-
|
|
11494
|
-
|
|
11495
|
-
|
|
11496
|
-
|
|
11497
|
-
|
|
11498
|
-
|
|
11499
|
-
|
|
11500
|
-
|
|
11501
|
-
|
|
11502
|
-
|
|
11503
|
-
|
|
11504
|
-
|
|
11458
|
+
default: () => [vue.createVNode("div", {
|
|
11459
|
+
"class": "container"
|
|
11460
|
+
}, [vue.createVNode("div", {
|
|
11461
|
+
"class": "left"
|
|
11462
|
+
}, [vue.createVNode(SearchPeopleInput, {
|
|
11463
|
+
"list": formatList.value,
|
|
11464
|
+
"renderName": props.renderNameSearch,
|
|
11465
|
+
"onSelect": handleSelect
|
|
11466
|
+
}, null), vue.createVNode(DepBreadcrumb, {
|
|
11467
|
+
"list": formatList.value,
|
|
11468
|
+
"zoomedDep": zoomedList.value?.[0],
|
|
11469
|
+
"onCheck": handleSelectNode
|
|
11470
|
+
}, null), vue.createVNode(vue.resolveComponent("a-tree"), {
|
|
11471
|
+
"class": "tree",
|
|
11472
|
+
"checkable": true,
|
|
11473
|
+
"showLine": true,
|
|
11474
|
+
"blockNode": true,
|
|
11475
|
+
"autoExpandParent": true,
|
|
11476
|
+
"fieldNames": {
|
|
11477
|
+
children: "subList",
|
|
11478
|
+
key: "id",
|
|
11479
|
+
title: "name"
|
|
11480
|
+
},
|
|
11481
|
+
"treeData": zoomedList.value || formatList.value,
|
|
11482
|
+
"checkedKeys": selectedKeys.value,
|
|
11483
|
+
"onCheck": handleSelect,
|
|
11484
|
+
"onSelect": (keys, {
|
|
11485
|
+
node
|
|
11486
|
+
}) => handleSelectNode(node),
|
|
11487
|
+
"expandedKeys": expandKeys.value,
|
|
11488
|
+
"onUpdate:expandedKeys": $event => expandKeys.value = $event
|
|
11489
|
+
}, {
|
|
11490
|
+
title: node => vue.createVNode("div", {
|
|
11491
|
+
"class": "node-title"
|
|
11492
|
+
}, [vue.createVNode("span", {
|
|
11493
|
+
"class": "name"
|
|
11494
|
+
}, [node.name]), node.isDep && vue.createVNode("span", {
|
|
11495
|
+
"class": "count"
|
|
11496
|
+
}, [node.peopleCount, "\u4EBA"])])
|
|
11497
|
+
})]), vue.createVNode("div", {
|
|
11498
|
+
"class": "right"
|
|
11499
|
+
}, [vue.createVNode("div", {
|
|
11500
|
+
"class": "header"
|
|
11501
|
+
}, [vue.createVNode("h2", {
|
|
11502
|
+
"class": "title"
|
|
11503
|
+
}, ["\u5DF2\u9009\u4EBA\u5458", vue.createVNode("span", {
|
|
11504
|
+
"class": "select-text"
|
|
11505
|
+
}, ["\uFF08\u5DF2\u9009\u62E9", vue.createVNode("em", null, [selectPeopleList.value.length]), "\u4EBA\uFF09"])]), vue.createVNode(vue.resolveComponent("a-button"), {
|
|
11506
|
+
"type": "link",
|
|
11507
|
+
"disabled": !selectPeopleList.value.length,
|
|
11508
|
+
"onClick": handleClear
|
|
11509
|
+
}, {
|
|
11510
|
+
default: () => ["\u6E05\u7A7A"]
|
|
11511
|
+
})]), vue.createVNode("div", {
|
|
11512
|
+
"class": "selected-container"
|
|
11513
|
+
}, [selectPeopleList.value.length ? selectPeopleList.value.map(people => {
|
|
11514
|
+
let _slot;
|
|
11515
|
+
return vue.createVNode(vue.resolveComponent("a-tag"), {
|
|
11516
|
+
"key": people.userId,
|
|
11517
|
+
"closable": true,
|
|
11518
|
+
"onClose": () => handleDelete(people)
|
|
11519
|
+
}, _isSlot$6(_slot = props.renderNameTag(people)) ? _slot : {
|
|
11520
|
+
default: () => [_slot]
|
|
11521
|
+
});
|
|
11522
|
+
}) : vue.createVNode(vue.resolveComponent("a-empty"), {
|
|
11523
|
+
"style": {
|
|
11524
|
+
width: "100%",
|
|
11525
|
+
paddingTop: "10%"
|
|
11526
|
+
},
|
|
11527
|
+
"description": "\u6682\u65E0"
|
|
11528
|
+
}, null)])])])]
|
|
11529
|
+
})]);
|
|
11530
|
+
};
|
|
11505
11531
|
}
|
|
11506
11532
|
});
|
|
11507
11533
|
var index$3 = installComponent(PeopleSelect, "people-select");
|
|
@@ -848,6 +848,14 @@ declare const _default$3: vue.DefineComponent<{
|
|
|
848
848
|
type: PropType<string[]>;
|
|
849
849
|
default: () => never[];
|
|
850
850
|
};
|
|
851
|
+
open: {
|
|
852
|
+
type: BooleanConstructor;
|
|
853
|
+
default: undefined;
|
|
854
|
+
};
|
|
855
|
+
renderBtn: {
|
|
856
|
+
type: BooleanConstructor;
|
|
857
|
+
default: boolean;
|
|
858
|
+
};
|
|
851
859
|
buttonText: {
|
|
852
860
|
type: StringConstructor;
|
|
853
861
|
default: string;
|
|
@@ -868,7 +876,7 @@ declare const _default$3: vue.DefineComponent<{
|
|
|
868
876
|
type: PropType<RenderName>;
|
|
869
877
|
default: (people: any, dep: any) => string;
|
|
870
878
|
};
|
|
871
|
-
}, () => vue_jsx_runtime.JSX.Element, unknown, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, "update:value"[], "update:value", vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<vue.ExtractPropTypes<{
|
|
879
|
+
}, () => vue_jsx_runtime.JSX.Element, unknown, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, ("change" | "close" | "update:value" | "update:open")[], "change" | "close" | "update:value" | "update:open", vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<vue.ExtractPropTypes<{
|
|
872
880
|
list: {
|
|
873
881
|
type: PropType<any[]>;
|
|
874
882
|
default: () => never[];
|
|
@@ -877,6 +885,14 @@ declare const _default$3: vue.DefineComponent<{
|
|
|
877
885
|
type: PropType<string[]>;
|
|
878
886
|
default: () => never[];
|
|
879
887
|
};
|
|
888
|
+
open: {
|
|
889
|
+
type: BooleanConstructor;
|
|
890
|
+
default: undefined;
|
|
891
|
+
};
|
|
892
|
+
renderBtn: {
|
|
893
|
+
type: BooleanConstructor;
|
|
894
|
+
default: boolean;
|
|
895
|
+
};
|
|
880
896
|
buttonText: {
|
|
881
897
|
type: StringConstructor;
|
|
882
898
|
default: string;
|
|
@@ -898,10 +914,15 @@ declare const _default$3: vue.DefineComponent<{
|
|
|
898
914
|
default: (people: any, dep: any) => string;
|
|
899
915
|
};
|
|
900
916
|
}>> & {
|
|
917
|
+
onChange?: ((...args: any[]) => any) | undefined;
|
|
918
|
+
onClose?: ((...args: any[]) => any) | undefined;
|
|
901
919
|
"onUpdate:value"?: ((...args: any[]) => any) | undefined;
|
|
920
|
+
"onUpdate:open"?: ((...args: any[]) => any) | undefined;
|
|
902
921
|
}, {
|
|
903
922
|
value: string[];
|
|
904
923
|
list: any[];
|
|
924
|
+
open: boolean;
|
|
925
|
+
renderBtn: boolean;
|
|
905
926
|
buttonText: string;
|
|
906
927
|
propNames: PropNames;
|
|
907
928
|
renderNameTree: RenderName;
|
package/dist/components/index.js
CHANGED
|
@@ -11268,7 +11268,7 @@ const defaultPropNames = {
|
|
|
11268
11268
|
peopleUserName: "userName"
|
|
11269
11269
|
};
|
|
11270
11270
|
const PeopleSelect = defineComponent({
|
|
11271
|
-
emits: ["update:value"],
|
|
11271
|
+
emits: ["update:value", "update:open", "change", "close"],
|
|
11272
11272
|
props: {
|
|
11273
11273
|
list: {
|
|
11274
11274
|
type: Array,
|
|
@@ -11278,6 +11278,14 @@ const PeopleSelect = defineComponent({
|
|
|
11278
11278
|
type: Array,
|
|
11279
11279
|
default: () => []
|
|
11280
11280
|
},
|
|
11281
|
+
open: {
|
|
11282
|
+
type: Boolean,
|
|
11283
|
+
default: void 0
|
|
11284
|
+
},
|
|
11285
|
+
renderBtn: {
|
|
11286
|
+
type: Boolean,
|
|
11287
|
+
default: true
|
|
11288
|
+
},
|
|
11281
11289
|
buttonText: {
|
|
11282
11290
|
type: String,
|
|
11283
11291
|
default: "\u6DFB\u52A0\u4EBA\u5458"
|
|
@@ -11308,7 +11316,11 @@ const PeopleSelect = defineComponent({
|
|
|
11308
11316
|
}) {
|
|
11309
11317
|
const mixPropNames = Object.assign(defaultPropNames, props.propNames);
|
|
11310
11318
|
provide("propNames", mixPropNames);
|
|
11311
|
-
const
|
|
11319
|
+
const modalOpen = ref(false);
|
|
11320
|
+
watch(() => props.open, val => {
|
|
11321
|
+
if (val === void 0) return;
|
|
11322
|
+
modalOpen.value = val;
|
|
11323
|
+
});
|
|
11312
11324
|
const formatList = computed(() => {
|
|
11313
11325
|
const copyList = _.cloneDeep(props.list);
|
|
11314
11326
|
formatTree(copyList, props.renderNameTree, mixPropNames.peopleList, mixPropNames.peopleId);
|
|
@@ -11327,8 +11339,8 @@ const PeopleSelect = defineComponent({
|
|
|
11327
11339
|
const initSelect = () => {
|
|
11328
11340
|
selectPeopleList.value = getUserListById(formatList.value, props.value, mixPropNames.peopleId);
|
|
11329
11341
|
};
|
|
11330
|
-
watch([() => props.value, formatList,
|
|
11331
|
-
if (
|
|
11342
|
+
watch([() => props.value, formatList, modalOpen], () => {
|
|
11343
|
+
if (modalOpen.value) initSelect();
|
|
11332
11344
|
});
|
|
11333
11345
|
const selectedKeys = computed(() => selectPeopleList.value.map(item => item.id));
|
|
11334
11346
|
const handleSelect = (val, e) => {
|
|
@@ -11380,100 +11392,114 @@ const PeopleSelect = defineComponent({
|
|
|
11380
11392
|
const handleCommit = () => {
|
|
11381
11393
|
const idList = selectPeopleList.value.map(item => item[mixPropNames.peopleId]);
|
|
11382
11394
|
emit("update:value", idList);
|
|
11383
|
-
|
|
11395
|
+
emit("change", idList);
|
|
11396
|
+
modalOpen.value = false;
|
|
11397
|
+
emit("update:open", modalOpen.value);
|
|
11384
11398
|
};
|
|
11385
|
-
const onClose = () =>
|
|
11386
|
-
|
|
11387
|
-
"
|
|
11388
|
-
}
|
|
11389
|
-
|
|
11390
|
-
|
|
11391
|
-
|
|
11392
|
-
|
|
11393
|
-
|
|
11394
|
-
|
|
11395
|
-
|
|
11396
|
-
|
|
11397
|
-
|
|
11398
|
-
|
|
11399
|
-
|
|
11400
|
-
|
|
11401
|
-
|
|
11402
|
-
|
|
11403
|
-
"
|
|
11404
|
-
|
|
11405
|
-
|
|
11406
|
-
"
|
|
11407
|
-
|
|
11408
|
-
"
|
|
11409
|
-
|
|
11410
|
-
"
|
|
11411
|
-
"
|
|
11412
|
-
"
|
|
11413
|
-
|
|
11414
|
-
"
|
|
11415
|
-
"zoomedDep": zoomedList.value?.[0],
|
|
11416
|
-
"onCheck": handleSelectNode
|
|
11417
|
-
}, null), createVNode(resolveComponent("a-tree"), {
|
|
11418
|
-
"class": "tree",
|
|
11419
|
-
"checkable": true,
|
|
11420
|
-
"showLine": true,
|
|
11421
|
-
"blockNode": true,
|
|
11422
|
-
"autoExpandParent": true,
|
|
11423
|
-
"fieldNames": {
|
|
11424
|
-
children: "subList",
|
|
11425
|
-
key: "id",
|
|
11426
|
-
title: "name"
|
|
11427
|
-
},
|
|
11428
|
-
"treeData": zoomedList.value || formatList.value,
|
|
11429
|
-
"checkedKeys": selectedKeys.value,
|
|
11430
|
-
"onCheck": handleSelect,
|
|
11431
|
-
"onSelect": (keys, {
|
|
11432
|
-
node
|
|
11433
|
-
}) => handleSelectNode(node),
|
|
11434
|
-
"expandedKeys": expandKeys.value,
|
|
11435
|
-
"onUpdate:expandedKeys": $event => expandKeys.value = $event
|
|
11436
|
-
}, {
|
|
11437
|
-
title: node => createVNode("div", {
|
|
11438
|
-
"class": "node-title"
|
|
11439
|
-
}, [createVNode("span", {
|
|
11440
|
-
"class": "name"
|
|
11441
|
-
}, [node.name]), node.isDep && createVNode("span", {
|
|
11442
|
-
"class": "count"
|
|
11443
|
-
}, [node.peopleCount, "\u4EBA"])])
|
|
11444
|
-
})]), createVNode("div", {
|
|
11445
|
-
"class": "right"
|
|
11446
|
-
}, [createVNode("div", {
|
|
11447
|
-
"class": "header"
|
|
11448
|
-
}, [createVNode("h2", {
|
|
11449
|
-
"class": "title"
|
|
11450
|
-
}, ["\u5DF2\u9009\u4EBA\u5458", createVNode("span", {
|
|
11451
|
-
"class": "select-text"
|
|
11452
|
-
}, ["\uFF08\u5DF2\u9009\u62E9", createVNode("em", null, [selectPeopleList.value.length]), "\u4EBA\uFF09"])]), createVNode(resolveComponent("a-button"), {
|
|
11453
|
-
"type": "link",
|
|
11454
|
-
"disabled": !selectPeopleList.value.length,
|
|
11455
|
-
"onClick": handleClear
|
|
11399
|
+
const onClose = () => {
|
|
11400
|
+
selectPeopleList.value = [];
|
|
11401
|
+
emit("close");
|
|
11402
|
+
};
|
|
11403
|
+
return () => {
|
|
11404
|
+
let trigger = null;
|
|
11405
|
+
if (props.renderBtn || slots.default) {
|
|
11406
|
+
trigger = createVNode("div", {
|
|
11407
|
+
"style": "display: inline-block;",
|
|
11408
|
+
"onClick": () => {
|
|
11409
|
+
modalOpen.value = true;
|
|
11410
|
+
}
|
|
11411
|
+
}, [typeof slots.default === "function" ? slots.default() : createVNode(resolveComponent("a-button"), {
|
|
11412
|
+
"type": "primary"
|
|
11413
|
+
}, {
|
|
11414
|
+
default: () => [props.buttonText]
|
|
11415
|
+
})]);
|
|
11416
|
+
}
|
|
11417
|
+
return createVNode("div", {
|
|
11418
|
+
"class": "people-select-cpn"
|
|
11419
|
+
}, [trigger, createVNode(resolveComponent("a-modal"), {
|
|
11420
|
+
"wrapClassName": "people-select-cpn-modal",
|
|
11421
|
+
"title": "\u6DFB\u52A0\u4EBA\u5458",
|
|
11422
|
+
"centered": true,
|
|
11423
|
+
"width": 900,
|
|
11424
|
+
"onOk": handleCommit,
|
|
11425
|
+
"onCancel": () => emit("update:open", false),
|
|
11426
|
+
"afterClose": onClose,
|
|
11427
|
+
"visible": modalOpen.value,
|
|
11428
|
+
"onUpdate:visible": $event => modalOpen.value = $event
|
|
11456
11429
|
}, {
|
|
11457
|
-
default: () => ["
|
|
11458
|
-
|
|
11459
|
-
"
|
|
11460
|
-
|
|
11461
|
-
|
|
11462
|
-
|
|
11463
|
-
"
|
|
11464
|
-
"
|
|
11465
|
-
|
|
11466
|
-
|
|
11467
|
-
|
|
11468
|
-
|
|
11469
|
-
|
|
11470
|
-
|
|
11471
|
-
|
|
11472
|
-
|
|
11473
|
-
|
|
11474
|
-
|
|
11475
|
-
|
|
11476
|
-
|
|
11430
|
+
default: () => [createVNode("div", {
|
|
11431
|
+
"class": "container"
|
|
11432
|
+
}, [createVNode("div", {
|
|
11433
|
+
"class": "left"
|
|
11434
|
+
}, [createVNode(SearchPeopleInput, {
|
|
11435
|
+
"list": formatList.value,
|
|
11436
|
+
"renderName": props.renderNameSearch,
|
|
11437
|
+
"onSelect": handleSelect
|
|
11438
|
+
}, null), createVNode(DepBreadcrumb, {
|
|
11439
|
+
"list": formatList.value,
|
|
11440
|
+
"zoomedDep": zoomedList.value?.[0],
|
|
11441
|
+
"onCheck": handleSelectNode
|
|
11442
|
+
}, null), createVNode(resolveComponent("a-tree"), {
|
|
11443
|
+
"class": "tree",
|
|
11444
|
+
"checkable": true,
|
|
11445
|
+
"showLine": true,
|
|
11446
|
+
"blockNode": true,
|
|
11447
|
+
"autoExpandParent": true,
|
|
11448
|
+
"fieldNames": {
|
|
11449
|
+
children: "subList",
|
|
11450
|
+
key: "id",
|
|
11451
|
+
title: "name"
|
|
11452
|
+
},
|
|
11453
|
+
"treeData": zoomedList.value || formatList.value,
|
|
11454
|
+
"checkedKeys": selectedKeys.value,
|
|
11455
|
+
"onCheck": handleSelect,
|
|
11456
|
+
"onSelect": (keys, {
|
|
11457
|
+
node
|
|
11458
|
+
}) => handleSelectNode(node),
|
|
11459
|
+
"expandedKeys": expandKeys.value,
|
|
11460
|
+
"onUpdate:expandedKeys": $event => expandKeys.value = $event
|
|
11461
|
+
}, {
|
|
11462
|
+
title: node => createVNode("div", {
|
|
11463
|
+
"class": "node-title"
|
|
11464
|
+
}, [createVNode("span", {
|
|
11465
|
+
"class": "name"
|
|
11466
|
+
}, [node.name]), node.isDep && createVNode("span", {
|
|
11467
|
+
"class": "count"
|
|
11468
|
+
}, [node.peopleCount, "\u4EBA"])])
|
|
11469
|
+
})]), createVNode("div", {
|
|
11470
|
+
"class": "right"
|
|
11471
|
+
}, [createVNode("div", {
|
|
11472
|
+
"class": "header"
|
|
11473
|
+
}, [createVNode("h2", {
|
|
11474
|
+
"class": "title"
|
|
11475
|
+
}, ["\u5DF2\u9009\u4EBA\u5458", createVNode("span", {
|
|
11476
|
+
"class": "select-text"
|
|
11477
|
+
}, ["\uFF08\u5DF2\u9009\u62E9", createVNode("em", null, [selectPeopleList.value.length]), "\u4EBA\uFF09"])]), createVNode(resolveComponent("a-button"), {
|
|
11478
|
+
"type": "link",
|
|
11479
|
+
"disabled": !selectPeopleList.value.length,
|
|
11480
|
+
"onClick": handleClear
|
|
11481
|
+
}, {
|
|
11482
|
+
default: () => ["\u6E05\u7A7A"]
|
|
11483
|
+
})]), createVNode("div", {
|
|
11484
|
+
"class": "selected-container"
|
|
11485
|
+
}, [selectPeopleList.value.length ? selectPeopleList.value.map(people => {
|
|
11486
|
+
let _slot;
|
|
11487
|
+
return createVNode(resolveComponent("a-tag"), {
|
|
11488
|
+
"key": people.userId,
|
|
11489
|
+
"closable": true,
|
|
11490
|
+
"onClose": () => handleDelete(people)
|
|
11491
|
+
}, _isSlot$6(_slot = props.renderNameTag(people)) ? _slot : {
|
|
11492
|
+
default: () => [_slot]
|
|
11493
|
+
});
|
|
11494
|
+
}) : createVNode(resolveComponent("a-empty"), {
|
|
11495
|
+
"style": {
|
|
11496
|
+
width: "100%",
|
|
11497
|
+
paddingTop: "10%"
|
|
11498
|
+
},
|
|
11499
|
+
"description": "\u6682\u65E0"
|
|
11500
|
+
}, null)])])])]
|
|
11501
|
+
})]);
|
|
11502
|
+
};
|
|
11477
11503
|
}
|
|
11478
11504
|
});
|
|
11479
11505
|
var index$3 = installComponent(PeopleSelect, "people-select");
|