china-mobile-international-custom-components 0.0.26 → 0.0.28

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (70) hide show
  1. package/es/ApplicationIcon.mjs +85 -0
  2. package/es/AvailableRangePreview.mjs +1 -1
  3. package/es/AvailableRangeSetting.mjs +68 -63
  4. package/es/CustomSidebar.mjs +1 -1
  5. package/es/assets/AvailableRangePreview.css +1 -0
  6. package/es/assets/AvailableRangeSetting.css +1 -0
  7. package/es/assets/CustomSidebar.css +1 -0
  8. package/es/assets/layout2.css +1 -1
  9. package/es/chunks/AvailableRangePreview.D4mZe1lQ.js +217 -0
  10. package/es/chunks/AvailableRangeSetting.BkSLnQ6N.js +215 -0
  11. package/es/chunks/CustomSidebar.BWGoPtLi.js +506 -0
  12. package/es/chunks/CustomTitle.BLZ7evms.js +5 -0
  13. package/es/chunks/CustomToggle.CP3M2_f3.js +165 -0
  14. package/es/chunks/PageContainer.D-G32lvP.js +329 -0
  15. package/es/chunks/_plugin-vue_export-helper.CVVE_0_F.js +13 -0
  16. package/es/chunks/_plugin-vue_export-helper.Cf-_TWPK.js +6 -0
  17. package/es/chunks/index.AHEDCg43.js +160 -0
  18. package/es/chunks/index.B67AnSJI.js +154 -0
  19. package/es/chunks/index.B9F4VYQK.js +118 -0
  20. package/es/chunks/index.BPxF6Amx.js +157 -0
  21. package/es/chunks/index.C2gKjqoA.js +209 -0
  22. package/es/chunks/index.DTtNnKDH.js +288 -0
  23. package/es/chunks/index.Dh5IGfxO.js +290 -0
  24. package/es/chunks/index.DtBeJlu6.js +142 -0
  25. package/es/chunks/index.kR57MtNP.js +211 -0
  26. package/es/chunks/index.wQj5YKPy.js +288 -0
  27. package/es/chunks/layout.BE8_kCeR.js +619 -0
  28. package/es/chunks/layout.C0EtkrZg.js +639 -0
  29. package/es/chunks/layout.C6AMos7n.js +17 -0
  30. package/es/chunks/layout.CWFXohJu.js +622 -0
  31. package/es/chunks/layout.R5FQNRjS.js +619 -0
  32. package/es/chunks/layout.nKB_kc-U.js +26 -0
  33. package/es/chunks/utils.BhlZXNZ6.js +19 -0
  34. package/es/index.mjs +643 -630
  35. package/lib/ApplicationIcon.js +1 -0
  36. package/lib/AvailableRangePreview.js +1 -1
  37. package/lib/AvailableRangeSetting.js +1 -1
  38. package/lib/CustomSidebar.js +1 -1
  39. package/lib/assets/AvailableRangePreview.css +1 -0
  40. package/lib/assets/AvailableRangeSetting.css +1 -0
  41. package/lib/assets/CustomSidebar.css +1 -0
  42. package/lib/assets/layout2.css +1 -1
  43. package/lib/chunks/AvailableRangePreview.CkgZsXP0.js +1 -0
  44. package/lib/chunks/AvailableRangeSetting.CF-jHm4x.js +1 -0
  45. package/lib/chunks/CustomSidebar.CMYJFb2P.js +1 -0
  46. package/lib/chunks/CustomTitle.BkFZ-ZIq.js +1 -0
  47. package/lib/chunks/CustomToggle.C0PpzKPP.js +1 -0
  48. package/lib/chunks/PageContainer.GH56wASV.js +1 -0
  49. package/lib/chunks/_plugin-vue_export-helper.C55-DZV2.js +1 -0
  50. package/lib/chunks/_plugin-vue_export-helper.DAGvX2Jf.js +1 -0
  51. package/lib/chunks/index.BfHfKST0.js +1 -0
  52. package/lib/chunks/index.Bk55us0s.js +1 -0
  53. package/lib/chunks/index.BlXappa4.js +1 -0
  54. package/lib/chunks/index.CCxHaoi4.js +1 -0
  55. package/lib/chunks/index.CSYGhK9M.js +1 -0
  56. package/lib/chunks/index.C_IlZrzE.js +1 -0
  57. package/lib/chunks/index.DUGtabLJ.js +1 -0
  58. package/lib/chunks/index.Dakz8S3g.js +1 -0
  59. package/lib/chunks/index.DydPD8Lc.js +1 -0
  60. package/lib/chunks/index.k_hSuA6i.js +1 -0
  61. package/lib/chunks/layout.BJjU9nKW.js +1 -0
  62. package/lib/chunks/layout.BO1q-dAZ.js +1 -0
  63. package/lib/chunks/layout.BQigNrr5.js +1 -0
  64. package/lib/chunks/layout.ClFtiz-t.js +1 -0
  65. package/lib/chunks/layout.CmDwUHZo.js +1 -0
  66. package/lib/chunks/layout.CqbDoD_v.js +1 -0
  67. package/lib/chunks/layout.CwJgDGuR.js +1 -0
  68. package/lib/chunks/utils.BT5Uuz2Q.js +1 -0
  69. package/lib/index.js +6 -6
  70. package/package.json +4 -4
