magtool 1.5.37 → 1.5.39
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/dist/composition.js +81 -78
- package/dist/cpt/AiApp.js +117 -0
- package/dist/cpt/AiOrg.js +130 -0
- package/dist/cpt/AsaAdGroup.js +261 -0
- package/dist/cpt/AsaApp.js +126 -0
- package/dist/cpt/AsaCampaign.js +268 -0
- package/dist/cpt/AsaOrg.js +130 -0
- package/dist/cpt/Card.js +92 -0
- package/dist/cpt/Country.js +32 -0
- package/dist/cpt/CountryItem.js +56 -0
- package/dist/cpt/DatePicker.js +246 -0
- package/dist/cpt/EChart.js +271 -0
- package/dist/cpt/Form.js +75 -0
- package/dist/cpt/Header.js +786 -0
- package/dist/cpt/Icon.js +24 -0
- package/dist/cpt/Image.js +58 -0
- package/dist/cpt/Input.js +129 -0
- package/dist/cpt/Main.js +230 -0
- package/dist/cpt/MultipleSelect.js +143 -0
- package/dist/cpt/Nodata.js +39 -0
- package/dist/cpt/Org.js +99 -0
- package/dist/cpt/Page.js +74 -0
- package/dist/cpt/StatusItem.js +68 -0
- package/dist/cpt/StatusSelect.js +79 -0
- package/dist/cpt/Table.js +123 -0
- package/dist/cpt/Textarea.js +132 -0
- package/dist/cpt/Timezone.js +128 -0
- package/dist/cpt/chip.js +639 -0
- package/dist/cpt/component.js +21 -0
- package/dist/css/cpt/Card.css +1 -0
- package/dist/css/cpt/EChart.css +1 -0
- package/dist/css/cpt/Header.css +1 -0
- package/dist/css/cpt/Main.css +1 -0
- package/dist/css/cpt/MultipleSelect.css +1 -0
- package/dist/css/cpt/Nodata.css +1 -0
- package/dist/css/cpt/Page.css +1 -0
- package/dist/css/cpt/Table.css +1 -0
- package/dist/css/cpt/Textarea.css +1 -0
- package/dist/css/cpt/chip.css +1 -0
- package/dist/css/{magtool.css → css/scss.css} +1 -1
- package/dist/index.js +4 -8
- package/dist/util.js +5 -5
- package/dist/vendor.js +38 -31
- package/package.json +1 -1
- package/dist/component.js +0 -4427
package/dist/component.js
DELETED
|
@@ -1,4427 +0,0 @@
|
|
|
1
|
-
import { defineComponent as E, getCurrentInstance as ee, onMounted as ue, reactive as H, createElementBlock as M, openBlock as c, normalizeStyle as me, unref as l, createCommentVNode as L, createElementVNode as u, normalizeClass as K, renderSlot as W, toDisplayString as N, computed as g, watch as Z, resolveComponent as I, createVNode as z, inject as pe, onBeforeMount as Te, markRaw as Ve, onBeforeUnmount as ze, nextTick as ge, mergeProps as Q, withCtx as $, resolveDirective as Be, withDirectives as je, createBlock as Y, withKeys as Oe, createSlots as oe, watchPostEffect as Me, Fragment as re, renderList as ie, createTextVNode as ae, defineAsyncComponent as $e, ref as ve, withModifiers as he, resolveDynamicComponent as Le, watchEffect as Ye } from "vue";
|
|
2
|
-
import { _ as de } from "./vendor.js";
|
|
3
|
-
import { dayjs as Ee } from "element-plus";
|
|
4
|
-
import { loadImage as Re, pageScrollTo as be, useSummary as Fe, download as Pe } from "./composition.js";
|
|
5
|
-
import { useMap as fe } from "asamap";
|
|
6
|
-
import ke from "vuedraggable";
|
|
7
|
-
import { useRoute as Ue } from "vue-router";
|
|
8
|
-
const Ge = { class: "fw700" }, He = E({
|
|
9
|
-
name: "MvcCard"
|
|
10
|
-
}), Je = /* @__PURE__ */ Object.assign(He, {
|
|
11
|
-
props: {
|
|
12
|
-
title: {
|
|
13
|
-
type: String,
|
|
14
|
-
default: ""
|
|
15
|
-
},
|
|
16
|
-
noheader: {
|
|
17
|
-
type: Boolean,
|
|
18
|
-
default: !1
|
|
19
|
-
},
|
|
20
|
-
nobg: {
|
|
21
|
-
type: Boolean,
|
|
22
|
-
default: !1
|
|
23
|
-
},
|
|
24
|
-
headerClass: {
|
|
25
|
-
type: String,
|
|
26
|
-
default: ""
|
|
27
|
-
},
|
|
28
|
-
bodyClass: {
|
|
29
|
-
type: String,
|
|
30
|
-
default: ""
|
|
31
|
-
},
|
|
32
|
-
bodyStyle: {
|
|
33
|
-
type: String,
|
|
34
|
-
default: ""
|
|
35
|
-
},
|
|
36
|
-
footerClass: {
|
|
37
|
-
type: String,
|
|
38
|
-
default: ""
|
|
39
|
-
},
|
|
40
|
-
color: {
|
|
41
|
-
type: String,
|
|
42
|
-
default: "",
|
|
43
|
-
validate: (T) => ["primary", "green", "red", "purple", "orange", "blue"].indexOf(T) > -1
|
|
44
|
-
},
|
|
45
|
-
headerHide: {
|
|
46
|
-
type: Boolean,
|
|
47
|
-
default: !1
|
|
48
|
-
}
|
|
49
|
-
},
|
|
50
|
-
setup(T) {
|
|
51
|
-
const V = T, { proxy: s } = ee(), e = () => {
|
|
52
|
-
t.toggle = !t.toggle;
|
|
53
|
-
};
|
|
54
|
-
ue(() => {
|
|
55
|
-
t.toggle = V.headerHide;
|
|
56
|
-
});
|
|
57
|
-
const t = H({
|
|
58
|
-
toggle: !1
|
|
59
|
-
});
|
|
60
|
-
return (S, o) => (c(), M("div", {
|
|
61
|
-
class: "MvcCard",
|
|
62
|
-
style: me(l(t).cardStyle)
|
|
63
|
-
}, [
|
|
64
|
-
V.noheader ? L("", !0) : (c(), M("div", {
|
|
65
|
-
key: 0,
|
|
66
|
-
ref: "header",
|
|
67
|
-
class: K(["cardHeader flexMode vc fs18 txt-dark9", V.headerClass])
|
|
68
|
-
}, [
|
|
69
|
-
u("i", {
|
|
70
|
-
class: K(["mr4 block imicon im-arrow-right fw700 fs14 transition3 hover", !l(t).toggle && "rotateZ90"]),
|
|
71
|
-
onClick: e
|
|
72
|
-
}, null, 2),
|
|
73
|
-
u("div", Ge, N(S.$l(V.title)), 1),
|
|
74
|
-
W(S.$slots, "header", {}, void 0, !0)
|
|
75
|
-
], 2)),
|
|
76
|
-
u("div", {
|
|
77
|
-
class: K(["cardArea transition3", [V.nobg && "nobg", l(t).toggle && "miniArea"]])
|
|
78
|
-
}, [
|
|
79
|
-
u("div", {
|
|
80
|
-
class: K(["cardBody relative nobar", V.bodyClass]),
|
|
81
|
-
style: me(V.bodyStyle)
|
|
82
|
-
}, [
|
|
83
|
-
W(S.$slots, "default", {}, void 0, !0)
|
|
84
|
-
], 6),
|
|
85
|
-
S.$slots.footer ? (c(), M("div", {
|
|
86
|
-
key: 0,
|
|
87
|
-
class: K(["cardFooter", V.footerClass])
|
|
88
|
-
}, [
|
|
89
|
-
W(S.$slots, "footer", {}, void 0, !0)
|
|
90
|
-
], 2)) : L("", !0)
|
|
91
|
-
], 2)
|
|
92
|
-
], 4));
|
|
93
|
-
}
|
|
94
|
-
}), Ke = /* @__PURE__ */ de(Je, [["__scopeId", "data-v-348c485a"]]), We = { class: "SuperDatePicker" }, qe = E({
|
|
95
|
-
name: "SuperDatePicker"
|
|
96
|
-
}), Ze = /* @__PURE__ */ Object.assign(qe, {
|
|
97
|
-
props: {
|
|
98
|
-
source: {
|
|
99
|
-
type: String,
|
|
100
|
-
default: ""
|
|
101
|
-
},
|
|
102
|
-
modelValue: {
|
|
103
|
-
type: [String, Array],
|
|
104
|
-
default: () => []
|
|
105
|
-
},
|
|
106
|
-
withToday: {
|
|
107
|
-
type: Boolean,
|
|
108
|
-
default: !1
|
|
109
|
-
},
|
|
110
|
-
defaultDate: {
|
|
111
|
-
type: Array,
|
|
112
|
-
default: () => [-7, -1]
|
|
113
|
-
},
|
|
114
|
-
// 开始,结束的分割符号,也是v-model str时的分割符号
|
|
115
|
-
separator: {
|
|
116
|
-
type: String,
|
|
117
|
-
default: "~"
|
|
118
|
-
},
|
|
119
|
-
offset: {
|
|
120
|
-
type: [String, Number],
|
|
121
|
-
default: 0
|
|
122
|
-
},
|
|
123
|
-
range: {
|
|
124
|
-
type: [String, Number],
|
|
125
|
-
default: 180
|
|
126
|
-
},
|
|
127
|
-
limit: {
|
|
128
|
-
type: [String, Number],
|
|
129
|
-
default: 30
|
|
130
|
-
},
|
|
131
|
-
// today, yersterday, thisweek, last7days, thismonth, last30days, lastmonth
|
|
132
|
-
shortcuts: {
|
|
133
|
-
type: [Object, Boolean],
|
|
134
|
-
default: !1
|
|
135
|
-
},
|
|
136
|
-
placement: {
|
|
137
|
-
type: String,
|
|
138
|
-
default: "bottom"
|
|
139
|
-
},
|
|
140
|
-
disabled: {
|
|
141
|
-
type: Boolean,
|
|
142
|
-
default: !1
|
|
143
|
-
},
|
|
144
|
-
size: {
|
|
145
|
-
type: String,
|
|
146
|
-
default: "large"
|
|
147
|
-
}
|
|
148
|
-
},
|
|
149
|
-
emits: ["change", "update:modelValue"],
|
|
150
|
-
setup(T, { expose: V, emit: s }) {
|
|
151
|
-
Ee.en.weekStart = 7;
|
|
152
|
-
const e = T, t = H({
|
|
153
|
-
type: "",
|
|
154
|
-
date: [],
|
|
155
|
-
shortBtn: [],
|
|
156
|
-
firstStamp: 0
|
|
157
|
-
});
|
|
158
|
-
ue(() => {
|
|
159
|
-
if (!k.value.length) {
|
|
160
|
-
const a = e.defaultDate[0], d = e.defaultDate[1];
|
|
161
|
-
t.date = [
|
|
162
|
-
window.$m().add(a, "days").format("YYYY-MM-DD"),
|
|
163
|
-
window.$m().add(d, "days").format("YYYY-MM-DD")
|
|
164
|
-
], O(t.date);
|
|
165
|
-
}
|
|
166
|
-
D();
|
|
167
|
-
});
|
|
168
|
-
const S = s, o = (a) => {
|
|
169
|
-
let { limit: d, range: m } = e;
|
|
170
|
-
d = Number(d), m = Number(m);
|
|
171
|
-
const { firstStamp: R } = t, U = d * 864e5;
|
|
172
|
-
let ne = +window.$m().add(-m, "d"), q = +window.$m();
|
|
173
|
-
if (e.source === "report" && !R)
|
|
174
|
-
return a > q;
|
|
175
|
-
if (R) {
|
|
176
|
-
if (e.source !== "report") {
|
|
177
|
-
let F = R - U;
|
|
178
|
-
F > ne && (ne = F);
|
|
179
|
-
} else
|
|
180
|
-
ne = R - U;
|
|
181
|
-
let se = R + U;
|
|
182
|
-
se < q && (q = se);
|
|
183
|
-
}
|
|
184
|
-
return a < ne || a > q;
|
|
185
|
-
}, f = (a) => {
|
|
186
|
-
a[1] === null ? t.firstStamp = +a[0] : t.firstStamp = 0;
|
|
187
|
-
}, O = (a) => {
|
|
188
|
-
const d = y(a);
|
|
189
|
-
S("change", d, "cpt");
|
|
190
|
-
}, D = () => {
|
|
191
|
-
const { shortcuts: a } = e;
|
|
192
|
-
let d = {};
|
|
193
|
-
if (a === !1)
|
|
194
|
-
t.shortBtn = [];
|
|
195
|
-
else {
|
|
196
|
-
a === !0 ? d = A : d = {
|
|
197
|
-
...A,
|
|
198
|
-
...a
|
|
199
|
-
};
|
|
200
|
-
const m = [];
|
|
201
|
-
d.today && m.push(C()), d.yesterday && m.push(w()), d.thisweek && m.push(_()), d.last7days && m.push(r()), d.todaylast7days && m.push(p()), d.thismonth && m.push(i()), d.last30days && m.push(n()), d.lastmonth && m.push(b()), t.shortBtn = m;
|
|
202
|
-
}
|
|
203
|
-
}, C = () => ({
|
|
204
|
-
text: window.$l("Today"),
|
|
205
|
-
value: () => {
|
|
206
|
-
const a = window.$m().format("YYYY-MM-DD");
|
|
207
|
-
return [a, a];
|
|
208
|
-
},
|
|
209
|
-
onClick: (a) => {
|
|
210
|
-
}
|
|
211
|
-
}), w = () => ({
|
|
212
|
-
text: window.$l("Yesterday"),
|
|
213
|
-
value: () => {
|
|
214
|
-
const a = window.$m().add(-1, "days").format("YYYY-MM-DD");
|
|
215
|
-
return [a, a];
|
|
216
|
-
},
|
|
217
|
-
onClick: (a) => {
|
|
218
|
-
}
|
|
219
|
-
}), _ = () => ({
|
|
220
|
-
text: window.$l("This Week"),
|
|
221
|
-
value: () => {
|
|
222
|
-
let a = 0, d = window.$m().weekday(0), m = window.$m().add(a, "days");
|
|
223
|
-
return +d > +m && (d = d.format("YYYY-MM-DD"), m = d), [d, m];
|
|
224
|
-
},
|
|
225
|
-
onClick: (a) => {
|
|
226
|
-
}
|
|
227
|
-
}), r = () => ({
|
|
228
|
-
text: window.$l("Last 7 Days"),
|
|
229
|
-
value: () => {
|
|
230
|
-
let a = -7, d = -1;
|
|
231
|
-
return e.widthToday && (a += 1, d += 1), [
|
|
232
|
-
window.$m().add(a, "days").format("YYYY-MM-DD"),
|
|
233
|
-
window.$m().add(d, "days").format("YYYY-MM-DD")
|
|
234
|
-
];
|
|
235
|
-
},
|
|
236
|
-
onClick: (a) => {
|
|
237
|
-
}
|
|
238
|
-
}), p = () => ({
|
|
239
|
-
text: window.$l("Last 7 Days (with Today)"),
|
|
240
|
-
value: () => [
|
|
241
|
-
window.$m().add(-6, "days").format("YYYY-MM-DD"),
|
|
242
|
-
window.$m().add(0, "days").format("YYYY-MM-DD")
|
|
243
|
-
],
|
|
244
|
-
onClick: (a) => {
|
|
245
|
-
}
|
|
246
|
-
}), i = () => ({
|
|
247
|
-
text: window.$l("This Month"),
|
|
248
|
-
value: () => {
|
|
249
|
-
let a = 0, d = window.$m().date(1), m = window.$m().add(a, "days");
|
|
250
|
-
return +d > +m && (d = d.format("YYYY-MM-DD"), m = d), [d, m];
|
|
251
|
-
},
|
|
252
|
-
onClick: (a) => {
|
|
253
|
-
}
|
|
254
|
-
}), n = () => ({
|
|
255
|
-
text: window.$l("Last 30 Days"),
|
|
256
|
-
value: () => {
|
|
257
|
-
let a = -30, d = -1;
|
|
258
|
-
return e.widthToday && (a += 1, d += 1), [
|
|
259
|
-
window.$m().add(a, "days").format("YYYY-MM-DD"),
|
|
260
|
-
window.$m().add(d, "days").format("YYYY-MM-DD")
|
|
261
|
-
];
|
|
262
|
-
},
|
|
263
|
-
onClick: (a) => {
|
|
264
|
-
}
|
|
265
|
-
}), b = () => ({
|
|
266
|
-
text: window.$l("Last Month"),
|
|
267
|
-
value: () => [
|
|
268
|
-
window.$m().date(1).add(-1, "days").date(1).format("YYYY-MM-DD"),
|
|
269
|
-
window.$m().date(1).add(-1, "days").format("YYYY-MM-DD")
|
|
270
|
-
],
|
|
271
|
-
onClick: (a) => {
|
|
272
|
-
}
|
|
273
|
-
}), y = (a, d = !1) => {
|
|
274
|
-
d && (t.date = a);
|
|
275
|
-
let m;
|
|
276
|
-
return x.value === "Array" ? m = a : x.value === "Object" ? m = {
|
|
277
|
-
startDate: a[0],
|
|
278
|
-
endDate: a[1]
|
|
279
|
-
} : m = a[0] + e.separator + a[1], S("update:modelValue", m), m;
|
|
280
|
-
}, h = g(() => window.$getLang()), x = g(() => window.$getType(e.modelValue)), k = g(() => x.value === "Array" ? e.modelValue : x.value === "Object" ? [e.modelValue.startDate, e.modelValue.endDate] : e.modelValue ? e.modelValue.split(e.separator) : []), B = g(() => ({
|
|
281
|
-
start: window.$l("Start Date"),
|
|
282
|
-
end: window.$l("End Date")
|
|
283
|
-
}));
|
|
284
|
-
g(() => {
|
|
285
|
-
let { disabledDate: a, offset: d } = e, m = 0;
|
|
286
|
-
d = Number(d) || 0;
|
|
287
|
-
const R = window.$getType(a);
|
|
288
|
-
return R !== "Function" && R !== "Array" && (m = parseInt(a) || 0, m > -1 && (m = -1), m > d && (m = d)), m;
|
|
289
|
-
});
|
|
290
|
-
const A = {
|
|
291
|
-
today: !0,
|
|
292
|
-
yesterday: !0,
|
|
293
|
-
thisweek: !1,
|
|
294
|
-
last7days: !0,
|
|
295
|
-
todaylast7days: !1,
|
|
296
|
-
thismonth: !0,
|
|
297
|
-
last30days: !0,
|
|
298
|
-
lastmonth: !0
|
|
299
|
-
};
|
|
300
|
-
return Z(
|
|
301
|
-
() => k.value,
|
|
302
|
-
(a, d) => {
|
|
303
|
-
a.length && JSON.stringify(a) !== JSON.stringify(t.date) && (t.date = a, O(a));
|
|
304
|
-
}
|
|
305
|
-
), V({
|
|
306
|
-
setDate: y
|
|
307
|
-
}), (a, d) => {
|
|
308
|
-
const m = I("el-date-picker");
|
|
309
|
-
return c(), M("div", We, [
|
|
310
|
-
z(m, {
|
|
311
|
-
modelValue: l(t).date,
|
|
312
|
-
"onUpdate:modelValue": d[0] || (d[0] = (R) => l(t).date = R),
|
|
313
|
-
class: "wp100",
|
|
314
|
-
"popper-class": l(h),
|
|
315
|
-
type: "daterange",
|
|
316
|
-
"value-format": "YYYY-MM-DD",
|
|
317
|
-
editable: !1,
|
|
318
|
-
size: e.size,
|
|
319
|
-
clearable: !1,
|
|
320
|
-
"range-separator": e.separator,
|
|
321
|
-
shortcuts: l(t).shortBtn,
|
|
322
|
-
"end-placeholder": a.$l(l(B).end),
|
|
323
|
-
"start-placeholder": a.$l(l(B).start),
|
|
324
|
-
"disabled-date": o,
|
|
325
|
-
placement: e.placement,
|
|
326
|
-
disabled: e.disabled,
|
|
327
|
-
source: e.source,
|
|
328
|
-
onChange: O,
|
|
329
|
-
onCalendarChange: f
|
|
330
|
-
}, null, 8, ["modelValue", "popper-class", "size", "range-separator", "shortcuts", "end-placeholder", "start-placeholder", "placement", "disabled", "source"])
|
|
331
|
-
]);
|
|
332
|
-
};
|
|
333
|
-
}
|
|
334
|
-
}), Qe = { class: "EChart" }, Xe = ["id"], et = E({
|
|
335
|
-
name: "EChart"
|
|
336
|
-
}), tt = /* @__PURE__ */ Object.assign(et, {
|
|
337
|
-
props: {
|
|
338
|
-
options: {
|
|
339
|
-
type: Object,
|
|
340
|
-
default: () => {
|
|
341
|
-
}
|
|
342
|
-
},
|
|
343
|
-
type: {
|
|
344
|
-
type: String,
|
|
345
|
-
default: ""
|
|
346
|
-
},
|
|
347
|
-
height: {
|
|
348
|
-
type: [String, Number],
|
|
349
|
-
default: "300"
|
|
350
|
-
},
|
|
351
|
-
width: {
|
|
352
|
-
type: [String, Number],
|
|
353
|
-
default: ""
|
|
354
|
-
},
|
|
355
|
-
minusWidth: {
|
|
356
|
-
type: String,
|
|
357
|
-
default: ""
|
|
358
|
-
},
|
|
359
|
-
theme: {
|
|
360
|
-
type: String,
|
|
361
|
-
default: "light"
|
|
362
|
-
}
|
|
363
|
-
// tool: {
|
|
364
|
-
// type: Boolean,
|
|
365
|
-
// default: false,
|
|
366
|
-
// },
|
|
367
|
-
},
|
|
368
|
-
setup(T, { expose: V, emit: s }) {
|
|
369
|
-
const e = T, { proxy: t } = ee();
|
|
370
|
-
pe("store").launch();
|
|
371
|
-
const o = H({
|
|
372
|
-
chart: {},
|
|
373
|
-
chartID: "",
|
|
374
|
-
defaultOptions: {
|
|
375
|
-
grid: {
|
|
376
|
-
top: 20,
|
|
377
|
-
left: 50,
|
|
378
|
-
right: 20,
|
|
379
|
-
bottom: 72
|
|
380
|
-
},
|
|
381
|
-
legend: {
|
|
382
|
-
id: "bar",
|
|
383
|
-
itemWidth: 18,
|
|
384
|
-
bottom: 14,
|
|
385
|
-
textStyle: {
|
|
386
|
-
color: "#4d4d4d"
|
|
387
|
-
}
|
|
388
|
-
},
|
|
389
|
-
color: window.global.config.color,
|
|
390
|
-
xAxis: {
|
|
391
|
-
animationEasing: "cubicInOut",
|
|
392
|
-
animationDuration: 300,
|
|
393
|
-
axisLine: {
|
|
394
|
-
show: !1
|
|
395
|
-
},
|
|
396
|
-
axisTick: {
|
|
397
|
-
show: !1
|
|
398
|
-
}
|
|
399
|
-
},
|
|
400
|
-
yAxis: {
|
|
401
|
-
animationEasing: "cubicInOut",
|
|
402
|
-
animationDuration: 300,
|
|
403
|
-
splitLine: {
|
|
404
|
-
lineStyle: {
|
|
405
|
-
type: "dotted"
|
|
406
|
-
}
|
|
407
|
-
}
|
|
408
|
-
},
|
|
409
|
-
tooltip: {
|
|
410
|
-
show: !0,
|
|
411
|
-
trigger: "axis",
|
|
412
|
-
padding: [8, 16],
|
|
413
|
-
borderWidth: 0
|
|
414
|
-
}
|
|
415
|
-
},
|
|
416
|
-
mounted: !1,
|
|
417
|
-
options: {},
|
|
418
|
-
chartType: ""
|
|
419
|
-
});
|
|
420
|
-
Te(() => {
|
|
421
|
-
o.chartID = `chart${+/* @__PURE__ */ new Date()}${parseInt(Math.random() * 1e4)}`;
|
|
422
|
-
}), ue(() => {
|
|
423
|
-
var n;
|
|
424
|
-
o.mounted = !0, t.$refs.chart && (o.chart = Ve(
|
|
425
|
-
(n = window.$ecs) == null ? void 0 : n.init(t.$refs.chart, { renderer: "svg" })
|
|
426
|
-
));
|
|
427
|
-
});
|
|
428
|
-
const f = s, O = async () => {
|
|
429
|
-
D();
|
|
430
|
-
}, D = () => {
|
|
431
|
-
ge(() => {
|
|
432
|
-
var y;
|
|
433
|
-
o.optioning = !0, o.chart.clear();
|
|
434
|
-
let n = window.$deepClone(e.options);
|
|
435
|
-
["pie", "radar", "scatter"].indexOf(e.type) > -1 ? (n = {
|
|
436
|
-
color: o.defaultOptions.color,
|
|
437
|
-
animationEasing: "cubicInOut",
|
|
438
|
-
animationDuration: 500,
|
|
439
|
-
textStyle: _.value,
|
|
440
|
-
...n
|
|
441
|
-
}, n.tooltip ? (n.tooltip = e.options.tooltip, n.tooltip = {
|
|
442
|
-
...n.tooltip,
|
|
443
|
-
...i[e.theme]
|
|
444
|
-
}) : n.tooltip = {
|
|
445
|
-
...i[e.theme]
|
|
446
|
-
}) : e.type === "map" ? n.textStyle = _.value : (e.tool === !0 && (o.defaultOptions.toolbox = {
|
|
447
|
-
show: !0,
|
|
448
|
-
right: 24,
|
|
449
|
-
emphasis: {
|
|
450
|
-
iconStyle: {
|
|
451
|
-
color: window.global.config.color[0]
|
|
452
|
-
}
|
|
453
|
-
}
|
|
454
|
-
}), o.defaultOptions.tooltip = {
|
|
455
|
-
...o.defaultOptions.tooltip,
|
|
456
|
-
...i[e.theme]
|
|
457
|
-
}, n = C(o.defaultOptions, n)), (y = n.series) == null || y.forEach((h) => {
|
|
458
|
-
h.animation = !0, h.animationDuration = 300, h.type === "line" ? (h.animationEasing = "cubicInOut", h.animationDelay = (x) => x * 100) : (h.animationEasing = "cubicInOut", h.animationDelay = (x) => x * 100);
|
|
459
|
-
}), o.chart.setOption(n), e.type === "wordcloud" && o.chart.on("click", (...h) => {
|
|
460
|
-
f("chart-click", h);
|
|
461
|
-
}), o.optioning = !1;
|
|
462
|
-
});
|
|
463
|
-
}, C = (n, b) => {
|
|
464
|
-
var A;
|
|
465
|
-
const { yAxis: y } = b, { yAxis: h } = n;
|
|
466
|
-
let x;
|
|
467
|
-
e.options.yAxis && (((A = window.$getType) == null ? void 0 : A.call(window, y)) === "Array" ? x = y.map((a) => ({
|
|
468
|
-
...h,
|
|
469
|
-
...a
|
|
470
|
-
})) : x = {
|
|
471
|
-
...h,
|
|
472
|
-
...y
|
|
473
|
-
});
|
|
474
|
-
const k = { ...b, ...n };
|
|
475
|
-
return Object.keys(k).forEach((a) => {
|
|
476
|
-
var m;
|
|
477
|
-
const d = (m = window.$getType) == null ? void 0 : m.call(window, k[a]);
|
|
478
|
-
if (d === "Array") {
|
|
479
|
-
const R = n[a] || [], U = b[a] || [];
|
|
480
|
-
k[a] = R.length && !U.length ? R : U;
|
|
481
|
-
} else if (d === "Object") {
|
|
482
|
-
const R = n[a] || {}, U = b[a] || {};
|
|
483
|
-
k[a] = { ...R, ...U };
|
|
484
|
-
}
|
|
485
|
-
}), x && (k.yAxis = x), k.textStyle = _.value, k;
|
|
486
|
-
}, w = () => o.chart, _ = g(() => ({
|
|
487
|
-
fontFamily: window.$getLang().includes("zh") ? "Alibaba PuHuiTi" : "euclid"
|
|
488
|
-
})), r = g(() => {
|
|
489
|
-
var n, b, y;
|
|
490
|
-
return ((y = (b = (n = window.global) == null ? void 0 : n.config) == null ? void 0 : b.options) == null ? void 0 : y.cardWidth) || 800;
|
|
491
|
-
}), p = g(() => {
|
|
492
|
-
var h;
|
|
493
|
-
const n = (h = window.$getType) == null ? void 0 : h.call(window, e.width), b = Number(e.height);
|
|
494
|
-
let y = e.width;
|
|
495
|
-
return y ? n === "String" && (y.indexOf("%") > -1 ? y = parseInt(parseInt(y) * r.value / 100) : y = Number(y)) : y = r.value, {
|
|
496
|
-
height: b + "px",
|
|
497
|
-
width: y + "px"
|
|
498
|
-
};
|
|
499
|
-
});
|
|
500
|
-
Z(
|
|
501
|
-
() => [o.mounted, e.options],
|
|
502
|
-
(n) => {
|
|
503
|
-
var b;
|
|
504
|
-
n[0] && ((b = n[1]) != null && b.series) && D();
|
|
505
|
-
},
|
|
506
|
-
{
|
|
507
|
-
immediate: !0,
|
|
508
|
-
deep: !0
|
|
509
|
-
}
|
|
510
|
-
), Z(
|
|
511
|
-
() => e.width,
|
|
512
|
-
(n) => {
|
|
513
|
-
n && o.chart && !o.optioning && o.chart.resize({
|
|
514
|
-
width: n,
|
|
515
|
-
height: e.height
|
|
516
|
-
});
|
|
517
|
-
}
|
|
518
|
-
), V({
|
|
519
|
-
getChart: w,
|
|
520
|
-
initChart: O
|
|
521
|
-
});
|
|
522
|
-
const i = {
|
|
523
|
-
dark: {
|
|
524
|
-
className: `echart-tooltip ${o.chartID}`,
|
|
525
|
-
extraCssText: "backdrop-filter: blur(8px)",
|
|
526
|
-
animation: !1,
|
|
527
|
-
appendToBody: !0,
|
|
528
|
-
hideDelay: 0,
|
|
529
|
-
transitionDuration: 0,
|
|
530
|
-
backgroundColor: "rgba(50, 50, 50, 0.9)",
|
|
531
|
-
textStyle: {
|
|
532
|
-
color: "rgba(255, 255, 255, 0.9)",
|
|
533
|
-
fontSize: 14
|
|
534
|
-
},
|
|
535
|
-
axisPointer: {
|
|
536
|
-
type: "shadow",
|
|
537
|
-
label: {
|
|
538
|
-
padding: [4, 8],
|
|
539
|
-
color: "rgba(46, 38, 61, 0.5)",
|
|
540
|
-
backgroundColor: "rgba(240, 240, 240, 0.9)"
|
|
541
|
-
},
|
|
542
|
-
lineStyle: {
|
|
543
|
-
color: "rgba(46, 38, 61, 0.2)"
|
|
544
|
-
},
|
|
545
|
-
crossStyle: {
|
|
546
|
-
color: "rgba(46, 38, 61, 0.2)"
|
|
547
|
-
}
|
|
548
|
-
}
|
|
549
|
-
},
|
|
550
|
-
light: {
|
|
551
|
-
className: `echart-tooltip ${o.chartID}`,
|
|
552
|
-
extraCssText: "backdrop-filter: blur(8px)",
|
|
553
|
-
backgroundColor: "rgba(255, 255, 255, 0.9)",
|
|
554
|
-
animation: !1,
|
|
555
|
-
appendToBody: !0,
|
|
556
|
-
hideDelay: 0,
|
|
557
|
-
transitionDuration: 0,
|
|
558
|
-
textStyle: {
|
|
559
|
-
color: "rgba(46, 38, 61, 0.9)",
|
|
560
|
-
fontSize: 14
|
|
561
|
-
},
|
|
562
|
-
axisPointer: {
|
|
563
|
-
type: "shadow",
|
|
564
|
-
label: {
|
|
565
|
-
padding: [4, 8],
|
|
566
|
-
color: "rgba(46, 38, 61, 0.5)",
|
|
567
|
-
backgroundColor: "rgba(240, 240, 240, 0.9)"
|
|
568
|
-
},
|
|
569
|
-
lineStyle: {
|
|
570
|
-
color: "rgba(46, 38, 61, 0.2)"
|
|
571
|
-
},
|
|
572
|
-
crossStyle: {
|
|
573
|
-
color: "rgba(46, 38, 61, 0.2)"
|
|
574
|
-
}
|
|
575
|
-
}
|
|
576
|
-
// position: (pos, params, dom, rect, size) => {
|
|
577
|
-
// // 鼠标在左侧时 tooltip 显示到右侧,鼠标在右侧时 tooltip 显示到左侧。
|
|
578
|
-
// let left = pos[0] + 24;
|
|
579
|
-
// if (size.viewSize[0] < size.contentSize[0]) {
|
|
580
|
-
// left = size.contentSize[0];
|
|
581
|
-
// } else if (pos[0] > size.viewSize[0] - size.contentSize[0]) {
|
|
582
|
-
// left = pos[0] - size.contentSize[0];
|
|
583
|
-
// }
|
|
584
|
-
// // obj[['left', 'right'][+(pos[0] < size.viewSize[0] / 2)]] = 5;
|
|
585
|
-
// return [left, pos[1] + 24];
|
|
586
|
-
// },
|
|
587
|
-
}
|
|
588
|
-
};
|
|
589
|
-
return ze(() => {
|
|
590
|
-
o.chart && (o.chart.dispose(), o.chart = null);
|
|
591
|
-
}), (n, b) => (c(), M("div", Qe, [
|
|
592
|
-
u("div", {
|
|
593
|
-
ref: "chart",
|
|
594
|
-
style: me(l(p)),
|
|
595
|
-
id: l(o).chartID
|
|
596
|
-
}, null, 12, Xe)
|
|
597
|
-
]));
|
|
598
|
-
}
|
|
599
|
-
}), lt = /* @__PURE__ */ de(tt, [["__scopeId", "data-v-ae6ec0ec"]]), ot = {
|
|
600
|
-
class: "MvcIcon",
|
|
601
|
-
"aria-hidden": "true"
|
|
602
|
-
}, at = ["xlink:href"], nt = E({
|
|
603
|
-
name: "MvcIcon"
|
|
604
|
-
}), st = /* @__PURE__ */ Object.assign(nt, {
|
|
605
|
-
props: {
|
|
606
|
-
name: {
|
|
607
|
-
type: String,
|
|
608
|
-
default: "cloud"
|
|
609
|
-
}
|
|
610
|
-
},
|
|
611
|
-
setup(T) {
|
|
612
|
-
return (V, s) => (c(), M("svg", ot, [
|
|
613
|
-
u("use", {
|
|
614
|
-
"xlink:href": `#imc-${T.name}`
|
|
615
|
-
}, null, 8, at)
|
|
616
|
-
]));
|
|
617
|
-
}
|
|
618
|
-
}), rt = { class: "SuperImage" }, it = { class: "flexMode hc vc hp100 bg-gray1 radius4" }, dt = { class: "fs10-i lh1" }, ut = E({
|
|
619
|
-
name: "SuperImage"
|
|
620
|
-
}), ct = /* @__PURE__ */ Object.assign(ut, {
|
|
621
|
-
props: {
|
|
622
|
-
imageClass: {
|
|
623
|
-
type: String,
|
|
624
|
-
default: ""
|
|
625
|
-
},
|
|
626
|
-
type: {
|
|
627
|
-
type: String,
|
|
628
|
-
default: "icon"
|
|
629
|
-
}
|
|
630
|
-
},
|
|
631
|
-
setup(T, { emit: V }) {
|
|
632
|
-
const s = T, e = H({
|
|
633
|
-
style: {},
|
|
634
|
-
diyClass: "hp100"
|
|
635
|
-
}), { proxy: t } = ee();
|
|
636
|
-
ue(() => {
|
|
637
|
-
o();
|
|
638
|
-
});
|
|
639
|
-
const S = V, o = async () => {
|
|
640
|
-
const f = await Re(t.$attrs.src);
|
|
641
|
-
if (!f)
|
|
642
|
-
return;
|
|
643
|
-
const { height: O, width: D } = f;
|
|
644
|
-
O < D && (e.diyClass = ""), S("load", D, O);
|
|
645
|
-
};
|
|
646
|
-
return (f, O) => {
|
|
647
|
-
const D = I("el-image");
|
|
648
|
-
return c(), M("div", rt, [
|
|
649
|
-
z(D, Q({
|
|
650
|
-
"min-scale": 0.9,
|
|
651
|
-
"max-scale": 1.8,
|
|
652
|
-
"zoom-rate": 1.1
|
|
653
|
-
}, f.$attrs, {
|
|
654
|
-
class: [l(e).diyClass, s.imageClass],
|
|
655
|
-
style: l(e).style
|
|
656
|
-
}), {
|
|
657
|
-
placeholder: $(() => [...O[0] || (O[0] = [
|
|
658
|
-
u("i", { class: "imicon im-loading ani-rotate" }, null, -1)
|
|
659
|
-
])]),
|
|
660
|
-
error: $(() => [
|
|
661
|
-
u("div", it, [
|
|
662
|
-
u("span", dt, N(f.$l("Fail")), 1)
|
|
663
|
-
])
|
|
664
|
-
]),
|
|
665
|
-
_: 1
|
|
666
|
-
}, 16, ["class", "style"])
|
|
667
|
-
]);
|
|
668
|
-
};
|
|
669
|
-
}
|
|
670
|
-
}), pt = { class: "SuperInput" }, mt = E({
|
|
671
|
-
name: "SuperInput"
|
|
672
|
-
}), ft = /* @__PURE__ */ Object.assign(mt, {
|
|
673
|
-
props: {
|
|
674
|
-
modelValue: {
|
|
675
|
-
type: String,
|
|
676
|
-
default: ""
|
|
677
|
-
},
|
|
678
|
-
placeholder: {
|
|
679
|
-
type: String,
|
|
680
|
-
default: ""
|
|
681
|
-
},
|
|
682
|
-
icon: {
|
|
683
|
-
type: String,
|
|
684
|
-
default: ""
|
|
685
|
-
},
|
|
686
|
-
nobreak: {
|
|
687
|
-
type: Boolean,
|
|
688
|
-
default: !1
|
|
689
|
-
},
|
|
690
|
-
focus: {
|
|
691
|
-
type: Boolean,
|
|
692
|
-
default: !1
|
|
693
|
-
},
|
|
694
|
-
center: {
|
|
695
|
-
type: Boolean,
|
|
696
|
-
default: !1
|
|
697
|
-
}
|
|
698
|
-
},
|
|
699
|
-
emits: ["change", "enter", "update:modelValue"],
|
|
700
|
-
setup(T, { expose: V, emit: s }) {
|
|
701
|
-
const e = T, t = H({
|
|
702
|
-
composition: !1,
|
|
703
|
-
v: ""
|
|
704
|
-
}), { proxy: S } = ee(), o = s, f = () => {
|
|
705
|
-
t.composition = !0;
|
|
706
|
-
}, O = () => {
|
|
707
|
-
t.composition = !1;
|
|
708
|
-
}, D = () => {
|
|
709
|
-
t.composition || (o("update:modelValue", t.v), ge(() => {
|
|
710
|
-
o("enter", t.v);
|
|
711
|
-
}));
|
|
712
|
-
}, C = () => {
|
|
713
|
-
if (e.nobreak) {
|
|
714
|
-
const i = window.event || arguments[0];
|
|
715
|
-
if (i.key === "Enter" || i.code === "Enter" || i.keyCode === 13)
|
|
716
|
-
return i.returnValue = !1, !1;
|
|
717
|
-
}
|
|
718
|
-
}, w = (i) => {
|
|
719
|
-
e.nobreak ? o("update:modelValue", i.replace(/\n/g, "")) : o("update:modelValue", i), o("change", i);
|
|
720
|
-
}, _ = (i) => {
|
|
721
|
-
ge(() => {
|
|
722
|
-
S.$refs.input.focus(), i && S.$refs.input.select();
|
|
723
|
-
});
|
|
724
|
-
}, r = g(() => S.$slots), p = g(() => e.placeholder ? window.$l(e.placeholder) : " ");
|
|
725
|
-
return Z(
|
|
726
|
-
() => e.modelValue,
|
|
727
|
-
(i) => {
|
|
728
|
-
i !== void 0 && i !== t.v && (t.v = i);
|
|
729
|
-
},
|
|
730
|
-
{
|
|
731
|
-
immediate: !0
|
|
732
|
-
}
|
|
733
|
-
), V({
|
|
734
|
-
focus: _
|
|
735
|
-
}), (i, n) => {
|
|
736
|
-
const b = I("el-input"), y = Be("focus");
|
|
737
|
-
return c(), M("div", pt, [
|
|
738
|
-
je((c(), Y(b, Q({
|
|
739
|
-
ref: "input",
|
|
740
|
-
modelValue: l(t).v,
|
|
741
|
-
"onUpdate:modelValue": n[0] || (n[0] = (h) => l(t).v = h),
|
|
742
|
-
type: e.nobreak ? "textarea" : "text",
|
|
743
|
-
resize: "none",
|
|
744
|
-
clearable: "",
|
|
745
|
-
"input-style": e.center ? "text-align: center" : ""
|
|
746
|
-
}, i.$attrs, {
|
|
747
|
-
placeholder: l(p),
|
|
748
|
-
onChange: w,
|
|
749
|
-
onCompositionstart: f,
|
|
750
|
-
onCompositionend: O,
|
|
751
|
-
onKeydown: [
|
|
752
|
-
Oe(D, ["enter"]),
|
|
753
|
-
Oe(C, ["enter", "native"])
|
|
754
|
-
],
|
|
755
|
-
class: "wp100"
|
|
756
|
-
}), oe({ _: 2 }, [
|
|
757
|
-
l(r).prefix || e.icon ? {
|
|
758
|
-
name: "prefix",
|
|
759
|
-
fn: $(() => [
|
|
760
|
-
l(r).prefix ? W(i.$slots, "prefix", { key: 0 }) : (c(), M("i", {
|
|
761
|
-
key: 1,
|
|
762
|
-
class: K(["imicon", `im-${e.icon}`])
|
|
763
|
-
}, null, 2))
|
|
764
|
-
]),
|
|
765
|
-
key: "0"
|
|
766
|
-
} : void 0,
|
|
767
|
-
l(r).append ? {
|
|
768
|
-
name: "append",
|
|
769
|
-
fn: $(() => [
|
|
770
|
-
W(i.$slots, "append")
|
|
771
|
-
]),
|
|
772
|
-
key: "1"
|
|
773
|
-
} : void 0,
|
|
774
|
-
l(r).prepend ? {
|
|
775
|
-
name: "prepend",
|
|
776
|
-
fn: $(() => [
|
|
777
|
-
W(i.$slots, "prepend")
|
|
778
|
-
]),
|
|
779
|
-
key: "2"
|
|
780
|
-
} : void 0,
|
|
781
|
-
l(r).suffix ? {
|
|
782
|
-
name: "suffix",
|
|
783
|
-
fn: $(() => [
|
|
784
|
-
W(i.$slots, "suffix")
|
|
785
|
-
]),
|
|
786
|
-
key: "3"
|
|
787
|
-
} : void 0
|
|
788
|
-
]), 1040, ["modelValue", "type", "input-style", "placeholder"])), [
|
|
789
|
-
[y, e.focus ? 300 : null, "time"]
|
|
790
|
-
])
|
|
791
|
-
]);
|
|
792
|
-
};
|
|
793
|
-
}
|
|
794
|
-
}), gt = { class: "SuperMultipleSelect relative" }, yt = {
|
|
795
|
-
key: 0,
|
|
796
|
-
class: "flexMode vc hb h40 outsideIgnore"
|
|
797
|
-
}, ht = {
|
|
798
|
-
key: 1,
|
|
799
|
-
class: "flexMode vc hb h40 outsideIgnore"
|
|
800
|
-
}, _t = { class: "flexMode vc g4 fs14 noevent" }, bt = { class: "txt-primary" }, vt = { class: "txt-dark5" }, $t = { class: "txt-primary" }, wt = { class: "txt-dark5" }, St = E({
|
|
801
|
-
name: "SuperMultipleSelect"
|
|
802
|
-
}), Ct = /* @__PURE__ */ Object.assign(St, {
|
|
803
|
-
props: {
|
|
804
|
-
modelValue: {
|
|
805
|
-
type: Array,
|
|
806
|
-
default: () => []
|
|
807
|
-
},
|
|
808
|
-
options: {
|
|
809
|
-
type: Array,
|
|
810
|
-
default: () => []
|
|
811
|
-
},
|
|
812
|
-
label: {
|
|
813
|
-
type: String,
|
|
814
|
-
default: "label"
|
|
815
|
-
},
|
|
816
|
-
value: {
|
|
817
|
-
type: String,
|
|
818
|
-
default: "value"
|
|
819
|
-
}
|
|
820
|
-
},
|
|
821
|
-
emits: ["update:modelValue", "change"],
|
|
822
|
-
setup(T, { expose: V, emit: s }) {
|
|
823
|
-
const e = T, t = H({ v: [] }), { proxy: S } = ee(), o = s, f = () => {
|
|
824
|
-
o("update:modelValue", t.v), o("change", t.v);
|
|
825
|
-
}, O = () => {
|
|
826
|
-
t.v = e.options.map((p) => p[e.value]), f();
|
|
827
|
-
}, D = () => {
|
|
828
|
-
t.v = [], f();
|
|
829
|
-
}, C = () => {
|
|
830
|
-
S.$refs.select.blur();
|
|
831
|
-
}, w = g(() => e.options.length <= t.v.length && e.options.length !== 0), _ = g(() => S.$attrs["multiple-limit"]), r = g(() => S.$attrs["collapse-tags"] !== void 0);
|
|
832
|
-
return Me(() => {
|
|
833
|
-
JSON.stringify(e.modelValue) !== JSON.stringify(t.v) && (t.v = e.modelValue);
|
|
834
|
-
}), V({
|
|
835
|
-
blur: C
|
|
836
|
-
}), (p, i) => {
|
|
837
|
-
const n = I("el-button"), b = I("el-option"), y = I("el-select");
|
|
838
|
-
return c(), M("div", gt, [
|
|
839
|
-
z(y, Q({
|
|
840
|
-
ref: "select",
|
|
841
|
-
modelValue: l(t).v,
|
|
842
|
-
"onUpdate:modelValue": i[0] || (i[0] = (h) => l(t).v = h),
|
|
843
|
-
clearable: "",
|
|
844
|
-
placeholder: " ",
|
|
845
|
-
placement: "top"
|
|
846
|
-
}, p.$attrs, {
|
|
847
|
-
multiple: "",
|
|
848
|
-
onChange: f,
|
|
849
|
-
class: ["wp100 MultipleSelect", l(r) && "nowrap"]
|
|
850
|
-
}), oe({
|
|
851
|
-
default: $(() => [
|
|
852
|
-
(c(!0), M(re, null, ie(e.options, (h, x) => (c(), Y(b, {
|
|
853
|
-
key: x,
|
|
854
|
-
label: p.$l(h[e.label]),
|
|
855
|
-
value: h[e.value],
|
|
856
|
-
disabled: h.disabled,
|
|
857
|
-
class: K(h.hide && "hide-i")
|
|
858
|
-
}, {
|
|
859
|
-
default: $(() => [
|
|
860
|
-
p.$slots.default ? W(p.$slots, "default", {
|
|
861
|
-
key: 0,
|
|
862
|
-
it: h
|
|
863
|
-
}, void 0, !0) : L("", !0)
|
|
864
|
-
]),
|
|
865
|
-
_: 2
|
|
866
|
-
}, 1032, ["label", "value", "disabled", "class"]))), 128))
|
|
867
|
-
]),
|
|
868
|
-
_: 2
|
|
869
|
-
}, [
|
|
870
|
-
p.$slots.prefix ? {
|
|
871
|
-
name: "prefix",
|
|
872
|
-
fn: $(() => [
|
|
873
|
-
W(p.$slots, "prefix", {}, void 0, !0)
|
|
874
|
-
]),
|
|
875
|
-
key: "0"
|
|
876
|
-
} : void 0,
|
|
877
|
-
l(_) ? void 0 : {
|
|
878
|
-
name: "header",
|
|
879
|
-
fn: $(() => [
|
|
880
|
-
p.$slots.header ? (c(), M("div", yt, [
|
|
881
|
-
W(p.$slots, "header", {}, void 0, !0)
|
|
882
|
-
])) : (c(), M("div", ht, [
|
|
883
|
-
l(w) ? (c(), Y(n, {
|
|
884
|
-
key: 0,
|
|
885
|
-
type: "primary",
|
|
886
|
-
size: "default",
|
|
887
|
-
onClick: D
|
|
888
|
-
}, {
|
|
889
|
-
default: $(() => [
|
|
890
|
-
ae(N(p.$l("Cancel All")), 1)
|
|
891
|
-
]),
|
|
892
|
-
_: 1
|
|
893
|
-
})) : (c(), Y(n, {
|
|
894
|
-
key: 1,
|
|
895
|
-
size: "default",
|
|
896
|
-
onClick: O
|
|
897
|
-
}, {
|
|
898
|
-
default: $(() => [
|
|
899
|
-
ae(N(p.$l("Select All")), 1)
|
|
900
|
-
]),
|
|
901
|
-
_: 1
|
|
902
|
-
})),
|
|
903
|
-
u("div", _t, [
|
|
904
|
-
u("span", bt, N(l(t).v.length), 1),
|
|
905
|
-
i[1] || (i[1] = u("span", { class: "txt-dark3" }, "/", -1)),
|
|
906
|
-
u("span", vt, N(l(_) || e.options.length), 1)
|
|
907
|
-
])
|
|
908
|
-
]))
|
|
909
|
-
]),
|
|
910
|
-
key: "1"
|
|
911
|
-
},
|
|
912
|
-
p.$slots.footer ? {
|
|
913
|
-
name: "footer",
|
|
914
|
-
fn: $(() => [
|
|
915
|
-
W(p.$slots, "footer", {}, void 0, !0)
|
|
916
|
-
]),
|
|
917
|
-
key: "2"
|
|
918
|
-
} : void 0
|
|
919
|
-
]), 1040, ["modelValue", "class"]),
|
|
920
|
-
l(_) ? (c(), M("div", {
|
|
921
|
-
key: 0,
|
|
922
|
-
class: K(["countArea abs flexMode vc p4 fs12", l(r) && "nowrap"])
|
|
923
|
-
}, [
|
|
924
|
-
u("span", $t, N(l(t).v.length), 1),
|
|
925
|
-
i[2] || (i[2] = u("span", { class: "txt-dark3" }, "/", -1)),
|
|
926
|
-
u("span", wt, N(l(_)), 1)
|
|
927
|
-
], 2)) : L("", !0)
|
|
928
|
-
]);
|
|
929
|
-
};
|
|
930
|
-
}
|
|
931
|
-
}), kt = /* @__PURE__ */ de(Ct, [["__scopeId", "data-v-278f3960"]]), xt = { class: "SuperNodata" }, De = {
|
|
932
|
-
data: "No Data",
|
|
933
|
-
selection: "Unselected"
|
|
934
|
-
}, Vt = E({
|
|
935
|
-
name: "SuperNodata"
|
|
936
|
-
}), Ot = /* @__PURE__ */ Object.assign(Vt, {
|
|
937
|
-
props: {
|
|
938
|
-
size: {
|
|
939
|
-
type: [String, Number],
|
|
940
|
-
default: "48"
|
|
941
|
-
},
|
|
942
|
-
type: {
|
|
943
|
-
type: String,
|
|
944
|
-
default: "data",
|
|
945
|
-
validate: (T) => De[T]
|
|
946
|
-
},
|
|
947
|
-
txt: {
|
|
948
|
-
type: String,
|
|
949
|
-
default: ""
|
|
950
|
-
}
|
|
951
|
-
},
|
|
952
|
-
setup(T) {
|
|
953
|
-
const V = T, s = g(() => Number(V.size)), e = g(() => V.txt ? window.$l(V.txt) : window.$l(De[V.type]));
|
|
954
|
-
return (t, S) => {
|
|
955
|
-
const o = I("el-empty");
|
|
956
|
-
return c(), M("div", xt, [
|
|
957
|
-
z(o, {
|
|
958
|
-
"image-size": l(s),
|
|
959
|
-
description: l(e)
|
|
960
|
-
}, null, 8, ["image-size", "description"])
|
|
961
|
-
]);
|
|
962
|
-
};
|
|
963
|
-
}
|
|
964
|
-
}), Dt = /* @__PURE__ */ de(Ot, [["__scopeId", "data-v-0714983f"]]), At = { class: "Page relative yscroll vh100" }, Tt = { key: 1 }, Mt = {
|
|
965
|
-
key: 0,
|
|
966
|
-
class: "title fw700 fs24"
|
|
967
|
-
}, Nt = {
|
|
968
|
-
key: 1,
|
|
969
|
-
class: "subtitle fs14 txt-dark7"
|
|
970
|
-
}, It = {
|
|
971
|
-
class: "PageFooter flexMode vc g8 fs14",
|
|
972
|
-
style: { padding: "14px 30px 24px 30px" }
|
|
973
|
-
}, zt = { class: "txt-dark5" }, Bt = { class: "txt-primary" }, jt = { class: "txt-dark5" }, Lt = E({
|
|
974
|
-
name: "Page"
|
|
975
|
-
}), Yt = /* @__PURE__ */ Object.assign(Lt, {
|
|
976
|
-
props: {
|
|
977
|
-
loading: {
|
|
978
|
-
type: Boolean,
|
|
979
|
-
default: !1
|
|
980
|
-
},
|
|
981
|
-
title: {
|
|
982
|
-
type: String,
|
|
983
|
-
default: ""
|
|
984
|
-
},
|
|
985
|
-
subtitle: {
|
|
986
|
-
type: String,
|
|
987
|
-
default: ""
|
|
988
|
-
},
|
|
989
|
-
headerClass: {
|
|
990
|
-
type: String,
|
|
991
|
-
default: "sticky"
|
|
992
|
-
},
|
|
993
|
-
noheader: {
|
|
994
|
-
type: Boolean,
|
|
995
|
-
default: !1
|
|
996
|
-
}
|
|
997
|
-
},
|
|
998
|
-
setup(T) {
|
|
999
|
-
const V = T, s = g(() => window.global.config.meta), e = g(() => ({
|
|
1000
|
-
minHeight: window.global.config.options.pageHeight + "px"
|
|
1001
|
-
}));
|
|
1002
|
-
return (t, S) => {
|
|
1003
|
-
const o = I("Loading");
|
|
1004
|
-
return c(), M("div", At, [
|
|
1005
|
-
z(o, {
|
|
1006
|
-
loading: V.loading
|
|
1007
|
-
}, null, 8, ["loading"]),
|
|
1008
|
-
V.noheader ? L("", !0) : (c(), M("div", {
|
|
1009
|
-
key: 0,
|
|
1010
|
-
class: K(["PageHeader h80 p0-30 flexMode vc hb z9 xscroll nobar", V.headerClass])
|
|
1011
|
-
}, [
|
|
1012
|
-
t.$slots.title ? W(t.$slots, "title", { key: 0 }, void 0, !0) : (c(), M("div", Tt, [
|
|
1013
|
-
V.title ? (c(), M("div", Mt, N(t.$l(V.title)), 1)) : L("", !0),
|
|
1014
|
-
V.subtitle ? (c(), M("div", Nt, N(t.$l(V.subtitle)), 1)) : L("", !0)
|
|
1015
|
-
])),
|
|
1016
|
-
W(t.$slots, "tool", {}, void 0, !0)
|
|
1017
|
-
], 2)),
|
|
1018
|
-
u("div", {
|
|
1019
|
-
class: "PageBody relative p0-30 z1",
|
|
1020
|
-
style: me(l(e))
|
|
1021
|
-
}, [
|
|
1022
|
-
W(t.$slots, "default", {}, void 0, !0)
|
|
1023
|
-
], 4),
|
|
1024
|
-
u("div", It, [
|
|
1025
|
-
u("span", zt, N(l(s).copyright), 1),
|
|
1026
|
-
u("span", Bt, N(l(s).campany), 1),
|
|
1027
|
-
u("span", jt, N(l(s).email), 1)
|
|
1028
|
-
])
|
|
1029
|
-
]);
|
|
1030
|
-
};
|
|
1031
|
-
}
|
|
1032
|
-
}), Et = /* @__PURE__ */ de(Yt, [["__scopeId", "data-v-fb447dc9"]]), Rt = { class: "MvcTableHeaderTool" }, Ft = { class: "ToolArea" }, Pt = E({
|
|
1033
|
-
name: "MvcTableHeaderTool",
|
|
1034
|
-
inheritAttrs: !1
|
|
1035
|
-
}), Ut = /* @__PURE__ */ Object.assign(Pt, {
|
|
1036
|
-
props: {
|
|
1037
|
-
tableName: {
|
|
1038
|
-
type: String,
|
|
1039
|
-
default: ""
|
|
1040
|
-
},
|
|
1041
|
-
list: {
|
|
1042
|
-
type: Array,
|
|
1043
|
-
default: () => []
|
|
1044
|
-
},
|
|
1045
|
-
selection: {
|
|
1046
|
-
type: Array,
|
|
1047
|
-
default: () => []
|
|
1048
|
-
},
|
|
1049
|
-
loadData: {
|
|
1050
|
-
type: [Function, void 0],
|
|
1051
|
-
default: void 0
|
|
1052
|
-
},
|
|
1053
|
-
remote: {
|
|
1054
|
-
type: Boolean,
|
|
1055
|
-
default: !1
|
|
1056
|
-
},
|
|
1057
|
-
filter: {
|
|
1058
|
-
type: Object,
|
|
1059
|
-
default: /* @__PURE__ */ Object.create(null)
|
|
1060
|
-
},
|
|
1061
|
-
tool: {
|
|
1062
|
-
type: [Object, Boolean, void 0],
|
|
1063
|
-
default: /* @__PURE__ */ Object.create(null)
|
|
1064
|
-
},
|
|
1065
|
-
useAll: {
|
|
1066
|
-
type: Boolean,
|
|
1067
|
-
default: !1
|
|
1068
|
-
},
|
|
1069
|
-
type: {
|
|
1070
|
-
type: String,
|
|
1071
|
-
default: ""
|
|
1072
|
-
}
|
|
1073
|
-
},
|
|
1074
|
-
setup(T, { emit: V }) {
|
|
1075
|
-
const s = $e(() => Promise.resolve().then(() => wa)), e = $e(() => Promise.resolve().then(() => Pa)), t = T, S = H({
|
|
1076
|
-
drawer: [
|
|
1077
|
-
{
|
|
1078
|
-
title: window.$l("Table Column Customization"),
|
|
1079
|
-
size: 1024,
|
|
1080
|
-
cpt: Ve(s)
|
|
1081
|
-
},
|
|
1082
|
-
{
|
|
1083
|
-
title: window.$l("Download from Current Table"),
|
|
1084
|
-
cpt: Ve(e)
|
|
1085
|
-
}
|
|
1086
|
-
],
|
|
1087
|
-
groupby: [],
|
|
1088
|
-
current: "",
|
|
1089
|
-
searchGroupBy: "",
|
|
1090
|
-
filterVisible: !1,
|
|
1091
|
-
filterTop: 0,
|
|
1092
|
-
dt: []
|
|
1093
|
-
}), { proxy: o } = ee(), f = V, O = (n) => {
|
|
1094
|
-
t.type === "drawer" || (n.target.localName === "span" ? be(n.target.parentNode) : n.target.localName === "i" ? n.target.parentNode.localName === "button" ? be(n.target.parentNode) : be(n.target.parentNode.parentNode) : be(n.target)), f("refresh");
|
|
1095
|
-
}, D = () => {
|
|
1096
|
-
S.drawer[0].params = { tableName: t.tableName }, S.current = 0;
|
|
1097
|
-
}, C = () => {
|
|
1098
|
-
S.drawer[1].params = {
|
|
1099
|
-
useAll: t.useAll,
|
|
1100
|
-
tableName: t.tableName,
|
|
1101
|
-
list: t.list,
|
|
1102
|
-
selection: t.selection,
|
|
1103
|
-
remote: t.remote
|
|
1104
|
-
}, S.current = 1;
|
|
1105
|
-
}, w = (n) => {
|
|
1106
|
-
n === "column" ? f("to-init-table") : n === "download" && f("to-download");
|
|
1107
|
-
}, _ = g(() => {
|
|
1108
|
-
var n;
|
|
1109
|
-
return ((n = t.tool) == null ? void 0 : n.download) === void 0;
|
|
1110
|
-
}), r = g(() => {
|
|
1111
|
-
var n;
|
|
1112
|
-
return ((n = t.tool) == null ? void 0 : n.column) === void 0;
|
|
1113
|
-
}), p = g(() => {
|
|
1114
|
-
var n;
|
|
1115
|
-
return ((n = t.tool) == null ? void 0 : n.refresh) === void 0;
|
|
1116
|
-
});
|
|
1117
|
-
g(() => {
|
|
1118
|
-
const n = S.searchGroupBy.toLowerCase();
|
|
1119
|
-
return i.map((b) => (b.label.toLowerCase().includes(n) ? b.hide = !1 : b.hide = !0, b));
|
|
1120
|
-
});
|
|
1121
|
-
const i = [
|
|
1122
|
-
{
|
|
1123
|
-
label: "Age",
|
|
1124
|
-
value: "Age",
|
|
1125
|
-
width: 100
|
|
1126
|
-
},
|
|
1127
|
-
{
|
|
1128
|
-
label: "Campaign Category",
|
|
1129
|
-
value: "CampaignCategory",
|
|
1130
|
-
width: 200
|
|
1131
|
-
},
|
|
1132
|
-
{
|
|
1133
|
-
label: "Campaign Type",
|
|
1134
|
-
value: "CampaignType",
|
|
1135
|
-
width: 200
|
|
1136
|
-
},
|
|
1137
|
-
{
|
|
1138
|
-
label: "Country",
|
|
1139
|
-
value: "Country",
|
|
1140
|
-
width: 120
|
|
1141
|
-
},
|
|
1142
|
-
{
|
|
1143
|
-
label: "Day",
|
|
1144
|
-
value: "Day",
|
|
1145
|
-
width: 100
|
|
1146
|
-
}
|
|
1147
|
-
];
|
|
1148
|
-
return (n, b) => {
|
|
1149
|
-
const y = I("el-button"), h = I("Drawer");
|
|
1150
|
-
return c(), M("div", Rt, [
|
|
1151
|
-
u("div", Ft, [
|
|
1152
|
-
l(p) ? (c(), Y(y, {
|
|
1153
|
-
key: 0,
|
|
1154
|
-
plain: "",
|
|
1155
|
-
onClick: b[0] || (b[0] = (x) => O(x))
|
|
1156
|
-
}, {
|
|
1157
|
-
icon: $(() => [...b[2] || (b[2] = [
|
|
1158
|
-
u("i", { class: "imicon im-reset" }, null, -1)
|
|
1159
|
-
])]),
|
|
1160
|
-
default: $(() => [
|
|
1161
|
-
ae(" " + N(n.$l("Refresh")), 1)
|
|
1162
|
-
]),
|
|
1163
|
-
_: 1
|
|
1164
|
-
})) : L("", !0),
|
|
1165
|
-
l(r) ? (c(), Y(y, {
|
|
1166
|
-
key: 1,
|
|
1167
|
-
plain: "",
|
|
1168
|
-
onClick: D
|
|
1169
|
-
}, {
|
|
1170
|
-
icon: $(() => [...b[3] || (b[3] = [
|
|
1171
|
-
u("i", { class: "imicon im-columns1" }, null, -1)
|
|
1172
|
-
])]),
|
|
1173
|
-
default: $(() => [
|
|
1174
|
-
ae(" " + N(n.$l("Columns")), 1)
|
|
1175
|
-
]),
|
|
1176
|
-
_: 1
|
|
1177
|
-
})) : L("", !0),
|
|
1178
|
-
l(_) ? (c(), Y(y, {
|
|
1179
|
-
key: 2,
|
|
1180
|
-
plain: "",
|
|
1181
|
-
onClick: C
|
|
1182
|
-
}, {
|
|
1183
|
-
icon: $(() => [...b[4] || (b[4] = [
|
|
1184
|
-
u("i", { class: "imicon im-download1" }, null, -1)
|
|
1185
|
-
])]),
|
|
1186
|
-
default: $(() => [
|
|
1187
|
-
ae(" " + N(n.$l("Download")), 1)
|
|
1188
|
-
]),
|
|
1189
|
-
_: 1
|
|
1190
|
-
})) : L("", !0)
|
|
1191
|
-
]),
|
|
1192
|
-
z(h, {
|
|
1193
|
-
current: l(S).current,
|
|
1194
|
-
"onUpdate:current": b[1] || (b[1] = (x) => l(S).current = x),
|
|
1195
|
-
drawer: l(S).drawer,
|
|
1196
|
-
dt: l(S).dt,
|
|
1197
|
-
"load-data": t.loadData,
|
|
1198
|
-
onFetchAllData: n.fetchAllData,
|
|
1199
|
-
onRecoverCurrentData: n.recoverCurrentData,
|
|
1200
|
-
onSubmit: w
|
|
1201
|
-
}, null, 8, ["current", "drawer", "dt", "load-data", "onFetchAllData", "onRecoverCurrentData"])
|
|
1202
|
-
]);
|
|
1203
|
-
};
|
|
1204
|
-
}
|
|
1205
|
-
}), Gt = /* @__PURE__ */ de(Ut, [["__scopeId", "data-v-e972fa40"]]), Ht = { class: "MvcTableHeader" }, Jt = { class: "HeaderArea" }, Kt = {
|
|
1206
|
-
key: 0,
|
|
1207
|
-
class: "flexGrow xscroll nobar"
|
|
1208
|
-
}, Wt = {
|
|
1209
|
-
key: 1,
|
|
1210
|
-
class: "titleArea"
|
|
1211
|
-
}, qt = { key: 2 }, Zt = {
|
|
1212
|
-
key: 0,
|
|
1213
|
-
class: "filterRowArea"
|
|
1214
|
-
}, Qt = E({
|
|
1215
|
-
name: "MvcTableHeader",
|
|
1216
|
-
inheritAttrs: !1
|
|
1217
|
-
}), Xt = /* @__PURE__ */ Object.assign(Qt, {
|
|
1218
|
-
props: {
|
|
1219
|
-
title: {
|
|
1220
|
-
type: String,
|
|
1221
|
-
default: ""
|
|
1222
|
-
},
|
|
1223
|
-
tableName: {
|
|
1224
|
-
type: String,
|
|
1225
|
-
default: ""
|
|
1226
|
-
},
|
|
1227
|
-
noheader: {
|
|
1228
|
-
type: Boolean,
|
|
1229
|
-
default: !1
|
|
1230
|
-
}
|
|
1231
|
-
},
|
|
1232
|
-
setup(T, { emit: V }) {
|
|
1233
|
-
const s = T;
|
|
1234
|
-
return (e, t) => (c(), M("div", Ht, [
|
|
1235
|
-
u("div", Jt, [
|
|
1236
|
-
e.$slots.default ? (c(), M("div", Kt, [
|
|
1237
|
-
W(e.$slots, "default", {}, void 0, !0)
|
|
1238
|
-
])) : s.title ? (c(), M("div", Wt, N(s.title), 1)) : (c(), M("div", qt)),
|
|
1239
|
-
e.$attrs.tool !== !1 ? (c(), Y(Gt, Q({ key: 3 }, e.$attrs, {
|
|
1240
|
-
"table-name": s.tableName
|
|
1241
|
-
}), null, 16, ["table-name"])) : L("", !0)
|
|
1242
|
-
]),
|
|
1243
|
-
e.$slots.filterRow ? (c(), M("div", Zt, [
|
|
1244
|
-
W(e.$slots, "filterRow", {}, void 0, !0)
|
|
1245
|
-
])) : L("", !0)
|
|
1246
|
-
]));
|
|
1247
|
-
}
|
|
1248
|
-
}), el = /* @__PURE__ */ de(Xt, [["__scopeId", "data-v-1b2ed487"]]), tl = E({
|
|
1249
|
-
name: "MvcTableColumnFilter",
|
|
1250
|
-
props: {
|
|
1251
|
-
tableName: {
|
|
1252
|
-
type: String,
|
|
1253
|
-
default: ""
|
|
1254
|
-
},
|
|
1255
|
-
group: {
|
|
1256
|
-
type: Object,
|
|
1257
|
-
default: /* @__PURE__ */ Object.create(null)
|
|
1258
|
-
}
|
|
1259
|
-
},
|
|
1260
|
-
setup: (T, V) => {
|
|
1261
|
-
var f;
|
|
1262
|
-
const s = H({
|
|
1263
|
-
options: [],
|
|
1264
|
-
slots: []
|
|
1265
|
-
}), e = T.tableName + "_Column";
|
|
1266
|
-
let t = [];
|
|
1267
|
-
(() => {
|
|
1268
|
-
if (!V.slots.default) return;
|
|
1269
|
-
const O = V.slots.default()[0].children[0].children, D = {
|
|
1270
|
-
left: [],
|
|
1271
|
-
center: [],
|
|
1272
|
-
right: []
|
|
1273
|
-
}, C = T.tableName ? JSON.parse(localStorage.getItem(e)) : {}, w = [void 0];
|
|
1274
|
-
O.forEach((r) => {
|
|
1275
|
-
window.$getType(r.type) === "Symbol" ? t = t.concat(r.children) : t.push(r);
|
|
1276
|
-
}), t.forEach((r, p) => {
|
|
1277
|
-
var i;
|
|
1278
|
-
if (window.$getType(r.type), ((i = r.type) == null ? void 0 : i.name) === "ElTableColumn") {
|
|
1279
|
-
let n = {
|
|
1280
|
-
...r.props,
|
|
1281
|
-
labelKey: r.props.label,
|
|
1282
|
-
label: window.$l(r.props.label),
|
|
1283
|
-
sort: p,
|
|
1284
|
-
nomove: r.props.nomove || r.props.nomove === "" || r.props.label === "-" || r.props.type === "selection" || r.props.label === "Operation",
|
|
1285
|
-
resizable: !0,
|
|
1286
|
-
visible: r.props.visible !== !1
|
|
1287
|
-
};
|
|
1288
|
-
if (C != null && C.length && w.indexOf(r.props.prop) === -1) {
|
|
1289
|
-
const { data: b } = C.filter1(
|
|
1290
|
-
(y) => y.prop === r.props.prop
|
|
1291
|
-
);
|
|
1292
|
-
b && (n.sort = b.sort, n.fixed = b.fixed, n.visible = b.visible);
|
|
1293
|
-
}
|
|
1294
|
-
r.props.fixed ? D[r.props.fixed].push(n) : D.center.push(n), r.props = n;
|
|
1295
|
-
}
|
|
1296
|
-
}), s.columnInfo = D;
|
|
1297
|
-
const _ = [
|
|
1298
|
-
...D.left,
|
|
1299
|
-
...D.center.sort((r, p) => r.sort - p.sort),
|
|
1300
|
-
...D.right
|
|
1301
|
-
];
|
|
1302
|
-
T.tableName && localStorage.setItem(e, JSON.stringify(_));
|
|
1303
|
-
})();
|
|
1304
|
-
let o = [];
|
|
1305
|
-
if (t.forEach((O) => {
|
|
1306
|
-
window.$getType(O) !== "String" && O.props.visible && o.push(O);
|
|
1307
|
-
}), (f = T.group) != null && f.label) {
|
|
1308
|
-
const O = {
|
|
1309
|
-
label: "Group By " + T.group.label,
|
|
1310
|
-
// prop: props.group.value,
|
|
1311
|
-
width: T.group.width,
|
|
1312
|
-
fixed: "left",
|
|
1313
|
-
visible: !0,
|
|
1314
|
-
resizable: !0
|
|
1315
|
-
};
|
|
1316
|
-
o[0].props.type === "selection" ? o.splice(1, 0, {
|
|
1317
|
-
...o[1],
|
|
1318
|
-
props: O
|
|
1319
|
-
}) : o.unshift({
|
|
1320
|
-
...o[0],
|
|
1321
|
-
props: O
|
|
1322
|
-
});
|
|
1323
|
-
}
|
|
1324
|
-
return o = o.sort((O, D) => O.props.sort - D.props.sort), () => o;
|
|
1325
|
-
}
|
|
1326
|
-
}), ll = { class: "MvcTableFooter" }, ol = { class: "FooterArea xscroll nobar" }, al = { class: "flexMode vc g8" }, nl = {
|
|
1327
|
-
key: 1,
|
|
1328
|
-
class: "flexMode vc g4 fs14"
|
|
1329
|
-
}, sl = { class: "txt-dark3" }, rl = { class: "flexMode vc" }, il = { class: "txt-blue" }, dl = {
|
|
1330
|
-
key: 2,
|
|
1331
|
-
class: "flexMode vc g4 fs14"
|
|
1332
|
-
}, ul = { class: "txt-dark3" }, cl = { class: "flexMode vc" }, pl = { class: "txt-blue" }, ml = { class: "txt-dark7" }, fl = { class: "flexMode vc g4 fs14" }, gl = { class: "txt-dark3" }, yl = { class: "txt-dark7" }, hl = E({
|
|
1333
|
-
name: "MvcTableFooter"
|
|
1334
|
-
}), _l = /* @__PURE__ */ Object.assign(hl, {
|
|
1335
|
-
props: {
|
|
1336
|
-
pageNum: {
|
|
1337
|
-
type: Number,
|
|
1338
|
-
default: 1
|
|
1339
|
-
},
|
|
1340
|
-
pageSize: {
|
|
1341
|
-
type: Number,
|
|
1342
|
-
default: 50
|
|
1343
|
-
},
|
|
1344
|
-
pageCount: {
|
|
1345
|
-
type: Number,
|
|
1346
|
-
default: 0
|
|
1347
|
-
},
|
|
1348
|
-
pageSizes: {
|
|
1349
|
-
type: Array,
|
|
1350
|
-
default: () => [10, 20, 50, 100]
|
|
1351
|
-
},
|
|
1352
|
-
total: {
|
|
1353
|
-
type: Number,
|
|
1354
|
-
default: 0
|
|
1355
|
-
},
|
|
1356
|
-
filterTotal: {
|
|
1357
|
-
type: Number,
|
|
1358
|
-
default: 0
|
|
1359
|
-
},
|
|
1360
|
-
rows: {
|
|
1361
|
-
type: Number,
|
|
1362
|
-
default: 0
|
|
1363
|
-
},
|
|
1364
|
-
filterRows: {
|
|
1365
|
-
type: Number,
|
|
1366
|
-
default: 0
|
|
1367
|
-
},
|
|
1368
|
-
selectionLength: {
|
|
1369
|
-
type: Number,
|
|
1370
|
-
default: 0
|
|
1371
|
-
},
|
|
1372
|
-
remoteData: {
|
|
1373
|
-
type: [String, Number],
|
|
1374
|
-
default: ""
|
|
1375
|
-
},
|
|
1376
|
-
nosummary: {
|
|
1377
|
-
type: Boolean,
|
|
1378
|
-
default: !1
|
|
1379
|
-
},
|
|
1380
|
-
staticTotal: {
|
|
1381
|
-
type: Boolean,
|
|
1382
|
-
default: !1
|
|
1383
|
-
}
|
|
1384
|
-
},
|
|
1385
|
-
setup(T, { emit: V }) {
|
|
1386
|
-
const s = T, e = H({
|
|
1387
|
-
summaryMode: 1
|
|
1388
|
-
}), t = V, S = (r) => {
|
|
1389
|
-
t("size-change", r);
|
|
1390
|
-
}, o = (r) => {
|
|
1391
|
-
t("page-change", r);
|
|
1392
|
-
}, f = (r) => {
|
|
1393
|
-
t("summary-mode-change", r);
|
|
1394
|
-
}, O = g(() => s.staticTotal ? !1 : s.filterTotal !== s.total), D = g(() => Number(s.pageCount) || 7), C = g(() => window.$getType(s.remoteData) === "String"), w = g(() => C.value ? "slot, ->, prev, pager, next, sizes" : "slot, ->"), _ = [
|
|
1395
|
-
{
|
|
1396
|
-
label: window.$l("Current Page"),
|
|
1397
|
-
value: 0
|
|
1398
|
-
},
|
|
1399
|
-
{
|
|
1400
|
-
label: window.$l("All Page"),
|
|
1401
|
-
value: 1
|
|
1402
|
-
}
|
|
1403
|
-
];
|
|
1404
|
-
return (r, p) => {
|
|
1405
|
-
const i = I("el-option"), n = I("el-select"), b = I("el-pagination");
|
|
1406
|
-
return c(), M("div", ll, [
|
|
1407
|
-
u("div", ol, [
|
|
1408
|
-
z(b, {
|
|
1409
|
-
ref: "pagination",
|
|
1410
|
-
background: "",
|
|
1411
|
-
layout: l(w),
|
|
1412
|
-
total: s.total,
|
|
1413
|
-
"current-page": s.pageNum,
|
|
1414
|
-
"onUpdate:currentPage": p[1] || (p[1] = (y) => s.pageNum = y),
|
|
1415
|
-
"page-size": s.pageSize,
|
|
1416
|
-
"page-sizes": s.pageSizes,
|
|
1417
|
-
"pager-count": l(D),
|
|
1418
|
-
onSizeChange: S,
|
|
1419
|
-
onCurrentChange: o,
|
|
1420
|
-
class: "wp100"
|
|
1421
|
-
}, {
|
|
1422
|
-
default: $(() => [
|
|
1423
|
-
u("div", al, [
|
|
1424
|
-
s.nosummary ? L("", !0) : (c(), Y(n, {
|
|
1425
|
-
key: 0,
|
|
1426
|
-
modelValue: l(e).summaryMode,
|
|
1427
|
-
"onUpdate:modelValue": p[0] || (p[0] = (y) => l(e).summaryMode = y),
|
|
1428
|
-
placeholder: " ",
|
|
1429
|
-
class: "w160",
|
|
1430
|
-
size: "normal",
|
|
1431
|
-
onChange: f
|
|
1432
|
-
}, {
|
|
1433
|
-
prefix: $(() => [
|
|
1434
|
-
ae(N(r.$l("Sum")), 1)
|
|
1435
|
-
]),
|
|
1436
|
-
default: $(() => [
|
|
1437
|
-
(c(), M(re, null, ie(_, (y, h) => z(i, {
|
|
1438
|
-
key: h,
|
|
1439
|
-
label: y.label,
|
|
1440
|
-
value: y.value
|
|
1441
|
-
}, null, 8, ["label", "value"])), 64))
|
|
1442
|
-
]),
|
|
1443
|
-
_: 1
|
|
1444
|
-
}, 8, ["modelValue"])),
|
|
1445
|
-
s.selectionLength ? (c(), M("div", nl, [
|
|
1446
|
-
u("div", sl, N(r.$l("Selected")), 1),
|
|
1447
|
-
u("div", rl, [
|
|
1448
|
-
u("span", il, N(s.selectionLength), 1)
|
|
1449
|
-
])
|
|
1450
|
-
])) : L("", !0),
|
|
1451
|
-
l(O) ? (c(), M("div", dl, [
|
|
1452
|
-
u("div", ul, N(r.$l("Current")), 1),
|
|
1453
|
-
u("div", cl, [
|
|
1454
|
-
u("span", pl, N(r.$fa(s.filterTotal, 0)), 1),
|
|
1455
|
-
p[2] || (p[2] = u("span", { class: "p0-2 txt-dark3" }, "/", -1)),
|
|
1456
|
-
u("span", ml, N(r.$fa(s.rows, 0)), 1)
|
|
1457
|
-
])
|
|
1458
|
-
])) : L("", !0),
|
|
1459
|
-
u("div", fl, [
|
|
1460
|
-
u("div", gl, N(r.$l("Total")), 1),
|
|
1461
|
-
u("div", yl, N(r.$fa(s.total, 0)), 1)
|
|
1462
|
-
])
|
|
1463
|
-
])
|
|
1464
|
-
]),
|
|
1465
|
-
_: 1
|
|
1466
|
-
}, 8, ["layout", "total", "current-page", "page-size", "page-sizes", "pager-count"])
|
|
1467
|
-
])
|
|
1468
|
-
]);
|
|
1469
|
-
};
|
|
1470
|
-
}
|
|
1471
|
-
}), Ne = /* @__PURE__ */ de(_l, [["__scopeId", "data-v-1cd61412"]]), bl = ["id"], vl = E({
|
|
1472
|
-
name: "MvcTableGroupMain",
|
|
1473
|
-
inheritAttrs: !1
|
|
1474
|
-
}), $l = /* @__PURE__ */ Object.assign(vl, {
|
|
1475
|
-
props: {
|
|
1476
|
-
loading: {
|
|
1477
|
-
type: Boolean,
|
|
1478
|
-
default: !1
|
|
1479
|
-
},
|
|
1480
|
-
total: {
|
|
1481
|
-
type: Number,
|
|
1482
|
-
default: 0
|
|
1483
|
-
},
|
|
1484
|
-
tableName: {
|
|
1485
|
-
type: String,
|
|
1486
|
-
default: ""
|
|
1487
|
-
},
|
|
1488
|
-
channel: {
|
|
1489
|
-
type: String,
|
|
1490
|
-
default: ""
|
|
1491
|
-
},
|
|
1492
|
-
cellClassName: {
|
|
1493
|
-
type: [Function, String],
|
|
1494
|
-
default: void 0
|
|
1495
|
-
},
|
|
1496
|
-
loadData: {
|
|
1497
|
-
type: [Function, void 0],
|
|
1498
|
-
default: void 0
|
|
1499
|
-
},
|
|
1500
|
-
list: {
|
|
1501
|
-
type: [Array, void 0],
|
|
1502
|
-
default: void 0
|
|
1503
|
-
},
|
|
1504
|
-
height: {
|
|
1505
|
-
type: [String, Number],
|
|
1506
|
-
default: 0
|
|
1507
|
-
},
|
|
1508
|
-
minusHeight: {
|
|
1509
|
-
type: [String, Number],
|
|
1510
|
-
default: 0
|
|
1511
|
-
},
|
|
1512
|
-
noheader: {
|
|
1513
|
-
type: Boolean,
|
|
1514
|
-
default: !1
|
|
1515
|
-
},
|
|
1516
|
-
nofooter: {
|
|
1517
|
-
type: Boolean,
|
|
1518
|
-
default: !1
|
|
1519
|
-
},
|
|
1520
|
-
noscrolltop: {
|
|
1521
|
-
type: Boolean,
|
|
1522
|
-
default: !1
|
|
1523
|
-
},
|
|
1524
|
-
immediate: {
|
|
1525
|
-
type: Boolean,
|
|
1526
|
-
default: !0
|
|
1527
|
-
},
|
|
1528
|
-
pageSize: {
|
|
1529
|
-
type: Number,
|
|
1530
|
-
default: 0
|
|
1531
|
-
},
|
|
1532
|
-
filter: {
|
|
1533
|
-
type: Object,
|
|
1534
|
-
default: /* @__PURE__ */ Object.create(null)
|
|
1535
|
-
},
|
|
1536
|
-
defaultSort: {
|
|
1537
|
-
type: Object,
|
|
1538
|
-
default: /* @__PURE__ */ Object.create(null)
|
|
1539
|
-
},
|
|
1540
|
-
rowKey: {
|
|
1541
|
-
type: [String, void 0],
|
|
1542
|
-
default: void 0
|
|
1543
|
-
},
|
|
1544
|
-
showSummary: {
|
|
1545
|
-
type: Boolean,
|
|
1546
|
-
default: !1
|
|
1547
|
-
},
|
|
1548
|
-
summaryMethod: {
|
|
1549
|
-
type: Function,
|
|
1550
|
-
default: void 0
|
|
1551
|
-
},
|
|
1552
|
-
groupInfo: {
|
|
1553
|
-
type: Object,
|
|
1554
|
-
default: /* @__PURE__ */ Object.create(null)
|
|
1555
|
-
}
|
|
1556
|
-
},
|
|
1557
|
-
setup(T, { expose: V, emit: s }) {
|
|
1558
|
-
const e = T, t = H({
|
|
1559
|
-
loading: !0,
|
|
1560
|
-
tableKey: 0,
|
|
1561
|
-
pageStart: 1,
|
|
1562
|
-
pageSize: 50,
|
|
1563
|
-
search: {},
|
|
1564
|
-
dt: {},
|
|
1565
|
-
filter: {},
|
|
1566
|
-
selection: [],
|
|
1567
|
-
scrollTop: 0,
|
|
1568
|
-
scrollAni: !1,
|
|
1569
|
-
summaryMode: 1,
|
|
1570
|
-
tableId: "",
|
|
1571
|
-
sizeChanged: !1
|
|
1572
|
-
}), { proxy: S } = ee();
|
|
1573
|
-
pe("store").table();
|
|
1574
|
-
const f = ve();
|
|
1575
|
-
Te(() => {
|
|
1576
|
-
t.tableId = `Table${+/* @__PURE__ */ new Date()}_${window.$rn(9999)}`;
|
|
1577
|
-
});
|
|
1578
|
-
const O = s, D = async (j = {}) => {
|
|
1579
|
-
const { refresh: G, remote: P } = j;
|
|
1580
|
-
ne.value && G || (j ? (t.pageStart = j.pageStart || 1, j.pageSize && (t.pageSize = j.pageSize), delete j.pageStart, delete j.pageSize, delete j.refresh, delete j.remote, t.search = j) : t.pageStart = 1, await w({ remote: P }));
|
|
1581
|
-
}, C = (j) => {
|
|
1582
|
-
j || t.tableKey++;
|
|
1583
|
-
}, w = async (j = {}, G) => {
|
|
1584
|
-
var X;
|
|
1585
|
-
const { remote: P } = j;
|
|
1586
|
-
if (e.loadData !== void 0) {
|
|
1587
|
-
t.loading = !0;
|
|
1588
|
-
let te;
|
|
1589
|
-
e.pageSize && t.sizeChanged === !1 ? te = e.pageSize : te = t.pageSize;
|
|
1590
|
-
const le = {
|
|
1591
|
-
pageStart: t.pageStart,
|
|
1592
|
-
pageSize: te,
|
|
1593
|
-
...t.search
|
|
1594
|
-
};
|
|
1595
|
-
t.pageSize = le.pageSize, t.pageStart = le.pageStart, (X = e.groupInfo) != null && X.value && (le.groupBy = e.groupInfo.value), P && (le.remote = !0);
|
|
1596
|
-
const ye = await e.loadData(le);
|
|
1597
|
-
t.loading = !1, ye ? (t.dt = ye, t.filter = JSON.parse(JSON.stringify(ye))) : (t.dt = {
|
|
1598
|
-
total: 0,
|
|
1599
|
-
list: []
|
|
1600
|
-
}, t.filter = {
|
|
1601
|
-
total: 0,
|
|
1602
|
-
list: []
|
|
1603
|
-
}), se.value ? p() : O("list-change", ye.list || []);
|
|
1604
|
-
}
|
|
1605
|
-
m();
|
|
1606
|
-
}, _ = (j) => {
|
|
1607
|
-
t.summaryMode = j;
|
|
1608
|
-
}, r = ({ columns: j, data: G }) => Fe({ columns: j, data: G, currency: window.currency }), p = (j = {}) => {
|
|
1609
|
-
let { v: G = e.filter } = j;
|
|
1610
|
-
G || (G = j);
|
|
1611
|
-
const P = Object.keys(G), X = [];
|
|
1612
|
-
return P.forEach((te) => {
|
|
1613
|
-
const le = G[te];
|
|
1614
|
-
le && le.length && X.push(te);
|
|
1615
|
-
}), X.length ? i(X, G) : (t.dt.list = [...t.filter.list], t.filter.total = t.dt.total, O("list-change", t.dt.list), t.filter.list);
|
|
1616
|
-
}, i = (j, G) => {
|
|
1617
|
-
const P = [];
|
|
1618
|
-
return t.filter.list.forEach((X) => {
|
|
1619
|
-
let te = !1;
|
|
1620
|
-
j.forEach((le) => {
|
|
1621
|
-
const ye = String(X[le]).toLowerCase();
|
|
1622
|
-
let Se = G[le];
|
|
1623
|
-
if (window.$getType(Se) === "Array")
|
|
1624
|
-
try {
|
|
1625
|
-
Se.forEach((Ce) => {
|
|
1626
|
-
if (Ce && ye.includes(String(Ce).toLowerCase()))
|
|
1627
|
-
throw te = !0, new Error();
|
|
1628
|
-
});
|
|
1629
|
-
} catch {
|
|
1630
|
-
}
|
|
1631
|
-
else ye.includes(Se.toLowerCase()) && (te = !0);
|
|
1632
|
-
}), te && P.push(X);
|
|
1633
|
-
}), t.dt.list = P, t.filter.total = P.length, O("list-change", P), P;
|
|
1634
|
-
}, n = () => {
|
|
1635
|
-
t.dt = {
|
|
1636
|
-
list: e.list,
|
|
1637
|
-
total: e.list.length
|
|
1638
|
-
}, t.filter = JSON.parse(JSON.stringify(t.dt)), O("list-change", e.list);
|
|
1639
|
-
}, b = ({ row: j = {}, id: G }) => {
|
|
1640
|
-
G === void 0 ? t.dt.list.unshift(j) : t.dt.list = t.dt.list.map((P) => P.id === G ? {
|
|
1641
|
-
...P,
|
|
1642
|
-
...j
|
|
1643
|
-
} : P);
|
|
1644
|
-
}, y = (j, G) => {
|
|
1645
|
-
t.dt.list = t.dt.list.filter((P) => P[j] !== G), t.filter.list = t.filter.list.filter((P) => P[j] !== G);
|
|
1646
|
-
}, h = (j) => {
|
|
1647
|
-
f.value.toggleRowExpansion(j);
|
|
1648
|
-
}, x = (j, G) => {
|
|
1649
|
-
f.value.toggleRowSelection(j, G);
|
|
1650
|
-
}, k = (j) => {
|
|
1651
|
-
t.selection = j, O("selection-change", j);
|
|
1652
|
-
}, B = (j) => {
|
|
1653
|
-
O("sort-change", j);
|
|
1654
|
-
}, A = (j) => {
|
|
1655
|
-
t.pageSize = j, t.sizeChanged = !0, w();
|
|
1656
|
-
}, a = (j) => {
|
|
1657
|
-
t.pageStart = j, w();
|
|
1658
|
-
}, d = (j, G, P) => {
|
|
1659
|
-
let X = localStorage.getItem(J.value);
|
|
1660
|
-
if (X) {
|
|
1661
|
-
X = JSON.parse(X);
|
|
1662
|
-
const { data: te } = X.filter1((le) => le.prop === P.property);
|
|
1663
|
-
te && (te.width = P.width, localStorage.setItem(J.value, JSON.stringify(X)));
|
|
1664
|
-
}
|
|
1665
|
-
}, m = () => {
|
|
1666
|
-
f.value && f.value.setScrollTop(0);
|
|
1667
|
-
}, R = () => {
|
|
1668
|
-
t.loading = !1;
|
|
1669
|
-
}, U = (j) => {
|
|
1670
|
-
t.dt.list.unshift(j);
|
|
1671
|
-
}, ne = g(() => e.loading || t.loading), q = g(() => {
|
|
1672
|
-
const {
|
|
1673
|
-
options: { tableHeight: j },
|
|
1674
|
-
page: G
|
|
1675
|
-
} = window.global.config;
|
|
1676
|
-
let P = e.height || j;
|
|
1677
|
-
return e.nofooter && (P = P + G.footer), e.noheader && (P = P + G.header), e.minusHeight && (P = P - Number(e.minusHeight)), P < 200 && (P = 200), P;
|
|
1678
|
-
}), se = g(() => 0), F = g(() => e.list === void 0 ? String(+/* @__PURE__ */ new Date()) : +/* @__PURE__ */ new Date()), ce = g(() => window.$getType(F.value) === "String"), J = g(() => e.tableName + "_Column"), _e = g(() => t.summaryMode === 0 ? r : e.summaryMethod), we = g(() => e.noheader ? { top: 0 } : { top: "56px" });
|
|
1679
|
-
Z(
|
|
1680
|
-
() => F.value,
|
|
1681
|
-
(j) => {
|
|
1682
|
-
if (j) {
|
|
1683
|
-
const G = window.$getType(j);
|
|
1684
|
-
G === "String" ? e.immediate && w() : G === "Number" && (t.loading = !1, n());
|
|
1685
|
-
}
|
|
1686
|
-
},
|
|
1687
|
-
{
|
|
1688
|
-
immediate: !0
|
|
1689
|
-
}
|
|
1690
|
-
), V({
|
|
1691
|
-
toFilter: p,
|
|
1692
|
-
initTable: D,
|
|
1693
|
-
editRow: b,
|
|
1694
|
-
removeRow: y,
|
|
1695
|
-
refreshTable: C,
|
|
1696
|
-
toggleRowExpansion: h,
|
|
1697
|
-
toggleRowSelection: x,
|
|
1698
|
-
toStop: R,
|
|
1699
|
-
toAdd: U
|
|
1700
|
-
});
|
|
1701
|
-
const Ie = {
|
|
1702
|
-
"popper-class": "maxw300"
|
|
1703
|
-
};
|
|
1704
|
-
return (j, G) => {
|
|
1705
|
-
var te, le;
|
|
1706
|
-
const P = I("Loading"), X = I("el-table");
|
|
1707
|
-
return c(), M("div", {
|
|
1708
|
-
class: K(["MvcTableGroupMain", l(ce) && "PagiTable"]),
|
|
1709
|
-
id: l(t).tableId
|
|
1710
|
-
}, [
|
|
1711
|
-
z(P, {
|
|
1712
|
-
loading: l(ne),
|
|
1713
|
-
style: me(l(we))
|
|
1714
|
-
}, null, 8, ["loading", "style"]),
|
|
1715
|
-
(c(), Y(X, {
|
|
1716
|
-
ref_key: "table",
|
|
1717
|
-
ref: f,
|
|
1718
|
-
key: l(t).tableKey,
|
|
1719
|
-
data: l(t).dt.list,
|
|
1720
|
-
"row-key": e.rowKey,
|
|
1721
|
-
height: l(q),
|
|
1722
|
-
stripe: "",
|
|
1723
|
-
border: "",
|
|
1724
|
-
"default-sort": T.defaultSort,
|
|
1725
|
-
"show-summary": e.showSummary,
|
|
1726
|
-
"summary-method": l(_e),
|
|
1727
|
-
"tooltip-options": Ie,
|
|
1728
|
-
"cell-class-name": e.cellClassName,
|
|
1729
|
-
onHeaderDragend: d,
|
|
1730
|
-
onSelectionChange: k,
|
|
1731
|
-
onSortChange: B,
|
|
1732
|
-
onToggleRowSelection: x
|
|
1733
|
-
}, {
|
|
1734
|
-
default: $(() => [
|
|
1735
|
-
z(l(tl), {
|
|
1736
|
-
"table-name": e.tableName,
|
|
1737
|
-
group: e.groupInfo
|
|
1738
|
-
}, {
|
|
1739
|
-
default: $(() => [
|
|
1740
|
-
W(j.$slots, "default", {}, void 0, !0)
|
|
1741
|
-
]),
|
|
1742
|
-
_: 3
|
|
1743
|
-
}, 8, ["table-name", "group"])
|
|
1744
|
-
]),
|
|
1745
|
-
_: 3
|
|
1746
|
-
}, 8, ["data", "row-key", "height", "default-sort", "show-summary", "summary-method", "cell-class-name"])),
|
|
1747
|
-
e.nofooter ? L("", !0) : (c(), Y(Ne, Q({
|
|
1748
|
-
key: 0,
|
|
1749
|
-
ref: "footer"
|
|
1750
|
-
}, j.$attrs, {
|
|
1751
|
-
nosummary: !e.showSummary,
|
|
1752
|
-
"page-num": l(t).pageStart,
|
|
1753
|
-
"page-size": l(t).pageSize,
|
|
1754
|
-
rows: (te = l(t).filter.list) == null ? void 0 : te.length,
|
|
1755
|
-
"filter-rows": (le = l(t).dt.list) == null ? void 0 : le.length,
|
|
1756
|
-
total: e.total || l(t).dt.total,
|
|
1757
|
-
"filter-total": l(t).filter.total,
|
|
1758
|
-
"selection-length": l(t).selection.length,
|
|
1759
|
-
"remote-data": l(F),
|
|
1760
|
-
"static-total": !!e.total,
|
|
1761
|
-
onSizeChange: A,
|
|
1762
|
-
onPageChange: a,
|
|
1763
|
-
onSummaryModeChange: _
|
|
1764
|
-
}), null, 16, ["nosummary", "page-num", "page-size", "rows", "filter-rows", "total", "filter-total", "selection-length", "remote-data", "static-total"]))
|
|
1765
|
-
], 10, bl);
|
|
1766
|
-
};
|
|
1767
|
-
}
|
|
1768
|
-
}), wl = /* @__PURE__ */ de($l, [["__scopeId", "data-v-7ba6549a"]]), Sl = E({
|
|
1769
|
-
name: "Table",
|
|
1770
|
-
inheritAttrs: !1
|
|
1771
|
-
}), Cl = /* @__PURE__ */ Object.assign(Sl, {
|
|
1772
|
-
props: {
|
|
1773
|
-
noheader: {
|
|
1774
|
-
type: Boolean,
|
|
1775
|
-
default: !1
|
|
1776
|
-
},
|
|
1777
|
-
tableClass: {
|
|
1778
|
-
type: String,
|
|
1779
|
-
default: ""
|
|
1780
|
-
},
|
|
1781
|
-
customRefresh: {
|
|
1782
|
-
type: Boolean,
|
|
1783
|
-
default: !1
|
|
1784
|
-
},
|
|
1785
|
-
remote: {
|
|
1786
|
-
type: Boolean,
|
|
1787
|
-
default: !0
|
|
1788
|
-
}
|
|
1789
|
-
},
|
|
1790
|
-
setup(T, { expose: V, emit: s }) {
|
|
1791
|
-
const e = s, t = T, S = H({
|
|
1792
|
-
columnInfo: {},
|
|
1793
|
-
selection: [],
|
|
1794
|
-
list: [],
|
|
1795
|
-
groupInfo: {}
|
|
1796
|
-
}), o = ve();
|
|
1797
|
-
ve();
|
|
1798
|
-
const f = ve(), { proxy: O } = ee(), D = (a) => {
|
|
1799
|
-
f.value.toFilter(a);
|
|
1800
|
-
}, C = (a) => {
|
|
1801
|
-
f.value.initTable(a);
|
|
1802
|
-
}, w = (a) => {
|
|
1803
|
-
f.value.editRow(a);
|
|
1804
|
-
}, _ = () => {
|
|
1805
|
-
f.value.refreshTable();
|
|
1806
|
-
}, r = (a) => {
|
|
1807
|
-
S.list = a;
|
|
1808
|
-
}, p = (a) => {
|
|
1809
|
-
S.selection = a;
|
|
1810
|
-
}, i = (a) => {
|
|
1811
|
-
f.value.toggleRowExpansion(a);
|
|
1812
|
-
}, n = (a, d) => {
|
|
1813
|
-
f.value.toggleRowSelection(a, d);
|
|
1814
|
-
}, b = () => {
|
|
1815
|
-
O.$attrs.list || f.value.initTable({ refresh: !0, remote: t.remote }), t.customRefresh && e("customRefreshFunc");
|
|
1816
|
-
}, y = (a) => {
|
|
1817
|
-
S.groupInfo = a, ge(() => {
|
|
1818
|
-
f.value.initTable();
|
|
1819
|
-
});
|
|
1820
|
-
}, h = () => {
|
|
1821
|
-
var a, d;
|
|
1822
|
-
(d = (a = f.value) == null ? void 0 : a.$refs) == null || d.table.clearSelection();
|
|
1823
|
-
}, x = () => {
|
|
1824
|
-
f.value.toStop();
|
|
1825
|
-
}, k = (a) => {
|
|
1826
|
-
f.value.toAdd(a);
|
|
1827
|
-
}, B = (a, d) => {
|
|
1828
|
-
f.value.removeRow(a, d);
|
|
1829
|
-
}, A = g(() => O.$attrs["table-name"]);
|
|
1830
|
-
return g(() => `${A.value}_Column`), V({
|
|
1831
|
-
initTable: C,
|
|
1832
|
-
editRow: w,
|
|
1833
|
-
removeRow: B,
|
|
1834
|
-
toFilter: D,
|
|
1835
|
-
toggleRowExpansion: i,
|
|
1836
|
-
toggleRowSelection: n,
|
|
1837
|
-
toInitTable: _,
|
|
1838
|
-
clearSelection: h,
|
|
1839
|
-
toStop: x,
|
|
1840
|
-
toAdd: k
|
|
1841
|
-
}), (a, d) => (c(), M("div", {
|
|
1842
|
-
class: K(["Table", t.tableClass])
|
|
1843
|
-
}, [
|
|
1844
|
-
t.noheader ? L("", !0) : (c(), Y(el, Q({
|
|
1845
|
-
key: 0,
|
|
1846
|
-
ref_key: "header",
|
|
1847
|
-
ref: o
|
|
1848
|
-
}, a.$attrs, {
|
|
1849
|
-
list: l(S).list,
|
|
1850
|
-
selection: l(S).selection,
|
|
1851
|
-
onToInitTable: _,
|
|
1852
|
-
onGroupChange: y,
|
|
1853
|
-
onRefresh: b
|
|
1854
|
-
}), oe({
|
|
1855
|
-
default: $(() => [
|
|
1856
|
-
a.$slots.actions ? W(a.$slots, "actions", { key: 0 }, void 0, !0) : L("", !0)
|
|
1857
|
-
]),
|
|
1858
|
-
_: 2
|
|
1859
|
-
}, [
|
|
1860
|
-
a.$slots.filterRow ? {
|
|
1861
|
-
name: "filterRow",
|
|
1862
|
-
fn: $(() => [
|
|
1863
|
-
W(a.$slots, "filterRow", {}, void 0, !0)
|
|
1864
|
-
]),
|
|
1865
|
-
key: "0"
|
|
1866
|
-
} : void 0
|
|
1867
|
-
]), 1040, ["list", "selection"])),
|
|
1868
|
-
z(wl, Q({
|
|
1869
|
-
ref_key: "main",
|
|
1870
|
-
ref: f
|
|
1871
|
-
}, a.$attrs, {
|
|
1872
|
-
noheader: t.noheader,
|
|
1873
|
-
"group-info": l(S).groupInfo,
|
|
1874
|
-
onSelectionChange: p,
|
|
1875
|
-
onListChange: r
|
|
1876
|
-
}), {
|
|
1877
|
-
default: $(() => [
|
|
1878
|
-
W(a.$slots, "default", {}, void 0, !0)
|
|
1879
|
-
]),
|
|
1880
|
-
_: 3
|
|
1881
|
-
}, 16, ["noheader", "group-info"])
|
|
1882
|
-
], 2));
|
|
1883
|
-
}
|
|
1884
|
-
}), kl = /* @__PURE__ */ de(Cl, [["__scopeId", "data-v-68ad77a3"]]), xl = { class: "SuperTextarea relative" }, Vl = {
|
|
1885
|
-
key: 0,
|
|
1886
|
-
class: "absFull flexMode hc vc z9"
|
|
1887
|
-
}, Ol = E({
|
|
1888
|
-
name: "SuperTextarea"
|
|
1889
|
-
}), Dl = /* @__PURE__ */ Object.assign(Ol, {
|
|
1890
|
-
props: {
|
|
1891
|
-
modelValue: {
|
|
1892
|
-
type: [String, Array],
|
|
1893
|
-
default: ""
|
|
1894
|
-
},
|
|
1895
|
-
rows: {
|
|
1896
|
-
type: [Number, String],
|
|
1897
|
-
default: 8
|
|
1898
|
-
},
|
|
1899
|
-
max: {
|
|
1900
|
-
type: [String, Number],
|
|
1901
|
-
default: 10
|
|
1902
|
-
},
|
|
1903
|
-
placeholder: {
|
|
1904
|
-
type: String,
|
|
1905
|
-
default: ""
|
|
1906
|
-
},
|
|
1907
|
-
focus: {
|
|
1908
|
-
type: Boolean,
|
|
1909
|
-
default: !1
|
|
1910
|
-
},
|
|
1911
|
-
loading: {
|
|
1912
|
-
type: Boolean,
|
|
1913
|
-
default: !1
|
|
1914
|
-
},
|
|
1915
|
-
disabled: {
|
|
1916
|
-
type: Boolean,
|
|
1917
|
-
default: !1
|
|
1918
|
-
},
|
|
1919
|
-
sep: {
|
|
1920
|
-
type: String,
|
|
1921
|
-
default: `
|
|
1922
|
-
`
|
|
1923
|
-
},
|
|
1924
|
-
resize: {
|
|
1925
|
-
type: String,
|
|
1926
|
-
default: "none"
|
|
1927
|
-
}
|
|
1928
|
-
},
|
|
1929
|
-
emits: ["total", "update:modelValue", "blur"],
|
|
1930
|
-
setup(T, { expose: V, emit: s }) {
|
|
1931
|
-
const e = T, t = H({ v: "", total: 0, mounted: !1 }), { proxy: S } = ee();
|
|
1932
|
-
ue(() => {
|
|
1933
|
-
e.focus && f(v);
|
|
1934
|
-
});
|
|
1935
|
-
const o = s, f = (b) => {
|
|
1936
|
-
ge(() => {
|
|
1937
|
-
S.$refs.input.focus(), b && S.$refs.input.select();
|
|
1938
|
-
});
|
|
1939
|
-
}, O = (b) => {
|
|
1940
|
-
let y = 0, h = [];
|
|
1941
|
-
const x = [];
|
|
1942
|
-
if (b) {
|
|
1943
|
-
if (h = b.split(`
|
|
1944
|
-
`), h.forEach((k) => {
|
|
1945
|
-
k.trim() && (y++, x.push(k));
|
|
1946
|
-
}), !w.value) {
|
|
1947
|
-
t.v = r.value ? [] : "";
|
|
1948
|
-
return;
|
|
1949
|
-
}
|
|
1950
|
-
w.value > -1 && y > w.value && (h = x.slice(0, w.value), t.v = h.join(e.sep), y = w.value), o("update:modelValue", r.value ? h : t.v);
|
|
1951
|
-
} else
|
|
1952
|
-
o("update:modelValue", r.value ? [] : "");
|
|
1953
|
-
t.total = y, o("total", y);
|
|
1954
|
-
}, D = () => {
|
|
1955
|
-
t.v = "", t.total = 0, o("update:modelValue", ""), o("change", ""), f();
|
|
1956
|
-
}, C = () => {
|
|
1957
|
-
o("blur");
|
|
1958
|
-
}, w = g(() => Number(e.max) || 0), _ = g(() => t.total === w.value ? "txt-red" : "txt-blue"), r = g(() => window.$getType(e.modelValue) === "Array"), p = g(() => window.$l("One per Line")), i = g(() => e.placeholder ? `${window.$l(e.placeholder)}
|
|
1959
|
-
${p.value}` : `${p.value}`), n = g(() => r.value ? e.modelValue.join(e.sep) : e.modelValue);
|
|
1960
|
-
return Me(() => {
|
|
1961
|
-
n.value && w.value ? n.value !== t.v && (t.v = n.value, O(n.value)) : (t.v = "", t.total = 0);
|
|
1962
|
-
}), V({
|
|
1963
|
-
toFocus: f
|
|
1964
|
-
}), (b, y) => {
|
|
1965
|
-
const h = I("el-input");
|
|
1966
|
-
return c(), M("div", xl, [
|
|
1967
|
-
e.loading ? (c(), M("div", Vl, [...y[1] || (y[1] = [
|
|
1968
|
-
u("i", { class: "imicon im-loading ani-rotate" }, null, -1)
|
|
1969
|
-
])])) : L("", !0),
|
|
1970
|
-
z(h, {
|
|
1971
|
-
ref: "input",
|
|
1972
|
-
modelValue: l(t).v,
|
|
1973
|
-
"onUpdate:modelValue": y[0] || (y[0] = (x) => l(t).v = x),
|
|
1974
|
-
rows: e.rows,
|
|
1975
|
-
resize: e.resize,
|
|
1976
|
-
type: "textarea",
|
|
1977
|
-
placeholder: b.$l(l(i)),
|
|
1978
|
-
class: K(["fullTextArea", b.$slots.prefix && "prefix"]),
|
|
1979
|
-
disabled: e.loading || e.disabled,
|
|
1980
|
-
onInput: O,
|
|
1981
|
-
onBlur: C
|
|
1982
|
-
}, null, 8, ["modelValue", "rows", "resize", "placeholder", "class", "disabled"]),
|
|
1983
|
-
l(w) > -1 ? (c(), M("div", {
|
|
1984
|
-
key: 1,
|
|
1985
|
-
class: K(["countArea abs fs12 txt-blue", e.rows > 1 && "lh20"])
|
|
1986
|
-
}, [
|
|
1987
|
-
u("span", {
|
|
1988
|
-
class: K(l(_))
|
|
1989
|
-
}, N(l(t).total), 3),
|
|
1990
|
-
y[2] || (y[2] = u("span", null, " / ", -1)),
|
|
1991
|
-
u("span", null, N(l(w)), 1)
|
|
1992
|
-
], 2)) : L("", !0),
|
|
1993
|
-
u("div", {
|
|
1994
|
-
class: K(["clearArea abs txt-dark3 hover-txt-red5", [l(t).v && "content"]]),
|
|
1995
|
-
onClick: D
|
|
1996
|
-
}, [...y[3] || (y[3] = [
|
|
1997
|
-
u("i", { class: "imicon im-close-circle" }, null, -1)
|
|
1998
|
-
])], 2),
|
|
1999
|
-
b.$slots.prefix ? (c(), M("div", {
|
|
2000
|
-
key: 2,
|
|
2001
|
-
class: "prefix abs l t",
|
|
2002
|
-
style: { padding: "6px 11px" },
|
|
2003
|
-
onClick: he((x) => null, ["stop"])
|
|
2004
|
-
}, [
|
|
2005
|
-
W(b.$slots, "prefix", {}, void 0, !0)
|
|
2006
|
-
])) : L("", !0)
|
|
2007
|
-
]);
|
|
2008
|
-
};
|
|
2009
|
-
}
|
|
2010
|
-
}), Al = /* @__PURE__ */ de(Dl, [["__scopeId", "data-v-005d323b"]]), Tl = E({
|
|
2011
|
-
name: "MvcFormItemFilter",
|
|
2012
|
-
setup: (T, V) => {
|
|
2013
|
-
const s = (e) => Array.isArray(e) ? e.filter((t) => t.children !== "v-if").map((t) => {
|
|
2014
|
-
var o, f;
|
|
2015
|
-
return t && (window.$getType(t.children) === "Array" ? t.children = s(t.children) : ((o = t.type) == null ? void 0 : o.name) === "ElFormItem" && (f = t.props) != null && f.label && (t.props.label = t.props.label.$l()), t);
|
|
2016
|
-
}) : [];
|
|
2017
|
-
return () => s(V.slots.default()[0].children);
|
|
2018
|
-
}
|
|
2019
|
-
}), Ml = { class: "MvcForm" }, Nl = E({
|
|
2020
|
-
name: "MvcForm"
|
|
2021
|
-
}), Il = /* @__PURE__ */ Object.assign(Nl, {
|
|
2022
|
-
props: {
|
|
2023
|
-
modelValue: {
|
|
2024
|
-
type: Object,
|
|
2025
|
-
default: /* @__PURE__ */ Object.create(null)
|
|
2026
|
-
},
|
|
2027
|
-
rules: {
|
|
2028
|
-
type: Object,
|
|
2029
|
-
default: /* @__PURE__ */ Object.create(null)
|
|
2030
|
-
},
|
|
2031
|
-
size: {
|
|
2032
|
-
type: String,
|
|
2033
|
-
default: "large"
|
|
2034
|
-
}
|
|
2035
|
-
},
|
|
2036
|
-
setup(T, { expose: V, emit: s }) {
|
|
2037
|
-
const e = T, t = H({
|
|
2038
|
-
form: {}
|
|
2039
|
-
}), { proxy: S } = ee(), o = s, f = async () => await S.$refs.form.validate() ? O() : !1, O = () => t.form, D = g(() => {
|
|
2040
|
-
const C = {};
|
|
2041
|
-
for (let w in e.rules)
|
|
2042
|
-
C[w] = e.rules[w].map((_) => (_.message && (_.message = window.$l(_.message)), _));
|
|
2043
|
-
return C;
|
|
2044
|
-
});
|
|
2045
|
-
return Z(
|
|
2046
|
-
() => t.form,
|
|
2047
|
-
(C) => {
|
|
2048
|
-
C && JSON.stringify(C) !== JSON.stringify(e.modelValue) && o("update:modelValue", C);
|
|
2049
|
-
},
|
|
2050
|
-
{
|
|
2051
|
-
deep: !0
|
|
2052
|
-
}
|
|
2053
|
-
), Z(
|
|
2054
|
-
() => e.modelValue,
|
|
2055
|
-
(C) => {
|
|
2056
|
-
C && JSON.stringify(C) !== JSON.stringify(t.form) && (t.form = C);
|
|
2057
|
-
},
|
|
2058
|
-
{
|
|
2059
|
-
immediate: !0,
|
|
2060
|
-
deep: !0
|
|
2061
|
-
}
|
|
2062
|
-
), V({
|
|
2063
|
-
validate: f
|
|
2064
|
-
}), (C, w) => {
|
|
2065
|
-
const _ = I("el-form");
|
|
2066
|
-
return c(), M("div", Ml, [
|
|
2067
|
-
z(_, {
|
|
2068
|
-
ref: "form",
|
|
2069
|
-
model: l(t).form,
|
|
2070
|
-
rules: l(D),
|
|
2071
|
-
size: e.size,
|
|
2072
|
-
"validate-on-rule-change": !1,
|
|
2073
|
-
"label-position": "top"
|
|
2074
|
-
}, {
|
|
2075
|
-
default: $(() => [
|
|
2076
|
-
z(l(Tl), null, {
|
|
2077
|
-
default: $(() => [
|
|
2078
|
-
W(C.$slots, "default")
|
|
2079
|
-
]),
|
|
2080
|
-
_: 3
|
|
2081
|
-
})
|
|
2082
|
-
]),
|
|
2083
|
-
_: 3
|
|
2084
|
-
}, 8, ["model", "rules", "size"])
|
|
2085
|
-
]);
|
|
2086
|
-
};
|
|
2087
|
-
}
|
|
2088
|
-
}), zl = { class: "SuperAiApp relative" }, Bl = { class: "flexMode vc g8" }, jl = { class: "txt-nowrap" }, Ll = { class: "txt-dark5" }, Yl = E({
|
|
2089
|
-
name: "SuperAiApp"
|
|
2090
|
-
}), El = /* @__PURE__ */ Object.assign(Yl, {
|
|
2091
|
-
props: {
|
|
2092
|
-
modelValue: {
|
|
2093
|
-
type: Number,
|
|
2094
|
-
default: null
|
|
2095
|
-
},
|
|
2096
|
-
multiple: {
|
|
2097
|
-
type: Boolean,
|
|
2098
|
-
default: !1
|
|
2099
|
-
},
|
|
2100
|
-
placeholder: {
|
|
2101
|
-
type: String,
|
|
2102
|
-
default: ""
|
|
2103
|
-
},
|
|
2104
|
-
useDefault: {
|
|
2105
|
-
type: Boolean,
|
|
2106
|
-
default: !1
|
|
2107
|
-
}
|
|
2108
|
-
},
|
|
2109
|
-
emits: [
|
|
2110
|
-
"success",
|
|
2111
|
-
"update:icon",
|
|
2112
|
-
"update:orgs",
|
|
2113
|
-
"update:name"
|
|
2114
|
-
],
|
|
2115
|
-
setup(T, { emit: V }) {
|
|
2116
|
-
const s = T, e = H({
|
|
2117
|
-
loading: !1,
|
|
2118
|
-
single: "",
|
|
2119
|
-
multiple: [],
|
|
2120
|
-
options: []
|
|
2121
|
-
}), S = pe("store").ai();
|
|
2122
|
-
ue(() => {
|
|
2123
|
-
f();
|
|
2124
|
-
});
|
|
2125
|
-
const o = V, f = async () => {
|
|
2126
|
-
if (D.value.length) {
|
|
2127
|
-
o("success");
|
|
2128
|
-
return;
|
|
2129
|
-
}
|
|
2130
|
-
e.loading = !0, await S.getAppOptions(), e.loading = !1, o("success");
|
|
2131
|
-
}, O = (_) => {
|
|
2132
|
-
o("update:modelValue", _);
|
|
2133
|
-
const { data: r } = S.appOptions.filter1((p) => p.id === e.single);
|
|
2134
|
-
r && (o("update:name", r.name), o("update:icon", r.icon), o("update:orgs", r.orgs));
|
|
2135
|
-
}, D = g(() => S.appOptions), C = g(() => s.placeholder ? window.$l(s.placeholder) : window.$l("App")), w = g(() => D.value.filter1((r) => r.id === e.single).data);
|
|
2136
|
-
return Z(
|
|
2137
|
-
() => s.modelValue,
|
|
2138
|
-
(_) => {
|
|
2139
|
-
_ && _ !== e.v && (e.single = _, O(_));
|
|
2140
|
-
},
|
|
2141
|
-
{
|
|
2142
|
-
immediate: !0
|
|
2143
|
-
}
|
|
2144
|
-
), Z(
|
|
2145
|
-
() => D.value,
|
|
2146
|
-
(_) => {
|
|
2147
|
-
s.useDefault && (_ == null ? void 0 : _.length) === 1 && (e.single = _[0].id, O(_[0].id));
|
|
2148
|
-
},
|
|
2149
|
-
{
|
|
2150
|
-
immediate: !0
|
|
2151
|
-
}
|
|
2152
|
-
), (_, r) => {
|
|
2153
|
-
const p = I("IconLoading"), i = I("Image"), n = I("el-option"), b = I("el-select");
|
|
2154
|
-
return c(), M("div", zl, [
|
|
2155
|
-
l(e).loading ? (c(), Y(p, { key: 0 })) : L("", !0),
|
|
2156
|
-
z(b, Q({
|
|
2157
|
-
modelValue: l(e).single,
|
|
2158
|
-
"onUpdate:modelValue": r[0] || (r[0] = (y) => l(e).single = y),
|
|
2159
|
-
placeholder: l(C),
|
|
2160
|
-
filterable: "",
|
|
2161
|
-
clearable: "",
|
|
2162
|
-
"default-first-option": "",
|
|
2163
|
-
"fit-input-width": ""
|
|
2164
|
-
}, _.$attrs, { onChange: O }), oe({
|
|
2165
|
-
default: $(() => [
|
|
2166
|
-
(c(!0), M(re, null, ie(l(D), (y, h) => (c(), Y(n, {
|
|
2167
|
-
key: h,
|
|
2168
|
-
label: y.label,
|
|
2169
|
-
value: y.id
|
|
2170
|
-
}, {
|
|
2171
|
-
default: $(() => [
|
|
2172
|
-
u("div", Bl, [
|
|
2173
|
-
z(i, {
|
|
2174
|
-
src: y.icon,
|
|
2175
|
-
class: "noShrink w24 h24 radius radius4 border-dark1"
|
|
2176
|
-
}, null, 8, ["src"]),
|
|
2177
|
-
u("span", jl, N(y.name), 1),
|
|
2178
|
-
u("span", Ll, "(" + N(y.id) + ")", 1)
|
|
2179
|
-
])
|
|
2180
|
-
]),
|
|
2181
|
-
_: 2
|
|
2182
|
-
}, 1032, ["label", "value"]))), 128))
|
|
2183
|
-
]),
|
|
2184
|
-
_: 2
|
|
2185
|
-
}, [
|
|
2186
|
-
l(w) ? {
|
|
2187
|
-
name: "prefix",
|
|
2188
|
-
fn: $(() => [
|
|
2189
|
-
z(i, {
|
|
2190
|
-
src: l(w).icon,
|
|
2191
|
-
class: "noShrink w24 h24 radius radius4 border-dark1"
|
|
2192
|
-
}, null, 8, ["src"])
|
|
2193
|
-
]),
|
|
2194
|
-
key: "0"
|
|
2195
|
-
} : void 0
|
|
2196
|
-
]), 1040, ["modelValue", "placeholder"])
|
|
2197
|
-
]);
|
|
2198
|
-
};
|
|
2199
|
-
}
|
|
2200
|
-
}), Rl = { class: "SuperAsaOrg relative" }, Fl = { class: "inputGroup" }, Pl = { class: "inputGroupLeft noShrink" }, Ul = { class: "flexMode vc g4" }, Gl = { class: "txt-dark5" }, Hl = E({
|
|
2201
|
-
name: "SuperAsaOrg"
|
|
2202
|
-
}), Jl = /* @__PURE__ */ Object.assign(Hl, {
|
|
2203
|
-
props: {
|
|
2204
|
-
app: {
|
|
2205
|
-
type: Number,
|
|
2206
|
-
default: 0
|
|
2207
|
-
},
|
|
2208
|
-
changeImmediately: {
|
|
2209
|
-
type: Boolean,
|
|
2210
|
-
default: !1
|
|
2211
|
-
},
|
|
2212
|
-
modelValue: {
|
|
2213
|
-
type: [Number, String],
|
|
2214
|
-
default: 0
|
|
2215
|
-
},
|
|
2216
|
-
readonly: {
|
|
2217
|
-
type: Boolean,
|
|
2218
|
-
default: !1
|
|
2219
|
-
},
|
|
2220
|
-
unTimezone: {
|
|
2221
|
-
type: Boolean,
|
|
2222
|
-
default: !1
|
|
2223
|
-
}
|
|
2224
|
-
},
|
|
2225
|
-
emits: [
|
|
2226
|
-
"update:modelValue",
|
|
2227
|
-
"update:name",
|
|
2228
|
-
"update:currency",
|
|
2229
|
-
"update:readonly",
|
|
2230
|
-
"success",
|
|
2231
|
-
"error",
|
|
2232
|
-
"change"
|
|
2233
|
-
],
|
|
2234
|
-
setup(T, { emit: V }) {
|
|
2235
|
-
const s = T, e = H({
|
|
2236
|
-
loading: !1,
|
|
2237
|
-
single: "",
|
|
2238
|
-
multiple: [],
|
|
2239
|
-
options: []
|
|
2240
|
-
}), S = pe("store").ai();
|
|
2241
|
-
ue(() => {
|
|
2242
|
-
f();
|
|
2243
|
-
});
|
|
2244
|
-
const o = V, f = async () => {
|
|
2245
|
-
_.value.length ? (e.single || O(_.value[0].id), o("success")) : o("error");
|
|
2246
|
-
}, O = (i) => {
|
|
2247
|
-
var n, b, y, h;
|
|
2248
|
-
o("update:modelValue", i), o("update:name", (n = r.value) == null ? void 0 : n.name), o("update:currency", (b = r.value) == null ? void 0 : b.currency), o("update:timezone", (y = r.value) == null ? void 0 : y.timezone), o("update:readonly", (h = r.value) == null ? void 0 : h.readonly), s.changeImmediately && o("change", i), s.unTimezone || D();
|
|
2249
|
-
}, D = () => {
|
|
2250
|
-
var n;
|
|
2251
|
-
let i = r.value;
|
|
2252
|
-
S.saveData("accountTimezone", {
|
|
2253
|
-
timezoneName: i == null ? void 0 : i.timezone,
|
|
2254
|
-
tip: "Account",
|
|
2255
|
-
timezone: (n = fe("common.timezone").filter1(
|
|
2256
|
-
(b) => b.label === (i == null ? void 0 : i.timezone)
|
|
2257
|
-
).data) == null ? void 0 : n.value
|
|
2258
|
-
});
|
|
2259
|
-
}, C = () => {
|
|
2260
|
-
e.single = "", o("update:modelValue", ""), o("update:name", ""), o("update:currency", ""), o("update:timezone", ""), o("update:readonly", !1);
|
|
2261
|
-
}, w = g(() => window.$l("Campaign Group")), _ = g(() => {
|
|
2262
|
-
var i;
|
|
2263
|
-
return s.app ? ((i = S.appOptions.filter1((n) => n.id === s.app).data) == null ? void 0 : i.orgs) || [] : [];
|
|
2264
|
-
}), r = g(() => _.value.filter1((i) => i.id === e.single).data), p = g(() => !s.app);
|
|
2265
|
-
return Z(
|
|
2266
|
-
() => s.modelValue,
|
|
2267
|
-
(i) => {
|
|
2268
|
-
i ? i !== e.single && (e.single = i, O(i)) : C();
|
|
2269
|
-
},
|
|
2270
|
-
{
|
|
2271
|
-
immediate: !0
|
|
2272
|
-
}
|
|
2273
|
-
), (i, n) => {
|
|
2274
|
-
const b = I("IconLoading"), y = I("el-button"), h = I("el-option"), x = I("el-select");
|
|
2275
|
-
return c(), M("div", Rl, [
|
|
2276
|
-
l(e).loading ? (c(), Y(b, { key: 0 })) : L("", !0),
|
|
2277
|
-
u("div", Fl, [
|
|
2278
|
-
u("div", Pl, [
|
|
2279
|
-
z(y, {
|
|
2280
|
-
circle: "",
|
|
2281
|
-
onClick: n[0] || (n[0] = (k) => i.$copy(l(e).single, "ID"))
|
|
2282
|
-
}, {
|
|
2283
|
-
icon: $(() => [...n[2] || (n[2] = [
|
|
2284
|
-
u("i", { class: "imicon im-copy" }, null, -1)
|
|
2285
|
-
])]),
|
|
2286
|
-
_: 1
|
|
2287
|
-
})
|
|
2288
|
-
]),
|
|
2289
|
-
z(x, Q({
|
|
2290
|
-
modelValue: l(e).single,
|
|
2291
|
-
"onUpdate:modelValue": n[1] || (n[1] = (k) => l(e).single = k),
|
|
2292
|
-
placeholder: l(w),
|
|
2293
|
-
disabled: l(p),
|
|
2294
|
-
filterable: ""
|
|
2295
|
-
}, i.$attrs, {
|
|
2296
|
-
class: "inputGroupRight",
|
|
2297
|
-
onChange: O
|
|
2298
|
-
}), {
|
|
2299
|
-
default: $(() => [
|
|
2300
|
-
(c(!0), M(re, null, ie(l(_), (k, B) => (c(), Y(h, {
|
|
2301
|
-
key: B,
|
|
2302
|
-
label: `${k.name} (${k.id})`,
|
|
2303
|
-
value: k.id,
|
|
2304
|
-
disabled: s.readonly && k.readonly
|
|
2305
|
-
}, {
|
|
2306
|
-
default: $(() => [
|
|
2307
|
-
u("div", Ul, [
|
|
2308
|
-
u("i", {
|
|
2309
|
-
class: K(["imicon", k.readonly ? "" : "im-writing"])
|
|
2310
|
-
}, null, 2),
|
|
2311
|
-
u("span", null, N(k.name), 1),
|
|
2312
|
-
u("span", Gl, "(" + N(k.id) + ")", 1)
|
|
2313
|
-
])
|
|
2314
|
-
]),
|
|
2315
|
-
_: 2
|
|
2316
|
-
}, 1032, ["label", "value", "disabled"]))), 128))
|
|
2317
|
-
]),
|
|
2318
|
-
_: 1
|
|
2319
|
-
}, 16, ["modelValue", "placeholder", "disabled"])
|
|
2320
|
-
])
|
|
2321
|
-
]);
|
|
2322
|
-
};
|
|
2323
|
-
}
|
|
2324
|
-
}), Kl = { class: "SuperAsaAdGroup relative" }, Wl = { class: "flexMode vc g8" }, ql = { class: "flexMode vc hb h30" }, Zl = { class: "outsideIgnore" }, Ql = { class: "flexMode hr outsideIgnore" }, Xl = {
|
|
2325
|
-
key: 2,
|
|
2326
|
-
class: "inputGroup"
|
|
2327
|
-
}, eo = { class: "inputGroupLeft noShrink" }, to = { class: "flexMode vc g8" }, lo = E({
|
|
2328
|
-
name: "SuperAsaAdGroup"
|
|
2329
|
-
}), oo = /* @__PURE__ */ Object.assign(lo, {
|
|
2330
|
-
props: {
|
|
2331
|
-
modelValue: {
|
|
2332
|
-
type: [Number, Array],
|
|
2333
|
-
default: 0
|
|
2334
|
-
},
|
|
2335
|
-
app: {
|
|
2336
|
-
type: [Number, Array],
|
|
2337
|
-
default: 0
|
|
2338
|
-
},
|
|
2339
|
-
org: {
|
|
2340
|
-
type: [String, Number, Array],
|
|
2341
|
-
default: 0
|
|
2342
|
-
},
|
|
2343
|
-
campaign: {
|
|
2344
|
-
type: [String, Number, Array],
|
|
2345
|
-
default: 0
|
|
2346
|
-
},
|
|
2347
|
-
multiple: {
|
|
2348
|
-
type: Boolean,
|
|
2349
|
-
default: !1
|
|
2350
|
-
},
|
|
2351
|
-
value: {
|
|
2352
|
-
type: String,
|
|
2353
|
-
default: "id"
|
|
2354
|
-
},
|
|
2355
|
-
special: {
|
|
2356
|
-
type: Boolean,
|
|
2357
|
-
default: !1
|
|
2358
|
-
},
|
|
2359
|
-
confirmAction: {
|
|
2360
|
-
type: Boolean,
|
|
2361
|
-
default: !1
|
|
2362
|
-
},
|
|
2363
|
-
useex: {
|
|
2364
|
-
type: Boolean,
|
|
2365
|
-
default: !1
|
|
2366
|
-
}
|
|
2367
|
-
},
|
|
2368
|
-
emits: [
|
|
2369
|
-
"change",
|
|
2370
|
-
"confirm",
|
|
2371
|
-
"update:modelValue",
|
|
2372
|
-
"update:name"
|
|
2373
|
-
],
|
|
2374
|
-
setup(T, { expose: V, emit: s }) {
|
|
2375
|
-
const e = T, t = H({
|
|
2376
|
-
loading: !1,
|
|
2377
|
-
single: "",
|
|
2378
|
-
multiple: [],
|
|
2379
|
-
options: [],
|
|
2380
|
-
filterTxt: ""
|
|
2381
|
-
}), { proxy: S } = ee(), o = s, f = async () => {
|
|
2382
|
-
const h = window.$getType(e.campaign);
|
|
2383
|
-
let x;
|
|
2384
|
-
if (h === "Array" ? x = e.campaign.join(",") : x = e.campaign.toString(), !x)
|
|
2385
|
-
return;
|
|
2386
|
-
t.loading = !0;
|
|
2387
|
-
const { code: k, data: B } = await window.$post({
|
|
2388
|
-
url: window.$api.asa.adGroupOptions,
|
|
2389
|
-
data: {
|
|
2390
|
-
appId: e.app,
|
|
2391
|
-
orgId: e.org,
|
|
2392
|
-
campaignId: x
|
|
2393
|
-
},
|
|
2394
|
-
ex: e.useex ? +/* @__PURE__ */ new Date() : null
|
|
2395
|
-
});
|
|
2396
|
-
if (t.loading = !1, k === 200) {
|
|
2397
|
-
let A;
|
|
2398
|
-
e.permission ? A = B.filter((a) => a.permission === e.permission) : A = B, t.options = A.map((a) => (a.sort = fe("statusMap")[a.status].sort, a.ca = `${a.campaignId}_${a.id}`, a.oca = `${a.orgId}_${a.valueCA}`, a)).sort((a, d) => a.sort - d.sort);
|
|
2399
|
-
}
|
|
2400
|
-
if (e.multiple && e.modelValue && e.modelValue.length > 0) {
|
|
2401
|
-
const A = e.modelValue.map((a) => {
|
|
2402
|
-
const { data: d } = t.options.filter1((m) => m[e.value] === a);
|
|
2403
|
-
return d ? d.name : `Unknown Name ${a}`;
|
|
2404
|
-
});
|
|
2405
|
-
o("update:name", A);
|
|
2406
|
-
}
|
|
2407
|
-
!e.multiple && i.value && o("update:name", i.value.name);
|
|
2408
|
-
}, O = (h) => {
|
|
2409
|
-
t.filterTxt = h;
|
|
2410
|
-
}, D = () => {
|
|
2411
|
-
S.$refs.multipleSelect.blur(), e.confirmAction && o("confirm");
|
|
2412
|
-
}, C = (h) => {
|
|
2413
|
-
const x = h.map((k) => {
|
|
2414
|
-
const { data: B } = t.options.filter1((A) => A[e.value] === k);
|
|
2415
|
-
return B ? B.name : `Unknown Name ${k}`;
|
|
2416
|
-
});
|
|
2417
|
-
o("update:modelValue", t.multiple), o("update:name", x), o("change", h);
|
|
2418
|
-
}, w = () => {
|
|
2419
|
-
o("update:modelValue", t.single), o("update:name", i.value.name), o("change", t.single);
|
|
2420
|
-
}, _ = () => {
|
|
2421
|
-
t.multiple = t.multiple.concat(n.value.map((h) => h[e.value])), o("update:modelValue", t.multiple);
|
|
2422
|
-
}, r = () => {
|
|
2423
|
-
f();
|
|
2424
|
-
}, p = g(() => window.$l("Ad Group")), i = g(() => t.single ? t.options.filter1((h) => h[e.value] === t.single).data : ""), n = g(() => t.filterTxt ? t.options.filter((h) => h.name.includes(t.filterTxt)) : t.options), b = g(() => n.value.length), y = g(() => {
|
|
2425
|
-
var k, B;
|
|
2426
|
-
let h = !1;
|
|
2427
|
-
const x = window.$getType(e.campaign);
|
|
2428
|
-
return e.multiple && x === "Array" ? h = e.special ? ((k = e.campaign) == null ? void 0 : k.length) !== 1 : !((B = e.campaign) != null && B.length) : h = !e.campaign, h;
|
|
2429
|
-
});
|
|
2430
|
-
return Z(
|
|
2431
|
-
() => e.campaign,
|
|
2432
|
-
(h, x) => {
|
|
2433
|
-
const k = window.$getType(h);
|
|
2434
|
-
e.multiple ? (k === "Array" && h.length || k === "Number" && h) && f() : h && h !== x && f();
|
|
2435
|
-
},
|
|
2436
|
-
{
|
|
2437
|
-
immediate: !0
|
|
2438
|
-
}
|
|
2439
|
-
), Z(
|
|
2440
|
-
() => e.modelValue,
|
|
2441
|
-
(h) => {
|
|
2442
|
-
e.multiple ? JSON.stringify(t.single) !== JSON.stringify(h) && (t.multiple = h) : h ? t.single !== h && (t.single = h) : t.single = "";
|
|
2443
|
-
},
|
|
2444
|
-
{
|
|
2445
|
-
immediate: !0
|
|
2446
|
-
}
|
|
2447
|
-
), V({
|
|
2448
|
-
reload: r
|
|
2449
|
-
}), (h, x) => {
|
|
2450
|
-
const k = I("IconLoading"), B = I("StatusItem"), A = I("el-button"), a = I("el-tag"), d = I("el-select-v2");
|
|
2451
|
-
return c(), M("div", Kl, [
|
|
2452
|
-
l(t).loading ? (c(), Y(k, { key: 0 })) : L("", !0),
|
|
2453
|
-
e.multiple ? (c(), Y(d, Q({
|
|
2454
|
-
key: 1,
|
|
2455
|
-
ref: "multipleSelect",
|
|
2456
|
-
modelValue: l(t).multiple,
|
|
2457
|
-
"onUpdate:modelValue": x[0] || (x[0] = (m) => l(t).multiple = m),
|
|
2458
|
-
placeholder: l(p),
|
|
2459
|
-
clearable: "",
|
|
2460
|
-
filterable: "",
|
|
2461
|
-
multiple: "",
|
|
2462
|
-
"collapse-tags": "",
|
|
2463
|
-
"collapse-tags-tooltip": ""
|
|
2464
|
-
}, h.$attrs, {
|
|
2465
|
-
options: l(n),
|
|
2466
|
-
disabled: l(y),
|
|
2467
|
-
"filter-method": O,
|
|
2468
|
-
props: {
|
|
2469
|
-
label: "name",
|
|
2470
|
-
value: e.value
|
|
2471
|
-
},
|
|
2472
|
-
onChange: C
|
|
2473
|
-
}), {
|
|
2474
|
-
default: $(({ item: m }) => [
|
|
2475
|
-
u("div", Wl, [
|
|
2476
|
-
z(B, {
|
|
2477
|
-
status: m.status,
|
|
2478
|
-
nolabel: ""
|
|
2479
|
-
}, null, 8, ["status"]),
|
|
2480
|
-
u("span", null, N(m.name), 1)
|
|
2481
|
-
])
|
|
2482
|
-
]),
|
|
2483
|
-
header: $(() => [
|
|
2484
|
-
u("div", ql, [
|
|
2485
|
-
u("div", Zl, [
|
|
2486
|
-
z(A, {
|
|
2487
|
-
onClick: _,
|
|
2488
|
-
size: "small",
|
|
2489
|
-
class: "outsideIgnore"
|
|
2490
|
-
}, {
|
|
2491
|
-
default: $(() => [
|
|
2492
|
-
ae(N(h.$l("Select All")), 1)
|
|
2493
|
-
]),
|
|
2494
|
-
_: 1
|
|
2495
|
-
})
|
|
2496
|
-
]),
|
|
2497
|
-
z(a, {
|
|
2498
|
-
type: "info",
|
|
2499
|
-
effect: "light",
|
|
2500
|
-
round: "",
|
|
2501
|
-
size: "small",
|
|
2502
|
-
class: "noevent"
|
|
2503
|
-
}, {
|
|
2504
|
-
default: $(() => [
|
|
2505
|
-
ae(N(l(b)), 1)
|
|
2506
|
-
]),
|
|
2507
|
-
_: 1
|
|
2508
|
-
})
|
|
2509
|
-
])
|
|
2510
|
-
]),
|
|
2511
|
-
footer: $(() => [
|
|
2512
|
-
u("div", Ql, [
|
|
2513
|
-
z(A, {
|
|
2514
|
-
type: "primary",
|
|
2515
|
-
onClick: he(D, ["stop"])
|
|
2516
|
-
}, {
|
|
2517
|
-
default: $(() => [
|
|
2518
|
-
ae(N(h.$l("Confirm")), 1)
|
|
2519
|
-
]),
|
|
2520
|
-
_: 1
|
|
2521
|
-
})
|
|
2522
|
-
])
|
|
2523
|
-
]),
|
|
2524
|
-
_: 1
|
|
2525
|
-
}, 16, ["modelValue", "placeholder", "options", "disabled", "props"])) : (c(), M("div", Xl, [
|
|
2526
|
-
u("div", eo, [
|
|
2527
|
-
z(A, {
|
|
2528
|
-
circle: "",
|
|
2529
|
-
onClick: x[1] || (x[1] = (m) => h.$copy(l(t).single, "ID"))
|
|
2530
|
-
}, {
|
|
2531
|
-
icon: $(() => [...x[3] || (x[3] = [
|
|
2532
|
-
u("i", { class: "imicon im-copy" }, null, -1)
|
|
2533
|
-
])]),
|
|
2534
|
-
_: 1
|
|
2535
|
-
})
|
|
2536
|
-
]),
|
|
2537
|
-
z(d, Q({
|
|
2538
|
-
modelValue: l(t).single,
|
|
2539
|
-
"onUpdate:modelValue": x[2] || (x[2] = (m) => l(t).single = m),
|
|
2540
|
-
placeholder: l(p),
|
|
2541
|
-
clearable: "",
|
|
2542
|
-
filterable: ""
|
|
2543
|
-
}, h.$attrs, {
|
|
2544
|
-
options: l(n),
|
|
2545
|
-
disabled: l(y),
|
|
2546
|
-
props: {
|
|
2547
|
-
label: "name",
|
|
2548
|
-
value: e.value
|
|
2549
|
-
},
|
|
2550
|
-
class: "inputGroupRight",
|
|
2551
|
-
onChange: w
|
|
2552
|
-
}), oe({
|
|
2553
|
-
default: $(({ item: m }) => [
|
|
2554
|
-
u("div", to, [
|
|
2555
|
-
z(B, {
|
|
2556
|
-
status: m.status,
|
|
2557
|
-
nolabel: ""
|
|
2558
|
-
}, null, 8, ["status"]),
|
|
2559
|
-
u("span", null, N(m.name), 1)
|
|
2560
|
-
])
|
|
2561
|
-
]),
|
|
2562
|
-
_: 2
|
|
2563
|
-
}, [
|
|
2564
|
-
l(i) ? {
|
|
2565
|
-
name: "prefix",
|
|
2566
|
-
fn: $(() => [
|
|
2567
|
-
z(B, {
|
|
2568
|
-
status: l(i).status,
|
|
2569
|
-
nolabel: ""
|
|
2570
|
-
}, null, 8, ["status"])
|
|
2571
|
-
]),
|
|
2572
|
-
key: "0"
|
|
2573
|
-
} : void 0
|
|
2574
|
-
]), 1040, ["modelValue", "placeholder", "options", "disabled", "props"])
|
|
2575
|
-
]))
|
|
2576
|
-
]);
|
|
2577
|
-
};
|
|
2578
|
-
}
|
|
2579
|
-
}), ao = { class: "SuperAsaApp relative" }, no = { class: "flexMode vc g8" }, so = { class: "txt-nowrap" }, ro = { class: "txt-dark5" }, io = E({
|
|
2580
|
-
name: "SuperAsaApp"
|
|
2581
|
-
}), uo = /* @__PURE__ */ Object.assign(io, {
|
|
2582
|
-
props: {
|
|
2583
|
-
modelValue: {
|
|
2584
|
-
type: Number,
|
|
2585
|
-
default: null
|
|
2586
|
-
},
|
|
2587
|
-
loadData: {
|
|
2588
|
-
type: Boolean,
|
|
2589
|
-
default: !0
|
|
2590
|
-
},
|
|
2591
|
-
multiple: {
|
|
2592
|
-
type: Boolean,
|
|
2593
|
-
default: !1
|
|
2594
|
-
},
|
|
2595
|
-
placeholder: {
|
|
2596
|
-
type: String,
|
|
2597
|
-
default: ""
|
|
2598
|
-
},
|
|
2599
|
-
useDefault: {
|
|
2600
|
-
type: Boolean,
|
|
2601
|
-
default: !1
|
|
2602
|
-
},
|
|
2603
|
-
aiDefault: {
|
|
2604
|
-
type: Boolean,
|
|
2605
|
-
default: !1
|
|
2606
|
-
}
|
|
2607
|
-
},
|
|
2608
|
-
emits: [
|
|
2609
|
-
"change",
|
|
2610
|
-
"success",
|
|
2611
|
-
"update:icon",
|
|
2612
|
-
"update:orgs",
|
|
2613
|
-
"update:name"
|
|
2614
|
-
],
|
|
2615
|
-
setup(T, { emit: V }) {
|
|
2616
|
-
const s = T, e = H({
|
|
2617
|
-
loading: !1,
|
|
2618
|
-
single: "",
|
|
2619
|
-
multiple: [],
|
|
2620
|
-
options: []
|
|
2621
|
-
}), S = pe("store").asa();
|
|
2622
|
-
ue(() => {
|
|
2623
|
-
s.loadData && f();
|
|
2624
|
-
});
|
|
2625
|
-
const o = V, f = async () => {
|
|
2626
|
-
if (C.value.length) {
|
|
2627
|
-
o("success");
|
|
2628
|
-
return;
|
|
2629
|
-
}
|
|
2630
|
-
await S.getAppOptions(), o("success");
|
|
2631
|
-
}, O = (r) => {
|
|
2632
|
-
o("update:modelValue", r);
|
|
2633
|
-
const { data: p } = S.appOptions.filter1((i) => i.id === e.single);
|
|
2634
|
-
p && (o("update:name", p.name), o("update:icon", p.icon), o("update:orgs", p.orgs)), o("change", r);
|
|
2635
|
-
}, D = g(() => S.appLoading), C = g(() => S.appOptions), w = g(() => s.placeholder ? window.$l(s.placeholder) : window.$l("App")), _ = g(() => C.value.filter1((p) => p.id === e.single).data);
|
|
2636
|
-
return Z(
|
|
2637
|
-
() => s.modelValue,
|
|
2638
|
-
(r) => {
|
|
2639
|
-
r && r !== e.v && (e.single = r, O(r));
|
|
2640
|
-
},
|
|
2641
|
-
{
|
|
2642
|
-
immediate: !0
|
|
2643
|
-
}
|
|
2644
|
-
), Z(
|
|
2645
|
-
() => C.value,
|
|
2646
|
-
(r) => {
|
|
2647
|
-
(s.useDefault && (r == null ? void 0 : r.length) === 1 || s.aiDefault && r.length > 0) && (e.single = r[0].id, O(r[0].id));
|
|
2648
|
-
},
|
|
2649
|
-
{
|
|
2650
|
-
immediate: !0
|
|
2651
|
-
}
|
|
2652
|
-
), (r, p) => {
|
|
2653
|
-
const i = I("IconLoading"), n = I("Image"), b = I("el-option"), y = I("el-select");
|
|
2654
|
-
return c(), M("div", ao, [
|
|
2655
|
-
l(D) ? (c(), Y(i, { key: 0 })) : L("", !0),
|
|
2656
|
-
z(y, Q({
|
|
2657
|
-
modelValue: l(e).single,
|
|
2658
|
-
"onUpdate:modelValue": p[0] || (p[0] = (h) => l(e).single = h),
|
|
2659
|
-
placeholder: l(w),
|
|
2660
|
-
filterable: "",
|
|
2661
|
-
clearable: "",
|
|
2662
|
-
"default-first-option": "",
|
|
2663
|
-
"fit-input-width": ""
|
|
2664
|
-
}, r.$attrs, { onChange: O }), oe({
|
|
2665
|
-
default: $(() => [
|
|
2666
|
-
(c(!0), M(re, null, ie(l(C), (h, x) => (c(), Y(b, {
|
|
2667
|
-
key: x,
|
|
2668
|
-
label: h.label,
|
|
2669
|
-
value: h.id
|
|
2670
|
-
}, {
|
|
2671
|
-
default: $(() => [
|
|
2672
|
-
u("div", no, [
|
|
2673
|
-
z(n, {
|
|
2674
|
-
src: h.icon,
|
|
2675
|
-
class: "noShrink w24 h24 radius radius4 border-dark1"
|
|
2676
|
-
}, null, 8, ["src"]),
|
|
2677
|
-
u("span", so, N(h.name), 1),
|
|
2678
|
-
u("span", ro, "(" + N(h.id) + ")", 1)
|
|
2679
|
-
])
|
|
2680
|
-
]),
|
|
2681
|
-
_: 2
|
|
2682
|
-
}, 1032, ["label", "value"]))), 128))
|
|
2683
|
-
]),
|
|
2684
|
-
_: 2
|
|
2685
|
-
}, [
|
|
2686
|
-
l(_) ? {
|
|
2687
|
-
name: "prefix",
|
|
2688
|
-
fn: $(() => [
|
|
2689
|
-
z(n, {
|
|
2690
|
-
src: l(_).icon,
|
|
2691
|
-
class: "noShrink w24 h24 radius radius4 border-dark1"
|
|
2692
|
-
}, null, 8, ["src"])
|
|
2693
|
-
]),
|
|
2694
|
-
key: "0"
|
|
2695
|
-
} : void 0
|
|
2696
|
-
]), 1040, ["modelValue", "placeholder"])
|
|
2697
|
-
]);
|
|
2698
|
-
};
|
|
2699
|
-
}
|
|
2700
|
-
}), co = { class: "SuperAsaCampaign relative" }, po = { class: "outsideIgnore" }, mo = { class: "flexMode vc g8" }, fo = {
|
|
2701
|
-
key: 0,
|
|
2702
|
-
class: "imicon im-writing"
|
|
2703
|
-
}, go = { class: "txt-nowrap" }, yo = { class: "flexMode hr outsideIgnore" }, ho = {
|
|
2704
|
-
key: 2,
|
|
2705
|
-
class: "inputGroup"
|
|
2706
|
-
}, _o = { class: "inputGroupLeft noShrink" }, bo = { class: "flexMode vc g8" }, vo = {
|
|
2707
|
-
key: 0,
|
|
2708
|
-
class: "imicon im-writing"
|
|
2709
|
-
}, $o = { class: "txt-nowrap" }, wo = E({
|
|
2710
|
-
name: "SuperAsaCampaign"
|
|
2711
|
-
}), So = /* @__PURE__ */ Object.assign(wo, {
|
|
2712
|
-
props: {
|
|
2713
|
-
modelValue: {
|
|
2714
|
-
type: [Array, Number],
|
|
2715
|
-
defualt: 0
|
|
2716
|
-
},
|
|
2717
|
-
app: {
|
|
2718
|
-
type: [Number, Array],
|
|
2719
|
-
default: 0
|
|
2720
|
-
},
|
|
2721
|
-
org: {
|
|
2722
|
-
type: [String, Number, Array],
|
|
2723
|
-
default: 0
|
|
2724
|
-
},
|
|
2725
|
-
value: {
|
|
2726
|
-
type: String,
|
|
2727
|
-
default: "id"
|
|
2728
|
-
},
|
|
2729
|
-
multiple: {
|
|
2730
|
-
type: Boolean,
|
|
2731
|
-
default: !1
|
|
2732
|
-
},
|
|
2733
|
-
useex: {
|
|
2734
|
-
type: Boolean,
|
|
2735
|
-
default: !1
|
|
2736
|
-
},
|
|
2737
|
-
type: {
|
|
2738
|
-
type: String,
|
|
2739
|
-
default: "APPSTORE_SEARCH_RESULTS,APPSTORE_SEARCH_TAB,APPSTORE_TODAY_TAB,APPSTORE_PRODUCT_PAGES_BROWSE"
|
|
2740
|
-
},
|
|
2741
|
-
force: {
|
|
2742
|
-
type: Boolean,
|
|
2743
|
-
default: !1
|
|
2744
|
-
}
|
|
2745
|
-
},
|
|
2746
|
-
emits: [
|
|
2747
|
-
"change",
|
|
2748
|
-
"confirm",
|
|
2749
|
-
"update:modelValue",
|
|
2750
|
-
"update:name",
|
|
2751
|
-
"update:adplacement",
|
|
2752
|
-
"success"
|
|
2753
|
-
],
|
|
2754
|
-
setup(T, { expose: V, emit: s }) {
|
|
2755
|
-
const e = T, t = H({
|
|
2756
|
-
loading: !1,
|
|
2757
|
-
single: "",
|
|
2758
|
-
multiple: [],
|
|
2759
|
-
options: [],
|
|
2760
|
-
filterTxt: ""
|
|
2761
|
-
}), { proxy: S } = ee();
|
|
2762
|
-
pe("store").common();
|
|
2763
|
-
const f = s, O = async (A) => {
|
|
2764
|
-
t.loading = !0;
|
|
2765
|
-
const { code: a, data: d } = await window.$post({
|
|
2766
|
-
url: window.$api.asa.campaignOptions,
|
|
2767
|
-
data: {
|
|
2768
|
-
appId: e.app,
|
|
2769
|
-
orgId: e.org
|
|
2770
|
-
},
|
|
2771
|
-
ex: e.useex ? e.org : +/* @__PURE__ */ new Date()
|
|
2772
|
-
});
|
|
2773
|
-
t.loading = !1, a === 200 && (t.options = d.map((m) => (m.oc = `${m.orgId}_${m.id}`, m)).filter((m) => e.type.includes(m.adPlacement)), f("success", t.options));
|
|
2774
|
-
}, D = () => {
|
|
2775
|
-
S.$refs.multipleSelect.blur(), f("confirm");
|
|
2776
|
-
}, C = (A) => {
|
|
2777
|
-
f("update:modelValue", A), f("change", A);
|
|
2778
|
-
const a = {};
|
|
2779
|
-
y.value.filter((m) => A.indexOf(m.id) > -1).forEach((m) => {
|
|
2780
|
-
a[m.adChannelType] = !0;
|
|
2781
|
-
});
|
|
2782
|
-
const d = A.map((m) => {
|
|
2783
|
-
const { data: R } = y.value.filter1((U) => U[e.value] === m);
|
|
2784
|
-
return R ? R.name : `Unknown Name ${m}`;
|
|
2785
|
-
});
|
|
2786
|
-
f("update:name", d), f("update:ad-type", Object.keys(a));
|
|
2787
|
-
}, w = (A) => {
|
|
2788
|
-
var a, d;
|
|
2789
|
-
f("update:modelValue", A), f("update:adplacement", (a = b.value) == null ? void 0 : a.adPlacement), f("update:name", (d = b.value) == null ? void 0 : d.name), f("change", A);
|
|
2790
|
-
}, _ = (A) => {
|
|
2791
|
-
var a, d;
|
|
2792
|
-
f("update:modelValue", A), f("update:adplacement", (a = b.value) == null ? void 0 : a.adPlacement), f("update:name", (d = b.value) == null ? void 0 : d.name);
|
|
2793
|
-
}, r = () => {
|
|
2794
|
-
t.multiple = y.value.filter((A) => {
|
|
2795
|
-
if (A.hide === !1)
|
|
2796
|
-
return A;
|
|
2797
|
-
}).map((A) => A[e.value]), f("update:modelValue", t.multiple);
|
|
2798
|
-
}, p = (A) => {
|
|
2799
|
-
t.filterTxt = A;
|
|
2800
|
-
}, i = () => {
|
|
2801
|
-
O();
|
|
2802
|
-
}, n = g(() => window.$l("Campaign")), b = g(() => t.single ? t.options.filter1((A) => A[e.value] === t.single).data : ""), y = g(() => t.filterTxt ? t.options.map((A) => (A.name.includes(t.filterTxt) && e.type.includes(A.adPlacement) ? A.hide = !1 : A.hide = !0, A)) : t.options.map((a) => (e.type.includes(a.adPlacement) ? a.hide = !1 : a.hide = !0, a))), h = g(() => y.value.filter((A) => A.hide === !1).length), x = g(() => window.$getType(e.app) === "Array" ? e.app.join(",") : e.app), k = g(() => window.$getType(e.org) === "Array" ? e.org.join(",") : e.org);
|
|
2803
|
-
g(() => `${x.value} ${k.value}`), g(() => e.app && e.org);
|
|
2804
|
-
const B = g(() => !e.org);
|
|
2805
|
-
return Z(
|
|
2806
|
-
() => e.org,
|
|
2807
|
-
(A, a) => {
|
|
2808
|
-
A && A !== a && O();
|
|
2809
|
-
},
|
|
2810
|
-
{
|
|
2811
|
-
immediate: !0
|
|
2812
|
-
}
|
|
2813
|
-
), Z(
|
|
2814
|
-
() => e.modelValue,
|
|
2815
|
-
(A) => {
|
|
2816
|
-
e.multiple ? JSON.stringify(t.multiple) !== JSON.stringify(A) && (t.multiple = A) : t.single !== A && (t.single = A, _(A));
|
|
2817
|
-
},
|
|
2818
|
-
{
|
|
2819
|
-
immediate: !0
|
|
2820
|
-
}
|
|
2821
|
-
), Z(
|
|
2822
|
-
() => t.options,
|
|
2823
|
-
(A) => {
|
|
2824
|
-
A != null && A.length && !e.multiple && _(e.modelValue);
|
|
2825
|
-
},
|
|
2826
|
-
{
|
|
2827
|
-
immediate: !0
|
|
2828
|
-
}
|
|
2829
|
-
), V({
|
|
2830
|
-
reload: i
|
|
2831
|
-
}), (A, a) => {
|
|
2832
|
-
const d = I("IconLoading"), m = I("el-button"), R = I("el-tag"), U = I("StatusItem"), ne = I("MultipleSelect"), q = I("el-option"), se = I("el-select");
|
|
2833
|
-
return c(), M("div", co, [
|
|
2834
|
-
l(t).loading ? (c(), Y(d, { key: 0 })) : L("", !0),
|
|
2835
|
-
e.multiple ? (c(), Y(ne, Q({
|
|
2836
|
-
key: 1,
|
|
2837
|
-
ref: "multipleSelect",
|
|
2838
|
-
modelValue: l(t).multiple,
|
|
2839
|
-
"onUpdate:modelValue": a[0] || (a[0] = (F) => l(t).multiple = F),
|
|
2840
|
-
options: l(y),
|
|
2841
|
-
placeholder: A.$l(l(n)),
|
|
2842
|
-
clearable: "",
|
|
2843
|
-
label: "name",
|
|
2844
|
-
value: e.value,
|
|
2845
|
-
disabled: l(B),
|
|
2846
|
-
filterable: "",
|
|
2847
|
-
"filter-method": p,
|
|
2848
|
-
"collapse-tags": "",
|
|
2849
|
-
"collapse-tags-tooltip": ""
|
|
2850
|
-
}, A.$attrs, { onChange: C }), {
|
|
2851
|
-
header: $(() => [
|
|
2852
|
-
u("div", po, [
|
|
2853
|
-
l(t).filterTxt ? (c(), Y(m, {
|
|
2854
|
-
key: 0,
|
|
2855
|
-
onClick: r,
|
|
2856
|
-
class: "outsideIgnore"
|
|
2857
|
-
}, {
|
|
2858
|
-
default: $(() => [
|
|
2859
|
-
ae(N(A.$l("Select All")), 1)
|
|
2860
|
-
]),
|
|
2861
|
-
_: 1
|
|
2862
|
-
})) : L("", !0)
|
|
2863
|
-
]),
|
|
2864
|
-
z(R, {
|
|
2865
|
-
type: "info",
|
|
2866
|
-
effect: "light",
|
|
2867
|
-
round: "",
|
|
2868
|
-
size: "small",
|
|
2869
|
-
class: "noevent"
|
|
2870
|
-
}, {
|
|
2871
|
-
default: $(() => [
|
|
2872
|
-
ae(N(l(h)), 1)
|
|
2873
|
-
]),
|
|
2874
|
-
_: 1
|
|
2875
|
-
})
|
|
2876
|
-
]),
|
|
2877
|
-
default: $(({ it: F }) => [
|
|
2878
|
-
u("div", mo, [
|
|
2879
|
-
z(U, {
|
|
2880
|
-
status: F.status,
|
|
2881
|
-
nolabel: "",
|
|
2882
|
-
class: "noShrink"
|
|
2883
|
-
}, null, 8, ["status"]),
|
|
2884
|
-
F.readonly === !1 ? (c(), M("i", fo)) : L("", !0),
|
|
2885
|
-
u("span", go, N(F.name), 1)
|
|
2886
|
-
])
|
|
2887
|
-
]),
|
|
2888
|
-
footer: $(() => [
|
|
2889
|
-
u("div", yo, [
|
|
2890
|
-
z(m, {
|
|
2891
|
-
type: "primary",
|
|
2892
|
-
onClick: he(D, ["stop"])
|
|
2893
|
-
}, {
|
|
2894
|
-
default: $(() => [
|
|
2895
|
-
ae(N(A.$l("Confirm")), 1)
|
|
2896
|
-
]),
|
|
2897
|
-
_: 1
|
|
2898
|
-
})
|
|
2899
|
-
])
|
|
2900
|
-
]),
|
|
2901
|
-
_: 1
|
|
2902
|
-
}, 16, ["modelValue", "options", "placeholder", "value", "disabled"])) : (c(), M("div", ho, [
|
|
2903
|
-
u("div", _o, [
|
|
2904
|
-
z(m, {
|
|
2905
|
-
circle: "",
|
|
2906
|
-
onClick: a[1] || (a[1] = (F) => A.$copy(l(t).single, "ID"))
|
|
2907
|
-
}, {
|
|
2908
|
-
icon: $(() => [...a[3] || (a[3] = [
|
|
2909
|
-
u("i", { class: "imicon im-copy" }, null, -1)
|
|
2910
|
-
])]),
|
|
2911
|
-
_: 1
|
|
2912
|
-
})
|
|
2913
|
-
]),
|
|
2914
|
-
z(se, Q({
|
|
2915
|
-
modelValue: l(t).single,
|
|
2916
|
-
"onUpdate:modelValue": a[2] || (a[2] = (F) => l(t).single = F),
|
|
2917
|
-
placeholder: l(n),
|
|
2918
|
-
clearable: "",
|
|
2919
|
-
filterable: "",
|
|
2920
|
-
disabled: l(B)
|
|
2921
|
-
}, A.$attrs, {
|
|
2922
|
-
class: "inputGroupRight",
|
|
2923
|
-
onChange: w
|
|
2924
|
-
}), oe({
|
|
2925
|
-
default: $(() => [
|
|
2926
|
-
(c(!0), M(re, null, ie(l(y), (F, ce) => (c(), Y(q, {
|
|
2927
|
-
key: ce,
|
|
2928
|
-
label: F.name,
|
|
2929
|
-
value: F[e.value]
|
|
2930
|
-
}, {
|
|
2931
|
-
default: $(() => [
|
|
2932
|
-
u("div", bo, [
|
|
2933
|
-
z(U, {
|
|
2934
|
-
status: F.status,
|
|
2935
|
-
nolabel: "",
|
|
2936
|
-
class: "noShrink"
|
|
2937
|
-
}, null, 8, ["status"]),
|
|
2938
|
-
F.readonly === !1 ? (c(), M("i", vo)) : L("", !0),
|
|
2939
|
-
u("span", $o, N(F.name), 1)
|
|
2940
|
-
])
|
|
2941
|
-
]),
|
|
2942
|
-
_: 2
|
|
2943
|
-
}, 1032, ["label", "value"]))), 128))
|
|
2944
|
-
]),
|
|
2945
|
-
_: 2
|
|
2946
|
-
}, [
|
|
2947
|
-
l(b) ? {
|
|
2948
|
-
name: "prefix",
|
|
2949
|
-
fn: $(() => [
|
|
2950
|
-
z(U, {
|
|
2951
|
-
status: l(b).status,
|
|
2952
|
-
nolabel: "",
|
|
2953
|
-
class: "noShrink"
|
|
2954
|
-
}, null, 8, ["status"])
|
|
2955
|
-
]),
|
|
2956
|
-
key: "0"
|
|
2957
|
-
} : void 0
|
|
2958
|
-
]), 1040, ["modelValue", "placeholder", "disabled"])
|
|
2959
|
-
]))
|
|
2960
|
-
]);
|
|
2961
|
-
};
|
|
2962
|
-
}
|
|
2963
|
-
}), Co = { class: "SuperAsaOrg relative" }, ko = { class: "inputGroup" }, xo = { class: "inputGroupLeft noShrink" }, Vo = { class: "flexMode vc g4" }, Oo = { class: "txt-dark5" }, Do = E({
|
|
2964
|
-
name: "SuperAsaOrg"
|
|
2965
|
-
}), Ao = /* @__PURE__ */ Object.assign(Do, {
|
|
2966
|
-
props: {
|
|
2967
|
-
app: {
|
|
2968
|
-
type: Number,
|
|
2969
|
-
default: 0
|
|
2970
|
-
},
|
|
2971
|
-
changeImmediately: {
|
|
2972
|
-
type: Boolean,
|
|
2973
|
-
default: !1
|
|
2974
|
-
},
|
|
2975
|
-
modelValue: {
|
|
2976
|
-
type: [Number, String],
|
|
2977
|
-
default: 0
|
|
2978
|
-
},
|
|
2979
|
-
readonly: {
|
|
2980
|
-
type: Boolean,
|
|
2981
|
-
default: !1
|
|
2982
|
-
},
|
|
2983
|
-
unTimezone: {
|
|
2984
|
-
type: Boolean,
|
|
2985
|
-
default: !1
|
|
2986
|
-
}
|
|
2987
|
-
},
|
|
2988
|
-
emits: [
|
|
2989
|
-
"update:modelValue",
|
|
2990
|
-
"update:name",
|
|
2991
|
-
"update:currency",
|
|
2992
|
-
"update:readonly",
|
|
2993
|
-
"success",
|
|
2994
|
-
"error",
|
|
2995
|
-
"change"
|
|
2996
|
-
],
|
|
2997
|
-
setup(T, { emit: V }) {
|
|
2998
|
-
const s = T, e = H({
|
|
2999
|
-
loading: !1,
|
|
3000
|
-
single: "",
|
|
3001
|
-
multiple: [],
|
|
3002
|
-
options: []
|
|
3003
|
-
}), S = pe("store").asa();
|
|
3004
|
-
ue(() => {
|
|
3005
|
-
f();
|
|
3006
|
-
});
|
|
3007
|
-
const o = V, f = async () => {
|
|
3008
|
-
_.value.length ? (e.single || O(_.value[0].id), o("success")) : o("error");
|
|
3009
|
-
}, O = (i) => {
|
|
3010
|
-
var n, b, y, h;
|
|
3011
|
-
o("update:modelValue", i), o("update:name", (n = r.value) == null ? void 0 : n.name), o("update:currency", (b = r.value) == null ? void 0 : b.currency), o("update:timezone", (y = r.value) == null ? void 0 : y.timezone), o("update:readonly", (h = r.value) == null ? void 0 : h.readonly), s.changeImmediately && o("change", i), s.unTimezone || D();
|
|
3012
|
-
}, D = () => {
|
|
3013
|
-
var n;
|
|
3014
|
-
let i = r.value;
|
|
3015
|
-
S.saveData("accountTimezone", {
|
|
3016
|
-
timezoneName: i == null ? void 0 : i.timezone,
|
|
3017
|
-
tip: "Account",
|
|
3018
|
-
timezone: (n = fe("common.timezone").filter1(
|
|
3019
|
-
(b) => b.label === (i == null ? void 0 : i.timezone)
|
|
3020
|
-
).data) == null ? void 0 : n.value
|
|
3021
|
-
});
|
|
3022
|
-
}, C = () => {
|
|
3023
|
-
e.single = "", o("update:modelValue", ""), o("update:name", ""), o("update:currency", ""), o("update:timezone", ""), o("update:readonly", !1);
|
|
3024
|
-
}, w = g(() => window.$l("Campaign Group")), _ = g(() => {
|
|
3025
|
-
var i;
|
|
3026
|
-
return s.app ? ((i = S.appOptions.filter1((n) => n.id === s.app).data) == null ? void 0 : i.orgs) || [] : [];
|
|
3027
|
-
}), r = g(() => _.value.filter1((i) => i.id === e.single).data), p = g(() => !s.app);
|
|
3028
|
-
return Z(
|
|
3029
|
-
() => s.modelValue,
|
|
3030
|
-
(i) => {
|
|
3031
|
-
i ? i !== e.single && (e.single = i, O(i)) : C();
|
|
3032
|
-
},
|
|
3033
|
-
{
|
|
3034
|
-
immediate: !0
|
|
3035
|
-
}
|
|
3036
|
-
), (i, n) => {
|
|
3037
|
-
const b = I("IconLoading"), y = I("el-button"), h = I("el-option"), x = I("el-select");
|
|
3038
|
-
return c(), M("div", Co, [
|
|
3039
|
-
l(e).loading ? (c(), Y(b, { key: 0 })) : L("", !0),
|
|
3040
|
-
u("div", ko, [
|
|
3041
|
-
u("div", xo, [
|
|
3042
|
-
z(y, {
|
|
3043
|
-
circle: "",
|
|
3044
|
-
onClick: n[0] || (n[0] = (k) => i.$copy(l(e).single, "ID"))
|
|
3045
|
-
}, {
|
|
3046
|
-
icon: $(() => [...n[2] || (n[2] = [
|
|
3047
|
-
u("i", { class: "imicon im-copy" }, null, -1)
|
|
3048
|
-
])]),
|
|
3049
|
-
_: 1
|
|
3050
|
-
})
|
|
3051
|
-
]),
|
|
3052
|
-
z(x, Q({
|
|
3053
|
-
modelValue: l(e).single,
|
|
3054
|
-
"onUpdate:modelValue": n[1] || (n[1] = (k) => l(e).single = k),
|
|
3055
|
-
placeholder: l(w),
|
|
3056
|
-
disabled: l(p),
|
|
3057
|
-
filterable: ""
|
|
3058
|
-
}, i.$attrs, {
|
|
3059
|
-
class: "inputGroupRight",
|
|
3060
|
-
onChange: O
|
|
3061
|
-
}), {
|
|
3062
|
-
default: $(() => [
|
|
3063
|
-
(c(!0), M(re, null, ie(l(_), (k, B) => (c(), Y(h, {
|
|
3064
|
-
key: B,
|
|
3065
|
-
label: `${k.name} (${k.id})`,
|
|
3066
|
-
value: k.id,
|
|
3067
|
-
disabled: s.readonly && k.readonly
|
|
3068
|
-
}, {
|
|
3069
|
-
default: $(() => [
|
|
3070
|
-
u("div", Vo, [
|
|
3071
|
-
u("i", {
|
|
3072
|
-
class: K(["imicon", k.readonly ? "" : "im-writing"])
|
|
3073
|
-
}, null, 2),
|
|
3074
|
-
u("span", null, N(k.name), 1),
|
|
3075
|
-
u("span", Oo, "(" + N(k.id) + ")", 1)
|
|
3076
|
-
])
|
|
3077
|
-
]),
|
|
3078
|
-
_: 2
|
|
3079
|
-
}, 1032, ["label", "value", "disabled"]))), 128))
|
|
3080
|
-
]),
|
|
3081
|
-
_: 1
|
|
3082
|
-
}, 16, ["modelValue", "placeholder", "disabled"])
|
|
3083
|
-
])
|
|
3084
|
-
]);
|
|
3085
|
-
};
|
|
3086
|
-
}
|
|
3087
|
-
}), To = E({
|
|
3088
|
-
name: "SuperCountry"
|
|
3089
|
-
}), Mo = /* @__PURE__ */ Object.assign(To, {
|
|
3090
|
-
props: {
|
|
3091
|
-
type: {
|
|
3092
|
-
type: String,
|
|
3093
|
-
default: "aso"
|
|
3094
|
-
},
|
|
3095
|
-
nowrap: {
|
|
3096
|
-
type: Boolean,
|
|
3097
|
-
default: !1
|
|
3098
|
-
}
|
|
3099
|
-
},
|
|
3100
|
-
setup(T) {
|
|
3101
|
-
const V = $e(() => Promise.resolve().then(() => Ka)), s = $e(() => Promise.resolve().then(() => Xa)), e = {
|
|
3102
|
-
CountryAso: V,
|
|
3103
|
-
CountryDiy: s
|
|
3104
|
-
}, t = T, S = g(() => e["Country" + window.$toUpperCamel(t.type)]), o = g(() => t.nowrap);
|
|
3105
|
-
return (f, O) => (c(), M("div", {
|
|
3106
|
-
class: K(["SuperCountry", t.nowrap && "nowrap"])
|
|
3107
|
-
}, [
|
|
3108
|
-
(c(), Y(Le(l(S)), Q(f.$attrs, {
|
|
3109
|
-
"collapse-tags": l(o),
|
|
3110
|
-
"collapse-tags-tooltip": l(o)
|
|
3111
|
-
}), null, 16, ["collapse-tags", "collapse-tags-tooltip"]))
|
|
3112
|
-
], 2));
|
|
3113
|
-
}
|
|
3114
|
-
}), No = ["title"], Io = {
|
|
3115
|
-
key: 0,
|
|
3116
|
-
class: "pl4"
|
|
3117
|
-
}, zo = E({
|
|
3118
|
-
name: "SuperCountryItem"
|
|
3119
|
-
}), Bo = /* @__PURE__ */ Object.assign(zo, {
|
|
3120
|
-
props: {
|
|
3121
|
-
name: {
|
|
3122
|
-
type: String,
|
|
3123
|
-
default: ""
|
|
3124
|
-
},
|
|
3125
|
-
nolabel: {
|
|
3126
|
-
type: Boolean,
|
|
3127
|
-
default: !1
|
|
3128
|
-
},
|
|
3129
|
-
size: {
|
|
3130
|
-
type: [String, Number],
|
|
3131
|
-
default: 16
|
|
3132
|
-
},
|
|
3133
|
-
radius: {
|
|
3134
|
-
type: [String, Number],
|
|
3135
|
-
default: 8
|
|
3136
|
-
}
|
|
3137
|
-
},
|
|
3138
|
-
setup(T) {
|
|
3139
|
-
const V = T;
|
|
3140
|
-
H({});
|
|
3141
|
-
const e = pe("store").common(), t = g(() => {
|
|
3142
|
-
const D = V.name.toLowerCase();
|
|
3143
|
-
return e.countryObj[D] || fe("country.countryAllObj")[D] || {};
|
|
3144
|
-
}), S = g(() => `fi-${t.value.value_lower}`);
|
|
3145
|
-
g(() => window.$getLang());
|
|
3146
|
-
const o = g(() => window.$l(t.value.label)), f = g(() => {
|
|
3147
|
-
const D = parseInt(V.size);
|
|
3148
|
-
return {
|
|
3149
|
-
width: D + "px",
|
|
3150
|
-
height: D + "px"
|
|
3151
|
-
};
|
|
3152
|
-
}), O = g(() => `radius${Number(V.radius) || 2}`);
|
|
3153
|
-
return fe("country.countryAllObj"), (D, C) => (c(), M("div", {
|
|
3154
|
-
class: "SuperCountryItem flexMode vc g4",
|
|
3155
|
-
title: l(o)
|
|
3156
|
-
}, [
|
|
3157
|
-
u("span", {
|
|
3158
|
-
class: K(["box-shadow-gray3 fi fis noShrink", [l(S), l(O)]]),
|
|
3159
|
-
style: me(l(f))
|
|
3160
|
-
}, null, 6),
|
|
3161
|
-
V.nolabel ? L("", !0) : (c(), M("span", Io, N(l(o)), 1))
|
|
3162
|
-
], 8, No));
|
|
3163
|
-
}
|
|
3164
|
-
}), jo = { class: "SuperOrg relative wp100" }, Lo = E({
|
|
3165
|
-
name: "SuperOrg",
|
|
3166
|
-
inheritAttrs: !1
|
|
3167
|
-
}), Yo = /* @__PURE__ */ Object.assign(Lo, {
|
|
3168
|
-
props: {
|
|
3169
|
-
modelValue: {
|
|
3170
|
-
type: [Number, String],
|
|
3171
|
-
default: ""
|
|
3172
|
-
},
|
|
3173
|
-
permission: {
|
|
3174
|
-
type: String,
|
|
3175
|
-
default: "all"
|
|
3176
|
-
}
|
|
3177
|
-
},
|
|
3178
|
-
emits: "change",
|
|
3179
|
-
setup(T, { emit: V }) {
|
|
3180
|
-
const s = T, e = H({
|
|
3181
|
-
loading: !1,
|
|
3182
|
-
v: "",
|
|
3183
|
-
orgOptions: []
|
|
3184
|
-
}), S = pe("store").asa();
|
|
3185
|
-
ue(() => {
|
|
3186
|
-
f();
|
|
3187
|
-
});
|
|
3188
|
-
const o = V, f = async () => {
|
|
3189
|
-
if (S.orgOptions.length > 0) {
|
|
3190
|
-
e.orgOptions = S.orgOptions, o("success", e.orgOptions), ge(() => {
|
|
3191
|
-
const _ = e.orgOptions.filter1(
|
|
3192
|
-
(r) => r.orgId === e.v
|
|
3193
|
-
).data;
|
|
3194
|
-
o("update:paymentModel", _ == null ? void 0 : _.paymentModel);
|
|
3195
|
-
});
|
|
3196
|
-
return;
|
|
3197
|
-
}
|
|
3198
|
-
e.loading = !0;
|
|
3199
|
-
const { code: C, data: w } = await window.$post({
|
|
3200
|
-
url: window.$api.asa.orgOptions
|
|
3201
|
-
});
|
|
3202
|
-
e.loading = !1, C === 200 && (e.orgOptions = w.map((_) => (_.label = `${_.orgName} (${_.orgId})`, _)), S.saveData("orgOptions", e.orgOptions), ge(() => {
|
|
3203
|
-
const _ = e.orgOptions.filter1(
|
|
3204
|
-
(r) => r.orgId === e.v
|
|
3205
|
-
).data;
|
|
3206
|
-
o("update:paymentModel", _ == null ? void 0 : _.paymentModel);
|
|
3207
|
-
}), o("success", e.orgOptions));
|
|
3208
|
-
}, O = (C) => {
|
|
3209
|
-
o("update:modelValue", C);
|
|
3210
|
-
const w = e.orgOptions.filter1((_) => _.orgId === C).data;
|
|
3211
|
-
o("update:currency", w == null ? void 0 : w.currency), o("update:name", w == null ? void 0 : w.orgName), o("update:timezone", w == null ? void 0 : w.timezone), o("update:paymentModel", w == null ? void 0 : w.paymentModel), o("change", C);
|
|
3212
|
-
}, D = g(() => {
|
|
3213
|
-
if (s.permission === "all")
|
|
3214
|
-
return e.orgOptions;
|
|
3215
|
-
{
|
|
3216
|
-
const C = s.permission === "readonly";
|
|
3217
|
-
return e.orgOptions.filter((_) => _.readonly === C);
|
|
3218
|
-
}
|
|
3219
|
-
});
|
|
3220
|
-
return Z(
|
|
3221
|
-
() => s.modelValue,
|
|
3222
|
-
(C) => {
|
|
3223
|
-
C ? C !== e.v && (e.v = C, ge(() => {
|
|
3224
|
-
const w = e.orgOptions.filter1(
|
|
3225
|
-
(_) => _.orgId === e.v
|
|
3226
|
-
).data;
|
|
3227
|
-
o("update:paymentModel", w == null ? void 0 : w.paymentModel);
|
|
3228
|
-
})) : e.v = "";
|
|
3229
|
-
},
|
|
3230
|
-
{
|
|
3231
|
-
immediate: !0
|
|
3232
|
-
}
|
|
3233
|
-
), (C, w) => {
|
|
3234
|
-
const _ = I("IconLoading"), r = I("el-option"), p = I("el-select");
|
|
3235
|
-
return c(), M("div", jo, [
|
|
3236
|
-
l(e).loading ? (c(), Y(_, { key: 0 })) : L("", !0),
|
|
3237
|
-
z(p, {
|
|
3238
|
-
modelValue: l(e).v,
|
|
3239
|
-
"onUpdate:modelValue": w[0] || (w[0] = (i) => l(e).v = i),
|
|
3240
|
-
filterable: "",
|
|
3241
|
-
"collapse-tags": "",
|
|
3242
|
-
placeholder: " ",
|
|
3243
|
-
class: "wp100",
|
|
3244
|
-
onChange: O
|
|
3245
|
-
}, {
|
|
3246
|
-
default: $(() => [
|
|
3247
|
-
(c(!0), M(re, null, ie(l(D), (i, n) => (c(), Y(r, {
|
|
3248
|
-
key: n,
|
|
3249
|
-
label: i.label,
|
|
3250
|
-
value: i.orgId
|
|
3251
|
-
}, null, 8, ["label", "value"]))), 128))
|
|
3252
|
-
]),
|
|
3253
|
-
_: 1
|
|
3254
|
-
}, 8, ["modelValue"])
|
|
3255
|
-
]);
|
|
3256
|
-
};
|
|
3257
|
-
}
|
|
3258
|
-
}), Eo = { class: "SuperStatusItem flexMode vc g8" }, Ro = E({
|
|
3259
|
-
name: "SuperStatusItem"
|
|
3260
|
-
}), Fo = /* @__PURE__ */ Object.assign(Ro, {
|
|
3261
|
-
props: {
|
|
3262
|
-
status: {
|
|
3263
|
-
type: String,
|
|
3264
|
-
default: ""
|
|
3265
|
-
},
|
|
3266
|
-
nolabel: {
|
|
3267
|
-
type: Boolean,
|
|
3268
|
-
default: !1
|
|
3269
|
-
},
|
|
3270
|
-
size: {
|
|
3271
|
-
type: String,
|
|
3272
|
-
default: "small"
|
|
3273
|
-
},
|
|
3274
|
-
lang: {
|
|
3275
|
-
type: String,
|
|
3276
|
-
default: ""
|
|
3277
|
-
},
|
|
3278
|
-
isButton: {
|
|
3279
|
-
type: Boolean,
|
|
3280
|
-
default: !1
|
|
3281
|
-
},
|
|
3282
|
-
id1: {
|
|
3283
|
-
type: String,
|
|
3284
|
-
default: ""
|
|
3285
|
-
},
|
|
3286
|
-
id2: {
|
|
3287
|
-
type: String,
|
|
3288
|
-
default: ""
|
|
3289
|
-
},
|
|
3290
|
-
id3: {
|
|
3291
|
-
type: String,
|
|
3292
|
-
default: ""
|
|
3293
|
-
}
|
|
3294
|
-
},
|
|
3295
|
-
emits: ["changeStatus"],
|
|
3296
|
-
setup(T, { emit: V }) {
|
|
3297
|
-
const s = T, e = V, t = () => {
|
|
3298
|
-
s.isButton && e("changeStatus", s.status, s.id1, s.id2, s.id3);
|
|
3299
|
-
}, S = g(() => fe("statusMap")[s.status] || !1), o = g(() => window.$toUpperCamel(s.status)), f = g(() => O[s.size] || "fs12"), O = {
|
|
3300
|
-
small: "fs12",
|
|
3301
|
-
default: "fs16",
|
|
3302
|
-
large: "fs24"
|
|
3303
|
-
};
|
|
3304
|
-
return (D, C) => (c(), M("div", Eo, [
|
|
3305
|
-
l(S) ? (c(), M("i", {
|
|
3306
|
-
key: 0,
|
|
3307
|
-
class: K(["imicon", [
|
|
3308
|
-
l(S).class,
|
|
3309
|
-
l(f),
|
|
3310
|
-
s.isButton && s.status !== "DELETED" ? l(S).button_class : ""
|
|
3311
|
-
]]),
|
|
3312
|
-
onClick: t
|
|
3313
|
-
}, null, 2)) : L("", !0),
|
|
3314
|
-
s.nolabel ? L("", !0) : (c(), M("span", {
|
|
3315
|
-
key: 1,
|
|
3316
|
-
class: K(["txt-h1", l(f)])
|
|
3317
|
-
}, N(D.$l(l(S) ? l(S).label : l(o))), 3))
|
|
3318
|
-
]));
|
|
3319
|
-
}
|
|
3320
|
-
}), Po = { class: "SuperStatusSelect" }, Uo = E({
|
|
3321
|
-
name: "SuperStatusSelect"
|
|
3322
|
-
}), Go = /* @__PURE__ */ Object.assign(Uo, {
|
|
3323
|
-
props: {
|
|
3324
|
-
modelValue: {
|
|
3325
|
-
type: String,
|
|
3326
|
-
default: ""
|
|
3327
|
-
},
|
|
3328
|
-
options: {
|
|
3329
|
-
type: Array,
|
|
3330
|
-
default: () => []
|
|
3331
|
-
},
|
|
3332
|
-
placeholder: {
|
|
3333
|
-
type: String,
|
|
3334
|
-
default: ""
|
|
3335
|
-
}
|
|
3336
|
-
},
|
|
3337
|
-
setup(T) {
|
|
3338
|
-
const V = T, s = H({
|
|
3339
|
-
v: ""
|
|
3340
|
-
}), { proxy: e } = ee(), t = g(() => window.$getLang()), S = g(() => e.$slots), o = g(() => V.options.length ? V.options : ["RUNNING", "PAUSED"]), f = g(() => {
|
|
3341
|
-
const D = V.placeholder || "Status";
|
|
3342
|
-
return window.$l(D);
|
|
3343
|
-
});
|
|
3344
|
-
Ye(() => {
|
|
3345
|
-
s.v = V.modelValue;
|
|
3346
|
-
});
|
|
3347
|
-
const O = fe("statusMap");
|
|
3348
|
-
return (D, C) => {
|
|
3349
|
-
const w = I("StatusItem"), _ = I("el-option"), r = I("el-select");
|
|
3350
|
-
return c(), M("div", Po, [
|
|
3351
|
-
z(r, Q({
|
|
3352
|
-
modelValue: l(s).v,
|
|
3353
|
-
"onUpdate:modelValue": C[0] || (C[0] = (p) => l(s).v = p),
|
|
3354
|
-
"collapse-tags": "",
|
|
3355
|
-
"collapse-tags-tooltip": ""
|
|
3356
|
-
}, D.$attrs, {
|
|
3357
|
-
placeholder: l(f),
|
|
3358
|
-
onChange: D.change
|
|
3359
|
-
}), oe({
|
|
3360
|
-
default: $(() => [
|
|
3361
|
-
(c(!0), M(re, null, ie(l(o), (p, i) => (c(), Y(_, {
|
|
3362
|
-
key: p,
|
|
3363
|
-
label: D.$l(l(O)[p].label),
|
|
3364
|
-
value: p
|
|
3365
|
-
}, {
|
|
3366
|
-
default: $(() => [
|
|
3367
|
-
z(w, {
|
|
3368
|
-
status: p,
|
|
3369
|
-
lang: l(t)
|
|
3370
|
-
}, null, 8, ["status", "lang"])
|
|
3371
|
-
]),
|
|
3372
|
-
_: 2
|
|
3373
|
-
}, 1032, ["label", "value"]))), 128))
|
|
3374
|
-
]),
|
|
3375
|
-
_: 2
|
|
3376
|
-
}, [
|
|
3377
|
-
l(s).v ? {
|
|
3378
|
-
name: "prefix",
|
|
3379
|
-
fn: $(() => [
|
|
3380
|
-
l(S).prefix ? W(D.$slots, "prefix", { key: 0 }) : (c(), Y(w, {
|
|
3381
|
-
key: 1,
|
|
3382
|
-
status: l(s).v,
|
|
3383
|
-
nolabel: "",
|
|
3384
|
-
lang: l(t)
|
|
3385
|
-
}, null, 8, ["status", "lang"]))
|
|
3386
|
-
]),
|
|
3387
|
-
key: "0"
|
|
3388
|
-
} : void 0
|
|
3389
|
-
]), 1040, ["modelValue", "placeholder", "onChange"])
|
|
3390
|
-
]);
|
|
3391
|
-
};
|
|
3392
|
-
}
|
|
3393
|
-
}), Ho = { class: "SuperTimezone" }, Jo = { class: "flexMode vc hb g16" }, Ko = { class: "flexMode vc" }, Wo = { key: 0 }, qo = E({
|
|
3394
|
-
name: "SuperTimezone"
|
|
3395
|
-
}), Zo = /* @__PURE__ */ Object.assign(qo, {
|
|
3396
|
-
props: {
|
|
3397
|
-
modelValue: {
|
|
3398
|
-
type: String,
|
|
3399
|
-
default: ""
|
|
3400
|
-
},
|
|
3401
|
-
options: {
|
|
3402
|
-
type: Array,
|
|
3403
|
-
default: () => []
|
|
3404
|
-
},
|
|
3405
|
-
app: {
|
|
3406
|
-
type: [String, Number],
|
|
3407
|
-
default: ""
|
|
3408
|
-
},
|
|
3409
|
-
org: {
|
|
3410
|
-
type: [String, Number],
|
|
3411
|
-
default: ""
|
|
3412
|
-
},
|
|
3413
|
-
usePreTimezone: {
|
|
3414
|
-
type: Boolean,
|
|
3415
|
-
value: !1
|
|
3416
|
-
}
|
|
3417
|
-
},
|
|
3418
|
-
emits: ["change", "update:modelValue", "update:timezone"],
|
|
3419
|
-
setup(T, { emit: V }) {
|
|
3420
|
-
const s = T, e = H({
|
|
3421
|
-
v: "",
|
|
3422
|
-
timezone: "",
|
|
3423
|
-
name: "",
|
|
3424
|
-
options: [],
|
|
3425
|
-
filterTxt: ""
|
|
3426
|
-
}), { proxy: t } = ee(), S = pe("store");
|
|
3427
|
-
S.common();
|
|
3428
|
-
const o = S.asa(), f = V, O = (p) => {
|
|
3429
|
-
_.value ? (f("update:modelValue", _.value.label), f("update:timezone", _.value.value)) : (f("update:modelValue", ""), f("update:timezone", "")), f("change");
|
|
3430
|
-
}, D = (p) => {
|
|
3431
|
-
e.filterTxt = p.toLowerCase();
|
|
3432
|
-
}, C = g(() => fe("common.timezone").map((p) => (p.v = p.value.toString(), p.des_en_us = p.label_en_us.toLowerCase(), p.des_zh_cn = p.label_zh_cn.toLowerCase(), p.hide = !1, p))), w = g(() => {
|
|
3433
|
-
if (s.usePreTimezone) {
|
|
3434
|
-
const p = [
|
|
3435
|
-
{
|
|
3436
|
-
label: "UTC",
|
|
3437
|
-
value: 0,
|
|
3438
|
-
hide: !1
|
|
3439
|
-
},
|
|
3440
|
-
{
|
|
3441
|
-
label: o.accountTimezone.timezoneName,
|
|
3442
|
-
tip: o.accountTimezone.tip,
|
|
3443
|
-
value: o.accountTimezone.timezone,
|
|
3444
|
-
hide: !1
|
|
3445
|
-
},
|
|
3446
|
-
{ ...r.value }
|
|
3447
|
-
], i = [];
|
|
3448
|
-
return C.value.forEach((n) => {
|
|
3449
|
-
p.filter1((b) => b.label === n.label).data || i.push(n);
|
|
3450
|
-
}), [...p, ...i];
|
|
3451
|
-
} else
|
|
3452
|
-
return C.value;
|
|
3453
|
-
}), _ = g(() => w.value.filter1((p) => p.label === e.v).data), r = g(() => {
|
|
3454
|
-
const p = Intl.DateTimeFormat().resolvedOptions().timeZone, i = (/* @__PURE__ */ new Date()).getTimezoneOffset(), n = Math.floor(Math.abs(i) / 60);
|
|
3455
|
-
return {
|
|
3456
|
-
label: p,
|
|
3457
|
-
tip: "Local",
|
|
3458
|
-
value: n,
|
|
3459
|
-
hide: !1
|
|
3460
|
-
};
|
|
3461
|
-
});
|
|
3462
|
-
return Z(
|
|
3463
|
-
() => s.modelValue,
|
|
3464
|
-
(p, i) => {
|
|
3465
|
-
p !== void 0 && p !== i && (e.v = p);
|
|
3466
|
-
},
|
|
3467
|
-
{
|
|
3468
|
-
immediate: !0
|
|
3469
|
-
}
|
|
3470
|
-
), (p, i) => {
|
|
3471
|
-
const n = I("el-option"), b = I("el-select");
|
|
3472
|
-
return c(), M("div", Ho, [
|
|
3473
|
-
z(b, Q({
|
|
3474
|
-
modelValue: l(e).v,
|
|
3475
|
-
"onUpdate:modelValue": i[0] || (i[0] = (y) => l(e).v = y),
|
|
3476
|
-
filterable: "",
|
|
3477
|
-
placeholder: p.$l("Timezone"),
|
|
3478
|
-
"filter-method": D
|
|
3479
|
-
}, p.$attrs, {
|
|
3480
|
-
onChange: O,
|
|
3481
|
-
class: "wp100"
|
|
3482
|
-
}), oe({
|
|
3483
|
-
default: $(() => [
|
|
3484
|
-
(c(!0), M(re, null, ie(l(w), (y, h) => (c(), Y(n, {
|
|
3485
|
-
key: y.label,
|
|
3486
|
-
label: y.label,
|
|
3487
|
-
value: y.label,
|
|
3488
|
-
class: K(y.hide && "hide")
|
|
3489
|
-
}, {
|
|
3490
|
-
default: $(() => [
|
|
3491
|
-
u("div", Jo, [
|
|
3492
|
-
u("div", Ko, [
|
|
3493
|
-
u("span", null, N(y.label), 1),
|
|
3494
|
-
y.tip ? (c(), M("span", Wo, "(" + N(y.tip) + ")", 1)) : L("", !0)
|
|
3495
|
-
]),
|
|
3496
|
-
u("span", null, N(y.value < 1 ? y.value : "+" + y.value), 1)
|
|
3497
|
-
])
|
|
3498
|
-
]),
|
|
3499
|
-
_: 2
|
|
3500
|
-
}, 1032, ["label", "value", "class"]))), 128))
|
|
3501
|
-
]),
|
|
3502
|
-
_: 2
|
|
3503
|
-
}, [
|
|
3504
|
-
l(_) ? {
|
|
3505
|
-
name: "prefix",
|
|
3506
|
-
fn: $(() => [
|
|
3507
|
-
ae(" [" + N(l(_).value) + "] ", 1)
|
|
3508
|
-
]),
|
|
3509
|
-
key: "0"
|
|
3510
|
-
} : void 0
|
|
3511
|
-
]), 1040, ["modelValue", "placeholder"])
|
|
3512
|
-
]);
|
|
3513
|
-
};
|
|
3514
|
-
}
|
|
3515
|
-
}), Ae = {
|
|
3516
|
-
Card: Ke,
|
|
3517
|
-
DatePicker: Ze,
|
|
3518
|
-
EChart: lt,
|
|
3519
|
-
Icon: st,
|
|
3520
|
-
Image: ct,
|
|
3521
|
-
Input: ft,
|
|
3522
|
-
MultipleSelect: kt,
|
|
3523
|
-
Nodata: Dt,
|
|
3524
|
-
Page: Et,
|
|
3525
|
-
Table: kl,
|
|
3526
|
-
TableFooter: Ne,
|
|
3527
|
-
Textarea: Al,
|
|
3528
|
-
Form: Il,
|
|
3529
|
-
AiApp: El,
|
|
3530
|
-
AiOrg: Jl,
|
|
3531
|
-
AsaAdGroup: oo,
|
|
3532
|
-
AsaApp: uo,
|
|
3533
|
-
AsaCampaign: So,
|
|
3534
|
-
AsaOrg: Ao,
|
|
3535
|
-
Country: Mo,
|
|
3536
|
-
CountryItem: Bo,
|
|
3537
|
-
Org: Yo,
|
|
3538
|
-
StatusItem: Fo,
|
|
3539
|
-
StatusSelect: Go,
|
|
3540
|
-
Timezone: Zo
|
|
3541
|
-
}, dn = (T) => {
|
|
3542
|
-
for (let V in Ae)
|
|
3543
|
-
T.component(V, Ae[V]);
|
|
3544
|
-
}, Qo = { class: "dragCenter flexMode vc flexGrow txt-nowrap" }, Xo = { class: "pl10 fs14 txt-h2" }, ea = { class: "pb5 fs12 txt-primary3" }, ta = E({
|
|
3545
|
-
name: "ColumnConfigDragItem"
|
|
3546
|
-
}), la = /* @__PURE__ */ Object.assign(ta, {
|
|
3547
|
-
props: {
|
|
3548
|
-
modelValue: {
|
|
3549
|
-
type: Object,
|
|
3550
|
-
default: /* @__PURE__ */ Object.create(null)
|
|
3551
|
-
},
|
|
3552
|
-
it: {
|
|
3553
|
-
type: Object,
|
|
3554
|
-
default: /* @__PURE__ */ Object.create(null)
|
|
3555
|
-
},
|
|
3556
|
-
index: {
|
|
3557
|
-
type: Number,
|
|
3558
|
-
default: 0
|
|
3559
|
-
},
|
|
3560
|
-
type: {
|
|
3561
|
-
type: String,
|
|
3562
|
-
default: "center"
|
|
3563
|
-
},
|
|
3564
|
-
lang: {
|
|
3565
|
-
type: String,
|
|
3566
|
-
default: "en_us"
|
|
3567
|
-
}
|
|
3568
|
-
},
|
|
3569
|
-
setup(T, { emit: V }) {
|
|
3570
|
-
const s = T, e = H({
|
|
3571
|
-
editMode: !1,
|
|
3572
|
-
form: s.it,
|
|
3573
|
-
info: {}
|
|
3574
|
-
}), t = V, S = () => {
|
|
3575
|
-
t("add-left", s);
|
|
3576
|
-
}, o = () => {
|
|
3577
|
-
t("add-right", s);
|
|
3578
|
-
}, f = (C) => {
|
|
3579
|
-
t("change", { it: e.form, index: s.index, type: s.type });
|
|
3580
|
-
};
|
|
3581
|
-
g(() => e.form.align ? " " : D[0].label);
|
|
3582
|
-
const O = g(() => s.it.nomove || e.editMode), D = [
|
|
3583
|
-
{
|
|
3584
|
-
label: "Left",
|
|
3585
|
-
value: "left"
|
|
3586
|
-
},
|
|
3587
|
-
{
|
|
3588
|
-
label: "Center",
|
|
3589
|
-
value: "center"
|
|
3590
|
-
},
|
|
3591
|
-
{
|
|
3592
|
-
label: "Right",
|
|
3593
|
-
value: "right"
|
|
3594
|
-
}
|
|
3595
|
-
];
|
|
3596
|
-
return (C, w) => {
|
|
3597
|
-
const _ = I("el-switch");
|
|
3598
|
-
return c(), M("div", {
|
|
3599
|
-
class: K(["ColumnConfigDragItem", [!l(O) && "drag", s.type]])
|
|
3600
|
-
}, [
|
|
3601
|
-
u("div", {
|
|
3602
|
-
class: K(["itemArea relative flexMode vc p4", [
|
|
3603
|
-
l(e).editMode && "edit",
|
|
3604
|
-
l(O) ? "cursor-disabled hover-bg-gray1" : "cursor-grab hover-bg-primary1"
|
|
3605
|
-
]])
|
|
3606
|
-
}, [
|
|
3607
|
-
u("div", {
|
|
3608
|
-
class: "arrowLeft ml4 mr8 circle24 hover-txt-primary point",
|
|
3609
|
-
onClick: he(S, ["stop"])
|
|
3610
|
-
}, [...w[1] || (w[1] = [
|
|
3611
|
-
u("i", { class: "imicon im-arrow-left" }, null, -1)
|
|
3612
|
-
])]),
|
|
3613
|
-
u("div", Qo, [
|
|
3614
|
-
z(_, {
|
|
3615
|
-
modelValue: l(e).form.visible,
|
|
3616
|
-
"onUpdate:modelValue": w[0] || (w[0] = (r) => l(e).form.visible = r),
|
|
3617
|
-
disabled: l(e).form.nomove,
|
|
3618
|
-
size: "default",
|
|
3619
|
-
onChange: f
|
|
3620
|
-
}, null, 8, ["modelValue", "disabled"]),
|
|
3621
|
-
u("span", Xo, N(l(e).form.label || l(e).form.type), 1)
|
|
3622
|
-
]),
|
|
3623
|
-
u("span", ea, N(l(e).form.tips), 1),
|
|
3624
|
-
u("div", {
|
|
3625
|
-
class: "arrowRight mr4 ml8 circle24 hover-txt-primary point",
|
|
3626
|
-
onClick: he(o, ["stop"])
|
|
3627
|
-
}, [...w[2] || (w[2] = [
|
|
3628
|
-
u("i", { class: "imicon im-arrow-right" }, null, -1)
|
|
3629
|
-
])])
|
|
3630
|
-
], 2)
|
|
3631
|
-
], 2);
|
|
3632
|
-
};
|
|
3633
|
-
}
|
|
3634
|
-
}), xe = /* @__PURE__ */ de(la, [["__scopeId", "data-v-863a4082"]]), oa = { class: "flexMode vs p16 g16" }, aa = { class: "ml16 p2-4 bg-gary3 radius4 lh12" }, na = { class: "fs12 txt-primary" }, sa = { class: "fs12 txt-dark5" }, ra = {
|
|
3635
|
-
key: 0,
|
|
3636
|
-
class: "fs12 txt-dark3"
|
|
3637
|
-
}, ia = {
|
|
3638
|
-
key: 0,
|
|
3639
|
-
class: "absCenter txt-nowrap txt-dark7 fs12"
|
|
3640
|
-
}, da = { class: "ml16 p2-4 bg-gary3 radius4 lh12" }, ua = { class: "fs12 txt-primary" }, ca = { class: "fs12 txt-dark5" }, pa = {
|
|
3641
|
-
key: 0,
|
|
3642
|
-
class: "fs12 txt-dark3"
|
|
3643
|
-
}, ma = {
|
|
3644
|
-
key: 0,
|
|
3645
|
-
class: "absCenter txt-nowrap txt-dark7 fs12"
|
|
3646
|
-
}, fa = { class: "ml16 p2-4 bg-gary3 radius4 lh12" }, ga = { class: "fs12 txt-primary" }, ya = { class: "fs12 txt-dark5" }, ha = {
|
|
3647
|
-
key: 0,
|
|
3648
|
-
class: "fs12 txt-dark3"
|
|
3649
|
-
}, _a = {
|
|
3650
|
-
key: 0,
|
|
3651
|
-
class: "absCenter txt-nowrap txt-dark7 fs12"
|
|
3652
|
-
}, ba = E({
|
|
3653
|
-
name: "TableHeaderColumnConfig",
|
|
3654
|
-
inheritAttrs: !1
|
|
3655
|
-
}), va = /* @__PURE__ */ Object.assign(ba, {
|
|
3656
|
-
props: {
|
|
3657
|
-
params: {
|
|
3658
|
-
type: Object,
|
|
3659
|
-
default: /* @__PURE__ */ Object.create(null)
|
|
3660
|
-
}
|
|
3661
|
-
},
|
|
3662
|
-
setup(T, { emit: V }) {
|
|
3663
|
-
const s = T, e = H({
|
|
3664
|
-
loading: !1,
|
|
3665
|
-
left: [],
|
|
3666
|
-
center: [],
|
|
3667
|
-
right: [],
|
|
3668
|
-
total: 0
|
|
3669
|
-
});
|
|
3670
|
-
ue(() => {
|
|
3671
|
-
S();
|
|
3672
|
-
});
|
|
3673
|
-
const t = V, S = () => {
|
|
3674
|
-
o();
|
|
3675
|
-
}, o = () => {
|
|
3676
|
-
let x = localStorage.getItem(p.value);
|
|
3677
|
-
if (x) {
|
|
3678
|
-
x = JSON.parse(x);
|
|
3679
|
-
let k = 0;
|
|
3680
|
-
x.forEach((B) => {
|
|
3681
|
-
B.label && !B.nomove && (k++, B.fixed ? e[B.fixed].push(B) : e.center.push(B));
|
|
3682
|
-
}), e.total = k;
|
|
3683
|
-
}
|
|
3684
|
-
}, f = ({ it: x, index: k, type: B }) => {
|
|
3685
|
-
e.left.unshift(x), e.center.splice(k, 1);
|
|
3686
|
-
}, O = ({ it: x, index: k, type: B }) => {
|
|
3687
|
-
e.right.unshift(x), e.center.splice(k, 1);
|
|
3688
|
-
}, D = ({ it: x, index: k, type: B }) => {
|
|
3689
|
-
e.center.unshift(x), e.left.splice(k, 1);
|
|
3690
|
-
}, C = ({ it: x, index: k, type: B }) => {
|
|
3691
|
-
e.center.unshift(x), e.right.splice(k, 1);
|
|
3692
|
-
}, w = ({ it: x, index: k, type: B }) => {
|
|
3693
|
-
e[B][k] = x;
|
|
3694
|
-
}, _ = async () => {
|
|
3695
|
-
e.loading = !0, localStorage.removeItem(p.value), window.$promise(() => {
|
|
3696
|
-
e.loading = !1, t("submit", "column"), t("close");
|
|
3697
|
-
});
|
|
3698
|
-
}, r = async () => {
|
|
3699
|
-
e.loading = !0, await window.$promise(() => {
|
|
3700
|
-
const { left: x, center: k, right: B } = e;
|
|
3701
|
-
x.forEach((a, d) => {
|
|
3702
|
-
a.fixed = "left", a.sort = d;
|
|
3703
|
-
}), k.forEach((a, d) => {
|
|
3704
|
-
a.fixed = !1, a.sort = d;
|
|
3705
|
-
}), B.forEach((a, d) => {
|
|
3706
|
-
a.fixed = "right", a.sort = d;
|
|
3707
|
-
});
|
|
3708
|
-
const A = [...x, ...k, ...B].sort(
|
|
3709
|
-
(a, d) => a.sort - d.sort
|
|
3710
|
-
);
|
|
3711
|
-
localStorage.setItem(p.value, JSON.stringify(A));
|
|
3712
|
-
}, 10), e.loading = !1, t("submit", "column"), t("close");
|
|
3713
|
-
}, p = g(() => `${s.params.tableName}_Column`), i = g(() => ({
|
|
3714
|
-
height: window.global.config.options.drawerHeight - 80 + "px"
|
|
3715
|
-
})), n = g(() => {
|
|
3716
|
-
let x = 0, k = 0;
|
|
3717
|
-
return e.left.forEach((B) => {
|
|
3718
|
-
B.visible ? x++ : k++;
|
|
3719
|
-
}), {
|
|
3720
|
-
visible: x,
|
|
3721
|
-
hide: k
|
|
3722
|
-
};
|
|
3723
|
-
}), b = g(() => {
|
|
3724
|
-
let x = 0, k = 0;
|
|
3725
|
-
return e.center.forEach((B) => {
|
|
3726
|
-
B.visible ? x++ : k++;
|
|
3727
|
-
}), {
|
|
3728
|
-
visible: x,
|
|
3729
|
-
hide: k
|
|
3730
|
-
};
|
|
3731
|
-
}), y = g(() => {
|
|
3732
|
-
let x = 0, k = 0;
|
|
3733
|
-
return e.right.forEach((B) => {
|
|
3734
|
-
B.visible ? x++ : k++;
|
|
3735
|
-
}), {
|
|
3736
|
-
visible: x,
|
|
3737
|
-
hide: k
|
|
3738
|
-
};
|
|
3739
|
-
}), h = g(() => window.$getLang());
|
|
3740
|
-
return (x, k) => {
|
|
3741
|
-
const B = I("Card"), A = I("el-button"), a = I("DrawerArea");
|
|
3742
|
-
return c(), Y(a, {
|
|
3743
|
-
class: "TableHeaderColumnConfig",
|
|
3744
|
-
loading: l(e).loading,
|
|
3745
|
-
noscroll: "",
|
|
3746
|
-
onSubmit: r
|
|
3747
|
-
}, {
|
|
3748
|
-
cancel: $(() => [
|
|
3749
|
-
z(A, {
|
|
3750
|
-
plain: "",
|
|
3751
|
-
onClick: _
|
|
3752
|
-
}, {
|
|
3753
|
-
icon: $(() => [...k[0] || (k[0] = [
|
|
3754
|
-
u("i", { class: "imicon im-reset" }, null, -1)
|
|
3755
|
-
])]),
|
|
3756
|
-
default: $(() => [
|
|
3757
|
-
ae(" " + N(x.$l("Reset")), 1)
|
|
3758
|
-
]),
|
|
3759
|
-
_: 1
|
|
3760
|
-
})
|
|
3761
|
-
]),
|
|
3762
|
-
default: $(() => [
|
|
3763
|
-
u("div", oa, [
|
|
3764
|
-
z(B, {
|
|
3765
|
-
title: "Fixed on Left",
|
|
3766
|
-
class: "flex1",
|
|
3767
|
-
"body-class": "border"
|
|
3768
|
-
}, oe({
|
|
3769
|
-
default: $(() => [
|
|
3770
|
-
l(e).left.length === 0 ? (c(), M("div", ia, N(x.$l("No Column Fixed on Left")), 1)) : L("", !0),
|
|
3771
|
-
z(l(ke), {
|
|
3772
|
-
list: l(e).left,
|
|
3773
|
-
group: "columnFilter",
|
|
3774
|
-
class: "dragBody p4-0 yscroll nobar",
|
|
3775
|
-
draggable: ".drag",
|
|
3776
|
-
style: me(l(i)),
|
|
3777
|
-
"item-key": (d) => d
|
|
3778
|
-
}, {
|
|
3779
|
-
item: $(({ element: d, index: m }) => [
|
|
3780
|
-
z(xe, {
|
|
3781
|
-
it: d,
|
|
3782
|
-
index: m,
|
|
3783
|
-
lang: l(h),
|
|
3784
|
-
type: "left",
|
|
3785
|
-
onAddRight: D,
|
|
3786
|
-
onChange: w
|
|
3787
|
-
}, null, 8, ["it", "index", "lang"])
|
|
3788
|
-
]),
|
|
3789
|
-
_: 1
|
|
3790
|
-
}, 8, ["list", "style", "item-key"])
|
|
3791
|
-
]),
|
|
3792
|
-
_: 2
|
|
3793
|
-
}, [
|
|
3794
|
-
l(n) ? {
|
|
3795
|
-
name: "header",
|
|
3796
|
-
fn: $(() => [
|
|
3797
|
-
u("div", aa, [
|
|
3798
|
-
u("span", na, N(l(n).visible), 1),
|
|
3799
|
-
u("span", sa, " / " + N(l(e).total), 1),
|
|
3800
|
-
l(n).hide ? (c(), M("span", ra, "(" + N(l(n).hide) + ")", 1)) : L("", !0)
|
|
3801
|
-
])
|
|
3802
|
-
]),
|
|
3803
|
-
key: "0"
|
|
3804
|
-
} : void 0
|
|
3805
|
-
]), 1024),
|
|
3806
|
-
z(B, {
|
|
3807
|
-
title: "In Center",
|
|
3808
|
-
class: "flex1",
|
|
3809
|
-
"body-class": "border"
|
|
3810
|
-
}, oe({
|
|
3811
|
-
default: $(() => [
|
|
3812
|
-
l(e).center.length === 0 ? (c(), M("div", ma, N(x.$l("No Column Fixed on Left")), 1)) : L("", !0),
|
|
3813
|
-
z(l(ke), {
|
|
3814
|
-
list: l(e).center,
|
|
3815
|
-
group: "columnFilter",
|
|
3816
|
-
class: "dragBody p4-0 yscroll nobar",
|
|
3817
|
-
draggable: ".drag",
|
|
3818
|
-
style: me(l(i)),
|
|
3819
|
-
"item-key": (d) => d
|
|
3820
|
-
}, {
|
|
3821
|
-
item: $(({ element: d, index: m }) => [
|
|
3822
|
-
z(xe, {
|
|
3823
|
-
it: d,
|
|
3824
|
-
index: m,
|
|
3825
|
-
onAddLeft: f,
|
|
3826
|
-
lang: l(h),
|
|
3827
|
-
onAddRight: O,
|
|
3828
|
-
onChange: w
|
|
3829
|
-
}, null, 8, ["it", "index", "lang"])
|
|
3830
|
-
]),
|
|
3831
|
-
_: 1
|
|
3832
|
-
}, 8, ["list", "style", "item-key"])
|
|
3833
|
-
]),
|
|
3834
|
-
_: 2
|
|
3835
|
-
}, [
|
|
3836
|
-
l(b) ? {
|
|
3837
|
-
name: "header",
|
|
3838
|
-
fn: $(() => [
|
|
3839
|
-
u("div", da, [
|
|
3840
|
-
u("span", ua, N(l(b).visible), 1),
|
|
3841
|
-
u("span", ca, " / " + N(l(e).total), 1),
|
|
3842
|
-
l(b).hide ? (c(), M("span", pa, "(" + N(l(b).hide) + ")", 1)) : L("", !0)
|
|
3843
|
-
])
|
|
3844
|
-
]),
|
|
3845
|
-
key: "0"
|
|
3846
|
-
} : void 0
|
|
3847
|
-
]), 1024),
|
|
3848
|
-
z(B, {
|
|
3849
|
-
title: "Fixed on Right",
|
|
3850
|
-
class: "flex1",
|
|
3851
|
-
"body-class": "border"
|
|
3852
|
-
}, oe({
|
|
3853
|
-
default: $(() => [
|
|
3854
|
-
l(e).right.length === 0 ? (c(), M("div", _a, N(x.$l("No Column Fixed on Right")), 1)) : L("", !0),
|
|
3855
|
-
z(l(ke), {
|
|
3856
|
-
list: l(e).right,
|
|
3857
|
-
group: "columnFilter",
|
|
3858
|
-
class: "dragBody p4-0 yscroll nobar",
|
|
3859
|
-
draggable: ".drag",
|
|
3860
|
-
style: me(l(i)),
|
|
3861
|
-
"item-key": (d) => d
|
|
3862
|
-
}, {
|
|
3863
|
-
item: $(({ element: d, index: m }) => [
|
|
3864
|
-
z(xe, {
|
|
3865
|
-
it: d,
|
|
3866
|
-
index: m,
|
|
3867
|
-
type: "right",
|
|
3868
|
-
lang: l(h),
|
|
3869
|
-
onAddLeft: C,
|
|
3870
|
-
onChange: w
|
|
3871
|
-
}, null, 8, ["it", "index", "lang"])
|
|
3872
|
-
]),
|
|
3873
|
-
_: 1
|
|
3874
|
-
}, 8, ["list", "style", "item-key"])
|
|
3875
|
-
]),
|
|
3876
|
-
_: 2
|
|
3877
|
-
}, [
|
|
3878
|
-
l(y) ? {
|
|
3879
|
-
name: "header",
|
|
3880
|
-
fn: $(() => [
|
|
3881
|
-
u("div", fa, [
|
|
3882
|
-
u("span", ga, N(l(y).visible), 1),
|
|
3883
|
-
u("span", ya, " / " + N(l(e).total), 1),
|
|
3884
|
-
l(y).hide ? (c(), M("span", ha, "(" + N(l(y).hide) + ")", 1)) : L("", !0)
|
|
3885
|
-
])
|
|
3886
|
-
]),
|
|
3887
|
-
key: "0"
|
|
3888
|
-
} : void 0
|
|
3889
|
-
]), 1024)
|
|
3890
|
-
])
|
|
3891
|
-
]),
|
|
3892
|
-
_: 1
|
|
3893
|
-
}, 8, ["loading"]);
|
|
3894
|
-
};
|
|
3895
|
-
}
|
|
3896
|
-
}), $a = /* @__PURE__ */ de(va, [["__scopeId", "data-v-d59024c5"]]), wa = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
3897
|
-
__proto__: null,
|
|
3898
|
-
default: $a
|
|
3899
|
-
}, Symbol.toStringTag, { value: "Module" })), Sa = { class: "p16 wp100 sticky bg-white9 border-b backdrop z2" }, Ca = { class: "flexMode vc g4 p8" }, ka = { class: "txt-dark5" }, xa = { class: "txt-dark" }, Va = {
|
|
3900
|
-
key: 0,
|
|
3901
|
-
class: "flexMode vc p8 g8"
|
|
3902
|
-
}, Oa = {
|
|
3903
|
-
key: 0,
|
|
3904
|
-
class: "flexMode vc g4"
|
|
3905
|
-
}, Da = { class: "txt-dark5" }, Aa = { class: "txt-dark" }, Ta = {
|
|
3906
|
-
key: 1,
|
|
3907
|
-
class: "flexMode vc p8"
|
|
3908
|
-
}, Ma = { class: "txt-dark5" }, Na = { class: "pl8 pr16 txt-dark" }, Ia = { class: "flexMode hr vc g16" }, za = { class: "pr8" }, Ba = { class: "relative wp100 pb8 z1" }, ja = { class: "p16 txt-dark9" }, La = { class: "pr8" }, Ya = { class: "inputGroup flexMode vc flexGrow" }, Ea = { class: "inputGroupRight" }, Ra = E({
|
|
3909
|
-
name: "TableDownload"
|
|
3910
|
-
}), Fa = /* @__PURE__ */ Object.assign(Ra, {
|
|
3911
|
-
props: {
|
|
3912
|
-
params: {
|
|
3913
|
-
type: Object,
|
|
3914
|
-
default: /* @__PURE__ */ Object.create(null)
|
|
3915
|
-
},
|
|
3916
|
-
loadData: {
|
|
3917
|
-
type: [Function, void 0],
|
|
3918
|
-
default: void 0
|
|
3919
|
-
}
|
|
3920
|
-
},
|
|
3921
|
-
setup(T, { emit: V }) {
|
|
3922
|
-
const s = T, e = H({
|
|
3923
|
-
loading: !1,
|
|
3924
|
-
columns: [],
|
|
3925
|
-
items: [],
|
|
3926
|
-
all: !1,
|
|
3927
|
-
// 下载所有
|
|
3928
|
-
onlySelection: !1,
|
|
3929
|
-
// 只下载选中项
|
|
3930
|
-
remoteDownload: !1,
|
|
3931
|
-
// 远程下载
|
|
3932
|
-
filename: "",
|
|
3933
|
-
// 文件名
|
|
3934
|
-
useCountryName: !1,
|
|
3935
|
-
// 使用国家名称
|
|
3936
|
-
widthTableHead: !0,
|
|
3937
|
-
allData: []
|
|
3938
|
-
}), { proxy: t } = ee(), S = Ue();
|
|
3939
|
-
ue(() => {
|
|
3940
|
-
o();
|
|
3941
|
-
});
|
|
3942
|
-
const o = () => {
|
|
3943
|
-
f(), O();
|
|
3944
|
-
}, f = () => {
|
|
3945
|
-
A.value.length && (e.onlySelection = !0);
|
|
3946
|
-
}, O = () => {
|
|
3947
|
-
const d = JSON.parse(localStorage.getItem(y.value)) || [], m = [], R = [];
|
|
3948
|
-
d.forEach((U) => {
|
|
3949
|
-
U.prop && (m.push(U), U.visible && R.push(U.prop));
|
|
3950
|
-
}), e.columns = m, e.items = R;
|
|
3951
|
-
}, D = (d) => {
|
|
3952
|
-
d && !e.allData.length && C();
|
|
3953
|
-
}, C = async () => {
|
|
3954
|
-
e.loading = !0;
|
|
3955
|
-
const { list: d, total: m } = await s.loadData({
|
|
3956
|
-
pageStart: 1,
|
|
3957
|
-
pageSize: 99999
|
|
3958
|
-
});
|
|
3959
|
-
e.loading = !1, m && (e.allData = d);
|
|
3960
|
-
}, w = () => {
|
|
3961
|
-
}, _ = (d = ",", m) => {
|
|
3962
|
-
const R = e.items.map((q) => k.value[q].label);
|
|
3963
|
-
let U = [];
|
|
3964
|
-
e.all ? U = e.allData : e.onlySelection ? U = A.value : U = B.value;
|
|
3965
|
-
const ne = U.map((q) => {
|
|
3966
|
-
const se = [];
|
|
3967
|
-
return e.items.forEach((F) => {
|
|
3968
|
-
if (["country"].includes(F))
|
|
3969
|
-
if (e.useCountryName) {
|
|
3970
|
-
const ce = window.$getType(q[F]);
|
|
3971
|
-
let J;
|
|
3972
|
-
ce === "Array" ? J = q[F] : J = q[F].split(","), J = J.map((_e) => fe("country.asaObj")[_e.toLowerCase()][`label_${i.value}`]), se.push(`"${J.join(",")}"`);
|
|
3973
|
-
} else
|
|
3974
|
-
se.push(`"${q[F]}"`);
|
|
3975
|
-
else if (["spendOrigin"].includes(F)) {
|
|
3976
|
-
const ce = q.currency + " " + (q[`${F}Format`] || q[F]);
|
|
3977
|
-
se.push(`"${ce || "-"}"`);
|
|
3978
|
-
} else {
|
|
3979
|
-
const ce = q[`${F}Format`] || q[F];
|
|
3980
|
-
se.push(`"${ce || "-"}"`);
|
|
3981
|
-
}
|
|
3982
|
-
}), se.join(d);
|
|
3983
|
-
});
|
|
3984
|
-
return m && ne.unshift(R.join(d)), ne.join(`
|
|
3985
|
-
`);
|
|
3986
|
-
}, r = () => {
|
|
3987
|
-
var m;
|
|
3988
|
-
let d = !1;
|
|
3989
|
-
if ((e.onlySelection && ((m = s.params.selection) != null && m.length) || B.value.length) && (d = !0), d) {
|
|
3990
|
-
const R = _(" ", e.withTableHead);
|
|
3991
|
-
window.$copy(R);
|
|
3992
|
-
} else
|
|
3993
|
-
t.$message.info("No Data to Download");
|
|
3994
|
-
}, p = () => {
|
|
3995
|
-
const d = _(",", !0);
|
|
3996
|
-
let m = b.value;
|
|
3997
|
-
e.filename ? m ? m += `_${e.filename}` : m = e.filename : m || (m = h.value), Pe({
|
|
3998
|
-
type: "csv",
|
|
3999
|
-
name: m,
|
|
4000
|
-
data: d
|
|
4001
|
-
});
|
|
4002
|
-
}, i = g(() => window.$getLang()), n = g(() => s.params.tableName), b = g(() => n.value ? `${window.$l(n.value)}_${window.$m().format("YYYYMMDD_hhmmss")}` : ""), y = g(() => s.params.tableName + "_Column"), h = g(() => `${S.name}_${window.$m().format("YYYYMMDD_hhmmss")}`), x = g(() => s.params.useAll && !!s.loadData), k = g(() => {
|
|
4003
|
-
const d = {};
|
|
4004
|
-
return e.columns.forEach((m) => {
|
|
4005
|
-
d[m.prop] = m;
|
|
4006
|
-
}), d;
|
|
4007
|
-
}), B = g(() => {
|
|
4008
|
-
var d;
|
|
4009
|
-
return ((d = s.params) == null ? void 0 : d.list) || [];
|
|
4010
|
-
}), A = g(() => {
|
|
4011
|
-
var d;
|
|
4012
|
-
return ((d = s.params) == null ? void 0 : d.selection) || [];
|
|
4013
|
-
}), a = g(() => e.loading ? !0 : e.all ? !e.allData.length : e.items.length === 0 || B.value.length === 0);
|
|
4014
|
-
return (d, m) => {
|
|
4015
|
-
const R = I("el-checkbox"), U = I("el-button"), ne = I("Alert"), q = I("el-switch"), se = I("el-checkbox-group"), F = I("el-input"), ce = I("DrawerArea");
|
|
4016
|
-
return c(), Y(ce, {
|
|
4017
|
-
loading: l(e).loading,
|
|
4018
|
-
onSubmit: p
|
|
4019
|
-
}, {
|
|
4020
|
-
footer: $(() => [
|
|
4021
|
-
u("div", Ya, [
|
|
4022
|
-
z(F, {
|
|
4023
|
-
modelValue: l(e).filename,
|
|
4024
|
-
"onUpdate:modelValue": m[5] || (m[5] = (J) => l(e).filename = J),
|
|
4025
|
-
clearable: "",
|
|
4026
|
-
placeholder: l(b),
|
|
4027
|
-
class: "inputGroupLeft"
|
|
4028
|
-
}, {
|
|
4029
|
-
prefix: $(() => [...m[7] || (m[7] = [
|
|
4030
|
-
u("i", { class: "imicon im-file" }, null, -1)
|
|
4031
|
-
])]),
|
|
4032
|
-
_: 1
|
|
4033
|
-
}, 8, ["modelValue", "placeholder"]),
|
|
4034
|
-
u("div", Ea, [
|
|
4035
|
-
z(U, {
|
|
4036
|
-
disabled: l(a),
|
|
4037
|
-
plain: "",
|
|
4038
|
-
type: "primary",
|
|
4039
|
-
onClick: p
|
|
4040
|
-
}, {
|
|
4041
|
-
icon: $(() => [...m[8] || (m[8] = [
|
|
4042
|
-
u("i", { class: "imicon im-download1" }, null, -1)
|
|
4043
|
-
])]),
|
|
4044
|
-
default: $(() => [
|
|
4045
|
-
u("span", null, N(d.$l("Download")), 1)
|
|
4046
|
-
]),
|
|
4047
|
-
_: 1
|
|
4048
|
-
}, 8, ["disabled"])
|
|
4049
|
-
])
|
|
4050
|
-
])
|
|
4051
|
-
]),
|
|
4052
|
-
default: $(() => [
|
|
4053
|
-
u("div", Sa, [
|
|
4054
|
-
z(ne, null, {
|
|
4055
|
-
default: $(() => [
|
|
4056
|
-
u("div", Ca, [
|
|
4057
|
-
u("span", ka, N(d.$l("Total in Current Page")) + ": ", 1),
|
|
4058
|
-
u("span", xa, N(l(B).length), 1)
|
|
4059
|
-
]),
|
|
4060
|
-
l(x) ? (c(), M("div", Va, [
|
|
4061
|
-
z(R, {
|
|
4062
|
-
modelValue: l(e).all,
|
|
4063
|
-
"onUpdate:modelValue": m[0] || (m[0] = (J) => l(e).all = J),
|
|
4064
|
-
label: d.$l("Download All Data"),
|
|
4065
|
-
class: "h24",
|
|
4066
|
-
onChange: D
|
|
4067
|
-
}, null, 8, ["modelValue", "label"]),
|
|
4068
|
-
l(e).allData.length ? (c(), M("div", Oa, [
|
|
4069
|
-
u("span", Da, N(d.$l("Total in All Page")) + ":", 1),
|
|
4070
|
-
u("span", Aa, N(l(e).allData.length), 1)
|
|
4071
|
-
])) : L("", !0)
|
|
4072
|
-
])) : L("", !0),
|
|
4073
|
-
l(A).length ? (c(), M("div", Ta, [
|
|
4074
|
-
u("span", Ma, N(d.$l("Selected")), 1),
|
|
4075
|
-
u("span", Na, N(l(A).length), 1),
|
|
4076
|
-
z(R, {
|
|
4077
|
-
modelValue: l(e).onlySelection,
|
|
4078
|
-
"onUpdate:modelValue": m[1] || (m[1] = (J) => l(e).onlySelection = J),
|
|
4079
|
-
label: d.$l("Only Selection"),
|
|
4080
|
-
disabled: l(e).all,
|
|
4081
|
-
class: "h24"
|
|
4082
|
-
}, null, 8, ["modelValue", "label", "disabled"])
|
|
4083
|
-
])) : L("", !0),
|
|
4084
|
-
u("div", Ia, [
|
|
4085
|
-
z(U, {
|
|
4086
|
-
plain: "",
|
|
4087
|
-
size: "default",
|
|
4088
|
-
onClick: r
|
|
4089
|
-
}, {
|
|
4090
|
-
icon: $(() => [...m[6] || (m[6] = [
|
|
4091
|
-
u("i", { class: "imicon im-copy" }, null, -1)
|
|
4092
|
-
])]),
|
|
4093
|
-
default: $(() => [
|
|
4094
|
-
u("span", za, N(d.$l("Copy to Clipboard")), 1),
|
|
4095
|
-
z(R, {
|
|
4096
|
-
modelValue: l(e).withTableHead,
|
|
4097
|
-
"onUpdate:modelValue": m[2] || (m[2] = (J) => l(e).withTableHead = J),
|
|
4098
|
-
label: d.$l("With Table Head"),
|
|
4099
|
-
onClick: he((J) => null, ["stop"])
|
|
4100
|
-
}, null, 8, ["modelValue", "label"])
|
|
4101
|
-
]),
|
|
4102
|
-
_: 1
|
|
4103
|
-
})
|
|
4104
|
-
])
|
|
4105
|
-
]),
|
|
4106
|
-
_: 1
|
|
4107
|
-
})
|
|
4108
|
-
]),
|
|
4109
|
-
u("div", Ba, [
|
|
4110
|
-
u("div", ja, N(d.$l("What do you want to Download?")), 1),
|
|
4111
|
-
z(se, {
|
|
4112
|
-
modelValue: l(e).items,
|
|
4113
|
-
"onUpdate:modelValue": m[4] || (m[4] = (J) => l(e).items = J)
|
|
4114
|
-
}, {
|
|
4115
|
-
default: $(() => [
|
|
4116
|
-
(c(!0), M(re, null, ie(l(e).columns, (J, _e) => (c(), Y(R, {
|
|
4117
|
-
key: J.prop,
|
|
4118
|
-
value: J.prop,
|
|
4119
|
-
class: "wp100 p0-16 h36 hover-bg-gray1"
|
|
4120
|
-
}, {
|
|
4121
|
-
default: $(() => [
|
|
4122
|
-
u("span", La, N(J.label), 1),
|
|
4123
|
-
J.prop === "country" ? (c(), Y(q, {
|
|
4124
|
-
key: 0,
|
|
4125
|
-
modelValue: l(e).useCountryName,
|
|
4126
|
-
"onUpdate:modelValue": m[3] || (m[3] = (we) => l(e).useCountryName = we),
|
|
4127
|
-
"inline-prompt": "",
|
|
4128
|
-
"active-text": " Use name ",
|
|
4129
|
-
"inactive-text": " Use Alpha-2 code ",
|
|
4130
|
-
onChange: w
|
|
4131
|
-
}, null, 8, ["modelValue"])) : L("", !0)
|
|
4132
|
-
]),
|
|
4133
|
-
_: 2
|
|
4134
|
-
}, 1032, ["value"]))), 128))
|
|
4135
|
-
]),
|
|
4136
|
-
_: 1
|
|
4137
|
-
}, 8, ["modelValue"])
|
|
4138
|
-
])
|
|
4139
|
-
]),
|
|
4140
|
-
_: 1
|
|
4141
|
-
}, 8, ["loading"]);
|
|
4142
|
-
};
|
|
4143
|
-
}
|
|
4144
|
-
}), Pa = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
4145
|
-
__proto__: null,
|
|
4146
|
-
default: Fa
|
|
4147
|
-
}, Symbol.toStringTag, { value: "Module" })), Ua = { class: "SuperCountryAso relative" }, Ga = { class: "flexMode hr" }, Ha = E({
|
|
4148
|
-
name: "SuperCountryAso"
|
|
4149
|
-
}), Ja = /* @__PURE__ */ Object.assign(Ha, {
|
|
4150
|
-
props: {
|
|
4151
|
-
modelValue: {
|
|
4152
|
-
type: [String, Array],
|
|
4153
|
-
default: ""
|
|
4154
|
-
},
|
|
4155
|
-
multiple: {
|
|
4156
|
-
type: Boolean,
|
|
4157
|
-
default: !1
|
|
4158
|
-
},
|
|
4159
|
-
limit: {
|
|
4160
|
-
type: Number,
|
|
4161
|
-
default: 0
|
|
4162
|
-
},
|
|
4163
|
-
useFooter: {
|
|
4164
|
-
type: Boolean,
|
|
4165
|
-
default: !1
|
|
4166
|
-
},
|
|
4167
|
-
nowrap: {
|
|
4168
|
-
type: Boolean,
|
|
4169
|
-
default: !1
|
|
4170
|
-
},
|
|
4171
|
-
useAll: {
|
|
4172
|
-
type: Boolean,
|
|
4173
|
-
default: !1
|
|
4174
|
-
},
|
|
4175
|
-
allValue: {
|
|
4176
|
-
type: [String, Number],
|
|
4177
|
-
default: "all"
|
|
4178
|
-
}
|
|
4179
|
-
},
|
|
4180
|
-
emits: [
|
|
4181
|
-
"to-change",
|
|
4182
|
-
"update:modelValue",
|
|
4183
|
-
"confirm",
|
|
4184
|
-
"update:name"
|
|
4185
|
-
],
|
|
4186
|
-
setup(T, { emit: V }) {
|
|
4187
|
-
const s = T, { proxy: e } = ee(), S = pe("store").common(), o = H({
|
|
4188
|
-
loading: !1,
|
|
4189
|
-
v: "",
|
|
4190
|
-
arr: []
|
|
4191
|
-
}), f = V, O = (r) => {
|
|
4192
|
-
f("update:modelValue", r), f("to-change", r);
|
|
4193
|
-
}, D = (r) => {
|
|
4194
|
-
let p = [];
|
|
4195
|
-
S.countryOptions.forEach((i) => {
|
|
4196
|
-
r.forEach((n) => {
|
|
4197
|
-
i.value === n && p.push(i.label);
|
|
4198
|
-
});
|
|
4199
|
-
}), f("update:modelValue", r), f("update:name", p.join(", ")), f("to-change", r);
|
|
4200
|
-
}, C = () => {
|
|
4201
|
-
f("update:modelValue", o.arr), f("confirm", o.arr), e.$refs.multiple.blur();
|
|
4202
|
-
}, w = g(() => S.countryOptions), _ = g(() => window.$l("Countries or Regions"));
|
|
4203
|
-
return Z(
|
|
4204
|
-
() => s.modelValue,
|
|
4205
|
-
(r, p) => {
|
|
4206
|
-
r && JSON.stringify(r) !== JSON.stringify(p) && (s.multiple ? o.arr = r : o.v = r);
|
|
4207
|
-
},
|
|
4208
|
-
{
|
|
4209
|
-
immediate: !0
|
|
4210
|
-
}
|
|
4211
|
-
), (r, p) => {
|
|
4212
|
-
const i = I("IconLoading"), n = I("CountryItem"), b = I("el-option"), y = I("el-select"), h = I("el-button"), x = I("MultipleSelect");
|
|
4213
|
-
return c(), M("div", Ua, [
|
|
4214
|
-
l(o).loading ? (c(), Y(i, { key: 0 })) : L("", !0),
|
|
4215
|
-
s.multiple ? (c(), Y(x, Q({
|
|
4216
|
-
key: 2,
|
|
4217
|
-
ref: "multiple",
|
|
4218
|
-
modelValue: l(o).arr,
|
|
4219
|
-
"onUpdate:modelValue": p[1] || (p[1] = (k) => l(o).arr = k),
|
|
4220
|
-
options: l(w),
|
|
4221
|
-
placeholder: l(_)
|
|
4222
|
-
}, r.$attrs, {
|
|
4223
|
-
"multiple-limit": s.limit,
|
|
4224
|
-
onChange: D
|
|
4225
|
-
}), oe({
|
|
4226
|
-
default: $(({ it: k }) => [
|
|
4227
|
-
z(n, {
|
|
4228
|
-
name: k.value_lower
|
|
4229
|
-
}, null, 8, ["name"])
|
|
4230
|
-
]),
|
|
4231
|
-
_: 2
|
|
4232
|
-
}, [
|
|
4233
|
-
s.useFooter ? {
|
|
4234
|
-
name: "footer",
|
|
4235
|
-
fn: $(() => [
|
|
4236
|
-
u("div", Ga, [
|
|
4237
|
-
z(h, {
|
|
4238
|
-
type: "primary",
|
|
4239
|
-
onClick: C
|
|
4240
|
-
}, {
|
|
4241
|
-
icon: $(() => [...p[2] || (p[2] = [
|
|
4242
|
-
u("i", { class: "imicon im-search" }, null, -1)
|
|
4243
|
-
])]),
|
|
4244
|
-
default: $(() => [
|
|
4245
|
-
ae(" " + N(r.$l("Confirm")), 1)
|
|
4246
|
-
]),
|
|
4247
|
-
_: 1
|
|
4248
|
-
})
|
|
4249
|
-
])
|
|
4250
|
-
]),
|
|
4251
|
-
key: "0"
|
|
4252
|
-
} : void 0
|
|
4253
|
-
]), 1040, ["modelValue", "options", "placeholder", "multiple-limit"])) : (c(), Y(y, Q({
|
|
4254
|
-
key: 1,
|
|
4255
|
-
modelValue: l(o).v,
|
|
4256
|
-
"onUpdate:modelValue": p[0] || (p[0] = (k) => l(o).v = k),
|
|
4257
|
-
filterable: "",
|
|
4258
|
-
placeholder: l(_),
|
|
4259
|
-
class: "wp100"
|
|
4260
|
-
}, r.$attrs, { onChange: O }), oe({
|
|
4261
|
-
default: $(() => [
|
|
4262
|
-
s.useAll ? (c(), Y(b, {
|
|
4263
|
-
key: 0,
|
|
4264
|
-
label: r.$l("All"),
|
|
4265
|
-
value: s.allValue
|
|
4266
|
-
}, null, 8, ["label", "value"])) : L("", !0),
|
|
4267
|
-
(c(!0), M(re, null, ie(l(w), (k, B) => (c(), Y(b, {
|
|
4268
|
-
key: k.value,
|
|
4269
|
-
label: r.$l(k.label),
|
|
4270
|
-
value: k.value_lower
|
|
4271
|
-
}, {
|
|
4272
|
-
default: $(() => [
|
|
4273
|
-
z(n, {
|
|
4274
|
-
name: k.value_lower
|
|
4275
|
-
}, null, 8, ["name"])
|
|
4276
|
-
]),
|
|
4277
|
-
_: 2
|
|
4278
|
-
}, 1032, ["label", "value"]))), 128))
|
|
4279
|
-
]),
|
|
4280
|
-
_: 2
|
|
4281
|
-
}, [
|
|
4282
|
-
l(o).v ? {
|
|
4283
|
-
name: "prefix",
|
|
4284
|
-
fn: $(() => [
|
|
4285
|
-
z(n, {
|
|
4286
|
-
name: l(o).v,
|
|
4287
|
-
nolabel: ""
|
|
4288
|
-
}, null, 8, ["name"])
|
|
4289
|
-
]),
|
|
4290
|
-
key: "0"
|
|
4291
|
-
} : void 0
|
|
4292
|
-
]), 1040, ["modelValue", "placeholder"]))
|
|
4293
|
-
]);
|
|
4294
|
-
};
|
|
4295
|
-
}
|
|
4296
|
-
}), Ka = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
4297
|
-
__proto__: null,
|
|
4298
|
-
default: Ja
|
|
4299
|
-
}, Symbol.toStringTag, { value: "Module" })), Wa = { class: "SuperCountryDiy" }, qa = { class: "flexMode hr" }, Za = E({
|
|
4300
|
-
name: "SuperCountryDiy"
|
|
4301
|
-
}), Qa = /* @__PURE__ */ Object.assign(Za, {
|
|
4302
|
-
props: {
|
|
4303
|
-
modelValue: {
|
|
4304
|
-
tupe: [Array, String],
|
|
4305
|
-
default: ""
|
|
4306
|
-
},
|
|
4307
|
-
multiple: {
|
|
4308
|
-
type: Boolean,
|
|
4309
|
-
default: !1
|
|
4310
|
-
},
|
|
4311
|
-
useFooter: {
|
|
4312
|
-
type: Boolean,
|
|
4313
|
-
default: !1
|
|
4314
|
-
},
|
|
4315
|
-
placeholder: {
|
|
4316
|
-
type: String,
|
|
4317
|
-
default: ""
|
|
4318
|
-
},
|
|
4319
|
-
options: {
|
|
4320
|
-
type: Array,
|
|
4321
|
-
default: () => []
|
|
4322
|
-
}
|
|
4323
|
-
},
|
|
4324
|
-
emits: ["change", "update:modelValue"],
|
|
4325
|
-
setup(T, { emit: V }) {
|
|
4326
|
-
const s = T, e = H({
|
|
4327
|
-
single: "",
|
|
4328
|
-
multiple: []
|
|
4329
|
-
}), { proxy: t } = ee(), S = V, o = () => {
|
|
4330
|
-
t.$refs.multiple.blur();
|
|
4331
|
-
}, f = (C) => {
|
|
4332
|
-
S("update:modelValue", C), S("change", C);
|
|
4333
|
-
}, O = g(() => s.placeholder ? window.$l(s.placeholder) : window.$l("Country or Region")), D = g(() => s.options.sort((C, w) => C.label.localeCompare(w.label)));
|
|
4334
|
-
return Z(
|
|
4335
|
-
() => s.modelValue,
|
|
4336
|
-
(C, w) => {
|
|
4337
|
-
JSON.stringify(C) !== JSON.stringify(w) && (s.multiple ? e.multiple = C : e.single = C);
|
|
4338
|
-
},
|
|
4339
|
-
{
|
|
4340
|
-
immediate: !0
|
|
4341
|
-
}
|
|
4342
|
-
), (C, w) => {
|
|
4343
|
-
const _ = I("CountryItem"), r = I("el-button"), p = I("MultipleSelect"), i = I("el-option"), n = I("el-select");
|
|
4344
|
-
return c(), M("div", Wa, [
|
|
4345
|
-
s.multiple ? (c(), Y(p, Q({
|
|
4346
|
-
key: 0,
|
|
4347
|
-
ref: "multiple",
|
|
4348
|
-
modelValue: l(e).multiple,
|
|
4349
|
-
"onUpdate:modelValue": w[0] || (w[0] = (b) => l(e).multiple = b),
|
|
4350
|
-
placeholder: l(O)
|
|
4351
|
-
}, C.$attrs, {
|
|
4352
|
-
options: l(D),
|
|
4353
|
-
onChange: f
|
|
4354
|
-
}), oe({
|
|
4355
|
-
default: $(({ it: b }) => [
|
|
4356
|
-
z(_, {
|
|
4357
|
-
name: b.value
|
|
4358
|
-
}, null, 8, ["name"])
|
|
4359
|
-
]),
|
|
4360
|
-
_: 2
|
|
4361
|
-
}, [
|
|
4362
|
-
s.useFooter ? {
|
|
4363
|
-
name: "footer",
|
|
4364
|
-
fn: $(() => [
|
|
4365
|
-
u("div", qa, [
|
|
4366
|
-
z(r, {
|
|
4367
|
-
type: "primary",
|
|
4368
|
-
onClick: o
|
|
4369
|
-
}, {
|
|
4370
|
-
default: $(() => [
|
|
4371
|
-
ae(N(C.$l("Confirm")), 1)
|
|
4372
|
-
]),
|
|
4373
|
-
_: 1
|
|
4374
|
-
})
|
|
4375
|
-
])
|
|
4376
|
-
]),
|
|
4377
|
-
key: "0"
|
|
4378
|
-
} : C.$slots.footer ? {
|
|
4379
|
-
name: "footer",
|
|
4380
|
-
fn: $(() => [
|
|
4381
|
-
W(C.$slots, "footer")
|
|
4382
|
-
]),
|
|
4383
|
-
key: "1"
|
|
4384
|
-
} : void 0
|
|
4385
|
-
]), 1040, ["modelValue", "placeholder", "options"])) : (c(), Y(n, Q({
|
|
4386
|
-
key: 1,
|
|
4387
|
-
modelValue: l(e).single,
|
|
4388
|
-
"onUpdate:modelValue": w[1] || (w[1] = (b) => l(e).single = b),
|
|
4389
|
-
placeholder: l(O)
|
|
4390
|
-
}, C.$attrs, { onChange: f }), oe({
|
|
4391
|
-
default: $(() => [
|
|
4392
|
-
(c(!0), M(re, null, ie(l(D), (b, y) => (c(), Y(i, {
|
|
4393
|
-
key: y,
|
|
4394
|
-
label: C.$l(b.label),
|
|
4395
|
-
value: b.value
|
|
4396
|
-
}, {
|
|
4397
|
-
default: $(() => [
|
|
4398
|
-
z(_, {
|
|
4399
|
-
name: b.value
|
|
4400
|
-
}, null, 8, ["name"])
|
|
4401
|
-
]),
|
|
4402
|
-
_: 2
|
|
4403
|
-
}, 1032, ["label", "value"]))), 128))
|
|
4404
|
-
]),
|
|
4405
|
-
_: 2
|
|
4406
|
-
}, [
|
|
4407
|
-
l(e).single ? {
|
|
4408
|
-
name: "prefix",
|
|
4409
|
-
fn: $(() => [
|
|
4410
|
-
z(_, {
|
|
4411
|
-
name: l(e).single,
|
|
4412
|
-
nolabel: ""
|
|
4413
|
-
}, null, 8, ["name"])
|
|
4414
|
-
]),
|
|
4415
|
-
key: "0"
|
|
4416
|
-
} : void 0
|
|
4417
|
-
]), 1040, ["modelValue", "placeholder"]))
|
|
4418
|
-
]);
|
|
4419
|
-
};
|
|
4420
|
-
}
|
|
4421
|
-
}), Xa = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
4422
|
-
__proto__: null,
|
|
4423
|
-
default: Qa
|
|
4424
|
-
}, Symbol.toStringTag, { value: "Module" }));
|
|
4425
|
-
export {
|
|
4426
|
-
dn as c
|
|
4427
|
-
};
|