bm-admin-ui 1.0.40-alpha → 1.0.41-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/breadcrumb/index.d.ts +162 -0
- package/es/components/breadcrumb/index.js +158 -0
- package/es/components/breadcrumb/src/breadcrumb.vue.d.ts +161 -0
- package/es/components/button/index.d.ts +303 -1
- package/es/components/editor/index.d.ts +305 -0
- package/es/components/editor/index.js +12543 -0
- package/es/components/editor/src/editor.vue.d.ts +304 -0
- package/es/components/editor/src/props.d.ts +31 -0
- package/es/components/feedback/index.d.ts +1028 -2
- package/es/components/float-table/index.d.ts +68 -1
- package/es/components/flow-designer/index.d.ts +5 -1
- package/es/components/form-create/index.js +77 -156
- package/es/components/form-designer/index.js +33 -131
- package/es/components/index.d.ts +2 -0
- package/es/components/index.js +2 -0
- package/es/components/input-tags-display/index.d.ts +138 -1
- package/es/components/input-tags-display/src/input-tags-display.vue.d.ts +1 -1
- package/es/components/over-tooltips/index.d.ts +33 -1
- package/es/components/search-filter/index.d.ts +233 -1
- package/es/components/search-filter/src/search-filter.vue.d.ts +3 -3
- package/es/components/select-all/index.d.ts +752 -1
- package/es/components/select-all/src/selectAll.vue.d.ts +5 -5
- package/es/components/shops-filter/index.d.ts +97 -1
- package/es/components/shops-filter/src/shops-filter.vue.d.ts +1 -1
- package/es/components/staffs-selector/index.d.ts +1095 -1
- package/es/components/staffs-selector/index.js +535 -505
- package/es/components/staffs-selector/src/action.d.ts +66 -0
- package/es/components/staffs-selector/src/multipleCmp.vue.d.ts +11 -49
- package/es/components/staffs-selector/src/staffs-selector.vue.d.ts +998 -10
- package/es/components/staffs-selector/src/variedCmp.vue.d.ts +18 -11
- package/es/components/timeline/index.d.ts +111 -2
- package/es/components/upload/index.d.ts +139 -2
- package/es/components/upload/index.js +207 -170
- package/es/components/upload/src/props.d.ts +50 -0
- package/es/components/upload/src/upload.vue.d.ts +44 -11
- package/es/utils/bm-admin-ui-resolver.d.ts +1 -3
- package/es/utils/bm-admin-ui-resolver.js +1 -1
- package/es/utils/with-install.d.ts +7 -1
- package/es/utils/with-install.js +1 -0
- package/index.esm.js +81188 -71499
- package/index.js +81186 -71495
- package/lib/components/breadcrumb/index.d.ts +162 -0
- package/lib/components/breadcrumb/index.js +168 -0
- package/lib/components/breadcrumb/src/breadcrumb.vue.d.ts +161 -0
- package/lib/components/button/index.d.ts +303 -1
- package/lib/components/editor/index.d.ts +305 -0
- package/lib/components/editor/index.js +12548 -0
- package/lib/components/editor/src/editor.vue.d.ts +304 -0
- package/lib/components/editor/src/props.d.ts +31 -0
- package/lib/components/feedback/index.d.ts +1028 -2
- package/lib/components/float-table/index.d.ts +68 -1
- package/lib/components/flow-designer/index.d.ts +5 -1
- package/lib/components/form-create/index.js +76 -155
- package/lib/components/form-designer/index.js +32 -130
- package/lib/components/index.d.ts +2 -0
- package/lib/components/index.js +14 -0
- package/lib/components/input-tags-display/index.d.ts +138 -1
- package/lib/components/input-tags-display/src/input-tags-display.vue.d.ts +1 -1
- package/lib/components/over-tooltips/index.d.ts +33 -1
- package/lib/components/search-filter/index.d.ts +233 -1
- package/lib/components/search-filter/src/search-filter.vue.d.ts +3 -3
- package/lib/components/select-all/index.d.ts +752 -1
- package/lib/components/select-all/src/selectAll.vue.d.ts +5 -5
- package/lib/components/shops-filter/index.d.ts +97 -1
- package/lib/components/shops-filter/src/shops-filter.vue.d.ts +1 -1
- package/lib/components/staffs-selector/index.d.ts +1095 -1
- package/lib/components/staffs-selector/index.js +536 -506
- package/lib/components/staffs-selector/src/action.d.ts +66 -0
- package/lib/components/staffs-selector/src/multipleCmp.vue.d.ts +11 -49
- package/lib/components/staffs-selector/src/staffs-selector.vue.d.ts +998 -10
- package/lib/components/staffs-selector/src/variedCmp.vue.d.ts +18 -11
- package/lib/components/timeline/index.d.ts +111 -2
- package/lib/components/upload/index.d.ts +139 -2
- package/lib/components/upload/index.js +205 -168
- package/lib/components/upload/src/props.d.ts +50 -0
- package/lib/components/upload/src/upload.vue.d.ts +44 -11
- package/lib/utils/bm-admin-ui-resolver.d.ts +1 -3
- package/lib/utils/bm-admin-ui-resolver.js +1 -1
- package/lib/utils/with-install.d.ts +7 -1
- package/lib/utils/with-install.js +1 -0
- package/package.json +2 -2
- package/theme-chalk/breadcrumb.css +1 -0
- package/theme-chalk/editor.css +16 -0
- package/theme-chalk/form-create.css +1 -1
- package/theme-chalk/index.css +16 -1
- package/theme-chalk/staffs-selector.css +1 -1
- package/theme-chalk/upload.css +1 -1
- package/types/components/breadcrumb/index.d.ts +162 -0
- package/types/components/breadcrumb/src/breadcrumb.vue.d.ts +161 -0
- package/types/components/button/index.d.ts +303 -1
- package/types/components/editor/index.d.ts +305 -0
- package/types/components/editor/src/editor.vue.d.ts +304 -0
- package/types/components/editor/src/props.d.ts +31 -0
- package/types/components/feedback/index.d.ts +1028 -2
- package/types/components/float-table/index.d.ts +68 -1
- package/types/components/flow-designer/index.d.ts +5 -1
- package/types/components/index.d.ts +2 -0
- package/types/components/input-tags-display/index.d.ts +138 -1
- package/types/components/input-tags-display/src/input-tags-display.vue.d.ts +1 -1
- package/types/components/over-tooltips/index.d.ts +33 -1
- package/types/components/search-filter/index.d.ts +233 -1
- package/types/components/search-filter/src/search-filter.vue.d.ts +3 -3
- package/types/components/select-all/index.d.ts +752 -1
- package/types/components/select-all/src/selectAll.vue.d.ts +5 -5
- package/types/components/shops-filter/index.d.ts +97 -1
- package/types/components/shops-filter/src/shops-filter.vue.d.ts +1 -1
- package/types/components/staffs-selector/index.d.ts +1095 -1
- package/types/components/staffs-selector/src/action.d.ts +66 -0
- package/types/components/staffs-selector/src/multipleCmp.vue.d.ts +11 -49
- package/types/components/staffs-selector/src/staffs-selector.vue.d.ts +998 -10
- package/types/components/staffs-selector/src/variedCmp.vue.d.ts +18 -11
- package/types/components/timeline/index.d.ts +111 -2
- package/types/components/upload/index.d.ts +139 -2
- package/types/components/upload/src/props.d.ts +50 -0
- package/types/components/upload/src/upload.vue.d.ts +44 -11
- package/types/utils/bm-admin-ui-resolver.d.ts +1 -3
- package/types/utils/with-install.d.ts +7 -1
|
@@ -3,24 +3,94 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
var withInstall = require('bm-admin-ui/lib/utils/with-install');
|
|
6
|
-
var AModal = require('ant-design-vue/lib/modal');
|
|
7
6
|
var vue = require('vue');
|
|
7
|
+
var AModal = require('ant-design-vue/lib/modal');
|
|
8
8
|
var iconsVue = require('@ant-design/icons-vue');
|
|
9
9
|
var Empty = require('ant-design-vue/lib/empty');
|
|
10
|
-
var AInput = require('ant-design-vue/lib/input');
|
|
11
10
|
var Checkbox = require('ant-design-vue/lib/checkbox');
|
|
12
|
-
var
|
|
11
|
+
var message = require('ant-design-vue/lib/message');
|
|
12
|
+
var AInput = require('ant-design-vue/lib/input');
|
|
13
13
|
var ARadio = require('ant-design-vue/lib/radio');
|
|
14
14
|
|
|
15
15
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
16
16
|
|
|
17
17
|
var AModal__default = /*#__PURE__*/_interopDefaultLegacy(AModal);
|
|
18
18
|
var Empty__default = /*#__PURE__*/_interopDefaultLegacy(Empty);
|
|
19
|
-
var AInput__default = /*#__PURE__*/_interopDefaultLegacy(AInput);
|
|
20
19
|
var Checkbox__default = /*#__PURE__*/_interopDefaultLegacy(Checkbox);
|
|
21
|
-
var
|
|
20
|
+
var message__default = /*#__PURE__*/_interopDefaultLegacy(message);
|
|
21
|
+
var AInput__default = /*#__PURE__*/_interopDefaultLegacy(AInput);
|
|
22
22
|
var ARadio__default = /*#__PURE__*/_interopDefaultLegacy(ARadio);
|
|
23
23
|
|
|
24
|
+
const MODE = {
|
|
25
|
+
RADIO: 'radio',
|
|
26
|
+
MULTIPLE: 'multiple',
|
|
27
|
+
VARIED: 'varied',
|
|
28
|
+
};
|
|
29
|
+
const selectProps = {
|
|
30
|
+
visible: {
|
|
31
|
+
type: Boolean,
|
|
32
|
+
default: false,
|
|
33
|
+
},
|
|
34
|
+
mode: {
|
|
35
|
+
type: String,
|
|
36
|
+
default: MODE.MULTIPLE,
|
|
37
|
+
},
|
|
38
|
+
limit: {
|
|
39
|
+
type: Number,
|
|
40
|
+
default: 0,
|
|
41
|
+
},
|
|
42
|
+
title: {
|
|
43
|
+
type: String,
|
|
44
|
+
default: '人员选择器',
|
|
45
|
+
},
|
|
46
|
+
load: {
|
|
47
|
+
type: Function,
|
|
48
|
+
default: () => {
|
|
49
|
+
return Promise.resolve([]);
|
|
50
|
+
},
|
|
51
|
+
},
|
|
52
|
+
select: {
|
|
53
|
+
type: Array || Object,
|
|
54
|
+
defualt: () => [],
|
|
55
|
+
},
|
|
56
|
+
forceStatic: {
|
|
57
|
+
type: Boolean,
|
|
58
|
+
default: false,
|
|
59
|
+
},
|
|
60
|
+
immediateFetch: {
|
|
61
|
+
type: Boolean,
|
|
62
|
+
default: false,
|
|
63
|
+
},
|
|
64
|
+
showCount: {
|
|
65
|
+
type: Boolean,
|
|
66
|
+
default: true,
|
|
67
|
+
},
|
|
68
|
+
unitStr: {
|
|
69
|
+
type: String,
|
|
70
|
+
default: '人',
|
|
71
|
+
},
|
|
72
|
+
};
|
|
73
|
+
vue.readonly([
|
|
74
|
+
{ title: '成员', key: 0, paramStr: 'staff' },
|
|
75
|
+
{ title: '部门', key: 1, paramStr: 'department' },
|
|
76
|
+
{ title: '工作组', key: 2, paramStr: 'group' },
|
|
77
|
+
{ title: '店铺', key: 3, paramStr: 'shop' },
|
|
78
|
+
]);
|
|
79
|
+
vue.ref('');
|
|
80
|
+
const selectState = vue.reactive({
|
|
81
|
+
multipleChecked: {},
|
|
82
|
+
departmentChecked: [],
|
|
83
|
+
multipDepartment: [],
|
|
84
|
+
staffsChecked: {},
|
|
85
|
+
shopChecked: {},
|
|
86
|
+
groupChecked: {},
|
|
87
|
+
dataMap: new Map(),
|
|
88
|
+
curlistKeys: new Set(),
|
|
89
|
+
activeKey: 0,
|
|
90
|
+
});
|
|
91
|
+
const list = vue.ref([]);
|
|
92
|
+
const departNative = vue.ref([]);
|
|
93
|
+
|
|
24
94
|
var _export_sfc = (sfc, props) => {
|
|
25
95
|
const target = sfc.__vccOpts || sfc;
|
|
26
96
|
for (const [key, val] of props) {
|
|
@@ -30,46 +100,19 @@ var _export_sfc = (sfc, props) => {
|
|
|
30
100
|
};
|
|
31
101
|
|
|
32
102
|
const _sfc_main$3 = vue.defineComponent({
|
|
33
|
-
components: {
|
|
34
|
-
CloseCircleFilled: iconsVue.CloseCircleFilled,
|
|
35
|
-
SearchOutlined: iconsVue.SearchOutlined,
|
|
36
|
-
Empty: Empty__default["default"],
|
|
37
|
-
AInput: AInput__default["default"],
|
|
38
|
-
Checkbox: Checkbox__default["default"],
|
|
39
|
-
ATree: ATree__default["default"]
|
|
40
|
-
},
|
|
103
|
+
components: { SearchOutlined: iconsVue.SearchOutlined, Checkbox: Checkbox__default["default"], Empty: Empty__default["default"] },
|
|
41
104
|
props: {
|
|
42
105
|
limit: {
|
|
43
106
|
type: Number,
|
|
44
107
|
default: 0
|
|
45
108
|
},
|
|
46
|
-
list: {
|
|
47
|
-
type: Array,
|
|
48
|
-
default: () => []
|
|
49
|
-
},
|
|
50
109
|
selected: {
|
|
51
110
|
type: Array,
|
|
52
111
|
default: () => []
|
|
53
112
|
},
|
|
54
|
-
dataMap: {
|
|
55
|
-
type: Map,
|
|
56
|
-
default: () => /* @__PURE__ */ new Map()
|
|
57
|
-
},
|
|
58
113
|
isTree: {
|
|
59
114
|
type: Boolean,
|
|
60
115
|
default: false
|
|
61
|
-
},
|
|
62
|
-
curlistKeys: {
|
|
63
|
-
type: Set,
|
|
64
|
-
default: () => /* @__PURE__ */ new Set()
|
|
65
|
-
},
|
|
66
|
-
showCount: {
|
|
67
|
-
type: Boolean,
|
|
68
|
-
default: true
|
|
69
|
-
},
|
|
70
|
-
unitStr: {
|
|
71
|
-
type: String,
|
|
72
|
-
default: "\u4EBA"
|
|
73
116
|
}
|
|
74
117
|
},
|
|
75
118
|
emits: ["fetchList", "update:selected"],
|
|
@@ -79,18 +122,16 @@ const _sfc_main$3 = vue.defineComponent({
|
|
|
79
122
|
selectAll: false,
|
|
80
123
|
indeterminate: false,
|
|
81
124
|
emptyPic: Empty__default["default"].PRESENTED_IMAGE_SIMPLE,
|
|
82
|
-
|
|
83
|
-
isFulfill: false,
|
|
84
|
-
departmentChecked: {}
|
|
125
|
+
isFulfill: false
|
|
85
126
|
});
|
|
86
127
|
const methods = {
|
|
87
128
|
changeAllOption() {
|
|
88
129
|
let status = state.selectAll;
|
|
89
130
|
let length = props.selected.length;
|
|
90
|
-
|
|
131
|
+
list.value.forEach((item) => {
|
|
91
132
|
if (status && props.limit > 0 && length++ >= props.limit)
|
|
92
133
|
return;
|
|
93
|
-
|
|
134
|
+
selectState.multipleChecked[item.key] = status;
|
|
94
135
|
});
|
|
95
136
|
},
|
|
96
137
|
search() {
|
|
@@ -100,8 +141,8 @@ const _sfc_main$3 = vue.defineComponent({
|
|
|
100
141
|
setState() {
|
|
101
142
|
let indeterminate = false;
|
|
102
143
|
let selectAll = true;
|
|
103
|
-
|
|
104
|
-
if (!
|
|
144
|
+
list.value.forEach((item) => {
|
|
145
|
+
if (!selectState.multipleChecked[item.key]) {
|
|
105
146
|
selectAll = false;
|
|
106
147
|
} else {
|
|
107
148
|
indeterminate = true;
|
|
@@ -109,88 +150,68 @@ const _sfc_main$3 = vue.defineComponent({
|
|
|
109
150
|
});
|
|
110
151
|
state.selectAll = selectAll;
|
|
111
152
|
state.indeterminate = selectAll ? false : indeterminate;
|
|
112
|
-
},
|
|
113
|
-
deleteOption(key) {
|
|
114
|
-
if (props.isTree) {
|
|
115
|
-
let list = [].concat(state.departmentChecked);
|
|
116
|
-
let result = [];
|
|
117
|
-
list.forEach((item) => {
|
|
118
|
-
if (!(item === key || props.dataMap.get(item) && key === props.dataMap.get(item)["parent"])) {
|
|
119
|
-
result.push(item);
|
|
120
|
-
}
|
|
121
|
-
});
|
|
122
|
-
state.departmentChecked = Array.from(new Set(result));
|
|
123
|
-
} else {
|
|
124
|
-
state.listChecked[key] = false;
|
|
125
|
-
}
|
|
126
|
-
},
|
|
127
|
-
getSelectName(key) {
|
|
128
|
-
let data = props.dataMap.get(String(key)) || null;
|
|
129
|
-
return data ? data.title : "\u672A\u77E5";
|
|
130
153
|
}
|
|
131
154
|
};
|
|
132
155
|
vue.watch(
|
|
133
|
-
() =>
|
|
156
|
+
() => selectState.multipleChecked,
|
|
134
157
|
() => {
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
158
|
+
if (props.limit && props.limit > 0) {
|
|
159
|
+
let length = 0;
|
|
160
|
+
for (let key in selectState.multipleChecked) {
|
|
161
|
+
if (selectState.multipleChecked[key])
|
|
162
|
+
length++;
|
|
163
|
+
}
|
|
164
|
+
state.isFulfill = length >= props.limit;
|
|
138
165
|
}
|
|
139
|
-
if (props.limit > 0 && list.length >= props.limit)
|
|
140
|
-
state.isFulfill = true;
|
|
141
|
-
else
|
|
142
|
-
state.isFulfill = false;
|
|
143
166
|
methods.setState();
|
|
144
|
-
emit("update:selected", list);
|
|
145
167
|
},
|
|
146
168
|
{ deep: true }
|
|
147
169
|
);
|
|
148
170
|
vue.watch(
|
|
149
|
-
() =>
|
|
171
|
+
() => list,
|
|
150
172
|
() => {
|
|
151
|
-
|
|
152
|
-
let curlistKeys = props.curlistKeys;
|
|
153
|
-
let hadselected = new Set(props.selected);
|
|
154
|
-
let curselect = new Set(state.departmentChecked);
|
|
155
|
-
for (let key of hadselected) {
|
|
156
|
-
if (curlistKeys.has(key) && (!curselect.has(key) || curselect.has(key) && curselect.has(flatMap.get(key)["parent"]))) {
|
|
157
|
-
hadselected.delete(key);
|
|
158
|
-
}
|
|
159
|
-
}
|
|
160
|
-
for (let key of curselect) {
|
|
161
|
-
let obj = flatMap.get(key);
|
|
162
|
-
if (obj && !curselect.has(obj["parent"])) {
|
|
163
|
-
hadselected.add(key);
|
|
164
|
-
}
|
|
165
|
-
}
|
|
166
|
-
emit("update:selected", Array.from(hadselected));
|
|
173
|
+
!props.isTree && methods.setState();
|
|
167
174
|
},
|
|
168
175
|
{ deep: true }
|
|
169
176
|
);
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
177
|
+
function changeTreeCheck(checkedKeys) {
|
|
178
|
+
let flatMap = selectState.dataMap;
|
|
179
|
+
let curlistKeys = selectState.curlistKeys;
|
|
180
|
+
let hadselected = new Set(selectState.multipDepartment);
|
|
181
|
+
let curselect = new Set(checkedKeys);
|
|
182
|
+
for (let key of hadselected) {
|
|
183
|
+
if (curlistKeys.has(String(key)) && (!curselect.has(String(key)) || curselect.has(String(key)) && curselect.has(flatMap.get(String(key))["parent"]))) {
|
|
184
|
+
hadselected.delete(key);
|
|
185
|
+
}
|
|
174
186
|
}
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
}
|
|
181
|
-
|
|
187
|
+
for (let key of curselect) {
|
|
188
|
+
let obj = flatMap.get(String(key));
|
|
189
|
+
if (obj && !curselect.has(obj["parent"])) {
|
|
190
|
+
hadselected.add(String(key));
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
let arr = Array.from(hadselected) || [];
|
|
194
|
+
if (props.limit && props.limit > 0 && arr.length > props.limit) {
|
|
195
|
+
message__default["default"].error("\u52FE\u9009\u540E\u5C06\u8D85\u8FC7\u4EBA\u5458\u9650\u5236");
|
|
196
|
+
return;
|
|
197
|
+
}
|
|
198
|
+
selectState.multipDepartment = Array.from(hadselected) || [];
|
|
199
|
+
}
|
|
182
200
|
return {
|
|
201
|
+
changeTreeCheck,
|
|
183
202
|
...vue.toRefs(state),
|
|
203
|
+
...vue.toRefs(selectState),
|
|
204
|
+
list,
|
|
184
205
|
...methods
|
|
185
206
|
};
|
|
186
207
|
}
|
|
187
208
|
});
|
|
188
209
|
const _hoisted_1$3 = { class: "multiple-selector" };
|
|
189
|
-
const _hoisted_2$
|
|
190
|
-
const _hoisted_3$
|
|
191
|
-
const _hoisted_4$
|
|
192
|
-
const _hoisted_5$
|
|
193
|
-
const _hoisted_6$
|
|
210
|
+
const _hoisted_2$3 = { class: "__selector-modal-panel" };
|
|
211
|
+
const _hoisted_3$3 = { class: "__search-panel" };
|
|
212
|
+
const _hoisted_4$3 = { class: "__selector-modal-options" };
|
|
213
|
+
const _hoisted_5$3 = { class: "__selector-modal-options-item fixed-option" };
|
|
214
|
+
const _hoisted_6$2 = { class: "department-option-item" };
|
|
194
215
|
const _hoisted_7$1 = {
|
|
195
216
|
key: 0,
|
|
196
217
|
class: "department-desc"
|
|
@@ -201,27 +222,15 @@ const _hoisted_8$1 = {
|
|
|
201
222
|
style: { "height": "280px" }
|
|
202
223
|
};
|
|
203
224
|
const _hoisted_9$1 = { style: { "color": "#9393a3", "font-size": "12px", "font-weight": "400" } };
|
|
204
|
-
|
|
205
|
-
const _hoisted_11$1 = {
|
|
206
|
-
key: 0,
|
|
207
|
-
class: "__chosen-panel-tip"
|
|
208
|
-
};
|
|
209
|
-
const _hoisted_12$1 = {
|
|
210
|
-
key: 0,
|
|
211
|
-
class: "__limit-tip"
|
|
212
|
-
};
|
|
213
|
-
const _hoisted_13$1 = { class: "__chosen-panel-list" };
|
|
214
|
-
const _hoisted_14$1 = { class: "__tiem-title" };
|
|
215
|
-
function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {
|
|
225
|
+
function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) {
|
|
216
226
|
const _component_search_outlined = vue.resolveComponent("search-outlined");
|
|
217
227
|
const _component_AInput = vue.resolveComponent("AInput");
|
|
218
228
|
const _component_Checkbox = vue.resolveComponent("Checkbox");
|
|
219
229
|
const _component_ATree = vue.resolveComponent("ATree");
|
|
220
230
|
const _component_Empty = vue.resolveComponent("Empty");
|
|
221
|
-
const _component_CloseCircleFilled = vue.resolveComponent("CloseCircleFilled");
|
|
222
231
|
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$3, [
|
|
223
|
-
vue.createElementVNode("div", _hoisted_2$
|
|
224
|
-
vue.createElementVNode("div", _hoisted_3$
|
|
232
|
+
vue.createElementVNode("div", _hoisted_2$3, [
|
|
233
|
+
vue.createElementVNode("div", _hoisted_3$3, [
|
|
225
234
|
vue.createVNode(_component_AInput, {
|
|
226
235
|
value: _ctx.searchVal,
|
|
227
236
|
"onUpdate:value": _cache[0] || (_cache[0] = ($event) => _ctx.searchVal = $event),
|
|
@@ -233,9 +242,9 @@ function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
233
242
|
]),
|
|
234
243
|
_: 1
|
|
235
244
|
}, 8, ["value", "onChange"]),
|
|
236
|
-
vue.createElementVNode("div", _hoisted_4$
|
|
245
|
+
vue.createElementVNode("div", _hoisted_4$3, [
|
|
237
246
|
!_ctx.isTree ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 0 }, [
|
|
238
|
-
vue.createElementVNode("div", _hoisted_5$
|
|
247
|
+
vue.createElementVNode("div", _hoisted_5$3, [
|
|
239
248
|
vue.withDirectives(vue.createVNode(_component_Checkbox, {
|
|
240
249
|
checked: _ctx.selectAll,
|
|
241
250
|
"onUpdate:checked": _cache[1] || (_cache[1] = ($event) => _ctx.selectAll = $event),
|
|
@@ -256,8 +265,8 @@ function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
256
265
|
class: "__selector-modal-options-item"
|
|
257
266
|
}, [
|
|
258
267
|
vue.createVNode(_component_Checkbox, {
|
|
259
|
-
checked: _ctx.
|
|
260
|
-
"onUpdate:checked": ($event) => _ctx.
|
|
268
|
+
checked: _ctx.multipleChecked[item.key],
|
|
269
|
+
"onUpdate:checked": ($event) => _ctx.multipleChecked[item.key] = $event,
|
|
261
270
|
class: "__selector-modal-option-check",
|
|
262
271
|
disabled: _ctx.isFulfill
|
|
263
272
|
}, {
|
|
@@ -270,19 +279,19 @@ function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
270
279
|
}), 128))
|
|
271
280
|
], 64)) : _ctx.isTree ? (vue.openBlock(), vue.createBlock(_component_ATree, {
|
|
272
281
|
key: 1,
|
|
273
|
-
|
|
274
|
-
"onUpdate:checkedKeys": _cache[2] || (_cache[2] = ($event) => _ctx.departmentChecked = $event),
|
|
282
|
+
"checked-keys": _ctx.multipDepartment,
|
|
275
283
|
checkable: "",
|
|
276
|
-
"tree-data": _ctx.list
|
|
284
|
+
"tree-data": _ctx.list,
|
|
285
|
+
onCheck: _ctx.changeTreeCheck
|
|
277
286
|
}, {
|
|
278
|
-
title: vue.withCtx(({ title, description }) => [
|
|
279
|
-
vue.createElementVNode("div", _hoisted_6$
|
|
280
|
-
vue.createElementVNode("span", null, vue.toDisplayString(title), 1),
|
|
287
|
+
title: vue.withCtx(({ title, key, description }) => [
|
|
288
|
+
vue.createElementVNode("div", _hoisted_6$2, [
|
|
289
|
+
vue.createElementVNode("span", null, vue.toDisplayString(title) + vue.toDisplayString(key ? `(${key})` : ""), 1),
|
|
281
290
|
description ? (vue.openBlock(), vue.createElementBlock("p", _hoisted_7$1, vue.toDisplayString(description), 1)) : vue.createCommentVNode("v-if", true)
|
|
282
291
|
])
|
|
283
292
|
]),
|
|
284
293
|
_: 1
|
|
285
|
-
}, 8, ["
|
|
294
|
+
}, 8, ["checked-keys", "tree-data", "onCheck"])) : vue.createCommentVNode("v-if", true),
|
|
286
295
|
_ctx.list && !_ctx.list.length ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_8$1, [
|
|
287
296
|
vue.createVNode(_component_Empty, { image: _ctx.emptyPic }, {
|
|
288
297
|
description: vue.withCtx(() => [
|
|
@@ -293,30 +302,10 @@ function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
293
302
|
])) : vue.createCommentVNode("v-if", true)
|
|
294
303
|
])
|
|
295
304
|
])
|
|
296
|
-
]),
|
|
297
|
-
vue.createElementVNode("div", _hoisted_10$1, [
|
|
298
|
-
_ctx.showCount ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_11$1, [
|
|
299
|
-
vue.createElementVNode("span", null, "\u5DF2\u9009\u62E9" + vue.toDisplayString(_ctx.selected && _ctx.selected.length || 0) + vue.toDisplayString(_ctx.$props.unitStr), 1),
|
|
300
|
-
_ctx.limit ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_12$1, "\u6700\u591A\u9009\u62E9" + vue.toDisplayString(_ctx.limit) + vue.toDisplayString(_ctx.$props.unitStr), 1)) : vue.createCommentVNode("v-if", true)
|
|
301
|
-
])) : vue.createCommentVNode("v-if", true),
|
|
302
|
-
vue.createElementVNode("div", _hoisted_13$1, [
|
|
303
|
-
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(_ctx.selected, (item) => {
|
|
304
|
-
return vue.openBlock(), vue.createElementBlock("div", {
|
|
305
|
-
key: item + "checked",
|
|
306
|
-
class: "__chosen-panel-list-item"
|
|
307
|
-
}, [
|
|
308
|
-
vue.createElementVNode("span", _hoisted_14$1, vue.toDisplayString(_ctx.getSelectName(item)), 1),
|
|
309
|
-
vue.createVNode(_component_CloseCircleFilled, {
|
|
310
|
-
style: { "color": "#ced1d9" },
|
|
311
|
-
onMousedown: vue.withModifiers(($event) => _ctx.deleteOption(item), ["stop"])
|
|
312
|
-
}, null, 8, ["onMousedown"])
|
|
313
|
-
]);
|
|
314
|
-
}), 128))
|
|
315
|
-
])
|
|
316
305
|
])
|
|
317
306
|
]);
|
|
318
307
|
}
|
|
319
|
-
var multipleCmp = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["render", _sfc_render$
|
|
308
|
+
var multipleCmp = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["render", _sfc_render$2], ["__file", "multipleCmp.vue"]]);
|
|
320
309
|
|
|
321
310
|
const _sfc_main$2 = vue.defineComponent({
|
|
322
311
|
name: "RadioCmp",
|
|
@@ -351,24 +340,24 @@ const _sfc_main$2 = vue.defineComponent({
|
|
|
351
340
|
}
|
|
352
341
|
});
|
|
353
342
|
const _hoisted_1$2 = { class: "radio-selector-panel" };
|
|
354
|
-
const _hoisted_2$
|
|
355
|
-
const _hoisted_3$
|
|
343
|
+
const _hoisted_2$2 = { class: "__search-panel withoutpad" };
|
|
344
|
+
const _hoisted_3$2 = {
|
|
356
345
|
key: 0,
|
|
357
346
|
class: "__selector-modal-options __radio-panel"
|
|
358
347
|
};
|
|
359
|
-
const _hoisted_4$
|
|
348
|
+
const _hoisted_4$2 = {
|
|
360
349
|
key: 1,
|
|
361
350
|
class: "noData"
|
|
362
351
|
};
|
|
363
|
-
const _hoisted_5$
|
|
364
|
-
function _sfc_render$
|
|
352
|
+
const _hoisted_5$2 = { style: { "color": "#9393a3", "font-size": "12px", "font-weight": "400" } };
|
|
353
|
+
function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
365
354
|
const _component_search_outlined = vue.resolveComponent("search-outlined");
|
|
366
355
|
const _component_a_input = vue.resolveComponent("a-input");
|
|
367
356
|
const _component_ARadio = vue.resolveComponent("ARadio");
|
|
368
357
|
const _component_ARadioGroup = vue.resolveComponent("ARadioGroup");
|
|
369
358
|
const _component_Empty = vue.resolveComponent("Empty");
|
|
370
359
|
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$2, [
|
|
371
|
-
vue.createElementVNode("div", _hoisted_2$
|
|
360
|
+
vue.createElementVNode("div", _hoisted_2$2, [
|
|
372
361
|
vue.createVNode(_component_a_input, {
|
|
373
362
|
value: _ctx.searchVal,
|
|
374
363
|
"onUpdate:value": _cache[0] || (_cache[0] = ($event) => _ctx.searchVal = $event),
|
|
@@ -380,7 +369,7 @@ function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
380
369
|
]),
|
|
381
370
|
_: 1
|
|
382
371
|
}, 8, ["value", "onChange"]),
|
|
383
|
-
_ctx.list && _ctx.list.length ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_3$
|
|
372
|
+
_ctx.list && _ctx.list.length ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_3$2, [
|
|
384
373
|
vue.createVNode(_component_ARadioGroup, {
|
|
385
374
|
value: _ctx.selected,
|
|
386
375
|
style: { width: "100%" },
|
|
@@ -403,10 +392,10 @@ function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
403
392
|
_: 1
|
|
404
393
|
}, 8, ["value", "onChange"])
|
|
405
394
|
])) : vue.createCommentVNode("v-if", true),
|
|
406
|
-
_ctx.list && !_ctx.list.length ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_4$
|
|
395
|
+
_ctx.list && !_ctx.list.length ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_4$2, [
|
|
407
396
|
vue.createVNode(_component_Empty, { image: _ctx.emptyPic }, {
|
|
408
397
|
description: vue.withCtx(() => [
|
|
409
|
-
vue.createElementVNode("span", _hoisted_5$
|
|
398
|
+
vue.createElementVNode("span", _hoisted_5$2, vue.toDisplayString(!!_ctx.searchVal ? "\u6682\u65E0\u6570\u636E" : "\u8BF7\u5148\u641C\u7D22\u4EBA\u5458\u5173\u952E\u5B57"), 1)
|
|
410
399
|
]),
|
|
411
400
|
_: 1
|
|
412
401
|
}, 8, ["image"])
|
|
@@ -414,18 +403,9 @@ function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
414
403
|
])
|
|
415
404
|
]);
|
|
416
405
|
}
|
|
417
|
-
var radioCmp = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["render", _sfc_render$
|
|
406
|
+
var radioCmp = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["render", _sfc_render$1], ["__file", "radioCmp.vue"]]);
|
|
418
407
|
|
|
419
408
|
const _sfc_main$1 = vue.defineComponent({
|
|
420
|
-
name: "VariedCmp",
|
|
421
|
-
components: {
|
|
422
|
-
CloseCircleFilled: iconsVue.CloseCircleFilled,
|
|
423
|
-
SearchOutlined: iconsVue.SearchOutlined,
|
|
424
|
-
AInput: AInput__default["default"],
|
|
425
|
-
Checkbox: Checkbox__default["default"],
|
|
426
|
-
ATree: ATree__default["default"],
|
|
427
|
-
Empty: Empty__default["default"]
|
|
428
|
-
},
|
|
429
409
|
props: {
|
|
430
410
|
list: {
|
|
431
411
|
type: Array,
|
|
@@ -446,164 +426,83 @@ const _sfc_main$1 = vue.defineComponent({
|
|
|
446
426
|
},
|
|
447
427
|
emits: ["fetchList", "update:selected"],
|
|
448
428
|
setup(props, { emit }) {
|
|
429
|
+
const indicator = vue.h(iconsVue.LoadingOutlined, {
|
|
430
|
+
style: {
|
|
431
|
+
fontSize: "24px"
|
|
432
|
+
},
|
|
433
|
+
spin: true
|
|
434
|
+
});
|
|
435
|
+
const loading = vue.ref(false);
|
|
449
436
|
const emptyPic = Empty__default["default"].PRESENTED_IMAGE_SIMPLE;
|
|
450
|
-
const
|
|
437
|
+
const areas = vue.readonly([
|
|
438
|
+
{ title: "\u6210\u5458", key: 0, paramStr: "staff" },
|
|
439
|
+
{ title: "\u90E8\u95E8", key: 1, paramStr: "department" },
|
|
440
|
+
{ title: "\u5DE5\u4F5C\u7EC4", key: 2, paramStr: "group" },
|
|
441
|
+
{ title: "\u5E97\u94FA", key: 3, paramStr: "shop" }
|
|
442
|
+
]);
|
|
451
443
|
const searchVal = vue.ref("");
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
444
|
+
function changeArea(item) {
|
|
445
|
+
selectState.activeKey = item.key;
|
|
446
|
+
searchVal.value = "";
|
|
447
|
+
if (selectState.activeKey === 1) {
|
|
448
|
+
search();
|
|
449
|
+
} else
|
|
450
|
+
emit("fetchList", false);
|
|
451
|
+
}
|
|
452
|
+
function search() {
|
|
453
|
+
emit("fetchList", {
|
|
454
|
+
searchVal: searchVal.value,
|
|
455
|
+
area: areas[selectState.activeKey].paramStr
|
|
456
|
+
});
|
|
457
|
+
}
|
|
456
458
|
const inputPlaceHolder = vue.computed(() => {
|
|
457
|
-
if (activeKey
|
|
459
|
+
if (selectState.activeKey === 1) {
|
|
458
460
|
return "\u8BF7\u8F93\u5165\u90E8\u95E8\u641C\u7D22";
|
|
459
|
-
} else if (activeKey
|
|
461
|
+
} else if (selectState.activeKey === 2) {
|
|
460
462
|
return "\u8BF7\u8F93\u5165\u5DE5\u4F5C\u7EC4\u641C\u7D22";
|
|
461
|
-
} else if (activeKey
|
|
463
|
+
} else if (selectState.activeKey === 3) {
|
|
462
464
|
return "\u8BF7\u8F93\u5165\u5E97\u94FA\u641C\u7D22";
|
|
463
465
|
}
|
|
464
466
|
return "\u8BF7\u8F93\u5165\u4EBA\u540D\u641C\u7D22";
|
|
465
467
|
});
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
let object = new Object();
|
|
475
|
-
if (object.hasOwnProperty.call(staffsChecked.value, key)) {
|
|
476
|
-
staffsChecked.value[key] = false;
|
|
477
|
-
} else if (object.hasOwnProperty.call(shopChecked.value, key)) {
|
|
478
|
-
shopChecked.value[key] = false;
|
|
479
|
-
} else if (object.hasOwnProperty.call(groupChecked.value, key)) {
|
|
480
|
-
groupChecked.value[key] = false;
|
|
481
|
-
} else {
|
|
482
|
-
let list = [].concat(departmentChecked.value);
|
|
483
|
-
let result = [];
|
|
484
|
-
list.forEach((item) => {
|
|
485
|
-
if (!(item === key || props.dataMap.get(item) && key === props.dataMap.get(item)["parent"])) {
|
|
486
|
-
result.push(item);
|
|
487
|
-
}
|
|
488
|
-
});
|
|
489
|
-
departmentChecked.value = Array.from(new Set(result));
|
|
468
|
+
function changeTreeCheck(checkedKeys) {
|
|
469
|
+
let flatMap = selectState.dataMap;
|
|
470
|
+
let curlistKeys = selectState.curlistKeys;
|
|
471
|
+
let hadselected = new Set(selectState.departmentChecked);
|
|
472
|
+
let curselect = new Set(checkedKeys);
|
|
473
|
+
for (let key of hadselected) {
|
|
474
|
+
if (curlistKeys.has(String(key)) && (!curselect.has(String(key)) || curselect.has(String(key)) && curselect.has(flatMap.get(String(key))["parent"]))) {
|
|
475
|
+
hadselected.delete(key);
|
|
490
476
|
}
|
|
491
|
-
},
|
|
492
|
-
changeArea(item) {
|
|
493
|
-
activeKey.value = item.key;
|
|
494
|
-
searchVal.value = "";
|
|
495
|
-
if (activeKey.value === 1) {
|
|
496
|
-
methods.search();
|
|
497
|
-
} else
|
|
498
|
-
emit("fetchList", false);
|
|
499
|
-
},
|
|
500
|
-
search() {
|
|
501
|
-
emit("fetchList", {
|
|
502
|
-
searchVal: searchVal.value,
|
|
503
|
-
area: areas[activeKey.value].paramStr
|
|
504
|
-
});
|
|
505
|
-
},
|
|
506
|
-
getSelectName(key) {
|
|
507
|
-
let data = props.dataMap.get(key) || null;
|
|
508
|
-
return data ? data.title : "\u672A\u77E5";
|
|
509
477
|
}
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
let flatMap = props.dataMap;
|
|
515
|
-
let curlistKeys = props.curlistKeys;
|
|
516
|
-
let hadselected = new Set(props.selected);
|
|
517
|
-
let curselect = new Set(departmentChecked.value);
|
|
518
|
-
for (let key of hadselected) {
|
|
519
|
-
if (curlistKeys.has(key) && (!curselect.has(key) || curselect.has(key) && curselect.has(flatMap.get(key)["parent"]))) {
|
|
520
|
-
hadselected.delete(key);
|
|
521
|
-
}
|
|
522
|
-
}
|
|
523
|
-
for (let key of curselect) {
|
|
524
|
-
let obj = flatMap.get(key);
|
|
525
|
-
if (obj && !curselect.has(obj["parent"])) {
|
|
526
|
-
hadselected.add(key);
|
|
527
|
-
}
|
|
528
|
-
}
|
|
529
|
-
emit("update:selected", Array.from(hadselected));
|
|
530
|
-
},
|
|
531
|
-
{ deep: true }
|
|
532
|
-
);
|
|
533
|
-
vue.watch(
|
|
534
|
-
() => staffsChecked,
|
|
535
|
-
() => {
|
|
536
|
-
let set = new Set(props.selected.length ? props.selected : null);
|
|
537
|
-
for (let [key, value] of Object.entries(staffsChecked.value)) {
|
|
538
|
-
if (value) {
|
|
539
|
-
set.add(key);
|
|
540
|
-
} else {
|
|
541
|
-
set.has(key) && set.delete(key);
|
|
542
|
-
}
|
|
543
|
-
}
|
|
544
|
-
emit("update:selected", Array.from(set));
|
|
545
|
-
},
|
|
546
|
-
{ deep: true }
|
|
547
|
-
);
|
|
548
|
-
vue.watch(
|
|
549
|
-
() => shopChecked,
|
|
550
|
-
() => {
|
|
551
|
-
let set = new Set(props.selected.length ? props.selected : null);
|
|
552
|
-
for (let [key, value] of Object.entries(shopChecked.value)) {
|
|
553
|
-
if (value) {
|
|
554
|
-
set.add(key);
|
|
555
|
-
} else {
|
|
556
|
-
set.has(key) && set.delete(key);
|
|
557
|
-
}
|
|
558
|
-
}
|
|
559
|
-
emit("update:selected", Array.from(set));
|
|
560
|
-
},
|
|
561
|
-
{ deep: true }
|
|
562
|
-
);
|
|
563
|
-
vue.watch(
|
|
564
|
-
() => groupChecked,
|
|
565
|
-
() => {
|
|
566
|
-
let set = new Set(props.selected.length ? props.selected : null);
|
|
567
|
-
for (let [key, value] of Object.entries(groupChecked.value)) {
|
|
568
|
-
if (value) {
|
|
569
|
-
set.add(key);
|
|
570
|
-
} else {
|
|
571
|
-
set.has(key) && set.delete(key);
|
|
572
|
-
}
|
|
478
|
+
for (let key of curselect) {
|
|
479
|
+
let obj = flatMap.get(String(key));
|
|
480
|
+
if (obj && !curselect.has(obj["parent"])) {
|
|
481
|
+
hadselected.add(String(key));
|
|
573
482
|
}
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
);
|
|
578
|
-
vue.onMounted(() => {
|
|
579
|
-
let list = props.selected;
|
|
580
|
-
list && list.forEach((key) => {
|
|
581
|
-
staffsChecked.value[key] = true;
|
|
582
|
-
groupChecked.value[key] = true;
|
|
583
|
-
shopChecked.value[key] = true;
|
|
584
|
-
departmentChecked.value.push(key);
|
|
585
|
-
});
|
|
586
|
-
});
|
|
483
|
+
}
|
|
484
|
+
selectState.departmentChecked = Array.from(hadselected) || [];
|
|
485
|
+
}
|
|
587
486
|
return {
|
|
487
|
+
indicator,
|
|
488
|
+
loading,
|
|
588
489
|
emptyPic,
|
|
589
|
-
|
|
490
|
+
areas,
|
|
590
491
|
searchVal,
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
departmentChecked,
|
|
594
|
-
shopChecked,
|
|
492
|
+
search,
|
|
493
|
+
changeArea,
|
|
595
494
|
inputPlaceHolder,
|
|
596
|
-
|
|
597
|
-
...
|
|
495
|
+
changeTreeCheck,
|
|
496
|
+
...vue.toRefs(selectState)
|
|
598
497
|
};
|
|
599
498
|
}
|
|
600
499
|
});
|
|
601
500
|
const _hoisted_1$1 = { class: "varied-selector-panel" };
|
|
602
|
-
const _hoisted_2 = { class: "__selector-modal-panel-withGroup" };
|
|
603
|
-
const _hoisted_3 = { class: "varied-area-tabs" };
|
|
604
|
-
const _hoisted_4 = ["onClick"];
|
|
605
|
-
const _hoisted_5 = { class: "area-panel" };
|
|
606
|
-
const _hoisted_6 = {
|
|
501
|
+
const _hoisted_2$1 = { class: "__selector-modal-panel-withGroup" };
|
|
502
|
+
const _hoisted_3$1 = { class: "varied-area-tabs" };
|
|
503
|
+
const _hoisted_4$1 = ["onClick"];
|
|
504
|
+
const _hoisted_5$1 = { class: "area-panel" };
|
|
505
|
+
const _hoisted_6$1 = {
|
|
607
506
|
key: 0,
|
|
608
507
|
class: "noData"
|
|
609
508
|
};
|
|
@@ -614,7 +513,8 @@ const _hoisted_8 = {
|
|
|
614
513
|
};
|
|
615
514
|
const _hoisted_9 = {
|
|
616
515
|
key: 1,
|
|
617
|
-
class: "__selector-modal-options"
|
|
516
|
+
class: "__selector-modal-options",
|
|
517
|
+
style: { "overflow": "auto" }
|
|
618
518
|
};
|
|
619
519
|
const _hoisted_10 = { class: "department-option-item" };
|
|
620
520
|
const _hoisted_11 = {
|
|
@@ -629,25 +529,22 @@ const _hoisted_13 = {
|
|
|
629
529
|
key: 3,
|
|
630
530
|
class: "__selector-modal-options"
|
|
631
531
|
};
|
|
632
|
-
|
|
633
|
-
const _hoisted_15 = { class: "__chosen-panel-list" };
|
|
634
|
-
const _hoisted_16 = { class: "__tiem-title" };
|
|
635
|
-
function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
532
|
+
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
636
533
|
const _component_search_outlined = vue.resolveComponent("search-outlined");
|
|
637
534
|
const _component_a_input = vue.resolveComponent("a-input");
|
|
638
535
|
const _component_Empty = vue.resolveComponent("Empty");
|
|
639
536
|
const _component_Checkbox = vue.resolveComponent("Checkbox");
|
|
537
|
+
const _component_Spin = vue.resolveComponent("Spin");
|
|
640
538
|
const _component_a_tree = vue.resolveComponent("a-tree");
|
|
641
|
-
const _component_CloseCircleFilled = vue.resolveComponent("CloseCircleFilled");
|
|
642
539
|
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$1, [
|
|
643
|
-
vue.createElementVNode("div", _hoisted_2, [
|
|
644
|
-
vue.createElementVNode("div", _hoisted_3, [
|
|
540
|
+
vue.createElementVNode("div", _hoisted_2$1, [
|
|
541
|
+
vue.createElementVNode("div", _hoisted_3$1, [
|
|
645
542
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(_ctx.areas, (item) => {
|
|
646
543
|
return vue.openBlock(), vue.createElementBlock("div", {
|
|
647
544
|
key: item.key,
|
|
648
545
|
class: vue.normalizeClass(["area-tabs-item", { active: item.key === _ctx.activeKey }]),
|
|
649
546
|
onClick: vue.withModifiers(($event) => _ctx.changeArea(item), ["stop"])
|
|
650
|
-
}, vue.toDisplayString(item.title), 11, _hoisted_4);
|
|
547
|
+
}, vue.toDisplayString(item.title), 11, _hoisted_4$1);
|
|
651
548
|
}), 128))
|
|
652
549
|
]),
|
|
653
550
|
vue.createVNode(_component_a_input, {
|
|
@@ -661,8 +558,8 @@ function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
661
558
|
]),
|
|
662
559
|
_: 1
|
|
663
560
|
}, 8, ["value", "placeholder", "onChange"]),
|
|
664
|
-
vue.createElementVNode("div", _hoisted_5, [
|
|
665
|
-
_ctx.list && !_ctx.list.length ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_6, [
|
|
561
|
+
vue.createElementVNode("div", _hoisted_5$1, [
|
|
562
|
+
_ctx.list && !_ctx.list.length ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_6$1, [
|
|
666
563
|
vue.createVNode(_component_Empty, { image: _ctx.emptyPic }, {
|
|
667
564
|
description: vue.withCtx(() => [
|
|
668
565
|
vue.createElementVNode("span", _hoisted_7, vue.toDisplayString(!!_ctx.searchVal ? "\u6682\u65E0\u6570\u636E" : "\u8BF7\u5148\u641C\u7D22\u4EBA\u5458\u5173\u952E\u5B57"), 1)
|
|
@@ -689,12 +586,17 @@ function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
689
586
|
]);
|
|
690
587
|
}), 128))
|
|
691
588
|
])) : _ctx.activeKey === 1 ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_9, [
|
|
589
|
+
vue.createVNode(_component_Spin, {
|
|
590
|
+
indicator: _ctx.indicator,
|
|
591
|
+
spinning: _ctx.loading
|
|
592
|
+
}, null, 8, ["indicator", "spinning"]),
|
|
593
|
+
vue.createCommentVNode(" "),
|
|
692
594
|
vue.createVNode(_component_a_tree, {
|
|
693
|
-
|
|
694
|
-
"
|
|
695
|
-
"default-expand-all": _ctx.searchVal === "",
|
|
595
|
+
"checked-keys": _ctx.departmentChecked,
|
|
596
|
+
"default-expand-all": false,
|
|
696
597
|
checkable: "",
|
|
697
|
-
"tree-data": _ctx.list
|
|
598
|
+
"tree-data": _ctx.list,
|
|
599
|
+
onCheck: _ctx.changeTreeCheck
|
|
698
600
|
}, {
|
|
699
601
|
title: vue.withCtx(({ title, description }) => [
|
|
700
602
|
vue.createElementVNode("div", _hoisted_10, [
|
|
@@ -703,7 +605,7 @@ function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
703
605
|
])
|
|
704
606
|
]),
|
|
705
607
|
_: 1
|
|
706
|
-
}, 8, ["
|
|
608
|
+
}, 8, ["checked-keys", "tree-data", "onCheck"])
|
|
707
609
|
])) : _ctx.activeKey === 2 ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_12, [
|
|
708
610
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(_ctx.list, (item) => {
|
|
709
611
|
return vue.openBlock(), vue.createElementBlock("div", {
|
|
@@ -743,214 +645,342 @@ function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
743
645
|
])) : vue.createCommentVNode("v-if", true)
|
|
744
646
|
], 64))
|
|
745
647
|
])
|
|
746
|
-
]),
|
|
747
|
-
vue.createElementVNode("div", _hoisted_14, [
|
|
748
|
-
vue.createElementVNode("div", _hoisted_15, [
|
|
749
|
-
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(_ctx.selected, (item) => {
|
|
750
|
-
return vue.openBlock(), vue.createElementBlock("div", {
|
|
751
|
-
key: item + "checked",
|
|
752
|
-
class: "__chosen-panel-list-item"
|
|
753
|
-
}, [
|
|
754
|
-
vue.createElementVNode("span", _hoisted_16, vue.toDisplayString(_ctx.getSelectName(item)), 1),
|
|
755
|
-
vue.createVNode(_component_CloseCircleFilled, {
|
|
756
|
-
onMousedown: vue.withModifiers(($event) => _ctx.deleteOption(item), ["stop"])
|
|
757
|
-
}, null, 8, ["onMousedown"])
|
|
758
|
-
]);
|
|
759
|
-
}), 128))
|
|
760
|
-
])
|
|
761
648
|
])
|
|
762
649
|
]);
|
|
763
650
|
}
|
|
764
|
-
var VariedCmp = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sfc_render
|
|
651
|
+
var VariedCmp = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sfc_render], ["__file", "variedCmp.vue"]]);
|
|
765
652
|
|
|
766
|
-
const
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
653
|
+
const _hoisted_1 = { class: "selector-content" };
|
|
654
|
+
const _hoisted_2 = {
|
|
655
|
+
key: 3,
|
|
656
|
+
class: "__selector-chosen-panel"
|
|
770
657
|
};
|
|
771
|
-
const
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
658
|
+
const _hoisted_3 = {
|
|
659
|
+
key: 0,
|
|
660
|
+
class: "__chosen-panel-tip"
|
|
661
|
+
};
|
|
662
|
+
const _hoisted_4 = {
|
|
663
|
+
key: 0,
|
|
664
|
+
class: "__limit-tip"
|
|
665
|
+
};
|
|
666
|
+
const _hoisted_5 = { class: "__chosen-panel-list" };
|
|
667
|
+
const _hoisted_6 = { class: "__tiem-title" };
|
|
668
|
+
const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
669
|
+
__name: "staffs-selector",
|
|
670
|
+
props: selectProps,
|
|
671
|
+
emits: ["update:visible", "update:select", "change"],
|
|
672
|
+
setup(__props, { emit }) {
|
|
673
|
+
const props = __props;
|
|
674
|
+
const selected = vue.ref([]);
|
|
675
|
+
const computeSelected = vue.computed(() => {
|
|
676
|
+
let list2 = [];
|
|
677
|
+
if (props.mode === MODE.MULTIPLE) {
|
|
678
|
+
if (multipTree.value) {
|
|
679
|
+
return [...selectState.multipDepartment];
|
|
680
|
+
}
|
|
681
|
+
for (let [key, value] of Object.entries(selectState.multipleChecked)) {
|
|
682
|
+
value && list2.push(String(key));
|
|
683
|
+
}
|
|
684
|
+
return list2;
|
|
685
|
+
} else if (props.mode === MODE.VARIED) {
|
|
686
|
+
list2 = list2.concat(selectState.departmentChecked);
|
|
687
|
+
for (let [key, value] of Object.entries(selectState.staffsChecked)) {
|
|
688
|
+
value && list2.push(String(key));
|
|
689
|
+
}
|
|
690
|
+
for (let [key, value] of Object.entries(selectState.shopChecked)) {
|
|
691
|
+
value && list2.push(String(key));
|
|
692
|
+
}
|
|
693
|
+
for (let [key, value] of Object.entries(selectState.groupChecked)) {
|
|
694
|
+
value && list2.push(String(key));
|
|
695
|
+
}
|
|
696
|
+
return list2;
|
|
795
697
|
}
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
type: Boolean,
|
|
811
|
-
default: true
|
|
812
|
-
},
|
|
813
|
-
unitStr: {
|
|
814
|
-
type: String,
|
|
815
|
-
default: "\u4EBA"
|
|
698
|
+
return [];
|
|
699
|
+
});
|
|
700
|
+
const multipTree = vue.ref(false);
|
|
701
|
+
const width = vue.computed(() => {
|
|
702
|
+
if (props.mode === MODE.MULTIPLE) {
|
|
703
|
+
return 648;
|
|
704
|
+
} else if (props.mode === MODE.RADIO) {
|
|
705
|
+
return 480;
|
|
706
|
+
}
|
|
707
|
+
return 648;
|
|
708
|
+
});
|
|
709
|
+
function modalCancel() {
|
|
710
|
+
emit("update:visible", !props.visible);
|
|
711
|
+
list.value = [];
|
|
816
712
|
}
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
713
|
+
function isCurrentFetch(area) {
|
|
714
|
+
let activeKey = 0;
|
|
715
|
+
activeKey = area === "department" ? 1 : activeKey;
|
|
716
|
+
activeKey = area === "group" ? 2 : activeKey;
|
|
717
|
+
activeKey = area === "shop" ? 3 : activeKey;
|
|
718
|
+
return selectState.activeKey === activeKey;
|
|
719
|
+
}
|
|
720
|
+
function fetch(params) {
|
|
721
|
+
list.value = [];
|
|
722
|
+
if (typeof params !== "boolean") {
|
|
723
|
+
let isDepartTree = params.area === "department" || props.mode === MODE.MULTIPLE && multipTree.value;
|
|
724
|
+
if (isDepartTree && departNative.value.length) {
|
|
725
|
+
if (props.mode === MODE.VARIED && !params.searchVal || params.searchVal === "") {
|
|
726
|
+
list.value = isCurrentFetch(params.area || "") ? [...departNative.value] : [];
|
|
727
|
+
return;
|
|
728
|
+
} else {
|
|
729
|
+
let result = [];
|
|
730
|
+
let queues = [...departNative.value];
|
|
731
|
+
while (queues.length) {
|
|
732
|
+
let node = queues.shift();
|
|
733
|
+
if (node["title"] && node["title"].includes(params?.searchVal || "")) {
|
|
734
|
+
result.push({ ...node });
|
|
735
|
+
}
|
|
736
|
+
if (node.children)
|
|
737
|
+
queues.push(...node.children);
|
|
738
|
+
}
|
|
739
|
+
list.value = isCurrentFetch(params?.area || "") ? result : [];
|
|
740
|
+
return;
|
|
741
|
+
}
|
|
834
742
|
}
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
obj["parent"] = curnode && curnode.key || null;
|
|
850
|
-
return obj;
|
|
851
|
-
});
|
|
743
|
+
props.load(params).then((data) => {
|
|
744
|
+
if (data && data.length) {
|
|
745
|
+
if (params.area && params.area === "department") {
|
|
746
|
+
departNative.value = data;
|
|
747
|
+
fetch(params);
|
|
748
|
+
} else {
|
|
749
|
+
let result = data.map((item) => {
|
|
750
|
+
return item;
|
|
751
|
+
});
|
|
752
|
+
list.value = isCurrentFetch(params.area) ? result : [];
|
|
753
|
+
}
|
|
754
|
+
selectState.dataMap = flatListFunc(data);
|
|
755
|
+
} else {
|
|
756
|
+
list.value = [];
|
|
852
757
|
}
|
|
853
|
-
|
|
758
|
+
});
|
|
759
|
+
} else {
|
|
760
|
+
if (props.mode === MODE.MULTIPLE && multipTree.value) {
|
|
761
|
+
list.value = [...departNative.value];
|
|
854
762
|
}
|
|
855
|
-
state.multipTree = props.forceStatic ? false : treedata;
|
|
856
|
-
state.curlistKeys = curlistKeys;
|
|
857
|
-
return map;
|
|
858
|
-
},
|
|
859
|
-
summitSelect() {
|
|
860
|
-
if (["string", "number"].includes(typeof state.selected)) {
|
|
861
|
-
emit("update:select", [state.dataMap.get(state.selected)]);
|
|
862
|
-
} else if (state.selected instanceof Array) {
|
|
863
|
-
emit(
|
|
864
|
-
"update:select",
|
|
865
|
-
state.selected.map((item) => state.dataMap.get(item))
|
|
866
|
-
);
|
|
867
|
-
} else ;
|
|
868
|
-
state.list = [];
|
|
869
|
-
methods.modalCancel();
|
|
870
763
|
}
|
|
871
|
-
}
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
764
|
+
}
|
|
765
|
+
function flatListFunc(list2) {
|
|
766
|
+
let queue = [...list2];
|
|
767
|
+
let map = new Map(selectState.dataMap);
|
|
768
|
+
let Keys = /* @__PURE__ */ new Set();
|
|
769
|
+
let treedata = false;
|
|
770
|
+
while (queue.length) {
|
|
771
|
+
let curnode = queue.shift();
|
|
772
|
+
map.set(String(curnode.key), curnode);
|
|
773
|
+
Keys.add(String(curnode.key));
|
|
774
|
+
let children = curnode.children;
|
|
775
|
+
if (children) {
|
|
776
|
+
children = children.map((obj) => {
|
|
777
|
+
treedata = true;
|
|
778
|
+
obj["parent"] = curnode && curnode.key || null;
|
|
779
|
+
return obj;
|
|
780
|
+
});
|
|
883
781
|
}
|
|
884
|
-
|
|
885
|
-
}
|
|
886
|
-
|
|
782
|
+
queue = queue.concat(children || []);
|
|
783
|
+
}
|
|
784
|
+
multipTree.value = props.forceStatic ? false : treedata;
|
|
785
|
+
selectState.curlistKeys = Keys;
|
|
786
|
+
return map;
|
|
787
|
+
}
|
|
788
|
+
function findDataByKey(key) {
|
|
789
|
+
let data = selectState.dataMap.get(String(key));
|
|
790
|
+
if (!data) {
|
|
791
|
+
data = props.select.find(
|
|
792
|
+
(item) => String(item) === String(key) || String(item?.key) === String(key)
|
|
793
|
+
);
|
|
794
|
+
}
|
|
795
|
+
return data || "\u672A\u77E5\u6570\u636E";
|
|
796
|
+
}
|
|
797
|
+
function summitSelect() {
|
|
798
|
+
if (typeof selected.value === "string") {
|
|
799
|
+
let data = selectState.dataMap.get(String(selected.value));
|
|
800
|
+
emit("update:select", data);
|
|
801
|
+
emit("change", data);
|
|
802
|
+
} else if (props.mode === MODE.MULTIPLE) {
|
|
803
|
+
let arr = computeSelected.value.map((key) => findDataByKey(key));
|
|
804
|
+
emit("update:select", arr);
|
|
805
|
+
emit("change", arr);
|
|
806
|
+
} else if (props.mode === MODE.VARIED) {
|
|
807
|
+
let department = selectState.departmentChecked.map((key) => {
|
|
808
|
+
let data = findDataByKey(key);
|
|
809
|
+
return { ...data, area: "department" };
|
|
810
|
+
});
|
|
811
|
+
let group = [];
|
|
812
|
+
for (let key in selectState.groupChecked) {
|
|
813
|
+
let data = findDataByKey(key);
|
|
814
|
+
group.push({ ...data, area: "group" });
|
|
815
|
+
}
|
|
816
|
+
let shop = [];
|
|
817
|
+
for (let key in selectState.shopChecked) {
|
|
818
|
+
let data = findDataByKey(key);
|
|
819
|
+
shop.push({ ...data, area: "shop" });
|
|
820
|
+
}
|
|
821
|
+
let staff = [];
|
|
822
|
+
for (let key in selectState.staffsChecked) {
|
|
823
|
+
let data = findDataByKey(key);
|
|
824
|
+
staff.push({ ...data, area: "staff" });
|
|
825
|
+
}
|
|
826
|
+
let arr = [...department, ...group, ...shop, ...staff];
|
|
827
|
+
emit("update:select", arr);
|
|
828
|
+
emit("change", arr);
|
|
829
|
+
}
|
|
830
|
+
list.value = [];
|
|
831
|
+
modalCancel();
|
|
832
|
+
}
|
|
833
|
+
function getOptionName(key) {
|
|
834
|
+
let data = selectState.dataMap.get(String(key));
|
|
835
|
+
if (data && data.title)
|
|
836
|
+
return `${data.title}${data.key ? `(${data.key})` : ""}${data.description ? `-(${data.description})` : ""}`;
|
|
837
|
+
let arr = props.select;
|
|
838
|
+
arr = arr.length ? arr : [];
|
|
839
|
+
let had = arr.find(
|
|
840
|
+
(item) => String(item) === String(key) || String(item?.key) === String(key)
|
|
841
|
+
);
|
|
842
|
+
return had?.title ? `${had.title}${had.key ? `(${had.key})` : ""}${had.description ? `-(${had.description})` : ""}` : had;
|
|
843
|
+
}
|
|
844
|
+
function deleteOptions(key) {
|
|
845
|
+
if (props.mode === MODE.MULTIPLE) {
|
|
846
|
+
if (selectState.multipleChecked[String(key)]) {
|
|
847
|
+
selectState.multipleChecked[String(key)] = false;
|
|
848
|
+
} else {
|
|
849
|
+
let index = selectState.multipDepartment.findIndex(
|
|
850
|
+
(item) => String(item) === String(key)
|
|
851
|
+
);
|
|
852
|
+
index > -1 && selectState.multipDepartment.splice(index, 1);
|
|
853
|
+
}
|
|
854
|
+
} else if (props.mode === MODE.VARIED) {
|
|
855
|
+
if (selectState.staffsChecked[String(key)]) {
|
|
856
|
+
selectState.staffsChecked[String(key)] = false;
|
|
857
|
+
} else if (selectState.shopChecked[String(key)]) {
|
|
858
|
+
selectState.shopChecked[String(key)] = false;
|
|
859
|
+
} else if (selectState.groupChecked[String(key)]) {
|
|
860
|
+
selectState.groupChecked[String(key)] = false;
|
|
861
|
+
} else {
|
|
862
|
+
let index = selectState.departmentChecked.findIndex(
|
|
863
|
+
(item) => String(item) === String(key)
|
|
864
|
+
);
|
|
865
|
+
index > -1 && selectState.departmentChecked.splice(index, 1);
|
|
866
|
+
}
|
|
867
|
+
}
|
|
868
|
+
}
|
|
887
869
|
vue.watch(
|
|
888
870
|
() => props.visible,
|
|
889
871
|
(val) => {
|
|
872
|
+
if (val) {
|
|
873
|
+
if (props.mode === "radio") {
|
|
874
|
+
selected.value = "";
|
|
875
|
+
} else {
|
|
876
|
+
let arr = props.select;
|
|
877
|
+
selected.value = arr.length ? arr.map((item) => String(item?.key)) : [];
|
|
878
|
+
if (props.mode === MODE.MULTIPLE) {
|
|
879
|
+
let multipleChecked = {};
|
|
880
|
+
arr.forEach(
|
|
881
|
+
(item) => multipleChecked[String(item?.key)] = true
|
|
882
|
+
);
|
|
883
|
+
selectState.multipleChecked = multipleChecked;
|
|
884
|
+
} else if (props.mode === MODE.VARIED) {
|
|
885
|
+
let department = [];
|
|
886
|
+
let shop = {};
|
|
887
|
+
let staff = {};
|
|
888
|
+
let group = {};
|
|
889
|
+
arr.forEach((item) => {
|
|
890
|
+
if (item["area"] && item["area"] === "department")
|
|
891
|
+
department.push(String(item?.key));
|
|
892
|
+
else if (item["area"] && item["area"] === "shop")
|
|
893
|
+
shop[String(item?.key)] = true;
|
|
894
|
+
else if (item["area"] && item["area"] === "staff")
|
|
895
|
+
staff[String(item?.key)] = true;
|
|
896
|
+
else if (item["area"] && item["area"] === "group")
|
|
897
|
+
group[String(item?.key)] = true;
|
|
898
|
+
});
|
|
899
|
+
selectState.departmentChecked = department;
|
|
900
|
+
selectState.shopChecked = shop;
|
|
901
|
+
selectState.staffsChecked = staff;
|
|
902
|
+
selectState.groupChecked = group;
|
|
903
|
+
}
|
|
904
|
+
}
|
|
905
|
+
} else {
|
|
906
|
+
selected.value = [];
|
|
907
|
+
selectState.multipleChecked = {};
|
|
908
|
+
selectState.departmentChecked = [];
|
|
909
|
+
selectState.shopChecked = {};
|
|
910
|
+
selectState.staffsChecked = {};
|
|
911
|
+
selectState.groupChecked = {};
|
|
912
|
+
selectState.activeKey = 0;
|
|
913
|
+
}
|
|
890
914
|
if (val && props.immediateFetch) {
|
|
891
|
-
|
|
915
|
+
fetch({});
|
|
892
916
|
}
|
|
893
917
|
},
|
|
894
|
-
{ immediate: true }
|
|
918
|
+
{ immediate: true, deep: true }
|
|
895
919
|
);
|
|
896
|
-
return {
|
|
897
|
-
|
|
898
|
-
|
|
920
|
+
return (_ctx, _cache) => {
|
|
921
|
+
return vue.openBlock(), vue.createBlock(vue.unref(AModal__default["default"]), {
|
|
922
|
+
class: "staffs-selector-modal",
|
|
923
|
+
title: _ctx.title,
|
|
924
|
+
visible: _ctx.visible,
|
|
925
|
+
width: vue.unref(width),
|
|
926
|
+
"ok-text": "\u786E\u5B9A",
|
|
927
|
+
"cancel-text": "\u53D6\u6D88",
|
|
928
|
+
"destroy-on-close": true,
|
|
929
|
+
onCancel: modalCancel,
|
|
930
|
+
onOk: summitSelect
|
|
931
|
+
}, {
|
|
932
|
+
default: vue.withCtx(() => [
|
|
933
|
+
vue.createElementVNode("div", _hoisted_1, [
|
|
934
|
+
_ctx.mode === "radio" ? (vue.openBlock(), vue.createBlock(radioCmp, {
|
|
935
|
+
key: 0,
|
|
936
|
+
selected: selected.value,
|
|
937
|
+
"onUpdate:selected": _cache[0] || (_cache[0] = ($event) => selected.value = $event),
|
|
938
|
+
list: vue.unref(list),
|
|
939
|
+
onFetchList: fetch
|
|
940
|
+
}, null, 8, ["selected", "list"])) : _ctx.mode === "varied" ? (vue.openBlock(), vue.createBlock(VariedCmp, {
|
|
941
|
+
key: 1,
|
|
942
|
+
selected: selected.value,
|
|
943
|
+
"onUpdate:selected": _cache[1] || (_cache[1] = ($event) => selected.value = $event),
|
|
944
|
+
list: vue.unref(list),
|
|
945
|
+
"show-count": _ctx.showCount,
|
|
946
|
+
onFetchList: fetch
|
|
947
|
+
}, null, 8, ["selected", "list", "show-count"])) : (vue.openBlock(), vue.createBlock(multipleCmp, {
|
|
948
|
+
key: 2,
|
|
949
|
+
selected: selected.value,
|
|
950
|
+
"onUpdate:selected": _cache[2] || (_cache[2] = ($event) => selected.value = $event),
|
|
951
|
+
limit: _ctx.limit,
|
|
952
|
+
list: vue.unref(list),
|
|
953
|
+
"is-tree": multipTree.value,
|
|
954
|
+
onFetchList: fetch
|
|
955
|
+
}, null, 8, ["selected", "limit", "list", "is-tree"])),
|
|
956
|
+
["multiple", "varied"].includes(_ctx.mode) ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_2, [
|
|
957
|
+
_ctx.showCount ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_3, [
|
|
958
|
+
vue.createElementVNode("span", null, "\u5DF2\u9009\u62E9" + vue.toDisplayString(vue.unref(computeSelected) && vue.unref(computeSelected).length || 0) + vue.toDisplayString(_ctx.$props.unitStr), 1),
|
|
959
|
+
_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)
|
|
960
|
+
])) : vue.createCommentVNode("v-if", true),
|
|
961
|
+
vue.createElementVNode("div", _hoisted_5, [
|
|
962
|
+
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(vue.unref(computeSelected), (item) => {
|
|
963
|
+
return vue.openBlock(), vue.createElementBlock("div", {
|
|
964
|
+
key: item + "checked",
|
|
965
|
+
class: "__chosen-panel-list-item"
|
|
966
|
+
}, [
|
|
967
|
+
vue.createElementVNode("span", _hoisted_6, vue.toDisplayString(getOptionName(item)), 1),
|
|
968
|
+
vue.createVNode(vue.unref(iconsVue.CloseCircleFilled), {
|
|
969
|
+
style: { "color": "#ced1d9" },
|
|
970
|
+
onMousedown: vue.withModifiers(($event) => deleteOptions(item), ["stop"])
|
|
971
|
+
}, null, 8, ["onMousedown"])
|
|
972
|
+
]);
|
|
973
|
+
}), 128))
|
|
974
|
+
])
|
|
975
|
+
])) : vue.createCommentVNode("v-if", true)
|
|
976
|
+
])
|
|
977
|
+
]),
|
|
978
|
+
_: 1
|
|
979
|
+
}, 8, ["title", "visible", "width"]);
|
|
899
980
|
};
|
|
900
981
|
}
|
|
901
982
|
});
|
|
902
|
-
|
|
903
|
-
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
904
|
-
const _component_radioCmp = vue.resolveComponent("radioCmp");
|
|
905
|
-
const _component_VariedCmp = vue.resolveComponent("VariedCmp");
|
|
906
|
-
const _component_multipleCmp = vue.resolveComponent("multipleCmp");
|
|
907
|
-
const _component_AModal = vue.resolveComponent("AModal");
|
|
908
|
-
return vue.openBlock(), vue.createBlock(_component_AModal, {
|
|
909
|
-
class: "staffs-selector-modal",
|
|
910
|
-
title: _ctx.title,
|
|
911
|
-
visible: _ctx.visible,
|
|
912
|
-
width: _ctx.width,
|
|
913
|
-
"ok-text": "\u786E\u5B9A",
|
|
914
|
-
"cancel-text": "\u53D6\u6D88",
|
|
915
|
-
"destroy-on-close": true,
|
|
916
|
-
onCancel: _ctx.modalCancel,
|
|
917
|
-
onOk: _ctx.summitSelect
|
|
918
|
-
}, {
|
|
919
|
-
default: vue.withCtx(() => [
|
|
920
|
-
vue.createElementVNode("div", _hoisted_1, [
|
|
921
|
-
_ctx.mode === "radio" ? (vue.openBlock(), vue.createBlock(_component_radioCmp, {
|
|
922
|
-
key: 0,
|
|
923
|
-
selected: _ctx.selected,
|
|
924
|
-
"onUpdate:selected": _cache[0] || (_cache[0] = ($event) => _ctx.selected = $event),
|
|
925
|
-
list: _ctx.list,
|
|
926
|
-
onFetchList: _ctx.fetch
|
|
927
|
-
}, null, 8, ["selected", "list", "onFetchList"])) : _ctx.mode === "varied" ? (vue.openBlock(), vue.createBlock(_component_VariedCmp, {
|
|
928
|
-
key: 1,
|
|
929
|
-
selected: _ctx.selected,
|
|
930
|
-
"onUpdate:selected": _cache[1] || (_cache[1] = ($event) => _ctx.selected = $event),
|
|
931
|
-
list: _ctx.list,
|
|
932
|
-
"curlist-keys": _ctx.curlistKeys,
|
|
933
|
-
"data-map": _ctx.dataMap,
|
|
934
|
-
onFetchList: _ctx.fetch
|
|
935
|
-
}, null, 8, ["selected", "list", "curlist-keys", "data-map", "onFetchList"])) : (vue.openBlock(), vue.createBlock(_component_multipleCmp, {
|
|
936
|
-
key: 2,
|
|
937
|
-
selected: _ctx.selected,
|
|
938
|
-
"onUpdate:selected": _cache[2] || (_cache[2] = ($event) => _ctx.selected = $event),
|
|
939
|
-
limit: _ctx.limit,
|
|
940
|
-
list: _ctx.list,
|
|
941
|
-
"curlist-keys": _ctx.curlistKeys,
|
|
942
|
-
"is-tree": _ctx.multipTree,
|
|
943
|
-
"data-map": _ctx.dataMap,
|
|
944
|
-
"show-count": _ctx.showCount,
|
|
945
|
-
"unit-str": _ctx.unitStr,
|
|
946
|
-
onFetchList: _ctx.fetch
|
|
947
|
-
}, null, 8, ["selected", "limit", "list", "curlist-keys", "is-tree", "data-map", "show-count", "unit-str", "onFetchList"]))
|
|
948
|
-
])
|
|
949
|
-
]),
|
|
950
|
-
_: 1
|
|
951
|
-
}, 8, ["title", "visible", "width", "onCancel", "onOk"]);
|
|
952
|
-
}
|
|
953
|
-
var staffsSelector = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "staffs-selector.vue"]]);
|
|
983
|
+
var staffsSelector = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "staffs-selector.vue"]]);
|
|
954
984
|
|
|
955
985
|
const BmStaffsSelector = withInstall.withInstall(staffsSelector);
|
|
956
986
|
|