cd-personselector 1.3.4 → 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.mjs CHANGED
@@ -1,23 +1,23 @@
1
- import { defineComponent as ge, ref as y, computed as A, watch as H, resolveComponent as x, openBlock as l, createBlock as E, withCtx as N, createElementVNode as p, createElementBlock as c, createVNode as S, Fragment as G, renderList as te, createCommentVNode as _, normalizeClass as ee, withModifiers as _e, toDisplayString as f, createTextVNode as oe, nextTick as Ne, normalizeStyle as Te } from "vue";
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
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" }, De = { class: "cd-ps-content" }, Oe = { class: "cd-ps-left" }, Pe = {
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
- }, Re = {
11
+ }, Le = {
12
12
  key: 1,
13
13
  class: "cd-ps-empty"
14
- }, We = {
14
+ }, Re = {
15
15
  key: 2,
16
16
  class: "cd-ps-result-list"
17
- }, Ee = ["onClick"], Le = { class: "cd-ps-info" }, Me = { class: "cd-ps-name" }, Ae = { class: "cd-ps-meta" }, je = {
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
- }, Je = { key: 1 }, Fe = { key: 2 }, qe = { key: 3 }, Ge = { key: 4 }, He = {
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 we = { class: "cd-ps-container" }, ze = {
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" }, st = {
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
- }, lt = {
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" }, it = { class: "cd-ps-name" }, ct = { class: "cd-ps-meta" }, dt = { key: 0 }, rt = { key: 1 }, ut = { key: 2 }, pt = { key: 3 }, vt = /* @__PURE__ */ ge({
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,347 +49,348 @@ const we = { class: "cd-ps-container" }, ze = {
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(b, { expose: Q, emit: C }) {
53
- var fe, me;
54
- const r = b, V = C, T = y(r.visible), U = y(((me = (fe = r.tabs) == null ? void 0 : fe[0]) == null ? void 0 : me.key) || ""), w = y(null), W = y(""), v = y([]), I = y(/* @__PURE__ */ new Map()), X = y({}), j = y(!1), F = y(!1), D = y({}), ie = A(() => r.tabs || []), ae = A(() => r.organizations || []);
55
- A(() => r.tips || "");
56
- const ce = A(() => r.showSearch), L = A(() => r.showOrg), de = A(() => r.dialogWidth), R = y({});
57
- H(() => r.tabs, (t) => {
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
- }), R.value = e, (!U.value || !t.find((s) => s.key === U.value)) && (U.value = t[0].key);
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 (r.modelValue && r.modelValue.length > 0) {
67
- const t = r.modelValue[0];
68
- typeof t == "object" && t !== null && "id" in t ? (v.value = r.modelValue.map((e) => e.id), I.value.clear(), r.modelValue.forEach((e) => {
69
- I.value.set(e.id, e);
70
- })) : v.value = [...r.modelValue];
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 = [], I.value.clear();
72
+ v.value = [], S.value.clear();
73
73
  }
74
- H(() => r.modelValue, (t) => {
75
- T.value && t && se();
76
- }, { deep: !0 }), H(() => r.visible, (t) => {
77
- T.value = t, t && (se(), r.organizations.length > 0 && !w.value && (w.value = r.organizations[0].id));
78
- }), H(T, (t) => {
79
- V("update:visible", t);
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
- function re(t, e) {
81
+ function ue(t, e) {
82
82
  e && (X.value[t] = e);
83
83
  }
84
84
  function Y(t, e) {
85
85
  for (const s of t) {
86
86
  if (s.id === e) return s;
87
87
  if (s.children) {
88
- const u = Y(s.children, e);
89
- if (u) return u;
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 = A(() => v.value.map((t) => I.value.get(t)).filter(Boolean));
95
- function le(t, e) {
96
- v.value.includes(t) || v.value.push(t), I.value.set(t, e);
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 a(t) {
99
- v.value = v.value.filter((e) => e !== t), I.value.delete(t);
98
+ function Z(t) {
99
+ v.value = v.value.filter((e) => e !== t), S.value.delete(t);
100
100
  }
101
- const i = (t) => {
101
+ const a = (t) => {
102
102
  var s;
103
- if (!j.value) return t.name;
104
- const e = ((s = D.value[t.key]) == null ? void 0 : s.length) ?? 0;
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
- }, k = (t) => {
107
- j.value || (W.value = "", V("tab-change", { tabKey: t }));
108
- }, O = (t) => {
106
+ }, o = (t) => {
107
+ R.value || (L.value = "", C("tab-change", { tabKey: t }));
108
+ }, z = (t) => {
109
109
  const e = {};
110
- r.tabs.forEach((u) => {
111
- e[u.key] = [];
112
- }), R.value = e;
110
+ u.tabs.forEach((r) => {
111
+ e[r.key] = [];
112
+ }), P.value = e;
113
113
  const s = () => {
114
114
  };
115
- V("org-change", { orgId: t, tabKey: U.value, callback: s });
115
+ C("org-change", { orgId: t, tabKey: V.value, callback: s });
116
116
  };
117
117
  let $ = null;
118
- const P = () => {
119
- if ($ && clearTimeout($), !W.value.trim()) {
120
- ne();
118
+ const A = () => {
119
+ if ($ && clearTimeout($), !L.value.trim()) {
120
+ l();
121
121
  return;
122
122
  }
123
- j.value = !0, F.value = !0, $ = setTimeout(() => n(), 300);
124
- }, n = () => {
125
- D.value = {};
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((u) => {
129
- const m = { ...u, isUser: u.isUser !== !1 }, z = u.nodeType || (u.isUser !== !1 ? "user" : "department");
130
- s[z] || (s[z] = []), s[z].push(m);
131
- }), D.value = s, F.value = !1;
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
- V("search", { keyword: W.value, orgId: w.value || void 0, callback: t });
134
- }, ne = () => {
135
- $ && (clearTimeout($), $ = null), j.value = !1, W.value = "", D.value = {}, F.value = !1;
136
- }, be = (t) => {
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
- a(t.id);
138
+ Z(t.id);
139
139
  else {
140
- r.multiple || (v.value = [], I.value.clear());
140
+ u.multiple || (v.value = [], S.value.clear());
141
141
  const s = t.isUser ? "搜索结果" : t.isPost ? "职位" : "部门";
142
- le(t.id, { ...t, typeName: s, orgId: w.value }), r.multiple || ue();
142
+ ne(t.id, { ...t, typeName: s, orgId: N.value }), u.multiple || pe();
143
143
  }
144
144
  };
145
- function Ce(t) {
146
- const e = [], s = (u) => {
147
- for (const m of u)
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 Ve = (t, e) => {
153
- var B, g;
152
+ const Ue = (t, e) => {
153
+ var B, _;
154
154
  const s = e == null ? void 0 : e.node;
155
155
  if (s) {
156
- const h = s.value ?? ((B = s.data) == null ? void 0 : B.id);
157
- if (h !== void 0) {
156
+ const f = s.value ?? ((B = s.data) == null ? void 0 : B.id);
157
+ if (f !== void 0) {
158
158
  if (s.checked) {
159
- r.multiple || (v.value = [], I.value.clear());
160
- const q = r.tabs.find((K) => K.key === U.value), Z = q ? q.name.replace(/^按/, "") : "";
161
- le(h, { ...s.data, typeName: Z, orgId: w.value }), !r.multiple && ((g = s.data) != null && g.isUser) && ue();
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
- a(h);
163
+ Z(f);
164
164
  return;
165
165
  }
166
166
  }
167
- const u = R.value[U.value] || [], m = Ce(u), z = v.value.filter((h) => !m.includes(h));
168
- v.value = [...z, ...t];
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 ve(t, e, s) {
171
- for (const u of t) {
172
- if (u.id === e)
173
- return u.children = u.children || [], u.children.push(...s), u.loaded = !0, !0;
174
- if (u.children && ve(u.children, e, s))
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 Ue(t, e) {
180
- var z;
181
- const s = t.value, u = X.value[e];
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 = R.value[e];
183
+ const B = P.value[e];
184
184
  if (B) {
185
- const g = Y(B, s);
186
- g && g.children && (g.children = g.children.filter((h) => !h.isUser));
185
+ const _ = Y(B, s);
186
+ _ && _.children && (_.children = _.children.filter((f) => !f.isUser));
187
187
  }
188
- u && (((z = u.getItem(s)) == null ? void 0 : z.children) || []).filter((h) => {
189
- var M;
190
- return (M = h.data) == null ? void 0 : M.isUser;
191
- }).forEach((h) => {
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
+ }).forEach((f) => {
192
192
  try {
193
- u.remove(h.value);
193
+ r.remove(f.value);
194
194
  } catch {
195
195
  }
196
196
  }), t.data.loaded = !1;
197
197
  }
198
- V("load-users", { tabKey: e, nodeId: s, node: t, callback: async (B) => {
198
+ C("load-users", { tabKey: e, nodeId: s, node: t, callback: async (B) => {
199
199
  if (B.length > 0) {
200
- const g = B.map((M) => {
201
- const { id: q, name: Z, ...K } = M;
202
- return { ...K, id: q, name: M.displayName || Z, isUser: !0 };
203
- }), h = R.value[e];
204
- if (h && ve(h, s, g), u) {
205
- u.appendTo(s, g), t.data.loaded = !0, await Ne();
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
- u.setItem(s, { expanded: !0 });
207
+ r.setItem(s, { expanded: !0 });
208
208
  } catch {
209
209
  }
210
210
  }
211
211
  } else {
212
212
  t.data.loaded = !0;
213
- const g = R.value[e];
214
- if (g) {
215
- const h = Y(g, s);
216
- h && (h.loaded = !0);
213
+ const _ = P.value[e];
214
+ if (_) {
215
+ const f = Y(_, s);
216
+ f && (f.loaded = !0);
217
217
  }
218
218
  }
219
219
  } });
220
220
  }
221
- const Se = (t) => {
222
- a(t);
223
- }, he = () => {
224
- v.value = [], I.value.clear();
225
- }, ue = () => {
226
- V("update:modelValue", v.value), V("confirm", J.value), T.value = !1;
227
- }, Ie = () => {
228
- T.value = !1;
221
+ const Ie = (t) => {
222
+ Z(t);
223
+ }, fe = () => {
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
- clearSelection: he,
231
+ clearSelection: fe,
232
232
  appendUsers: (t, e, s) => {
233
- const u = X.value[t];
234
- if (u && s.length > 0) {
235
- const m = s.map((z) => {
236
- const { id: B, name: g, ...h } = z;
237
- return { ...h, id: B, name: z.displayName || g, isUser: !0 };
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
- u.appendTo(e, m);
239
+ r.appendTo(e, m);
240
240
  }
241
241
  }
242
242
  }), (t, e) => {
243
- const s = x("t-option"), u = x("t-select"), m = x("t-icon"), z = x("t-input"), B = x("t-loading"), g = x("t-checkbox"), h = x("t-button"), M = x("t-tree"), q = x("t-tab-panel"), Z = x("t-tabs"), K = x("t-dialog");
244
- return l(), E(K, {
245
- visible: T.value,
246
- "onUpdate:visible": e[4] || (e[4] = (o) => T.value = o),
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: de.value,
248
+ width: M.value,
249
249
  footer: !0,
250
250
  placement: "center",
251
251
  "destroy-on-close": "",
252
- onConfirm: ue,
253
- onClose: Ie
252
+ attach: "body",
253
+ onConfirm: pe,
254
+ onClose: Te
254
255
  }, {
255
- default: N(() => [
256
+ default: T(() => [
256
257
  p("div", we, [
257
- ce.value ? (l(), c("div", ze, [
258
- L.value && ae.value.length > 0 ? (l(), c("div", $e, [
259
- S(u, {
260
- modelValue: w.value,
261
- "onUpdate:modelValue": e[0] || (e[0] = (o) => w.value = o),
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: O
265
+ onChange: z
265
266
  }, {
266
- default: N(() => [
267
- (l(!0), c(G, null, te(ae.value, (o) => (l(), E(s, {
268
- key: o.id,
269
- value: o.id,
270
- label: o.displayName || o.name
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
- ])) : _("", !0),
276
+ ])) : g("", !0),
276
277
  p("div", Be, [
277
- S(z, {
278
- modelValue: W.value,
279
- "onUpdate:modelValue": e[1] || (e[1] = (o) => W.value = o),
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: P,
284
- onClear: ne
284
+ onInput: A,
285
+ onClear: l
285
286
  }, {
286
- "prefix-icon": N(() => [
287
- S(m, { name: "search" })
287
+ "prefix-icon": T(() => [
288
+ U(m, { name: "search" })
288
289
  ]),
289
290
  _: 1
290
291
  }, 8, ["modelValue"])
291
292
  ])
292
- ])) : _("", !0),
293
- p("div", De, [
294
- p("div", Oe, [
295
- S(Z, {
296
- modelValue: U.value,
297
- "onUpdate:modelValue": e[3] || (e[3] = (o) => U.value = o),
298
- onChange: k
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: N(() => [
301
- (l(!0), c(G, null, te(ie.value, (o) => (l(), E(q, {
302
- key: o.key,
303
- value: o.key,
304
- label: i(o)
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: N(() => {
307
- var pe;
307
+ default: T(() => {
308
+ var ve;
308
309
  return [
309
- j.value ? (l(), c(G, { key: 0 }, [
310
- F.value ? (l(), c("div", Pe, [
311
- S(B),
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
- ])) : !D.value[o.key] || D.value[o.key].length === 0 ? (l(), c("div", Re, [
314
- S(m, {
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
- ])) : (l(), c("div", We, [
321
- (l(!0), c(G, null, te(D.value[o.key], (d) => (l(), c("div", {
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: ee(["cd-ps-result-item", { "cd-ps-selected": v.value.includes(d.id), "cd-ps-dept-result": !d.isUser }]),
324
- onClick: (xe) => be(d)
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
- S(g, {
327
+ U(_, {
327
328
  checked: v.value.includes(d.id),
328
- onClick: e[2] || (e[2] = _e(() => {
329
+ onClick: e[2] || (e[2] = ge(() => {
329
330
  }, ["stop"]))
330
331
  }, null, 8, ["checked"]),
331
332
  p("div", {
332
- class: ee(["cd-ps-avatar", { "cd-ps-avatar-dept": !d.isUser }])
333
+ class: te(["cd-ps-avatar", { "cd-ps-avatar-dept": !d.isUser }])
333
334
  }, [
334
- S(m, {
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", Le, [
339
- p("div", Me, f(d.displayName || d.name), 1),
340
- p("div", Ae, [
341
- d.isUser ? _("", !0) : (l(), c("span", je, f(d.isPost ? "职位" : "部门"), 1)),
342
- d.position ? (l(), c("span", Je, f(d.position), 1)) : _("", !0),
343
- d.department ? (l(), c("span", Fe, f(d.department), 1)) : _("", !0),
344
- d.phone ? (l(), c("span", qe, f(d.phone), 1)) : _("", !0),
345
- d.userCount ? (l(), c("span", Ge, f(d.userCount) + "人", 1)) : _("", !0)
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)) : (l(), c("div", He, [
351
- ((pe = R.value[o.key]) == null ? void 0 : pe.length) > 0 ? (l(), E(M, {
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) => re(o.key, d),
355
- data: R.value[o.key],
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: Ve
362
+ onChange: Ue
362
363
  }, {
363
- label: N(({ node: d }) => [
364
+ label: T(({ node: d }) => [
364
365
  p("div", {
365
- class: ee(["cd-ps-node", { "cd-ps-node-user": d.data.isUser }])
366
+ class: te(["cd-ps-node", { "cd-ps-node-user": d.data.isUser }])
366
367
  }, [
367
- S(m, {
368
- name: d.data.isUser ? "user" : o.icon || "folder"
368
+ U(m, {
369
+ name: d.data.isUser ? "user" : c.icon || "folder"
369
370
  }, null, 8, ["name"]),
370
371
  p("span", Qe, [
371
- oe(f(d.label) + " ", 1),
372
- d.data.isUser && d.data.position ? (l(), c("span", Xe, f(d.data.position), 1)) : _("", !0)
372
+ oe(h(d.label) + " ", 1),
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 ? (l(), c("span", Ye, "(" + f(d.data.userCount) + ")", 1)) : _("", !0),
375
- d.data.isUser ? _("", !0) : (l(), E(h, {
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: _e((xe) => Ue(d, o.key), ["stop"])
381
+ onClick: ge((xe) => Se(d, c.key), ["stop"])
381
382
  }, {
382
- default: N(() => [
383
- oe(f(d.data.loaded ? "刷新人员" : "显示人员"), 1)
383
+ default: T(() => [
384
+ oe(h(d.data.loaded ? "刷新人员" : "显示人员"), 1)
384
385
  ]),
385
386
  _: 2
386
387
  }, 1032, ["onClick"]))
387
388
  ], 2)
388
389
  ]),
389
390
  _: 2
390
- }, 1032, ["data", "value"])) : (l(), c("div", Ze, [
391
- S(m, {
392
- name: o.icon || "folder-open",
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"]),
@@ -407,58 +408,58 @@ const we = { class: "cd-ps-container" }, ze = {
407
408
  p("div", Ke, [
408
409
  p("div", et, [
409
410
  e[9] || (e[9] = p("span", { class: "cd-ps-title" }, "已选择", -1)),
410
- p("span", tt, f(J.value.length) + " 项", 1),
411
- J.value.length > 0 ? (l(), E(h, {
411
+ p("span", tt, h(J.value.length) + " 项", 1),
412
+ J.value.length > 0 ? (n(), E(f, {
412
413
  key: 0,
413
414
  size: "small",
414
415
  variant: "text",
415
- onClick: he
416
+ onClick: fe
416
417
  }, {
417
- default: N(() => [...e[8] || (e[8] = [
418
+ default: T(() => [...e[8] || (e[8] = [
418
419
  oe("清空", -1)
419
420
  ])]),
420
421
  _: 1
421
- })) : _("", !0)
422
+ })) : g("", !0)
422
423
  ]),
423
424
  p("div", at, [
424
- J.value.length === 0 ? (l(), c("div", st, [
425
- S(m, {
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
- ])) : (l(), c("div", lt, [
432
- (l(!0), c(G, null, te(J.value, (o) => (l(), c("div", {
433
- key: o.id,
434
- class: ee(["cd-ps-selected-item", { "cd-ps-dept-item": !o.isUser }])
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: ee(["cd-ps-avatar", { "cd-ps-avatar-dept": !o.isUser }])
439
+ class: te(["cd-ps-avatar", { "cd-ps-avatar-dept": !c.isUser }])
439
440
  }, [
440
- S(m, {
441
- name: o.isUser ? "user" : "folder"
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", it, f(o.displayName || o.name), 1),
446
- p("div", ct, [
447
- o.isUser && o.position ? (l(), c("span", dt, f(o.position), 1)) : _("", !0),
448
- o.isUser && o.department ? (l(), c("span", rt, f(o.department), 1)) : _("", !0),
449
- o.isUser ? _("", !0) : (l(), c("span", ut, f(o.typeName || "部门"), 1)),
450
- !o.isUser && o.userCount ? (l(), c("span", pt, f(o.userCount) + "人", 1)) : _("", !0)
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
- S(h, {
455
+ U(f, {
455
456
  size: "small",
456
457
  variant: "text",
457
458
  shape: "circle",
458
- onClick: (pe) => Se(o.id)
459
+ onClick: (ve) => Ie(c.id)
459
460
  }, {
460
- icon: N(() => [
461
- S(m, { name: "close" })
461
+ icon: T(() => [
462
+ U(m, { name: "close" })
462
463
  ]),
463
464
  _: 1
464
465
  }, 8, ["onClick"])
@@ -473,12 +474,12 @@ const we = { class: "cd-ps-container" }, ze = {
473
474
  }, 8, ["visible", "width"]);
474
475
  };
475
476
  }
476
- }), ye = (b, Q) => {
477
- const C = b.__vccOpts || b;
478
- for (const [r, V] of Q)
479
- C[r] = V;
480
- return C;
481
- }, ke = /* @__PURE__ */ ye(vt, [["__scopeId", "data-v-19347ac6"]]), ht = { class: "cd-input-select" }, ft = {
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,15 +489,15 @@ const we = { class: "cd-ps-container" }, ze = {
488
489
  key: 0,
489
490
  class: "cd-input-select__option-desc"
490
491
  }, Ct = {
491
- key: 2,
492
- class: "ri-building-line cd-input-select__option-icon"
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__ */ ge({
500
+ }, St = /* @__PURE__ */ ke({
500
501
  name: "CdInputPersonSelector",
501
502
  __name: "InputSelect",
502
503
  props: {
@@ -508,20 +509,30 @@ const we = { class: "cd-ps-container" }, ze = {
508
509
  showOrg: { type: Boolean }
509
510
  },
510
511
  emits: ["update:modelValue", "search", "load-users", "tab-change"],
511
- setup(b, { emit: Q }) {
512
- const C = b, r = Q, V = y(!1), T = y([]), U = y(!1), w = y([]), W = y([]), v = y(!1), I = y(""), X = A(() => C.modelValue.map((a) => ({
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) => ({
513
514
  label: a.name,
514
515
  value: a.id
515
- }))), j = (a) => a ? a.substring(0, 2).toUpperCase() : "", F = (a) => {
516
- const i = ["#1890ff", "#52c41a", "#faad14", "#f5222d", "#722ed1", "#13c2c2", "#eb2f96", "#fa8c16"];
517
- let k = 0;
518
- for (let O = 0; O < a.length; O++)
519
- k = a.charCodeAt(O) + ((k << 5) - k);
520
- return i[Math.abs(k) % i.length];
521
- }, D = (a) => String(a).startsWith("dept-"), ie = (a) => {
522
- const i = String(a);
523
- return i.startsWith("dept-") ? "warning" : i.startsWith("u-") ? "primary" : i.startsWith("pos-") ? "success" : i.startsWith("role-") ? "info" : "default";
524
- }, ae = (a) => C.modelValue.some((i) => i.id === a), ce = (a) => ({
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) => ({
525
536
  id: a.id,
526
537
  name: a.displayName || a.name || a.title || String(a.id),
527
538
  avatar: a.avatar || "",
@@ -529,55 +540,55 @@ const we = { class: "cd-ps-container" }, ze = {
529
540
  position: a.position || "",
530
541
  phone: a.phone || "",
531
542
  isUser: a.isUser !== !1
532
- }), L = (a) => {
533
- r("update:modelValue", a), W.value = a;
534
- }, de = (a) => {
535
- a || (T.value = [], I.value = "");
536
- }, R = (a, i) => {
537
- a ? C.multiple ? L([...C.modelValue, i]) : (L([i]), v.value = !1) : L(C.modelValue.filter((k) => k.id !== i.id));
538
- }, se = (a, i) => {
539
- const { trigger: k, index: O } = i;
540
- if ((k === "tag-remove" || k === "backspace") && (v.value = !1), k === "clear")
541
- w.value = [], L([]);
542
- else if (["tag-remove", "backspace"].includes(k)) {
543
- const $ = a.map((n) => n.value || n);
544
- w.value = $;
545
- const P = [...C.modelValue];
546
- P.splice(O, 1), L(P);
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);
547
558
  }
548
- }, re = (a) => {
549
- a.stopPropagation(), a.preventDefault(), v.value = !1, U.value = !0;
550
559
  }, Y = (a) => {
551
- const i = a.map(ce), k = new Set(C.modelValue.map((P) => P.id)), O = i.filter((P) => !k.has(P.id)), $ = C.multiple ? [...C.modelValue, ...O] : i.slice(0, 1);
552
- L($), U.value = !1;
560
+ a.stopPropagation(), a.preventDefault(), v.value = !1, V.value = !0;
553
561
  }, J = (a) => {
554
- r("load-users", a);
555
- }, le = (a) => {
556
- r("search", { keyword: a.keyword, callback: a.callback });
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 });
557
568
  };
558
- return H(() => C.modelValue, (a) => {
559
- w.value = a.map((i) => i.id), W.value = a;
560
- }, { immediate: !0, deep: !0 }), H(I, (a) => {
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) => {
561
572
  if (!(a != null && a.trim())) {
562
- T.value = [], V.value = !1;
573
+ x.value = [], C.value = !1;
563
574
  return;
564
575
  }
565
- V.value = !0, r("search", {
576
+ C.value = !0, u("search", {
566
577
  keyword: a,
567
- callback: (i) => {
568
- T.value = i, V.value = !1, i.length > 0 && (v.value = !0);
578
+ callback: (o) => {
579
+ x.value = o, C.value = !1, o.length > 0 && (v.value = !0);
569
580
  }
570
581
  });
571
- }), (a, i) => {
572
- var P;
573
- const k = x("t-checkbox"), O = x("t-tag"), $ = x("t-select-input");
574
- return l(), c("div", ht, [
575
- S($, {
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, {
576
587
  value: X.value,
577
- inputValue: I.value,
578
- "onUpdate:inputValue": i[0] || (i[0] = (n) => I.value = n),
588
+ inputValue: S.value,
589
+ "onUpdate:inputValue": o[0] || (o[0] = (l) => S.value = l),
579
590
  "popup-visible": v.value,
580
- "onUpdate:popupVisible": i[1] || (i[1] = (n) => v.value = n),
591
+ "onUpdate:popupVisible": o[1] || (o[1] = (l) => v.value = l),
581
592
  "input-props": {
582
593
  readonly: !1,
583
594
  disabled: !1
@@ -589,100 +600,103 @@ const we = { class: "cd-ps-container" }, ze = {
589
600
  overlayInnerStyle: { padding: "6px" },
590
601
  closeBtn: !0
591
602
  },
592
- placeholder: b.placeholder,
593
- loading: V.value,
603
+ placeholder: k.placeholder,
604
+ loading: C.value,
594
605
  "allow-input": "",
595
606
  clearable: "",
596
- multiple: b.multiple,
607
+ multiple: k.multiple,
597
608
  class: "cd-input-select__select",
598
- onPopupVisibleChange: de,
599
- onTagChange: se
609
+ onPopupVisibleChange: P,
610
+ onTagChange: ue
600
611
  }, {
601
- panel: N(() => [
602
- T.value.length > 0 ? (l(), c("div", ft, [
603
- (l(!0), c(G, null, te(T.value, (n) => (l(), E(k, {
604
- key: n.id,
605
- value: n.id,
606
- checked: ae(n.id),
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),
607
618
  class: "cd-input-select__option",
608
- onChange: (ne) => R(ne, n)
619
+ onChange: (re) => se(re, l)
609
620
  }, {
610
- default: N(() => [
621
+ default: T(() => [
611
622
  p("div", mt, [
612
- n.avatar ? (l(), c("div", _t, [
623
+ l.avatar ? (n(), i("div", _t, [
613
624
  p("img", {
614
- src: n.avatar,
615
- alt: n.name
625
+ src: l.avatar,
626
+ alt: l.name
616
627
  }, null, 8, gt)
617
- ])) : (l(), c("div", {
628
+ ])) : (n(), i("div", {
618
629
  key: 1,
619
630
  class: "cd-input-select__option-avatar cd-input-select__option-avatar--placeholder",
620
- style: Te({
621
- backgroundColor: D(n.id) ? "#e6f4ff" : F(n.name),
622
- color: D(n.id) ? "#0052d9" : "#fff"
631
+ style: ye({
632
+ backgroundColor: O(l.nodeType),
633
+ color: "#fff"
623
634
  })
624
- }, f(j(n.name)), 5)),
635
+ }, h(ce(l.nodeType)), 5)),
625
636
  p("div", yt, [
626
- p("div", kt, f(n.name), 1),
627
- n.department || n.position ? (l(), c("div", bt, f(n.department) + f(n.department && n.position ? " · " : "") + f(n.position), 1)) : _("", !0)
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)
628
639
  ]),
629
- D(n.id) ? (l(), c("i", Ct)) : _("", !0)
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)
630
644
  ])
631
645
  ]),
632
646
  _: 2
633
647
  }, 1032, ["value", "checked", "onChange"]))), 128))
634
- ])) : V.value ? (l(), c("div", Vt, " 搜索中... ")) : (l(), c("div", Ut, " 暂无搜索结果 "))
648
+ ])) : C.value ? (n(), i("div", Vt, " 搜索中... ")) : (n(), i("div", Ut, " 暂无搜索结果 "))
635
649
  ]),
636
- tag: N((n) => [
637
- n && n.tag ? (l(), E(O, {
650
+ tag: T((l) => [
651
+ l && l.tag ? (n(), E($, {
638
652
  key: 0,
639
- theme: ie(typeof n.tag == "object" ? n.tag.value : n.tag),
653
+ theme: le(typeof l.tag == "object" ? l.tag.value : l.tag),
640
654
  variant: "light",
641
655
  closable: !0,
642
656
  size: "medium"
643
657
  }, {
644
- default: N(() => [
645
- oe(f(typeof n.tag == "object" ? n.tag.label : n.tag), 1)
658
+ default: T(() => [
659
+ oe(h(typeof l.tag == "object" ? l.tag.label : l.tag), 1)
646
660
  ]),
647
661
  _: 2
648
- }, 1032, ["theme"])) : _("", !0)
662
+ }, 1032, ["theme"])) : g("", !0)
649
663
  ]),
650
- suffixIcon: N(() => [
664
+ suffixIcon: T(() => [
651
665
  p("i", {
652
666
  class: "ri-add-circle-line cd-input-select__add-icon",
653
- onClick: re
667
+ onClick: Y
654
668
  })
655
669
  ]),
656
670
  _: 1
657
671
  }, 8, ["value", "inputValue", "popup-visible", "placeholder", "loading", "multiple"]),
658
- (P = b.tabs) != null && P.length && U.value ? (l(), E(ke, {
672
+ (D = k.tabs) != null && D.length && V.value ? (n(), E(Ce, {
659
673
  key: 0,
660
- visible: U.value,
661
- "onUpdate:visible": i[2] || (i[2] = (n) => U.value = n),
662
- modelValue: w.value,
663
- "onUpdate:modelValue": i[3] || (i[3] = (n) => w.value = n),
664
- tabs: b.tabs,
665
- organizations: b.organizations || [],
666
- "show-org": b.showOrg !== !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,
667
681
  "show-search": !0,
668
- multiple: b.multiple,
669
- onConfirm: Y,
670
- onLoadUsers: J,
671
- onSearch: le,
672
- onTabChange: i[4] || (i[4] = (n) => r("tab-change", n)),
673
- onClose: i[5] || (i[5] = (n) => U.value = !1)
674
- }, null, 8, ["visible", "modelValue", "tabs", "organizations", "show-org", "multiple"])) : _("", !0)
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)
675
689
  ]);
676
690
  };
677
691
  }
678
- }), It = /* @__PURE__ */ ye(St, [["__scopeId", "data-v-5807a0b3"]]), Nt = {
679
- install(b) {
680
- b.component("PersonSelector", ke), b.component("CdInputPersonSelector", It);
692
+ }), It = /* @__PURE__ */ be(St, [["__scopeId", "data-v-4d47ecc1"]]), xt = {
693
+ install(k) {
694
+ k.component("PersonSelector", Ce), k.component("CdInputPersonSelector", It);
681
695
  }
682
696
  };
683
697
  export {
684
698
  It as CdInputPersonSelector,
685
699
  It as InputSelect,
686
- ke as PersonSelector,
687
- Nt as default
700
+ Ce as PersonSelector,
701
+ xt as default
688
702
  };