bm-admin-ui 1.0.80-alpha → 1.0.82-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.
Files changed (43) hide show
  1. package/package.json +1 -1
  2. package/theme-chalk/index.css +1 -1
  3. package/theme-chalk/select-all.css +1 -1
  4. package/es/components/attachment/index.js +0 -273
  5. package/es/components/breadcrumb/index.js +0 -158
  6. package/es/components/button/index.js +0 -49
  7. package/es/components/edit-form/index.js +0 -1186
  8. package/es/components/editor/index.js +0 -12554
  9. package/es/components/feedback/index.js +0 -295
  10. package/es/components/float-table/index.js +0 -3517
  11. package/es/components/flow-designer/index.js +0 -1317
  12. package/es/components/form-create/index.js +0 -20978
  13. package/es/components/form-designer/index.js +0 -4514
  14. package/es/components/index.js +0 -19
  15. package/es/components/input-tags-display/index.js +0 -226
  16. package/es/components/over-tooltips/index.js +0 -133
  17. package/es/components/search-filter/index.js +0 -441
  18. package/es/components/select-all/index.js +0 -165
  19. package/es/components/shops-filter/index.js +0 -453
  20. package/es/components/staffs-selector/index.js +0 -728
  21. package/es/components/timeline/index.js +0 -168
  22. package/es/components/upload/index.js +0 -909
  23. package/es/components/videoView/index.js +0 -100
  24. package/lib/components/attachment/index.js +0 -278
  25. package/lib/components/breadcrumb/index.js +0 -168
  26. package/lib/components/button/index.js +0 -58
  27. package/lib/components/edit-form/index.js +0 -1195
  28. package/lib/components/editor/index.js +0 -12559
  29. package/lib/components/feedback/index.js +0 -309
  30. package/lib/components/float-table/index.js +0 -3522
  31. package/lib/components/flow-designer/index.js +0 -1329
  32. package/lib/components/form-create/index.js +0 -20990
  33. package/lib/components/form-designer/index.js +0 -4525
  34. package/lib/components/index.js +0 -140
  35. package/lib/components/input-tags-display/index.js +0 -237
  36. package/lib/components/over-tooltips/index.js +0 -138
  37. package/lib/components/search-filter/index.js +0 -451
  38. package/lib/components/select-all/index.js +0 -174
  39. package/lib/components/shops-filter/index.js +0 -465
  40. package/lib/components/staffs-selector/index.js +0 -733
  41. package/lib/components/timeline/index.js +0 -174
  42. package/lib/components/upload/index.js +0 -914
  43. package/lib/components/videoView/index.js +0 -105
