cd-personselector 1.3.3 → 1.3.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +1 -1
- package/dist/index.mjs +346 -330
- package/dist/src/InputSelect.vue.d.ts +9 -0
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/src/InputSelect.vue +38 -9
- package/src/PersonSelector.vue +1 -0
package/dist/index.mjs
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
const
|
|
1
|
+
import { defineComponent as ke, ref as y, computed as j, watch as H, resolveComponent as I, openBlock as n, createBlock as E, withCtx as T, createElementVNode as p, createElementBlock as i, createVNode as U, Fragment as G, renderList as ae, createCommentVNode as g, normalizeClass as te, withModifiers as ge, toDisplayString as h, createTextVNode as oe, nextTick as Ne, normalizeStyle as ye } from "vue";
|
|
2
|
+
const we = { class: "cd-ps-container" }, ze = {
|
|
3
3
|
key: 0,
|
|
4
4
|
class: "cd-ps-search"
|
|
5
|
-
},
|
|
5
|
+
}, $e = {
|
|
6
6
|
key: 0,
|
|
7
7
|
class: "cd-ps-org-select"
|
|
8
|
-
}, Be = { class: "cd-ps-search-input" },
|
|
8
|
+
}, Be = { class: "cd-ps-search-input" }, Oe = { class: "cd-ps-content" }, De = { class: "cd-ps-left" }, Pe = {
|
|
9
9
|
key: 0,
|
|
10
10
|
class: "cd-ps-loading"
|
|
11
|
-
},
|
|
11
|
+
}, Le = {
|
|
12
12
|
key: 1,
|
|
13
13
|
class: "cd-ps-empty"
|
|
14
|
-
},
|
|
14
|
+
}, Re = {
|
|
15
15
|
key: 2,
|
|
16
16
|
class: "cd-ps-result-list"
|
|
17
|
-
}, Ee = ["onClick"],
|
|
17
|
+
}, Ee = ["onClick"], Me = { class: "cd-ps-info" }, We = { class: "cd-ps-name" }, je = { class: "cd-ps-meta" }, Je = {
|
|
18
18
|
key: 0,
|
|
19
19
|
class: "cd-ps-type-tag"
|
|
20
|
-
},
|
|
20
|
+
}, Ae = { key: 1 }, Fe = { key: 2 }, qe = { key: 3 }, Ge = { key: 4 }, He = {
|
|
21
21
|
key: 1,
|
|
22
22
|
class: "cd-ps-tree"
|
|
23
23
|
}, Qe = { class: "cd-ps-node-name" }, Xe = {
|
|
@@ -29,13 +29,13 @@ const ze = { class: "cd-ps-container" }, $e = {
|
|
|
29
29
|
}, Ze = {
|
|
30
30
|
key: 1,
|
|
31
31
|
class: "cd-ps-empty"
|
|
32
|
-
}, Ke = { class: "cd-ps-right" }, et = { class: "cd-ps-right-header" }, tt = { class: "cd-ps-num" }, at = { class: "cd-ps-right-list" },
|
|
32
|
+
}, Ke = { class: "cd-ps-right" }, et = { class: "cd-ps-right-header" }, tt = { class: "cd-ps-num" }, at = { class: "cd-ps-right-list" }, lt = {
|
|
33
33
|
key: 0,
|
|
34
34
|
class: "cd-ps-empty"
|
|
35
|
-
},
|
|
35
|
+
}, st = {
|
|
36
36
|
key: 1,
|
|
37
37
|
class: "cd-ps-selected-list"
|
|
38
|
-
}, nt = { class: "cd-ps-item-info" }, ot = { class: "cd-ps-info" },
|
|
38
|
+
}, nt = { class: "cd-ps-item-info" }, ot = { class: "cd-ps-info" }, ct = { class: "cd-ps-name" }, it = { class: "cd-ps-meta" }, dt = { key: 0 }, ut = { key: 1 }, rt = { key: 2 }, pt = { key: 3 }, vt = /* @__PURE__ */ ke({
|
|
39
39
|
__name: "PersonSelector",
|
|
40
40
|
props: {
|
|
41
41
|
visible: { type: Boolean, default: !1 },
|
|
@@ -49,34 +49,34 @@ const ze = { class: "cd-ps-container" }, $e = {
|
|
|
49
49
|
multiple: { type: Boolean, default: !0 }
|
|
50
50
|
},
|
|
51
51
|
emits: ["update:visible", "update:modelValue", "confirm", "load-users", "search", "org-change", "tab-change"],
|
|
52
|
-
setup(
|
|
53
|
-
var
|
|
54
|
-
const
|
|
55
|
-
|
|
56
|
-
const
|
|
57
|
-
H(() =>
|
|
52
|
+
setup(k, { expose: Q, emit: b }) {
|
|
53
|
+
var me, _e;
|
|
54
|
+
const u = k, C = b, x = y(u.visible), V = y(((_e = (me = u.tabs) == null ? void 0 : me[0]) == null ? void 0 : _e.key) || ""), N = y(null), L = y(""), v = y([]), S = y(/* @__PURE__ */ new Map()), X = y({}), R = y(!1), F = y(!1), O = y({}), ce = j(() => u.tabs || []), le = j(() => u.organizations || []);
|
|
55
|
+
j(() => u.tips || "");
|
|
56
|
+
const ie = j(() => u.showSearch), de = j(() => u.showOrg), M = j(() => u.dialogWidth), P = y({});
|
|
57
|
+
H(() => u.tabs, (t) => {
|
|
58
58
|
if (t && t.length > 0) {
|
|
59
59
|
const e = {};
|
|
60
60
|
t.forEach((s) => {
|
|
61
61
|
e[s.key] = JSON.parse(JSON.stringify(s.tree));
|
|
62
|
-
}),
|
|
62
|
+
}), P.value = e, (!V.value || !t.find((s) => s.key === V.value)) && (V.value = t[0].key);
|
|
63
63
|
}
|
|
64
64
|
}, { immediate: !0, deep: !0 });
|
|
65
65
|
function se() {
|
|
66
|
-
if (
|
|
67
|
-
const t =
|
|
68
|
-
typeof t == "object" && t !== null && "id" in t ? (v.value =
|
|
69
|
-
|
|
70
|
-
})) : v.value = [...
|
|
66
|
+
if (u.modelValue && u.modelValue.length > 0) {
|
|
67
|
+
const t = u.modelValue[0];
|
|
68
|
+
typeof t == "object" && t !== null && "id" in t ? (v.value = u.modelValue.map((e) => e.id), S.value.clear(), u.modelValue.forEach((e) => {
|
|
69
|
+
S.value.set(e.id, e);
|
|
70
|
+
})) : v.value = [...u.modelValue];
|
|
71
71
|
} else
|
|
72
|
-
v.value = [],
|
|
72
|
+
v.value = [], S.value.clear();
|
|
73
73
|
}
|
|
74
|
-
H(() =>
|
|
75
|
-
|
|
76
|
-
}, { deep: !0 }), H(() =>
|
|
77
|
-
|
|
78
|
-
}), H(
|
|
79
|
-
|
|
74
|
+
H(() => u.modelValue, (t) => {
|
|
75
|
+
x.value && t && se();
|
|
76
|
+
}, { deep: !0 }), H(() => u.visible, (t) => {
|
|
77
|
+
x.value = t, t && (se(), u.organizations.length > 0 && !N.value && (N.value = u.organizations[0].id));
|
|
78
|
+
}), H(x, (t) => {
|
|
79
|
+
C("update:visible", t);
|
|
80
80
|
});
|
|
81
81
|
function ue(t, e) {
|
|
82
82
|
e && (X.value[t] = e);
|
|
@@ -85,301 +85,302 @@ const ze = { class: "cd-ps-container" }, $e = {
|
|
|
85
85
|
for (const s of t) {
|
|
86
86
|
if (s.id === e) return s;
|
|
87
87
|
if (s.children) {
|
|
88
|
-
const
|
|
89
|
-
if (
|
|
88
|
+
const r = Y(s.children, e);
|
|
89
|
+
if (r) return r;
|
|
90
90
|
}
|
|
91
91
|
}
|
|
92
92
|
return null;
|
|
93
93
|
}
|
|
94
|
-
const J =
|
|
95
|
-
function
|
|
96
|
-
v.value.includes(t) || v.value.push(t),
|
|
94
|
+
const J = j(() => v.value.map((t) => S.value.get(t)).filter(Boolean));
|
|
95
|
+
function ne(t, e) {
|
|
96
|
+
v.value.includes(t) || v.value.push(t), S.value.set(t, e);
|
|
97
97
|
}
|
|
98
|
-
function
|
|
99
|
-
v.value = v.value.filter((e) => e !== t),
|
|
98
|
+
function Z(t) {
|
|
99
|
+
v.value = v.value.filter((e) => e !== t), S.value.delete(t);
|
|
100
100
|
}
|
|
101
|
-
const
|
|
101
|
+
const a = (t) => {
|
|
102
102
|
var s;
|
|
103
|
-
if (!
|
|
104
|
-
const e = ((s =
|
|
103
|
+
if (!R.value) return t.name;
|
|
104
|
+
const e = ((s = O.value[t.key]) == null ? void 0 : s.length) ?? 0;
|
|
105
105
|
return e > 0 ? `${t.name} (${e})` : t.name;
|
|
106
|
-
},
|
|
107
|
-
|
|
108
|
-
},
|
|
106
|
+
}, o = (t) => {
|
|
107
|
+
R.value || (L.value = "", C("tab-change", { tabKey: t }));
|
|
108
|
+
}, z = (t) => {
|
|
109
109
|
const e = {};
|
|
110
|
-
|
|
111
|
-
e[
|
|
112
|
-
}),
|
|
110
|
+
u.tabs.forEach((r) => {
|
|
111
|
+
e[r.key] = [];
|
|
112
|
+
}), P.value = e;
|
|
113
113
|
const s = () => {
|
|
114
114
|
};
|
|
115
|
-
|
|
115
|
+
C("org-change", { orgId: t, tabKey: V.value, callback: s });
|
|
116
116
|
};
|
|
117
|
-
let
|
|
118
|
-
const
|
|
119
|
-
if (
|
|
120
|
-
|
|
117
|
+
let $ = null;
|
|
118
|
+
const A = () => {
|
|
119
|
+
if ($ && clearTimeout($), !L.value.trim()) {
|
|
120
|
+
l();
|
|
121
121
|
return;
|
|
122
122
|
}
|
|
123
|
-
|
|
124
|
-
},
|
|
125
|
-
|
|
123
|
+
R.value = !0, F.value = !0, $ = setTimeout(() => D(), 300);
|
|
124
|
+
}, D = () => {
|
|
125
|
+
O.value = {};
|
|
126
126
|
const t = (e) => {
|
|
127
127
|
const s = {};
|
|
128
|
-
e.forEach((
|
|
129
|
-
const m = { ...
|
|
130
|
-
s[
|
|
131
|
-
}),
|
|
128
|
+
e.forEach((r) => {
|
|
129
|
+
const m = { ...r, isUser: r.isUser !== !1 }, w = r.nodeType || (r.isUser !== !1 ? "user" : "department");
|
|
130
|
+
s[w] || (s[w] = []), s[w].push(m);
|
|
131
|
+
}), O.value = s, F.value = !1;
|
|
132
132
|
};
|
|
133
|
-
|
|
134
|
-
},
|
|
135
|
-
|
|
136
|
-
},
|
|
133
|
+
C("search", { keyword: L.value, orgId: N.value || void 0, callback: t });
|
|
134
|
+
}, l = () => {
|
|
135
|
+
$ && (clearTimeout($), $ = null), R.value = !1, L.value = "", O.value = {}, F.value = !1;
|
|
136
|
+
}, re = (t) => {
|
|
137
137
|
if (v.value.indexOf(t.id) > -1)
|
|
138
|
-
|
|
138
|
+
Z(t.id);
|
|
139
139
|
else {
|
|
140
|
-
|
|
140
|
+
u.multiple || (v.value = [], S.value.clear());
|
|
141
141
|
const s = t.isUser ? "搜索结果" : t.isPost ? "职位" : "部门";
|
|
142
|
-
|
|
142
|
+
ne(t.id, { ...t, typeName: s, orgId: N.value }), u.multiple || pe();
|
|
143
143
|
}
|
|
144
144
|
};
|
|
145
|
-
function
|
|
146
|
-
const e = [], s = (
|
|
147
|
-
for (const m of
|
|
145
|
+
function Ve(t) {
|
|
146
|
+
const e = [], s = (r) => {
|
|
147
|
+
for (const m of r)
|
|
148
148
|
e.push(m.id), m.children && s(m.children);
|
|
149
149
|
};
|
|
150
150
|
return s(t), e;
|
|
151
151
|
}
|
|
152
|
-
const
|
|
153
|
-
var B,
|
|
152
|
+
const Ue = (t, e) => {
|
|
153
|
+
var B, _;
|
|
154
154
|
const s = e == null ? void 0 : e.node;
|
|
155
155
|
if (s) {
|
|
156
156
|
const f = s.value ?? ((B = s.data) == null ? void 0 : B.id);
|
|
157
157
|
if (f !== void 0) {
|
|
158
158
|
if (s.checked) {
|
|
159
|
-
|
|
160
|
-
const q =
|
|
161
|
-
|
|
159
|
+
u.multiple || (v.value = [], S.value.clear());
|
|
160
|
+
const q = u.tabs.find((ee) => ee.key === V.value), K = q ? q.name.replace(/^按/, "") : "";
|
|
161
|
+
ne(f, { ...s.data, typeName: K, orgId: N.value }), !u.multiple && ((_ = s.data) != null && _.isUser) && pe();
|
|
162
162
|
} else
|
|
163
|
-
|
|
163
|
+
Z(f);
|
|
164
164
|
return;
|
|
165
165
|
}
|
|
166
166
|
}
|
|
167
|
-
const
|
|
168
|
-
v.value = [
|
|
167
|
+
const r = P.value[V.value] || [], m = Ve(r), w = v.value.filter((f) => !m.includes(f));
|
|
168
|
+
v.value = [...w, ...t];
|
|
169
169
|
};
|
|
170
|
-
function
|
|
171
|
-
for (const
|
|
172
|
-
if (
|
|
173
|
-
return
|
|
174
|
-
if (
|
|
170
|
+
function he(t, e, s) {
|
|
171
|
+
for (const r of t) {
|
|
172
|
+
if (r.id === e)
|
|
173
|
+
return r.children = r.children || [], r.children.push(...s), r.loaded = !0, !0;
|
|
174
|
+
if (r.children && he(r.children, e, s))
|
|
175
175
|
return !0;
|
|
176
176
|
}
|
|
177
177
|
return !1;
|
|
178
178
|
}
|
|
179
|
-
async function
|
|
180
|
-
var
|
|
181
|
-
const s = t.value,
|
|
179
|
+
async function Se(t, e) {
|
|
180
|
+
var w;
|
|
181
|
+
const s = t.value, r = X.value[e];
|
|
182
182
|
if (t.data.loaded) {
|
|
183
|
-
const B =
|
|
183
|
+
const B = P.value[e];
|
|
184
184
|
if (B) {
|
|
185
|
-
const
|
|
186
|
-
|
|
185
|
+
const _ = Y(B, s);
|
|
186
|
+
_ && _.children && (_.children = _.children.filter((f) => !f.isUser));
|
|
187
187
|
}
|
|
188
|
-
|
|
189
|
-
var
|
|
190
|
-
return (
|
|
188
|
+
r && (((w = r.getItem(s)) == null ? void 0 : w.children) || []).filter((f) => {
|
|
189
|
+
var W;
|
|
190
|
+
return (W = f.data) == null ? void 0 : W.isUser;
|
|
191
191
|
}).forEach((f) => {
|
|
192
192
|
try {
|
|
193
|
-
|
|
193
|
+
r.remove(f.value);
|
|
194
194
|
} catch {
|
|
195
195
|
}
|
|
196
196
|
}), t.data.loaded = !1;
|
|
197
197
|
}
|
|
198
|
-
|
|
198
|
+
C("load-users", { tabKey: e, nodeId: s, node: t, callback: async (B) => {
|
|
199
199
|
if (B.length > 0) {
|
|
200
|
-
const
|
|
201
|
-
const { id: q, name:
|
|
202
|
-
return { ...
|
|
203
|
-
}), f =
|
|
204
|
-
if (f &&
|
|
205
|
-
|
|
200
|
+
const _ = B.map((W) => {
|
|
201
|
+
const { id: q, name: K, ...ee } = W;
|
|
202
|
+
return { ...ee, id: q, name: W.displayName || K, isUser: !0 };
|
|
203
|
+
}), f = P.value[e];
|
|
204
|
+
if (f && he(f, s, _), r) {
|
|
205
|
+
r.appendTo(s, _), t.data.loaded = !0, await Ne();
|
|
206
206
|
try {
|
|
207
|
-
|
|
207
|
+
r.setItem(s, { expanded: !0 });
|
|
208
208
|
} catch {
|
|
209
209
|
}
|
|
210
210
|
}
|
|
211
211
|
} else {
|
|
212
212
|
t.data.loaded = !0;
|
|
213
|
-
const
|
|
214
|
-
if (
|
|
215
|
-
const f = Y(
|
|
213
|
+
const _ = P.value[e];
|
|
214
|
+
if (_) {
|
|
215
|
+
const f = Y(_, s);
|
|
216
216
|
f && (f.loaded = !0);
|
|
217
217
|
}
|
|
218
218
|
}
|
|
219
219
|
} });
|
|
220
220
|
}
|
|
221
|
-
const
|
|
222
|
-
|
|
221
|
+
const Ie = (t) => {
|
|
222
|
+
Z(t);
|
|
223
223
|
}, fe = () => {
|
|
224
|
-
v.value = [],
|
|
225
|
-
},
|
|
226
|
-
|
|
227
|
-
},
|
|
228
|
-
|
|
224
|
+
v.value = [], S.value.clear();
|
|
225
|
+
}, pe = () => {
|
|
226
|
+
C("update:modelValue", v.value), C("confirm", J.value), x.value = !1;
|
|
227
|
+
}, Te = () => {
|
|
228
|
+
x.value = !1;
|
|
229
229
|
};
|
|
230
230
|
return Q({
|
|
231
231
|
clearSelection: fe,
|
|
232
232
|
appendUsers: (t, e, s) => {
|
|
233
|
-
const
|
|
234
|
-
if (
|
|
235
|
-
const m = s.map((
|
|
236
|
-
const { id: B, name:
|
|
237
|
-
return { ...f, id: B, name:
|
|
233
|
+
const r = X.value[t];
|
|
234
|
+
if (r && s.length > 0) {
|
|
235
|
+
const m = s.map((w) => {
|
|
236
|
+
const { id: B, name: _, ...f } = w;
|
|
237
|
+
return { ...f, id: B, name: w.displayName || _, isUser: !0 };
|
|
238
238
|
});
|
|
239
|
-
|
|
239
|
+
r.appendTo(e, m);
|
|
240
240
|
}
|
|
241
241
|
}
|
|
242
242
|
}), (t, e) => {
|
|
243
|
-
const s =
|
|
244
|
-
return
|
|
245
|
-
visible:
|
|
246
|
-
"onUpdate:visible": e[4] || (e[4] = (
|
|
243
|
+
const s = I("t-option"), r = I("t-select"), m = I("t-icon"), w = I("t-input"), B = I("t-loading"), _ = I("t-checkbox"), f = I("t-button"), W = I("t-tree"), q = I("t-tab-panel"), K = I("t-tabs"), ee = I("t-dialog");
|
|
244
|
+
return n(), E(ee, {
|
|
245
|
+
visible: x.value,
|
|
246
|
+
"onUpdate:visible": e[4] || (e[4] = (c) => x.value = c),
|
|
247
247
|
header: "选择人员",
|
|
248
|
-
width:
|
|
248
|
+
width: M.value,
|
|
249
249
|
footer: !0,
|
|
250
250
|
placement: "center",
|
|
251
251
|
"destroy-on-close": "",
|
|
252
|
-
|
|
253
|
-
|
|
252
|
+
attach: "body",
|
|
253
|
+
onConfirm: pe,
|
|
254
|
+
onClose: Te
|
|
254
255
|
}, {
|
|
255
|
-
default:
|
|
256
|
-
p("div",
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
modelValue:
|
|
261
|
-
"onUpdate:modelValue": e[0] || (e[0] = (
|
|
256
|
+
default: T(() => [
|
|
257
|
+
p("div", we, [
|
|
258
|
+
ie.value ? (n(), i("div", ze, [
|
|
259
|
+
de.value && le.value.length > 0 ? (n(), i("div", $e, [
|
|
260
|
+
U(r, {
|
|
261
|
+
modelValue: N.value,
|
|
262
|
+
"onUpdate:modelValue": e[0] || (e[0] = (c) => N.value = c),
|
|
262
263
|
placeholder: "选择组织",
|
|
263
264
|
style: { width: "200px" },
|
|
264
|
-
onChange:
|
|
265
|
+
onChange: z
|
|
265
266
|
}, {
|
|
266
|
-
default:
|
|
267
|
-
(
|
|
268
|
-
key:
|
|
269
|
-
value:
|
|
270
|
-
label:
|
|
267
|
+
default: T(() => [
|
|
268
|
+
(n(!0), i(G, null, ae(le.value, (c) => (n(), E(s, {
|
|
269
|
+
key: c.id,
|
|
270
|
+
value: c.id,
|
|
271
|
+
label: c.displayName || c.name
|
|
271
272
|
}, null, 8, ["value", "label"]))), 128))
|
|
272
273
|
]),
|
|
273
274
|
_: 1
|
|
274
275
|
}, 8, ["modelValue"])
|
|
275
|
-
])) :
|
|
276
|
+
])) : g("", !0),
|
|
276
277
|
p("div", Be, [
|
|
277
|
-
|
|
278
|
-
modelValue:
|
|
279
|
-
"onUpdate:modelValue": e[1] || (e[1] = (
|
|
278
|
+
U(w, {
|
|
279
|
+
modelValue: L.value,
|
|
280
|
+
"onUpdate:modelValue": e[1] || (e[1] = (c) => L.value = c),
|
|
280
281
|
placeholder: "输入手机号/工号/姓名/部门/职位搜索",
|
|
281
282
|
clearable: "",
|
|
282
283
|
inputProps: { autocomplete: "off" },
|
|
283
|
-
onInput:
|
|
284
|
-
onClear:
|
|
284
|
+
onInput: A,
|
|
285
|
+
onClear: l
|
|
285
286
|
}, {
|
|
286
|
-
"prefix-icon":
|
|
287
|
-
|
|
287
|
+
"prefix-icon": T(() => [
|
|
288
|
+
U(m, { name: "search" })
|
|
288
289
|
]),
|
|
289
290
|
_: 1
|
|
290
291
|
}, 8, ["modelValue"])
|
|
291
292
|
])
|
|
292
|
-
])) :
|
|
293
|
-
p("div",
|
|
294
|
-
p("div",
|
|
295
|
-
|
|
296
|
-
modelValue:
|
|
297
|
-
"onUpdate:modelValue": e[3] || (e[3] = (
|
|
298
|
-
onChange:
|
|
293
|
+
])) : g("", !0),
|
|
294
|
+
p("div", Oe, [
|
|
295
|
+
p("div", De, [
|
|
296
|
+
U(K, {
|
|
297
|
+
modelValue: V.value,
|
|
298
|
+
"onUpdate:modelValue": e[3] || (e[3] = (c) => V.value = c),
|
|
299
|
+
onChange: o
|
|
299
300
|
}, {
|
|
300
|
-
default:
|
|
301
|
-
(
|
|
302
|
-
key:
|
|
303
|
-
value:
|
|
304
|
-
label:
|
|
301
|
+
default: T(() => [
|
|
302
|
+
(n(!0), i(G, null, ae(ce.value, (c) => (n(), E(q, {
|
|
303
|
+
key: c.key,
|
|
304
|
+
value: c.key,
|
|
305
|
+
label: a(c)
|
|
305
306
|
}, {
|
|
306
|
-
default:
|
|
307
|
-
var
|
|
307
|
+
default: T(() => {
|
|
308
|
+
var ve;
|
|
308
309
|
return [
|
|
309
|
-
|
|
310
|
-
F.value ? (
|
|
311
|
-
|
|
310
|
+
R.value ? (n(), i(G, { key: 0 }, [
|
|
311
|
+
F.value ? (n(), i("div", Pe, [
|
|
312
|
+
U(B),
|
|
312
313
|
e[5] || (e[5] = p("span", null, "搜索中...", -1))
|
|
313
|
-
])) : !
|
|
314
|
-
|
|
314
|
+
])) : !O.value[c.key] || O.value[c.key].length === 0 ? (n(), i("div", Le, [
|
|
315
|
+
U(m, {
|
|
315
316
|
name: "search",
|
|
316
317
|
size: "48px",
|
|
317
318
|
style: { color: "#ddd" }
|
|
318
319
|
}),
|
|
319
320
|
e[6] || (e[6] = p("p", null, "暂无结果", -1))
|
|
320
|
-
])) : (
|
|
321
|
-
(
|
|
321
|
+
])) : (n(), i("div", Re, [
|
|
322
|
+
(n(!0), i(G, null, ae(O.value[c.key], (d) => (n(), i("div", {
|
|
322
323
|
key: d.id,
|
|
323
|
-
class:
|
|
324
|
-
onClick: (xe) =>
|
|
324
|
+
class: te(["cd-ps-result-item", { "cd-ps-selected": v.value.includes(d.id), "cd-ps-dept-result": !d.isUser }]),
|
|
325
|
+
onClick: (xe) => re(d)
|
|
325
326
|
}, [
|
|
326
|
-
|
|
327
|
+
U(_, {
|
|
327
328
|
checked: v.value.includes(d.id),
|
|
328
|
-
onClick: e[2] || (e[2] =
|
|
329
|
+
onClick: e[2] || (e[2] = ge(() => {
|
|
329
330
|
}, ["stop"]))
|
|
330
331
|
}, null, 8, ["checked"]),
|
|
331
332
|
p("div", {
|
|
332
|
-
class:
|
|
333
|
+
class: te(["cd-ps-avatar", { "cd-ps-avatar-dept": !d.isUser }])
|
|
333
334
|
}, [
|
|
334
|
-
|
|
335
|
+
U(m, {
|
|
335
336
|
name: d.isUser ? "user" : d.isPost ? "assignment-checked" : "folder"
|
|
336
337
|
}, null, 8, ["name"])
|
|
337
338
|
], 2),
|
|
338
|
-
p("div",
|
|
339
|
-
p("div",
|
|
340
|
-
p("div",
|
|
341
|
-
d.isUser ?
|
|
342
|
-
d.position ? (
|
|
343
|
-
d.department ? (
|
|
344
|
-
d.phone ? (
|
|
345
|
-
d.userCount ? (
|
|
339
|
+
p("div", Me, [
|
|
340
|
+
p("div", We, h(d.displayName || d.name), 1),
|
|
341
|
+
p("div", je, [
|
|
342
|
+
d.isUser ? g("", !0) : (n(), i("span", Je, h(d.isPost ? "职位" : "部门"), 1)),
|
|
343
|
+
d.position ? (n(), i("span", Ae, h(d.position), 1)) : g("", !0),
|
|
344
|
+
d.department ? (n(), i("span", Fe, h(d.department), 1)) : g("", !0),
|
|
345
|
+
d.phone ? (n(), i("span", qe, h(d.phone), 1)) : g("", !0),
|
|
346
|
+
d.userCount ? (n(), i("span", Ge, h(d.userCount) + "人", 1)) : g("", !0)
|
|
346
347
|
])
|
|
347
348
|
])
|
|
348
349
|
], 10, Ee))), 128))
|
|
349
350
|
]))
|
|
350
|
-
], 64)) : (
|
|
351
|
-
((
|
|
351
|
+
], 64)) : (n(), i("div", He, [
|
|
352
|
+
((ve = P.value[c.key]) == null ? void 0 : ve.length) > 0 ? (n(), E(W, {
|
|
352
353
|
key: 0,
|
|
353
354
|
ref_for: !0,
|
|
354
|
-
ref: (d) => ue(
|
|
355
|
-
data:
|
|
355
|
+
ref: (d) => ue(c.key, d),
|
|
356
|
+
data: P.value[c.key],
|
|
356
357
|
keys: { value: "id", label: "name", children: "children" },
|
|
357
358
|
hover: "",
|
|
358
359
|
checkable: "",
|
|
359
360
|
"expand-all": !1,
|
|
360
361
|
value: v.value,
|
|
361
|
-
onChange:
|
|
362
|
+
onChange: Ue
|
|
362
363
|
}, {
|
|
363
|
-
label:
|
|
364
|
+
label: T(({ node: d }) => [
|
|
364
365
|
p("div", {
|
|
365
|
-
class:
|
|
366
|
+
class: te(["cd-ps-node", { "cd-ps-node-user": d.data.isUser }])
|
|
366
367
|
}, [
|
|
367
|
-
|
|
368
|
-
name: d.data.isUser ? "user" :
|
|
368
|
+
U(m, {
|
|
369
|
+
name: d.data.isUser ? "user" : c.icon || "folder"
|
|
369
370
|
}, null, 8, ["name"]),
|
|
370
371
|
p("span", Qe, [
|
|
371
372
|
oe(h(d.label) + " ", 1),
|
|
372
|
-
d.data.isUser && d.data.position ? (
|
|
373
|
+
d.data.isUser && d.data.position ? (n(), i("span", Xe, h(d.data.position), 1)) : g("", !0)
|
|
373
374
|
]),
|
|
374
|
-
d.data.userCount && !d.data.isUser ? (
|
|
375
|
-
d.data.isUser ?
|
|
375
|
+
d.data.userCount && !d.data.isUser ? (n(), i("span", Ye, "(" + h(d.data.userCount) + ")", 1)) : g("", !0),
|
|
376
|
+
d.data.isUser ? g("", !0) : (n(), E(f, {
|
|
376
377
|
key: 1,
|
|
377
378
|
size: "small",
|
|
378
379
|
variant: "text",
|
|
379
380
|
class: "cd-ps-load-btn",
|
|
380
|
-
onClick:
|
|
381
|
+
onClick: ge((xe) => Se(d, c.key), ["stop"])
|
|
381
382
|
}, {
|
|
382
|
-
default:
|
|
383
|
+
default: T(() => [
|
|
383
384
|
oe(h(d.data.loaded ? "刷新人员" : "显示人员"), 1)
|
|
384
385
|
]),
|
|
385
386
|
_: 2
|
|
@@ -387,9 +388,9 @@ const ze = { class: "cd-ps-container" }, $e = {
|
|
|
387
388
|
], 2)
|
|
388
389
|
]),
|
|
389
390
|
_: 2
|
|
390
|
-
}, 1032, ["data", "value"])) : (
|
|
391
|
-
|
|
392
|
-
name:
|
|
391
|
+
}, 1032, ["data", "value"])) : (n(), i("div", Ze, [
|
|
392
|
+
U(m, {
|
|
393
|
+
name: c.icon || "folder-open",
|
|
393
394
|
size: "48px",
|
|
394
395
|
style: { color: "#ddd" }
|
|
395
396
|
}, null, 8, ["name"]),
|
|
@@ -408,57 +409,57 @@ const ze = { class: "cd-ps-container" }, $e = {
|
|
|
408
409
|
p("div", et, [
|
|
409
410
|
e[9] || (e[9] = p("span", { class: "cd-ps-title" }, "已选择", -1)),
|
|
410
411
|
p("span", tt, h(J.value.length) + " 项", 1),
|
|
411
|
-
J.value.length > 0 ? (
|
|
412
|
+
J.value.length > 0 ? (n(), E(f, {
|
|
412
413
|
key: 0,
|
|
413
414
|
size: "small",
|
|
414
415
|
variant: "text",
|
|
415
416
|
onClick: fe
|
|
416
417
|
}, {
|
|
417
|
-
default:
|
|
418
|
+
default: T(() => [...e[8] || (e[8] = [
|
|
418
419
|
oe("清空", -1)
|
|
419
420
|
])]),
|
|
420
421
|
_: 1
|
|
421
|
-
})) :
|
|
422
|
+
})) : g("", !0)
|
|
422
423
|
]),
|
|
423
424
|
p("div", at, [
|
|
424
|
-
J.value.length === 0 ? (
|
|
425
|
-
|
|
425
|
+
J.value.length === 0 ? (n(), i("div", lt, [
|
|
426
|
+
U(m, {
|
|
426
427
|
name: "user-checked",
|
|
427
428
|
size: "64px",
|
|
428
429
|
style: { color: "#ddd" }
|
|
429
430
|
}),
|
|
430
431
|
e[10] || (e[10] = p("p", null, "暂无选择", -1))
|
|
431
|
-
])) : (
|
|
432
|
-
(
|
|
433
|
-
key:
|
|
434
|
-
class:
|
|
432
|
+
])) : (n(), i("div", st, [
|
|
433
|
+
(n(!0), i(G, null, ae(J.value, (c) => (n(), i("div", {
|
|
434
|
+
key: c.id,
|
|
435
|
+
class: te(["cd-ps-selected-item", { "cd-ps-dept-item": !c.isUser }])
|
|
435
436
|
}, [
|
|
436
437
|
p("div", nt, [
|
|
437
438
|
p("div", {
|
|
438
|
-
class:
|
|
439
|
+
class: te(["cd-ps-avatar", { "cd-ps-avatar-dept": !c.isUser }])
|
|
439
440
|
}, [
|
|
440
|
-
|
|
441
|
-
name:
|
|
441
|
+
U(m, {
|
|
442
|
+
name: c.isUser ? "user" : "folder"
|
|
442
443
|
}, null, 8, ["name"])
|
|
443
444
|
], 2),
|
|
444
445
|
p("div", ot, [
|
|
445
|
-
p("div",
|
|
446
|
-
p("div",
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
!
|
|
446
|
+
p("div", ct, h(c.displayName || c.name), 1),
|
|
447
|
+
p("div", it, [
|
|
448
|
+
c.isUser && c.position ? (n(), i("span", dt, h(c.position), 1)) : g("", !0),
|
|
449
|
+
c.isUser && c.department ? (n(), i("span", ut, h(c.department), 1)) : g("", !0),
|
|
450
|
+
c.isUser ? g("", !0) : (n(), i("span", rt, h(c.typeName || "部门"), 1)),
|
|
451
|
+
!c.isUser && c.userCount ? (n(), i("span", pt, h(c.userCount) + "人", 1)) : g("", !0)
|
|
451
452
|
])
|
|
452
453
|
])
|
|
453
454
|
]),
|
|
454
|
-
|
|
455
|
+
U(f, {
|
|
455
456
|
size: "small",
|
|
456
457
|
variant: "text",
|
|
457
458
|
shape: "circle",
|
|
458
|
-
onClick: (
|
|
459
|
+
onClick: (ve) => Ie(c.id)
|
|
459
460
|
}, {
|
|
460
|
-
icon:
|
|
461
|
-
|
|
461
|
+
icon: T(() => [
|
|
462
|
+
U(m, { name: "close" })
|
|
462
463
|
]),
|
|
463
464
|
_: 1
|
|
464
465
|
}, 8, ["onClick"])
|
|
@@ -473,12 +474,12 @@ const ze = { class: "cd-ps-container" }, $e = {
|
|
|
473
474
|
}, 8, ["visible", "width"]);
|
|
474
475
|
};
|
|
475
476
|
}
|
|
476
|
-
}),
|
|
477
|
-
const
|
|
478
|
-
for (const [
|
|
479
|
-
|
|
480
|
-
return
|
|
481
|
-
},
|
|
477
|
+
}), be = (k, Q) => {
|
|
478
|
+
const b = k.__vccOpts || k;
|
|
479
|
+
for (const [u, C] of Q)
|
|
480
|
+
b[u] = C;
|
|
481
|
+
return b;
|
|
482
|
+
}, Ce = /* @__PURE__ */ be(vt, [["__scopeId", "data-v-08bc0ceb"]]), ht = { class: "cd-input-select" }, ft = {
|
|
482
483
|
key: 0,
|
|
483
484
|
class: "cd-input-select__panel"
|
|
484
485
|
}, mt = { class: "cd-input-select__option-content" }, _t = {
|
|
@@ -488,39 +489,50 @@ const ze = { class: "cd-ps-container" }, $e = {
|
|
|
488
489
|
key: 0,
|
|
489
490
|
class: "cd-input-select__option-desc"
|
|
490
491
|
}, Ct = {
|
|
491
|
-
key:
|
|
492
|
-
class: "
|
|
492
|
+
key: 1,
|
|
493
|
+
class: "cd-input-select__option-desc"
|
|
493
494
|
}, Vt = {
|
|
494
495
|
key: 1,
|
|
495
496
|
class: "cd-input-select__loading"
|
|
496
497
|
}, Ut = {
|
|
497
498
|
key: 2,
|
|
498
499
|
class: "cd-input-select__empty"
|
|
499
|
-
}, St = /* @__PURE__ */
|
|
500
|
+
}, St = /* @__PURE__ */ ke({
|
|
500
501
|
name: "CdInputPersonSelector",
|
|
501
502
|
__name: "InputSelect",
|
|
502
503
|
props: {
|
|
503
504
|
modelValue: {},
|
|
504
505
|
multiple: { type: Boolean, default: !0 },
|
|
505
|
-
placeholder: { default: "
|
|
506
|
+
placeholder: { default: "搜索用户、部门、职位、岗位" },
|
|
506
507
|
tabs: {},
|
|
507
|
-
organizations: {}
|
|
508
|
+
organizations: {},
|
|
509
|
+
showOrg: { type: Boolean }
|
|
508
510
|
},
|
|
509
|
-
emits: ["update:modelValue", "search", "load-users"],
|
|
510
|
-
setup(
|
|
511
|
-
const
|
|
511
|
+
emits: ["update:modelValue", "search", "load-users", "tab-change"],
|
|
512
|
+
setup(k, { emit: Q }) {
|
|
513
|
+
const b = k, u = Q, C = y(!1), x = y([]), V = y(!1), N = y([]), L = y([]), v = y(!1), S = y(""), X = j(() => b.modelValue.map((a) => ({
|
|
512
514
|
label: a.name,
|
|
513
515
|
value: a.id
|
|
514
|
-
}))),
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
516
|
+
}))), R = {
|
|
517
|
+
department: { label: "部门", color: "#0052d9", icon: "部" },
|
|
518
|
+
user: { label: "人员", color: "#1890ff", icon: "人" },
|
|
519
|
+
post: { label: "岗位", color: "#52c41a", icon: "岗" },
|
|
520
|
+
position: { label: "职务", color: "#722ed1", icon: "职" },
|
|
521
|
+
business: { label: "商业", color: "#fa8c16", icon: "商" },
|
|
522
|
+
external: { label: "外部", color: "#eb2f96", icon: "外" }
|
|
523
|
+
}, F = (a) => {
|
|
524
|
+
var o;
|
|
525
|
+
return ((o = R[a || ""]) == null ? void 0 : o.label) || "其他";
|
|
526
|
+
}, O = (a) => {
|
|
527
|
+
var o;
|
|
528
|
+
return ((o = R[a || ""]) == null ? void 0 : o.color) || "#999";
|
|
529
|
+
}, ce = (a) => {
|
|
530
|
+
var o;
|
|
531
|
+
return ((o = R[a || ""]) == null ? void 0 : o.icon) || "?";
|
|
532
|
+
}, le = (a) => {
|
|
533
|
+
const o = String(a);
|
|
534
|
+
return o.startsWith("dept-") ? "warning" : o.startsWith("u-") ? "primary" : o.startsWith("pos-") ? "success" : o.startsWith("role-") ? "info" : "default";
|
|
535
|
+
}, ie = (a) => b.modelValue.some((o) => o.id === a), de = (a) => ({
|
|
524
536
|
id: a.id,
|
|
525
537
|
name: a.displayName || a.name || a.title || String(a.id),
|
|
526
538
|
avatar: a.avatar || "",
|
|
@@ -528,55 +540,55 @@ const ze = { class: "cd-ps-container" }, $e = {
|
|
|
528
540
|
position: a.position || "",
|
|
529
541
|
phone: a.phone || "",
|
|
530
542
|
isUser: a.isUser !== !1
|
|
531
|
-
}),
|
|
532
|
-
|
|
533
|
-
},
|
|
534
|
-
a || (
|
|
535
|
-
},
|
|
536
|
-
a ?
|
|
537
|
-
},
|
|
538
|
-
const { trigger:
|
|
539
|
-
if ((
|
|
540
|
-
|
|
541
|
-
else if (["tag-remove", "backspace"].includes(
|
|
542
|
-
const
|
|
543
|
-
|
|
544
|
-
const
|
|
545
|
-
|
|
543
|
+
}), M = (a) => {
|
|
544
|
+
u("update:modelValue", a), L.value = a;
|
|
545
|
+
}, P = (a) => {
|
|
546
|
+
a || (x.value = [], S.value = "");
|
|
547
|
+
}, se = (a, o) => {
|
|
548
|
+
a ? b.multiple ? M([...b.modelValue, o]) : (M([o]), v.value = !1) : M(b.modelValue.filter((z) => z.id !== o.id));
|
|
549
|
+
}, ue = (a, o) => {
|
|
550
|
+
const { trigger: z, index: $ } = o;
|
|
551
|
+
if ((z === "tag-remove" || z === "backspace") && (v.value = !1), z === "clear")
|
|
552
|
+
N.value = [], M([]);
|
|
553
|
+
else if (["tag-remove", "backspace"].includes(z)) {
|
|
554
|
+
const A = a.map((l) => l.value || l);
|
|
555
|
+
N.value = A;
|
|
556
|
+
const D = [...b.modelValue];
|
|
557
|
+
D.splice($, 1), M(D);
|
|
546
558
|
}
|
|
547
|
-
}, ue = (a) => {
|
|
548
|
-
a.stopPropagation(), a.preventDefault(), v.value = !1, U.value = !0;
|
|
549
559
|
}, Y = (a) => {
|
|
550
|
-
|
|
551
|
-
L(w), U.value = !1;
|
|
560
|
+
a.stopPropagation(), a.preventDefault(), v.value = !1, V.value = !0;
|
|
552
561
|
}, J = (a) => {
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
562
|
+
const o = a.map(de), z = new Set(b.modelValue.map((D) => D.id)), $ = o.filter((D) => !z.has(D.id)), A = b.multiple ? [...b.modelValue, ...$] : o.slice(0, 1);
|
|
563
|
+
M(A), V.value = !1;
|
|
564
|
+
}, ne = (a) => {
|
|
565
|
+
u("load-users", a);
|
|
566
|
+
}, Z = (a) => {
|
|
567
|
+
u("search", { keyword: a.keyword, callback: a.callback });
|
|
556
568
|
};
|
|
557
|
-
return H(() =>
|
|
558
|
-
|
|
559
|
-
}, { immediate: !0, deep: !0 }), H(
|
|
569
|
+
return H(() => b.modelValue, (a) => {
|
|
570
|
+
N.value = a.map((o) => o.id), L.value = a;
|
|
571
|
+
}, { immediate: !0, deep: !0 }), H(S, (a) => {
|
|
560
572
|
if (!(a != null && a.trim())) {
|
|
561
|
-
|
|
573
|
+
x.value = [], C.value = !1;
|
|
562
574
|
return;
|
|
563
575
|
}
|
|
564
|
-
|
|
576
|
+
C.value = !0, u("search", {
|
|
565
577
|
keyword: a,
|
|
566
|
-
callback: (
|
|
567
|
-
|
|
578
|
+
callback: (o) => {
|
|
579
|
+
x.value = o, C.value = !1, o.length > 0 && (v.value = !0);
|
|
568
580
|
}
|
|
569
581
|
});
|
|
570
|
-
}), (a,
|
|
571
|
-
var
|
|
572
|
-
const
|
|
573
|
-
return
|
|
574
|
-
|
|
582
|
+
}), (a, o) => {
|
|
583
|
+
var D;
|
|
584
|
+
const z = I("t-checkbox"), $ = I("t-tag"), A = I("t-select-input");
|
|
585
|
+
return n(), i("div", ht, [
|
|
586
|
+
U(A, {
|
|
575
587
|
value: X.value,
|
|
576
|
-
inputValue:
|
|
577
|
-
"onUpdate:inputValue":
|
|
588
|
+
inputValue: S.value,
|
|
589
|
+
"onUpdate:inputValue": o[0] || (o[0] = (l) => S.value = l),
|
|
578
590
|
"popup-visible": v.value,
|
|
579
|
-
"onUpdate:popupVisible":
|
|
591
|
+
"onUpdate:popupVisible": o[1] || (o[1] = (l) => v.value = l),
|
|
580
592
|
"input-props": {
|
|
581
593
|
readonly: !1,
|
|
582
594
|
disabled: !1
|
|
@@ -588,99 +600,103 @@ const ze = { class: "cd-ps-container" }, $e = {
|
|
|
588
600
|
overlayInnerStyle: { padding: "6px" },
|
|
589
601
|
closeBtn: !0
|
|
590
602
|
},
|
|
591
|
-
placeholder:
|
|
592
|
-
loading:
|
|
603
|
+
placeholder: k.placeholder,
|
|
604
|
+
loading: C.value,
|
|
593
605
|
"allow-input": "",
|
|
594
606
|
clearable: "",
|
|
595
|
-
multiple:
|
|
607
|
+
multiple: k.multiple,
|
|
596
608
|
class: "cd-input-select__select",
|
|
597
|
-
onPopupVisibleChange:
|
|
598
|
-
onTagChange:
|
|
609
|
+
onPopupVisibleChange: P,
|
|
610
|
+
onTagChange: ue
|
|
599
611
|
}, {
|
|
600
|
-
panel:
|
|
601
|
-
|
|
602
|
-
(
|
|
603
|
-
key:
|
|
604
|
-
value:
|
|
605
|
-
checked:
|
|
612
|
+
panel: T(() => [
|
|
613
|
+
x.value.length > 0 ? (n(), i("div", ft, [
|
|
614
|
+
(n(!0), i(G, null, ae(x.value, (l) => (n(), E(z, {
|
|
615
|
+
key: l.id,
|
|
616
|
+
value: l.id,
|
|
617
|
+
checked: ie(l.id),
|
|
606
618
|
class: "cd-input-select__option",
|
|
607
|
-
onChange: (
|
|
619
|
+
onChange: (re) => se(re, l)
|
|
608
620
|
}, {
|
|
609
|
-
default:
|
|
621
|
+
default: T(() => [
|
|
610
622
|
p("div", mt, [
|
|
611
|
-
|
|
623
|
+
l.avatar ? (n(), i("div", _t, [
|
|
612
624
|
p("img", {
|
|
613
|
-
src:
|
|
614
|
-
alt:
|
|
625
|
+
src: l.avatar,
|
|
626
|
+
alt: l.name
|
|
615
627
|
}, null, 8, gt)
|
|
616
|
-
])) : (
|
|
628
|
+
])) : (n(), i("div", {
|
|
617
629
|
key: 1,
|
|
618
630
|
class: "cd-input-select__option-avatar cd-input-select__option-avatar--placeholder",
|
|
619
|
-
style:
|
|
620
|
-
backgroundColor:
|
|
621
|
-
color:
|
|
631
|
+
style: ye({
|
|
632
|
+
backgroundColor: O(l.nodeType),
|
|
633
|
+
color: "#fff"
|
|
622
634
|
})
|
|
623
|
-
}, h(
|
|
635
|
+
}, h(ce(l.nodeType)), 5)),
|
|
624
636
|
p("div", yt, [
|
|
625
|
-
p("div", kt, h(
|
|
626
|
-
|
|
637
|
+
p("div", kt, h(l.name), 1),
|
|
638
|
+
l.isUser && (l.department || l.post) ? (n(), i("div", bt, h(l.department) + h(l.department && l.post ? " · " : "") + h(l.post), 1)) : l.fnumber ? (n(), i("div", Ct, h(l.fnumber), 1)) : g("", !0)
|
|
627
639
|
]),
|
|
628
|
-
|
|
640
|
+
p("span", {
|
|
641
|
+
class: "cd-input-select__option-tag",
|
|
642
|
+
style: ye({ backgroundColor: O(l.nodeType) + "18", color: O(l.nodeType) })
|
|
643
|
+
}, h(F(l.nodeType)), 5)
|
|
629
644
|
])
|
|
630
645
|
]),
|
|
631
646
|
_: 2
|
|
632
647
|
}, 1032, ["value", "checked", "onChange"]))), 128))
|
|
633
|
-
])) :
|
|
648
|
+
])) : C.value ? (n(), i("div", Vt, " 搜索中... ")) : (n(), i("div", Ut, " 暂无搜索结果 "))
|
|
634
649
|
]),
|
|
635
|
-
tag:
|
|
636
|
-
|
|
650
|
+
tag: T((l) => [
|
|
651
|
+
l && l.tag ? (n(), E($, {
|
|
637
652
|
key: 0,
|
|
638
|
-
theme:
|
|
653
|
+
theme: le(typeof l.tag == "object" ? l.tag.value : l.tag),
|
|
639
654
|
variant: "light",
|
|
640
655
|
closable: !0,
|
|
641
656
|
size: "medium"
|
|
642
657
|
}, {
|
|
643
|
-
default:
|
|
644
|
-
oe(h(typeof
|
|
658
|
+
default: T(() => [
|
|
659
|
+
oe(h(typeof l.tag == "object" ? l.tag.label : l.tag), 1)
|
|
645
660
|
]),
|
|
646
661
|
_: 2
|
|
647
|
-
}, 1032, ["theme"])) :
|
|
662
|
+
}, 1032, ["theme"])) : g("", !0)
|
|
648
663
|
]),
|
|
649
|
-
suffixIcon:
|
|
664
|
+
suffixIcon: T(() => [
|
|
650
665
|
p("i", {
|
|
651
666
|
class: "ri-add-circle-line cd-input-select__add-icon",
|
|
652
|
-
onClick:
|
|
667
|
+
onClick: Y
|
|
653
668
|
})
|
|
654
669
|
]),
|
|
655
670
|
_: 1
|
|
656
671
|
}, 8, ["value", "inputValue", "popup-visible", "placeholder", "loading", "multiple"]),
|
|
657
|
-
(
|
|
672
|
+
(D = k.tabs) != null && D.length && V.value ? (n(), E(Ce, {
|
|
658
673
|
key: 0,
|
|
659
|
-
visible:
|
|
660
|
-
"onUpdate:visible":
|
|
661
|
-
modelValue:
|
|
662
|
-
"onUpdate:modelValue":
|
|
663
|
-
tabs:
|
|
664
|
-
organizations:
|
|
665
|
-
"show-org": !1,
|
|
674
|
+
visible: V.value,
|
|
675
|
+
"onUpdate:visible": o[2] || (o[2] = (l) => V.value = l),
|
|
676
|
+
modelValue: N.value,
|
|
677
|
+
"onUpdate:modelValue": o[3] || (o[3] = (l) => N.value = l),
|
|
678
|
+
tabs: k.tabs,
|
|
679
|
+
organizations: k.organizations || [],
|
|
680
|
+
"show-org": k.showOrg !== !1,
|
|
666
681
|
"show-search": !0,
|
|
667
|
-
multiple:
|
|
668
|
-
onConfirm:
|
|
669
|
-
onLoadUsers:
|
|
670
|
-
onSearch:
|
|
671
|
-
|
|
672
|
-
|
|
682
|
+
multiple: k.multiple,
|
|
683
|
+
onConfirm: J,
|
|
684
|
+
onLoadUsers: ne,
|
|
685
|
+
onSearch: Z,
|
|
686
|
+
onTabChange: o[4] || (o[4] = (l) => u("tab-change", l)),
|
|
687
|
+
onClose: o[5] || (o[5] = (l) => V.value = !1)
|
|
688
|
+
}, null, 8, ["visible", "modelValue", "tabs", "organizations", "show-org", "multiple"])) : g("", !0)
|
|
673
689
|
]);
|
|
674
690
|
};
|
|
675
691
|
}
|
|
676
|
-
}), It = /* @__PURE__ */
|
|
677
|
-
install(
|
|
678
|
-
|
|
692
|
+
}), It = /* @__PURE__ */ be(St, [["__scopeId", "data-v-4d47ecc1"]]), xt = {
|
|
693
|
+
install(k) {
|
|
694
|
+
k.component("PersonSelector", Ce), k.component("CdInputPersonSelector", It);
|
|
679
695
|
}
|
|
680
696
|
};
|
|
681
697
|
export {
|
|
682
698
|
It as CdInputPersonSelector,
|
|
683
699
|
It as InputSelect,
|
|
684
|
-
|
|
685
|
-
|
|
700
|
+
Ce as PersonSelector,
|
|
701
|
+
xt as default
|
|
686
702
|
};
|