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.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 h, createTextVNode as oe, nextTick as Ne, normalizeStyle as Te } from "vue";
2
- const ze = { class: "cd-ps-container" }, $e = {
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
- }, we = {
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 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" }, 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 }, ut = { key: 1 }, rt = { 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,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(b, { expose: Q, emit: C }) {
53
- var he, me;
54
- const r = b, V = C, T = y(r.visible), U = y(((me = (he = r.tabs) == null ? void 0 : he[0]) == null ? void 0 : me.key) || ""), z = 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 && !z.value && (z.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
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 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
- let w = null;
118
- const P = () => {
119
- if (w && clearTimeout(w), !W.value.trim()) {
120
- ne();
117
+ let $ = null;
118
+ const A = () => {
119
+ if ($ && clearTimeout($), !L.value.trim()) {
120
+ l();
121
121
  return;
122
122
  }
123
- j.value = !0, F.value = !0, w = setTimeout(() => o(), 300);
124
- }, o = () => {
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 }, $ = u.nodeType || (u.isUser !== !1 ? "user" : "department");
130
- s[$] || (s[$] = []), s[$].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: z.value || void 0, callback: t });
134
- }, ne = () => {
135
- w && (clearTimeout(w), w = 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: z.value }), r.multiple || re();
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
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
- 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(f, { ...s.data, typeName: Z, orgId: z.value }), !r.multiple && ((g = s.data) != null && g.isUser) && re();
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(f);
163
+ Z(f);
164
164
  return;
165
165
  }
166
166
  }
167
- const u = R.value[U.value] || [], m = Ce(u), $ = v.value.filter((f) => !m.includes(f));
168
- v.value = [...$, ...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 $;
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((f) => !f.isUser));
185
+ const _ = Y(B, s);
186
+ _ && _.children && (_.children = _.children.filter((f) => !f.isUser));
187
187
  }