@@ -0,0 +1,288 @@
1
+ import { w as B } from "./index.bCzIhWFw.js";
2
+ import { computed as u, createElementBlock as b, createCommentVNode as v, openBlock as i, Fragment as M, createElementVNode as E, toDisplayString as g, normalizeClass as I, createBlock as A, renderList as k, unref as p, withCtx as x, ref as C, watch as z, onMounted as F, createVNode as O, createTextVNode as _, nextTick as $ } from "vue";
3
+ import { ElPopover as U, ElButton as Y } from "element-plus";
4
+ import { _ as q } from "./_plugin-vue_export-helper.CHgC5LLL.js";
5
+ import '../assets/index2.css';const R = {
6
+ ALL: !0,
7
+ PARTIAL: !1
8
+ }, G = [
9
+ {
10
+ value: R.ALL,
11
+ label: "全部成员"
12
+ },
13
+ {
14
+ value: R.PARTIAL,
15
+ label: "部分成员"
16
+ }
17
+ ], m = {
18
+ MEMBER: 1,
19
+ DEPARTMENT: 2
20
+ }, ne = {
21
+ label: "memberName",
22
+ children: "children",
23
+ value: "memberId"
24
+ }, S = {
25
+ three: 3,
26
+ one: 1
27
+ }, H = {
28
+ key: 0,
29
+ class: "pd-l-16 text-dee0e3 pd-r-16"
30
+ }, W = { class: "fz-14 text-646a73 nowrap" }, j = { class: "tag-item nowrap fz-12 pd-l-8 pd-r-8 radius-4 bg-eaf0fe text-3271fe pointer" }, J = { class: "tag-list-popover overflow-y-auto flex gap-4 flex-wrap" }, K = {
31
+ __name: "TagList",
32
+ props: {
33
+ // 显示的标签
34
+ label: {
35
+ type: String,
36
+ required: !0
37
+ },
38
+ // 数据项列表
39
+ items: {
40
+ type: Array,
41
+ default: () => []
42
+ },
43
+ // 默认显示的数量
44
+ defaultShowCount: {
45
+ type: Number,
46
+ default: S.one
47
+ },
48
+ // 是否为只读模式
49
+ readonly: {
50
+ type: Boolean,
51
+ default: !1
52
+ }
53
+ },
54
+ setup(e) {
55
+ const t = e, n = u(() => t.readonly ? t.items : t.items.slice(0, t.defaultShowCount)), d = u(() => t.items.length > t.defaultShowCount), f = u(() => t.items.length - t.defaultShowCount), h = u(() => t.items.slice(t.defaultShowCount));
56
+ return (a, o) => e.items.length > 0 ? (i(), b(M, { key: 0 }, [
57
+ e.readonly ? v("", !0) : (i(), b("span", H, "|")),
58
+ E("span", W, g(e.label), 1),
59
+ E("div", {
60
+ class: I(["tag-list", { "flex items-center gap-4": !e.readonly }])
61
+ }, [
62
+ (i(!0), b(M, null, k(n.value, (s) => (i(), b("div", {
63
+ key: s.memberId,
64
+ class: I(["tag-item fz-12 pd-l-8 pd-r-8 radius-4 bg-eaf0fe text-3271fe", { "mg-r-4 mg-b-4": e.readonly }])
65
+ }, g(s.memberName), 3))), 128)),
66
+ !e.readonly && d.value ? (i(), A(p(U), {
67
+ key: 0,
68
+ placement: "top",
69
+ trigger: "click",
70
+ width: "300"
71
+ }, {
72
+ reference: x(() => [
73
+ E("span", j, " +" + g(f.value), 1)
74
+ ]),
75
+ default: x(() => [
76
+ E("div", J, [
77
+ (i(!0), b(M, null, k(h.value, (s) => (i(), b("span", {
78
+ key: s.memberId,
79
+ class: "tag-item nowrap fz-12 pd-l-8 pd-r-8 radius-4 bg-eaf0fe text-3271fe"
80
+ }, g(s.memberName), 1))), 128))
81
+ ])
82
+ ]),
83
+ _: 1
84
+ })) : v("", !0)
85
+ ], 2)
86
+ ], 64)) : v("", !0);
87
+ }
88
+ }, D = /* @__PURE__ */ q(K, [["__scopeId", "data-v-bf564085"]]), L = (e, t) => e?.filter(t) || [], w = (e, t) => L(e, (n) => n.memberType === t), N = (e, t) => {
89
+ if (e.children)
90
+ for (const n of e.children)
91
+ n.memberType === m.MEMBER ? t(n) : n.memberType === m.DEPARTMENT && N(n, t);
92
+ }, P = (e) => {
93
+ const t = [];
94
+ return N(e, (n) => t.push(n.memberId)), t;
95
+ };
96
+ function Q(e, t, n = !1) {
97
+ const d = u(() => {
98
+ if (!e.value) return [];
99
+ const a = [...e.value], o = w(
100
+ a,
101
+ m.DEPARTMENT
102
+ );
103
+ if (o.length > 0 && t.value && t.value.length > 0) {
104
+ const s = /* @__PURE__ */ new Set();
105
+ o.forEach((r) => {
106
+ const c = (y) => {
107
+ for (const T of y) {
108
+ if (T.memberType === m.DEPARTMENT && T.memberId === r.memberId)
109
+ return N(
110
+ T,
111
+ (V) => s.add(V)
112
+ ), !0;
113
+ if (T.children && c(T.children))
114
+ return !0;
115
+ }
116
+ return !1;
117
+ };
118
+ c(t.value);
119
+ });
120
+ const l = new Set(
121
+ w(a, m.MEMBER).map(
122
+ (r) => r.memberId
123
+ )
124
+ );
125
+ s.forEach((r) => {
126
+ l.has(r.memberId) || a.push(r);
127
+ });
128
+ }
129
+ return a;
130
+ }), f = u(() => {
131
+ if (n)
132
+ return w(
133
+ d.value,
134
+ m.MEMBER
135
+ );
136
+ {
137
+ const a = /* @__PURE__ */ new Set();
138
+ return h.value.forEach((o) => {
139
+ P(o).forEach((l) => a.add(l));
140
+ }), L(
141
+ d.value,
142
+ (o) => o.memberType === m.MEMBER && !a.has(o.memberId)
143
+ );
144
+ }
145
+ }), h = u(() => {
146
+ if (n)
147
+ return w(
148
+ d.value,
149
+ m.DEPARTMENT
150
+ );
151
+ {
152
+ const a = [], o = (l) => {
153
+ if (!l.children || l.children.length === 0) return !1;
154
+ const r = P(l);
155
+ return r.length === 0 ? !1 : r.every(
156
+ (c) => d.value.some(
157
+ (y) => y.memberType === m.MEMBER && y.memberId === c
158
+ )
159
+ );
160
+ }, s = (l, r = !1) => {
161
+ if (l.memberType === m.DEPARTMENT) {
162
+ const c = o(l);
163
+ if (c && !r) {
164
+ if (a.push({
165
+ memberId: l.memberId,
166
+ memberName: l.memberName,
167
+ memberType: m.DEPARTMENT,
168
+ children: l.children
169
+ }), l.children)
170
+ for (const y of l.children)
171
+ s(y, !0);
172
+ } else if (!c && l.children)
173
+ for (const y of l.children)
174
+ s(y, !1);
175
+ }
176
+ };
177
+ for (const l of t.value)
178
+ s(l, !1);
179
+ return a;
180
+ }
181
+ });
182
+ return {
183
+ selectedMembers: f,
184
+ selectedDepartments: h
185
+ };
186
+ }
187
+ const X = { class: "fz-14 text-1f2329" }, Z = {
188
+ __name: "layout",
189
+ props: {
190
+ // 当前选择的范围类型(是否全部可见)
191
+ allVisible: {
192
+ type: Boolean,
193
+ default: R.ALL
194
+ },
195
+ // 选中的项目列表(完整对象数组,由父组件根据ID从树中查找得到)
196
+ modelValue: {
197
+ type: Array,
198
+ default: () => []
199
+ },
200
+ // 完整的树形数据(用于判断部门成员是否全部选中)
201
+ treeList: {
202
+ type: Array,
203
+ default: () => []
204
+ },
205
+ // 是否为只读模式
206
+ readonly: {
207
+ type: Boolean,
208
+ default: !1
209
+ }
210
+ },
211
+ setup(e, { expose: t }) {
212
+ const n = C(null), d = () => {
213
+ n.value && $(() => {
214
+ n.value.scrollIntoView({
215
+ behavior: "smooth",
216
+ block: "center"
217
+ });
218
+ });
219
+ }, f = e, { selectedMembers: h, selectedDepartments: a } = Q(
220
+ u(() => f.modelValue),
221
+ u(() => f.treeList),
222
+ f.readonly
223
+ ), o = u(() => {
224
+ const l = h.value.length > 0, r = a.value.length > 0;
225
+ return l && !r || !l && r ? S.three : S.one;
226
+ }), s = u(() => [...h.value, ...a.value]);
227
+ return z(
228
+ () => [f.allVisible, f.modelValue],
229
+ () => {
230
+ d();
231
+ },
232
+ { immediate: !1, deep: !0 }
233
+ ), F(() => {
234
+ d();
235
+ }), t({
236
+ allSelectedItems: s
237
+ }), (l, r) => (i(), b("div", {
238
+ ref_key: "previewRef",
239
+ ref: n,
240
+ class: I(["available-range-preview w-full overflow-hidden", {
241
+ "flex items-center": !e.readonly
242
+ }])
243
+ }, [
244
+ e.readonly ? v("", !0) : (i(), b(M, { key: 0 }, [
245
+ r[2] || (r[2] = E("div", { class: "text-1f2329" }, "可用范围:", -1)),
246
+ E("span", X, g(p(G).find((c) => c.value === e.allVisible)?.label), 1),
247
+ O(p(Y), {
248
+ class: "mg-l-16",
249
+ type: "primary",
250
+ link: "",
251
+ onClick: r[0] || (r[0] = (c) => l.$emit("edit"))
252
+ }, {
253
+ default: x(() => [...r[1] || (r[1] = [
254
+ _(" 编辑 ", -1)
255
+ ])]),
256
+ _: 1
257
+ })
258
+ ], 64)),
259
+ e.allVisible === p(R).PARTIAL ? (i(), b("div", {
260
+ key: 1,
261
+ class: I(["flex-1 overflow-hidden", { "flex items-center": !e.readonly }])
262
+ }, [
263
+ p(h)?.length ? (i(), A(D, {
264
+ key: 0,
265
+ label: "成员:",
266
+ items: p(h),
267
+ "default-show-count": o.value,
268
+ readonly: e.readonly
269
+ }, null, 8, ["items", "default-show-count", "readonly"])) : v("", !0),
270
+ p(a)?.length ? (i(), A(D, {
271
+ key: 1,
272
+ label: "部门:",
273
+ items: p(a),
274
+ "default-show-count": o.value,
275
+ readonly: e.readonly
276
+ }, null, 8, ["items", "default-show-count", "readonly"])) : v("", !0)
277
+ ], 2)) : v("", !0)
278
+ ], 2));
279
+ }
280
+ }, ae = B(Z), se = B(D);
281
+ export {
282
+ ae as A,
283
+ R,
284
+ ne as T,
285
+ se as a,
286
+ G as r,
287
+ Q as u
288
+ };
@@ -0,0 +1,290 @@
1
+ import { w as B } from "./index.bCzIhWFw.js";
2
+ import { computed as u, createElementBlock as b, createCommentVNode as v, openBlock as i, Fragment as M, createElementVNode as E, toDisplayString as g, normalizeClass as I, createBlock as R, renderList as k, unref as p, withCtx as x, ref as C, watch as z, onMounted as F, createVNode as $, createTextVNode as O, nextTick as _ } from "vue";
3
+ import { ElPopover as U, ElButton as Y } from "element-plus";
4
+ import { _ as q } from "./_plugin-vue_export-helper.CHgC5LLL.js";
5
+ import '../assets/index2.css';const A = {
6
+ ALL: !0,
7
+ PARTIAL: !1
8
+ }, G = [
9
+ {
10
+ value: A.ALL,
11
+ label: "全部成员"
12
+ },
13
+ {
14
+ value: A.PARTIAL,
15
+ label: "部分成员"
16
+ }
17
+ ], m = {
18
+ MEMBER: 1,
19
+ DEPARTMENT: 2
20
+ }, ne = {
21
+ label: "memberName",
22
+ children: "children",
23
+ value: "memberId"
24
+ }, D = {
25
+ one: 1,
26
+ two: 2
27
+ }, H = {
28
+ key: 0,
29
+ class: "pd-l-16 text-dee0e3 pd-r-16"
30
+ }, W = { class: "fz-14 text-646a73 nowrap" }, j = { class: "tag-item nowrap fz-12 pd-l-8 pd-r-8 radius-4 bg-eaf0fe text-3271fe pointer" }, J = { class: "tag-list-popover overflow-y-auto flex gap-4 flex-wrap" }, K = {
31
+ __name: "TagList",
32
+ props: {
33
+ // 显示的标签
34
+ label: {
35
+ type: String,
36
+ required: !0
37
+ },
38
+ // 数据项列表
39
+ items: {
40
+ type: Array,
41
+ default: () => []
42
+ },
43
+ // 默认显示的数量
44
+ defaultShowCount: {
45
+ type: Number,
46
+ default: D.one
47
+ },
48
+ // 是否为只读模式
49
+ readonly: {
50
+ type: Boolean,
51
+ default: !1
52
+ }
53
+ },
54
+ setup(e) {
55
+ const t = e, n = u(() => t.readonly ? t.items : t.items.slice(0, t.defaultShowCount)), d = u(() => t.items.length > t.defaultShowCount), f = u(() => t.items.length - t.defaultShowCount), h = u(() => t.items.slice(t.defaultShowCount));
56
+ return (a, o) => e.items.length > 0 ? (i(), b(M, { key: 0 }, [
57
+ e.readonly ? v("", !0) : (i(), b("span", H, "|")),
58
+ E("span", W, g(e.label), 1),
59
+ E("div", {
60
+ class: I(["tag-list", { "flex items-center gap-4": !e.readonly }])
61
+ }, [
62
+ (i(!0), b(M, null, k(n.value, (s) => (i(), b("div", {
63
+ key: s.memberId,
64
+ class: I(["tag-item fz-12 pd-l-8 pd-r-8 radius-4 bg-eaf0fe text-3271fe", { "mg-r-4 mg-b-4": e.readonly }])
65
+ }, g(s.memberName), 3))), 128)),
66
+ !e.readonly && d.value ? (i(), R(p(U), {
67
+ key: 0,
68
+ placement: "top",
69
+ trigger: "click",
70
+ width: "300"
71
+ }, {
72
+ reference: x(() => [
73
+ E("span", j, " +" + g(f.value), 1)
74
+ ]),
75
+ default: x(() => [
76
+ E("div", J, [
77
+ (i(!0), b(M, null, k(h.value, (s) => (i(), b("span", {
78
+ key: s.memberId,
79
+ class: "tag-item nowrap fz-12 pd-l-8 pd-r-8 radius-4 bg-eaf0fe text-3271fe"
80
+ }, g(s.memberName), 1))), 128))
81
+ ])
82
+ ]),
83
+ _: 1
84
+ })) : v("", !0)
85
+ ], 2)
86
+ ], 64)) : v("", !0);
87
+ }
88
+ }, N = /* @__PURE__ */ q(K, [["__scopeId", "data-v-bf564085"]]), L = (e, t) => e?.filter(t) || [], w = (e, t) => L(e, (n) => n.memberType === t), S = (e, t) => {
89
+ if (e.children)
90
+ for (const n of e.children)
91
+ n.memberType === m.MEMBER ? t(n) : n.memberType === m.DEPARTMENT && S(n, t);
92
+ }, P = (e) => {
93
+ const t = [];
94
+ return S(e, (n) => t.push(n.memberId)), t;
95
+ };
96
+ function Q(e, t, n = !1) {
97
+ const d = u(() => {
98
+ if (!e.value) return [];
99
+ const a = [...e.value], o = w(
100
+ a,
101
+ m.DEPARTMENT
102
+ );
103
+ if (o.length > 0 && t.value && t.value.length > 0) {
104
+ const s = /* @__PURE__ */ new Set();
105
+ o.forEach((r) => {
106
+ const c = (y) => {
107
+ for (const T of y) {
108
+ if (T.memberType === m.DEPARTMENT && T.memberId === r.memberId)
109
+ return S(
110
+ T,
111
+ (V) => s.add(V)
112
+ ), !0;
113
+ if (T.children && c(T.children))
114
+ return !0;
115
+ }
116
+ return !1;
117
+ };
118
+ c(t.value);
119
+ });
120
+ const l = new Set(
121
+ w(a, m.MEMBER).map(
122
+ (r) => r.memberId
123
+ )
124
+ );
125
+ s.forEach((r) => {
126
+ l.has(r.memberId) || a.push(r);
127
+ });
128
+ }
129
+ return a;
130
+ }), f = u(() => {
131
+ if (n)
132
+ return w(
133
+ d.value,
134
+ m.MEMBER
135
+ );
136
+ {
137
+ const a = /* @__PURE__ */ new Set();
138
+ return h.value.forEach((o) => {
139
+ P(o).forEach((l) => a.add(l));
140
+ }), L(
141
+ d.value,
142
+ (o) => o.memberType === m.MEMBER && !a.has(o.memberId)
143
+ );
144
+ }
145
+ }), h = u(() => {
146
+ if (n)
147
+ return w(
148
+ d.value,
149
+ m.DEPARTMENT
150
+ );
151
+ {
152
+ const a = [], o = (l) => {
153
+ if (!l.children || l.children.length === 0) return !1;
154
+ const r = P(l);
155
+ return r.length === 0 ? !1 : r.every(
156
+ (c) => d.value.some(
157
+ (y) => y.memberType === m.MEMBER && y.memberId === c
158
+ )
159
+ );
160
+ }, s = (l, r = !1) => {
161
+ if (l.memberType === m.DEPARTMENT) {
162
+ const c = o(l);
163
+ if (c && !r) {
164
+ if (a.push({
165
+ memberId: l.memberId,
166
+ memberName: l.memberName,
167
+ memberType: m.DEPARTMENT,
168
+ children: l.children
169
+ }), l.children)
170
+ for (const y of l.children)
171
+ s(y, !0);
172
+ } else if (!c && l.children)
173
+ for (const y of l.children)
174
+ s(y, !1);
175
+ }
176
+ };
177
+ for (const l of t.value)
178
+ s(l, !1);
179
+ return a;
180
+ }
181
+ });
182
+ return {
183
+ selectedMembers: f,
184
+ selectedDepartments: h
185
+ };
186
+ }
187
+ const X = { class: "fz-14 text-1f2329" }, Z = {
188
+ __name: "layout",
189
+ props: {
190
+ // 当前选择的范围类型(是否全部可见)
191
+ allVisible: {
192
+ type: Boolean,
193
+ default: A.ALL
194
+ },
195
+ // 选中的项目列表(完整对象数组,由父组件根据ID从树中查找得到)
196
+ modelValue: {
197
+ type: Array,
198
+ default: () => []
199
+ },
200
+ // 完整的树形数据(用于判断部门成员是否全部选中)
201
+ treeList: {
202
+ type: Array,
203
+ default: () => []
204
+ },
205
+ // 是否为只读模式
206
+ readonly: {
207
+ type: Boolean,
208
+ default: !1
209
+ }
210
+ },
211
+ setup(e, { expose: t }) {
212
+ const n = C(null), d = () => {
213
+ n.value && _(() => {
214
+ n.value.scrollIntoView({
215
+ behavior: "smooth",
216
+ block: "center"
217
+ });
218
+ });
219
+ }, f = e, { selectedMembers: h, selectedDepartments: a } = Q(
220
+ u(() => f.modelValue),
221
+ u(() => f.treeList),
222
+ f.readonly
223
+ ), o = u(() => {
224
+ const l = h.value.length > 0, r = a.value.length > 0;
225
+ return l && !r || !l && r ? D.two : D.one;
226
+ }), s = u(() => [...h.value, ...a.value]);
227
+ return z(
228
+ () => [f.allVisible, f.modelValue],
229
+ () => {
230
+ d();
231
+ },
232
+ { immediate: !1, deep: !0 }
233
+ ), F(() => {
234
+ d();
235
+ }), t({
236
+ allSelectedItems: s
237
+ }), (l, r) => (i(), b("div", {
238
+ ref_key: "previewRef",
239
+ ref: n,
240
+ class: I(["available-range-preview w-full overflow-hidden", {
241
+ "flex items-center": !e.readonly
242
+ }])
243
+ }, [
244
+ e.readonly ? v("", !0) : (i(), b(M, { key: 0 }, [
245
+ r[2] || (r[2] = E("div", { class: "text-1f2329" }, "可用范围:", -1)),
246
+ E("span", X, g(p(G).find((c) => c.value === e.allVisible)?.label), 1),
247
+ $(p(Y), {
248
+ class: "mg-l-16",
249
+ type: "primary",
250
+ link: "",
251
+ onClick: r[0] || (r[0] = (c) => l.$emit("edit"))
252
+ }, {
253
+ default: x(() => [...r[1] || (r[1] = [
254
+ O(" 编辑 ", -1)
255
+ ])]),
256
+ _: 1
257
+ })
258
+ ], 64)),
259
+ e.allVisible === p(A).PARTIAL ? (i(), b("div", {
260
+ key: 1,
261
+ class: I(["flex-1 overflow-hidden", { "flex items-center": !e.readonly }])
262
+ }, [
263
+ p(h)?.length ? (i(), R(N, {
264
+ key: 0,
265
+ label: "成员:",
266
+ items: p(h),
267
+ "default-show-count": o.value,
268
+ readonly: e.readonly
269
+ }, null, 8, ["items", "default-show-count", "readonly"])) : v("", !0),
270
+ p(a)?.length ? (i(), R(N, {
271
+ key: 1,
272
+ label: "部门:",
273
+ items: p(a),
274
+ "default-show-count": o.value,
275
+ readonly: e.readonly
276
+ }, null, 8, ["items", "default-show-count", "readonly"])) : v("", !0)
277
+ ], 2)) : v("", !0)
278
+ ], 2));
279
+ }
280
+ }, ae = B(Z), se = B(N);
281
+ export {
282
+ ae as A,
283
+ D,
284
+ m as M,
285
+ A as R,
286
+ se as T,
287
+ ne as a,
288
+ G as r,
289
+ Q as u
290
+ };