aibox-custom-component-packages 0.0.2 → 0.0.4
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/AiboxTabs.mjs +73 -0
- package/es/AvailableRangePreview.mjs +7 -0
- package/es/AvailableRangeSetting.mjs +271 -0
- package/es/CommonTagsList.mjs +209 -0
- package/es/DialogContainer.mjs +136 -0
- package/es/FileUploader.mjs +11 -0
- package/es/PageContainer.mjs +13 -0
- package/es/PublishRecord.mjs +179 -0
- package/es/SourcePublish.mjs +1154 -0
- package/es/Table.mjs +10 -0
- package/es/assets/AiboxTabs.css +1 -0
- package/es/assets/BackBar.css +1 -0
- package/es/assets/CommonTagsList.css +1 -0
- package/es/assets/DialogContainer.css +1 -0
- package/es/assets/PublishRecord.css +1 -0
- package/es/assets/SourcePublish.css +1 -0
- package/es/assets/index2.css +1 -0
- package/es/chunks/BackBar.Bc2NIuzk.js +645 -0
- package/es/chunks/BackBar.Cv1wxUcM.js +645 -0
- package/es/chunks/BackBar.DJV4JaUM.js +645 -0
- package/es/chunks/_plugin-vue_export-helper.CHgC5LLL.js +9 -0
- package/es/chunks/config.8htFF04x.js +325 -0
- package/es/chunks/config.BPp4hMBq.js +325 -0
- package/es/chunks/config.BU21Gda2.js +49 -0
- package/es/chunks/config.BzCGum_W.js +49 -0
- package/es/chunks/config.CFWGjEdA.js +49 -0
- package/es/chunks/config.CfWAdyUH.js +325 -0
- package/es/chunks/config.DTMcCH58.js +325 -0
- package/es/chunks/enums.CfSBDD6u.js +83 -0
- package/es/chunks/i18n.DmqkiK-h.js +444 -0
- package/es/chunks/i18n.Vhq-tZPw.js +94 -0
- package/es/chunks/i18n.ro9yz7rE.js +94 -0
- package/es/chunks/index.DB0ayMv8.js +257 -0
- package/es/chunks/index.aMb6IVQD.js +257 -0
- package/es/chunks/index.bCzIhWFw.js +7 -0
- package/es/chunks/index.ml5i7aB5.js +257 -0
- package/es/chunks/index.s-YxIOfq.js +301 -0
- package/es/chunks/publish.BCb7nCo9.js +50 -0
- package/es/chunks/publish.D6friivo.js +50 -0
- package/es/chunks/publish.Dqzn7qEl.js +50 -0
- package/es/i18n.mjs +17 -0
- package/es/index.mjs +312 -10
- package/lib/AiboxTabs.js +1 -0
- package/lib/AvailableRangePreview.js +1 -0
- package/lib/AvailableRangeSetting.js +1 -0
- package/lib/CommonTagsList.js +1 -0
- package/lib/DialogContainer.js +1 -0
- package/lib/FileUploader.js +1 -0
- package/lib/PageContainer.js +1 -0
- package/lib/PublishRecord.js +5 -0
- package/lib/SourcePublish.js +1 -0
- package/lib/Table.js +1 -0
- package/lib/assets/AiboxTabs.css +1 -0
- package/lib/assets/BackBar.css +1 -0
- package/lib/assets/CommonTagsList.css +1 -0
- package/lib/assets/DialogContainer.css +1 -0
- package/lib/assets/PublishRecord.css +1 -0
- package/lib/assets/SourcePublish.css +1 -0
- package/lib/assets/index2.css +1 -0
- package/lib/chunks/BackBar.CZsNxoX1.js +1 -0
- package/lib/chunks/BackBar.s5_vN6jt.js +1 -0
- package/lib/chunks/_plugin-vue_export-helper.BHFhmbuH.js +1 -0
- package/lib/chunks/config.B0XKkp1w.js +1 -0
- package/lib/chunks/config.BCAuBVxV.js +1 -0
- package/lib/chunks/config.Bs7sh3aP.js +1 -0
- package/lib/chunks/config.C1w4hgfw.js +1 -0
- package/lib/chunks/config.ClERt2RF.js +1 -0
- package/lib/chunks/enums.Dmq4PdUc.js +1 -0
- package/lib/chunks/i18n.CL5L6nx6.js +1 -0
- package/lib/chunks/i18n.aAXi5igh.js +1 -0
- package/lib/chunks/index.BNqTEn3K.js +1 -0
- package/lib/chunks/index.Bk-RwmaH.js +1 -0
- package/lib/chunks/index.BsN4urmi.js +1 -0
- package/lib/chunks/index.CkihWzK6.js +1 -0
- package/lib/chunks/publish.Bw1acrSu.js +1 -0
- package/lib/chunks/publish.CA1uSVnm.js +1 -0
- package/lib/i18n.js +1 -0
- package/lib/index.js +4 -1
- package/package.json +55 -9
|
@@ -0,0 +1,257 @@
|
|
|
1
|
+
import { w as _ } from "./index.bCzIhWFw.js";
|
|
2
|
+
import { computed as p, createElementBlock as b, createCommentVNode as h, openBlock as m, Fragment as N, createElementVNode as M, toDisplayString as E, normalizeClass as w, createBlock as D, renderList as k, unref as i, withCtx as A, ref as P, watch as O, onMounted as L, createVNode as z, createTextVNode as U, nextTick as F } from "vue";
|
|
3
|
+
import { ElPopover as $, ElButton as G } from "element-plus";
|
|
4
|
+
import { D as g, M as c, R as B, r as Y } from "./config.BU21Gda2.js";
|
|
5
|
+
import { _ as q } from "./_plugin-vue_export-helper.CHgC5LLL.js";
|
|
6
|
+
import { u as H } from "./i18n.DmqkiK-h.js";
|
|
7
|
+
import '../assets/index2.css';const W = {
|
|
8
|
+
key: 0,
|
|
9
|
+
class: "pd-l-16 text-dee0e3 pd-r-16"
|
|
10
|
+
}, X = { 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 = {
|
|
11
|
+
__name: "TagList",
|
|
12
|
+
props: {
|
|
13
|
+
// 显示的标签
|
|
14
|
+
label: {
|
|
15
|
+
type: String,
|
|
16
|
+
required: !0
|
|
17
|
+
},
|
|
18
|
+
// 数据项列表
|
|
19
|
+
items: {
|
|
20
|
+
type: Array,
|
|
21
|
+
default: () => []
|
|
22
|
+
},
|
|
23
|
+
// 是否为只读模式
|
|
24
|
+
readonly: {
|
|
25
|
+
type: Boolean,
|
|
26
|
+
default: !1
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
setup(e) {
|
|
30
|
+
const t = e, l = p(() => t.readonly ? t.items : t.items.slice(0, g.one)), d = p(() => t.items.length > g.one), T = p(() => t.items.length - g.one), u = p(() => t.items.slice(g.one));
|
|
31
|
+
return (n, s) => e.items.length > 0 ? (m(), b(N, { key: 0 }, [
|
|
32
|
+
e.readonly ? h("", !0) : (m(), b("span", W, "|")),
|
|
33
|
+
M("span", X, E(e.label), 1),
|
|
34
|
+
M("div", {
|
|
35
|
+
class: w(["tag-list", { "flex items-center gap-4": !e.readonly }])
|
|
36
|
+
}, [
|
|
37
|
+
(m(!0), b(N, null, k(l.value, (a) => (m(), b("div", {
|
|
38
|
+
key: a.memberId,
|
|
39
|
+
class: w(["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 }])
|
|
40
|
+
}, E(a.memberName), 3))), 128)),
|
|
41
|
+
!e.readonly && d.value ? (m(), D(i($), {
|
|
42
|
+
key: 0,
|
|
43
|
+
placement: "top",
|
|
44
|
+
trigger: "click",
|
|
45
|
+
width: "300",
|
|
46
|
+
"popper-class": "tag-list-popover-wrapper"
|
|
47
|
+
}, {
|
|
48
|
+
reference: A(() => [
|
|
49
|
+
M("span", j, " +" + E(T.value), 1)
|
|
50
|
+
]),
|
|
51
|
+
default: A(() => [
|
|
52
|
+
M("div", J, [
|
|
53
|
+
(m(!0), b(N, null, k(u.value, (a) => (m(), b("span", {
|
|
54
|
+
key: a.memberId,
|
|
55
|
+
class: "tag-item nowrap fz-12 pd-l-8 pd-r-8 radius-4 bg-eaf0fe text-3271fe"
|
|
56
|
+
}, E(a.memberName), 1))), 128))
|
|
57
|
+
])
|
|
58
|
+
]),
|
|
59
|
+
_: 1
|
|
60
|
+
})) : h("", !0)
|
|
61
|
+
], 2)
|
|
62
|
+
], 64)) : h("", !0);
|
|
63
|
+
}
|
|
64
|
+
}, R = /* @__PURE__ */ q(K, [["__scopeId", "data-v-eecd9e0b"]]), V = (e, t) => e?.filter(t) || [], I = (e, t) => V(e, (l) => l.memberType === t), x = (e, t) => {
|
|
65
|
+
if (e.children)
|
|
66
|
+
for (const l of e.children)
|
|
67
|
+
l.memberType === c.MEMBER ? t(l) : l.memberType === c.DEPARTMENT && x(l, t);
|
|
68
|
+
}, S = (e) => {
|
|
69
|
+
const t = [];
|
|
70
|
+
return x(e, (l) => t.push(l.memberId)), t;
|
|
71
|
+
};
|
|
72
|
+
function Q(e, t, l = !1) {
|
|
73
|
+
const d = p(() => {
|
|
74
|
+
if (!e.value) return [];
|
|
75
|
+
const n = [...e.value], s = I(
|
|
76
|
+
n,
|
|
77
|
+
c.DEPARTMENT
|
|
78
|
+
);
|
|
79
|
+
if (s.length > 0 && t.value && t.value.length > 0) {
|
|
80
|
+
const a = /* @__PURE__ */ new Set();
|
|
81
|
+
s.forEach((o) => {
|
|
82
|
+
const f = (y) => {
|
|
83
|
+
for (const v of y) {
|
|
84
|
+
if (v.memberType === c.DEPARTMENT && v.memberId === o.memberId)
|
|
85
|
+
return x(
|
|
86
|
+
v,
|
|
87
|
+
(C) => a.add(C)
|
|
88
|
+
), !0;
|
|
89
|
+
if (v.children && f(v.children))
|
|
90
|
+
return !0;
|
|
91
|
+
}
|
|
92
|
+
return !1;
|
|
93
|
+
};
|
|
94
|
+
f(t.value);
|
|
95
|
+
});
|
|
96
|
+
const r = new Set(
|
|
97
|
+
I(n, c.MEMBER).map(
|
|
98
|
+
(o) => o.memberId
|
|
99
|
+
)
|
|
100
|
+
);
|
|
101
|
+
a.forEach((o) => {
|
|
102
|
+
r.has(o.memberId) || n.push(o);
|
|
103
|
+
});
|
|
104
|
+
}
|
|
105
|
+
return n;
|
|
106
|
+
}), T = p(() => {
|
|
107
|
+
if (l)
|
|
108
|
+
return I(
|
|
109
|
+
d.value,
|
|
110
|
+
c.MEMBER
|
|
111
|
+
);
|
|
112
|
+
{
|
|
113
|
+
const n = /* @__PURE__ */ new Set();
|
|
114
|
+
return u.value.forEach((s) => {
|
|
115
|
+
S(s).forEach((r) => n.add(r));
|
|
116
|
+
}), V(
|
|
117
|
+
d.value,
|
|
118
|
+
(s) => s.memberType === c.MEMBER && !n.has(s.memberId)
|
|
119
|
+
);
|
|
120
|
+
}
|
|
121
|
+
}), u = p(() => {
|
|
122
|
+
if (l)
|
|
123
|
+
return I(
|
|
124
|
+
d.value,
|
|
125
|
+
c.DEPARTMENT
|
|
126
|
+
);
|
|
127
|
+
{
|
|
128
|
+
const n = [], s = (r) => {
|
|
129
|
+
if (!r.children || r.children.length === 0) return !1;
|
|
130
|
+
const o = S(r);
|
|
131
|
+
return o.length === 0 ? !1 : o.every(
|
|
132
|
+
(f) => d.value.some(
|
|
133
|
+
(y) => y.memberType === c.MEMBER && y.memberId === f
|
|
134
|
+
)
|
|
135
|
+
);
|
|
136
|
+
}, a = (r, o = !1) => {
|
|
137
|
+
if (r.memberType === c.DEPARTMENT) {
|
|
138
|
+
const f = s(r);
|
|
139
|
+
if (f && !o) {
|
|
140
|
+
if (n.push({
|
|
141
|
+
memberId: r.memberId,
|
|
142
|
+
memberName: r.memberName,
|
|
143
|
+
memberType: c.DEPARTMENT,
|
|
144
|
+
bnid: r.bnid,
|
|
145
|
+
children: r.children
|
|
146
|
+
}), r.children)
|
|
147
|
+
for (const y of r.children)
|
|
148
|
+
a(y, !0);
|
|
149
|
+
} else if (!f && r.children)
|
|
150
|
+
for (const y of r.children)
|
|
151
|
+
a(y, !1);
|
|
152
|
+
}
|
|
153
|
+
};
|
|
154
|
+
for (const r of t.value)
|
|
155
|
+
a(r, !1);
|
|
156
|
+
return n;
|
|
157
|
+
}
|
|
158
|
+
});
|
|
159
|
+
return {
|
|
160
|
+
selectedMembers: T,
|
|
161
|
+
selectedDepartments: u
|
|
162
|
+
};
|
|
163
|
+
}
|
|
164
|
+
const Z = { class: "text-1f2329" }, ee = { class: "fz-14 text-1f2329" }, te = {
|
|
165
|
+
__name: "layout",
|
|
166
|
+
props: {
|
|
167
|
+
// 当前选择的范围类型(是否全部可见)
|
|
168
|
+
allVisible: {
|
|
169
|
+
type: Boolean,
|
|
170
|
+
default: B.ALL
|
|
171
|
+
},
|
|
172
|
+
// 选中的项目列表(完整对象数组,由父组件根据ID从树中查找得到)
|
|
173
|
+
modelValue: {
|
|
174
|
+
type: Array,
|
|
175
|
+
default: () => []
|
|
176
|
+
},
|
|
177
|
+
// 完整的树形数据(用于判断部门成员是否全部选中)
|
|
178
|
+
treeList: {
|
|
179
|
+
type: Array,
|
|
180
|
+
default: () => []
|
|
181
|
+
},
|
|
182
|
+
// 是否为只读模式
|
|
183
|
+
readonly: {
|
|
184
|
+
type: Boolean,
|
|
185
|
+
default: !1
|
|
186
|
+
}
|
|
187
|
+
},
|
|
188
|
+
setup(e, { expose: t }) {
|
|
189
|
+
const { t: l } = H(), d = P(null), T = () => {
|
|
190
|
+
d.value && F(() => {
|
|
191
|
+
d.value.scrollIntoView({
|
|
192
|
+
behavior: "smooth",
|
|
193
|
+
block: "center"
|
|
194
|
+
});
|
|
195
|
+
});
|
|
196
|
+
}, u = e, { selectedMembers: n, selectedDepartments: s } = Q(
|
|
197
|
+
p(() => u.modelValue),
|
|
198
|
+
p(() => u.treeList),
|
|
199
|
+
u.readonly
|
|
200
|
+
), a = p(() => [...n.value, ...s.value]);
|
|
201
|
+
return O(
|
|
202
|
+
() => [u.allVisible, u.modelValue],
|
|
203
|
+
() => {
|
|
204
|
+
T();
|
|
205
|
+
},
|
|
206
|
+
{ immediate: !1, deep: !0 }
|
|
207
|
+
), L(() => {
|
|
208
|
+
T();
|
|
209
|
+
}), t({
|
|
210
|
+
allSelectedItems: a
|
|
211
|
+
}), (r, o) => (m(), b("div", {
|
|
212
|
+
ref_key: "previewRef",
|
|
213
|
+
ref: d,
|
|
214
|
+
class: w(["available-range-preview w-full overflow-hidden", {
|
|
215
|
+
"flex items-center": !e.readonly
|
|
216
|
+
}])
|
|
217
|
+
}, [
|
|
218
|
+
e.readonly ? h("", !0) : (m(), b(N, { key: 0 }, [
|
|
219
|
+
M("div", Z, E(i(l)("COMMON_DICT.ENUMS.AVAILABLE_RANGE")) + ": ", 1),
|
|
220
|
+
M("span", ee, E(i(Y).find((f) => f.value === e.allVisible)?.label), 1),
|
|
221
|
+
z(i(G), {
|
|
222
|
+
class: "mg-l-16",
|
|
223
|
+
type: "primary",
|
|
224
|
+
link: "",
|
|
225
|
+
onClick: o[0] || (o[0] = (f) => r.$emit("edit"))
|
|
226
|
+
}, {
|
|
227
|
+
default: A(() => [
|
|
228
|
+
U(E(i(l)("COMMON_BUTTON.EDIT_TEXT")), 1)
|
|
229
|
+
]),
|
|
230
|
+
_: 1
|
|
231
|
+
})
|
|
232
|
+
], 64)),
|
|
233
|
+
e.allVisible === i(B).PARTIAL ? (m(), b("div", {
|
|
234
|
+
key: 1,
|
|
235
|
+
class: w(["flex-1 overflow-hidden", { "flex items-center": !e.readonly }])
|
|
236
|
+
}, [
|
|
237
|
+
i(n)?.length ? (m(), D(R, {
|
|
238
|
+
key: 0,
|
|
239
|
+
label: i(l)("COMMON_DICT.ENUMS.MEMBER") + ":",
|
|
240
|
+
items: i(n),
|
|
241
|
+
readonly: e.readonly
|
|
242
|
+
}, null, 8, ["label", "items", "readonly"])) : h("", !0),
|
|
243
|
+
i(s)?.length ? (m(), D(R, {
|
|
244
|
+
key: 1,
|
|
245
|
+
label: i(l)("COMMON_DICT.ENUMS.DEPARTMENT") + ":",
|
|
246
|
+
items: i(s),
|
|
247
|
+
readonly: e.readonly
|
|
248
|
+
}, null, 8, ["label", "items", "readonly"])) : h("", !0)
|
|
249
|
+
], 2)) : h("", !0)
|
|
250
|
+
], 2));
|
|
251
|
+
}
|
|
252
|
+
}, ie = _(te), me = _(R);
|
|
253
|
+
export {
|
|
254
|
+
ie as A,
|
|
255
|
+
me as T,
|
|
256
|
+
Q as u
|
|
257
|
+
};
|
|
@@ -0,0 +1,301 @@
|
|
|
1
|
+
import { w as _ } from "./index.bCzIhWFw.js";
|
|
2
|
+
import { computed as E, createElementBlock as b, createCommentVNode as T, openBlock as c, Fragment as N, createElementVNode as h, toDisplayString as M, normalizeClass as A, createBlock as R, renderList as P, unref as i, withCtx as w, ref as O, watch as V, onMounted as U, createVNode as z, createTextVNode as F, nextTick as $ } from "vue";
|
|
3
|
+
import { ElPopover as H, ElButton as G } from "element-plus";
|
|
4
|
+
import { j as x, u as W } from "./i18n.ro9yz7rE.js";
|
|
5
|
+
import { _ as Y } from "./_plugin-vue_export-helper.CHgC5LLL.js";
|
|
6
|
+
import '../assets/index2.css';const D = {
|
|
7
|
+
ALL: !0,
|
|
8
|
+
PARTIAL: !1
|
|
9
|
+
}, j = [
|
|
10
|
+
{
|
|
11
|
+
value: D.ALL,
|
|
12
|
+
get label() {
|
|
13
|
+
return x("COMMON_DICT.ENUMS.ALL_MEMBERS");
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
value: D.PARTIAL,
|
|
18
|
+
get label() {
|
|
19
|
+
return x("COMMON_DICT.ENUMS.PARTIAL_MEMBERS");
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
], m = {
|
|
23
|
+
MEMBER: 1,
|
|
24
|
+
DEPARTMENT: 2
|
|
25
|
+
}, ie = {
|
|
26
|
+
label: "memberName",
|
|
27
|
+
children: "children",
|
|
28
|
+
value: "bnid"
|
|
29
|
+
}, I = {
|
|
30
|
+
one: 1,
|
|
31
|
+
two: 2
|
|
32
|
+
}, ce = {
|
|
33
|
+
UNPUBLISHED: 0,
|
|
34
|
+
// 未发布
|
|
35
|
+
PENDING: 1,
|
|
36
|
+
// 待发布
|
|
37
|
+
PUBLISHED: 2,
|
|
38
|
+
// 已发布
|
|
39
|
+
UNDER_REVIEW: 3,
|
|
40
|
+
// 审核中
|
|
41
|
+
REJECTED: 4,
|
|
42
|
+
// 审核不通过
|
|
43
|
+
FAILED: 5
|
|
44
|
+
// 发布失败
|
|
45
|
+
}, q = {
|
|
46
|
+
key: 0,
|
|
47
|
+
class: "pd-l-16 text-dee0e3 pd-r-16"
|
|
48
|
+
}, J = { class: "fz-14 text-646a73 nowrap" }, X = { class: "tag-item nowrap fz-12 pd-l-8 pd-r-8 radius-4 bg-eaf0fe text-3271fe pointer" }, K = { class: "tag-list-popover overflow-y-auto flex gap-4 flex-wrap" }, Q = {
|
|
49
|
+
__name: "TagList",
|
|
50
|
+
props: {
|
|
51
|
+
// 显示的标签
|
|
52
|
+
label: {
|
|
53
|
+
type: String,
|
|
54
|
+
required: !0
|
|
55
|
+
},
|
|
56
|
+
// 数据项列表
|
|
57
|
+
items: {
|
|
58
|
+
type: Array,
|
|
59
|
+
default: () => []
|
|
60
|
+
},
|
|
61
|
+
// 是否为只读模式
|
|
62
|
+
readonly: {
|
|
63
|
+
type: Boolean,
|
|
64
|
+
default: !1
|
|
65
|
+
}
|
|
66
|
+
},
|
|
67
|
+
setup(e) {
|
|
68
|
+
const t = e, l = E(() => t.readonly ? t.items : t.items.slice(0, I.one)), d = E(() => t.items.length > I.one), y = E(() => t.items.length - I.one), u = E(() => t.items.slice(I.one));
|
|
69
|
+
return (n, s) => e.items.length > 0 ? (c(), b(N, { key: 0 }, [
|
|
70
|
+
e.readonly ? T("", !0) : (c(), b("span", q, "|")),
|
|
71
|
+
h("span", J, M(e.label), 1),
|
|
72
|
+
h("div", {
|
|
73
|
+
class: A(["tag-list", { "flex items-center gap-4": !e.readonly }])
|
|
74
|
+
}, [
|
|
75
|
+
(c(!0), b(N, null, P(l.value, (a) => (c(), b("div", {
|
|
76
|
+
key: a.memberId,
|
|
77
|
+
class: A(["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 }])
|
|
78
|
+
}, M(a.memberName), 3))), 128)),
|
|
79
|
+
!e.readonly && d.value ? (c(), R(i(H), {
|
|
80
|
+
key: 0,
|
|
81
|
+
placement: "top",
|
|
82
|
+
trigger: "click",
|
|
83
|
+
width: "300",
|
|
84
|
+
"popper-class": "tag-list-popover-wrapper"
|
|
85
|
+
}, {
|
|
86
|
+
reference: w(() => [
|
|
87
|
+
h("span", X, " +" + M(y.value), 1)
|
|
88
|
+
]),
|
|
89
|
+
default: w(() => [
|
|
90
|
+
h("div", K, [
|
|
91
|
+
(c(!0), b(N, null, P(u.value, (a) => (c(), b("span", {
|
|
92
|
+
key: a.memberId,
|
|
93
|
+
class: "tag-item nowrap fz-12 pd-l-8 pd-r-8 radius-4 bg-eaf0fe text-3271fe"
|
|
94
|
+
}, M(a.memberName), 1))), 128))
|
|
95
|
+
])
|
|
96
|
+
]),
|
|
97
|
+
_: 1
|
|
98
|
+
})) : T("", !0)
|
|
99
|
+
], 2)
|
|
100
|
+
], 64)) : T("", !0);
|
|
101
|
+
}
|
|
102
|
+
}, S = /* @__PURE__ */ Y(Q, [["__scopeId", "data-v-eecd9e0b"]]), k = (e, t) => e?.filter(t) || [], g = (e, t) => k(e, (l) => l.memberType === t), B = (e, t) => {
|
|
103
|
+
if (e.children)
|
|
104
|
+
for (const l of e.children)
|
|
105
|
+
l.memberType === m.MEMBER ? t(l) : l.memberType === m.DEPARTMENT && B(l, t);
|
|
106
|
+
}, L = (e) => {
|
|
107
|
+
const t = [];
|
|
108
|
+
return B(e, (l) => t.push(l.memberId)), t;
|
|
109
|
+
};
|
|
110
|
+
function Z(e, t, l = !1) {
|
|
111
|
+
const d = E(() => {
|
|
112
|
+
if (!e.value) return [];
|
|
113
|
+
const n = [...e.value], s = g(
|
|
114
|
+
n,
|
|
115
|
+
m.DEPARTMENT
|
|
116
|
+
);
|
|
117
|
+
if (s.length > 0 && t.value && t.value.length > 0) {
|
|
118
|
+
const a = /* @__PURE__ */ new Set();
|
|
119
|
+
s.forEach((o) => {
|
|
120
|
+
const f = (p) => {
|
|
121
|
+
for (const v of p) {
|
|
122
|
+
if (v.memberType === m.DEPARTMENT && v.memberId === o.memberId)
|
|
123
|
+
return B(
|
|
124
|
+
v,
|
|
125
|
+
(C) => a.add(C)
|
|
126
|
+
), !0;
|
|
127
|
+
if (v.children && f(v.children))
|
|
128
|
+
return !0;
|
|
129
|
+
}
|
|
130
|
+
return !1;
|
|
131
|
+
};
|
|
132
|
+
f(t.value);
|
|
133
|
+
});
|
|
134
|
+
const r = new Set(
|
|
135
|
+
g(n, m.MEMBER).map(
|
|
136
|
+
(o) => o.memberId
|
|
137
|
+
)
|
|
138
|
+
);
|
|
139
|
+
a.forEach((o) => {
|
|
140
|
+
r.has(o.memberId) || n.push(o);
|
|
141
|
+
});
|
|
142
|
+
}
|
|
143
|
+
return n;
|
|
144
|
+
}), y = E(() => {
|
|
145
|
+
if (l)
|
|
146
|
+
return g(
|
|
147
|
+
d.value,
|
|
148
|
+
m.MEMBER
|
|
149
|
+
);
|
|
150
|
+
{
|
|
151
|
+
const n = /* @__PURE__ */ new Set();
|
|
152
|
+
return u.value.forEach((s) => {
|
|
153
|
+
L(s).forEach((r) => n.add(r));
|
|
154
|
+
}), k(
|
|
155
|
+
d.value,
|
|
156
|
+
(s) => s.memberType === m.MEMBER && !n.has(s.memberId)
|
|
157
|
+
);
|
|
158
|
+
}
|
|
159
|
+
}), u = E(() => {
|
|
160
|
+
if (l)
|
|
161
|
+
return g(
|
|
162
|
+
d.value,
|
|
163
|
+
m.DEPARTMENT
|
|
164
|
+
);
|
|
165
|
+
{
|
|
166
|
+
const n = [], s = (r) => {
|
|
167
|
+
if (!r.children || r.children.length === 0) return !1;
|
|
168
|
+
const o = L(r);
|
|
169
|
+
return o.length === 0 ? !1 : o.every(
|
|
170
|
+
(f) => d.value.some(
|
|
171
|
+
(p) => p.memberType === m.MEMBER && p.memberId === f
|
|
172
|
+
)
|
|
173
|
+
);
|
|
174
|
+
}, a = (r, o = !1) => {
|
|
175
|
+
if (r.memberType === m.DEPARTMENT) {
|
|
176
|
+
const f = s(r);
|
|
177
|
+
if (f && !o) {
|
|
178
|
+
if (n.push({
|
|
179
|
+
memberId: r.memberId,
|
|
180
|
+
memberName: r.memberName,
|
|
181
|
+
memberType: m.DEPARTMENT,
|
|
182
|
+
bnid: r.bnid,
|
|
183
|
+
children: r.children
|
|
184
|
+
}), r.children)
|
|
185
|
+
for (const p of r.children)
|
|
186
|
+
a(p, !0);
|
|
187
|
+
} else if (!f && r.children)
|
|
188
|
+
for (const p of r.children)
|
|
189
|
+
a(p, !1);
|
|
190
|
+
}
|
|
191
|
+
};
|
|
192
|
+
for (const r of t.value)
|
|
193
|
+
a(r, !1);
|
|
194
|
+
return n;
|
|
195
|
+
}
|
|
196
|
+
});
|
|
197
|
+
return {
|
|
198
|
+
selectedMembers: y,
|
|
199
|
+
selectedDepartments: u
|
|
200
|
+
};
|
|
201
|
+
}
|
|
202
|
+
const ee = { class: "text-1f2329" }, te = { class: "fz-14 text-1f2329" }, re = {
|
|
203
|
+
__name: "layout",
|
|
204
|
+
props: {
|
|
205
|
+
// 当前选择的范围类型(是否全部可见)
|
|
206
|
+
allVisible: {
|
|
207
|
+
type: Boolean,
|
|
208
|
+
default: D.ALL
|
|
209
|
+
},
|
|
210
|
+
// 选中的项目列表(完整对象数组,由父组件根据ID从树中查找得到)
|
|
211
|
+
modelValue: {
|
|
212
|
+
type: Array,
|
|
213
|
+
default: () => []
|
|
214
|
+
},
|
|
215
|
+
// 完整的树形数据(用于判断部门成员是否全部选中)
|
|
216
|
+
treeList: {
|
|
217
|
+
type: Array,
|
|
218
|
+
default: () => []
|
|
219
|
+
},
|
|
220
|
+
// 是否为只读模式
|
|
221
|
+
readonly: {
|
|
222
|
+
type: Boolean,
|
|
223
|
+
default: !1
|
|
224
|
+
}
|
|
225
|
+
},
|
|
226
|
+
setup(e, { expose: t }) {
|
|
227
|
+
const { t: l } = W(), d = O(null), y = () => {
|
|
228
|
+
d.value && $(() => {
|
|
229
|
+
d.value.scrollIntoView({
|
|
230
|
+
behavior: "smooth",
|
|
231
|
+
block: "center"
|
|
232
|
+
});
|
|
233
|
+
});
|
|
234
|
+
}, u = e, { selectedMembers: n, selectedDepartments: s } = Z(
|
|
235
|
+
E(() => u.modelValue),
|
|
236
|
+
E(() => u.treeList),
|
|
237
|
+
u.readonly
|
|
238
|
+
), a = E(() => [...n.value, ...s.value]);
|
|
239
|
+
return V(
|
|
240
|
+
() => [u.allVisible, u.modelValue],
|
|
241
|
+
() => {
|
|
242
|
+
y();
|
|
243
|
+
},
|
|
244
|
+
{ immediate: !1, deep: !0 }
|
|
245
|
+
), U(() => {
|
|
246
|
+
y();
|
|
247
|
+
}), t({
|
|
248
|
+
allSelectedItems: a
|
|
249
|
+
}), (r, o) => (c(), b("div", {
|
|
250
|
+
ref_key: "previewRef",
|
|
251
|
+
ref: d,
|
|
252
|
+
class: A(["available-range-preview w-full overflow-hidden", {
|
|
253
|
+
"flex items-center": !e.readonly
|
|
254
|
+
}])
|
|
255
|
+
}, [
|
|
256
|
+
e.readonly ? T("", !0) : (c(), b(N, { key: 0 }, [
|
|
257
|
+
h("div", ee, M(i(l)("COMMON_DICT.ENUMS.AVAILABLE_RANGE")) + ": ", 1),
|
|
258
|
+
h("span", te, M(i(j).find((f) => f.value === e.allVisible)?.label), 1),
|
|
259
|
+
z(i(G), {
|
|
260
|
+
class: "mg-l-16",
|
|
261
|
+
type: "primary",
|
|
262
|
+
link: "",
|
|
263
|
+
onClick: o[0] || (o[0] = (f) => r.$emit("edit"))
|
|
264
|
+
}, {
|
|
265
|
+
default: w(() => [
|
|
266
|
+
F(M(i(l)("COMMON_BUTTON.EDIT_TEXT")), 1)
|
|
267
|
+
]),
|
|
268
|
+
_: 1
|
|
269
|
+
})
|
|
270
|
+
], 64)),
|
|
271
|
+
e.allVisible === i(D).PARTIAL ? (c(), b("div", {
|
|
272
|
+
key: 1,
|
|
273
|
+
class: A(["flex-1 overflow-hidden", { "flex items-center": !e.readonly }])
|
|
274
|
+
}, [
|
|
275
|
+
i(n)?.length ? (c(), R(S, {
|
|
276
|
+
key: 0,
|
|
277
|
+
label: i(l)("COMMON_DICT.ENUMS.MEMBER") + ":",
|
|
278
|
+
items: i(n),
|
|
279
|
+
readonly: e.readonly
|
|
280
|
+
}, null, 8, ["label", "items", "readonly"])) : T("", !0),
|
|
281
|
+
i(s)?.length ? (c(), R(S, {
|
|
282
|
+
key: 1,
|
|
283
|
+
label: i(l)("COMMON_DICT.ENUMS.DEPARTMENT") + ":",
|
|
284
|
+
items: i(s),
|
|
285
|
+
readonly: e.readonly
|
|
286
|
+
}, null, 8, ["label", "items", "readonly"])) : T("", !0)
|
|
287
|
+
], 2)) : T("", !0)
|
|
288
|
+
], 2));
|
|
289
|
+
}
|
|
290
|
+
}, me = _(re), de = _(S);
|
|
291
|
+
export {
|
|
292
|
+
me as A,
|
|
293
|
+
I as D,
|
|
294
|
+
m as M,
|
|
295
|
+
ce as P,
|
|
296
|
+
D as R,
|
|
297
|
+
de as T,
|
|
298
|
+
ie as a,
|
|
299
|
+
j as r,
|
|
300
|
+
Z as u
|
|
301
|
+
};
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { g as i } from "./i18n.Vhq-tZPw.js";
|
|
2
|
+
const E = () => {
|
|
3
|
+
const { $request: t, $env: s } = i();
|
|
4
|
+
return {
|
|
5
|
+
sourcePublish: (e) => t({
|
|
6
|
+
url: `${s.VITE_APP_AIBOX_BASE_URL}/api/v1/skillets/versions/publish`,
|
|
7
|
+
method: "post",
|
|
8
|
+
data: e
|
|
9
|
+
}),
|
|
10
|
+
getPublishVersionDetail: (e, r) => t({
|
|
11
|
+
url: `${s.VITE_APP_AIBOX_BASE_URL}/api/v1/skillets/versions/${e}/${r}`,
|
|
12
|
+
method: "get"
|
|
13
|
+
}),
|
|
14
|
+
checkVersion: (e) => t({
|
|
15
|
+
url: `${s.VITE_APP_AIBOX_BASE_URL}/api/v1/skillets/versions/exists`,
|
|
16
|
+
method: "get",
|
|
17
|
+
params: e
|
|
18
|
+
}),
|
|
19
|
+
checkToken: () => t({
|
|
20
|
+
url: `${s.VITE_APP_AUTH_BASE_URL}/api/v1/api/check-token`,
|
|
21
|
+
method: "post"
|
|
22
|
+
}),
|
|
23
|
+
sourceRePublish: (e) => t({
|
|
24
|
+
url: `${s.VITE_APP_AIBOX_BASE_URL}/api/v1/skillets/versions/re-publish`,
|
|
25
|
+
method: "post",
|
|
26
|
+
data: e
|
|
27
|
+
}),
|
|
28
|
+
getPublishHistory: (e, r, o) => t({
|
|
29
|
+
url: `${s.VITE_APP_AIBOX_BASE_URL}/api/v1/skillets/${e}/${r}/versions/page`,
|
|
30
|
+
method: "get",
|
|
31
|
+
params: o
|
|
32
|
+
}),
|
|
33
|
+
checkDeleteComponent: (e) => t({
|
|
34
|
+
url: `${s.VITE_APP_AIBOX_BASE_URL}/api/v1/system/tip/agent`,
|
|
35
|
+
method: "get",
|
|
36
|
+
params: e
|
|
37
|
+
}),
|
|
38
|
+
rollbackVersion: (e, r) => t({
|
|
39
|
+
url: `${s.VITE_APP_AIBOX_BASE_URL}/api/v1/skillets/versions/${e}/${r}/revert`,
|
|
40
|
+
method: "post"
|
|
41
|
+
}),
|
|
42
|
+
getStoreDetailType: () => t({
|
|
43
|
+
url: `${s.VITE_APP_STORE_BASE_URL}/api/v1/store/all-classification`,
|
|
44
|
+
method: "get"
|
|
45
|
+
})
|
|
46
|
+
};
|
|
47
|
+
};
|
|
48
|
+
export {
|
|
49
|
+
E as g
|
|
50
|
+
};
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { g as i } from "./i18n.DmqkiK-h.js";
|
|
2
|
+
const E = () => {
|
|
3
|
+
const { $request: t, $env: s } = i();
|
|
4
|
+
return {
|
|
5
|
+
sourcePublish: (e) => t({
|
|
6
|
+
url: `${s.VITE_APP_AIBOX_BASE_URL}/api/v1/skillets/versions/publish`,
|
|
7
|
+
method: "post",
|
|
8
|
+
data: e
|
|
9
|
+
}),
|
|
10
|
+
getPublishVersionDetail: (e, r) => t({
|
|
11
|
+
url: `${s.VITE_APP_AIBOX_BASE_URL}/api/v1/skillets/versions/${e}/${r}`,
|
|
12
|
+
method: "get"
|
|
13
|
+
}),
|
|
14
|
+
checkVersion: (e) => t({
|
|
15
|
+
url: `${s.VITE_APP_AIBOX_BASE_URL}/api/v1/skillets/versions/exists`,
|
|
16
|
+
method: "get",
|
|
17
|
+
params: e
|
|
18
|
+
}),
|
|
19
|
+
checkToken: () => t({
|
|
20
|
+
url: `${s.VITE_APP_AUTH_BASE_URL}/api/v1/api/check-token`,
|
|
21
|
+
method: "post"
|
|
22
|
+
}),
|
|
23
|
+
sourceRePublish: (e) => t({
|
|
24
|
+
url: `${s.VITE_APP_AIBOX_BASE_URL}/api/v1/skillets/versions/re-publish`,
|
|
25
|
+
method: "post",
|
|
26
|
+
data: e
|
|
27
|
+
}),
|
|
28
|
+
getPublishHistory: (e, r, o) => t({
|
|
29
|
+
url: `${s.VITE_APP_AIBOX_BASE_URL}/api/v1/skillets/${e}/${r}/versions/page`,
|
|
30
|
+
method: "get",
|
|
31
|
+
params: o
|
|
32
|
+
}),
|
|
33
|
+
checkDeleteComponent: (e) => t({
|
|
34
|
+
url: `${s.VITE_APP_AIBOX_BASE_URL}/api/v1/system/tip/agent`,
|
|
35
|
+
method: "get",
|
|
36
|
+
params: e
|
|
37
|
+
}),
|
|
38
|
+
rollbackVersion: (e, r) => t({
|
|
39
|
+
url: `${s.VITE_APP_AIBOX_BASE_URL}/api/v1/skillets/versions/${e}/${r}/revert`,
|
|
40
|
+
method: "post"
|
|
41
|
+
}),
|
|
42
|
+
getStoreDetailType: () => t({
|
|
43
|
+
url: `${s.VITE_APP_STORE_BASE_URL}/api/v1/store/all-classification`,
|
|
44
|
+
method: "get"
|
|
45
|
+
})
|
|
46
|
+
};
|
|
47
|
+
};
|
|
48
|
+
export {
|
|
49
|
+
E as g
|
|
50
|
+
};
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { k as i } from "./i18n.ro9yz7rE.js";
|
|
2
|
+
const k = () => {
|
|
3
|
+
const { $request: t, $env: s } = i();
|
|
4
|
+
return {
|
|
5
|
+
sourcePublish: (e) => t({
|
|
6
|
+
url: `${s.VITE_APP_AIBOX_BASE_URL}/api/v1/skillets/versions/publish`,
|
|
7
|
+
method: "post",
|
|
8
|
+
data: e
|
|
9
|
+
}),
|
|
10
|
+
getPublishVersionDetail: (e, r) => t({
|
|
11
|
+
url: `${s.VITE_APP_AIBOX_BASE_URL}/api/v1/skillets/versions/${e}/${r}`,
|
|
12
|
+
method: "get"
|
|
13
|
+
}),
|
|
14
|
+
checkVersion: (e) => t({
|
|
15
|
+
url: `${s.VITE_APP_AIBOX_BASE_URL}/api/v1/skillets/versions/exists`,
|
|
16
|
+
method: "get",
|
|
17
|
+
params: e
|
|
18
|
+
}),
|
|
19
|
+
checkToken: () => t({
|
|
20
|
+
url: `${s.VITE_APP_AUTH_BASE_URL}/api/v1/api/check-token`,
|
|
21
|
+
method: "post"
|
|
22
|
+
}),
|
|
23
|
+
sourceRePublish: (e) => t({
|
|
24
|
+
url: `${s.VITE_APP_AIBOX_BASE_URL}/api/v1/skillets/versions/re-publish`,
|
|
25
|
+
method: "post",
|
|
26
|
+
data: e
|
|
27
|
+
}),
|
|
28
|
+
getPublishHistory: (e, r, o) => t({
|
|
29
|
+
url: `${s.VITE_APP_AIBOX_BASE_URL}/api/v1/skillets/${e}/${r}/versions/page`,
|
|
30
|
+
method: "get",
|
|
31
|
+
params: o
|
|
32
|
+
}),
|
|
33
|
+
checkDeleteComponent: (e) => t({
|
|
34
|
+
url: `${s.VITE_APP_AIBOX_BASE_URL}/api/v1/system/tip/agent`,
|
|
35
|
+
method: "get",
|
|
36
|
+
params: e
|
|
37
|
+
}),
|
|
38
|
+
rollbackVersion: (e, r) => t({
|
|
39
|
+
url: `${s.VITE_APP_AIBOX_BASE_URL}/api/v1/skillets/versions/${e}/${r}/revert`,
|
|
40
|
+
method: "post"
|
|
41
|
+
}),
|
|
42
|
+
getStoreDetailType: () => t({
|
|
43
|
+
url: `${s.VITE_APP_STORE_BASE_URL}/api/v1/store/all-classification`,
|
|
44
|
+
method: "get"
|
|
45
|
+
})
|
|
46
|
+
};
|
|
47
|
+
};
|
|
48
|
+
export {
|
|
49
|
+
k as g
|
|
50
|
+
};
|