china-mobile-international-custom-components 0.0.46 → 0.0.48
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/ApplicationTypeTag.mjs +1 -1
- package/es/AvailableRangePreview.mjs +1 -1
- package/es/AvailableRangeSetting.mjs +2 -2
- package/es/CommonTagsList.mjs +3 -3
- package/es/CustomSidebar.mjs +1 -1
- package/es/FileUploader.mjs +1 -1
- package/es/ParameterTable.mjs +1 -1
- package/es/SourcePublish.mjs +6 -6
- package/es/Table.mjs +2 -2
- package/es/assets/index3.css +1 -0
- package/es/assets/layout2.css +1 -1
- package/es/chunks/{BackBar.DY42HcZy.js → BackBar.9Pp2SYB-.js} +1 -1
- package/es/chunks/{BackBar.eaUb1JvV.js → BackBar.DwhmSL-a.js} +98 -98
- package/es/chunks/{config.CvOtShOj.js → config.DVEvXGIL.js} +2 -2
- package/es/chunks/{i18n.CfMhDOdX.js → i18n.BNeBD4gR.js} +6 -6
- package/es/chunks/{i18n.Bd7hh14j.js → i18n.DMVLcyDY.js} +2 -2
- package/es/chunks/i18n.DUrvNBQz.js +4028 -0
- package/es/chunks/index.BcLVH95_.js +4058 -0
- package/es/chunks/index.CSPp4g5C.js +303 -0
- package/es/chunks/{index.DjDvyGXt.js → index.CZTB65ge.js} +1 -1
- package/es/chunks/index.ClqvUq64.js +302 -0
- package/es/chunks/index.Dh5IGfxO.js +290 -0
- package/es/chunks/index.Doax01RQ.js +254 -0
- package/es/chunks/{layout.B1qqvrXz.js → layout.OCgfqjXG.js} +129 -113
- package/es/index.mjs +5 -5
- 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/CustomSidebar.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/index3.css +1 -0
- package/lib/assets/layout2.css +1 -1
- package/lib/chunks/BackBar.CYThcqhK.js +1 -0
- package/lib/chunks/{BackBar.CaaASGvb.js → BackBar.DFDSVp2a.js} +1 -1
- package/lib/chunks/{config.CqfpM51B.js → config.Dwnp4fRZ.js} +1 -1
- package/lib/chunks/{i18n.D3L1FBDI.js → i18n.Bzvn6t8H.js} +2 -2
- package/lib/chunks/i18n.D-d0yyXi.js +6 -0
- package/lib/chunks/index.6X8xsqRJ.js +1 -0
- package/lib/chunks/index.Bk55us0s.js +1 -0
- package/lib/chunks/index.CP9rhXZ5.js +1 -0
- package/lib/chunks/index.CSLWrMRE.js +1 -0
- package/lib/chunks/index.CV29Us4A.js +6 -0
- package/lib/chunks/{index.D-pFPuUr.js → index.DO3h_zf2.js} +1 -1
- package/lib/chunks/layout.B6GgWqWq.js +1 -0
- package/lib/index.js +1 -1
- package/package.json +4 -4
- package/es/chunks/config.CyAT4SUn.js +0 -435
- package/es/chunks/config.JrGX09T5.js +0 -435
- package/es/chunks/index.CHlFhI6c.js +0 -313
- package/lib/chunks/BackBar.By7ouDgL.js +0 -1
- package/lib/chunks/config.BInpXFGZ.js +0 -1
- package/lib/chunks/config.CL0cmPQ6.js +0 -1
- package/lib/chunks/index.zQ1SfvBa.js +0 -1
- package/lib/chunks/layout.Cen7E9tF.js +0 -1
|
@@ -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
|
+
};
|
|
@@ -0,0 +1,254 @@
|
|
|
1
|
+
import { w as U } from "./index.bCzIhWFw.js";
|
|
2
|
+
import { ref as r, computed as w, createBlock as _, openBlock as V, unref as m, withCtx as g, createElementVNode as P, createVNode as R, createElementBlock as k, createCommentVNode as x, Fragment as M, renderList as $, createTextVNode as E, toDisplayString as G, getCurrentInstance as O, watch as D, onMounted as F } from "vue";
|
|
3
|
+
import { emitsMap as a } from "color-star-custom-methods";
|
|
4
|
+
import { R as S, u as j, r as q, a as H, A as Y } from "./index.CSPp4g5C.js";
|
|
5
|
+
import { ElDialog as z, ElRadioGroup as J, ElRadio as K, ElButton as N } from "element-plus";
|
|
6
|
+
import { TreeShowSelect as Q } from "color-star-custom-components";
|
|
7
|
+
import '../assets/index2.css';const W = { class: "dialog-content" }, X = {
|
|
8
|
+
key: 0,
|
|
9
|
+
class: "selection-area overflow-hidden"
|
|
10
|
+
}, Z = { class: "dialog-footer" }, ee = {
|
|
11
|
+
__name: "Dialog",
|
|
12
|
+
props: {
|
|
13
|
+
// 弹窗显示控制
|
|
14
|
+
visible: {
|
|
15
|
+
type: Boolean,
|
|
16
|
+
default: !1
|
|
17
|
+
},
|
|
18
|
+
// 当前选择的范围类型(是否全部可见)
|
|
19
|
+
allVisible: {
|
|
20
|
+
type: Boolean,
|
|
21
|
+
default: S.ALL
|
|
22
|
+
},
|
|
23
|
+
// 选中的项目列表
|
|
24
|
+
modelValue: {
|
|
25
|
+
type: Array,
|
|
26
|
+
default: () => []
|
|
27
|
+
},
|
|
28
|
+
// 树形数据
|
|
29
|
+
treeList: {
|
|
30
|
+
type: Array,
|
|
31
|
+
default: () => []
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
emits: [
|
|
35
|
+
a.updateVisible,
|
|
36
|
+
a.save,
|
|
37
|
+
a.cancel
|
|
38
|
+
],
|
|
39
|
+
setup(p, { emit: y }) {
|
|
40
|
+
const b = p, v = y, L = r(!0), c = r(b.allVisible), t = r([...b.modelValue]), h = r(), { selectedMembers: A, selectedDepartments: u } = j(
|
|
41
|
+
t,
|
|
42
|
+
w(() => b.treeList),
|
|
43
|
+
!1
|
|
44
|
+
// 编辑模式
|
|
45
|
+
), s = w(() => {
|
|
46
|
+
const i = [];
|
|
47
|
+
return u.value.forEach((e) => {
|
|
48
|
+
i.push({
|
|
49
|
+
...e,
|
|
50
|
+
// TreeSelect列表模式不需要children
|
|
51
|
+
children: void 0
|
|
52
|
+
});
|
|
53
|
+
}), A.value.forEach((e) => {
|
|
54
|
+
i.push({
|
|
55
|
+
...e,
|
|
56
|
+
children: void 0
|
|
57
|
+
});
|
|
58
|
+
}), i;
|
|
59
|
+
}), f = (i) => {
|
|
60
|
+
c.value = i, i === S.ALL && (t.value = []);
|
|
61
|
+
}, T = (i) => {
|
|
62
|
+
const { selectedNode: e } = i;
|
|
63
|
+
t.value = e || [];
|
|
64
|
+
}, I = () => {
|
|
65
|
+
v(a.cancel), v(a.updateVisible, !1);
|
|
66
|
+
}, C = () => {
|
|
67
|
+
v(a.save, {
|
|
68
|
+
type: c.value,
|
|
69
|
+
selectedItems: [...t.value]
|
|
70
|
+
}), v(a.updateVisible, !1);
|
|
71
|
+
};
|
|
72
|
+
return (i, e) => (V(), _(m(z), {
|
|
73
|
+
modelValue: L.value,
|
|
74
|
+
"onUpdate:modelValue": e[2] || (e[2] = (o) => L.value = o),
|
|
75
|
+
title: "可用范围设置",
|
|
76
|
+
"close-on-click-modal": !1,
|
|
77
|
+
"close-on-press-escape": !1,
|
|
78
|
+
"append-to-body": "",
|
|
79
|
+
onClose: I,
|
|
80
|
+
"modal-class": "available-range-setting-dialog"
|
|
81
|
+
}, {
|
|
82
|
+
footer: g(() => [
|
|
83
|
+
P("div", Z, [
|
|
84
|
+
R(m(N), {
|
|
85
|
+
onClick: I,
|
|
86
|
+
plain: ""
|
|
87
|
+
}, {
|
|
88
|
+
default: g(() => [...e[3] || (e[3] = [
|
|
89
|
+
E("取消", -1)
|
|
90
|
+
])]),
|
|
91
|
+
_: 1
|
|
92
|
+
}),
|
|
93
|
+
R(m(N), {
|
|
94
|
+
type: "primary",
|
|
95
|
+
onClick: C
|
|
96
|
+
}, {
|
|
97
|
+
default: g(() => [...e[4] || (e[4] = [
|
|
98
|
+
E("保存", -1)
|
|
99
|
+
])]),
|
|
100
|
+
_: 1
|
|
101
|
+
})
|
|
102
|
+
])
|
|
103
|
+
]),
|
|
104
|
+
default: g(() => [
|
|
105
|
+
P("div", W, [
|
|
106
|
+
R(m(J), {
|
|
107
|
+
class: "pd-b-16",
|
|
108
|
+
modelValue: c.value,
|
|
109
|
+
"onUpdate:modelValue": e[0] || (e[0] = (o) => c.value = o),
|
|
110
|
+
onChange: f
|
|
111
|
+
}, {
|
|
112
|
+
default: g(() => [
|
|
113
|
+
(V(!0), k(M, null, $(m(q), (o) => (V(), _(m(K), {
|
|
114
|
+
key: o.value,
|
|
115
|
+
value: o.value
|
|
116
|
+
}, {
|
|
117
|
+
default: g(() => [
|
|
118
|
+
E(G(o.label), 1)
|
|
119
|
+
]),
|
|
120
|
+
_: 2
|
|
121
|
+
}, 1032, ["value"]))), 128))
|
|
122
|
+
]),
|
|
123
|
+
_: 1
|
|
124
|
+
}, 8, ["modelValue"]),
|
|
125
|
+
c.value === m(S).PARTIAL ? (V(), k("div", X, [
|
|
126
|
+
R(m(Q), {
|
|
127
|
+
modelValue: t.value,
|
|
128
|
+
"onUpdate:modelValue": e[1] || (e[1] = (o) => t.value = o),
|
|
129
|
+
ref_key: "treeRef",
|
|
130
|
+
ref: h,
|
|
131
|
+
treeProps: m(H),
|
|
132
|
+
treeList: p.treeList,
|
|
133
|
+
hasFilter: !0,
|
|
134
|
+
rightTreeList: s.value,
|
|
135
|
+
style: { height: "500px" },
|
|
136
|
+
onGetCheckedNode: T
|
|
137
|
+
}, null, 8, ["modelValue", "treeProps", "treeList", "rightTreeList"])
|
|
138
|
+
])) : x("", !0)
|
|
139
|
+
])
|
|
140
|
+
]),
|
|
141
|
+
_: 1
|
|
142
|
+
}, 8, ["modelValue"]));
|
|
143
|
+
}
|
|
144
|
+
}, le = () => O().appContext.config.globalProperties, ae = () => {
|
|
145
|
+
const { $request: p, $env: y } = le();
|
|
146
|
+
return {
|
|
147
|
+
availableRangeApi: () => p({
|
|
148
|
+
url: `${y.VITE_APP_AUTH_BASE_URL}/api/v1/admin/member/search`,
|
|
149
|
+
method: "get"
|
|
150
|
+
})
|
|
151
|
+
};
|
|
152
|
+
}, te = { class: "available-range-setting w-full" }, se = /* @__PURE__ */ Object.assign({
|
|
153
|
+
name: "AvailableRangeSetting"
|
|
154
|
+
}, {
|
|
155
|
+
__name: "layout",
|
|
156
|
+
props: {
|
|
157
|
+
// 当前选择的范围类型(是否全部可见)
|
|
158
|
+
allVisible: {
|
|
159
|
+
type: Boolean,
|
|
160
|
+
default: S.ALL
|
|
161
|
+
},
|
|
162
|
+
// 选中的项目列表
|
|
163
|
+
modelValue: {
|
|
164
|
+
type: Array,
|
|
165
|
+
default: () => []
|
|
166
|
+
}
|
|
167
|
+
},
|
|
168
|
+
emits: [
|
|
169
|
+
a.updateAllVisible,
|
|
170
|
+
a.updateModelValue,
|
|
171
|
+
a.change
|
|
172
|
+
],
|
|
173
|
+
setup(p, { expose: y, emit: b }) {
|
|
174
|
+
const v = p, { availableRangeApi: L } = ae(), c = b, t = r(!1), h = r(!1), A = r([]), u = r(v.allVisible), s = r(v.modelValue), f = r(
|
|
175
|
+
new Set(s.value?.map((l) => l.memberId))
|
|
176
|
+
), T = () => {
|
|
177
|
+
h.value = !0, L().then((l) => {
|
|
178
|
+
A.value = l?.data?.orgOptionSoList || [];
|
|
179
|
+
}).finally(() => {
|
|
180
|
+
h.value = !1;
|
|
181
|
+
});
|
|
182
|
+
}, I = () => {
|
|
183
|
+
t.value = !0;
|
|
184
|
+
}, C = (l) => {
|
|
185
|
+
u.value = l.type, s.value = l.selectedItems, f.value.clear(), s.value.forEach((n) => {
|
|
186
|
+
f.value.add(n.memberId);
|
|
187
|
+
}), c(a.updateAllVisible, u.value), c(a.updateModelValue, s.value), e();
|
|
188
|
+
}, i = () => {
|
|
189
|
+
t.value = !1;
|
|
190
|
+
}, e = () => {
|
|
191
|
+
const l = {
|
|
192
|
+
allVisible: u.value,
|
|
193
|
+
selectedItems: s.value
|
|
194
|
+
};
|
|
195
|
+
c(a.change, l);
|
|
196
|
+
}, o = r(null), B = () => {
|
|
197
|
+
const l = o.value?.allSelectedItems || [];
|
|
198
|
+
return {
|
|
199
|
+
allVisible: u.value,
|
|
200
|
+
visibleScope: l.map((d) => ({
|
|
201
|
+
memberId: d.memberId,
|
|
202
|
+
memberName: d.memberName,
|
|
203
|
+
memberType: d.memberType,
|
|
204
|
+
bnid: d.bnid
|
|
205
|
+
}))
|
|
206
|
+
};
|
|
207
|
+
};
|
|
208
|
+
return D(
|
|
209
|
+
() => v.allVisible,
|
|
210
|
+
(l) => {
|
|
211
|
+
u.value = l;
|
|
212
|
+
},
|
|
213
|
+
{ immediate: !0 }
|
|
214
|
+
), D(
|
|
215
|
+
() => v.modelValue,
|
|
216
|
+
(l) => {
|
|
217
|
+
s.value = l || [], f.value.clear(), s.value.forEach((n) => {
|
|
218
|
+
f.value.add(n.memberId);
|
|
219
|
+
});
|
|
220
|
+
},
|
|
221
|
+
{ immediate: !0 }
|
|
222
|
+
), F(() => {
|
|
223
|
+
T();
|
|
224
|
+
}), y({
|
|
225
|
+
getSelectedItems: B
|
|
226
|
+
}), (l, n) => (V(), k("div", te, [
|
|
227
|
+
R(m(Y), {
|
|
228
|
+
allVisible: u.value,
|
|
229
|
+
"model-value": s.value,
|
|
230
|
+
"tree-list": A.value,
|
|
231
|
+
onEdit: I,
|
|
232
|
+
ref_key: "previewRef",
|
|
233
|
+
ref: o
|
|
234
|
+
}, null, 8, ["allVisible", "model-value", "tree-list"]),
|
|
235
|
+
t.value ? (V(), _(ee, {
|
|
236
|
+
key: 0,
|
|
237
|
+
visible: t.value,
|
|
238
|
+
"onUpdate:visible": n[0] || (n[0] = (d) => t.value = d),
|
|
239
|
+
allVisible: u.value,
|
|
240
|
+
"onUpdate:allVisible": n[1] || (n[1] = (d) => u.value = d),
|
|
241
|
+
modelValue: s.value,
|
|
242
|
+
"onUpdate:modelValue": n[2] || (n[2] = (d) => s.value = d),
|
|
243
|
+
"tree-list": A.value,
|
|
244
|
+
loading: h.value,
|
|
245
|
+
onSave: C,
|
|
246
|
+
onCancel: i
|
|
247
|
+
}, null, 8, ["visible", "allVisible", "modelValue", "tree-list", "loading"])) : x("", !0)
|
|
248
|
+
]));
|
|
249
|
+
}
|
|
250
|
+
}), me = U(se);
|
|
251
|
+
export {
|
|
252
|
+
me as A,
|
|
253
|
+
le as g
|
|
254
|
+
};
|