china-mobile-international-custom-components 0.0.44 → 0.0.46

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.
Files changed (57) hide show
  1. package/es/ApplicationTypeTag.mjs +1 -1
  2. package/es/AvailableRangePreview.mjs +1 -1
  3. package/es/AvailableRangeSetting.mjs +2 -2
  4. package/es/CommonTagsList.mjs +3 -3
  5. package/es/FileUploader.mjs +1 -1
  6. package/es/PageContainer.mjs +28 -31
  7. package/es/ParameterTable.mjs +1 -1
  8. package/es/SourcePublish.mjs +6 -6
  9. package/es/Table.mjs +2 -2
  10. package/es/assets/PageContainer.css +1 -1
  11. package/es/chunks/{BackBar.9Pp2SYB-.js → BackBar.DY42HcZy.js} +1 -1
  12. package/es/chunks/{BackBar.DwhmSL-a.js → BackBar.eaUb1JvV.js} +98 -98
  13. package/es/chunks/{config.DVEvXGIL.js → config.CvOtShOj.js} +2 -2
  14. package/es/chunks/config.CyAT4SUn.js +435 -0
  15. package/es/chunks/config.JrGX09T5.js +435 -0
  16. package/es/chunks/{i18n.DMVLcyDY.js → i18n.Bd7hh14j.js} +2 -2
  17. package/es/chunks/{i18n.BNeBD4gR.js → i18n.CfMhDOdX.js} +6 -6
  18. package/es/chunks/{index.CZTB65ge.js → index.CHlFhI6c.js} +1 -1
  19. package/es/chunks/index.DjDvyGXt.js +313 -0
  20. package/es/chunks/layout.B1qqvrXz.js +639 -0
  21. package/es/index.mjs +4 -4
  22. package/lib/ApplicationTypeTag.js +1 -1
  23. package/lib/AvailableRangePreview.js +1 -1
  24. package/lib/AvailableRangeSetting.js +1 -1
  25. package/lib/CommonTagsList.js +1 -1
  26. package/lib/FileUploader.js +1 -1
  27. package/lib/PageContainer.js +1 -1
  28. package/lib/ParameterTable.js +1 -1
  29. package/lib/SourcePublish.js +1 -1
  30. package/lib/Table.js +1 -1
  31. package/lib/assets/PageContainer.css +1 -1
  32. package/lib/chunks/{BackBar.DFDSVp2a.js → BackBar.By7ouDgL.js} +1 -1
  33. package/lib/chunks/BackBar.CaaASGvb.js +1 -0
  34. package/lib/chunks/config.BInpXFGZ.js +1 -0
  35. package/lib/chunks/config.CL0cmPQ6.js +1 -0
  36. package/lib/chunks/{config.Dwnp4fRZ.js → config.CqfpM51B.js} +1 -1
  37. package/lib/chunks/{i18n.Bzvn6t8H.js → i18n.D3L1FBDI.js} +2 -2
  38. package/lib/chunks/{index.DO3h_zf2.js → index.D-pFPuUr.js} +1 -1
  39. package/lib/chunks/index.zQ1SfvBa.js +1 -0
  40. package/lib/chunks/layout.Cen7E9tF.js +1 -0
  41. package/lib/index.js +1 -1
  42. package/package.json +3 -3
  43. package/es/assets/index3.css +0 -1
  44. package/es/chunks/i18n.DUrvNBQz.js +0 -4028
  45. package/es/chunks/index.BcLVH95_.js +0 -4058
  46. package/es/chunks/index.CSPp4g5C.js +0 -303
  47. package/es/chunks/index.ClqvUq64.js +0 -302
  48. package/es/chunks/index.Dh5IGfxO.js +0 -290
  49. package/es/chunks/index.Doax01RQ.js +0 -254
  50. package/lib/assets/index3.css +0 -1
  51. package/lib/chunks/BackBar.CYThcqhK.js +0 -1
  52. package/lib/chunks/i18n.D-d0yyXi.js +0 -6
  53. package/lib/chunks/index.6X8xsqRJ.js +0 -1
  54. package/lib/chunks/index.Bk55us0s.js +0 -1
  55. package/lib/chunks/index.CP9rhXZ5.js +0 -1
  56. package/lib/chunks/index.CSLWrMRE.js +0 -1
  57. package/lib/chunks/index.CV29Us4A.js +0 -6
