china-mobile-international-custom-components 0.0.48 → 0.0.49
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/AddOrEditSupplierDialog.mjs +24 -0
- package/es/ApplicationTypeTag.mjs +1 -1
- package/es/AvailableRangePreview.mjs +1 -1
- package/es/AvailableRangeSetting.mjs +2 -2
- package/es/CommonTagsList.mjs +3 -3
- package/es/DialogContainer.mjs +21 -21
- package/es/FileUploader.mjs +121 -123
- package/es/ParameterTable.mjs +1 -1
- package/es/SourcePublish.mjs +6 -6
- package/es/Table.mjs +2 -2
- package/es/assets/AddOrEditSupplierDialog.css +1 -0
- package/es/assets/index3.css +1 -1
- package/es/chunks/{BackBar.DwhmSL-a.js → BackBar.DnDtQBAg.js} +96 -96
- package/es/chunks/{BackBar.9Pp2SYB-.js → BackBar.eaUb1JvV.js} +1 -1
- package/es/chunks/{config.DVEvXGIL.js → config.CvOtShOj.js} +2 -2
- package/es/chunks/config.DkSRacA9.js +435 -0
- package/es/chunks/{i18n.DMVLcyDY.js → i18n.Bd7hh14j.js} +2 -2
- package/es/chunks/index.B_T3qY7U.js +1008 -0
- package/es/chunks/{index.CZTB65ge.js → index.CHlFhI6c.js} +1 -1
- package/es/chunks/index.DHcry2-T.js +1010 -0
- package/es/chunks/index.JtDVXCay.js +1008 -0
- package/es/chunks/index.o4gC5-Xq.js +1011 -0
- package/es/chunks/index.qAljoMis.js +976 -0
- package/es/index.mjs +227 -188
- package/lib/AddOrEditSupplierDialog.js +1 -0
- package/lib/ApplicationTypeTag.js +1 -1
- package/lib/AvailableRangePreview.js +1 -1
- package/lib/AvailableRangeSetting.js +1 -1
- package/lib/CommonTagsList.js +1 -1
- package/lib/DialogContainer.js +1 -1
- package/lib/FileUploader.js +1 -1
- package/lib/ParameterTable.js +1 -1
- package/lib/SourcePublish.js +1 -1
- package/lib/Table.js +1 -1
- package/lib/assets/AddOrEditSupplierDialog.css +1 -0
- package/lib/assets/index3.css +1 -1
- package/lib/chunks/{BackBar.DFDSVp2a.js → BackBar.CaaASGvb.js} +1 -1
- package/lib/chunks/BackBar.DhaZZIoV.js +1 -0
- package/lib/chunks/{config.Dwnp4fRZ.js → config.CqfpM51B.js} +1 -1
- package/lib/chunks/{i18n.Bzvn6t8H.js → i18n.D3L1FBDI.js} +2 -2
- package/lib/chunks/index.BhoAcBeE.js +1 -0
- package/lib/chunks/index.CE91RC0G.js +1 -0
- package/lib/chunks/index.Cv1roodm.js +1 -0
- package/lib/chunks/{index.DO3h_zf2.js → index.D-pFPuUr.js} +1 -1
- package/lib/chunks/index.D32cNfAI.js +1 -0
- package/lib/chunks/index.DusP0A6s.js +1 -0
- package/lib/index.js +1 -1
- package/package.json +4 -2
- package/es/chunks/i18n.BNeBD4gR.js +0 -4028
- package/es/chunks/i18n.DUrvNBQz.js +0 -4028
- package/es/chunks/index.BcLVH95_.js +0 -4058
- package/es/chunks/index.CSPp4g5C.js +0 -303
- package/es/chunks/index.ClqvUq64.js +0 -302
- package/es/chunks/index.Dh5IGfxO.js +0 -290
- package/es/chunks/index.Doax01RQ.js +0 -254
- package/es/chunks/layout.C0EtkrZg.js +0 -639
- package/lib/chunks/BackBar.CYThcqhK.js +0 -1
- package/lib/chunks/i18n.D-d0yyXi.js +0 -6
- package/lib/chunks/i18n.Giy85Rng.js +0 -6
- package/lib/chunks/index.6X8xsqRJ.js +0 -1
- package/lib/chunks/index.Bk55us0s.js +0 -1
- package/lib/chunks/index.CP9rhXZ5.js +0 -1
- package/lib/chunks/index.CSLWrMRE.js +0 -1
- package/lib/chunks/index.CV29Us4A.js +0 -6
- package/lib/chunks/layout.BO1q-dAZ.js +0 -1
|
@@ -1,303 +0,0 @@
|
|
|
1
|
-
import { w as B } from "./index.bCzIhWFw.js";
|
|
2
|
-
import { computed as u, createElementBlock as h, createCommentVNode as v, openBlock as i, Fragment as I, createElementVNode as E, toDisplayString as g, normalizeClass as M, createBlock as A, renderList as P, unref as y, withCtx as D, ref as C, watch as U, onMounted as z, createVNode as F, createTextVNode as _, nextTick as H } from "vue";
|
|
3
|
-
import { ElPopover as $, ElButton as O } from "element-plus";
|
|
4
|
-
import { _ as W } from "./_plugin-vue_export-helper.CHgC5LLL.js";
|
|
5
|
-
import '../assets/index3.css';const R = {
|
|
6
|
-
ALL: !0,
|
|
7
|
-
PARTIAL: !1
|
|
8
|
-
}, Y = [
|
|
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
|
-
one: 1,
|
|
26
|
-
two: 2
|
|
27
|
-
}, ae = {
|
|
28
|
-
UNPUBLISHED: 0,
|
|
29
|
-
// 未发布
|
|
30
|
-
UNDER_REVIEW: 1,
|
|
31
|
-
// 审核中
|
|
32
|
-
PUBLISHED: 2,
|
|
33
|
-
// 已发布
|
|
34
|
-
REJECTED: 3,
|
|
35
|
-
// 审核不通过
|
|
36
|
-
FAILED: 4
|
|
37
|
-
// 发布失败
|
|
38
|
-
}, q = {
|
|
39
|
-
key: 0,
|
|
40
|
-
class: "pd-l-16 text-dee0e3 pd-r-16"
|
|
41
|
-
}, G = { 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 = {
|
|
42
|
-
__name: "TagList",
|
|
43
|
-
props: {
|
|
44
|
-
// 显示的标签
|
|
45
|
-
label: {
|
|
46
|
-
type: String,
|
|
47
|
-
required: !0
|
|
48
|
-
},
|
|
49
|
-
// 数据项列表
|
|
50
|
-
items: {
|
|
51
|
-
type: Array,
|
|
52
|
-
default: () => []
|
|
53
|
-
},
|
|
54
|
-
// 默认显示的数量
|
|
55
|
-
defaultShowCount: {
|
|
56
|
-
type: Number,
|
|
57
|
-
default: S.one
|
|
58
|
-
},
|
|
59
|
-
// 是否为只读模式
|
|
60
|
-
readonly: {
|
|
61
|
-
type: Boolean,
|
|
62
|
-
default: !1
|
|
63
|
-
}
|
|
64
|
-
},
|
|
65
|
-
setup(e) {
|
|
66
|
-
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), p = u(() => t.items.slice(t.defaultShowCount));
|
|
67
|
-
return (a, o) => e.items.length > 0 ? (i(), h(I, { key: 0 }, [
|
|
68
|
-
e.readonly ? v("", !0) : (i(), h("span", q, "|")),
|
|
69
|
-
E("span", G, g(e.label), 1),
|
|
70
|
-
E("div", {
|
|
71
|
-
class: M(["tag-list", { "flex items-center gap-4": !e.readonly }])
|
|
72
|
-
}, [
|
|
73
|
-
(i(!0), h(I, null, P(n.value, (s) => (i(), h("div", {
|
|
74
|
-
key: s.memberId,
|
|
75
|
-
class: M(["tag-item fz-12 pd-l-8 pd-r-8 radius-4 bg-eaf0fe text-3271fe nowrap", { "mg-r-4 mg-b-4": e.readonly }])
|
|
76
|
-
}, g(s.memberName), 3))), 128)),
|
|
77
|
-
!e.readonly && d.value ? (i(), A(y($), {
|
|
78
|
-
key: 0,
|
|
79
|
-
placement: "top",
|
|
80
|
-
trigger: "click",
|
|
81
|
-
width: "300",
|
|
82
|
-
"popper-class": "tag-list-popover-wrapper"
|
|
83
|
-
}, {
|
|
84
|
-
reference: D(() => [
|
|
85
|
-
E("span", J, " +" + g(f.value), 1)
|
|
86
|
-
]),
|
|
87
|
-
default: D(() => [
|
|
88
|
-
E("div", j, [
|
|
89
|
-
(i(!0), h(I, null, P(p.value, (s) => (i(), h("span", {
|
|
90
|
-
key: s.memberId,
|
|
91
|
-
class: "tag-item nowrap fz-12 pd-l-8 pd-r-8 radius-4 bg-eaf0fe text-3271fe"
|
|
92
|
-
}, g(s.memberName), 1))), 128))
|
|
93
|
-
])
|
|
94
|
-
]),
|
|
95
|
-
_: 1
|
|
96
|
-
})) : v("", !0)
|
|
97
|
-
], 2)
|
|
98
|
-
], 64)) : v("", !0);
|
|
99
|
-
}
|
|
100
|
-
}, N = /* @__PURE__ */ W(K, [["__scopeId", "data-v-32a1fa42"]]), L = (e, t) => e?.filter(t) || [], w = (e, t) => L(e, (n) => n.memberType === t), x = (e, t) => {
|
|
101
|
-
if (e.children)
|
|
102
|
-
for (const n of e.children)
|
|
103
|
-
n.memberType === m.MEMBER ? t(n) : n.memberType === m.DEPARTMENT && x(n, t);
|
|
104
|
-
}, k = (e) => {
|
|
105
|
-
const t = [];
|
|
106
|
-
return x(e, (n) => t.push(n.memberId)), t;
|
|
107
|
-
};
|
|
108
|
-
function Q(e, t, n = !1) {
|
|
109
|
-
const d = u(() => {
|
|
110
|
-
if (!e.value) return [];
|
|
111
|
-
const a = [...e.value], o = w(
|
|
112
|
-
a,
|
|
113
|
-
m.DEPARTMENT
|
|
114
|
-
);
|
|
115
|
-
if (o.length > 0 && t.value && t.value.length > 0) {
|
|
116
|
-
const s = /* @__PURE__ */ new Set();
|
|
117
|
-
o.forEach((r) => {
|
|
118
|
-
const c = (b) => {
|
|
119
|
-
for (const T of b) {
|
|
120
|
-
if (T.memberType === m.DEPARTMENT && T.memberId === r.memberId)
|
|
121
|
-
return x(
|
|
122
|
-
T,
|
|
123
|
-
(V) => s.add(V)
|
|
124
|
-
), !0;
|
|
125
|
-
if (T.children && c(T.children))
|
|
126
|
-
return !0;
|
|
127
|
-
}
|
|
128
|
-
return !1;
|
|
129
|
-
};
|
|
130
|
-
c(t.value);
|
|
131
|
-
});
|
|
132
|
-
const l = new Set(
|
|
133
|
-
w(a, m.MEMBER).map(
|
|
134
|
-
(r) => r.memberId
|
|
135
|
-
)
|
|
136
|
-
);
|
|
137
|
-
s.forEach((r) => {
|
|
138
|
-
l.has(r.memberId) || a.push(r);
|
|
139
|
-
});
|
|
140
|
-
}
|
|
141
|
-
return a;
|
|
142
|
-
}), f = u(() => {
|
|
143
|
-
if (n)
|
|
144
|
-
return w(
|
|
145
|
-
d.value,
|
|
146
|
-
m.MEMBER
|
|
147
|
-
);
|
|
148
|
-
{
|
|
149
|
-
const a = /* @__PURE__ */ new Set();
|
|
150
|
-
return p.value.forEach((o) => {
|
|
151
|
-
k(o).forEach((l) => a.add(l));
|
|
152
|
-
}), L(
|
|
153
|
-
d.value,
|
|
154
|
-
(o) => o.memberType === m.MEMBER && !a.has(o.memberId)
|
|
155
|
-
);
|
|
156
|
-
}
|
|
157
|
-
}), p = u(() => {
|
|
158
|
-
if (n)
|
|
159
|
-
return w(
|
|
160
|
-
d.value,
|
|
161
|
-
m.DEPARTMENT
|
|
162
|
-
);
|
|
163
|
-
{
|
|
164
|
-
const a = [], o = (l) => {
|
|
165
|
-
if (!l.children || l.children.length === 0) return !1;
|
|
166
|
-
const r = k(l);
|
|
167
|
-
return r.length === 0 ? !1 : r.every(
|
|
168
|
-
(c) => d.value.some(
|
|
169
|
-
(b) => b.memberType === m.MEMBER && b.memberId === c
|
|
170
|
-
)
|
|
171
|
-
);
|
|
172
|
-
}, s = (l, r = !1) => {
|
|
173
|
-
if (l.memberType === m.DEPARTMENT) {
|
|
174
|
-
const c = o(l);
|
|
175
|
-
if (c && !r) {
|
|
176
|
-
if (a.push({
|
|
177
|
-
memberId: l.memberId,
|
|
178
|
-
memberName: l.memberName,
|
|
179
|
-
memberType: m.DEPARTMENT,
|
|
180
|
-
children: l.children
|
|
181
|
-
}), l.children)
|
|
182
|
-
for (const b of l.children)
|
|
183
|
-
s(b, !0);
|
|
184
|
-
} else if (!c && l.children)
|
|
185
|
-
for (const b of l.children)
|
|
186
|
-
s(b, !1);
|
|
187
|
-
}
|
|
188
|
-
};
|
|
189
|
-
for (const l of t.value)
|
|
190
|
-
s(l, !1);
|
|
191
|
-
return a;
|
|
192
|
-
}
|
|
193
|
-
});
|
|
194
|
-
return {
|
|
195
|
-
selectedMembers: f,
|
|
196
|
-
selectedDepartments: p
|
|
197
|
-
};
|
|
198
|
-
}
|
|
199
|
-
const X = { class: "fz-14 text-1f2329" }, Z = {
|
|
200
|
-
__name: "layout",
|
|
201
|
-
props: {
|
|
202
|
-
// 当前选择的范围类型(是否全部可见)
|
|
203
|
-
allVisible: {
|
|
204
|
-
type: Boolean,
|
|
205
|
-
default: R.ALL
|
|
206
|
-
},
|
|
207
|
-
// 选中的项目列表(完整对象数组,由父组件根据ID从树中查找得到)
|
|
208
|
-
modelValue: {
|
|
209
|
-
type: Array,
|
|
210
|
-
default: () => []
|
|
211
|
-
},
|
|
212
|
-
// 完整的树形数据(用于判断部门成员是否全部选中)
|
|
213
|
-
treeList: {
|
|
214
|
-
type: Array,
|
|
215
|
-
default: () => []
|
|
216
|
-
},
|
|
217
|
-
// 是否为只读模式
|
|
218
|
-
readonly: {
|
|
219
|
-
type: Boolean,
|
|
220
|
-
default: !1
|
|
221
|
-
}
|
|
222
|
-
},
|
|
223
|
-
setup(e, { expose: t }) {
|
|
224
|
-
const n = C(null), d = () => {
|
|
225
|
-
n.value && H(() => {
|
|
226
|
-
n.value.scrollIntoView({
|
|
227
|
-
behavior: "smooth",
|
|
228
|
-
block: "center"
|
|
229
|
-
});
|
|
230
|
-
});
|
|
231
|
-
}, f = e, { selectedMembers: p, selectedDepartments: a } = Q(
|
|
232
|
-
u(() => f.modelValue),
|
|
233
|
-
u(() => f.treeList),
|
|
234
|
-
f.readonly
|
|
235
|
-
), o = u(() => {
|
|
236
|
-
const l = p.value.length > 0, r = a.value.length > 0;
|
|
237
|
-
return l && !r || !l && r ? S.two : S.one;
|
|
238
|
-
}), s = u(() => [...p.value, ...a.value]);
|
|
239
|
-
return U(
|
|
240
|
-
() => [f.allVisible, f.modelValue],
|
|
241
|
-
() => {
|
|
242
|
-
d();
|
|
243
|
-
},
|
|
244
|
-
{ immediate: !1, deep: !0 }
|
|
245
|
-
), z(() => {
|
|
246
|
-
d();
|
|
247
|
-
}), t({
|
|
248
|
-
allSelectedItems: s
|
|
249
|
-
}), (l, r) => (i(), h("div", {
|
|
250
|
-
ref_key: "previewRef",
|
|
251
|
-
ref: n,
|
|
252
|
-
class: M(["available-range-preview w-full overflow-hidden", {
|
|
253
|
-
"flex items-center": !e.readonly
|
|
254
|
-
}])
|
|
255
|
-
}, [
|
|
256
|
-
e.readonly ? v("", !0) : (i(), h(I, { key: 0 }, [
|
|
257
|
-
r[2] || (r[2] = E("div", { class: "text-1f2329" }, "可用范围:", -1)),
|
|
258
|
-
E("span", X, g(y(Y).find((c) => c.value === e.allVisible)?.label), 1),
|
|
259
|
-
F(y(O), {
|
|
260
|
-
class: "mg-l-16",
|
|
261
|
-
type: "primary",
|
|
262
|
-
link: "",
|
|
263
|
-
onClick: r[0] || (r[0] = (c) => l.$emit("edit"))
|
|
264
|
-
}, {
|
|
265
|
-
default: D(() => [...r[1] || (r[1] = [
|
|
266
|
-
_(" 编辑 ", -1)
|
|
267
|
-
])]),
|
|
268
|
-
_: 1
|
|
269
|
-
})
|
|
270
|
-
], 64)),
|
|
271
|
-
e.allVisible === y(R).PARTIAL ? (i(), h("div", {
|
|
272
|
-
key: 1,
|
|
273
|
-
class: M(["flex-1 overflow-hidden", { "flex items-center": !e.readonly }])
|
|
274
|
-
}, [
|
|
275
|
-
y(p)?.length ? (i(), A(N, {
|
|
276
|
-
key: 0,
|
|
277
|
-
label: "成员:",
|
|
278
|
-
items: y(p),
|
|
279
|
-
"default-show-count": o.value,
|
|
280
|
-
readonly: e.readonly
|
|
281
|
-
}, null, 8, ["items", "default-show-count", "readonly"])) : v("", !0),
|
|
282
|
-
y(a)?.length ? (i(), A(N, {
|
|
283
|
-
key: 1,
|
|
284
|
-
label: "部门:",
|
|
285
|
-
items: y(a),
|
|
286
|
-
"default-show-count": o.value,
|
|
287
|
-
readonly: e.readonly
|
|
288
|
-
}, null, 8, ["items", "default-show-count", "readonly"])) : v("", !0)
|
|
289
|
-
], 2)) : v("", !0)
|
|
290
|
-
], 2));
|
|
291
|
-
}
|
|
292
|
-
}, se = B(Z), oe = B(N);
|
|
293
|
-
export {
|
|
294
|
-
se as A,
|
|
295
|
-
S as D,
|
|
296
|
-
m as M,
|
|
297
|
-
ae as P,
|
|
298
|
-
R,
|
|
299
|
-
oe as T,
|
|
300
|
-
ne as a,
|
|
301
|
-
Y as r,
|
|
302
|
-
Q as u
|
|
303
|
-
};
|
|
@@ -1,302 +0,0 @@
|
|
|
1
|
-
import { w as B } from "./index.bCzIhWFw.js";
|
|
2
|
-
import { computed as u, createElementBlock as b, createCommentVNode as E, openBlock as i, Fragment as I, createElementVNode as v, toDisplayString as g, normalizeClass as M, createBlock as A, renderList as P, unref as p, withCtx as D, ref as C, watch as U, onMounted as z, createVNode as F, createTextVNode as _, nextTick as H } from "vue";
|
|
3
|
-
import { ElPopover as $, ElButton as O } from "element-plus";
|
|
4
|
-
import { _ as W } from "./_plugin-vue_export-helper.CHgC5LLL.js";
|
|
5
|
-
import '../assets/index2.css';const R = {
|
|
6
|
-
ALL: !0,
|
|
7
|
-
PARTIAL: !1
|
|
8
|
-
}, Y = [
|
|
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
|
-
one: 1,
|
|
26
|
-
two: 2
|
|
27
|
-
}, ae = {
|
|
28
|
-
UNPUBLISHED: 0,
|
|
29
|
-
// 未发布
|
|
30
|
-
UNDER_REVIEW: 1,
|
|
31
|
-
// 审核中
|
|
32
|
-
PUBLISHED: 2,
|
|
33
|
-
// 已发布
|
|
34
|
-
REJECTED: 3,
|
|
35
|
-
// 审核不通过
|
|
36
|
-
FAILED: 4
|
|
37
|
-
// 发布失败
|
|
38
|
-
}, q = {
|
|
39
|
-
key: 0,
|
|
40
|
-
class: "pd-l-16 text-dee0e3 pd-r-16"
|
|
41
|
-
}, G = { 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 = {
|
|
42
|
-
__name: "TagList",
|
|
43
|
-
props: {
|
|
44
|
-
// 显示的标签
|
|
45
|
-
label: {
|
|
46
|
-
type: String,
|
|
47
|
-
required: !0
|
|
48
|
-
},
|
|
49
|
-
// 数据项列表
|
|
50
|
-
items: {
|
|
51
|
-
type: Array,
|
|
52
|
-
default: () => []
|
|
53
|
-
},
|
|
54
|
-
// 默认显示的数量
|
|
55
|
-
defaultShowCount: {
|
|
56
|
-
type: Number,
|
|
57
|
-
default: S.one
|
|
58
|
-
},
|
|
59
|
-
// 是否为只读模式
|
|
60
|
-
readonly: {
|
|
61
|
-
type: Boolean,
|
|
62
|
-
default: !1
|
|
63
|
-
}
|
|
64
|
-
},
|
|
65
|
-
setup(e) {
|
|
66
|
-
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));
|
|
67
|
-
return (a, o) => e.items.length > 0 ? (i(), b(I, { key: 0 }, [
|
|
68
|
-
e.readonly ? E("", !0) : (i(), b("span", q, "|")),
|
|
69
|
-
v("span", G, g(e.label), 1),
|
|
70
|
-
v("div", {
|
|
71
|
-
class: M(["tag-list", { "flex items-center gap-4": !e.readonly }])
|
|
72
|
-
}, [
|
|
73
|
-
(i(!0), b(I, null, P(n.value, (s) => (i(), b("div", {
|
|
74
|
-
key: s.memberId,
|
|
75
|
-
class: M(["tag-item fz-12 pd-l-8 pd-r-8 radius-4 bg-eaf0fe text-3271fe", { "mg-r-4 mg-b-4": e.readonly }])
|
|
76
|
-
}, g(s.memberName), 3))), 128)),
|
|
77
|
-
!e.readonly && d.value ? (i(), A(p($), {
|
|
78
|
-
key: 0,
|
|
79
|
-
placement: "top",
|
|
80
|
-
trigger: "click",
|
|
81
|
-
width: "300"
|
|
82
|
-
}, {
|
|
83
|
-
reference: D(() => [
|
|
84
|
-
v("span", J, " +" + g(f.value), 1)
|
|
85
|
-
]),
|
|
86
|
-
default: D(() => [
|
|
87
|
-
v("div", j, [
|
|
88
|
-
(i(!0), b(I, null, P(h.value, (s) => (i(), b("span", {
|
|
89
|
-
key: s.memberId,
|
|
90
|
-
class: "tag-item nowrap fz-12 pd-l-8 pd-r-8 radius-4 bg-eaf0fe text-3271fe"
|
|
91
|
-
}, g(s.memberName), 1))), 128))
|
|
92
|
-
])
|
|
93
|
-
]),
|
|
94
|
-
_: 1
|
|
95
|
-
})) : E("", !0)
|
|
96
|
-
], 2)
|
|
97
|
-
], 64)) : E("", !0);
|
|
98
|
-
}
|
|
99
|
-
}, N = /* @__PURE__ */ W(K, [["__scopeId", "data-v-bf564085"]]), L = (e, t) => e?.filter(t) || [], w = (e, t) => L(e, (n) => n.memberType === t), x = (e, t) => {
|
|
100
|
-
if (e.children)
|
|
101
|
-
for (const n of e.children)
|
|
102
|
-
n.memberType === m.MEMBER ? t(n) : n.memberType === m.DEPARTMENT && x(n, t);
|
|
103
|
-
}, k = (e) => {
|
|
104
|
-
const t = [];
|
|
105
|
-
return x(e, (n) => t.push(n.memberId)), t;
|
|
106
|
-
};
|
|
107
|
-
function Q(e, t, n = !1) {
|
|
108
|
-
const d = u(() => {
|
|
109
|
-
if (!e.value) return [];
|
|
110
|
-
const a = [...e.value], o = w(
|
|
111
|
-
a,
|
|
112
|
-
m.DEPARTMENT
|
|
113
|
-
);
|
|
114
|
-
if (o.length > 0 && t.value && t.value.length > 0) {
|
|
115
|
-
const s = /* @__PURE__ */ new Set();
|
|
116
|
-
o.forEach((r) => {
|
|
117
|
-
const c = (y) => {
|
|
118
|
-
for (const T of y) {
|
|
119
|
-
if (T.memberType === m.DEPARTMENT && T.memberId === r.memberId)
|
|
120
|
-
return x(
|
|
121
|
-
T,
|
|
122
|
-
(V) => s.add(V)
|
|
123
|
-
), !0;
|
|
124
|
-
if (T.children && c(T.children))
|
|
125
|
-
return !0;
|
|
126
|
-
}
|
|
127
|
-
return !1;
|
|
128
|
-
};
|
|
129
|
-
c(t.value);
|
|
130
|
-
});
|
|
131
|
-
const l = new Set(
|
|
132
|
-
w(a, m.MEMBER).map(
|
|
133
|
-
(r) => r.memberId
|
|
134
|
-
)
|
|
135
|
-
);
|
|
136
|
-
s.forEach((r) => {
|
|
137
|
-
l.has(r.memberId) || a.push(r);
|
|
138
|
-
});
|
|
139
|
-
}
|
|
140
|
-
return a;
|
|
141
|
-
}), f = u(() => {
|
|
142
|
-
if (n)
|
|
143
|
-
return w(
|
|
144
|
-
d.value,
|
|
145
|
-
m.MEMBER
|
|
146
|
-
);
|
|
147
|
-
{
|
|
148
|
-
const a = /* @__PURE__ */ new Set();
|
|
149
|
-
return h.value.forEach((o) => {
|
|
150
|
-
k(o).forEach((l) => a.add(l));
|
|
151
|
-
}), L(
|
|
152
|
-
d.value,
|
|
153
|
-
(o) => o.memberType === m.MEMBER && !a.has(o.memberId)
|
|
154
|
-
);
|
|
155
|
-
}
|
|
156
|
-
}), h = u(() => {
|
|
157
|
-
if (n)
|
|
158
|
-
return w(
|
|
159
|
-
d.value,
|
|
160
|
-
m.DEPARTMENT
|
|
161
|
-
);
|
|
162
|
-
{
|
|
163
|
-
const a = [], o = (l) => {
|
|
164
|
-
if (!l.children || l.children.length === 0) return !1;
|
|
165
|
-
const r = k(l);
|
|
166
|
-
return r.length === 0 ? !1 : r.every(
|
|
167
|
-
(c) => d.value.some(
|
|
168
|
-
(y) => y.memberType === m.MEMBER && y.memberId === c
|
|
169
|
-
)
|
|
170
|
-
);
|
|
171
|
-
}, s = (l, r = !1) => {
|
|
172
|
-
if (l.memberType === m.DEPARTMENT) {
|
|
173
|
-
const c = o(l);
|
|
174
|
-
if (c && !r) {
|
|
175
|
-
if (a.push({
|
|
176
|
-
memberId: l.memberId,
|
|
177
|
-
memberName: l.memberName,
|
|
178
|
-
memberType: m.DEPARTMENT,
|
|
179
|
-
children: l.children
|
|
180
|
-
}), l.children)
|
|
181
|
-
for (const y of l.children)
|
|
182
|
-
s(y, !0);
|
|
183
|
-
} else if (!c && l.children)
|
|
184
|
-
for (const y of l.children)
|
|
185
|
-
s(y, !1);
|
|
186
|
-
}
|
|
187
|
-
};
|
|
188
|
-
for (const l of t.value)
|
|
189
|
-
s(l, !1);
|
|
190
|
-
return a;
|
|
191
|
-
}
|
|
192
|
-
});
|
|
193
|
-
return {
|
|
194
|
-
selectedMembers: f,
|
|
195
|
-
selectedDepartments: h
|
|
196
|
-
};
|
|
197
|
-
}
|
|
198
|
-
const X = { class: "fz-14 text-1f2329" }, Z = {
|
|
199
|
-
__name: "layout",
|
|
200
|
-
props: {
|
|
201
|
-
// 当前选择的范围类型(是否全部可见)
|
|
202
|
-
allVisible: {
|
|
203
|
-
type: Boolean,
|
|
204
|
-
default: R.ALL
|
|
205
|
-
},
|
|
206
|
-
// 选中的项目列表(完整对象数组,由父组件根据ID从树中查找得到)
|
|
207
|
-
modelValue: {
|
|
208
|
-
type: Array,
|
|
209
|
-
default: () => []
|
|
210
|
-
},
|
|
211
|
-
// 完整的树形数据(用于判断部门成员是否全部选中)
|
|
212
|
-
treeList: {
|
|
213
|
-
type: Array,
|
|
214
|
-
default: () => []
|
|
215
|
-
},
|
|
216
|
-
// 是否为只读模式
|
|
217
|
-
readonly: {
|
|
218
|
-
type: Boolean,
|
|
219
|
-
default: !1
|
|
220
|
-
}
|
|
221
|
-
},
|
|
222
|
-
setup(e, { expose: t }) {
|
|
223
|
-
const n = C(null), d = () => {
|
|
224
|
-
n.value && H(() => {
|
|
225
|
-
n.value.scrollIntoView({
|
|
226
|
-
behavior: "smooth",
|
|
227
|
-
block: "center"
|
|
228
|
-
});
|
|
229
|
-
});
|
|
230
|
-
}, f = e, { selectedMembers: h, selectedDepartments: a } = Q(
|
|
231
|
-
u(() => f.modelValue),
|
|
232
|
-
u(() => f.treeList),
|
|
233
|
-
f.readonly
|
|
234
|
-
), o = u(() => {
|
|
235
|
-
const l = h.value.length > 0, r = a.value.length > 0;
|
|
236
|
-
return l && !r || !l && r ? S.two : S.one;
|
|
237
|
-
}), s = u(() => [...h.value, ...a.value]);
|
|
238
|
-
return U(
|
|
239
|
-
() => [f.allVisible, f.modelValue],
|
|
240
|
-
() => {
|
|
241
|
-
d();
|
|
242
|
-
},
|
|
243
|
-
{ immediate: !1, deep: !0 }
|
|
244
|
-
), z(() => {
|
|
245
|
-
d();
|
|
246
|
-
}), t({
|
|
247
|
-
allSelectedItems: s
|
|
248
|
-
}), (l, r) => (i(), b("div", {
|
|
249
|
-
ref_key: "previewRef",
|
|
250
|
-
ref: n,
|
|
251
|
-
class: M(["available-range-preview w-full overflow-hidden", {
|
|
252
|
-
"flex items-center": !e.readonly
|
|
253
|
-
}])
|
|
254
|
-
}, [
|
|
255
|
-
e.readonly ? E("", !0) : (i(), b(I, { key: 0 }, [
|
|
256
|
-
r[2] || (r[2] = v("div", { class: "text-1f2329" }, "可用范围:", -1)),
|
|
257
|
-
v("span", X, g(p(Y).find((c) => c.value === e.allVisible)?.label), 1),
|
|
258
|
-
F(p(O), {
|
|
259
|
-
class: "mg-l-16",
|
|
260
|
-
type: "primary",
|
|
261
|
-
link: "",
|
|
262
|
-
onClick: r[0] || (r[0] = (c) => l.$emit("edit"))
|
|
263
|
-
}, {
|
|
264
|
-
default: D(() => [...r[1] || (r[1] = [
|
|
265
|
-
_(" 编辑 ", -1)
|
|
266
|
-
])]),
|
|
267
|
-
_: 1
|
|
268
|
-
})
|
|
269
|
-
], 64)),
|
|
270
|
-
e.allVisible === p(R).PARTIAL ? (i(), b("div", {
|
|
271
|
-
key: 1,
|
|
272
|
-
class: M(["flex-1 overflow-hidden", { "flex items-center": !e.readonly }])
|
|
273
|
-
}, [
|
|
274
|
-
p(h)?.length ? (i(), A(N, {
|
|
275
|
-
key: 0,
|
|
276
|
-
label: "成员:",
|
|
277
|
-
items: p(h),
|
|
278
|
-
"default-show-count": o.value,
|
|
279
|
-
readonly: e.readonly
|
|
280
|
-
}, null, 8, ["items", "default-show-count", "readonly"])) : E("", !0),
|
|
281
|
-
p(a)?.length ? (i(), A(N, {
|
|
282
|
-
key: 1,
|
|
283
|
-
label: "部门:",
|
|
284
|
-
items: p(a),
|
|
285
|
-
"default-show-count": o.value,
|
|
286
|
-
readonly: e.readonly
|
|
287
|
-
}, null, 8, ["items", "default-show-count", "readonly"])) : E("", !0)
|
|
288
|
-
], 2)) : E("", !0)
|
|
289
|
-
], 2));
|
|
290
|
-
}
|
|
291
|
-
}, se = B(Z), oe = B(N);
|
|
292
|
-
export {
|
|
293
|
-
se as A,
|
|
294
|
-
S as D,
|
|
295
|
-
m as M,
|
|
296
|
-
ae as P,
|
|
297
|
-
R,
|
|
298
|
-
oe as T,
|
|
299
|
-
ne as a,
|
|
300
|
-
Y as r,
|
|
301
|
-
Q as u
|
|
302
|
-
};
|