inl-ui 0.1.72 → 0.1.74
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 +130 -97
- package/dist/components/index.d.ts +22 -1
- package/dist/components/index.js +130 -97
- package/dist/index.cjs +191 -100
- package/dist/index.d.ts +23 -2
- package/dist/index.js +191 -100
- package/package.json +2 -2
|
@@ -6985,6 +6985,9 @@ const PageContent = vue.defineComponent({
|
|
|
6985
6985
|
key: key ?? id,
|
|
6986
6986
|
type: "menu"
|
|
6987
6987
|
});
|
|
6988
|
+
} else {
|
|
6989
|
+
openedTab.params = queryCombine;
|
|
6990
|
+
val.params = queryCombine;
|
|
6988
6991
|
}
|
|
6989
6992
|
const [path, currSearch = ""] = url.split("?");
|
|
6990
6993
|
const searchObj = new URLSearchParams(currSearch);
|
|
@@ -7042,7 +7045,11 @@ const PageContent = vue.defineComponent({
|
|
|
7042
7045
|
} else if (tab.mode === 2) {
|
|
7043
7046
|
handleMenuChange(tab);
|
|
7044
7047
|
} else {
|
|
7045
|
-
router.
|
|
7048
|
+
const resolveRes = router.resolve(tab.url);
|
|
7049
|
+
router.push({
|
|
7050
|
+
path: resolveRes.path,
|
|
7051
|
+
query: Object.assign(resolveRes.query, tab.params)
|
|
7052
|
+
});
|
|
7046
7053
|
}
|
|
7047
7054
|
};
|
|
7048
7055
|
const activeMenu = useActiveMenu(() => props.menu, props.extraPages, false, false, extraIframeList);
|
|
@@ -11296,7 +11303,7 @@ const defaultPropNames = {
|
|
|
11296
11303
|
peopleUserName: "userName"
|
|
11297
11304
|
};
|
|
11298
11305
|
const PeopleSelect = vue.defineComponent({
|
|
11299
|
-
emits: ["update:value"],
|
|
11306
|
+
emits: ["update:value", "update:open", "change", "close"],
|
|
11300
11307
|
props: {
|
|
11301
11308
|
list: {
|
|
11302
11309
|
type: Array,
|
|
@@ -11306,6 +11313,14 @@ const PeopleSelect = vue.defineComponent({
|
|
|
11306
11313
|
type: Array,
|
|
11307
11314
|
default: () => []
|
|
11308
11315
|
},
|
|
11316
|
+
open: {
|
|
11317
|
+
type: Boolean,
|
|
11318
|
+
default: void 0
|
|
11319
|
+
},
|
|
11320
|
+
renderBtn: {
|
|
11321
|
+
type: Boolean,
|
|
11322
|
+
default: true
|
|
11323
|
+
},
|
|
11309
11324
|
buttonText: {
|
|
11310
11325
|
type: String,
|
|
11311
11326
|
default: "\u6DFB\u52A0\u4EBA\u5458"
|
|
@@ -11336,7 +11351,11 @@ const PeopleSelect = vue.defineComponent({
|
|
|
11336
11351
|
}) {
|
|
11337
11352
|
const mixPropNames = Object.assign(defaultPropNames, props.propNames);
|
|
11338
11353
|
vue.provide("propNames", mixPropNames);
|
|
11339
|
-
const
|
|
11354
|
+
const modalOpen = vue.ref(false);
|
|
11355
|
+
vue.watch(() => props.open, val => {
|
|
11356
|
+
if (val === void 0) return;
|
|
11357
|
+
modalOpen.value = val;
|
|
11358
|
+
});
|
|
11340
11359
|
const formatList = vue.computed(() => {
|
|
11341
11360
|
const copyList = ___default["default"].cloneDeep(props.list);
|
|
11342
11361
|
formatTree(copyList, props.renderNameTree, mixPropNames.peopleList, mixPropNames.peopleId);
|
|
@@ -11355,8 +11374,8 @@ const PeopleSelect = vue.defineComponent({
|
|
|
11355
11374
|
const initSelect = () => {
|
|
11356
11375
|
selectPeopleList.value = getUserListById(formatList.value, props.value, mixPropNames.peopleId);
|
|
11357
11376
|
};
|
|
11358
|
-
vue.watch([() => props.value, formatList,
|
|
11359
|
-
if (
|
|
11377
|
+
vue.watch([() => props.value, formatList, modalOpen], () => {
|
|
11378
|
+
if (modalOpen.value) initSelect();
|
|
11360
11379
|
});
|
|
11361
11380
|
const selectedKeys = vue.computed(() => selectPeopleList.value.map(item => item.id));
|
|
11362
11381
|
const handleSelect = (val, e) => {
|
|
@@ -11408,100 +11427,114 @@ const PeopleSelect = vue.defineComponent({
|
|
|
11408
11427
|
const handleCommit = () => {
|
|
11409
11428
|
const idList = selectPeopleList.value.map(item => item[mixPropNames.peopleId]);
|
|
11410
11429
|
emit("update:value", idList);
|
|
11411
|
-
|
|
11430
|
+
emit("change", idList);
|
|
11431
|
+
modalOpen.value = false;
|
|
11432
|
+
emit("update:open", modalOpen.value);
|
|
11412
11433
|
};
|
|
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
|
|
11434
|
+
const onClose = () => {
|
|
11435
|
+
selectPeopleList.value = [];
|
|
11436
|
+
emit("close");
|
|
11437
|
+
};
|
|
11438
|
+
return () => {
|
|
11439
|
+
let trigger = null;
|
|
11440
|
+
if (props.renderBtn || slots.default) {
|
|
11441
|
+
trigger = vue.createVNode("div", {
|
|
11442
|
+
"style": "display: inline-block;",
|
|
11443
|
+
"onClick": () => {
|
|
11444
|
+
modalOpen.value = true;
|
|
11445
|
+
}
|
|
11446
|
+
}, [typeof slots.default === "function" ? slots.default() : vue.createVNode(vue.resolveComponent("a-button"), {
|
|
11447
|
+
"type": "primary"
|
|
11448
|
+
}, {
|
|
11449
|
+
default: () => [props.buttonText]
|
|
11450
|
+
})]);
|
|
11451
|
+
}
|
|
11452
|
+
return vue.createVNode("div", {
|
|
11453
|
+
"class": "people-select-cpn"
|
|
11454
|
+
}, [trigger, vue.createVNode(vue.resolveComponent("a-modal"), {
|
|
11455
|
+
"wrapClassName": "people-select-cpn-modal",
|
|
11456
|
+
"title": "\u6DFB\u52A0\u4EBA\u5458",
|
|
11457
|
+
"centered": true,
|
|
11458
|
+
"width": 900,
|
|
11459
|
+
"onOk": handleCommit,
|
|
11460
|
+
"onCancel": () => emit("update:open", false),
|
|
11461
|
+
"afterClose": onClose,
|
|
11462
|
+
"visible": modalOpen.value,
|
|
11463
|
+
"onUpdate:visible": $event => modalOpen.value = $event
|
|
11484
11464
|
}, {
|
|
11485
|
-
default: () => ["
|
|
11486
|
-
|
|
11487
|
-
"
|
|
11488
|
-
|
|
11489
|
-
|
|
11490
|
-
|
|
11491
|
-
"
|
|
11492
|
-
"
|
|
11493
|
-
|
|
11494
|
-
|
|
11495
|
-
|
|
11496
|
-
|
|
11497
|
-
|
|
11498
|
-
|
|
11499
|
-
|
|
11500
|
-
|
|
11501
|
-
|
|
11502
|
-
|
|
11503
|
-
|
|
11504
|
-
|
|
11465
|
+
default: () => [vue.createVNode("div", {
|
|
11466
|
+
"class": "container"
|
|
11467
|
+
}, [vue.createVNode("div", {
|
|
11468
|
+
"class": "left"
|
|
11469
|
+
}, [vue.createVNode(SearchPeopleInput, {
|
|
11470
|
+
"list": formatList.value,
|
|
11471
|
+
"renderName": props.renderNameSearch,
|
|
11472
|
+
"onSelect": handleSelect
|
|
11473
|
+
}, null), vue.createVNode(DepBreadcrumb, {
|
|
11474
|
+
"list": formatList.value,
|
|
11475
|
+
"zoomedDep": zoomedList.value?.[0],
|
|
11476
|
+
"onCheck": handleSelectNode
|
|
11477
|
+
}, null), vue.createVNode(vue.resolveComponent("a-tree"), {
|
|
11478
|
+
"class": "tree",
|
|
11479
|
+
"checkable": true,
|
|
11480
|
+
"showLine": true,
|
|
11481
|
+
"blockNode": true,
|
|
11482
|
+
"autoExpandParent": true,
|
|
11483
|
+
"fieldNames": {
|
|
11484
|
+
children: "subList",
|
|
11485
|
+
key: "id",
|
|
11486
|
+
title: "name"
|
|
11487
|
+
},
|
|
11488
|
+
"treeData": zoomedList.value || formatList.value,
|
|
11489
|
+
"checkedKeys": selectedKeys.value,
|
|
11490
|
+
"onCheck": handleSelect,
|
|
11491
|
+
"onSelect": (keys, {
|
|
11492
|
+
node
|
|
11493
|
+
}) => handleSelectNode(node),
|
|
11494
|
+
"expandedKeys": expandKeys.value,
|
|
11495
|
+
"onUpdate:expandedKeys": $event => expandKeys.value = $event
|
|
11496
|
+
}, {
|
|
11497
|
+
title: node => vue.createVNode("div", {
|
|
11498
|
+
"class": "node-title"
|
|
11499
|
+
}, [vue.createVNode("span", {
|
|
11500
|
+
"class": "name"
|
|
11501
|
+
}, [node.name]), node.isDep && vue.createVNode("span", {
|
|
11502
|
+
"class": "count"
|
|
11503
|
+
}, [node.peopleCount, "\u4EBA"])])
|
|
11504
|
+
})]), vue.createVNode("div", {
|
|
11505
|
+
"class": "right"
|
|
11506
|
+
}, [vue.createVNode("div", {
|
|
11507
|
+
"class": "header"
|
|
11508
|
+
}, [vue.createVNode("h2", {
|
|
11509
|
+
"class": "title"
|
|
11510
|
+
}, ["\u5DF2\u9009\u4EBA\u5458", vue.createVNode("span", {
|
|
11511
|
+
"class": "select-text"
|
|
11512
|
+
}, ["\uFF08\u5DF2\u9009\u62E9", vue.createVNode("em", null, [selectPeopleList.value.length]), "\u4EBA\uFF09"])]), vue.createVNode(vue.resolveComponent("a-button"), {
|
|
11513
|
+
"type": "link",
|
|
11514
|
+
"disabled": !selectPeopleList.value.length,
|
|
11515
|
+
"onClick": handleClear
|
|
11516
|
+
}, {
|
|
11517
|
+
default: () => ["\u6E05\u7A7A"]
|
|
11518
|
+
})]), vue.createVNode("div", {
|
|
11519
|
+
"class": "selected-container"
|
|
11520
|
+
}, [selectPeopleList.value.length ? selectPeopleList.value.map(people => {
|
|
11521
|
+
let _slot;
|
|
11522
|
+
return vue.createVNode(vue.resolveComponent("a-tag"), {
|
|
11523
|
+
"key": people.userId,
|
|
11524
|
+
"closable": true,
|
|
11525
|
+
"onClose": () => handleDelete(people)
|
|
11526
|
+
}, _isSlot$6(_slot = props.renderNameTag(people)) ? _slot : {
|
|
11527
|
+
default: () => [_slot]
|
|
11528
|
+
});
|
|
11529
|
+
}) : vue.createVNode(vue.resolveComponent("a-empty"), {
|
|
11530
|
+
"style": {
|
|
11531
|
+
width: "100%",
|
|
11532
|
+
paddingTop: "10%"
|
|
11533
|
+
},
|
|
11534
|
+
"description": "\u6682\u65E0"
|
|
11535
|
+
}, null)])])])]
|
|
11536
|
+
})]);
|
|
11537
|
+
};
|
|
11505
11538
|
}
|
|
11506
11539
|
});
|
|
11507
11540
|
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
|
@@ -6957,6 +6957,9 @@ const PageContent = defineComponent({
|
|
|
6957
6957
|
key: key ?? id,
|
|
6958
6958
|
type: "menu"
|
|
6959
6959
|
});
|
|
6960
|
+
} else {
|
|
6961
|
+
openedTab.params = queryCombine;
|
|
6962
|
+
val.params = queryCombine;
|
|
6960
6963
|
}
|
|
6961
6964
|
const [path, currSearch = ""] = url.split("?");
|
|
6962
6965
|
const searchObj = new URLSearchParams(currSearch);
|
|
@@ -7014,7 +7017,11 @@ const PageContent = defineComponent({
|
|
|
7014
7017
|
} else if (tab.mode === 2) {
|
|
7015
7018
|
handleMenuChange(tab);
|
|
7016
7019
|
} else {
|
|
7017
|
-
router.
|
|
7020
|
+
const resolveRes = router.resolve(tab.url);
|
|
7021
|
+
router.push({
|
|
7022
|
+
path: resolveRes.path,
|
|
7023
|
+
query: Object.assign(resolveRes.query, tab.params)
|
|
7024
|
+
});
|
|
7018
7025
|
}
|
|
7019
7026
|
};
|
|
7020
7027
|
const activeMenu = useActiveMenu(() => props.menu, props.extraPages, false, false, extraIframeList);
|
|
@@ -11268,7 +11275,7 @@ const defaultPropNames = {
|
|
|
11268
11275
|
peopleUserName: "userName"
|
|
11269
11276
|
};
|
|
11270
11277
|
const PeopleSelect = defineComponent({
|
|
11271
|
-
emits: ["update:value"],
|
|
11278
|
+
emits: ["update:value", "update:open", "change", "close"],
|
|
11272
11279
|
props: {
|
|
11273
11280
|
list: {
|
|
11274
11281
|
type: Array,
|
|
@@ -11278,6 +11285,14 @@ const PeopleSelect = defineComponent({
|
|
|
11278
11285
|
type: Array,
|
|
11279
11286
|
default: () => []
|
|
11280
11287
|
},
|
|
11288
|
+
open: {
|
|
11289
|
+
type: Boolean,
|
|
11290
|
+
default: void 0
|
|
11291
|
+
},
|
|
11292
|
+
renderBtn: {
|
|
11293
|
+
type: Boolean,
|
|
11294
|
+
default: true
|
|
11295
|
+
},
|
|
11281
11296
|
buttonText: {
|
|
11282
11297
|
type: String,
|
|
11283
11298
|
default: "\u6DFB\u52A0\u4EBA\u5458"
|
|
@@ -11308,7 +11323,11 @@ const PeopleSelect = defineComponent({
|
|
|
11308
11323
|
}) {
|
|
11309
11324
|
const mixPropNames = Object.assign(defaultPropNames, props.propNames);
|
|
11310
11325
|
provide("propNames", mixPropNames);
|
|
11311
|
-
const
|
|
11326
|
+
const modalOpen = ref(false);
|
|
11327
|
+
watch(() => props.open, val => {
|
|
11328
|
+
if (val === void 0) return;
|
|
11329
|
+
modalOpen.value = val;
|
|
11330
|
+
});
|
|
11312
11331
|
const formatList = computed(() => {
|
|
11313
11332
|
const copyList = _.cloneDeep(props.list);
|
|
11314
11333
|
formatTree(copyList, props.renderNameTree, mixPropNames.peopleList, mixPropNames.peopleId);
|
|
@@ -11327,8 +11346,8 @@ const PeopleSelect = defineComponent({
|
|
|
11327
11346
|
const initSelect = () => {
|
|
11328
11347
|
selectPeopleList.value = getUserListById(formatList.value, props.value, mixPropNames.peopleId);
|
|
11329
11348
|
};
|
|
11330
|
-
watch([() => props.value, formatList,
|
|
11331
|
-
if (
|
|
11349
|
+
watch([() => props.value, formatList, modalOpen], () => {
|
|
11350
|
+
if (modalOpen.value) initSelect();
|
|
11332
11351
|
});
|
|
11333
11352
|
const selectedKeys = computed(() => selectPeopleList.value.map(item => item.id));
|
|
11334
11353
|
const handleSelect = (val, e) => {
|
|
@@ -11380,100 +11399,114 @@ const PeopleSelect = defineComponent({
|
|
|
11380
11399
|
const handleCommit = () => {
|
|
11381
11400
|
const idList = selectPeopleList.value.map(item => item[mixPropNames.peopleId]);
|
|
11382
11401
|
emit("update:value", idList);
|
|
11383
|
-
|
|
11402
|
+
emit("change", idList);
|
|
11403
|
+
modalOpen.value = false;
|
|
11404
|
+
emit("update:open", modalOpen.value);
|
|
11384
11405
|
};
|
|
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
|
|
11406
|
+
const onClose = () => {
|
|
11407
|
+
selectPeopleList.value = [];
|
|
11408
|
+
emit("close");
|
|
11409
|
+
};
|
|
11410
|
+
return () => {
|
|
11411
|
+
let trigger = null;
|
|
11412
|
+
if (props.renderBtn || slots.default) {
|
|
11413
|
+
trigger = createVNode("div", {
|
|
11414
|
+
"style": "display: inline-block;",
|
|
11415
|
+
"onClick": () => {
|
|
11416
|
+
modalOpen.value = true;
|
|
11417
|
+
}
|
|
11418
|
+
}, [typeof slots.default === "function" ? slots.default() : createVNode(resolveComponent("a-button"), {
|
|
11419
|
+
"type": "primary"
|
|
11420
|
+
}, {
|
|
11421
|
+
default: () => [props.buttonText]
|
|
11422
|
+
})]);
|
|
11423
|
+
}
|
|
11424
|
+
return createVNode("div", {
|
|
11425
|
+
"class": "people-select-cpn"
|
|
11426
|
+
}, [trigger, createVNode(resolveComponent("a-modal"), {
|
|
11427
|
+
"wrapClassName": "people-select-cpn-modal",
|
|
11428
|
+
"title": "\u6DFB\u52A0\u4EBA\u5458",
|
|
11429
|
+
"centered": true,
|
|
11430
|
+
"width": 900,
|
|
11431
|
+
"onOk": handleCommit,
|
|
11432
|
+
"onCancel": () => emit("update:open", false),
|
|
11433
|
+
"afterClose": onClose,
|
|
11434
|
+
"visible": modalOpen.value,
|
|
11435
|
+
"onUpdate:visible": $event => modalOpen.value = $event
|
|
11456
11436
|
}, {
|
|
11457
|
-
default: () => ["
|
|
11458
|
-
|
|
11459
|
-
"
|
|
11460
|
-
|
|
11461
|
-
|
|
11462
|
-
|
|
11463
|
-
"
|
|
11464
|
-
"
|
|
11465
|
-
|
|
11466
|
-
|
|
11467
|
-
|
|
11468
|
-
|
|
11469
|
-
|
|
11470
|
-
|
|
11471
|
-
|
|
11472
|
-
|
|
11473
|
-
|
|
11474
|
-
|
|
11475
|
-
|
|
11476
|
-
|
|
11437
|
+
default: () => [createVNode("div", {
|
|
11438
|
+
"class": "container"
|
|
11439
|
+
}, [createVNode("div", {
|
|
11440
|
+
"class": "left"
|
|
11441
|
+
}, [createVNode(SearchPeopleInput, {
|
|
11442
|
+
"list": formatList.value,
|
|
11443
|
+
"renderName": props.renderNameSearch,
|
|
11444
|
+
"onSelect": handleSelect
|
|
11445
|
+
}, null), createVNode(DepBreadcrumb, {
|
|
11446
|
+
"list": formatList.value,
|
|
11447
|
+
"zoomedDep": zoomedList.value?.[0],
|
|
11448
|
+
"onCheck": handleSelectNode
|
|
11449
|
+
}, null), createVNode(resolveComponent("a-tree"), {
|
|
11450
|
+
"class": "tree",
|
|
11451
|
+
"checkable": true,
|
|
11452
|
+
"showLine": true,
|
|
11453
|
+
"blockNode": true,
|
|
11454
|
+
"autoExpandParent": true,
|
|
11455
|
+
"fieldNames": {
|
|
11456
|
+
children: "subList",
|
|
11457
|
+
key: "id",
|
|
11458
|
+
title: "name"
|
|
11459
|
+
},
|
|
11460
|
+
"treeData": zoomedList.value || formatList.value,
|
|
11461
|
+
"checkedKeys": selectedKeys.value,
|
|
11462
|
+
"onCheck": handleSelect,
|
|
11463
|
+
"onSelect": (keys, {
|
|
11464
|
+
node
|
|
11465
|
+
}) => handleSelectNode(node),
|
|
11466
|
+
"expandedKeys": expandKeys.value,
|
|
11467
|
+
"onUpdate:expandedKeys": $event => expandKeys.value = $event
|
|
11468
|
+
}, {
|
|
11469
|
+
title: node => createVNode("div", {
|
|
11470
|
+
"class": "node-title"
|
|
11471
|
+
}, [createVNode("span", {
|
|
11472
|
+
"class": "name"
|
|
11473
|
+
}, [node.name]), node.isDep && createVNode("span", {
|
|
11474
|
+
"class": "count"
|
|
11475
|
+
}, [node.peopleCount, "\u4EBA"])])
|
|
11476
|
+
})]), createVNode("div", {
|
|
11477
|
+
"class": "right"
|
|
11478
|
+
}, [createVNode("div", {
|
|
11479
|
+
"class": "header"
|
|
11480
|
+
}, [createVNode("h2", {
|
|
11481
|
+
"class": "title"
|
|
11482
|
+
}, ["\u5DF2\u9009\u4EBA\u5458", createVNode("span", {
|
|
11483
|
+
"class": "select-text"
|
|
11484
|
+
}, ["\uFF08\u5DF2\u9009\u62E9", createVNode("em", null, [selectPeopleList.value.length]), "\u4EBA\uFF09"])]), createVNode(resolveComponent("a-button"), {
|
|
11485
|
+
"type": "link",
|
|
11486
|
+
"disabled": !selectPeopleList.value.length,
|
|
11487
|
+
"onClick": handleClear
|
|
11488
|
+
}, {
|
|
11489
|
+
default: () => ["\u6E05\u7A7A"]
|
|
11490
|
+
})]), createVNode("div", {
|
|
11491
|
+
"class": "selected-container"
|
|
11492
|
+
}, [selectPeopleList.value.length ? selectPeopleList.value.map(people => {
|
|
11493
|
+
let _slot;
|
|
11494
|
+
return createVNode(resolveComponent("a-tag"), {
|
|
11495
|
+
"key": people.userId,
|
|
11496
|
+
"closable": true,
|
|
11497
|
+
"onClose": () => handleDelete(people)
|
|
11498
|
+
}, _isSlot$6(_slot = props.renderNameTag(people)) ? _slot : {
|
|
11499
|
+
default: () => [_slot]
|
|
11500
|
+
});
|
|
11501
|
+
}) : createVNode(resolveComponent("a-empty"), {
|
|
11502
|
+
"style": {
|
|
11503
|
+
width: "100%",
|
|
11504
|
+
paddingTop: "10%"
|
|
11505
|
+
},
|
|
11506
|
+
"description": "\u6682\u65E0"
|
|
11507
|
+
}, null)])])])]
|
|
11508
|
+
})]);
|
|
11509
|
+
};
|
|
11477
11510
|
}
|
|
11478
11511
|
});
|
|
11479
11512
|
var index$3 = installComponent(PeopleSelect, "people-select");
|