@@ -1,290 +0,0 @@
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
- };
@@ -1,254 +0,0 @@
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
- };
@@ -1 +0,0 @@
1
- .nowrap[data-v-32a1fa42]{white-space:nowrap}.tag-list .tag-item[data-v-32a1fa42]{display:inline-block;line-height:22px}.gap-4[data-v-32a1fa42]{gap:4px}.tag-list-popover[data-v-32a1fa42]{max-height:300px}.tag-list-popover-wrapper{z-index:10000!important}
@@ -1 +0,0 @@
1
- "use strict";require('../assets/BackBar.css');const e=require("vue"),B=require("./i18n.D-d0yyXi.js"),x=require("color-message-aibox-vue"),n=require("element-plus"),R=require("./_plugin-vue_export-helper.BHFhmbuH.js"),A=require("vue-router"),O={class:"table-btns"},F={class:"btn-box"},z={__name:"TableBtns",props:{config:{type:Array,required:!0,default(){return[]}},showNums:{type:Number,default:0,validator(a){return a%1===0&&a>=0}},row:{type:Object,default:()=>({})}},setup(a){const p=a,{t:k}=B.useI18n(),c=(s,f)=>{s&&s(f)},u=e.computed(()=>p.config.filter(s=>{const f=s.permission!==void 0?s.permission:!0;let r=!0;return s.dataPermission&&(r=s.dataPermission),f&&r})),h=e.computed(()=>({show:u.value.slice(0,p.showNums),hide:u.value.slice(p.showNums)}));return(s,f)=>(e.openBlock(),e.createElementBlock("div",O,[u.value.length>a.showNums?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value.show,(r,w)=>(e.openBlock(),e.createBlock(e.unref(n.ElButton),{key:w,type:"primary",link:"",onClick:d=>c(r.fn,r.row)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(r.label),1)]),_:2},1032,["onClick"]))),128)),e.createVNode(e.unref(n.ElDropdown),{"popper-class":"custom-dropdown",trigger:"click"},{dropdown:e.withCtx(()=>[e.createVNode(e.unref(n.ElDropdownMenu),{style:{padding:"14px 0"}},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value.hide,(r,w)=>(e.openBlock(),e.createBlock(e.unref(n.ElDropdownItem),{key:w,class:e.normalizeClass({"is-delete":r.label===e.unref(k)("COMMON_BUTTON.DELETE_TEXT")||r.label===e.unref(k)("COMMON_BUTTON.DISABLE_TEXT")||r.isDanger}),onClick:d=>c(r.fn,r.row)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(r.label),1)]),_:2},1032,["class","onClick"]))),128))]),_:1})]),default:e.withCtx(()=>[e.createElementVNode("div",F,[e.createVNode(e.unref(n.ElIcon),{style:{"font-size":"20px",color:"#999"}},{default:e.withCtx(()=>[e.createVNode(e.unref(x.IconMore))]),_:1})])]),_:1})],64)):(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(u.value,(r,w)=>(e.openBlock(),e.createBlock(e.unref(n.ElButton),{type:"primary",link:"",key:w,onClick:d=>c(r.fn,r.row)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(r.label),1)]),_:2},1032,["onClick"]))),128))]))}},m=R._export_sfc(z,[["__scopeId","data-v-552341e3"]]),L={key:0,class:"aibox-table__handle"},H={class:"handle-left"},W={class:"handle-right"},I={class:"aibox-table__content"},q={key:0},j={class:"aibox-table__slot-wrapper"},K={class:"aibox-table__slot-wrapper"},X=["innerHTML"],U=["innerHTML"],G={class:"aibox-table__slot-wrapper"},Y=["onClick"],Z={class:"aibox-table__slot-wrapper"},J=["onClick"],Q={class:"aibox-table__slot-wrapper"},ee={class:"aibox-table__slot-wrapper"},le={key:0,class:"aibox-table__slot-wrapper"},te={__name:"AiboxTable",props:{columns:{type:Array,default:()=>[]},data:{type:Array,default:()=>[]},total:{type:[String,Number],default:0},hasPage:{type:Boolean,default:!0},onRowKey:{type:Function,default:()=>{}},onRowClassName:{type:Function,default:()=>{}},maxHeight:{type:[String,Number],default:null},isLoading:{type:Boolean,default:!1},pages:{type:Object,default:()=>({page:1,size:10})},showChangeSize:{type:Boolean,default:!0},isCustomEmpty:{type:Boolean,default:!1},hasBorder:{type:Boolean,default:!1},hasHeaderHandle:{type:Boolean,default:!1},isSecondaryHeader:{type:Boolean,default:!1},defaultSort:{type:Object},spanMethod:{type:Function,default:()=>{}},showSummary:{type:Boolean,default:!1},summaryMethod:{type:Function,default:()=>[]},showHandleNums:{type:Number,default:0},selectionType:{type:String,default:"checkbox"},expandRowKeys:{type:Array,default:()=>[]},isCanRowClick:{type:Boolean,default:!1},isPagePostion:{type:Boolean,default:!0},treeProps:{type:Object,default:()=>({children:"children",hasChildren:"hasChildren"})},defaultExpandAll:{type:Boolean,default:!0}},emits:["onPageChange","onMultiSelection","onSortChange","onCellDblclick","onRowClick"],setup(a,{expose:p,emit:k}){const c=a,{t:u}=B.useI18n(),h=e.ref(null),s=e.ref([]),f=e.computed(()=>typeof c.total=="string"?Number(c.total):c.total),r=e.computed(()=>c.showChangeSize?"total, sizes, prev, pager, next, jumper":"total, prev, pager, next, jumper"),w=e.computed(()=>f.value>10&&c.hasPage),d=k,E=()=>!0,S=o=>c.onRowKey(o,i=>i),_=o=>c.onRowClassName(o),N=o=>{d("onPageChange",{...c.pages,page:o})},v=o=>{d("onPageChange",{page:1,size:o})},T=o=>{c.selectionType!=="radio"&&d("onMultiSelection",o)},y=o=>{if(c.selectionType==="radio"){const i=s.value;if(C(),i.length==1){const[l]=i,t=l.id!==o.id;t?(s.value=[o],d("onMultiSelection",[o])):(s.value=[],d("onMultiSelection",[])),g(o,t)}else g(o,!0),s.value=[o],d("onMultiSelection",[o])}},C=()=>{h.value?.clearSelection(),d("onMultiSelection",[])},V=()=>{h.value?.clearSort()},$=o=>{d("onSortChange",o)},M=(o,i,l,t)=>{d("onCellDblclick",o,i,l,t)},D=o=>{c.selectionType==="radio"&&y(o)},P=(o,i,l)=>{i?.type==="action"||!c.isCanRowClick||d("onRowClick",o,i,l)},g=(o,i)=>{h.value?.toggleRowSelection(o,i)};return p({handleClearSelection:C,handleToggleRowSelection:g,clearSort:V}),(o,i)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass([{"row-click-style":a.isCanRowClick,"no-pagination":!w.value},"aibox-table"])},[a.hasHeaderHandle?(e.openBlock(),e.createElementBlock("div",L,[e.createElementVNode("div",H,[e.renderSlot(o.$slots,"handleLeft")]),e.createElementVNode("div",W,[e.renderSlot(o.$slots,"handleRight")])])):e.createCommentVNode("",!0),e.createElementVNode("div",I,[e.createVNode(e.unref(n.ElTable),{ref_key:"aiboxTable",ref:h,"element-loading-text":e.unref(u)("COMMON_DATA.LOADING_SUFFIX"),"tree-props":a.treeProps,"header-row-class-name":a.isSecondaryHeader?"aibox-table__header secondary-header":"aibox-table__header","row-class-name":_,data:a.data,border:a.hasBorder,style:{width:"100%"},"row-key":S,height:a.maxHeight,"default-sort":a.defaultSort,"span-method":a.spanMethod,"expand-row-keys":a.expandRowKeys,onSelectionChange:T,onSortChange:$,onCellDblclick:M,onCurrentChange:y,"show-summary":a.showSummary,"summary-method":a.summaryMethod,onSelect:D,onRowClick:P,"default-expand-all":a.defaultExpandAll},{empty:e.withCtx(()=>[a.isCustomEmpty?(e.openBlock(),e.createElementBlock("div",le,[e.renderSlot(o.$slots,"customEmpty")])):(e.openBlock(),e.createBlock(e.unref(n.ElEmpty),{key:1,description:e.unref(u)("COMMON_DATA.EMPTY"),"image-size":80},null,8,["description"]))]),default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.columns,l=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[l.type==="selection"?(e.openBlock(),e.createBlock(e.unref(n.ElTableColumn),{key:l.type,type:"selection",fixed:"left",width:l.width||"50px","reserve-selection":!0,selectable:l.selectable||E},null,8,["width","selectable"])):l.type==="index"?(e.openBlock(),e.createBlock(e.unref(n.ElTableColumn),{key:`${l.type-l.label}`,type:"index",label:e.unref(u)("COMMON_DATA.SNO_INDEX"),fixed:"left",width:l.width||"100px"},{default:e.withCtx(t=>[a.isLoading?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("span",q,e.toDisplayString((a.pages.page-1)*a.pages.size+t.$index+1),1))]),_:1},8,["label","width"])):l.slot?(e.openBlock(),e.createBlock(e.unref(n.ElTableColumn),{align:l.align||"left",key:l.prop,prop:l.prop,label:l.label,width:l.width,"min-width":l.minWidth,"label-class-name":"label-space-style","class-name":"multi-row",fixed:l.fixed,sortable:l.sortable,"show-overflow-tooltip":l.showOverflowTooltip},e.createSlots({default:e.withCtx(t=>[e.createElementVNode("div",K,[e.renderSlot(o.$slots,l.slot,{row:t.row,index:t.$index,minWidth:l.minWidth})])]),_:2},[l.headerSlot?{name:"header",fn:e.withCtx(()=>[e.createElementVNode("div",j,[e.renderSlot(o.$slots,l.headerSlot,{item:l,minWidth:l.minWidth})])]),key:"0"}:void 0]),1032,["align","prop","label","width","min-width","fixed","sortable","show-overflow-tooltip"])):l.callback?(e.openBlock(),e.createBlock(e.unref(n.ElTableColumn),{align:l.align||"left",key:l.callback,prop:l.prop,label:l.label,width:l.width,"min-width":l.minWidth,"show-overflow-tooltip":"",fixed:l.fixed,sortable:l.sortable},{default:e.withCtx(t=>[e.createElementVNode("span",{innerHTML:l.callback&&l.callback(t.row)},null,8,X)]),_:2},1032,["align","prop","label","width","min-width","fixed","sortable"])):l.type==="multistage"?(e.openBlock(),e.createBlock(e.unref(n.ElTableColumn),{key:`${l.prop}`,label:l.label,prop:l.prop,width:l.width,"min-width":l.minWidth,"show-overflow-tooltip":"",align:l.align||"left","header-align":l.headerAlign||"left"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.children,t=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[t.callback?(e.openBlock(),e.createBlock(e.unref(n.ElTableColumn),{key:t.callback,prop:t.prop,label:t.label,"min-width":t.minWidth,"show-overflow-tooltip":""},{default:e.withCtx(b=>[e.createElementVNode("span",{innerHTML:t.callback&&t.callback(b.row)},null,8,U)]),_:2},1032,["prop","label","min-width"])):t.slot?(e.openBlock(),e.createBlock(e.unref(n.ElTableColumn),{key:t.prop,"min-width":t.minWidth,prop:t.prop,label:t.label},{default:e.withCtx(b=>[e.createElementVNode("div",G,[e.renderSlot(o.$slots,t.slot,{row:b.row,column:b.column,index:b.$index})])]),_:2},1032,["min-width","prop","label"])):t.custom?(e.openBlock(),e.createBlock(e.unref(n.ElTableColumn),{key:`${t.prop}`,prop:t.prop,label:t.label,"min-width":t.minWidth,"show-overflow-tooltip":""},{header:e.withCtx(()=>[e.createElementVNode("span",{onClick:()=>t.headerClick({parent:l.label,...t}),style:{color:"#5b9bd1",cursor:"pointer"}},e.toDisplayString(t.label),9,Y)]),default:e.withCtx(b=>[e.createElementVNode("div",Z,[e.renderSlot(o.$slots,"custom",{data:{col:{parent:l.label,...t},row:b.row}})])]),_:2},1032,["prop","label","min-width"])):(e.openBlock(),e.createBlock(e.unref(n.ElTableColumn),{key:`${t.prop}-${t.label}`,prop:t.prop,label:t.label,width:t.width,"min-width":t.minWidth,"show-overflow-tooltip":"","header-align":t.headerAlign?t.headerAlign:"left",align:t.align?t.align:"left"},null,8,["prop","label","width","min-width","header-align","align"]))],64))),256))]),_:2},1032,["label","prop","width","min-width","align","header-align"])):l.custom?(e.openBlock(),e.createBlock(e.unref(n.ElTableColumn),{key:`${l.prop}-${l.custom}`,prop:l.prop,label:l.label,"min-width":l.minWidth,"show-overflow-tooltip":""},{header:e.withCtx(()=>[e.createElementVNode("span",{onClick:()=>l.headerClick({parent:"",...l}),style:{color:"#5b9bd1",cursor:"pointer"}},e.toDisplayString(l.label),9,J)]),default:e.withCtx(t=>[e.createElementVNode("div",Q,[e.renderSlot(o.$slots,"custom",{data:{col:{parent:"",...l},row:t.row}})])]),_:2},1032,["prop","label","min-width"])):l.type==="action"?(e.openBlock(),e.createBlock(e.unref(n.ElTableColumn),{key:`${l.prop-Math.random()}`,label:l.label,width:l.width,type:"action",fixed:"right"},{default:e.withCtx(t=>[l?.config?.(t.row)?.length?(e.openBlock(),e.createBlock(m,{key:0,"show-nums":a.showHandleNums,config:l.config(t.row,t.$index),row:t.row},null,8,["show-nums","config","row"])):e.createCommentVNode("",!0)]),_:2},1032,["label","width"])):l.type==="expand"?(e.openBlock(),e.createBlock(e.unref(n.ElTableColumn),{type:"expand",key:"expand"+l.prop,width:l.width},{default:e.withCtx(t=>[e.createElementVNode("div",ee,[e.renderSlot(o.$slots,"expand",{row:t.row,column:t.column})])]),_:3},8,["width"])):(e.openBlock(),e.createBlock(e.unref(n.ElTableColumn),{key:`${l.prop-l.label}`,prop:l.prop,label:l.label,width:l.width,"min-width":l.minWidth,fixed:l.fixed,sortable:l.sortable,"show-overflow-tooltip":"",align:l.align||"left"},e.createSlots({_:2},[l.headerSlot?{name:"header",fn:e.withCtx(()=>[e.renderSlot(o.$slots,l.headerSlot,{item:l,minWidth:l.minWidth})]),key:"0"}:void 0]),1032,["prop","label","width","min-width","fixed","sortable","align"]))],64))),256))]),_:3},8,["element-loading-text","tree-props","header-row-class-name","data","border","height","default-sort","span-method","expand-row-keys","show-summary","summary-method","default-expand-all"])]),f.value>10&&a.hasPage?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass([a.isPagePostion?"aibox-table__pages":"aibox-table__page"])},[e.createVNode(e.unref(n.ElPagination),{layout:r.value,"current-page":a.pages.page,"page-sizes":[10,20,50,100],"page-size":a.pages.size,total:f.value,onSizeChange:v,onCurrentChange:N},null,8,["layout","current-page","page-size","total"])],2)):e.createCommentVNode("",!0)],2))}},oe={class:"back-bar__icon"},ae={key:0,class:"back-bar__title"},ne={__name:"BackBar",props:{goBackFn:{type:Function,default:null},backBarStyle:{type:String,default:"#fff"},title:{type:String,default:""}},setup(a){const p=a,k=A.useRouter(),c=()=>{p.goBackFn?p.goBackFn():k.back()};return(u,h)=>(e.openBlock(),e.createElementBlock("div",{class:"back-bar",style:e.normalizeStyle({"background-color":a.backBarStyle})},[e.createElementVNode("div",oe,[e.createVNode(e.unref(n.ElIcon),{onClick:e.withModifiers(c,["stop"])},{default:e.withCtx(()=>[e.createVNode(e.unref(x.IconZuo))]),_:1})]),e.renderSlot(u.$slots,"default"),a.title?(e.openBlock(),e.createElementBlock("div",ae,e.toDisplayString(a.title),1)):e.createCommentVNode("",!0)],4))}};exports.TableBtns=m;exports._sfc_main=te;exports._sfc_main$1=ne;