bm-admin-ui 1.0.78-alpha → 1.0.80-alpha
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/float-table/index.js +3077 -1
- package/es/components/float-table/src/rowDrag.d.ts +1 -0
- package/es/components/form-designer/index.js +1 -1
- package/es/components/search-filter/index.js +161 -5
- package/es/components/search-filter/src/form-select-all.vue.d.ts +741 -0
- package/es/components/select-all/index.js +1 -1
- package/es/components/staffs-selector/index.d.ts +1 -81
- package/es/components/staffs-selector/index.js +52 -377
- package/es/components/staffs-selector/src/action.d.ts +8 -3
- package/es/components/staffs-selector/src/departmentCmp.vue.d.ts +1 -5
- package/es/components/staffs-selector/src/multipleCmp.vue.d.ts +0 -5
- package/es/components/staffs-selector/src/staffs-selector.vue.d.ts +1 -81
- package/es/components/staffs-selector/src/variedCmp.vue.d.ts +1 -4
- package/lib/components/float-table/index.js +3076 -0
- package/lib/components/float-table/src/rowDrag.d.ts +1 -0
- package/lib/components/form-designer/index.js +1 -1
- package/lib/components/search-filter/index.js +161 -4
- package/lib/components/search-filter/src/form-select-all.vue.d.ts +741 -0
- package/lib/components/select-all/index.js +1 -1
- package/lib/components/staffs-selector/index.d.ts +1 -81
- package/lib/components/staffs-selector/index.js +50 -375
- package/lib/components/staffs-selector/src/action.d.ts +8 -3
- package/lib/components/staffs-selector/src/departmentCmp.vue.d.ts +1 -5
- package/lib/components/staffs-selector/src/multipleCmp.vue.d.ts +0 -5
- package/lib/components/staffs-selector/src/staffs-selector.vue.d.ts +1 -81
- package/lib/components/staffs-selector/src/variedCmp.vue.d.ts +1 -4
- package/package.json +1 -1
- package/theme-chalk/float-table.css +1 -1
- package/theme-chalk/index.css +1 -1
- package/types/components/float-table/src/rowDrag.d.ts +1 -0
- package/types/components/search-filter/src/form-select-all.vue.d.ts +741 -0
- package/types/components/staffs-selector/index.d.ts +1 -81
- package/types/components/staffs-selector/src/action.d.ts +8 -3
- package/types/components/staffs-selector/src/departmentCmp.vue.d.ts +1 -5
- package/types/components/staffs-selector/src/multipleCmp.vue.d.ts +0 -5
- package/types/components/staffs-selector/src/staffs-selector.vue.d.ts +1 -81
- package/types/components/staffs-selector/src/variedCmp.vue.d.ts +1 -4
|
@@ -66,16 +66,21 @@ vue.readonly([
|
|
|
66
66
|
vue.ref('');
|
|
67
67
|
const selectState = vue.reactive({
|
|
68
68
|
multipleChecked: {},
|
|
69
|
-
departmentChecked: [],
|
|
70
69
|
multipDepartment: [],
|
|
70
|
+
dataMap: new Map(),
|
|
71
|
+
curlistKeys: new Set(),
|
|
72
|
+
fetchLoading: false,
|
|
73
|
+
searched: false,
|
|
74
|
+
});
|
|
75
|
+
vue.reactive({
|
|
76
|
+
departmentChecked: [],
|
|
71
77
|
staffsChecked: {},
|
|
72
78
|
shopChecked: {},
|
|
73
79
|
groupChecked: {},
|
|
74
80
|
dataMap: new Map(),
|
|
75
|
-
curlistKeys: new Set(),
|
|
76
81
|
activeKey: 0,
|
|
77
|
-
|
|
78
|
-
searched: false
|
|
82
|
+
curlistKeys: new Set(),
|
|
83
|
+
searched: false,
|
|
79
84
|
});
|
|
80
85
|
const list = vue.ref([]);
|
|
81
86
|
const departNative = vue.ref([]);
|
|
@@ -88,7 +93,7 @@ var _export_sfc = (sfc, props) => {
|
|
|
88
93
|
return target;
|
|
89
94
|
};
|
|
90
95
|
|
|
91
|
-
const _sfc_main$
|
|
96
|
+
const _sfc_main$3 = vue.defineComponent({
|
|
92
97
|
components: { SearchOutlined: iconsVue.SearchOutlined, Checkbox: antDesignVue.Checkbox, Empty: antDesignVue.Empty },
|
|
93
98
|
props: {
|
|
94
99
|
limit: {
|
|
@@ -167,25 +172,25 @@ const _sfc_main$4 = vue.defineComponent({
|
|
|
167
172
|
};
|
|
168
173
|
}
|
|
169
174
|
});
|
|
170
|
-
const _hoisted_1$
|
|
171
|
-
const _hoisted_2$
|
|
172
|
-
const _hoisted_3$
|
|
173
|
-
const _hoisted_4$
|
|
174
|
-
const _hoisted_5$
|
|
175
|
-
const _hoisted_6$
|
|
175
|
+
const _hoisted_1$3 = { class: "multiple-selector" };
|
|
176
|
+
const _hoisted_2$3 = { class: "__selector-modal-panel" };
|
|
177
|
+
const _hoisted_3$3 = { class: "__search-panel" };
|
|
178
|
+
const _hoisted_4$3 = { class: "__selector-modal-options" };
|
|
179
|
+
const _hoisted_5$3 = { class: "__selector-modal-options-item fixed-option" };
|
|
180
|
+
const _hoisted_6$2 = {
|
|
176
181
|
key: 0,
|
|
177
182
|
class: "noData",
|
|
178
183
|
style: { "height": "280px" }
|
|
179
184
|
};
|
|
180
|
-
const _hoisted_7$
|
|
181
|
-
function _sfc_render$
|
|
185
|
+
const _hoisted_7$1 = { style: { "color": "#9393a3", "font-size": "12px", "font-weight": "400" } };
|
|
186
|
+
function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) {
|
|
182
187
|
const _component_search_outlined = vue.resolveComponent("search-outlined");
|
|
183
188
|
const _component_AInput = vue.resolveComponent("AInput");
|
|
184
189
|
const _component_Checkbox = vue.resolveComponent("Checkbox");
|
|
185
190
|
const _component_Empty = vue.resolveComponent("Empty");
|
|
186
|
-
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$
|
|
187
|
-
vue.createElementVNode("div", _hoisted_2$
|
|
188
|
-
vue.createElementVNode("div", _hoisted_3$
|
|
191
|
+
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$3, [
|
|
192
|
+
vue.createElementVNode("div", _hoisted_2$3, [
|
|
193
|
+
vue.createElementVNode("div", _hoisted_3$3, [
|
|
189
194
|
vue.createVNode(_component_AInput, {
|
|
190
195
|
value: _ctx.searchVal,
|
|
191
196
|
"onUpdate:value": _cache[0] || (_cache[0] = ($event) => _ctx.searchVal = $event),
|
|
@@ -197,8 +202,8 @@ function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
197
202
|
]),
|
|
198
203
|
_: 1
|
|
199
204
|
}, 8, ["value", "onBlur"]),
|
|
200
|
-
vue.createElementVNode("div", _hoisted_4$
|
|
201
|
-
vue.createElementVNode("div", _hoisted_5$
|
|
205
|
+
vue.createElementVNode("div", _hoisted_4$3, [
|
|
206
|
+
vue.createElementVNode("div", _hoisted_5$3, [
|
|
202
207
|
vue.withDirectives(vue.createVNode(_component_Checkbox, {
|
|
203
208
|
checked: _ctx.selectAll,
|
|
204
209
|
"onUpdate:checked": _cache[1] || (_cache[1] = ($event) => _ctx.selectAll = $event),
|
|
@@ -231,10 +236,10 @@ function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
231
236
|
}, 1032, ["checked", "onUpdate:checked", "disabled"])
|
|
232
237
|
]);
|
|
233
238
|
}), 128)),
|
|
234
|
-
_ctx.list && !_ctx.list.length ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_6$
|
|
239
|
+
_ctx.list && !_ctx.list.length ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_6$2, [
|
|
235
240
|
vue.createVNode(_component_Empty, { image: _ctx.emptyPic }, {
|
|
236
241
|
description: vue.withCtx(() => [
|
|
237
|
-
vue.createElementVNode("span", _hoisted_7$
|
|
242
|
+
vue.createElementVNode("span", _hoisted_7$1, vue.toDisplayString(!!_ctx.searched ? "\u6682\u65E0\u6570\u636E" : "\u8BF7\u5148\u641C\u7D22\u4EBA\u5458\u5173\u952E\u5B57"), 1)
|
|
238
243
|
]),
|
|
239
244
|
_: 1
|
|
240
245
|
}, 8, ["image"])
|
|
@@ -244,9 +249,9 @@ function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
244
249
|
])
|
|
245
250
|
]);
|
|
246
251
|
}
|
|
247
|
-
var multipleCmp = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
252
|
+
var multipleCmp = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["render", _sfc_render$2], ["__file", "multipleCmp.vue"]]);
|
|
248
253
|
|
|
249
|
-
const _sfc_main$
|
|
254
|
+
const _sfc_main$2 = vue.defineComponent({
|
|
250
255
|
name: "RadioCmp",
|
|
251
256
|
components: { ARadio: antDesignVue.Radio, AInput: antDesignVue.Input, ARadioGroup: antDesignVue.RadioGroup, Empty: antDesignVue.Empty, SearchOutlined: iconsVue.SearchOutlined },
|
|
252
257
|
props: {
|
|
@@ -280,25 +285,25 @@ const _sfc_main$3 = vue.defineComponent({
|
|
|
280
285
|
};
|
|
281
286
|
}
|
|
282
287
|
});
|
|
283
|
-
const _hoisted_1$
|
|
284
|
-
const _hoisted_2$
|
|
285
|
-
const _hoisted_3$
|
|
288
|
+
const _hoisted_1$2 = { class: "radio-selector-panel" };
|
|
289
|
+
const _hoisted_2$2 = { class: "__search-panel withoutpad" };
|
|
290
|
+
const _hoisted_3$2 = {
|
|
286
291
|
key: 0,
|
|
287
292
|
class: "__selector-modal-options __radio-panel"
|
|
288
293
|
};
|
|
289
|
-
const _hoisted_4$
|
|
294
|
+
const _hoisted_4$2 = {
|
|
290
295
|
key: 1,
|
|
291
296
|
class: "noData"
|
|
292
297
|
};
|
|
293
|
-
const _hoisted_5$
|
|
294
|
-
function _sfc_render$
|
|
298
|
+
const _hoisted_5$2 = { style: { "color": "#9393a3", "font-size": "12px", "font-weight": "400" } };
|
|
299
|
+
function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
295
300
|
const _component_search_outlined = vue.resolveComponent("search-outlined");
|
|
296
301
|
const _component_a_input = vue.resolveComponent("a-input");
|
|
297
302
|
const _component_ARadio = vue.resolveComponent("ARadio");
|
|
298
303
|
const _component_ARadioGroup = vue.resolveComponent("ARadioGroup");
|
|
299
304
|
const _component_Empty = vue.resolveComponent("Empty");
|
|
300
|
-
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$
|
|
301
|
-
vue.createElementVNode("div", _hoisted_2$
|
|
305
|
+
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$2, [
|
|
306
|
+
vue.createElementVNode("div", _hoisted_2$2, [
|
|
302
307
|
vue.createVNode(_component_a_input, {
|
|
303
308
|
value: _ctx.searchVal,
|
|
304
309
|
"onUpdate:value": _cache[0] || (_cache[0] = ($event) => _ctx.searchVal = $event),
|
|
@@ -310,7 +315,7 @@ function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
310
315
|
]),
|
|
311
316
|
_: 1
|
|
312
317
|
}, 8, ["value", "onBlur"]),
|
|
313
|
-
_ctx.list && _ctx.list.length ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_3$
|
|
318
|
+
_ctx.list && _ctx.list.length ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_3$2, [
|
|
314
319
|
vue.createVNode(_component_ARadioGroup, {
|
|
315
320
|
value: _ctx.selected,
|
|
316
321
|
style: { width: "100%" },
|
|
@@ -333,10 +338,10 @@ function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
333
338
|
_: 1
|
|
334
339
|
}, 8, ["value", "onChange"])
|
|
335
340
|
])) : vue.createCommentVNode("v-if", true),
|
|
336
|
-
_ctx.list && !_ctx.list.length ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_4$
|
|
341
|
+
_ctx.list && !_ctx.list.length ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_4$2, [
|
|
337
342
|
vue.createVNode(_component_Empty, { image: _ctx.emptyPic }, {
|
|
338
343
|
description: vue.withCtx(() => [
|
|
339
|
-
vue.createElementVNode("span", _hoisted_5$
|
|
344
|
+
vue.createElementVNode("span", _hoisted_5$2, vue.toDisplayString(!!_ctx.searched ? "\u6682\u65E0\u6570\u636E" : "\u8BF7\u5148\u641C\u7D22\u4EBA\u5458\u5173\u952E\u5B57"), 1)
|
|
340
345
|
]),
|
|
341
346
|
_: 1
|
|
342
347
|
}, 8, ["image"])
|
|
@@ -344,252 +349,7 @@ function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
344
349
|
])
|
|
345
350
|
]);
|
|
346
351
|
}
|
|
347
|
-
var radioCmp = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
348
|
-
|
|
349
|
-
const _sfc_main$2 = vue.defineComponent({
|
|
350
|
-
props: {
|
|
351
|
-
list: {
|
|
352
|
-
type: Array,
|
|
353
|
-
default: () => []
|
|
354
|
-
},
|
|
355
|
-
selected: {
|
|
356
|
-
type: Array,
|
|
357
|
-
default: () => []
|
|
358
|
-
},
|
|
359
|
-
dataMap: {
|
|
360
|
-
type: Map,
|
|
361
|
-
default: () => /* @__PURE__ */ new Map()
|
|
362
|
-
},
|
|
363
|
-
curlistKeys: {
|
|
364
|
-
type: Set,
|
|
365
|
-
default: () => /* @__PURE__ */ new Set()
|
|
366
|
-
}
|
|
367
|
-
},
|
|
368
|
-
emits: ["fetchList", "update:selected"],
|
|
369
|
-
setup(props, { emit }) {
|
|
370
|
-
const indicator = vue.h(iconsVue.LoadingOutlined, {
|
|
371
|
-
style: {
|
|
372
|
-
fontSize: "24px"
|
|
373
|
-
},
|
|
374
|
-
spin: true
|
|
375
|
-
});
|
|
376
|
-
const loading = vue.ref(false);
|
|
377
|
-
const emptyPic = antDesignVue.Empty.PRESENTED_IMAGE_SIMPLE;
|
|
378
|
-
const areas = vue.readonly([
|
|
379
|
-
{ title: "\u6210\u5458", key: 0, paramStr: "staff" },
|
|
380
|
-
{ title: "\u90E8\u95E8", key: 1, paramStr: "department" },
|
|
381
|
-
{ title: "\u5DE5\u4F5C\u7EC4", key: 2, paramStr: "group" },
|
|
382
|
-
{ title: "\u5E97\u94FA", key: 3, paramStr: "shop" }
|
|
383
|
-
]);
|
|
384
|
-
const searchVal = vue.ref("");
|
|
385
|
-
function changeArea(item) {
|
|
386
|
-
selectState.activeKey = item.key;
|
|
387
|
-
searchVal.value = "";
|
|
388
|
-
if (selectState.activeKey === 1) {
|
|
389
|
-
search();
|
|
390
|
-
} else
|
|
391
|
-
emit("fetchList", false);
|
|
392
|
-
}
|
|
393
|
-
function search() {
|
|
394
|
-
emit("fetchList", {
|
|
395
|
-
searchVal: searchVal.value || "",
|
|
396
|
-
area: areas[selectState.activeKey].paramStr
|
|
397
|
-
});
|
|
398
|
-
}
|
|
399
|
-
const inputPlaceHolder = vue.computed(() => {
|
|
400
|
-
if (selectState.activeKey === 1) {
|
|
401
|
-
return "\u8BF7\u8F93\u5165\u90E8\u95E8\u641C\u7D22";
|
|
402
|
-
} else if (selectState.activeKey === 2) {
|
|
403
|
-
return "\u8BF7\u8F93\u5165\u5DE5\u4F5C\u7EC4\u641C\u7D22";
|
|
404
|
-
} else if (selectState.activeKey === 3) {
|
|
405
|
-
return "\u8BF7\u8F93\u5165\u5E97\u94FA\u641C\u7D22";
|
|
406
|
-
}
|
|
407
|
-
return "\u8BF7\u8F93\u5165\u4EBA\u540D\u641C\u7D22";
|
|
408
|
-
});
|
|
409
|
-
function changeTreeCheck(checkedKeys) {
|
|
410
|
-
let flatMap = selectState.dataMap;
|
|
411
|
-
let curlistKeys = selectState.curlistKeys;
|
|
412
|
-
let hadselected = new Set(selectState.departmentChecked);
|
|
413
|
-
let curselect = new Set(checkedKeys);
|
|
414
|
-
for (let key of hadselected) {
|
|
415
|
-
if (curlistKeys.has(String(key)) && (!curselect.has(String(key)) || curselect.has(String(key)) && curselect.has(flatMap.get(String(key))["parent"]))) {
|
|
416
|
-
hadselected.delete(key);
|
|
417
|
-
}
|
|
418
|
-
}
|
|
419
|
-
for (let key of curselect) {
|
|
420
|
-
let obj = flatMap.get(String(key));
|
|
421
|
-
if (obj && !curselect.has(obj["parent"])) {
|
|
422
|
-
hadselected.add(String(key));
|
|
423
|
-
}
|
|
424
|
-
}
|
|
425
|
-
selectState.departmentChecked = Array.from(hadselected) || [];
|
|
426
|
-
}
|
|
427
|
-
return {
|
|
428
|
-
indicator,
|
|
429
|
-
loading,
|
|
430
|
-
emptyPic,
|
|
431
|
-
areas,
|
|
432
|
-
searchVal,
|
|
433
|
-
search,
|
|
434
|
-
changeArea,
|
|
435
|
-
inputPlaceHolder,
|
|
436
|
-
changeTreeCheck,
|
|
437
|
-
...vue.toRefs(selectState)
|
|
438
|
-
};
|
|
439
|
-
}
|
|
440
|
-
});
|
|
441
|
-
const _hoisted_1$2 = { class: "varied-selector-panel" };
|
|
442
|
-
const _hoisted_2$2 = { class: "__selector-modal-panel-withGroup" };
|
|
443
|
-
const _hoisted_3$2 = { class: "varied-area-tabs" };
|
|
444
|
-
const _hoisted_4$2 = ["onClick"];
|
|
445
|
-
const _hoisted_5$2 = { class: "area-panel" };
|
|
446
|
-
const _hoisted_6$2 = {
|
|
447
|
-
key: 0,
|
|
448
|
-
class: "noData"
|
|
449
|
-
};
|
|
450
|
-
const _hoisted_7$1 = { style: { "color": "#9393a3", "font-size": "12px", "font-weight": "400" } };
|
|
451
|
-
const _hoisted_8$1 = {
|
|
452
|
-
key: 0,
|
|
453
|
-
class: "__selector-modal-options"
|
|
454
|
-
};
|
|
455
|
-
const _hoisted_9 = {
|
|
456
|
-
key: 1,
|
|
457
|
-
class: "__selector-modal-options",
|
|
458
|
-
style: { "overflow": "auto" }
|
|
459
|
-
};
|
|
460
|
-
const _hoisted_10 = { class: "department-option-item" };
|
|
461
|
-
const _hoisted_11 = {
|
|
462
|
-
key: 0,
|
|
463
|
-
class: "department-desc"
|
|
464
|
-
};
|
|
465
|
-
const _hoisted_12 = {
|
|
466
|
-
key: 2,
|
|
467
|
-
class: "__selector-modal-options"
|
|
468
|
-
};
|
|
469
|
-
const _hoisted_13 = {
|
|
470
|
-
key: 3,
|
|
471
|
-
class: "__selector-modal-options"
|
|
472
|
-
};
|
|
473
|
-
function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
474
|
-
const _component_search_outlined = vue.resolveComponent("search-outlined");
|
|
475
|
-
const _component_a_input = vue.resolveComponent("a-input");
|
|
476
|
-
const _component_Empty = vue.resolveComponent("Empty");
|
|
477
|
-
const _component_Checkbox = vue.resolveComponent("Checkbox");
|
|
478
|
-
const _component_Spin = vue.resolveComponent("Spin");
|
|
479
|
-
const _component_a_tree = vue.resolveComponent("a-tree");
|
|
480
|
-
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$2, [
|
|
481
|
-
vue.createElementVNode("div", _hoisted_2$2, [
|
|
482
|
-
vue.createElementVNode("div", _hoisted_3$2, [
|
|
483
|
-
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(_ctx.areas, (item) => {
|
|
484
|
-
return vue.openBlock(), vue.createElementBlock("div", {
|
|
485
|
-
key: item.key,
|
|
486
|
-
class: vue.normalizeClass(["area-tabs-item", { active: item.key === _ctx.activeKey }]),
|
|
487
|
-
onClick: vue.withModifiers(($event) => _ctx.changeArea(item), ["stop"])
|
|
488
|
-
}, vue.toDisplayString(item.title), 11, _hoisted_4$2);
|
|
489
|
-
}), 128))
|
|
490
|
-
]),
|
|
491
|
-
vue.createVNode(_component_a_input, {
|
|
492
|
-
value: _ctx.searchVal,
|
|
493
|
-
"onUpdate:value": _cache[0] || (_cache[0] = ($event) => _ctx.searchVal = $event),
|
|
494
|
-
placeholder: _ctx.inputPlaceHolder,
|
|
495
|
-
onBlur: _ctx.search
|
|
496
|
-
}, {
|
|
497
|
-
suffix: vue.withCtx(() => [
|
|
498
|
-
vue.createVNode(_component_search_outlined, { style: { color: "#9393A3" } })
|
|
499
|
-
]),
|
|
500
|
-
_: 1
|
|
501
|
-
}, 8, ["value", "placeholder", "onBlur"]),
|
|
502
|
-
vue.createElementVNode("div", _hoisted_5$2, [
|
|
503
|
-
_ctx.list && !_ctx.list.length ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_6$2, [
|
|
504
|
-
vue.createVNode(_component_Empty, { image: _ctx.emptyPic }, {
|
|
505
|
-
description: vue.withCtx(() => [
|
|
506
|
-
vue.createElementVNode("span", _hoisted_7$1, vue.toDisplayString(!!_ctx.searched ? "\u6682\u65E0\u6570\u636E" : "\u8BF7\u5148\u641C\u7D22\u4EBA\u5458\u5173\u952E\u5B57"), 1)
|
|
507
|
-
]),
|
|
508
|
-
_: 1
|
|
509
|
-
}, 8, ["image"])
|
|
510
|
-
])) : (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 1 }, [
|
|
511
|
-
_ctx.activeKey === 0 ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_8$1, [
|
|
512
|
-
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(_ctx.list, (item) => {
|
|
513
|
-
return vue.openBlock(), vue.createElementBlock("div", {
|
|
514
|
-
key: item.key,
|
|
515
|
-
class: "__selector-modal-options-item"
|
|
516
|
-
}, [
|
|
517
|
-
vue.createVNode(_component_Checkbox, {
|
|
518
|
-
checked: _ctx.staffsChecked[item.key],
|
|
519
|
-
"onUpdate:checked": ($event) => _ctx.staffsChecked[item.key] = $event,
|
|
520
|
-
class: "__selector-modal-option-check"
|
|
521
|
-
}, {
|
|
522
|
-
default: vue.withCtx(() => [
|
|
523
|
-
vue.createTextVNode(vue.toDisplayString(item.fullTitle || item.title), 1)
|
|
524
|
-
]),
|
|
525
|
-
_: 2
|
|
526
|
-
}, 1032, ["checked", "onUpdate:checked"])
|
|
527
|
-
]);
|
|
528
|
-
}), 128))
|
|
529
|
-
])) : _ctx.activeKey === 1 ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_9, [
|
|
530
|
-
vue.createVNode(_component_Spin, {
|
|
531
|
-
indicator: _ctx.indicator,
|
|
532
|
-
spinning: _ctx.loading
|
|
533
|
-
}, null, 8, ["indicator", "spinning"]),
|
|
534
|
-
vue.createCommentVNode(" "),
|
|
535
|
-
vue.createVNode(_component_a_tree, {
|
|
536
|
-
"checked-keys": _ctx.departmentChecked,
|
|
537
|
-
"default-expand-all": false,
|
|
538
|
-
checkable: "",
|
|
539
|
-
"tree-data": _ctx.list,
|
|
540
|
-
onCheck: _ctx.changeTreeCheck
|
|
541
|
-
}, {
|
|
542
|
-
title: vue.withCtx(({ title, description }) => [
|
|
543
|
-
vue.createElementVNode("div", _hoisted_10, [
|
|
544
|
-
vue.createElementVNode("span", null, vue.toDisplayString(title), 1),
|
|
545
|
-
description ? (vue.openBlock(), vue.createElementBlock("p", _hoisted_11, vue.toDisplayString(description), 1)) : vue.createCommentVNode("v-if", true)
|
|
546
|
-
])
|
|
547
|
-
]),
|
|
548
|
-
_: 1
|
|
549
|
-
}, 8, ["checked-keys", "tree-data", "onCheck"])
|
|
550
|
-
])) : _ctx.activeKey === 2 ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_12, [
|
|
551
|
-
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(_ctx.list, (item) => {
|
|
552
|
-
return vue.openBlock(), vue.createElementBlock("div", {
|
|
553
|
-
key: item.key,
|
|
554
|
-
class: "__selector-modal-options-item"
|
|
555
|
-
}, [
|
|
556
|
-
vue.createVNode(_component_Checkbox, {
|
|
557
|
-
checked: _ctx.groupChecked[item.key],
|
|
558
|
-
"onUpdate:checked": ($event) => _ctx.groupChecked[item.key] = $event,
|
|
559
|
-
class: "__selector-modal-option-check"
|
|
560
|
-
}, {
|
|
561
|
-
default: vue.withCtx(() => [
|
|
562
|
-
vue.createTextVNode(vue.toDisplayString(item.fullTitle || item.title), 1)
|
|
563
|
-
]),
|
|
564
|
-
_: 2
|
|
565
|
-
}, 1032, ["checked", "onUpdate:checked"])
|
|
566
|
-
]);
|
|
567
|
-
}), 128))
|
|
568
|
-
])) : _ctx.activeKey === 3 ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_13, [
|
|
569
|
-
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(_ctx.list, (item) => {
|
|
570
|
-
return vue.openBlock(), vue.createElementBlock("div", {
|
|
571
|
-
key: item.key,
|
|
572
|
-
class: "__selector-modal-options-item"
|
|
573
|
-
}, [
|
|
574
|
-
vue.createVNode(_component_Checkbox, {
|
|
575
|
-
checked: _ctx.shopChecked[item.key],
|
|
576
|
-
"onUpdate:checked": ($event) => _ctx.shopChecked[item.key] = $event,
|
|
577
|
-
class: "__selector-modal-option-check"
|
|
578
|
-
}, {
|
|
579
|
-
default: vue.withCtx(() => [
|
|
580
|
-
vue.createTextVNode(vue.toDisplayString(item.fullTitle || item.title), 1)
|
|
581
|
-
]),
|
|
582
|
-
_: 2
|
|
583
|
-
}, 1032, ["checked", "onUpdate:checked"])
|
|
584
|
-
]);
|
|
585
|
-
}), 128))
|
|
586
|
-
])) : vue.createCommentVNode("v-if", true)
|
|
587
|
-
], 64))
|
|
588
|
-
])
|
|
589
|
-
])
|
|
590
|
-
]);
|
|
591
|
-
}
|
|
592
|
-
var VariedCmp = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["render", _sfc_render$1], ["__file", "variedCmp.vue"]]);
|
|
352
|
+
var radioCmp = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["render", _sfc_render$1], ["__file", "radioCmp.vue"]]);
|
|
593
353
|
|
|
594
354
|
const _sfc_main$1 = vue.defineComponent({
|
|
595
355
|
components: { SearchOutlined: iconsVue.SearchOutlined, Empty: antDesignVue.Empty, ATree: antDesignVue.Tree },
|
|
@@ -605,6 +365,7 @@ const _sfc_main$1 = vue.defineComponent({
|
|
|
605
365
|
},
|
|
606
366
|
emits: ["fetchList", "update:selected"],
|
|
607
367
|
setup(props, { emit }) {
|
|
368
|
+
const treeRef = vue.ref();
|
|
608
369
|
const state = vue.reactive({
|
|
609
370
|
searchVal: "",
|
|
610
371
|
selectAll: false,
|
|
@@ -647,6 +408,7 @@ const _sfc_main$1 = vue.defineComponent({
|
|
|
647
408
|
changeTreeCheck,
|
|
648
409
|
...vue.toRefs(state),
|
|
649
410
|
...vue.toRefs(selectState),
|
|
411
|
+
treeRef,
|
|
650
412
|
list,
|
|
651
413
|
...methods
|
|
652
414
|
};
|
|
@@ -688,6 +450,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
688
450
|
}, 8, ["value", "onBlur"]),
|
|
689
451
|
vue.createElementVNode("div", _hoisted_4$1, [
|
|
690
452
|
vue.createVNode(_component_ATree, {
|
|
453
|
+
ref: "treeRef",
|
|
691
454
|
"checked-keys": _ctx.multipDepartment,
|
|
692
455
|
checkable: "",
|
|
693
456
|
"tree-data": _ctx.list,
|
|
@@ -718,7 +481,7 @@ var departmentCmp = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sfc_re
|
|
|
718
481
|
|
|
719
482
|
const _hoisted_1 = { class: "selector-content" };
|
|
720
483
|
const _hoisted_2 = {
|
|
721
|
-
key:
|
|
484
|
+
key: 3,
|
|
722
485
|
class: "__selector-chosen-panel"
|
|
723
486
|
};
|
|
724
487
|
const _hoisted_3 = {
|
|
@@ -747,18 +510,6 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
747
510
|
return list2;
|
|
748
511
|
} else if (props.mode === MODE.DEPARTMENT) {
|
|
749
512
|
return [...selectState.multipDepartment];
|
|
750
|
-
} else if (props.mode === MODE.VARIED) {
|
|
751
|
-
list2 = list2.concat(selectState.departmentChecked);
|
|
752
|
-
for (let [key, value] of Object.entries(selectState.staffsChecked)) {
|
|
753
|
-
value && list2.push(String(key));
|
|
754
|
-
}
|
|
755
|
-
for (let [key, value] of Object.entries(selectState.shopChecked)) {
|
|
756
|
-
value && list2.push(String(key));
|
|
757
|
-
}
|
|
758
|
-
for (let [key, value] of Object.entries(selectState.groupChecked)) {
|
|
759
|
-
value && list2.push(String(key));
|
|
760
|
-
}
|
|
761
|
-
return list2;
|
|
762
513
|
}
|
|
763
514
|
return [];
|
|
764
515
|
});
|
|
@@ -775,17 +526,10 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
775
526
|
emit("update:visible", !props.visible);
|
|
776
527
|
list.value = [];
|
|
777
528
|
}
|
|
778
|
-
function isCurrentFetch(area) {
|
|
779
|
-
let activeKey = 0;
|
|
780
|
-
activeKey = area === "department" ? 1 : activeKey;
|
|
781
|
-
activeKey = area === "group" ? 2 : activeKey;
|
|
782
|
-
activeKey = area === "shop" ? 3 : activeKey;
|
|
783
|
-
return selectState.activeKey === activeKey;
|
|
784
|
-
}
|
|
785
529
|
async function fetch(params) {
|
|
786
530
|
list.value = [];
|
|
787
531
|
selectState.searched = !!params?.searchVal;
|
|
788
|
-
let isDepartTree =
|
|
532
|
+
let isDepartTree = props.mode === MODE.DEPARTMENT;
|
|
789
533
|
if (isDepartTree) {
|
|
790
534
|
if (!departNative.value.length) {
|
|
791
535
|
departNative.value = await props.load(params);
|
|
@@ -808,13 +552,13 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
808
552
|
}
|
|
809
553
|
return;
|
|
810
554
|
}
|
|
811
|
-
if (
|
|
555
|
+
if (params.searchVal) {
|
|
812
556
|
await props.load(params).then((data) => {
|
|
813
557
|
if (data && data.length) {
|
|
814
558
|
let result = data.map((item) => {
|
|
815
559
|
return item;
|
|
816
560
|
});
|
|
817
|
-
list.value =
|
|
561
|
+
list.value = result;
|
|
818
562
|
selectState.dataMap = flatListFunc(data);
|
|
819
563
|
} else {
|
|
820
564
|
list.value = [];
|
|
@@ -865,29 +609,6 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
865
609
|
let arr = computeSelected.value.map((key) => findDataByKey(key));
|
|
866
610
|
emit("update:select", arr);
|
|
867
611
|
emit("change", arr);
|
|
868
|
-
} else if (props.mode === MODE.VARIED) {
|
|
869
|
-
let department = selectState.departmentChecked.map((key) => {
|
|
870
|
-
let data = findDataByKey(key);
|
|
871
|
-
return { ...data, area: "department" };
|
|
872
|
-
});
|
|
873
|
-
let group = [];
|
|
874
|
-
for (let key in selectState.groupChecked) {
|
|
875
|
-
let data = findDataByKey(key);
|
|
876
|
-
group.push({ ...data, area: "group" });
|
|
877
|
-
}
|
|
878
|
-
let shop = [];
|
|
879
|
-
for (let key in selectState.shopChecked) {
|
|
880
|
-
let data = findDataByKey(key);
|
|
881
|
-
shop.push({ ...data, area: "shop" });
|
|
882
|
-
}
|
|
883
|
-
let staff = [];
|
|
884
|
-
for (let key in selectState.staffsChecked) {
|
|
885
|
-
let data = findDataByKey(key);
|
|
886
|
-
staff.push({ ...data, area: "staff" });
|
|
887
|
-
}
|
|
888
|
-
let arr = [...department, ...group, ...shop, ...staff];
|
|
889
|
-
emit("update:select", arr);
|
|
890
|
-
emit("change", arr);
|
|
891
612
|
}
|
|
892
613
|
list.value = [];
|
|
893
614
|
modalCancel();
|
|
@@ -913,19 +634,6 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
913
634
|
(item) => String(item) === String(key)
|
|
914
635
|
);
|
|
915
636
|
index > -1 && selectState.multipDepartment.splice(index, 1);
|
|
916
|
-
} else if (props.mode === MODE.VARIED) {
|
|
917
|
-
if (selectState.staffsChecked[String(key)]) {
|
|
918
|
-
selectState.staffsChecked[String(key)] = false;
|
|
919
|
-
} else if (selectState.shopChecked[String(key)]) {
|
|
920
|
-
selectState.shopChecked[String(key)] = false;
|
|
921
|
-
} else if (selectState.groupChecked[String(key)]) {
|
|
922
|
-
selectState.groupChecked[String(key)] = false;
|
|
923
|
-
} else {
|
|
924
|
-
let index = selectState.departmentChecked.findIndex(
|
|
925
|
-
(item) => String(item) === String(key)
|
|
926
|
-
);
|
|
927
|
-
index > -1 && selectState.departmentChecked.splice(index, 1);
|
|
928
|
-
}
|
|
929
637
|
}
|
|
930
638
|
}
|
|
931
639
|
vue.watch(
|
|
@@ -947,36 +655,10 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
947
655
|
let multipleChecked = {};
|
|
948
656
|
arr.forEach((item) => multipleChecked[String(item?.key)] = true);
|
|
949
657
|
selectState.multipleChecked = multipleChecked;
|
|
950
|
-
} else {
|
|
951
|
-
let arr = props.select;
|
|
952
|
-
selected.value = arr.length ? arr.map((item) => String(item?.key)) : [];
|
|
953
|
-
let department = [];
|
|
954
|
-
let shop = {};
|
|
955
|
-
let staff = {};
|
|
956
|
-
let group = {};
|
|
957
|
-
arr.forEach((item) => {
|
|
958
|
-
if (item["area"] && item["area"] === "department")
|
|
959
|
-
department.push(String(item?.key));
|
|
960
|
-
else if (item["area"] && item["area"] === "shop")
|
|
961
|
-
shop[String(item?.key)] = true;
|
|
962
|
-
else if (item["area"] && item["area"] === "staff")
|
|
963
|
-
staff[String(item?.key)] = true;
|
|
964
|
-
else if (item["area"] && item["area"] === "group")
|
|
965
|
-
group[String(item?.key)] = true;
|
|
966
|
-
});
|
|
967
|
-
selectState.departmentChecked = department;
|
|
968
|
-
selectState.shopChecked = shop;
|
|
969
|
-
selectState.staffsChecked = staff;
|
|
970
|
-
selectState.groupChecked = group;
|
|
971
658
|
}
|
|
972
659
|
} else {
|
|
973
660
|
selected.value = [];
|
|
974
661
|
selectState.multipleChecked = {};
|
|
975
|
-
selectState.departmentChecked = [];
|
|
976
|
-
selectState.shopChecked = {};
|
|
977
|
-
selectState.staffsChecked = {};
|
|
978
|
-
selectState.groupChecked = {};
|
|
979
|
-
selectState.activeKey = 0;
|
|
980
662
|
}
|
|
981
663
|
},
|
|
982
664
|
{ immediate: true, deep: true }
|
|
@@ -1001,29 +683,22 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
1001
683
|
"onUpdate:selected": _cache[0] || (_cache[0] = ($event) => selected.value = $event),
|
|
1002
684
|
list: vue.unref(list),
|
|
1003
685
|
onFetchList: fetch
|
|
1004
|
-
}, null, 8, ["selected", "list"])) : _ctx.mode === "
|
|
686
|
+
}, null, 8, ["selected", "list"])) : _ctx.mode === "department" ? (vue.openBlock(), vue.createBlock(departmentCmp, {
|
|
1005
687
|
key: 1,
|
|
1006
688
|
selected: selected.value,
|
|
1007
689
|
"onUpdate:selected": _cache[1] || (_cache[1] = ($event) => selected.value = $event),
|
|
1008
|
-
list: vue.unref(list),
|
|
1009
|
-
"show-count": _ctx.showCount,
|
|
1010
|
-
onFetchList: fetch
|
|
1011
|
-
}, null, 8, ["selected", "list", "show-count"])) : _ctx.mode === "department" ? (vue.openBlock(), vue.createBlock(departmentCmp, {
|
|
1012
|
-
key: 2,
|
|
1013
|
-
selected: selected.value,
|
|
1014
|
-
"onUpdate:selected": _cache[2] || (_cache[2] = ($event) => selected.value = $event),
|
|
1015
690
|
limit: _ctx.limit,
|
|
1016
691
|
onFetchList: fetch
|
|
1017
692
|
}, null, 8, ["selected", "limit"])) : (vue.openBlock(), vue.createBlock(multipleCmp, {
|
|
1018
|
-
key:
|
|
693
|
+
key: 2,
|
|
1019
694
|
selected: selected.value,
|
|
1020
|
-
"onUpdate:selected": _cache[
|
|
695
|
+
"onUpdate:selected": _cache[2] || (_cache[2] = ($event) => selected.value = $event),
|
|
1021
696
|
limit: _ctx.limit,
|
|
1022
697
|
list: vue.unref(list),
|
|
1023
698
|
"is-tree": multipTree.value,
|
|
1024
699
|
onFetchList: fetch
|
|
1025
700
|
}, null, 8, ["selected", "limit", "list", "is-tree"])),
|
|
1026
|
-
["multiple", "
|
|
701
|
+
["multiple", "department"].includes(_ctx.mode) ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_2, [
|
|
1027
702
|
["multiple", "varied"].includes(_ctx.mode) && _ctx.showCount ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_3, [
|
|
1028
703
|
vue.createElementVNode("span", null, "\u5DF2\u9009\u62E9" + vue.toDisplayString(vue.unref(computeSelected) && vue.unref(computeSelected).length || 0) + vue.toDisplayString(_ctx.$props.unitStr), 1),
|
|
1029
704
|
_ctx.limit ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_4, "\u6700\u591A\u9009\u62E9" + vue.toDisplayString(_ctx.limit) + vue.toDisplayString(_ctx.$props.unitStr), 1)) : vue.createCommentVNode("v-if", true)
|
|
@@ -54,15 +54,20 @@ export declare const areas: readonly {
|
|
|
54
54
|
export declare const searchVal: import("vue").Ref<string>;
|
|
55
55
|
export declare const selectState: {
|
|
56
56
|
multipleChecked: any;
|
|
57
|
-
departmentChecked: string[];
|
|
58
57
|
multipDepartment: string[];
|
|
58
|
+
dataMap: Map<string, any>;
|
|
59
|
+
curlistKeys: Set<string>;
|
|
60
|
+
fetchLoading: boolean;
|
|
61
|
+
searched: boolean;
|
|
62
|
+
};
|
|
63
|
+
export declare const vairedState: {
|
|
64
|
+
departmentChecked: string[];
|
|
59
65
|
staffsChecked: any;
|
|
60
66
|
shopChecked: any;
|
|
61
67
|
groupChecked: any;
|
|
62
68
|
dataMap: Map<string, any>;
|
|
63
|
-
curlistKeys: Set<string>;
|
|
64
69
|
activeKey: number;
|
|
65
|
-
|
|
70
|
+
curlistKeys: Set<string>;
|
|
66
71
|
searched: boolean;
|
|
67
72
|
};
|
|
68
73
|
export declare const list: any;
|
|
@@ -9,16 +9,12 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
9
9
|
};
|
|
10
10
|
}, {
|
|
11
11
|
search(): void;
|
|
12
|
+
treeRef: import("vue").Ref<any>;
|
|
12
13
|
list: any;
|
|
13
14
|
multipleChecked: import("vue").Ref<any>;
|
|
14
|
-
departmentChecked: import("vue").Ref<string[]>;
|
|
15
15
|
multipDepartment: import("vue").Ref<string[]>;
|
|
16
|
-
staffsChecked: import("vue").Ref<any>;
|
|
17
|
-
shopChecked: import("vue").Ref<any>;
|
|
18
|
-
groupChecked: import("vue").Ref<any>;
|
|
19
16
|
dataMap: import("vue").Ref<Map<string, any>>;
|
|
20
17
|
curlistKeys: import("vue").Ref<Set<string>>;
|
|
21
|
-
activeKey: import("vue").Ref<number>;
|
|
22
18
|
fetchLoading: import("vue").Ref<boolean>;
|
|
23
19
|
searched: import("vue").Ref<boolean>;
|
|
24
20
|
searchVal: import("vue").Ref<string>;
|
|
@@ -13,14 +13,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
13
13
|
setState(): void;
|
|
14
14
|
list: any;
|
|
15
15
|
multipleChecked: import("vue").Ref<any>;
|
|
16
|
-
departmentChecked: import("vue").Ref<string[]>;
|
|
17
16
|
multipDepartment: import("vue").Ref<string[]>;
|
|
18
|
-
staffsChecked: import("vue").Ref<any>;
|
|
19
|
-
shopChecked: import("vue").Ref<any>;
|
|
20
|
-
groupChecked: import("vue").Ref<any>;
|
|
21
17
|
dataMap: import("vue").Ref<Map<string, any>>;
|
|
22
18
|
curlistKeys: import("vue").Ref<Set<string>>;
|
|
23
|
-
activeKey: import("vue").Ref<number>;
|
|
24
19
|
fetchLoading: import("vue").Ref<boolean>;
|
|
25
20
|
searched: import("vue").Ref<boolean>;
|
|
26
21
|
searchVal: import("vue").Ref<string>;
|