@@ -1,453 +0,0 @@
1
- import { withInstall } from 'bm-admin-ui/es/utils/with-install';
2
- import { defineComponent, reactive, watch, onMounted, onUnmounted, toRefs, resolveComponent, openBlock, createElementBlock, withModifiers, createElementVNode, normalizeStyle, toDisplayString, normalizeClass, withDirectives, createVNode, vShow, withCtx, createTextVNode, Fragment, renderList, createCommentVNode, createBlock } from 'vue';
3
- import { DownOutlined, DeleteOutlined, CloseCircleFilled } from '@ant-design/icons-vue';
4
- import { InputSearch } from 'ant-design-vue/lib/input';
5
- import Checkbox from 'ant-design-vue/lib/checkbox';
6
- import Button from 'ant-design-vue/lib/button';
7
- import Popover from 'ant-design-vue/lib/popover';
8
- import Empty from 'ant-design-vue/lib/empty';
9
-
10
- var _export_sfc = (sfc, props) => {
11
- const target = sfc.__vccOpts || sfc;
12
- for (const [key, val] of props) {
13
- target[key] = val;
14
- }
15
- return target;
16
- };
17
-
18
- const _sfc_main = defineComponent({
19
- name: "BmShopsFilter",
20
- components: {
21
- DownOutlined,
22
- DeleteOutlined,
23
- CloseCircleFilled,
24
- InputSearch,
25
- Checkbox,
26
- Button,
27
- Popover,
28
- Empty
29
- },
30
- props: {
31
- labelTitle: {
32
- type: String,
33
- default: "\u5E97\u94FA"
34
- },
35
- showAlways: {
36
- type: Boolean,
37
- default: false
38
- },
39
- displayParams: {
40
- type: Object,
41
- default: () => {
42
- return {
43
- width: "436px",
44
- labelOffset: "0px",
45
- labelWidth: "98px",
46
- searchWidth: "240px",
47
- listMaxHeight: "366px"
48
- };
49
- }
50
- },
51
- loadFilter: {
52
- type: Function,
53
- default: () => {
54
- return Promise.resolve([]);
55
- }
56
- },
57
- loadData: {
58
- type: Function,
59
- default: () => {
60
- return Promise.reject("\u672A\u58F0\u660E\u5E97\u94FA\u6570\u636E\u8BF7\u6C42\u51FD\u6570");
61
- }
62
- }
63
- },
64
- emits: ["update:selected", "change"],
65
- setup(props, { emit }) {
66
- const state = reactive({
67
- isActive: false,
68
- searchVal: "",
69
- selected: [],
70
- shopList: [],
71
- shopListByCode: {},
72
- checkAll: false,
73
- hasCheck: false,
74
- inverSelect: false,
75
- shopCheck: {},
76
- filterSelects: [],
77
- filterArr: []
78
- });
79
- const methods = {
80
- triggleActive() {
81
- if (!props.showAlways)
82
- state.isActive = !state.isActive;
83
- if (state.shopList && !state.shopList.length)
84
- methods.fetchData();
85
- },
86
- outSideClick() {
87
- state.isActive = false;
88
- },
89
- changeFilterSelect(index, code) {
90
- let filter = state.filterArr[index];
91
- if (filter.multiple) {
92
- if (!code) {
93
- state.filterSelects[index] = [];
94
- } else {
95
- let list = state.filterSelects[index];
96
- list.indexOf(code) > -1 ? list.splice(list.indexOf(code), 1) : list.push(code);
97
- }
98
- } else {
99
- state.filterSelects[index] = code;
100
- }
101
- methods.fetchData();
102
- },
103
- onCheckAllChange(e) {
104
- state.inverSelect = false;
105
- let checked = e.target.checked;
106
- state.shopList.forEach((item) => {
107
- state.shopCheck[item.shopCode] = checked;
108
- });
109
- },
110
- checkboxChange() {
111
- let hasCheck = false;
112
- let checkAll = true;
113
- state.shopList.some((item) => {
114
- if (state.shopCheck[item.shopCode]) {
115
- hasCheck = true;
116
- return true;
117
- }
118
- });
119
- state.shopList.every((item) => {
120
- if (!state.shopCheck[item.shopCode]) {
121
- checkAll = false;
122
- return false;
123
- }
124
- return true;
125
- });
126
- state.checkAll = checkAll;
127
- state.hasCheck = state.checkAll ? false : hasCheck;
128
- },
129
- invertChange() {
130
- state.checkAll = false;
131
- state.shopList.forEach((item) => {
132
- state.shopCheck[item.shopCode] = !state.shopCheck[item.shopCode];
133
- });
134
- },
135
- clearAll() {
136
- state.inverSelect = false;
137
- state.checkAll = false;
138
- state.hasCheck = false;
139
- state.shopList.forEach((item) => {
140
- state.shopCheck[item.shopCode] = false;
141
- });
142
- },
143
- fetchData() {
144
- let params = {};
145
- let filters = state.filterArr;
146
- filters.forEach((item, index) => {
147
- params[String(item.paramsStr)] = state.filterSelects[index] || "";
148
- });
149
- params["search"] = state.searchVal;
150
- props.loadData(params).then((data) => {
151
- state.shopList = data;
152
- data.forEach((item) => {
153
- return state.shopListByCode[item.shopCode] = item.shopName;
154
- });
155
- methods.checkboxChange();
156
- });
157
- },
158
- clearAllSelected(e) {
159
- e && e.stopPropagation();
160
- state.searchVal = "";
161
- state.shopCheck = {};
162
- state.inverSelect = false;
163
- state.checkAll = false;
164
- },
165
- filterIsActive(filterIndex, code) {
166
- let select = state.filterSelects[filterIndex];
167
- let filter = state.filterArr[filterIndex];
168
- let isMultiple = filter && filter.multiple;
169
- if (!isMultiple) {
170
- return select === code;
171
- } else {
172
- return select.indexOf(code) > -1;
173
- }
174
- }
175
- };
176
- props.loadFilter().then((data) => {
177
- state.filterArr = data;
178
- state.filterSelects = state.filterArr.map(
179
- (item) => {
180
- return item.multiple ? [] : "";
181
- }
182
- );
183
- }).finally(() => {
184
- methods.fetchData();
185
- });
186
- watch(
187
- () => state.shopCheck,
188
- () => {
189
- let list = [];
190
- for (let [key, value] of Object.entries(state.shopCheck)) {
191
- value && list.push(key);
192
- }
193
- state.selected = list;
194
- emit("update:selected", list);
195
- emit("change", list);
196
- methods.checkboxChange();
197
- },
198
- { deep: true }
199
- );
200
- if (props.showAlways) {
201
- state.isActive = true;
202
- }
203
- onMounted(() => {
204
- if (!props.showAlways)
205
- document.addEventListener("click", methods.outSideClick);
206
- });
207
- onUnmounted(() => {
208
- if (!props.showAlways)
209
- document.removeEventListener("click", methods.outSideClick);
210
- });
211
- return {
212
- ...toRefs(state),
213
- ...methods
214
- };
215
- }
216
- });
217
- const _hoisted_1 = /* @__PURE__ */ createElementVNode("span", null, "\u8BF7\u9009\u62E9", -1);
218
- const _hoisted_2 = { class: "input-icon active-icon" };
219
- const _hoisted_3 = { class: "pop-seleted-title" };
220
- const _hoisted_4 = { class: "__shops-filter-list" };
221
- const _hoisted_5 = {
222
- key: 0,
223
- class: "__shops-filter-tabs"
224
- };
225
- const _hoisted_6 = { class: "label" };
226
- const _hoisted_7 = { class: "__shops-filter-areas" };
227
- const _hoisted_8 = ["onClick"];
228
- const _hoisted_9 = ["onClick"];
229
- const _hoisted_10 = { class: "__shops-filter-selecting" };
230
- const _hoisted_11 = { class: "__checkbox-operate-box" };
231
- const _hoisted_12 = {
232
- key: 0,
233
- class: "__shops-filter-selecting"
234
- };
235
- const _hoisted_13 = /* @__PURE__ */ createElementVNode("span", { style: { "color": "#9393a3" } }, "\u6682\u65E0\u6570\u636E", -1);
236
- function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
237
- const _component_down_outlined = resolveComponent("down-outlined");
238
- const _component_close_circle_filled = resolveComponent("close-circle-filled");
239
- const _component_Popover = resolveComponent("Popover");
240
- const _component_input_search = resolveComponent("input-search");
241
- const _component_Checkbox = resolveComponent("Checkbox");
242
- const _component_delete_outlined = resolveComponent("delete-outlined");
243
- const _component_Button = resolveComponent("Button");
244
- const _component_Empty = resolveComponent("Empty");
245
- return openBlock(), createElementBlock("div", {
246
- class: "__shops-filter-component",
247
- onClick: _cache[8] || (_cache[8] = withModifiers(() => {
248
- }, ["stop"]))
249
- }, [
250
- createElementVNode("span", {
251
- class: "__shops-filter-label",
252
- style: normalizeStyle({
253
- width: _ctx.displayParams?.labelWidth || "",
254
- marginRight: _ctx.displayParams?.labelOffset || "0"
255
- })
256
- }, toDisplayString(_ctx.labelTitle) + ":", 5),
257
- createElementVNode("div", {
258
- class: normalizeClass(["__shops-filter-input-box", { "active-box": !_ctx.showAlways && _ctx.isActive }]),
259
- style: normalizeStyle({ width: _ctx.displayParams?.width || "436px" }),
260
- onClick: _cache[3] || (_cache[3] = (...args) => _ctx.triggleActive && _ctx.triggleActive(...args))
261
- }, [
262
- withDirectives(createElementVNode("div", null, [
263
- _hoisted_1,
264
- createElementVNode("span", _hoisted_2, [
265
- createVNode(_component_down_outlined)
266
- ])
267
- ], 512), [
268
- [vShow, _ctx.selected && !_ctx.selected.length]
269
- ]),
270
- withDirectives(createElementVNode("div", null, [
271
- createVNode(_component_Popover, {
272
- title: "",
273
- "overlay-class-name": "__shops-filter-popover"
274
- }, {
275
- content: withCtx(() => [
276
- createElementVNode("div", {
277
- class: "pop-seleted",
278
- style: normalizeStyle({ "min-width": _ctx.displayParams?.width || "436px" })
279
- }, [
280
- createElementVNode("div", _hoisted_3, [
281
- createTextVNode(" \u5DF2\u9009\u62E9"),
282
- createElementVNode("span", null, toDisplayString(_ctx.selected.length), 1),
283
- createTextVNode("\u9879 ")
284
- ]),
285
- createElementVNode("div", {
286
- class: "pop-seleted-shops",
287
- onWheel: _cache[0] || (_cache[0] = withModifiers(() => {
288
- }, ["stop"]))
289
- }, [
290
- (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.selected, (item) => {
291
- return openBlock(), createElementBlock("div", {
292
- key: item,
293
- class: "pop-seleted-item"
294
- }, toDisplayString(_ctx.shopListByCode[item]), 1);
295
- }), 128))
296
- ], 32)
297
- ], 4)
298
- ]),
299
- default: withCtx(() => [
300
- createElementVNode("div", _hoisted_4, [
301
- (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.selected, (item) => {
302
- return openBlock(), createElementBlock("div", {
303
- key: item,
304
- class: "selected-tag"
305
- }, toDisplayString(_ctx.shopListByCode[item]), 1);
306
- }), 128)),
307
- createElementVNode("div", {
308
- class: "delete-icon",
309
- onClick: _cache[1] || (_cache[1] = withModifiers((...args) => _ctx.clearAllSelected && _ctx.clearAllSelected(...args), ["stop"])),
310
- onMouseover: _cache[2] || (_cache[2] = withModifiers(() => {
311
- }, ["stop"]))
312
- }, [
313
- createVNode(_component_close_circle_filled, { style: { "color": "#9393a3" } })
314
- ], 32)
315
- ])
316
- ]),
317
- _: 1
318
- })
319
- ], 512), [
320
- [vShow, _ctx.selected && _ctx.selected.length]
321
- ])
322
- ], 6),
323
- withDirectives(createElementVNode("div", {
324
- class: "__shops-filter-search-input",
325
- style: normalizeStyle({ width: _ctx.displayParams?.searchWidth || "240px" })
326
- }, [
327
- createVNode(_component_input_search, {
328
- modelValue: _ctx.searchVal,
329
- "onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => _ctx.searchVal = $event),
330
- placeholder: "\u641C\u7D22\u5E97\u94FA\u540D\u79F0",
331
- "allow-clear": true,
332
- onSearch: _ctx.fetchData
333
- }, null, 8, ["modelValue", "onSearch"])
334
- ], 4), [
335
- [vShow, _ctx.isActive]
336
- ]),
337
- withDirectives(createElementVNode("div", {
338
- class: normalizeClass(["__shops-filter-content", { "__shops-filter-no-absolute": _ctx.showAlways }])
339
- }, [
340
- _ctx.filterArr && _ctx.filterArr.length ? (openBlock(), createElementBlock("div", _hoisted_5, [
341
- (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.filterArr, (item, index) => {
342
- return openBlock(), createElementBlock("div", {
343
- key: item.paramsStr,
344
- class: "__shops-filter-area-tabs"
345
- }, [
346
- createElementVNode("div", _hoisted_6, toDisplayString(item.label) + ":", 1),
347
- createElementVNode("div", _hoisted_7, [
348
- createElementVNode("span", {
349
- class: normalizeClass({
350
- active: !(item.multiple ? _ctx.filterSelects[index].length : !!_ctx.filterSelects[index])
351
- }),
352
- onClick: withModifiers(($event) => _ctx.changeFilterSelect(index, ""), ["self"])
353
- }, "\u5168\u90E8", 10, _hoisted_8),
354
- (openBlock(true), createElementBlock(Fragment, null, renderList(item.list, (element) => {
355
- return openBlock(), createElementBlock("span", {
356
- key: element.code,
357
- class: normalizeClass({ active: _ctx.filterIsActive(index, element.code) }),
358
- onClick: withModifiers(($event) => _ctx.changeFilterSelect(index, element.code), ["self"])
359
- }, toDisplayString(element.label), 11, _hoisted_9);
360
- }), 128))
361
- ])
362
- ]);
363
- }), 128)),
364
- createElementVNode("div", _hoisted_10, [
365
- createTextVNode(" \u5DF2\u9009\u62E9"),
366
- createElementVNode("span", null, toDisplayString(_ctx.selected.length), 1),
367
- createTextVNode("\u9879 ")
368
- ])
369
- ])) : createCommentVNode("v-if", true),
370
- _ctx.shopList && _ctx.shopList.length ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [
371
- createElementVNode("div", _hoisted_11, [
372
- createVNode(_component_Checkbox, {
373
- checked: _ctx.checkAll,
374
- "onUpdate:checked": _cache[5] || (_cache[5] = ($event) => _ctx.checkAll = $event),
375
- indeterminate: _ctx.hasCheck,
376
- onChange: _ctx.onCheckAllChange
377
- }, {
378
- default: withCtx(() => [
379
- createTextVNode("\u5168\u9009")
380
- ]),
381
- _: 1
382
- }, 8, ["checked", "indeterminate", "onChange"]),
383
- createVNode(_component_Checkbox, {
384
- checked: _ctx.inverSelect,
385
- "onUpdate:checked": _cache[6] || (_cache[6] = ($event) => _ctx.inverSelect = $event),
386
- onChange: _ctx.invertChange
387
- }, {
388
- default: withCtx(() => [
389
- createTextVNode("\u53CD\u9009")
390
- ]),
391
- _: 1
392
- }, 8, ["checked", "onChange"]),
393
- createVNode(_component_Button, {
394
- type: "text",
395
- onClick: _ctx.clearAll
396
- }, {
397
- icon: withCtx(() => [
398
- createVNode(_component_delete_outlined)
399
- ]),
400
- default: withCtx(() => [
401
- createTextVNode("\u6E05\u7A7A")
402
- ]),
403
- _: 1
404
- }, 8, ["onClick"]),
405
- _ctx.filterArr && !_ctx.filterArr.length ? (openBlock(), createElementBlock("div", _hoisted_12, [
406
- createTextVNode(" \u5DF2\u9009\u62E9"),
407
- createElementVNode("span", null, toDisplayString(_ctx.selected.length), 1),
408
- createTextVNode("\u9879 ")
409
- ])) : createCommentVNode("v-if", true)
410
- ]),
411
- createElementVNode("div", {
412
- class: "__shops-checkbox-box",
413
- style: normalizeStyle({ maxHeight: _ctx.displayParams.listMaxHeight || "366px" })
414
- }, [
415
- createElementVNode("div", {
416
- class: "__shops-checkbox-grid",
417
- onWheel: _cache[7] || (_cache[7] = withModifiers(() => {
418
- }, ["stop"]))
419
- }, [
420
- (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.shopList, (item) => {
421
- return openBlock(), createElementBlock("div", {
422
- key: item.shopCode
423
- }, [
424
- createVNode(_component_Checkbox, {
425
- checked: _ctx.shopCheck[item.shopCode],
426
- "onUpdate:checked": ($event) => _ctx.shopCheck[item.shopCode] = $event
427
- }, {
428
- default: withCtx(() => [
429
- createTextVNode(toDisplayString(item.shopName), 1)
430
- ]),
431
- _: 2
432
- }, 1032, ["checked", "onUpdate:checked"])
433
- ]);
434
- }), 128))
435
- ], 32)
436
- ], 4)
437
- ], 64)) : createCommentVNode("v-if", true),
438
- _ctx.shopList && !_ctx.shopList.length ? (openBlock(), createBlock(_component_Empty, { key: 2 }, {
439
- description: withCtx(() => [
440
- _hoisted_13
441
- ]),
442
- _: 1
443
- })) : createCommentVNode("v-if", true)
444
- ], 2), [
445
- [vShow, _ctx.isActive]
446
- ])
447
- ]);
448
- }
449
- var shopsFilter = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "shops-filter.vue"]]);
450
-
451
- const BmShopsFilter = withInstall(shopsFilter);
452
-
453
- export { BmShopsFilter, BmShopsFilter as default };