188
- u && ((($ = u.getItem(s)) == null ? void 0 : $.children) || []).filter((f) => {
189
- var M;
190
- return (M = f.data) == null ? void 0 : M.isUser;
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
- u.remove(f.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
- }), f = R.value[e];
204
- if (f && ve(f, 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 f = Y(g, s);
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 Se = (t) => {
222
- a(t);
221
+ const Ie = (t) => {
222
+ Z(t);
223
223
  }, fe = () => {
224
- v.value = [], I.value.clear();
225
- }, re = () => {
226
- V("update:modelValue", v.value), V("confirm", J.value), T.value = !1;
227
- }, Ie = () => {
228
- T.value = !1;
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 u = X.value[t];
234
- if (u && s.length > 0) {
235
- const m = s.map(($) => {
236
- const { id: B, name: g, ...f } = $;
237
- return { ...f, id: B, name: $.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"), $ = x("t-input"), B = x("t-loading"), g = x("t-checkbox"), f = 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] = (n) => T.value = n),
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: re,
253
- onClose: Ie
252
+ attach: "body",
253
+ onConfirm: pe,
254
+ onClose: Te
254
255
  }, {
255
- default: N(() => [
256
- p("div", ze, [
257
- ce.value ? (l(), c("div", $e, [
258
- L.value && ae.value.length > 0 ? (l(), c("div", we, [
259
- S(u, {
260
- modelValue: z.value,
261
- "onUpdate:modelValue": e[0] || (e[0] = (n) => z.value = n),
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: O
265
+ onChange: z
265
266
  }, {
266
- default: N(() => [
267
- (l(!0), c(G, null, te(ae.value, (n) => (l(), E(s, {
268
- key: n.id,
269
- value: n.id,
270
- label: n.displayName || n.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($, {
278
- modelValue: W.value,
279
- "onUpdate:modelValue": e[1] || (e[1] = (n) => W.value = n),
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] = (n) => U.value = n),
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, (n) => (l(), E(q, {
302
- key: n.key,
303
- value: n.key,
304
- label: i(n)
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[n.key] || D.value[n.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[n.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, h(d.displayName || d.name), 1),
340
- p("div", Ae, [
341
- d.isUser ? _("", !0) : (l(), c("span", je, h(d.isPost ? "职位" : "部门"), 1)),
342
- d.position ? (l(), c("span", Je, h(d.position), 1)) : _("", !0),
343
- d.department ? (l(), c("span", Fe, h(d.department), 1)) : _("", !0),
344
- d.phone ? (l(), c("span", qe, h(d.phone), 1)) : _("", !0),
345
- d.userCount ? (l(), c("span", Ge, h(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[n.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) => ue(n.key, d),
355
- data: R.value[n.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" : n.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
372
  oe(h(d.label) + " ", 1),
372
- d.data.isUser && d.data.position ? (l(), c("span", Xe, h(d.data.position), 1)) : _("", !0)
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, "(" + h(d.data.userCount) + ")", 1)) : _("", !0),
375
- d.data.isUser ? _("", !0) : (l(), E(f, {
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, n.key), ["stop"])
381
+ onClick: ge((xe) => Se(d, c.key), ["stop"])
381
382
  }, {
382
- default: N(() => [
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"])) : (l(), c("div", Ze, [
391
- S(m, {
392
- name: n.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"]),
@@ -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 ? (l(), E(f, {
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: 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, (n) => (l(), c("div", {
433
- key: n.id,
434
- class: ee(["cd-ps-selected-item", { "cd-ps-dept-item": !n.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": !n.isUser }])
439
+ class: te(["cd-ps-avatar", { "cd-ps-avatar-dept": !c.isUser }])
439
440
  }, [
440
- S(m, {
441
- name: n.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, h(n.displayName || n.name), 1),
446
- p("div", ct, [
447
- n.isUser && n.position ? (l(), c("span", dt, h(n.position), 1)) : _("", !0),
448
- n.isUser && n.department ? (l(), c("span", ut, h(n.department), 1)) : _("", !0),
449
- n.isUser ? _("", !0) : (l(), c("span", rt, h(n.typeName || "部门"), 1)),
450
- !n.isUser && n.userCount ? (l(), c("span", pt, h(n.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(f, {
455
+ U(f, {
455
456
  size: "small",
456
457
  variant: "text",
457
458
  shape: "circle",
458
- onClick: (pe) => Se(n.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 ze = { class: "cd-ps-container" }, $e = {
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"]]), ft = { class: "cd-input-select" }, ht = {
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: 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: {
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(b, { emit: Q }) {
511
- const C = b, r = Q, V = y(!1), T = y([]), U = y(!1), z = y([]), W = y([]), v = y(!1), I = y(""), X = A(() => C.modelValue.map((a) => ({
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
- }))), j = (a) => a ? a.substring(0, 2).toUpperCase() : "", F = (a) => {
515
- const i = ["#1890ff", "#52c41a", "#faad14", "#f5222d", "#722ed1", "#13c2c2", "#eb2f96", "#fa8c16"];
516
- let k = 0;
517
- for (let O = 0; O < a.length; O++)
518
- k = a.charCodeAt(O) + ((k << 5) - k);
519
- return i[Math.abs(k) % i.length];
520
- }, D = (a) => String(a).startsWith("dept-"), ie = (a) => {
521
- const i = String(a);
522
- return i.startsWith("dept-") ? "warning" : i.startsWith("u-") ? "primary" : i.startsWith("pos-") ? "success" : i.startsWith("role-") ? "info" : "default";
523
- }, 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) => ({
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
- }), L = (a) => {
532
- r("update:modelValue", a), W.value = a;
533
- }, de = (a) => {
534
- a || (T.value = [], I.value = "");
535
- }, R = (a, i) => {
536
- a ? C.multiple ? L([...C.modelValue, i]) : (L([i]), v.value = !1) : L(C.modelValue.filter((k) => k.id !== i.id));
537
- }, se = (a, i) => {
538
- const { trigger: k, index: O } = i;
539
- if ((k === "tag-remove" || k === "backspace") && (v.value = !1), k === "clear")
540
- z.value = [], L([]);
541
- else if (["tag-remove", "backspace"].includes(k)) {
542
- const w = a.map((o) => o.value || o);
543
- z.value = w;
544
- const P = [...C.modelValue];
545
- 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);
546
558
  }
547
- }, ue = (a) => {
548
- a.stopPropagation(), a.preventDefault(), v.value = !1, U.value = !0;
549
559
  }, Y = (a) => {
550
- const i = a.map(ce), k = new Set(C.modelValue.map((P) => P.id)), O = i.filter((P) => !k.has(P.id)), w = C.multiple ? [...C.modelValue, ...O] : i.slice(0, 1);
551
- L(w), U.value = !1;
560
+ a.stopPropagation(), a.preventDefault(), v.value = !1, V.value = !0;
552
561
  }, J = (a) => {
553
- r("load-users", a);
554
- }, le = (a) => {
555
- 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 });
556
568
  };
557
- return H(() => C.modelValue, (a) => {
558
- z.value = a.map((i) => i.id), W.value = a;
559
- }, { 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) => {
560
572
  if (!(a != null && a.trim())) {
561
- T.value = [], V.value = !1;
573
+ x.value = [], C.value = !1;
562
574
  return;
563
575
  }
564
- V.value = !0, r("search", {
576
+ C.value = !0, u("search", {
565
577
  keyword: a,
566
- callback: (i) => {
567
- 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);
568
580
  }
569
581
  });
570
- }), (a, i) => {
571
- var P;
572
- const k = x("t-checkbox"), O = x("t-tag"), w = x("t-select-input");
573
- return l(), c("div", ft, [
574
- S(w, {
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: I.value,
577
- "onUpdate:inputValue": i[0] || (i[0] = (o) => I.value = o),
588
+ inputValue: S.value,
589
+ "onUpdate:inputValue": o[0] || (o[0] = (l) => S.value = l),
578
590
  "popup-visible": v.value,
579
- "onUpdate:popupVisible": i[1] || (i[1] = (o) => v.value = o),
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: b.placeholder,
592
- loading: V.value,
603
+ placeholder: k.placeholder,
604
+ loading: C.value,
593
605
  "allow-input": "",
594
606
  clearable: "",
595
- multiple: b.multiple,
607
+ multiple: k.multiple,
596
608
  class: "cd-input-select__select",
597
- onPopupVisibleChange: de,
598
- onTagChange: se
609
+ onPopupVisibleChange: P,
610
+ onTagChange: ue
599
611
  }, {
600
- panel: N(() => [
601
- T.value.length > 0 ? (l(), c("div", ht, [
602
- (l(!0), c(G, null, te(T.value, (o) => (l(), E(k, {
603
- key: o.id,
604
- value: o.id,
605
- checked: ae(o.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),
606
618
  class: "cd-input-select__option",
607
- onChange: (ne) => R(ne, o)
619
+ onChange: (re) => se(re, l)
608
620
  }, {
609
- default: N(() => [
621
+ default: T(() => [
610
622
  p("div", mt, [
611
- o.avatar ? (l(), c("div", _t, [
623
+ l.avatar ? (n(), i("div", _t, [
612
624
  p("img", {
613
- src: o.avatar,
614
- alt: o.name
625
+ src: l.avatar,
626
+ alt: l.name
615
627
  }, null, 8, gt)
616
- ])) : (l(), c("div", {
628
+ ])) : (n(), i("div", {
617
629
  key: 1,
618
630
  class: "cd-input-select__option-avatar cd-input-select__option-avatar--placeholder",
619
- style: Te({
620
- backgroundColor: D(o.id) ? "#e6f4ff" : F(o.name),
621
- color: D(o.id) ? "#0052d9" : "#fff"
631
+ style: ye({
632
+ backgroundColor: O(l.nodeType),
633
+ color: "#fff"
622
634
  })
623
- }, h(j(o.name)), 5)),
635
+ }, h(ce(l.nodeType)), 5)),
624
636
  p("div", yt, [
625
- p("div", kt, h(o.name), 1),
626
- o.department || o.position ? (l(), c("div", bt, h(o.department) + h(o.department && o.position ? " · " : "") + h(o.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)
627
639
  ]),
628
- D(o.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)
629
644
  ])
630
645
  ]),
631
646
  _: 2
632
647
  }, 1032, ["value", "checked", "onChange"]))), 128))
633
- ])) : V.value ? (l(), c("div", Vt, " 搜索中... ")) : (l(), c("div", Ut, " 暂无搜索结果 "))
648
+ ])) : C.value ? (n(), i("div", Vt, " 搜索中... ")) : (n(), i("div", Ut, " 暂无搜索结果 "))
634
649
  ]),
635
- tag: N((o) => [
636
- o && o.tag ? (l(), E(O, {
650
+ tag: T((l) => [
651
+ l && l.tag ? (n(), E($, {
637
652
  key: 0,
638
- theme: ie(typeof o.tag == "object" ? o.tag.value : o.tag),
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: N(() => [
644
- oe(h(typeof o.tag == "object" ? o.tag.label : o.tag), 1)
658
+ default: T(() => [
659
+ oe(h(typeof l.tag == "object" ? l.tag.label : l.tag), 1)
645
660
  ]),
646
661
  _: 2
647
- }, 1032, ["theme"])) : _("", !0)
662
+ }, 1032, ["theme"])) : g("", !0)
648
663
  ]),
649
- suffixIcon: N(() => [
664
+ suffixIcon: T(() => [
650
665
  p("i", {
651
666
  class: "ri-add-circle-line cd-input-select__add-icon",
652
- onClick: ue
667
+ onClick: Y
653
668
  })
654
669
  ]),
655
670
  _: 1
656
671
  }, 8, ["value", "inputValue", "popup-visible", "placeholder", "loading", "multiple"]),
657
- (P = b.tabs) != null && P.length && U.value ? (l(), E(ke, {
672
+ (D = k.tabs) != null && D.length && V.value ? (n(), E(Ce, {
658
673
  key: 0,
659
- visible: U.value,
660
- "onUpdate:visible": i[2] || (i[2] = (o) => U.value = o),
661
- modelValue: z.value,
662
- "onUpdate:modelValue": i[3] || (i[3] = (o) => z.value = o),
663
- tabs: b.tabs,
664
- organizations: b.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: b.multiple,
668
- onConfirm: Y,
669
- onLoadUsers: J,
670
- onSearch: le,
671
- onClose: i[4] || (i[4] = (o) => U.value = !1)
672
- }, null, 8, ["visible", "modelValue", "tabs", "organizations", "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)
673
689
  ]);
674
690
  };
675
691
  }
676
- }), It = /* @__PURE__ */ ye(St, [["__scopeId", "data-v-681cee2f"]]), Nt = {
677
- install(b) {
678
- 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);
679
695
  }
680
696
  };
681
697
  export {
682
698
  It as CdInputPersonSelector,
683
699
  It as InputSelect,
684
- ke as PersonSelector,
685
- Nt as default
700
+ Ce as PersonSelector,
701
+ xt as default
686
702
  };