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
package/es/AiboxTabs.mjs
ADDED
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { w as m } from "./chunks/index.bCzIhWFw.js";
|
|
2
|
+
import { resolveComponent as b, createElementBlock as n, openBlock as o, normalizeClass as s, createElementVNode as y, Fragment as f, renderList as g, normalizeStyle as h, createBlock as c, createCommentVNode as v, createTextVNode as x, withCtx as j, resolveDynamicComponent as O, toDisplayString as V } from "vue";
|
|
3
|
+
import { _ as k } from "./chunks/_plugin-vue_export-helper.CHgC5LLL.js";
|
|
4
|
+
import './assets/AiboxTabs.css';const C = ["onClick"], S = {
|
|
5
|
+
__name: "layout",
|
|
6
|
+
props: {
|
|
7
|
+
modelValue: {
|
|
8
|
+
type: String,
|
|
9
|
+
default: ""
|
|
10
|
+
},
|
|
11
|
+
tabList: {
|
|
12
|
+
type: Array,
|
|
13
|
+
default: () => []
|
|
14
|
+
},
|
|
15
|
+
propsObj: {
|
|
16
|
+
type: Object,
|
|
17
|
+
default: () => ({
|
|
18
|
+
label: "label",
|
|
19
|
+
value: "value"
|
|
20
|
+
})
|
|
21
|
+
},
|
|
22
|
+
// 样式风格
|
|
23
|
+
// 1无底色,选中灰;
|
|
24
|
+
// 2灰底色,选中白;
|
|
25
|
+
// 3灰底色,选中白,圆角;
|
|
26
|
+
styleType: {
|
|
27
|
+
type: [Number, String],
|
|
28
|
+
default: 1
|
|
29
|
+
},
|
|
30
|
+
isShowIcon: {
|
|
31
|
+
type: Boolean,
|
|
32
|
+
default: !1
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
emits: ["update:modelValue", "change"],
|
|
36
|
+
setup(e, { emit: u }) {
|
|
37
|
+
const r = u, l = e, i = (a) => {
|
|
38
|
+
r("update:modelValue", a[l.propsObj.value]), r("change", a[l.propsObj.value]);
|
|
39
|
+
};
|
|
40
|
+
return (a, w) => {
|
|
41
|
+
const p = b("el-icon");
|
|
42
|
+
return o(), n("div", {
|
|
43
|
+
class: s(["ai-box-tabs", `style-${e.styleType}`])
|
|
44
|
+
}, [
|
|
45
|
+
y("ul", null, [
|
|
46
|
+
(o(!0), n(f, null, g(e.tabList, (t, d) => (o(), n("li", {
|
|
47
|
+
key: t[l.propsObj.value],
|
|
48
|
+
onClick: (T) => i(t),
|
|
49
|
+
class: s(e.modelValue === t[l.propsObj.value] ? "current" : ""),
|
|
50
|
+
style: h(d == e.tabList.length - 1 ? "margin-right: 0;" : "")
|
|
51
|
+
}, [
|
|
52
|
+
t.icon && e.isShowIcon ? (o(), c(p, {
|
|
53
|
+
key: 0,
|
|
54
|
+
size: "18px",
|
|
55
|
+
style: { "margin-right": "4px" },
|
|
56
|
+
color: e.modelValue === t[l.propsObj.value] ? "#262626" : "#7f8387"
|
|
57
|
+
}, {
|
|
58
|
+
default: j(() => [
|
|
59
|
+
(o(), c(O(t.icon)))
|
|
60
|
+
]),
|
|
61
|
+
_: 2
|
|
62
|
+
}, 1032, ["color"])) : v("", !0),
|
|
63
|
+
x(" " + V(t[l.propsObj.label]), 1)
|
|
64
|
+
], 14, C))), 128))
|
|
65
|
+
])
|
|
66
|
+
], 2);
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
|
+
}, _ = /* @__PURE__ */ k(S, [["__scopeId", "data-v-bdfc72c7"]]), N = m(_);
|
|
70
|
+
export {
|
|
71
|
+
N as AiboxTabs,
|
|
72
|
+
N as default
|
|
73
|
+
};
|
|
@@ -0,0 +1,271 @@
|
|
|
1
|
+
import { w as B } from "./chunks/index.bCzIhWFw.js";
|
|
2
|
+
import { ref as m, computed as D, watch as C, nextTick as x, createBlock as U, openBlock as T, unref as a, withCtx as V, createElementVNode as P, createVNode as E, createElementBlock as O, createCommentVNode as w, Fragment as G, renderList as $, createTextVNode as y, toDisplayString as M, onMounted as F } from "vue";
|
|
3
|
+
import { emitsMap as t } from "color-star-custom-methods";
|
|
4
|
+
import { R as h, r as H, a as Y } from "./chunks/config.BU21Gda2.js";
|
|
5
|
+
import { D as Ae, M as _e, P as Ee } from "./chunks/config.BU21Gda2.js";
|
|
6
|
+
import { u as X, A as j } from "./chunks/index.ml5i7aB5.js";
|
|
7
|
+
import { ElRadioGroup as q, ElRadio as W, ElButton as k, ElMessage as z } from "element-plus";
|
|
8
|
+
import { useDialog as J, DialogContainer as K } from "./DialogContainer.mjs";
|
|
9
|
+
import { TreeShowSelect as Q } from "color-star-custom-components";
|
|
10
|
+
import { u as Z, g as ee } from "./chunks/i18n.DmqkiK-h.js";
|
|
11
|
+
const le = { class: "dialog-content" }, ae = {
|
|
12
|
+
key: 0,
|
|
13
|
+
class: "selection-area overflow-hidden"
|
|
14
|
+
}, te = { class: "dialog-footer" }, se = {
|
|
15
|
+
__name: "Dialog",
|
|
16
|
+
props: {
|
|
17
|
+
// 弹窗显示控制
|
|
18
|
+
visible: {
|
|
19
|
+
type: Boolean,
|
|
20
|
+
default: !1
|
|
21
|
+
},
|
|
22
|
+
// 当前选择的范围类型(是否全部可见)
|
|
23
|
+
allVisible: {
|
|
24
|
+
type: Boolean,
|
|
25
|
+
default: h.ALL
|
|
26
|
+
},
|
|
27
|
+
// 选中的项目列表
|
|
28
|
+
modelValue: {
|
|
29
|
+
type: Array,
|
|
30
|
+
default: () => []
|
|
31
|
+
},
|
|
32
|
+
// 树形数据
|
|
33
|
+
treeList: {
|
|
34
|
+
type: Array,
|
|
35
|
+
default: () => []
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
emits: [t.updateVisible, t.save, t.cancel],
|
|
39
|
+
setup(f, { emit: A }) {
|
|
40
|
+
const { t: v } = Z(), c = f, b = A, { showDialog: _, dialogRef: p } = J(), r = m(c.allVisible), o = m([...c.modelValue]), u = m(), { selectedMembers: s, selectedDepartments: g } = X(
|
|
41
|
+
o,
|
|
42
|
+
D(() => c.treeList),
|
|
43
|
+
!1
|
|
44
|
+
// 编辑模式
|
|
45
|
+
);
|
|
46
|
+
C(
|
|
47
|
+
() => c.visible,
|
|
48
|
+
(l) => {
|
|
49
|
+
l && x(() => {
|
|
50
|
+
_();
|
|
51
|
+
});
|
|
52
|
+
},
|
|
53
|
+
{ immediate: !0 }
|
|
54
|
+
);
|
|
55
|
+
const N = D(() => {
|
|
56
|
+
const l = [];
|
|
57
|
+
return g.value.forEach((i) => {
|
|
58
|
+
l.push({
|
|
59
|
+
...i,
|
|
60
|
+
// TreeSelect列表模式不需要children
|
|
61
|
+
children: void 0
|
|
62
|
+
});
|
|
63
|
+
}), s.value.forEach((i) => {
|
|
64
|
+
l.push({
|
|
65
|
+
...i,
|
|
66
|
+
children: void 0
|
|
67
|
+
});
|
|
68
|
+
}), l;
|
|
69
|
+
}), L = (l) => {
|
|
70
|
+
r.value = l, l === h.ALL && (o.value = []);
|
|
71
|
+
}, R = (l) => {
|
|
72
|
+
const { selectedNode: i } = l;
|
|
73
|
+
o.value = i || [];
|
|
74
|
+
}, I = () => {
|
|
75
|
+
b(t.cancel), b(t.updateVisible, !1);
|
|
76
|
+
}, S = () => {
|
|
77
|
+
if (r.value === h.PARTIAL && !o.value.length) {
|
|
78
|
+
z.warning(v("COMMON_DICT.ENUMS.AVAILABLE_RANGE_EMPTY_TIP"));
|
|
79
|
+
return;
|
|
80
|
+
}
|
|
81
|
+
b(t.save, {
|
|
82
|
+
type: r.value,
|
|
83
|
+
selectedItems: [...o.value]
|
|
84
|
+
}), b(t.updateVisible, !1);
|
|
85
|
+
};
|
|
86
|
+
return (l, i) => (T(), U(a(K), {
|
|
87
|
+
ref_key: "dialogRef",
|
|
88
|
+
ref: p,
|
|
89
|
+
title: a(v)("COMMON_DICT.ENUMS.AVAILABLE_RANGE_SETTING"),
|
|
90
|
+
onClose: I
|
|
91
|
+
}, {
|
|
92
|
+
footer: V(() => [
|
|
93
|
+
P("div", te, [
|
|
94
|
+
E(a(k), {
|
|
95
|
+
onClick: I,
|
|
96
|
+
plain: ""
|
|
97
|
+
}, {
|
|
98
|
+
default: V(() => [
|
|
99
|
+
y(M(a(v)("COMMON_BUTTON.CANCEL_TEXT")), 1)
|
|
100
|
+
]),
|
|
101
|
+
_: 1
|
|
102
|
+
}),
|
|
103
|
+
E(a(k), {
|
|
104
|
+
type: "primary",
|
|
105
|
+
onClick: S
|
|
106
|
+
}, {
|
|
107
|
+
default: V(() => [
|
|
108
|
+
y(M(a(v)("COMMON_BUTTON.SAVE_TEXT")), 1)
|
|
109
|
+
]),
|
|
110
|
+
_: 1
|
|
111
|
+
})
|
|
112
|
+
])
|
|
113
|
+
]),
|
|
114
|
+
default: V(() => [
|
|
115
|
+
P("div", le, [
|
|
116
|
+
E(a(q), {
|
|
117
|
+
class: "pd-b-16",
|
|
118
|
+
modelValue: r.value,
|
|
119
|
+
"onUpdate:modelValue": i[0] || (i[0] = (e) => r.value = e),
|
|
120
|
+
onChange: L
|
|
121
|
+
}, {
|
|
122
|
+
default: V(() => [
|
|
123
|
+
(T(!0), O(G, null, $(a(H), (e) => (T(), U(a(W), {
|
|
124
|
+
key: e.value,
|
|
125
|
+
value: e.value
|
|
126
|
+
}, {
|
|
127
|
+
default: V(() => [
|
|
128
|
+
y(M(e.label), 1)
|
|
129
|
+
]),
|
|
130
|
+
_: 2
|
|
131
|
+
}, 1032, ["value"]))), 128))
|
|
132
|
+
]),
|
|
133
|
+
_: 1
|
|
134
|
+
}, 8, ["modelValue"]),
|
|
135
|
+
r.value === a(h).PARTIAL ? (T(), O("div", ae, [
|
|
136
|
+
E(a(Q), {
|
|
137
|
+
modelValue: o.value,
|
|
138
|
+
"onUpdate:modelValue": i[1] || (i[1] = (e) => o.value = e),
|
|
139
|
+
ref_key: "treeRef",
|
|
140
|
+
ref: u,
|
|
141
|
+
treeProps: a(Y),
|
|
142
|
+
treeList: f.treeList,
|
|
143
|
+
hasFilter: !0,
|
|
144
|
+
rightTreeList: N.value,
|
|
145
|
+
itemUnitName: a(v)("COMMON_DICT.ENUMS.ITEM_UNIT_NAME"),
|
|
146
|
+
style: { height: "500px" },
|
|
147
|
+
onGetCheckedNode: R
|
|
148
|
+
}, null, 8, ["modelValue", "treeProps", "treeList", "rightTreeList", "itemUnitName"])
|
|
149
|
+
])) : w("", !0)
|
|
150
|
+
])
|
|
151
|
+
]),
|
|
152
|
+
_: 1
|
|
153
|
+
}, 8, ["title"]));
|
|
154
|
+
}
|
|
155
|
+
}, ie = () => {
|
|
156
|
+
const { $request: f, $env: A } = ee();
|
|
157
|
+
return {
|
|
158
|
+
availableRangeApi: () => f({
|
|
159
|
+
url: `${A.VITE_APP_AUTH_BASE_URL}/api/v1/admin/member/search`,
|
|
160
|
+
method: "get"
|
|
161
|
+
})
|
|
162
|
+
};
|
|
163
|
+
}, oe = { class: "available-range-setting w-full" }, ne = /* @__PURE__ */ Object.assign({
|
|
164
|
+
name: "AvailableRangeSetting"
|
|
165
|
+
}, {
|
|
166
|
+
__name: "layout",
|
|
167
|
+
props: {
|
|
168
|
+
// 当前选择的范围类型(是否全部可见)
|
|
169
|
+
allVisible: {
|
|
170
|
+
type: Boolean,
|
|
171
|
+
default: h.ALL
|
|
172
|
+
},
|
|
173
|
+
// 选中的项目列表
|
|
174
|
+
modelValue: {
|
|
175
|
+
type: Array,
|
|
176
|
+
default: () => []
|
|
177
|
+
}
|
|
178
|
+
},
|
|
179
|
+
emits: [
|
|
180
|
+
t.updateAllVisible,
|
|
181
|
+
t.updateModelValue,
|
|
182
|
+
t.change
|
|
183
|
+
],
|
|
184
|
+
setup(f, { expose: A, emit: v }) {
|
|
185
|
+
const c = f, { availableRangeApi: b } = ie(), _ = v, p = m(!1), r = m(!1), o = m([]), u = m(c.allVisible), s = m(c.modelValue), g = m(
|
|
186
|
+
new Set(s.value?.map((e) => e.memberId))
|
|
187
|
+
), N = () => {
|
|
188
|
+
r.value = !0, b().then((e) => {
|
|
189
|
+
o.value = e?.data?.orgOptionSoList || [];
|
|
190
|
+
}).finally(() => {
|
|
191
|
+
r.value = !1;
|
|
192
|
+
});
|
|
193
|
+
}, L = () => {
|
|
194
|
+
p.value = !0;
|
|
195
|
+
}, R = (e) => {
|
|
196
|
+
u.value = e.type, s.value = e.selectedItems, g.value.clear(), s.value.forEach((n) => {
|
|
197
|
+
g.value.add(n.memberId);
|
|
198
|
+
}), _(t.updateAllVisible, u.value), _(t.updateModelValue, s.value), S();
|
|
199
|
+
}, I = () => {
|
|
200
|
+
p.value = !1;
|
|
201
|
+
}, S = () => {
|
|
202
|
+
const e = {
|
|
203
|
+
allVisible: u.value,
|
|
204
|
+
selectedItems: s.value
|
|
205
|
+
};
|
|
206
|
+
_(t.change, e);
|
|
207
|
+
}, l = m(null), i = () => {
|
|
208
|
+
const e = l.value?.allSelectedItems || [];
|
|
209
|
+
return {
|
|
210
|
+
allVisible: u.value,
|
|
211
|
+
visibleScope: e.map((d) => ({
|
|
212
|
+
memberId: d.memberId,
|
|
213
|
+
memberName: d.memberName,
|
|
214
|
+
memberType: d.memberType,
|
|
215
|
+
bnid: d.bnid
|
|
216
|
+
}))
|
|
217
|
+
};
|
|
218
|
+
};
|
|
219
|
+
return C(
|
|
220
|
+
() => c.allVisible,
|
|
221
|
+
(e) => {
|
|
222
|
+
u.value = e;
|
|
223
|
+
},
|
|
224
|
+
{ immediate: !0 }
|
|
225
|
+
), C(
|
|
226
|
+
() => c.modelValue,
|
|
227
|
+
(e) => {
|
|
228
|
+
s.value = e || [], g.value.clear(), s.value.forEach((n) => {
|
|
229
|
+
g.value.add(n.memberId);
|
|
230
|
+
});
|
|
231
|
+
},
|
|
232
|
+
{ immediate: !0 }
|
|
233
|
+
), F(() => {
|
|
234
|
+
N();
|
|
235
|
+
}), A({
|
|
236
|
+
getSelectedItems: i
|
|
237
|
+
}), (e, n) => (T(), O("div", oe, [
|
|
238
|
+
E(a(j), {
|
|
239
|
+
allVisible: u.value,
|
|
240
|
+
"model-value": s.value,
|
|
241
|
+
"tree-list": o.value,
|
|
242
|
+
onEdit: L,
|
|
243
|
+
ref_key: "previewRef",
|
|
244
|
+
ref: l
|
|
245
|
+
}, null, 8, ["allVisible", "model-value", "tree-list"]),
|
|
246
|
+
p.value ? (T(), U(se, {
|
|
247
|
+
key: 0,
|
|
248
|
+
visible: p.value,
|
|
249
|
+
"onUpdate:visible": n[0] || (n[0] = (d) => p.value = d),
|
|
250
|
+
allVisible: u.value,
|
|
251
|
+
"onUpdate:allVisible": n[1] || (n[1] = (d) => u.value = d),
|
|
252
|
+
modelValue: s.value,
|
|
253
|
+
"onUpdate:modelValue": n[2] || (n[2] = (d) => s.value = d),
|
|
254
|
+
"tree-list": o.value,
|
|
255
|
+
loading: r.value,
|
|
256
|
+
onSave: R,
|
|
257
|
+
onCancel: I
|
|
258
|
+
}, null, 8, ["visible", "allVisible", "modelValue", "tree-list", "loading"])) : w("", !0)
|
|
259
|
+
]));
|
|
260
|
+
}
|
|
261
|
+
}), ge = B(ne);
|
|
262
|
+
export {
|
|
263
|
+
ge as AvailableRangeSetting,
|
|
264
|
+
Ae as DEFAULT_SHOW_COUNT,
|
|
265
|
+
_e as MEMBER_DEPARTMENT_TYPES,
|
|
266
|
+
Ee as PUBLISH_STATUS,
|
|
267
|
+
h as RANGE_TYPES,
|
|
268
|
+
Y as availableRangeTreeProps,
|
|
269
|
+
ge as default,
|
|
270
|
+
H as rangeOptions
|
|
271
|
+
};
|
|
@@ -0,0 +1,209 @@
|
|
|
1
|
+
import { w as D } from "./chunks/index.bCzIhWFw.js";
|
|
2
|
+
import { computed as f, createBlock as _, openBlock as s, unref as n, withCtx as d, createElementVNode as S, createCommentVNode as g, resolveDynamicComponent as P, toDisplayString as m, createElementBlock as a, Fragment as v, renderList as I, createVNode as L, normalizeStyle as B, createTextVNode as H, withModifiers as V } from "vue";
|
|
3
|
+
import { ElTag as O, ElIcon as U, ElPopover as G } from "element-plus";
|
|
4
|
+
import { u as z } from "./chunks/i18n.DmqkiK-h.js";
|
|
5
|
+
import { f as k, e as C, d as w, P as A, R as E, C as M, g as $ } from "./chunks/config.8htFF04x.js";
|
|
6
|
+
import { A as R } from "./chunks/index.ml5i7aB5.js";
|
|
7
|
+
import { _ as j } from "./chunks/_plugin-vue_export-helper.CHgC5LLL.js";
|
|
8
|
+
import { P as p } from "./chunks/config.BU21Gda2.js";
|
|
9
|
+
import './assets/CommonTagsList.css';const F = { class: "status-tag-content flex items-center" }, K = { class: "status-text fz-12" }, W = {
|
|
10
|
+
__name: "StatusTag",
|
|
11
|
+
props: {
|
|
12
|
+
channelStatus: {
|
|
13
|
+
type: [String, Number],
|
|
14
|
+
default: null
|
|
15
|
+
},
|
|
16
|
+
statusText: {
|
|
17
|
+
type: String,
|
|
18
|
+
default: null
|
|
19
|
+
},
|
|
20
|
+
showIcon: {
|
|
21
|
+
type: Boolean,
|
|
22
|
+
default: !1
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
setup(c) {
|
|
26
|
+
const i = c, u = f(() => k[i.channelStatus]), x = f(() => C[i.channelStatus]), T = f(() => w[i.channelStatus]), b = f(() => A[i.channelStatus]);
|
|
27
|
+
return (N, r) => (s(), _(n(O), { type: u.value }, {
|
|
28
|
+
default: d(() => [
|
|
29
|
+
S("div", F, [
|
|
30
|
+
c.showIcon && T.value ? (s(), _(n(U), {
|
|
31
|
+
key: 0,
|
|
32
|
+
color: b.value
|
|
33
|
+
}, {
|
|
34
|
+
default: d(() => [
|
|
35
|
+
(s(), _(P(T.value)))
|
|
36
|
+
]),
|
|
37
|
+
_: 1
|
|
38
|
+
}, 8, ["color"])) : g("", !0),
|
|
39
|
+
S("span", K, m(c.statusText || x.value), 1)
|
|
40
|
+
])
|
|
41
|
+
]),
|
|
42
|
+
_: 1
|
|
43
|
+
}, 8, ["type"]));
|
|
44
|
+
}
|
|
45
|
+
}, Y = /* @__PURE__ */ j(W, [["__scopeId", "data-v-59c4f44d"]]), X = { class: "commont-status-box" }, q = {
|
|
46
|
+
class: "common-content w-full overflow-y-auto",
|
|
47
|
+
style: { "max-height": "200px" }
|
|
48
|
+
}, J = {
|
|
49
|
+
key: 0,
|
|
50
|
+
class: "content-item"
|
|
51
|
+
}, Q = { class: "content-item-top flex items-center" }, Z = { class: "item-bottom-box mg-l-4 pd-t-8 flex flex-wrap" }, ee = {
|
|
52
|
+
key: 1,
|
|
53
|
+
class: "icon-placeholder w-full mg-t-4 mg-b-8 bg-e6e8ea",
|
|
54
|
+
style: { height: "1px" }
|
|
55
|
+
}, te = {
|
|
56
|
+
key: 0,
|
|
57
|
+
class: "all-visible-ranges-section mg-t-12"
|
|
58
|
+
}, se = { class: "channel-name fz-12 weight-500 mg-b-4 text-1f2329 flex items-center" }, ne = {
|
|
59
|
+
key: 0,
|
|
60
|
+
class: "range-separator w-full mg-t-8 mg-b-8 bg-e6e8ea",
|
|
61
|
+
style: { height: "1px" }
|
|
62
|
+
}, le = /* @__PURE__ */ Object.assign({
|
|
63
|
+
name: "CommonTagsList"
|
|
64
|
+
}, {
|
|
65
|
+
__name: "layout",
|
|
66
|
+
props: {
|
|
67
|
+
publishChannelList: {
|
|
68
|
+
type: Array,
|
|
69
|
+
default: () => []
|
|
70
|
+
},
|
|
71
|
+
sourceType: {
|
|
72
|
+
type: [String, Number],
|
|
73
|
+
default: null
|
|
74
|
+
}
|
|
75
|
+
},
|
|
76
|
+
setup(c) {
|
|
77
|
+
const { t: i } = z(), u = c, x = f(() => {
|
|
78
|
+
const r = u.publishChannelList || [], t = r.filter((e) => e.channelStatus === p.PUBLISHED).map((e) => ({
|
|
79
|
+
...e,
|
|
80
|
+
displayText: E?.[e.channelType]?.name(u.sourceType) || ""
|
|
81
|
+
})), l = r.filter((e) => e.channelStatus !== p.PUBLISHED).reduce((e, o) => {
|
|
82
|
+
const y = o.channelStatus;
|
|
83
|
+
return e[y] || (e[y] = []), e[y].push(o), e;
|
|
84
|
+
}, {}), h = Object.entries(l).map(([e, o]) => ({
|
|
85
|
+
channelStatus: parseInt(e),
|
|
86
|
+
displayText: `${C[parseInt(e)]}(${o.length})`,
|
|
87
|
+
isGroup: !0,
|
|
88
|
+
channels: o
|
|
89
|
+
})).sort((e, o) => o.channelStatus - e.channelStatus);
|
|
90
|
+
return [...t, ...h];
|
|
91
|
+
}), T = f(() => {
|
|
92
|
+
if (!u.publishChannelList?.length) return [];
|
|
93
|
+
const r = u.publishChannelList.reduce((t, l) => {
|
|
94
|
+
const h = l.channelStatus;
|
|
95
|
+
return t[h] || (t[h] = []), t[h].push(l), t;
|
|
96
|
+
}, {});
|
|
97
|
+
return Object.entries(r).map(([t, l]) => ({
|
|
98
|
+
status: parseInt(t),
|
|
99
|
+
channels: l
|
|
100
|
+
})).sort((t, l) => t.status === p.PUBLISHED ? -1 : l.status === p.PUBLISHED ? 1 : l.status - t.status);
|
|
101
|
+
}), b = f(() => {
|
|
102
|
+
if (!u.publishChannelList?.length) return [];
|
|
103
|
+
const r = i("COMMON_TAGS_LIST.UNKNOWN_CHANNEL");
|
|
104
|
+
return u.publishChannelList.filter((t) => !t.visibleScope || t.visibleScope.length === 0 ? !1 : t.channelStatus === p.PUBLISHED).map((t) => ({
|
|
105
|
+
channelName: E[t.channelType]?.name(u.sourceType) || r,
|
|
106
|
+
channelType: t.channelType,
|
|
107
|
+
visibleScope: t.visibleScope,
|
|
108
|
+
allVisible: t.allVisible
|
|
109
|
+
}));
|
|
110
|
+
}), N = (r) => {
|
|
111
|
+
const t = $[r];
|
|
112
|
+
return M[t];
|
|
113
|
+
};
|
|
114
|
+
return (r, t) => (s(), a("div", X, [
|
|
115
|
+
(s(!0), a(v, null, I(x.value, (l, h) => (s(), _(n(G), {
|
|
116
|
+
key: h,
|
|
117
|
+
placement: "bottom",
|
|
118
|
+
trigger: "click",
|
|
119
|
+
width: "300"
|
|
120
|
+
}, {
|
|
121
|
+
reference: d(() => [
|
|
122
|
+
L(Y, {
|
|
123
|
+
onClick: t[0] || (t[0] = V(() => {
|
|
124
|
+
}, ["stop"])),
|
|
125
|
+
"channel-status": l.channelStatus,
|
|
126
|
+
"status-text": l.displayText,
|
|
127
|
+
"show-icon": !0,
|
|
128
|
+
class: "mg-r-4 mg-b-4"
|
|
129
|
+
}, null, 8, ["channel-status", "status-text"])
|
|
130
|
+
]),
|
|
131
|
+
default: d(() => [
|
|
132
|
+
S("div", q, [
|
|
133
|
+
(s(!0), a(v, null, I(T.value, (e, o) => (s(), a(v, {
|
|
134
|
+
key: e.status
|
|
135
|
+
}, [
|
|
136
|
+
e.channels.length > 0 ? (s(), a("div", J, [
|
|
137
|
+
S("div", Q, [
|
|
138
|
+
L(n(U), {
|
|
139
|
+
style: B({ color: n(A)[e.status] })
|
|
140
|
+
}, {
|
|
141
|
+
default: d(() => [
|
|
142
|
+
(s(), _(P(n(w)[e.status])))
|
|
143
|
+
]),
|
|
144
|
+
_: 2
|
|
145
|
+
}, 1032, ["style"]),
|
|
146
|
+
S("div", {
|
|
147
|
+
class: "content-item-name fz-14 mg-l-4",
|
|
148
|
+
style: B({ color: n(A)[e.status] })
|
|
149
|
+
}, m(n(C)[e.status]) + "(" + m(e.channels.length) + ") ", 5)
|
|
150
|
+
]),
|
|
151
|
+
S("div", Z, [
|
|
152
|
+
(s(!0), a(v, null, I(e.channels, (y) => (s(), a("div", {
|
|
153
|
+
class: "b-item-box mg-r-8 radius-4 fz-12 pd-t-4 pd-b-4 pd-l-8 pd-r-8 mg-b-8 text-1f2329 bg-f5f6f7",
|
|
154
|
+
key: y.channelType
|
|
155
|
+
}, m(n(E)?.[y.channelType]?.name(
|
|
156
|
+
c.sourceType
|
|
157
|
+
)), 1))), 128))
|
|
158
|
+
])
|
|
159
|
+
])) : g("", !0),
|
|
160
|
+
o < T.value.length - 1 ? (s(), a("div", ee)) : g("", !0)
|
|
161
|
+
], 64))), 128)),
|
|
162
|
+
b.value.length > 0 ? (s(), a("div", te, [
|
|
163
|
+
(s(!0), a(v, null, I(b.value, (e, o) => (s(), a("div", {
|
|
164
|
+
key: e.channelType,
|
|
165
|
+
class: "channel-visible-range"
|
|
166
|
+
}, [
|
|
167
|
+
S("div", se, [
|
|
168
|
+
L(n(U), {
|
|
169
|
+
class: "mg-r-2",
|
|
170
|
+
size: "14",
|
|
171
|
+
color: N(e.channelType)?.iconColor
|
|
172
|
+
}, {
|
|
173
|
+
default: d(() => [
|
|
174
|
+
(s(), _(P(N(e.channelType)?.icon)))
|
|
175
|
+
]),
|
|
176
|
+
_: 2
|
|
177
|
+
}, 1032, ["color"]),
|
|
178
|
+
H(" " + m(e.channelName) + " " + m(n(i)("COMMON_TAGS_LIST.AVAILABLE_SCOPE")), 1)
|
|
179
|
+
]),
|
|
180
|
+
L(n(R), {
|
|
181
|
+
"all-visible": e.allVisible,
|
|
182
|
+
"model-value": e.visibleScope,
|
|
183
|
+
"tree-list": [],
|
|
184
|
+
readonly: !0
|
|
185
|
+
}, null, 8, ["all-visible", "model-value"]),
|
|
186
|
+
o < b.value.length - 1 ? (s(), a("div", ne)) : g("", !0)
|
|
187
|
+
]))), 128))
|
|
188
|
+
])) : g("", !0)
|
|
189
|
+
])
|
|
190
|
+
]),
|
|
191
|
+
_: 2
|
|
192
|
+
}, 1024))), 128)),
|
|
193
|
+
c.publishChannelList?.length ? g("", !0) : (s(), _(n(O), {
|
|
194
|
+
key: 0,
|
|
195
|
+
type: n(k)[n(p).UNPUBLISHED]
|
|
196
|
+
}, {
|
|
197
|
+
default: d(() => [
|
|
198
|
+
H(m(n(C)[n(p).UNPUBLISHED]), 1)
|
|
199
|
+
]),
|
|
200
|
+
_: 1
|
|
201
|
+
}, 8, ["type"]))
|
|
202
|
+
]));
|
|
203
|
+
}
|
|
204
|
+
}), me = D(le);
|
|
205
|
+
export {
|
|
206
|
+
me as CommonTagsList,
|
|
207
|
+
Y as StatusTag,
|
|
208
|
+
me as default
|
|
209
|
+
};
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
import { w as C } from "./chunks/index.bCzIhWFw.js";
|
|
2
|
+
import { ref as n, computed as b, onBeforeUnmount as B, createBlock as k, createCommentVNode as V, openBlock as O, unref as S, normalizeClass as x, withCtx as u, createElementVNode as T, renderSlot as i, nextTick as r } from "vue";
|
|
3
|
+
import { ElDialog as $ } from "element-plus";
|
|
4
|
+
import './assets/DialogContainer.css';const E = { class: "dialog-body" }, N = {
|
|
5
|
+
__name: "DialogContainer",
|
|
6
|
+
props: {
|
|
7
|
+
// 弹框宽度
|
|
8
|
+
width: {
|
|
9
|
+
type: String,
|
|
10
|
+
default: "720px"
|
|
11
|
+
},
|
|
12
|
+
// 弹框标题
|
|
13
|
+
title: {
|
|
14
|
+
type: String,
|
|
15
|
+
default: ""
|
|
16
|
+
},
|
|
17
|
+
// 是否显示关闭按钮|是否esc和点击遮罩关闭
|
|
18
|
+
closable: {
|
|
19
|
+
type: Boolean,
|
|
20
|
+
default: !0
|
|
21
|
+
},
|
|
22
|
+
// 是否显示关闭销毁
|
|
23
|
+
destroyOnclose: {
|
|
24
|
+
type: Boolean,
|
|
25
|
+
default: !1
|
|
26
|
+
},
|
|
27
|
+
// 自定义类名
|
|
28
|
+
customClass: {
|
|
29
|
+
type: String,
|
|
30
|
+
default: ""
|
|
31
|
+
},
|
|
32
|
+
// 拖动
|
|
33
|
+
draggable: {
|
|
34
|
+
type: Boolean,
|
|
35
|
+
default: !0
|
|
36
|
+
},
|
|
37
|
+
// appendTo: {
|
|
38
|
+
// type: String,
|
|
39
|
+
// default: '#layout-wrap__left'
|
|
40
|
+
// },
|
|
41
|
+
modal: {
|
|
42
|
+
type: Boolean,
|
|
43
|
+
default: !0
|
|
44
|
+
},
|
|
45
|
+
fullscreen: {
|
|
46
|
+
type: Boolean,
|
|
47
|
+
default: !1
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
emits: ["open", "opened", "close", "closed"],
|
|
51
|
+
setup(e, { expose: o, emit: s }) {
|
|
52
|
+
const t = s, c = e, a = n(!1), d = n(!1), m = () => {
|
|
53
|
+
a.value = !0, r(() => {
|
|
54
|
+
d.value = !0;
|
|
55
|
+
});
|
|
56
|
+
}, g = () => {
|
|
57
|
+
d.value = !1;
|
|
58
|
+
}, p = b(() => {
|
|
59
|
+
const l = ["dialog-container"];
|
|
60
|
+
return c.customClass && l.push(c.customClass), c.fullscreen || l.push("not-fullscreen"), l.join(" ");
|
|
61
|
+
}), h = () => {
|
|
62
|
+
t("open");
|
|
63
|
+
}, v = () => {
|
|
64
|
+
t("opened");
|
|
65
|
+
}, y = () => {
|
|
66
|
+
t("close");
|
|
67
|
+
}, D = () => {
|
|
68
|
+
t("closed"), r(() => {
|
|
69
|
+
a.value = !1;
|
|
70
|
+
});
|
|
71
|
+
};
|
|
72
|
+
return B(() => {
|
|
73
|
+
a.value = !1;
|
|
74
|
+
}), o({
|
|
75
|
+
showDialog: m,
|
|
76
|
+
hideDialog: g
|
|
77
|
+
}), (l, f) => a.value ? (O(), k(S($), {
|
|
78
|
+
key: 0,
|
|
79
|
+
ref: "Dialog",
|
|
80
|
+
modelValue: d.value,
|
|
81
|
+
"onUpdate:modelValue": f[0] || (f[0] = (w) => d.value = w),
|
|
82
|
+
width: e.width,
|
|
83
|
+
title: e.title,
|
|
84
|
+
"append-to-body": "",
|
|
85
|
+
modal: e.modal,
|
|
86
|
+
"close-on-click-modal": !1,
|
|
87
|
+
"close-on-press-escape": !1,
|
|
88
|
+
"show-close": e.closable,
|
|
89
|
+
"destroy-on-close": e.destroyOnclose,
|
|
90
|
+
class: x(p.value),
|
|
91
|
+
draggable: e.draggable,
|
|
92
|
+
fullscreen: e.fullscreen,
|
|
93
|
+
onOpen: h,
|
|
94
|
+
onOpened: v,
|
|
95
|
+
onClose: y,
|
|
96
|
+
onClosed: D
|
|
97
|
+
}, {
|
|
98
|
+
header: u(() => [
|
|
99
|
+
i(l.$slots, "title")
|
|
100
|
+
]),
|
|
101
|
+
footer: u(() => [
|
|
102
|
+
i(l.$slots, "footer")
|
|
103
|
+
]),
|
|
104
|
+
default: u(() => [
|
|
105
|
+
T("div", E, [
|
|
106
|
+
i(l.$slots, "default")
|
|
107
|
+
])
|
|
108
|
+
]),
|
|
109
|
+
_: 3
|
|
110
|
+
}, 8, ["modelValue", "width", "title", "modal", "show-close", "destroy-on-close", "class", "draggable", "fullscreen"])) : V("", !0);
|
|
111
|
+
}
|
|
112
|
+
}, z = (e = n(!1)) => {
|
|
113
|
+
const o = n(null), s = n(null);
|
|
114
|
+
return {
|
|
115
|
+
dialogRef: o,
|
|
116
|
+
//弹窗的ref必须为dialogRef
|
|
117
|
+
formRef: s,
|
|
118
|
+
//弹窗里面含有form表单的话,ref必须为formRef
|
|
119
|
+
showDialog: () => {
|
|
120
|
+
o.value.showDialog();
|
|
121
|
+
},
|
|
122
|
+
hideDialog: () => {
|
|
123
|
+
e.value = !1, o.value.hideDialog();
|
|
124
|
+
},
|
|
125
|
+
resetDialog: () => {
|
|
126
|
+
e.value = !1, s.value && r(() => {
|
|
127
|
+
s.value.resetFields();
|
|
128
|
+
});
|
|
129
|
+
}
|
|
130
|
+
};
|
|
131
|
+
}, F = C(N);
|
|
132
|
+
export {
|
|
133
|
+
F as DialogContainer,
|
|
134
|
+
F as default,
|
|
135
|
+
z as useDialog
|
|
136
|
+
};
|