aibox-custom-component-packages 0.0.6 → 0.0.7
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 +786 -0
- package/es/ApplicationTypeTag.mjs +58 -0
- package/es/AuthSection.mjs +199 -0
- package/es/AutoShowTooltip.mjs +90 -0
- package/es/AvailableRangePreview.mjs +1 -1
- package/es/AvailableRangeSetting.mjs +11 -10
- package/es/CodeView.mjs +7 -0
- package/es/CommonTagsList.mjs +4 -4
- package/es/CreateMcpForm.mjs +384 -0
- package/es/CustomSidebar.mjs +712 -0
- package/es/CustomTitle.mjs +7 -0
- package/es/CustomToggle.mjs +170 -0
- package/es/DialogContainer.mjs +21 -21
- package/es/FileDisplay.mjs +6 -0
- package/es/FilePreview.mjs +179 -0
- package/es/FileUploader.mjs +266 -9
- package/es/McpFormDialog.mjs +8 -0
- package/es/McpParamsSet.mjs +630 -0
- package/es/MdEditor.mjs +201 -0
- package/es/PageContainer.mjs +360 -11
- package/es/ParameterTable.mjs +2288 -0
- package/es/PublishRecord.mjs +6 -6
- package/es/RadioGroup.mjs +119 -0
- package/es/SourcePublish.mjs +6 -6
- package/es/Table.mjs +2 -2
- package/es/assets/AddOrEditSupplierDialog.css +1 -0
- package/es/assets/AiboxTable.css +1 -0
- package/es/assets/ApplicationTypeTag.css +1 -0
- package/es/assets/AuthSection.css +1 -0
- package/es/assets/AutoShowTooltip.css +1 -0
- package/es/assets/CreateMcpForm.css +1 -0
- package/es/assets/CustomSidebar.css +1 -0
- package/es/assets/CustomToggle.css +1 -0
- package/es/assets/FilePreview.css +1 -0
- package/es/assets/FileUploader.css +1 -0
- package/es/assets/McpParamsSet.css +1 -0
- package/es/assets/MdEditor.css +1 -0
- package/es/assets/PageContainer.css +1 -0
- package/es/assets/ParameterTable.css +1 -0
- package/es/assets/RadioGroup.css +1 -0
- package/es/assets/index.css +1 -1
- package/es/assets/index2.css +1 -1
- package/es/assets/index3.css +1 -0
- package/es/assets/index4.css +1 -0
- package/es/assets/index5.css +1 -0
- package/es/assets/index6.css +1 -0
- package/es/assets/layout.css +1 -0
- package/es/assets/usePreview.css +1 -0
- package/es/chunks/AiboxTable.DUGBBVXh.js +645 -0
- package/es/chunks/BackBar.B5Er8ZdJ.js +645 -0
- package/es/chunks/config.DPkdwjwD.js +49 -0
- package/es/chunks/config.Dklrsn-B.js +49 -0
- package/es/chunks/config.DqhQdkz7.js +325 -0
- package/es/chunks/config.RrNwuFkQ.js +325 -0
- package/es/chunks/config.gNZ_rT87.js +325 -0
- package/es/chunks/enums.DuBbLcd-.js +83 -0
- package/es/chunks/enums.Dvec-maC.js +62 -0
- package/es/chunks/field-types.CPnMOjle.js +13 -0
- package/es/chunks/files.cduUqjHX.js +16 -0
- package/es/chunks/i18n.DDMVloiU.js +443 -0
- package/es/chunks/i18n.k9Q_HVMs.js +443 -0
- package/es/chunks/index.BSA3IKSF.js +111 -0
- package/es/chunks/index.BT1khSY9.js +111 -0
- package/es/chunks/index.CDvh263l.js +257 -0
- package/es/chunks/index.CLyfh6p1.js +257 -0
- package/es/chunks/index.CSjjAi3w.js +396 -0
- package/es/chunks/index.CdEBk4F_.js +134 -0
- package/es/chunks/index.CgbxJCEU.js +265 -0
- package/es/chunks/index.CuDwuRO7.js +265 -0
- package/es/chunks/index.DWR4lc30.js +203 -0
- package/es/chunks/index.GuEzdh6b.js +257 -0
- package/es/chunks/index.uOZzvHrF.js +135 -0
- package/es/chunks/layout.BREUWPEJ.js +26 -0
- package/es/chunks/publish.DlD0o09n.js +50 -0
- package/es/chunks/request.24c3shPx.js +5 -0
- package/es/chunks/usePreview.B5lboHeg.js +153 -0
- package/es/chunks/usePreview.C36fNlVd.js +153 -0
- package/es/index.mjs +325 -312
- package/index.css +1 -1
- package/lib/AddOrEditSupplierDialog.js +1 -0
- package/lib/ApplicationTypeTag.js +1 -0
- package/lib/AuthSection.js +1 -0
- package/lib/AutoShowTooltip.js +1 -0
- package/lib/AvailableRangePreview.js +1 -1
- package/lib/AvailableRangeSetting.js +1 -1
- package/lib/CodeView.js +1 -0
- package/lib/CommonTagsList.js +1 -1
- package/lib/CreateMcpForm.js +1 -0
- package/lib/CustomSidebar.js +1 -0
- package/lib/CustomTitle.js +1 -0
- package/lib/CustomToggle.js +1 -0
- package/lib/DialogContainer.js +1 -1
- package/lib/FileDisplay.js +1 -0
- package/lib/FilePreview.js +1 -0
- package/lib/FileUploader.js +1 -1
- package/lib/McpFormDialog.js +1 -0
- package/lib/McpParamsSet.js +1 -0
- package/lib/MdEditor.js +1 -0
- package/lib/PageContainer.js +1 -1
- package/lib/ParameterTable.js +1 -0
- package/lib/PublishRecord.js +4 -4
- package/lib/RadioGroup.js +1 -0
- package/lib/SourcePublish.js +1 -1
- package/lib/Table.js +1 -1
- package/lib/assets/AddOrEditSupplierDialog.css +1 -0
- package/lib/assets/AiboxTable.css +1 -0
- package/lib/assets/ApplicationTypeTag.css +1 -0
- package/lib/assets/AuthSection.css +1 -0
- package/lib/assets/AutoShowTooltip.css +1 -0
- package/lib/assets/CreateMcpForm.css +1 -0
- package/lib/assets/CustomSidebar.css +1 -0
- package/lib/assets/CustomToggle.css +1 -0
- package/lib/assets/FilePreview.css +1 -0
- package/lib/assets/FileUploader.css +1 -0
- package/lib/assets/McpParamsSet.css +1 -0
- package/lib/assets/MdEditor.css +1 -0
- package/lib/assets/PageContainer.css +1 -0
- package/lib/assets/ParameterTable.css +1 -0
- package/lib/assets/RadioGroup.css +1 -0
- package/lib/assets/index.css +1 -1
- package/lib/assets/index2.css +1 -1
- package/lib/assets/index3.css +1 -0
- package/lib/assets/index4.css +1 -0
- package/lib/assets/index5.css +1 -0
- package/lib/assets/index6.css +1 -0
- package/lib/assets/layout.css +1 -0
- package/lib/assets/usePreview.css +1 -0
- package/lib/chunks/AiboxTable.BnoHJ7xL.js +1 -0
- package/lib/chunks/BackBar.C8Xrc6qW.js +1 -0
- package/lib/chunks/config.1oaIKLGn.js +1 -0
- package/lib/chunks/config.BF7MO0O5.js +1 -0
- package/lib/chunks/enums.DnuzPZCR.js +1 -0
- package/lib/chunks/field-types.Ch_2yDfg.js +1 -0
- package/lib/chunks/files.B3-8UC0v.js +1 -0
- package/lib/chunks/i18n.DgOp_D7R.js +1 -0
- package/lib/chunks/index.BZcSlgOO.js +1 -0
- package/lib/chunks/index.Bc71XWQn.js +1 -0
- package/lib/chunks/index.CH7XdMru.js +1 -0
- package/lib/chunks/index.CaidDlAx.js +1 -0
- package/lib/chunks/index.D7wBInWr.js +1 -0
- package/lib/chunks/index.DGWHQFdx.js +6 -0
- package/lib/chunks/index.DME62Yfo.js +1 -0
- package/lib/chunks/index.DWohILMv.js +1 -0
- package/lib/chunks/index.LK2ulXTE.js +1 -0
- package/lib/chunks/index.qDAoOzk9.js +1 -0
- package/lib/chunks/index.s8vGOJKG.js +1 -0
- package/lib/chunks/layout.sgE9JoNq.js +1 -0
- package/lib/chunks/publish.3TrK3fZf.js +1 -0
- package/lib/chunks/request.D8T4MgGX.js +1 -0
- package/lib/chunks/usePreview.2PZJSy5w.js +1 -0
- package/lib/chunks/usePreview.E5SeS2uw.js +1 -0
- package/lib/index.js +1 -4
- package/package.json +2 -2
|
@@ -0,0 +1,203 @@
|
|
|
1
|
+
import { w as U } from "./index.bCzIhWFw.js";
|
|
2
|
+
import { resolveComponent as I, resolveDirective as x, createElementBlock as u, createCommentVNode as B, openBlock as s, Fragment as L, renderList as C, withDirectives as D, createElementVNode as y, createBlock as _, createVNode as h, withCtx as b, unref as f, resolveDynamicComponent as E, createTextVNode as S, toDisplayString as F } from "vue";
|
|
3
|
+
import { isImageLink as w, uploadUrl as z } from "../FilePreview.mjs";
|
|
4
|
+
import { api as v } from "v-viewer";
|
|
5
|
+
import { g as V } from "./request.24c3shPx.js";
|
|
6
|
+
import { Error as R } from "color-message-aibox-vue";
|
|
7
|
+
import { _ as $ } from "./_plugin-vue_export-helper.CHgC5LLL.js";
|
|
8
|
+
import '../assets/index4.css';const O = (e) => {
|
|
9
|
+
if (!e) return "";
|
|
10
|
+
let t = 0;
|
|
11
|
+
for (; Math.abs(e) >= 1024 && (e = e / 1024, t++, t !== 4); )
|
|
12
|
+
;
|
|
13
|
+
const d = ["B", "KB", "MB", "GB", "TB"];
|
|
14
|
+
return Math.round(e * 100) / 100 + " " + d[t];
|
|
15
|
+
}, T = () => {
|
|
16
|
+
const { $request: e, $env: t } = V();
|
|
17
|
+
return {
|
|
18
|
+
commonDownloadInterior: (l) => e({
|
|
19
|
+
method: "get",
|
|
20
|
+
url: `${t.VITE_APP_AIBOX_BASE_URL}/api/v1/common/file/download/streams`,
|
|
21
|
+
params: l,
|
|
22
|
+
responseType: "arraybuffer"
|
|
23
|
+
}),
|
|
24
|
+
commonDownloadForeign: (l) => e({
|
|
25
|
+
method: "get",
|
|
26
|
+
url: `${t.VITE_APP_AIBOX_BASE_URL}/api/v1/common/file/download/urls`,
|
|
27
|
+
params: l
|
|
28
|
+
}),
|
|
29
|
+
commonFileDelete: (l) => e({
|
|
30
|
+
method: "delete",
|
|
31
|
+
url: `${t.VITE_APP_AIBOX_BASE_URL}/api/v1/common/file`,
|
|
32
|
+
params: l
|
|
33
|
+
})
|
|
34
|
+
};
|
|
35
|
+
}, A = (e, t = "", d = "file") => {
|
|
36
|
+
const i = new Blob([e]);
|
|
37
|
+
if (d == "image")
|
|
38
|
+
return URL.createObjectURL(i);
|
|
39
|
+
{
|
|
40
|
+
const r = document.createElement("a");
|
|
41
|
+
r.style.display = "none";
|
|
42
|
+
const l = window.URL.createObjectURL(i);
|
|
43
|
+
r.href = l, r.setAttribute("download", t), document.body.appendChild(r), r.click(), document.body.removeChild(r), setTimeout(() => {
|
|
44
|
+
window.URL.revokeObjectURL(l);
|
|
45
|
+
}, 5e3);
|
|
46
|
+
}
|
|
47
|
+
}, j = () => {
|
|
48
|
+
const { commonDownloadForeign: e, commonDownloadInterior: t, commonFileDelete: d } = T(), i = {
|
|
49
|
+
zIndex: 3e3,
|
|
50
|
+
toolbar: {
|
|
51
|
+
rotateLeft: !0,
|
|
52
|
+
rotateRight: !0,
|
|
53
|
+
zoomIn: !0,
|
|
54
|
+
zoomOut: !0,
|
|
55
|
+
reset: !0,
|
|
56
|
+
prev: !0,
|
|
57
|
+
next: !0
|
|
58
|
+
},
|
|
59
|
+
navbar: !1
|
|
60
|
+
};
|
|
61
|
+
return {
|
|
62
|
+
downloadPrew: async (o) => {
|
|
63
|
+
const { data: a } = await e({ "file-ids": [o.bnid] });
|
|
64
|
+
if (a) {
|
|
65
|
+
const c = a?.[0]?.url;
|
|
66
|
+
w(o.suffix, o.url) || w(o.suffix, c) ? v({
|
|
67
|
+
images: [c],
|
|
68
|
+
options: i
|
|
69
|
+
}) : window.open(c, "_blank");
|
|
70
|
+
}
|
|
71
|
+
},
|
|
72
|
+
downloadStreamPrew: async (o) => {
|
|
73
|
+
const a = await t({ "file-ids": [o.bnid] });
|
|
74
|
+
if (a)
|
|
75
|
+
if (w(o.suffix, o.url)) {
|
|
76
|
+
const c = A(a, o.name, "image");
|
|
77
|
+
v({
|
|
78
|
+
images: [c],
|
|
79
|
+
options: i
|
|
80
|
+
});
|
|
81
|
+
} else
|
|
82
|
+
A(a, o.name);
|
|
83
|
+
},
|
|
84
|
+
previewImage: (o) => {
|
|
85
|
+
v({
|
|
86
|
+
images: [o],
|
|
87
|
+
options: i
|
|
88
|
+
});
|
|
89
|
+
},
|
|
90
|
+
deleteFile: async (o) => {
|
|
91
|
+
await d({ "file-ids": [o.bnid] });
|
|
92
|
+
},
|
|
93
|
+
previewMultiImage: (o) => {
|
|
94
|
+
const { urls: a, initialIndex: c } = o;
|
|
95
|
+
v({
|
|
96
|
+
images: a,
|
|
97
|
+
options: {
|
|
98
|
+
...i,
|
|
99
|
+
initialViewIndex: c || 0
|
|
100
|
+
}
|
|
101
|
+
});
|
|
102
|
+
}
|
|
103
|
+
};
|
|
104
|
+
}, M = {
|
|
105
|
+
key: 0,
|
|
106
|
+
class: "file-display"
|
|
107
|
+
}, N = { class: "file-img overflow-hidden" }, X = {
|
|
108
|
+
key: 0,
|
|
109
|
+
class: "file-img__failed w-full h-full flex items-center justify-center"
|
|
110
|
+
}, G = { class: "file-display__item--name text-ellipsis" }, q = { class: "file-display__item--size" }, K = {
|
|
111
|
+
__name: "index",
|
|
112
|
+
props: {
|
|
113
|
+
fileList: {
|
|
114
|
+
type: Array,
|
|
115
|
+
default: () => []
|
|
116
|
+
},
|
|
117
|
+
showRemove: {
|
|
118
|
+
type: Boolean,
|
|
119
|
+
default: !0
|
|
120
|
+
},
|
|
121
|
+
showLoading: {
|
|
122
|
+
type: Boolean,
|
|
123
|
+
default: !1
|
|
124
|
+
}
|
|
125
|
+
},
|
|
126
|
+
emits: ["remove-file"],
|
|
127
|
+
setup(e, { emit: t }) {
|
|
128
|
+
const { previewImage: d } = j(), i = t, r = (m, g) => {
|
|
129
|
+
i("remove-file", m, g);
|
|
130
|
+
}, l = (m) => {
|
|
131
|
+
w(m.suffix, m.url) ? d(m.url) : window.open(m.url, "_blank");
|
|
132
|
+
};
|
|
133
|
+
return (m, g) => {
|
|
134
|
+
const p = I("el-icon"), o = I("el-image"), a = x("loading"), c = x("ellipsis-tooltip");
|
|
135
|
+
return e.fileList.length ? (s(), u("div", M, [
|
|
136
|
+
(s(!0), u(L, null, C(e.fileList, (n, k) => (s(), u("div", {
|
|
137
|
+
key: k,
|
|
138
|
+
class: "file-display__item"
|
|
139
|
+
}, [
|
|
140
|
+
D((s(), u("div", N, [
|
|
141
|
+
n.failed && e.showLoading ? (s(), u("div", X, [
|
|
142
|
+
h(p, {
|
|
143
|
+
size: "22px",
|
|
144
|
+
color: "#f56c6c"
|
|
145
|
+
}, {
|
|
146
|
+
default: b(() => [
|
|
147
|
+
h(f(R))
|
|
148
|
+
]),
|
|
149
|
+
_: 1
|
|
150
|
+
})
|
|
151
|
+
])) : (s(), u(L, { key: 1 }, [
|
|
152
|
+
f(w)(n.suffix, n.url) ? (s(), _(o, {
|
|
153
|
+
key: 0,
|
|
154
|
+
src: n.url,
|
|
155
|
+
"zoom-rate": 1.2,
|
|
156
|
+
"max-scale": 7,
|
|
157
|
+
"min-scale": 0.2,
|
|
158
|
+
onClick: (P) => l(n),
|
|
159
|
+
fit: "cover"
|
|
160
|
+
}, null, 8, ["src", "onClick"])) : (s(), _(p, {
|
|
161
|
+
key: 1,
|
|
162
|
+
size: "38px"
|
|
163
|
+
}, {
|
|
164
|
+
default: b(() => [
|
|
165
|
+
(s(), _(E(f(z)(n))))
|
|
166
|
+
]),
|
|
167
|
+
_: 2
|
|
168
|
+
}, 1024))
|
|
169
|
+
], 64))
|
|
170
|
+
])), [
|
|
171
|
+
[a, !n.bnid && !n.failed && e.showLoading]
|
|
172
|
+
]),
|
|
173
|
+
y("div", null, [
|
|
174
|
+
D((s(), u("p", G, [
|
|
175
|
+
S(F(n.name), 1)
|
|
176
|
+
])), [
|
|
177
|
+
[c, n.name]
|
|
178
|
+
]),
|
|
179
|
+
y("p", q, [
|
|
180
|
+
y("span", null, F(f(O)(n.size)), 1)
|
|
181
|
+
])
|
|
182
|
+
]),
|
|
183
|
+
e.showRemove ? (s(), _(p, {
|
|
184
|
+
key: 0,
|
|
185
|
+
class: "icon-remove",
|
|
186
|
+
size: "18",
|
|
187
|
+
onClick: (P) => r(k, n.bnid)
|
|
188
|
+
}, {
|
|
189
|
+
default: b(() => [
|
|
190
|
+
h(f(R))
|
|
191
|
+
]),
|
|
192
|
+
_: 1
|
|
193
|
+
}, 8, ["onClick"])) : B("", !0)
|
|
194
|
+
]))), 128))
|
|
195
|
+
])) : B("", !0);
|
|
196
|
+
};
|
|
197
|
+
}
|
|
198
|
+
}, H = /* @__PURE__ */ $(K, [["__scopeId", "data-v-444edb90"]]), te = U(H);
|
|
199
|
+
export {
|
|
200
|
+
te as F,
|
|
201
|
+
O as f,
|
|
202
|
+
j as u
|
|
203
|
+
};
|
|
@@ -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.Dklrsn-B.js";
|
|
5
|
+
import { _ as q } from "./_plugin-vue_export-helper.CHgC5LLL.js";
|
|
6
|
+
import { u as H } from "./i18n.DDMVloiU.js";
|
|
7
|
+
import '../assets/index5.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,135 @@
|
|
|
1
|
+
import { w as v } from "./index.bCzIhWFw.js";
|
|
2
|
+
import { ref as O, shallowRef as B, watch as k, onMounted as A, createElementBlock as N, openBlock as f, normalizeClass as b, createBlock as I, createCommentVNode as M, createVNode as c, unref as l, withCtx as y } from "vue";
|
|
3
|
+
import { ElMessage as g, ElIcon as P, ElScrollbar as _ } from "element-plus";
|
|
4
|
+
import { Codemirror as L } from "vue-codemirror";
|
|
5
|
+
import { EditorView as h } from "@codemirror/view";
|
|
6
|
+
import { json as x } from "@codemirror/lang-json";
|
|
7
|
+
import { oneDark as V } from "@codemirror/theme-one-dark";
|
|
8
|
+
import { codeFolding as R } from "@codemirror/language";
|
|
9
|
+
import { IconCopy1 as T } from "color-message-aibox-vue";
|
|
10
|
+
import { u as F } from "./i18n.k9Q_HVMs.js";
|
|
11
|
+
import j from "copy-to-clipboard";
|
|
12
|
+
import { _ as D } from "./_plugin-vue_export-helper.CHgC5LLL.js";
|
|
13
|
+
import '../assets/index2.css';const J = () => {
|
|
14
|
+
const { t: a } = F();
|
|
15
|
+
return {
|
|
16
|
+
copyText: (s) => {
|
|
17
|
+
j(s) ? g({
|
|
18
|
+
message: a("MESSAGE_REMIND.COPY_SUCCESS"),
|
|
19
|
+
type: "success"
|
|
20
|
+
}) : g({
|
|
21
|
+
message: a("COMMON_STORE_LIBRARY.LABEL_COPY_FAIL"),
|
|
22
|
+
type: "error"
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
};
|
|
26
|
+
}, $ = {
|
|
27
|
+
__name: "index",
|
|
28
|
+
props: {
|
|
29
|
+
code: { type: String, default: "" },
|
|
30
|
+
language: { type: String, default: "json" },
|
|
31
|
+
customExpandDepth: { type: Number, default: 1 / 0 },
|
|
32
|
+
sort: { type: Boolean, default: !0 },
|
|
33
|
+
noPadding: { type: Boolean, default: !1 },
|
|
34
|
+
theme: { type: String, default: "light" },
|
|
35
|
+
showLength: { type: Boolean, default: !1 },
|
|
36
|
+
maxHeight: { type: String, default: "calc(100% - 125px)" },
|
|
37
|
+
showCopy: { type: Boolean, default: !1 },
|
|
38
|
+
enableFolding: { type: Boolean, default: !1 }
|
|
39
|
+
},
|
|
40
|
+
setup(a) {
|
|
41
|
+
const { copyText: u } = J(), s = a, i = O(""), d = {
|
|
42
|
+
json: () => x()
|
|
43
|
+
}, C = () => {
|
|
44
|
+
const r = s.language.toLowerCase();
|
|
45
|
+
return d[r] ? d[r]() : x();
|
|
46
|
+
}, p = B([]), S = (r) => {
|
|
47
|
+
const o = r.trim(), n = (t) => {
|
|
48
|
+
try {
|
|
49
|
+
return JSON.parse(t);
|
|
50
|
+
} catch {
|
|
51
|
+
return null;
|
|
52
|
+
}
|
|
53
|
+
};
|
|
54
|
+
let e = null;
|
|
55
|
+
if ((o.startsWith("{") || o.startsWith("[")) && (e = n(o)), !e) {
|
|
56
|
+
const t = `{${o.replace(/,\s*$/, "")}}`;
|
|
57
|
+
e = n(t);
|
|
58
|
+
}
|
|
59
|
+
if (e && typeof e == "object" && !Array.isArray(e)) {
|
|
60
|
+
const t = e.role;
|
|
61
|
+
if (t) return "role: " + t;
|
|
62
|
+
}
|
|
63
|
+
return "";
|
|
64
|
+
}, w = () => {
|
|
65
|
+
const r = [C(), h.editable.of(!1), h.lineWrapping];
|
|
66
|
+
s.enableFolding && r.push(
|
|
67
|
+
R({
|
|
68
|
+
preparePlaceholder: (o, n) => {
|
|
69
|
+
try {
|
|
70
|
+
const e = o.doc.sliceString(n.from, n.to);
|
|
71
|
+
return S(e);
|
|
72
|
+
} catch {
|
|
73
|
+
return "...";
|
|
74
|
+
}
|
|
75
|
+
},
|
|
76
|
+
placeholderDOM: (o, n, e) => {
|
|
77
|
+
const t = document.createElement("span");
|
|
78
|
+
return t.className = "cm-foldPlaceholder", t.onclick = n, t.style.cursor = "pointer", t.style.color = "#888", t.style.padding = "0 4px", t.style.borderRadius = "3px", t.textContent = e ? `${e}...` : "...", t;
|
|
79
|
+
}
|
|
80
|
+
})
|
|
81
|
+
), s.theme === "dark" && r.push(V), p.value = r;
|
|
82
|
+
}, E = (r) => {
|
|
83
|
+
try {
|
|
84
|
+
const o = JSON.parse(r);
|
|
85
|
+
if (s.sort && typeof o == "object" && o !== null) {
|
|
86
|
+
const n = (e) => Array.isArray(e) ? e.map(n) : typeof e == "object" && e !== null ? Object.keys(e).sort().reduce((t, m) => (t[m] = n(e[m]), t), {}) : e;
|
|
87
|
+
return JSON.stringify(n(o), null, 2);
|
|
88
|
+
}
|
|
89
|
+
return JSON.stringify(o, null, 2);
|
|
90
|
+
} catch {
|
|
91
|
+
return r;
|
|
92
|
+
}
|
|
93
|
+
};
|
|
94
|
+
return k(
|
|
95
|
+
() => s.code,
|
|
96
|
+
(r) => {
|
|
97
|
+
i.value = s.language === "json" ? E(r) : r;
|
|
98
|
+
},
|
|
99
|
+
{ immediate: !0 }
|
|
100
|
+
), A(() => {
|
|
101
|
+
w();
|
|
102
|
+
}), (r, o) => (f(), N("div", {
|
|
103
|
+
class: b(["code-viewer", { "no-padding": a.noPadding, dark: a.theme === "dark" }])
|
|
104
|
+
}, [
|
|
105
|
+
a.showCopy ? (f(), I(l(P), {
|
|
106
|
+
key: 0,
|
|
107
|
+
onClick: o[0] || (o[0] = (n) => l(u)(a.code)),
|
|
108
|
+
class: "code-viewer__copy",
|
|
109
|
+
color: "#96A0AB",
|
|
110
|
+
size: "18px"
|
|
111
|
+
}, {
|
|
112
|
+
default: y(() => [
|
|
113
|
+
c(l(T))
|
|
114
|
+
]),
|
|
115
|
+
_: 1
|
|
116
|
+
})) : M("", !0),
|
|
117
|
+
c(l(_), { "max-height": a.maxHeight }, {
|
|
118
|
+
default: y(() => [
|
|
119
|
+
c(l(L), {
|
|
120
|
+
modelValue: i.value,
|
|
121
|
+
"onUpdate:modelValue": o[1] || (o[1] = (n) => i.value = n),
|
|
122
|
+
style: { height: "100%", minHeight: "100px" },
|
|
123
|
+
extensions: p.value,
|
|
124
|
+
disabled: !0
|
|
125
|
+
}, null, 8, ["modelValue", "extensions"])
|
|
126
|
+
]),
|
|
127
|
+
_: 1
|
|
128
|
+
}, 8, ["max-height"])
|
|
129
|
+
], 2));
|
|
130
|
+
}
|
|
131
|
+
}, H = /* @__PURE__ */ D($, [["__scopeId", "data-v-fdd1bb78"]]), oe = v(H);
|
|
132
|
+
export {
|
|
133
|
+
oe as C,
|
|
134
|
+
J as u
|
|
135
|
+
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { createElementBlock as o, openBlock as i, createElementVNode as t, toDisplayString as n, renderSlot as d } from "vue";
|
|
2
|
+
import { _ as r } from "./_plugin-vue_export-helper.CHgC5LLL.js";
|
|
3
|
+
import '../assets/layout.css';const a = { class: "custom-title flex items-center w-full overflow-hidden w-full pd-b-16" }, c = { class: "title-text fz-14 weight-500 pd-l-8 text-1f2329" }, f = { class: "title-actions flex-1 overflow-hidden flex items-center justify-end" }, u = /* @__PURE__ */ Object.assign({
|
|
4
|
+
name: "CustomTitle"
|
|
5
|
+
}, {
|
|
6
|
+
__name: "layout",
|
|
7
|
+
props: {
|
|
8
|
+
// 标题文本
|
|
9
|
+
title: {
|
|
10
|
+
type: String,
|
|
11
|
+
default: ""
|
|
12
|
+
}
|
|
13
|
+
},
|
|
14
|
+
setup(s) {
|
|
15
|
+
return (l, e) => (i(), o("div", a, [
|
|
16
|
+
e[0] || (e[0] = t("div", { class: "title-icon bg-3271fe radius-2" }, null, -1)),
|
|
17
|
+
t("div", c, n(s.title), 1),
|
|
18
|
+
t("div", f, [
|
|
19
|
+
d(l.$slots, "default", {}, void 0, !0)
|
|
20
|
+
])
|
|
21
|
+
]));
|
|
22
|
+
}
|
|
23
|
+
}), p = /* @__PURE__ */ r(u, [["__scopeId", "data-v-ae136a63"]]);
|
|
24
|
+
export {
|
|
25
|
+
p as C
|
|
26
|
+
};
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { g as i } from "./request.24c3shPx.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
|
+
};
|