bm-admin-ui 1.0.64-alpha → 1.0.66-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/edit-form/index.d.ts +1 -1
- package/es/components/edit-form/src/edit-form.vue.d.ts +1 -1
- package/es/components/editor/index.d.ts +8 -8
- package/es/components/editor/index.js +8 -4
- package/es/components/editor/src/editor.vue.d.ts +8 -8
- package/es/components/feedback/index.d.ts +4 -4
- package/es/components/feedback/src/bmAlert.vue.d.ts +4 -4
- package/es/components/flow-designer/index.d.ts +45 -4
- package/es/components/flow-designer/index.js +1284 -11
- package/es/components/flow-designer/src/bm-nodes/BmConditionNode.vue.d.ts +4 -5
- package/es/components/flow-designer/src/bm-nodes/BmHtmlNode.vue.d.ts +1 -1
- package/es/components/flow-designer/src/config.d.ts +1 -0
- package/es/components/flow-designer/src/flow-designer.vue.d.ts +47 -4
- package/es/components/flow-designer/src/utils.d.ts +1 -0
- package/es/components/form-create/index.js +17581 -227
- package/es/components/form-designer/index.js +72 -14
- package/es/components/input-tags-display/index.d.ts +1 -1
- package/es/components/input-tags-display/src/input-tags-display.vue.d.ts +1 -1
- package/es/components/search-filter/index.d.ts +3 -3
- package/es/components/search-filter/src/search-filter.vue.d.ts +3 -3
- package/es/components/select-all/index.d.ts +10 -10
- package/es/components/select-all/src/selectAll.vue.d.ts +10 -10
- package/es/components/staffs-selector/index.d.ts +51 -12
- package/es/components/staffs-selector/index.js +297 -224
- package/es/components/staffs-selector/src/action.d.ts +2 -0
- package/es/components/staffs-selector/src/departmentCmp.vue.d.ts +49 -0
- package/es/components/staffs-selector/src/multipleCmp.vue.d.ts +1 -11
- package/es/components/staffs-selector/src/staffs-selector.vue.d.ts +51 -12
- package/es/components/staffs-selector/src/variedCmp.vue.d.ts +1 -0
- package/es/components/timeline/index.d.ts +1 -1
- package/es/components/timeline/src/timeline-item.vue.d.ts +1 -1
- package/es/components/upload/index.js +8 -4
- package/lib/components/edit-form/index.d.ts +1 -1
- package/lib/components/edit-form/src/edit-form.vue.d.ts +1 -1
- package/lib/components/editor/index.d.ts +8 -8
- package/lib/components/editor/index.js +8 -4
- package/lib/components/editor/src/editor.vue.d.ts +8 -8
- package/lib/components/feedback/index.d.ts +4 -4
- package/lib/components/feedback/src/bmAlert.vue.d.ts +4 -4
- package/lib/components/flow-designer/index.d.ts +45 -4
- package/lib/components/flow-designer/index.js +1285 -9
- package/lib/components/flow-designer/src/bm-nodes/BmConditionNode.vue.d.ts +4 -5
- package/lib/components/flow-designer/src/bm-nodes/BmHtmlNode.vue.d.ts +1 -1
- package/lib/components/flow-designer/src/config.d.ts +1 -0
- package/lib/components/flow-designer/src/flow-designer.vue.d.ts +47 -4
- package/lib/components/flow-designer/src/utils.d.ts +1 -0
- package/lib/components/form-create/index.js +17580 -226
- package/lib/components/form-designer/index.js +72 -14
- package/lib/components/input-tags-display/index.d.ts +1 -1
- package/lib/components/input-tags-display/src/input-tags-display.vue.d.ts +1 -1
- package/lib/components/search-filter/index.d.ts +3 -3
- package/lib/components/search-filter/src/search-filter.vue.d.ts +3 -3
- package/lib/components/select-all/index.d.ts +10 -10
- package/lib/components/select-all/src/selectAll.vue.d.ts +10 -10
- package/lib/components/staffs-selector/index.d.ts +51 -12
- package/lib/components/staffs-selector/index.js +295 -222
- package/lib/components/staffs-selector/src/action.d.ts +2 -0
- package/lib/components/staffs-selector/src/departmentCmp.vue.d.ts +49 -0
- package/lib/components/staffs-selector/src/multipleCmp.vue.d.ts +1 -11
- package/lib/components/staffs-selector/src/staffs-selector.vue.d.ts +51 -12
- package/lib/components/staffs-selector/src/variedCmp.vue.d.ts +1 -0
- package/lib/components/timeline/index.d.ts +1 -1
- package/lib/components/timeline/src/timeline-item.vue.d.ts +1 -1
- package/lib/components/upload/index.js +8 -4
- package/package.json +1 -1
- package/theme-chalk/flow-designer.css +1 -1
- package/theme-chalk/index.css +1 -1
- package/types/components/edit-form/index.d.ts +1 -1
- package/types/components/edit-form/src/edit-form.vue.d.ts +1 -1
- package/types/components/editor/index.d.ts +8 -8
- package/types/components/editor/src/editor.vue.d.ts +8 -8
- package/types/components/feedback/index.d.ts +4 -4
- package/types/components/feedback/src/bmAlert.vue.d.ts +4 -4
- package/types/components/flow-designer/index.d.ts +45 -4
- package/types/components/flow-designer/src/bm-nodes/BmConditionNode.vue.d.ts +4 -5
- package/types/components/flow-designer/src/bm-nodes/BmHtmlNode.vue.d.ts +1 -1
- package/types/components/flow-designer/src/config.d.ts +1 -0
- package/types/components/flow-designer/src/flow-designer.vue.d.ts +47 -4
- package/types/components/flow-designer/src/utils.d.ts +1 -0
- package/types/components/input-tags-display/index.d.ts +1 -1
- package/types/components/input-tags-display/src/input-tags-display.vue.d.ts +1 -1
- package/types/components/search-filter/index.d.ts +3 -3
- package/types/components/search-filter/src/search-filter.vue.d.ts +3 -3
- package/types/components/select-all/index.d.ts +10 -10
- package/types/components/select-all/src/selectAll.vue.d.ts +10 -10
- package/types/components/staffs-selector/index.d.ts +51 -12
- package/types/components/staffs-selector/src/action.d.ts +2 -0
- package/types/components/staffs-selector/src/departmentCmp.vue.d.ts +49 -0
- package/types/components/staffs-selector/src/multipleCmp.vue.d.ts +1 -11
- package/types/components/staffs-selector/src/staffs-selector.vue.d.ts +51 -12
- package/types/components/staffs-selector/src/variedCmp.vue.d.ts +1 -0
- package/types/components/timeline/index.d.ts +1 -1
- package/types/components/timeline/src/timeline-item.vue.d.ts +1 -1
- package/es/components/flow-designer/src/flow-designer-test.d.ts +0 -20
- package/lib/components/flow-designer/src/flow-designer-test.d.ts +0 -20
- package/types/components/flow-designer/src/flow-designer-test.d.ts +0 -20
|
@@ -11,6 +11,7 @@ const MODE = {
|
|
|
11
11
|
RADIO: 'radio',
|
|
12
12
|
MULTIPLE: 'multiple',
|
|
13
13
|
VARIED: 'varied',
|
|
14
|
+
DEPARTMENT: 'department',
|
|
14
15
|
};
|
|
15
16
|
const selectProps = {
|
|
16
17
|
visible: {
|
|
@@ -73,6 +74,7 @@ const selectState = vue.reactive({
|
|
|
73
74
|
dataMap: new Map(),
|
|
74
75
|
curlistKeys: new Set(),
|
|
75
76
|
activeKey: 0,
|
|
77
|
+
fetchLoading: false,
|
|
76
78
|
});
|
|
77
79
|
const list = vue.ref([]);
|
|
78
80
|
const departNative = vue.ref([]);
|
|
@@ -85,8 +87,8 @@ var _export_sfc = (sfc, props) => {
|
|
|
85
87
|
return target;
|
|
86
88
|
};
|
|
87
89
|
|
|
88
|
-
const _sfc_main$
|
|
89
|
-
components: { SearchOutlined: iconsVue.SearchOutlined, Checkbox: antDesignVue.Checkbox, Empty: antDesignVue.Empty
|
|
90
|
+
const _sfc_main$4 = vue.defineComponent({
|
|
91
|
+
components: { SearchOutlined: iconsVue.SearchOutlined, Checkbox: antDesignVue.Checkbox, Empty: antDesignVue.Empty },
|
|
90
92
|
props: {
|
|
91
93
|
limit: {
|
|
92
94
|
type: Number,
|
|
@@ -95,10 +97,6 @@ const _sfc_main$3 = vue.defineComponent({
|
|
|
95
97
|
selected: {
|
|
96
98
|
type: Array,
|
|
97
99
|
default: () => []
|
|
98
|
-
},
|
|
99
|
-
isTree: {
|
|
100
|
-
type: Boolean,
|
|
101
|
-
default: false
|
|
102
100
|
}
|
|
103
101
|
},
|
|
104
102
|
emits: ["fetchList", "update:selected"],
|
|
@@ -121,7 +119,7 @@ const _sfc_main$3 = vue.defineComponent({
|
|
|
121
119
|
});
|
|
122
120
|
},
|
|
123
121
|
search() {
|
|
124
|
-
let data =
|
|
122
|
+
let data = { searchVal: state.searchVal || "" };
|
|
125
123
|
emit("fetchList", data);
|
|
126
124
|
},
|
|
127
125
|
setState() {
|
|
@@ -156,38 +154,11 @@ const _sfc_main$3 = vue.defineComponent({
|
|
|
156
154
|
vue.watch(
|
|
157
155
|
() => list,
|
|
158
156
|
() => {
|
|
159
|
-
|
|
157
|
+
methods.setState();
|
|
160
158
|
},
|
|
161
159
|
{ deep: true }
|
|
162
160
|
);
|
|
163
|
-
const departmentSelect = vue.ref([]);
|
|
164
|
-
function changeTreeCheck(checkedKeys) {
|
|
165
|
-
departmentSelect.value = checkedKeys;
|
|
166
|
-
let flatMap = selectState.dataMap;
|
|
167
|
-
let curlistKeys = selectState.curlistKeys;
|
|
168
|
-
let hadselected = new Set(selectState.multipDepartment);
|
|
169
|
-
let curselect = new Set(checkedKeys);
|
|
170
|
-
for (let key of hadselected) {
|
|
171
|
-
if (curlistKeys.has(String(key)) && (!curselect.has(String(key)) || curselect.has(String(key)) && curselect.has(flatMap.get(String(key))["parent"]))) {
|
|
172
|
-
hadselected.delete(key);
|
|
173
|
-
}
|
|
174
|
-
}
|
|
175
|
-
for (let key of curselect) {
|
|
176
|
-
let obj = flatMap.get(String(key));
|
|
177
|
-
if (obj && !curselect.has(obj["parent"])) {
|
|
178
|
-
hadselected.add(String(key));
|
|
179
|
-
}
|
|
180
|
-
}
|
|
181
|
-
let arr = Array.from(hadselected) || [];
|
|
182
|
-
if (props.limit && props.limit > 0 && arr.length > props.limit) {
|
|
183
|
-
antDesignVue.message.error("\u52FE\u9009\u540E\u5C06\u8D85\u8FC7\u4EBA\u5458\u9650\u5236");
|
|
184
|
-
return;
|
|
185
|
-
}
|
|
186
|
-
selectState.multipDepartment = Array.from(hadselected) || [];
|
|
187
|
-
}
|
|
188
161
|
return {
|
|
189
|
-
changeTreeCheck,
|
|
190
|
-
departmentSelect,
|
|
191
162
|
...vue.toRefs(state),
|
|
192
163
|
...vue.toRefs(selectState),
|
|
193
164
|
list,
|
|
@@ -195,31 +166,25 @@ const _sfc_main$3 = vue.defineComponent({
|
|
|
195
166
|
};
|
|
196
167
|
}
|
|
197
168
|
});
|
|
198
|
-
const _hoisted_1$
|
|
199
|
-
const _hoisted_2$
|
|
200
|
-
const _hoisted_3$
|
|
201
|
-
const _hoisted_4$
|
|
202
|
-
const _hoisted_5$
|
|
203
|
-
const _hoisted_6$
|
|
204
|
-
const _hoisted_7$1 = {
|
|
169
|
+
const _hoisted_1$4 = { class: "multiple-selector" };
|
|
170
|
+
const _hoisted_2$4 = { class: "__selector-modal-panel" };
|
|
171
|
+
const _hoisted_3$4 = { class: "__search-panel" };
|
|
172
|
+
const _hoisted_4$4 = { class: "__selector-modal-options" };
|
|
173
|
+
const _hoisted_5$4 = { class: "__selector-modal-options-item fixed-option" };
|
|
174
|
+
const _hoisted_6$3 = {
|
|
205
175
|
key: 0,
|
|
206
|
-
class: "department-desc"
|
|
207
|
-
};
|
|
208
|
-
const _hoisted_8$1 = {
|
|
209
|
-
key: 2,
|
|
210
176
|
class: "noData",
|
|
211
177
|
style: { "height": "280px" }
|
|
212
178
|
};
|
|
213
|
-
const
|
|
214
|
-
function _sfc_render$
|
|
179
|
+
const _hoisted_7$2 = { style: { "color": "#9393a3", "font-size": "12px", "font-weight": "400" } };
|
|
180
|
+
function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {
|
|
215
181
|
const _component_search_outlined = vue.resolveComponent("search-outlined");
|
|
216
182
|
const _component_AInput = vue.resolveComponent("AInput");
|
|
217
183
|
const _component_Checkbox = vue.resolveComponent("Checkbox");
|
|
218
|
-
const _component_ATree = vue.resolveComponent("ATree");
|
|
219
184
|
const _component_Empty = vue.resolveComponent("Empty");
|
|
220
|
-
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$
|
|
221
|
-
vue.createElementVNode("div", _hoisted_2$
|
|
222
|
-
vue.createElementVNode("div", _hoisted_3$
|
|
185
|
+
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$4, [
|
|
186
|
+
vue.createElementVNode("div", _hoisted_2$4, [
|
|
187
|
+
vue.createElementVNode("div", _hoisted_3$4, [
|
|
223
188
|
vue.createVNode(_component_AInput, {
|
|
224
189
|
value: _ctx.searchVal,
|
|
225
190
|
"onUpdate:value": _cache[0] || (_cache[0] = ($event) => _ctx.searchVal = $event),
|
|
@@ -231,60 +196,44 @@ function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
231
196
|
]),
|
|
232
197
|
_: 1
|
|
233
198
|
}, 8, ["value", "onChange"]),
|
|
234
|
-
vue.createElementVNode("div", _hoisted_4$
|
|
235
|
-
|
|
236
|
-
vue.
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
199
|
+
vue.createElementVNode("div", _hoisted_4$4, [
|
|
200
|
+
vue.createElementVNode("div", _hoisted_5$4, [
|
|
201
|
+
vue.withDirectives(vue.createVNode(_component_Checkbox, {
|
|
202
|
+
checked: _ctx.selectAll,
|
|
203
|
+
"onUpdate:checked": _cache[1] || (_cache[1] = ($event) => _ctx.selectAll = $event),
|
|
204
|
+
indeterminate: _ctx.indeterminate,
|
|
205
|
+
onChange: _ctx.changeAllOption
|
|
206
|
+
}, {
|
|
207
|
+
default: vue.withCtx(() => [
|
|
208
|
+
vue.createTextVNode("\u5168\u9009")
|
|
209
|
+
]),
|
|
210
|
+
_: 1
|
|
211
|
+
}, 8, ["checked", "indeterminate", "onChange"]), [
|
|
212
|
+
[vue.vShow, _ctx.list.length]
|
|
213
|
+
])
|
|
214
|
+
]),
|
|
215
|
+
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(_ctx.list, (item) => {
|
|
216
|
+
return vue.openBlock(), vue.createElementBlock("div", {
|
|
217
|
+
key: item.key,
|
|
218
|
+
class: "__selector-modal-options-item"
|
|
219
|
+
}, [
|
|
220
|
+
vue.createVNode(_component_Checkbox, {
|
|
221
|
+
checked: _ctx.multipleChecked[item.key],
|
|
222
|
+
"onUpdate:checked": ($event) => _ctx.multipleChecked[item.key] = $event,
|
|
223
|
+
class: "__selector-modal-option-check",
|
|
224
|
+
disabled: _ctx.isFulfill
|
|
242
225
|
}, {
|
|
243
226
|
default: vue.withCtx(() => [
|
|
244
|
-
vue.createTextVNode(
|
|
227
|
+
vue.createTextVNode(vue.toDisplayString(item?.fullTitle || item.title), 1)
|
|
245
228
|
]),
|
|
246
|
-
_:
|
|
247
|
-
},
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(_ctx.list, (item) => {
|
|
252
|
-
return vue.openBlock(), vue.createElementBlock("div", {
|
|
253
|
-
key: item.key,
|
|
254
|
-
class: "__selector-modal-options-item"
|
|
255
|
-
}, [
|
|
256
|
-
vue.createVNode(_component_Checkbox, {
|
|
257
|
-
checked: _ctx.multipleChecked[item.key],
|
|
258
|
-
"onUpdate:checked": ($event) => _ctx.multipleChecked[item.key] = $event,
|
|
259
|
-
class: "__selector-modal-option-check",
|
|
260
|
-
disabled: _ctx.isFulfill
|
|
261
|
-
}, {
|
|
262
|
-
default: vue.withCtx(() => [
|
|
263
|
-
vue.createTextVNode(vue.toDisplayString(item.title), 1)
|
|
264
|
-
]),
|
|
265
|
-
_: 2
|
|
266
|
-
}, 1032, ["checked", "onUpdate:checked", "disabled"])
|
|
267
|
-
]);
|
|
268
|
-
}), 128))
|
|
269
|
-
], 64)) : _ctx.isTree ? (vue.openBlock(), vue.createBlock(_component_ATree, {
|
|
270
|
-
key: 1,
|
|
271
|
-
"checked-keys": _ctx.departmentSelect,
|
|
272
|
-
checkable: "",
|
|
273
|
-
"tree-data": _ctx.list,
|
|
274
|
-
onCheck: _ctx.changeTreeCheck
|
|
275
|
-
}, {
|
|
276
|
-
title: vue.withCtx(({ title, key, description }) => [
|
|
277
|
-
vue.createElementVNode("div", _hoisted_6$2, [
|
|
278
|
-
vue.createElementVNode("span", null, vue.toDisplayString(title) + vue.toDisplayString(key ? `(${key})` : ""), 1),
|
|
279
|
-
description ? (vue.openBlock(), vue.createElementBlock("p", _hoisted_7$1, vue.toDisplayString(description), 1)) : vue.createCommentVNode("v-if", true)
|
|
280
|
-
])
|
|
281
|
-
]),
|
|
282
|
-
_: 1
|
|
283
|
-
}, 8, ["checked-keys", "tree-data", "onCheck"])) : vue.createCommentVNode("v-if", true),
|
|
284
|
-
_ctx.list && !_ctx.list.length ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_8$1, [
|
|
229
|
+
_: 2
|
|
230
|
+
}, 1032, ["checked", "onUpdate:checked", "disabled"])
|
|
231
|
+
]);
|
|
232
|
+
}), 128)),
|
|
233
|
+
_ctx.list && !_ctx.list.length ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_6$3, [
|
|
285
234
|
vue.createVNode(_component_Empty, { image: _ctx.emptyPic }, {
|
|
286
235
|
description: vue.withCtx(() => [
|
|
287
|
-
vue.createElementVNode("span",
|
|
236
|
+
vue.createElementVNode("span", _hoisted_7$2, vue.toDisplayString(!!_ctx.searchVal ? "\u6682\u65E0\u6570\u636E" : "\u8BF7\u5148\u641C\u7D22\u4EBA\u5458\u5173\u952E\u5B57"), 1)
|
|
288
237
|
]),
|
|
289
238
|
_: 1
|
|
290
239
|
}, 8, ["image"])
|
|
@@ -294,9 +243,9 @@ function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
294
243
|
])
|
|
295
244
|
]);
|
|
296
245
|
}
|
|
297
|
-
var multipleCmp = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
246
|
+
var multipleCmp = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["render", _sfc_render$3], ["__file", "multipleCmp.vue"]]);
|
|
298
247
|
|
|
299
|
-
const _sfc_main$
|
|
248
|
+
const _sfc_main$3 = vue.defineComponent({
|
|
300
249
|
name: "RadioCmp",
|
|
301
250
|
components: { ARadio: antDesignVue.Radio, AInput: antDesignVue.Input, ARadioGroup: antDesignVue.RadioGroup, Empty: antDesignVue.Empty, SearchOutlined: iconsVue.SearchOutlined },
|
|
302
251
|
props: {
|
|
@@ -314,11 +263,11 @@ const _sfc_main$2 = vue.defineComponent({
|
|
|
314
263
|
const searchVal = vue.ref("");
|
|
315
264
|
const emptyPic = antDesignVue.Empty.PRESENTED_IMAGE_SIMPLE;
|
|
316
265
|
function search() {
|
|
317
|
-
let data =
|
|
266
|
+
let data = { searchVal: searchVal.value || "" };
|
|
318
267
|
emit("fetchList", data);
|
|
319
268
|
}
|
|
320
269
|
function radioChange(e) {
|
|
321
|
-
emit("update:selected", e.target.value);
|
|
270
|
+
emit("update:selected", String(e.target.value));
|
|
322
271
|
}
|
|
323
272
|
return {
|
|
324
273
|
searchVal,
|
|
@@ -328,25 +277,25 @@ const _sfc_main$2 = vue.defineComponent({
|
|
|
328
277
|
};
|
|
329
278
|
}
|
|
330
279
|
});
|
|
331
|
-
const _hoisted_1$
|
|
332
|
-
const _hoisted_2$
|
|
333
|
-
const _hoisted_3$
|
|
280
|
+
const _hoisted_1$3 = { class: "radio-selector-panel" };
|
|
281
|
+
const _hoisted_2$3 = { class: "__search-panel withoutpad" };
|
|
282
|
+
const _hoisted_3$3 = {
|
|
334
283
|
key: 0,
|
|
335
284
|
class: "__selector-modal-options __radio-panel"
|
|
336
285
|
};
|
|
337
|
-
const _hoisted_4$
|
|
286
|
+
const _hoisted_4$3 = {
|
|
338
287
|
key: 1,
|
|
339
288
|
class: "noData"
|
|
340
289
|
};
|
|
341
|
-
const _hoisted_5$
|
|
342
|
-
function _sfc_render$
|
|
290
|
+
const _hoisted_5$3 = { style: { "color": "#9393a3", "font-size": "12px", "font-weight": "400" } };
|
|
291
|
+
function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) {
|
|
343
292
|
const _component_search_outlined = vue.resolveComponent("search-outlined");
|
|
344
293
|
const _component_a_input = vue.resolveComponent("a-input");
|
|
345
294
|
const _component_ARadio = vue.resolveComponent("ARadio");
|
|
346
295
|
const _component_ARadioGroup = vue.resolveComponent("ARadioGroup");
|
|
347
296
|
const _component_Empty = vue.resolveComponent("Empty");
|
|
348
|
-
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$
|
|
349
|
-
vue.createElementVNode("div", _hoisted_2$
|
|
297
|
+
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$3, [
|
|
298
|
+
vue.createElementVNode("div", _hoisted_2$3, [
|
|
350
299
|
vue.createVNode(_component_a_input, {
|
|
351
300
|
value: _ctx.searchVal,
|
|
352
301
|
"onUpdate:value": _cache[0] || (_cache[0] = ($event) => _ctx.searchVal = $event),
|
|
@@ -358,7 +307,7 @@ function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
358
307
|
]),
|
|
359
308
|
_: 1
|
|
360
309
|
}, 8, ["value", "onChange"]),
|
|
361
|
-
_ctx.list && _ctx.list.length ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_3$
|
|
310
|
+
_ctx.list && _ctx.list.length ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_3$3, [
|
|
362
311
|
vue.createVNode(_component_ARadioGroup, {
|
|
363
312
|
value: _ctx.selected,
|
|
364
313
|
style: { width: "100%" },
|
|
@@ -372,7 +321,7 @@ function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
372
321
|
value: item.key
|
|
373
322
|
}, {
|
|
374
323
|
default: vue.withCtx(() => [
|
|
375
|
-
vue.createTextVNode(vue.toDisplayString(item.title), 1)
|
|
324
|
+
vue.createTextVNode(vue.toDisplayString(item.fullTitle || item.title), 1)
|
|
376
325
|
]),
|
|
377
326
|
_: 2
|
|
378
327
|
}, 1032, ["value"]);
|
|
@@ -381,10 +330,10 @@ function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
381
330
|
_: 1
|
|
382
331
|
}, 8, ["value", "onChange"])
|
|
383
332
|
])) : vue.createCommentVNode("v-if", true),
|
|
384
|
-
_ctx.list && !_ctx.list.length ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_4$
|
|
333
|
+
_ctx.list && !_ctx.list.length ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_4$3, [
|
|
385
334
|
vue.createVNode(_component_Empty, { image: _ctx.emptyPic }, {
|
|
386
335
|
description: vue.withCtx(() => [
|
|
387
|
-
vue.createElementVNode("span", _hoisted_5$
|
|
336
|
+
vue.createElementVNode("span", _hoisted_5$3, vue.toDisplayString(!!_ctx.searchVal ? "\u6682\u65E0\u6570\u636E" : "\u8BF7\u5148\u641C\u7D22\u4EBA\u5458\u5173\u952E\u5B57"), 1)
|
|
388
337
|
]),
|
|
389
338
|
_: 1
|
|
390
339
|
}, 8, ["image"])
|
|
@@ -392,9 +341,9 @@ function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
392
341
|
])
|
|
393
342
|
]);
|
|
394
343
|
}
|
|
395
|
-
var radioCmp = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
344
|
+
var radioCmp = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["render", _sfc_render$2], ["__file", "radioCmp.vue"]]);
|
|
396
345
|
|
|
397
|
-
const _sfc_main$
|
|
346
|
+
const _sfc_main$2 = vue.defineComponent({
|
|
398
347
|
props: {
|
|
399
348
|
list: {
|
|
400
349
|
type: Array,
|
|
@@ -440,7 +389,7 @@ const _sfc_main$1 = vue.defineComponent({
|
|
|
440
389
|
}
|
|
441
390
|
function search() {
|
|
442
391
|
emit("fetchList", {
|
|
443
|
-
searchVal: searchVal.value,
|
|
392
|
+
searchVal: searchVal.value || "",
|
|
444
393
|
area: areas[selectState.activeKey].paramStr
|
|
445
394
|
});
|
|
446
395
|
}
|
|
@@ -486,17 +435,17 @@ const _sfc_main$1 = vue.defineComponent({
|
|
|
486
435
|
};
|
|
487
436
|
}
|
|
488
437
|
});
|
|
489
|
-
const _hoisted_1$
|
|
490
|
-
const _hoisted_2$
|
|
491
|
-
const _hoisted_3$
|
|
492
|
-
const _hoisted_4$
|
|
493
|
-
const _hoisted_5$
|
|
494
|
-
const _hoisted_6$
|
|
438
|
+
const _hoisted_1$2 = { class: "varied-selector-panel" };
|
|
439
|
+
const _hoisted_2$2 = { class: "__selector-modal-panel-withGroup" };
|
|
440
|
+
const _hoisted_3$2 = { class: "varied-area-tabs" };
|
|
441
|
+
const _hoisted_4$2 = ["onClick"];
|
|
442
|
+
const _hoisted_5$2 = { class: "area-panel" };
|
|
443
|
+
const _hoisted_6$2 = {
|
|
495
444
|
key: 0,
|
|
496
445
|
class: "noData"
|
|
497
446
|
};
|
|
498
|
-
const _hoisted_7 = { style: { "color": "#9393a3", "font-size": "12px", "font-weight": "400" } };
|
|
499
|
-
const _hoisted_8 = {
|
|
447
|
+
const _hoisted_7$1 = { style: { "color": "#9393a3", "font-size": "12px", "font-weight": "400" } };
|
|
448
|
+
const _hoisted_8$1 = {
|
|
500
449
|
key: 0,
|
|
501
450
|
class: "__selector-modal-options"
|
|
502
451
|
};
|
|
@@ -518,22 +467,22 @@ const _hoisted_13 = {
|
|
|
518
467
|
key: 3,
|
|
519
468
|
class: "__selector-modal-options"
|
|
520
469
|
};
|
|
521
|
-
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
470
|
+
function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
522
471
|
const _component_search_outlined = vue.resolveComponent("search-outlined");
|
|
523
472
|
const _component_a_input = vue.resolveComponent("a-input");
|
|
524
473
|
const _component_Empty = vue.resolveComponent("Empty");
|
|
525
474
|
const _component_Checkbox = vue.resolveComponent("Checkbox");
|
|
526
475
|
const _component_Spin = vue.resolveComponent("Spin");
|
|
527
476
|
const _component_a_tree = vue.resolveComponent("a-tree");
|
|
528
|
-
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$
|
|
529
|
-
vue.createElementVNode("div", _hoisted_2$
|
|
530
|
-
vue.createElementVNode("div", _hoisted_3$
|
|
477
|
+
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$2, [
|
|
478
|
+
vue.createElementVNode("div", _hoisted_2$2, [
|
|
479
|
+
vue.createElementVNode("div", _hoisted_3$2, [
|
|
531
480
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(_ctx.areas, (item) => {
|
|
532
481
|
return vue.openBlock(), vue.createElementBlock("div", {
|
|
533
482
|
key: item.key,
|
|
534
483
|
class: vue.normalizeClass(["area-tabs-item", { active: item.key === _ctx.activeKey }]),
|
|
535
484
|
onClick: vue.withModifiers(($event) => _ctx.changeArea(item), ["stop"])
|
|
536
|
-
}, vue.toDisplayString(item.title), 11, _hoisted_4$
|
|
485
|
+
}, vue.toDisplayString(item.title), 11, _hoisted_4$2);
|
|
537
486
|
}), 128))
|
|
538
487
|
]),
|
|
539
488
|
vue.createVNode(_component_a_input, {
|
|
@@ -547,16 +496,16 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
547
496
|
]),
|
|
548
497
|
_: 1
|
|
549
498
|
}, 8, ["value", "placeholder", "onChange"]),
|
|
550
|
-
vue.createElementVNode("div", _hoisted_5$
|
|
551
|
-
_ctx.list && !_ctx.list.length ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_6$
|
|
499
|
+
vue.createElementVNode("div", _hoisted_5$2, [
|
|
500
|
+
_ctx.list && !_ctx.list.length ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_6$2, [
|
|
552
501
|
vue.createVNode(_component_Empty, { image: _ctx.emptyPic }, {
|
|
553
502
|
description: vue.withCtx(() => [
|
|
554
|
-
vue.createElementVNode("span", _hoisted_7, vue.toDisplayString(!!_ctx.searchVal ? "\u6682\u65E0\u6570\u636E" : "\u8BF7\u5148\u641C\u7D22\u4EBA\u5458\u5173\u952E\u5B57"), 1)
|
|
503
|
+
vue.createElementVNode("span", _hoisted_7$1, vue.toDisplayString(!!_ctx.searchVal ? "\u6682\u65E0\u6570\u636E" : "\u8BF7\u5148\u641C\u7D22\u4EBA\u5458\u5173\u952E\u5B57"), 1)
|
|
555
504
|
]),
|
|
556
505
|
_: 1
|
|
557
506
|
}, 8, ["image"])
|
|
558
507
|
])) : (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 1 }, [
|
|
559
|
-
_ctx.activeKey === 0 ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_8, [
|
|
508
|
+
_ctx.activeKey === 0 ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_8$1, [
|
|
560
509
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(_ctx.list, (item) => {
|
|
561
510
|
return vue.openBlock(), vue.createElementBlock("div", {
|
|
562
511
|
key: item.key,
|
|
@@ -568,7 +517,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
568
517
|
class: "__selector-modal-option-check"
|
|
569
518
|
}, {
|
|
570
519
|
default: vue.withCtx(() => [
|
|
571
|
-
vue.createTextVNode(vue.toDisplayString(item.title), 1)
|
|
520
|
+
vue.createTextVNode(vue.toDisplayString(item.fullTitle || item.title), 1)
|
|
572
521
|
]),
|
|
573
522
|
_: 2
|
|
574
523
|
}, 1032, ["checked", "onUpdate:checked"])
|
|
@@ -607,7 +556,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
607
556
|
class: "__selector-modal-option-check"
|
|
608
557
|
}, {
|
|
609
558
|
default: vue.withCtx(() => [
|
|
610
|
-
vue.createTextVNode(vue.toDisplayString(item.title), 1)
|
|
559
|
+
vue.createTextVNode(vue.toDisplayString(item.fullTitle || item.title), 1)
|
|
611
560
|
]),
|
|
612
561
|
_: 2
|
|
613
562
|
}, 1032, ["checked", "onUpdate:checked"])
|
|
@@ -625,7 +574,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
625
574
|
class: "__selector-modal-option-check"
|
|
626
575
|
}, {
|
|
627
576
|
default: vue.withCtx(() => [
|
|
628
|
-
vue.createTextVNode(vue.toDisplayString(item.title), 1)
|
|
577
|
+
vue.createTextVNode(vue.toDisplayString(item.fullTitle || item.title), 1)
|
|
629
578
|
]),
|
|
630
579
|
_: 2
|
|
631
580
|
}, 1032, ["checked", "onUpdate:checked"])
|
|
@@ -637,11 +586,136 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
637
586
|
])
|
|
638
587
|
]);
|
|
639
588
|
}
|
|
640
|
-
var VariedCmp = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
589
|
+
var VariedCmp = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["render", _sfc_render$1], ["__file", "variedCmp.vue"]]);
|
|
590
|
+
|
|
591
|
+
const _sfc_main$1 = vue.defineComponent({
|
|
592
|
+
components: { SearchOutlined: iconsVue.SearchOutlined, Empty: antDesignVue.Empty, ATree: antDesignVue.Tree },
|
|
593
|
+
props: {
|
|
594
|
+
limit: {
|
|
595
|
+
type: Number,
|
|
596
|
+
default: 0
|
|
597
|
+
},
|
|
598
|
+
selected: {
|
|
599
|
+
type: Array,
|
|
600
|
+
default: () => []
|
|
601
|
+
}
|
|
602
|
+
},
|
|
603
|
+
emits: ["fetchList", "update:selected"],
|
|
604
|
+
setup(props, { emit }) {
|
|
605
|
+
const state = vue.reactive({
|
|
606
|
+
searchVal: "",
|
|
607
|
+
selectAll: false,
|
|
608
|
+
indeterminate: false,
|
|
609
|
+
emptyPic: antDesignVue.Empty.PRESENTED_IMAGE_SIMPLE,
|
|
610
|
+
isFulfill: false
|
|
611
|
+
});
|
|
612
|
+
const methods = {
|
|
613
|
+
search() {
|
|
614
|
+
let data = state.searchVal ? { searchVal: state.searchVal } : { searchVal: "" };
|
|
615
|
+
emit("fetchList", data);
|
|
616
|
+
}
|
|
617
|
+
};
|
|
618
|
+
function changeTreeCheck(checkedKeys) {
|
|
619
|
+
let flatMap = selectState.dataMap;
|
|
620
|
+
let curlistKeys = selectState.curlistKeys;
|
|
621
|
+
let hadselected = new Set(selectState.multipDepartment);
|
|
622
|
+
let curselect = new Set(checkedKeys);
|
|
623
|
+
console.log(hadselected, curselect);
|
|
624
|
+
for (let key of hadselected) {
|
|
625
|
+
if (curlistKeys.has(key) && (!curselect.has(key) || curselect.has(key) && curselect.has(flatMap.get(key)["parent"]))) {
|
|
626
|
+
hadselected.delete(key);
|
|
627
|
+
}
|
|
628
|
+
}
|
|
629
|
+
for (let key of curselect) {
|
|
630
|
+
let obj = flatMap.get(key);
|
|
631
|
+
if (obj && !curselect.has(obj["parent"])) {
|
|
632
|
+
hadselected.add(key);
|
|
633
|
+
}
|
|
634
|
+
}
|
|
635
|
+
let arr = Array.from(hadselected) || [];
|
|
636
|
+
if (props.limit && props.limit > 0 && arr.length > props.limit) {
|
|
637
|
+
antDesignVue.message.error("\u52FE\u9009\u540E\u5C06\u8D85\u8FC7\u4EBA\u5458\u9650\u5236");
|
|
638
|
+
return;
|
|
639
|
+
}
|
|
640
|
+
selectState.multipDepartment = Array.from(hadselected) || [];
|
|
641
|
+
console.log(selectState.multipDepartment);
|
|
642
|
+
}
|
|
643
|
+
return {
|
|
644
|
+
changeTreeCheck,
|
|
645
|
+
...vue.toRefs(state),
|
|
646
|
+
...vue.toRefs(selectState),
|
|
647
|
+
list,
|
|
648
|
+
...methods
|
|
649
|
+
};
|
|
650
|
+
}
|
|
651
|
+
});
|
|
652
|
+
const _hoisted_1$1 = { class: "multiple-selector" };
|
|
653
|
+
const _hoisted_2$1 = { class: "__selector-modal-panel" };
|
|
654
|
+
const _hoisted_3$1 = { class: "__search-panel" };
|
|
655
|
+
const _hoisted_4$1 = { class: "__selector-modal-options" };
|
|
656
|
+
const _hoisted_5$1 = { class: "department-option-item" };
|
|
657
|
+
const _hoisted_6$1 = {
|
|
658
|
+
key: 0,
|
|
659
|
+
class: "department-desc"
|
|
660
|
+
};
|
|
661
|
+
const _hoisted_7 = {
|
|
662
|
+
key: 0,
|
|
663
|
+
class: "noData",
|
|
664
|
+
style: { "height": "280px" }
|
|
665
|
+
};
|
|
666
|
+
const _hoisted_8 = { style: { "color": "#9393a3", "font-size": "12px", "font-weight": "400" } };
|
|
667
|
+
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
668
|
+
const _component_search_outlined = vue.resolveComponent("search-outlined");
|
|
669
|
+
const _component_AInput = vue.resolveComponent("AInput");
|
|
670
|
+
const _component_ATree = vue.resolveComponent("ATree");
|
|
671
|
+
const _component_Empty = vue.resolveComponent("Empty");
|
|
672
|
+
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$1, [
|
|
673
|
+
vue.createElementVNode("div", _hoisted_2$1, [
|
|
674
|
+
vue.createElementVNode("div", _hoisted_3$1, [
|
|
675
|
+
vue.createVNode(_component_AInput, {
|
|
676
|
+
value: _ctx.searchVal,
|
|
677
|
+
"onUpdate:value": _cache[0] || (_cache[0] = ($event) => _ctx.searchVal = $event),
|
|
678
|
+
placeholder: "\u8BF7\u8F93\u5165\u90E8\u95E8\u540D\u79F0",
|
|
679
|
+
onBlur: _ctx.search
|
|
680
|
+
}, {
|
|
681
|
+
suffix: vue.withCtx(() => [
|
|
682
|
+
vue.createVNode(_component_search_outlined, { style: { color: "#9393A3" } })
|
|
683
|
+
]),
|
|
684
|
+
_: 1
|
|
685
|
+
}, 8, ["value", "onBlur"]),
|
|
686
|
+
vue.createElementVNode("div", _hoisted_4$1, [
|
|
687
|
+
vue.createVNode(_component_ATree, {
|
|
688
|
+
"checked-keys": _ctx.multipDepartment,
|
|
689
|
+
checkable: "",
|
|
690
|
+
"tree-data": _ctx.list,
|
|
691
|
+
onCheck: _ctx.changeTreeCheck
|
|
692
|
+
}, {
|
|
693
|
+
title: vue.withCtx(({ title, key, description }) => [
|
|
694
|
+
vue.createElementVNode("div", _hoisted_5$1, [
|
|
695
|
+
vue.createElementVNode("span", null, vue.toDisplayString(title) + vue.toDisplayString(key ? `(${key})` : ""), 1),
|
|
696
|
+
description ? (vue.openBlock(), vue.createElementBlock("p", _hoisted_6$1, vue.toDisplayString(description), 1)) : vue.createCommentVNode("v-if", true)
|
|
697
|
+
])
|
|
698
|
+
]),
|
|
699
|
+
_: 1
|
|
700
|
+
}, 8, ["checked-keys", "tree-data", "onCheck"]),
|
|
701
|
+
_ctx.list && !_ctx.list.length ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_7, [
|
|
702
|
+
vue.createVNode(_component_Empty, { image: _ctx.emptyPic }, {
|
|
703
|
+
description: vue.withCtx(() => [
|
|
704
|
+
vue.createElementVNode("span", _hoisted_8, vue.toDisplayString(!!_ctx.searchVal ? "\u6682\u65E0\u6570\u636E" : "\u8BF7\u5148\u641C\u7D22\u4EBA\u5458\u5173\u952E\u5B57"), 1)
|
|
705
|
+
]),
|
|
706
|
+
_: 1
|
|
707
|
+
}, 8, ["image"])
|
|
708
|
+
])) : vue.createCommentVNode("v-if", true)
|
|
709
|
+
])
|
|
710
|
+
])
|
|
711
|
+
])
|
|
712
|
+
]);
|
|
713
|
+
}
|
|
714
|
+
var departmentCmp = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sfc_render], ["__file", "departmentCmp.vue"]]);
|
|
641
715
|
|
|
642
716
|
const _hoisted_1 = { class: "selector-content" };
|
|
643
717
|
const _hoisted_2 = {
|
|
644
|
-
key:
|
|
718
|
+
key: 4,
|
|
645
719
|
class: "__selector-chosen-panel"
|
|
646
720
|
};
|
|
647
721
|
const _hoisted_3 = {
|
|
@@ -664,13 +738,12 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
664
738
|
const computeSelected = vue.computed(() => {
|
|
665
739
|
let list2 = [];
|
|
666
740
|
if (props.mode === MODE.MULTIPLE) {
|
|
667
|
-
if (multipTree.value) {
|
|
668
|
-
return [...selectState.multipDepartment];
|
|
669
|
-
}
|
|
670
741
|
for (let [key, value] of Object.entries(selectState.multipleChecked)) {
|
|
671
742
|
value && list2.push(String(key));
|
|
672
743
|
}
|
|
673
744
|
return list2;
|
|
745
|
+
} else if (props.mode === MODE.DEPARTMENT) {
|
|
746
|
+
return [...selectState.multipDepartment];
|
|
674
747
|
} else if (props.mode === MODE.VARIED) {
|
|
675
748
|
list2 = list2.concat(selectState.departmentChecked);
|
|
676
749
|
for (let [key, value] of Object.entries(selectState.staffsChecked)) {
|
|
@@ -706,50 +779,42 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
706
779
|
activeKey = area === "shop" ? 3 : activeKey;
|
|
707
780
|
return selectState.activeKey === activeKey;
|
|
708
781
|
}
|
|
709
|
-
function fetch(params) {
|
|
782
|
+
async function fetch(params) {
|
|
710
783
|
list.value = [];
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
if (
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
return;
|
|
717
|
-
} else {
|
|
718
|
-
let result = [];
|
|
719
|
-
let queues = [...departNative.value];
|
|
720
|
-
while (queues.length) {
|
|
721
|
-
let node = queues.shift();
|
|
722
|
-
if (node["title"] && node["title"].includes(params?.searchVal || "")) {
|
|
723
|
-
result.push({ ...node });
|
|
724
|
-
}
|
|
725
|
-
if (node.children)
|
|
726
|
-
queues.push(...node.children);
|
|
727
|
-
}
|
|
728
|
-
list.value = isCurrentFetch(params?.area || "") ? result : [];
|
|
729
|
-
return;
|
|
730
|
-
}
|
|
784
|
+
let isDepartTree = params.area === "department" || props.mode === MODE.DEPARTMENT;
|
|
785
|
+
if (isDepartTree) {
|
|
786
|
+
if (!departNative.value.length) {
|
|
787
|
+
departNative.value = await props.load(params);
|
|
788
|
+
selectState.dataMap = flatListFunc([...departNative.value]);
|
|
731
789
|
}
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
return item;
|
|
740
|
-
});
|
|
741
|
-
list.value = isCurrentFetch(params.area) ? result : [];
|
|
790
|
+
if (params.searchVal) {
|
|
791
|
+
let result = [];
|
|
792
|
+
let queues = [...departNative.value];
|
|
793
|
+
while (queues.length) {
|
|
794
|
+
let node = queues.shift();
|
|
795
|
+
if (node["title"] && node["title"].includes(params?.searchVal || "")) {
|
|
796
|
+
result.push({ ...node });
|
|
742
797
|
}
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
list.value = [];
|
|
798
|
+
if (node.children)
|
|
799
|
+
queues.push(...node.children);
|
|
746
800
|
}
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
list.value = [...departNative.value];
|
|
801
|
+
list.value = result;
|
|
802
|
+
} else {
|
|
803
|
+
list.value = departNative.value;
|
|
751
804
|
}
|
|
805
|
+
return;
|
|
752
806
|
}
|
|
807
|
+
await props.load(params).then((data) => {
|
|
808
|
+
if (data && data.length) {
|
|
809
|
+
let result = data.map((item) => {
|
|
810
|
+
return item;
|
|
811
|
+
});
|
|
812
|
+
list.value = isCurrentFetch(params.area) ? result : [];
|
|
813
|
+
selectState.dataMap = flatListFunc(data);
|
|
814
|
+
} else {
|
|
815
|
+
list.value = [];
|
|
816
|
+
}
|
|
817
|
+
});
|
|
753
818
|
}
|
|
754
819
|
function flatListFunc(list2) {
|
|
755
820
|
let queue = [...list2];
|
|
@@ -788,7 +853,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
788
853
|
let data = selectState.dataMap.get(String(selected.value));
|
|
789
854
|
emit("update:select", [data]);
|
|
790
855
|
emit("change", [data]);
|
|
791
|
-
} else if (props.mode === MODE.MULTIPLE) {
|
|
856
|
+
} else if (props.mode === MODE.MULTIPLE || props.mode === MODE.DEPARTMENT) {
|
|
792
857
|
let arr = computeSelected.value.map((key) => findDataByKey(key));
|
|
793
858
|
emit("update:select", arr);
|
|
794
859
|
emit("change", arr);
|
|
@@ -834,12 +899,12 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
834
899
|
if (props.mode === MODE.MULTIPLE) {
|
|
835
900
|
if (selectState.multipleChecked[String(key)]) {
|
|
836
901
|
selectState.multipleChecked[String(key)] = false;
|
|
837
|
-
} else {
|
|
838
|
-
let index = selectState.multipDepartment.findIndex(
|
|
839
|
-
(item) => String(item) === String(key)
|
|
840
|
-
);
|
|
841
|
-
index > -1 && selectState.multipDepartment.splice(index, 1);
|
|
842
902
|
}
|
|
903
|
+
} else if (props.mode === MODE.DEPARTMENT) {
|
|
904
|
+
let index = selectState.multipDepartment.findIndex(
|
|
905
|
+
(item) => String(item) === String(key)
|
|
906
|
+
);
|
|
907
|
+
index > -1 && selectState.multipDepartment.splice(index, 1);
|
|
843
908
|
} else if (props.mode === MODE.VARIED) {
|
|
844
909
|
if (selectState.staffsChecked[String(key)]) {
|
|
845
910
|
selectState.staffsChecked[String(key)] = false;
|
|
@@ -859,37 +924,42 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
859
924
|
() => props.visible,
|
|
860
925
|
(val) => {
|
|
861
926
|
if (val) {
|
|
862
|
-
if (props.mode ===
|
|
927
|
+
if (props.mode === MODE.RADIO) {
|
|
863
928
|
selected.value = "";
|
|
929
|
+
} else if (props.mode === MODE.DEPARTMENT) {
|
|
930
|
+
let arr = props.select;
|
|
931
|
+
selected.value = arr.length ? arr.map((item) => String(item?.key)) : [];
|
|
932
|
+
const multipDepartment = [];
|
|
933
|
+
arr.forEach((item) => multipDepartment.push(String(item?.key)));
|
|
934
|
+
selectState.multipDepartment = multipDepartment;
|
|
935
|
+
fetch({});
|
|
936
|
+
} else if (props.mode === MODE.MULTIPLE) {
|
|
937
|
+
let arr = props.select;
|
|
938
|
+
selected.value = arr.length ? arr.map((item) => String(item?.key)) : [];
|
|
939
|
+
let multipleChecked = {};
|
|
940
|
+
arr.forEach((item) => multipleChecked[String(item?.key)] = true);
|
|
941
|
+
selectState.multipleChecked = multipleChecked;
|
|
864
942
|
} else {
|
|
865
943
|
let arr = props.select;
|
|
866
944
|
selected.value = arr.length ? arr.map((item) => String(item?.key)) : [];
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
else if (item["area"] && item["area"] === "group")
|
|
886
|
-
group[String(item?.key)] = true;
|
|
887
|
-
});
|
|
888
|
-
selectState.departmentChecked = department;
|
|
889
|
-
selectState.shopChecked = shop;
|
|
890
|
-
selectState.staffsChecked = staff;
|
|
891
|
-
selectState.groupChecked = group;
|
|
892
|
-
}
|
|
945
|
+
let department = [];
|
|
946
|
+
let shop = {};
|
|
947
|
+
let staff = {};
|
|
948
|
+
let group = {};
|
|
949
|
+
arr.forEach((item) => {
|
|
950
|
+
if (item["area"] && item["area"] === "department")
|
|
951
|
+
department.push(String(item?.key));
|
|
952
|
+
else if (item["area"] && item["area"] === "shop")
|
|
953
|
+
shop[String(item?.key)] = true;
|
|
954
|
+
else if (item["area"] && item["area"] === "staff")
|
|
955
|
+
staff[String(item?.key)] = true;
|
|
956
|
+
else if (item["area"] && item["area"] === "group")
|
|
957
|
+
group[String(item?.key)] = true;
|
|
958
|
+
});
|
|
959
|
+
selectState.departmentChecked = department;
|
|
960
|
+
selectState.shopChecked = shop;
|
|
961
|
+
selectState.staffsChecked = staff;
|
|
962
|
+
selectState.groupChecked = group;
|
|
893
963
|
}
|
|
894
964
|
} else {
|
|
895
965
|
selected.value = [];
|
|
@@ -900,9 +970,6 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
900
970
|
selectState.groupChecked = {};
|
|
901
971
|
selectState.activeKey = 0;
|
|
902
972
|
}
|
|
903
|
-
if (val && props.immediateFetch) {
|
|
904
|
-
fetch({});
|
|
905
|
-
}
|
|
906
973
|
},
|
|
907
974
|
{ immediate: true, deep: true }
|
|
908
975
|
);
|
|
@@ -933,17 +1000,23 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
933
1000
|
list: vue.unref(list),
|
|
934
1001
|
"show-count": _ctx.showCount,
|
|
935
1002
|
onFetchList: fetch
|
|
936
|
-
}, null, 8, ["selected", "list", "show-count"])) : (vue.openBlock(), vue.createBlock(
|
|
1003
|
+
}, null, 8, ["selected", "list", "show-count"])) : _ctx.mode === "department" ? (vue.openBlock(), vue.createBlock(departmentCmp, {
|
|
937
1004
|
key: 2,
|
|
938
1005
|
selected: selected.value,
|
|
939
1006
|
"onUpdate:selected": _cache[2] || (_cache[2] = ($event) => selected.value = $event),
|
|
940
1007
|
limit: _ctx.limit,
|
|
1008
|
+
onFetchList: fetch
|
|
1009
|
+
}, null, 8, ["selected", "limit"])) : (vue.openBlock(), vue.createBlock(multipleCmp, {
|
|
1010
|
+
key: 3,
|
|
1011
|
+
selected: selected.value,
|
|
1012
|
+
"onUpdate:selected": _cache[3] || (_cache[3] = ($event) => selected.value = $event),
|
|
1013
|
+
limit: _ctx.limit,
|
|
941
1014
|
list: vue.unref(list),
|
|
942
1015
|
"is-tree": multipTree.value,
|
|
943
1016
|
onFetchList: fetch
|
|
944
1017
|
}, null, 8, ["selected", "limit", "list", "is-tree"])),
|
|
945
|
-
["multiple", "varied"].includes(_ctx.mode) ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_2, [
|
|
946
|
-
_ctx.showCount ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_3, [
|
|
1018
|
+
["multiple", "varied", "department"].includes(_ctx.mode) ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_2, [
|
|
1019
|
+
["multiple", "varied"].includes(_ctx.mode) && _ctx.showCount ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_3, [
|
|
947
1020
|
vue.createElementVNode("span", null, "\u5DF2\u9009\u62E9" + vue.toDisplayString(vue.unref(computeSelected) && vue.unref(computeSelected).length || 0) + vue.toDisplayString(_ctx.$props.unitStr), 1),
|
|
948
1021
|
_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)
|
|
949
1022
|
])) : vue.createCommentVNode("v-if", true),
|