magtool 1.5.1 → 1.5.2
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/component.js +44 -37
- package/dist/composition.js +25 -52
- package/dist/index.js +1 -1
- package/dist/store.js +17 -640
- package/dist/vendor.js +21 -41998
- package/package.json +1 -5
package/dist/component.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { createElementBlock as M, openBlock as p, normalizeStyle as se, unref as t, createCommentVNode as B, createElementVNode as c, normalizeClass as G, renderSlot as H, toDisplayString as I,
|
|
2
|
-
import { _ as ae
|
|
1
|
+
import { createElementBlock as M, openBlock as p, normalizeStyle as se, unref as t, createCommentVNode as B, createElementVNode as c, normalizeClass as G, renderSlot as H, toDisplayString as I, resolveComponent as D, createVNode as N, markRaw as we, mergeProps as K, withCtx as _, resolveDirective as be, withDirectives as ve, createBlock as Y, withKeys as ye, createSlots as ee, Fragment as oe, renderList as le, createTextVNode as te, defineComponent as $e, reactive as Se, onBeforeMount as Ce, withModifiers as ie, resolveDynamicComponent as ke, nextTick as pe } from "vue";
|
|
2
|
+
import { _ as ae } from "./vendor.js";
|
|
3
|
+
import { dayjs as xe } from "element-plus";
|
|
3
4
|
import { u as Ve } from "./composition.js";
|
|
4
5
|
import me from "vuedraggable";
|
|
5
6
|
const Te = { class: "fw700" }, Oe = /* @__PURE__ */ Object.assign({
|
|
@@ -147,7 +148,7 @@ const Te = { class: "fw700" }, Oe = /* @__PURE__ */ Object.assign({
|
|
|
147
148
|
},
|
|
148
149
|
emits: ["change", "update:modelValue"],
|
|
149
150
|
setup(A, { expose: x, emit: s }) {
|
|
150
|
-
|
|
151
|
+
xe.en.weekStart = 7;
|
|
151
152
|
const e = A, o = reactive({
|
|
152
153
|
type: "",
|
|
153
154
|
date: [],
|
|
@@ -303,29 +304,32 @@ const Te = { class: "fw700" }, Oe = /* @__PURE__ */ Object.assign({
|
|
|
303
304
|
}
|
|
304
305
|
), x({
|
|
305
306
|
setDate: d
|
|
306
|
-
}), (l, n) =>
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
307
|
+
}), (l, n) => {
|
|
308
|
+
const S = D("el-date-picker");
|
|
309
|
+
return p(), M("div", Ae, [
|
|
310
|
+
N(S, {
|
|
311
|
+
modelValue: t(o).date,
|
|
312
|
+
"onUpdate:modelValue": n[0] || (n[0] = (L) => t(o).date = L),
|
|
313
|
+
class: "wp100",
|
|
314
|
+
"popper-class": t(i),
|
|
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: t(o).shortBtn,
|
|
322
|
+
"end-placeholder": l.$l(t(z).end),
|
|
323
|
+
"start-placeholder": l.$l(t(z).start),
|
|
324
|
+
"disabled-date": a,
|
|
325
|
+
placement: e.placement,
|
|
326
|
+
disabled: e.disabled,
|
|
327
|
+
source: e.source,
|
|
328
|
+
onChange: k,
|
|
329
|
+
onCalendarChange: y
|
|
330
|
+
}, null, 8, ["modelValue", "popper-class", "size", "range-separator", "shortcuts", "end-placeholder", "start-placeholder", "placement", "disabled", "source"])
|
|
331
|
+
]);
|
|
332
|
+
};
|
|
329
333
|
}
|
|
330
334
|
}), Ie = { class: "EChart" }, Ne = ["id"], ze = /* @__PURE__ */ Object.assign({
|
|
331
335
|
name: "EChart"
|
|
@@ -417,7 +421,7 @@ const Te = { class: "fw700" }, Oe = /* @__PURE__ */ Object.assign({
|
|
|
417
421
|
onBeforeMount(() => {
|
|
418
422
|
a.chartID = `chart${+/* @__PURE__ */ new Date()}${parseInt(Math.random() * 1e4)}`;
|
|
419
423
|
}), onMounted(() => {
|
|
420
|
-
a.mounted = !0, a.chart =
|
|
424
|
+
a.mounted = !0, a.chart = we(
|
|
421
425
|
window.$echarts.init(o.$refs.chart, { renderer: "svg" })
|
|
422
426
|
);
|
|
423
427
|
});
|
|
@@ -759,9 +763,9 @@ const Te = { class: "fw700" }, Oe = /* @__PURE__ */ Object.assign({
|
|
|
759
763
|
), x({
|
|
760
764
|
focus: f
|
|
761
765
|
}), (u, m) => {
|
|
762
|
-
const $ = D("el-input"), d =
|
|
766
|
+
const $ = D("el-input"), d = be("focus");
|
|
763
767
|
return p(), M("div", Ue, [
|
|
764
|
-
|
|
768
|
+
ve((p(), Y($, K({
|
|
765
769
|
ref: "input",
|
|
766
770
|
modelValue: t(o).v,
|
|
767
771
|
"onUpdate:modelValue": m[0] || (m[0] = (i) => t(o).v = i),
|
|
@@ -1296,7 +1300,7 @@ const Te = { class: "fw700" }, Oe = /* @__PURE__ */ Object.assign({
|
|
|
1296
1300
|
])) : B("", !0)
|
|
1297
1301
|
], 4));
|
|
1298
1302
|
}
|
|
1299
|
-
}), St = /* @__PURE__ */ ae($t, [["__scopeId", "data-v-3becf565"]]), Ct =
|
|
1303
|
+
}), St = /* @__PURE__ */ ae($t, [["__scopeId", "data-v-3becf565"]]), Ct = $e({
|
|
1300
1304
|
name: "MvcTableColumnFilter",
|
|
1301
1305
|
props: {
|
|
1302
1306
|
tableName: {
|
|
@@ -1310,7 +1314,7 @@ const Te = { class: "fw700" }, Oe = /* @__PURE__ */ Object.assign({
|
|
|
1310
1314
|
},
|
|
1311
1315
|
setup: (A, x) => {
|
|
1312
1316
|
var y;
|
|
1313
|
-
const s =
|
|
1317
|
+
const s = Se({
|
|
1314
1318
|
options: [],
|
|
1315
1319
|
slots: []
|
|
1316
1320
|
}), e = A.tableName + "_Column";
|
|
@@ -1625,7 +1629,7 @@ const Te = { class: "fw700" }, Oe = /* @__PURE__ */ Object.assign({
|
|
|
1625
1629
|
}), { proxy: h } = getCurrentInstance();
|
|
1626
1630
|
inject("store").table();
|
|
1627
1631
|
const y = ref();
|
|
1628
|
-
|
|
1632
|
+
Ce(() => {
|
|
1629
1633
|
o.tableId = `Table${+/* @__PURE__ */ new Date()}_${window.$rn(9999)}`;
|
|
1630
1634
|
});
|
|
1631
1635
|
const k = s, V = async (j = {}) => {
|
|
@@ -3101,7 +3105,7 @@ ${C.value}` : `${C.value}`), m = computed(() => r.value ? e.modelValue.join(e.se
|
|
|
3101
3105
|
return (y, k) => (p(), M("div", {
|
|
3102
3106
|
class: G(["SuperCountry", o.nowrap && "nowrap"])
|
|
3103
3107
|
}, [
|
|
3104
|
-
(p(), Y(
|
|
3108
|
+
(p(), Y(ke(t(h)), K(y.$attrs, {
|
|
3105
3109
|
"collapse-tags": t(a),
|
|
3106
3110
|
"collapse-tags-tooltip": t(a)
|
|
3107
3111
|
}), null, 16, ["collapse-tags", "collapse-tags-tooltip"]))
|
|
@@ -3392,7 +3396,7 @@ ${C.value}` : `${C.value}`), m = computed(() => r.value ? e.modelValue.join(e.se
|
|
|
3392
3396
|
]);
|
|
3393
3397
|
};
|
|
3394
3398
|
}
|
|
3395
|
-
}),
|
|
3399
|
+
}), _e = {
|
|
3396
3400
|
Card: Me,
|
|
3397
3401
|
DatePicker: De,
|
|
3398
3402
|
EChart: je,
|
|
@@ -3415,6 +3419,9 @@ ${C.value}` : `${C.value}`), m = computed(() => r.value ? e.modelValue.join(e.se
|
|
|
3415
3419
|
Org: Go,
|
|
3416
3420
|
StatusItem: Jo,
|
|
3417
3421
|
StatusSelect: Wo
|
|
3422
|
+
}, Zl = (A) => {
|
|
3423
|
+
for (let x in _e)
|
|
3424
|
+
A.component(x, _e[x]);
|
|
3418
3425
|
}, qo = { class: "dragCenter flexMode vc flexGrow txt-nowrap" }, Zo = { class: "pl10 fs14 txt-h2" }, Qo = { class: "pb5 fs12 txt-primary3" }, Xo = /* @__PURE__ */ Object.assign({
|
|
3419
3426
|
name: "ColumnConfigDragItem"
|
|
3420
3427
|
}, {
|
|
@@ -3882,7 +3889,7 @@ ${C.value}` : `${C.value}`), m = computed(() => r.value ? e.modelValue.join(e.se
|
|
|
3882
3889
|
return e.items.length === 0 || g.value.length === 0 || !!((l = s.params) != null && l.loading);
|
|
3883
3890
|
});
|
|
3884
3891
|
return (l, n) => {
|
|
3885
|
-
const S = D("el-checkbox"), L = D("el-button"), R = D("Alert"), U = D("el-switch"), Z = D("el-checkbox-group"), W = D("el-input"), P = D("DrawerArea"), ne =
|
|
3892
|
+
const S = D("el-checkbox"), L = D("el-button"), R = D("Alert"), U = D("el-switch"), Z = D("el-checkbox-group"), W = D("el-input"), P = D("DrawerArea"), ne = be("loading");
|
|
3886
3893
|
return p(), Y(P, { onSubmit: C }, {
|
|
3887
3894
|
footer: _(() => [
|
|
3888
3895
|
c("div", Il, [
|
|
@@ -3917,7 +3924,7 @@ ${C.value}` : `${C.value}`), m = computed(() => r.value ? e.modelValue.join(e.se
|
|
|
3917
3924
|
])
|
|
3918
3925
|
]),
|
|
3919
3926
|
default: _(() => [
|
|
3920
|
-
|
|
3927
|
+
ve((p(), M("div", bl, [
|
|
3921
3928
|
N(R, null, {
|
|
3922
3929
|
default: _(() => [
|
|
3923
3930
|
c("div", vl, [
|
|
@@ -4297,5 +4304,5 @@ ${C.value}` : `${C.value}`), m = computed(() => r.value ? e.modelValue.join(e.se
|
|
|
4297
4304
|
default: Fl
|
|
4298
4305
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
4299
4306
|
export {
|
|
4300
|
-
|
|
4307
|
+
Zl as c
|
|
4301
4308
|
};
|
package/dist/composition.js
CHANGED
|
@@ -1,36 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
function y({
|
|
4
|
-
afterComposition: e,
|
|
5
|
-
emit: r
|
|
6
|
-
}) {
|
|
7
|
-
const p = P(!1), d = (a) => {
|
|
8
|
-
r == null || r("compositionstart", a), p.value = !0;
|
|
9
|
-
}, o = (a) => {
|
|
10
|
-
var m;
|
|
11
|
-
r == null || r("compositionupdate", a);
|
|
12
|
-
const f = (m = a.target) == null ? void 0 : m.value, c = f[f.length - 1] || "";
|
|
13
|
-
p.value = !h(c);
|
|
14
|
-
}, s = (a) => {
|
|
15
|
-
r == null || r("compositionend", a), p.value && (p.value = !1, g(() => e(a)));
|
|
16
|
-
};
|
|
17
|
-
return {
|
|
18
|
-
isComposing: p,
|
|
19
|
-
handleComposition: (a) => {
|
|
20
|
-
a.type === "compositionend" ? s(a) : o(a);
|
|
21
|
-
},
|
|
22
|
-
handleCompositionStart: d,
|
|
23
|
-
handleCompositionUpdate: o,
|
|
24
|
-
handleCompositionEnd: s
|
|
25
|
-
};
|
|
26
|
-
}
|
|
27
|
-
const M = ({ columns: e, data: r, currency: p = "", channel: d = "" }) => {
|
|
28
|
-
if (!r.length || !e.length)
|
|
1
|
+
const C = ({ columns: i, data: e, currency: l = "", channel: P = "" }) => {
|
|
2
|
+
if (!e.length || !i.length)
|
|
29
3
|
return [];
|
|
30
4
|
const o = {
|
|
31
5
|
spend: {
|
|
32
6
|
prop: "spend",
|
|
33
|
-
prefix:
|
|
7
|
+
prefix: l,
|
|
34
8
|
format: (t) => window.$fa(t, 2)
|
|
35
9
|
},
|
|
36
10
|
taps: {
|
|
@@ -61,7 +35,7 @@ const M = ({ columns: e, data: r, currency: p = "", channel: d = "" }) => {
|
|
|
61
35
|
prop: "revenue",
|
|
62
36
|
format: (t) => window.$fa(t, 2)
|
|
63
37
|
}
|
|
64
|
-
}, s = [],
|
|
38
|
+
}, s = [], a = {
|
|
65
39
|
avgCPT: {},
|
|
66
40
|
avgCPA: {},
|
|
67
41
|
avgCPM: {},
|
|
@@ -71,36 +45,35 @@ const M = ({ columns: e, data: r, currency: p = "", channel: d = "" }) => {
|
|
|
71
45
|
mmpInstalls: {},
|
|
72
46
|
mmpCPI: {}
|
|
73
47
|
};
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
const
|
|
77
|
-
if (
|
|
78
|
-
|
|
79
|
-
let
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
}),
|
|
48
|
+
i.forEach((t, r) => {
|
|
49
|
+
a[t.property] && (a[t.property].i = r);
|
|
50
|
+
const p = o[t.property];
|
|
51
|
+
if (p) {
|
|
52
|
+
p.i = r;
|
|
53
|
+
let n = window.$bigNumber(0);
|
|
54
|
+
e.forEach((d) => {
|
|
55
|
+
n = n.plus(d[t.property] || 0);
|
|
56
|
+
}), n = n.toNumber(), p.total = n, s.push(n);
|
|
83
57
|
} else
|
|
84
58
|
s.push("");
|
|
85
59
|
}), Object.keys(o).forEach((t) => {
|
|
86
|
-
const
|
|
87
|
-
|
|
60
|
+
const r = o[t];
|
|
61
|
+
r.format && s[r.i] && (s[r.i] = r.format(s[r.i]));
|
|
88
62
|
});
|
|
89
63
|
const m = o.taps.total ? window.$fa(o.spend.total / o.taps.total) : "0.00";
|
|
90
|
-
s[
|
|
64
|
+
s[a.avgCPT.i] = m;
|
|
91
65
|
const f = o.installs.total ? window.$fa(o.spend.total / o.installs.total) : "0.00";
|
|
92
|
-
if (s[
|
|
66
|
+
if (s[a.avgCPA.i] = f, a.avgCPM.i !== void 0) {
|
|
93
67
|
const t = o.impressions.total ? window.$fa(o.spend.total / (o.impressions.total / 1e3)) : "0.00";
|
|
94
|
-
s[
|
|
68
|
+
s[a.avgCPM.i] = t;
|
|
95
69
|
}
|
|
96
|
-
const
|
|
97
|
-
s[
|
|
98
|
-
const
|
|
99
|
-
s[
|
|
100
|
-
const
|
|
101
|
-
return s[
|
|
70
|
+
const w = o.taps.total ? window.$fa(o.installs.total / o.taps.total * 100) : "0.00";
|
|
71
|
+
s[a.cr.i] = w;
|
|
72
|
+
const c = o.impressions.total ? window.$fa(o.taps.total / o.impressions.total * 100) : "0.00";
|
|
73
|
+
s[a.ttr.i] = c;
|
|
74
|
+
const u = o.impressions.total ? window.$fa(o.installs.total * 1e3 / o.impressions.total) : "0.00";
|
|
75
|
+
return s[a.IPM.i] = u, s;
|
|
102
76
|
};
|
|
103
77
|
export {
|
|
104
|
-
|
|
105
|
-
M as u
|
|
78
|
+
C as u
|
|
106
79
|
};
|