magtool 1.5.38 → 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/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 +2 -2
- package/dist/util.js +5 -5
- package/dist/vendor.js +17 -14
- package/package.json +1 -1
- package/dist/component.js +0 -4427
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
import { defineComponent as D, reactive as I, inject as N, onMounted as L, computed as m, watch as k, resolveComponent as i, createElementBlock as w, openBlock as c, createBlock as b, createCommentVNode as $, createVNode as f, unref as n, mergeProps as j, createSlots as E, withCtx as g, Fragment as M, renderList as F, createElementVNode as _, toDisplayString as y } from "vue";
|
|
2
|
+
const P = { class: "SuperAiApp relative" }, U = { class: "flexMode vc g8" }, q = { class: "txt-nowrap" }, z = { class: "txt-dark5" }, G = D({
|
|
3
|
+
name: "SuperAiApp"
|
|
4
|
+
}), K = /* @__PURE__ */ Object.assign(G, {
|
|
5
|
+
props: {
|
|
6
|
+
modelValue: {
|
|
7
|
+
type: Number,
|
|
8
|
+
default: null
|
|
9
|
+
},
|
|
10
|
+
multiple: {
|
|
11
|
+
type: Boolean,
|
|
12
|
+
default: !1
|
|
13
|
+
},
|
|
14
|
+
placeholder: {
|
|
15
|
+
type: String,
|
|
16
|
+
default: ""
|
|
17
|
+
},
|
|
18
|
+
useDefault: {
|
|
19
|
+
type: Boolean,
|
|
20
|
+
default: !1
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
emits: [
|
|
24
|
+
"success",
|
|
25
|
+
"update:icon",
|
|
26
|
+
"update:orgs",
|
|
27
|
+
"update:name"
|
|
28
|
+
],
|
|
29
|
+
setup(V, { emit: S }) {
|
|
30
|
+
const s = V, t = I({
|
|
31
|
+
loading: !1,
|
|
32
|
+
single: "",
|
|
33
|
+
multiple: [],
|
|
34
|
+
options: []
|
|
35
|
+
}), d = N("store").ai();
|
|
36
|
+
L(() => {
|
|
37
|
+
x();
|
|
38
|
+
});
|
|
39
|
+
const l = S, x = async () => {
|
|
40
|
+
if (r.value.length) {
|
|
41
|
+
l("success");
|
|
42
|
+
return;
|
|
43
|
+
}
|
|
44
|
+
t.loading = !0, await d.getAppOptions(), t.loading = !1, l("success");
|
|
45
|
+
}, p = (e) => {
|
|
46
|
+
l("update:modelValue", e);
|
|
47
|
+
const { data: o } = d.appOptions.filter1((u) => u.id === t.single);
|
|
48
|
+
o && (l("update:name", o.name), l("update:icon", o.icon), l("update:orgs", o.orgs));
|
|
49
|
+
}, r = m(() => d.appOptions), A = m(() => s.placeholder ? window.$l(s.placeholder) : window.$l("App")), h = m(() => r.value.filter1((o) => o.id === t.single).data);
|
|
50
|
+
return k(
|
|
51
|
+
() => s.modelValue,
|
|
52
|
+
(e) => {
|
|
53
|
+
e && e !== t.v && (t.single = e, p(e));
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
immediate: !0
|
|
57
|
+
}
|
|
58
|
+
), k(
|
|
59
|
+
() => r.value,
|
|
60
|
+
(e) => {
|
|
61
|
+
s.useDefault && (e == null ? void 0 : e.length) === 1 && (t.single = e[0].id, p(e[0].id));
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
immediate: !0
|
|
65
|
+
}
|
|
66
|
+
), (e, o) => {
|
|
67
|
+
const u = i("IconLoading"), v = i("Image"), B = i("el-option"), C = i("el-select");
|
|
68
|
+
return c(), w("div", P, [
|
|
69
|
+
n(t).loading ? (c(), b(u, { key: 0 })) : $("", !0),
|
|
70
|
+
f(C, j({
|
|
71
|
+
modelValue: n(t).single,
|
|
72
|
+
"onUpdate:modelValue": o[0] || (o[0] = (a) => n(t).single = a),
|
|
73
|
+
placeholder: n(A),
|
|
74
|
+
filterable: "",
|
|
75
|
+
clearable: "",
|
|
76
|
+
"default-first-option": "",
|
|
77
|
+
"fit-input-width": ""
|
|
78
|
+
}, e.$attrs, { onChange: p }), E({
|
|
79
|
+
default: g(() => [
|
|
80
|
+
(c(!0), w(M, null, F(n(r), (a, O) => (c(), b(B, {
|
|
81
|
+
key: O,
|
|
82
|
+
label: a.label,
|
|
83
|
+
value: a.id
|
|
84
|
+
}, {
|
|
85
|
+
default: g(() => [
|
|
86
|
+
_("div", U, [
|
|
87
|
+
f(v, {
|
|
88
|
+
src: a.icon,
|
|
89
|
+
class: "noShrink w24 h24 radius radius4 border-dark1"
|
|
90
|
+
}, null, 8, ["src"]),
|
|
91
|
+
_("span", q, y(a.name), 1),
|
|
92
|
+
_("span", z, "(" + y(a.id) + ")", 1)
|
|
93
|
+
])
|
|
94
|
+
]),
|
|
95
|
+
_: 2
|
|
96
|
+
}, 1032, ["label", "value"]))), 128))
|
|
97
|
+
]),
|
|
98
|
+
_: 2
|
|
99
|
+
}, [
|
|
100
|
+
n(h) ? {
|
|
101
|
+
name: "prefix",
|
|
102
|
+
fn: g(() => [
|
|
103
|
+
f(v, {
|
|
104
|
+
src: n(h).icon,
|
|
105
|
+
class: "noShrink w24 h24 radius radius4 border-dark1"
|
|
106
|
+
}, null, 8, ["src"])
|
|
107
|
+
]),
|
|
108
|
+
key: "0"
|
|
109
|
+
} : void 0
|
|
110
|
+
]), 1040, ["modelValue", "placeholder"])
|
|
111
|
+
]);
|
|
112
|
+
};
|
|
113
|
+
}
|
|
114
|
+
});
|
|
115
|
+
export {
|
|
116
|
+
K as default
|
|
117
|
+
};
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
import { defineComponent as D, reactive as G, inject as L, onMounted as O, computed as m, watch as T, resolveComponent as g, createElementBlock as b, openBlock as f, createBlock as h, createCommentVNode as x, createElementVNode as s, unref as i, createVNode as V, withCtx as _, mergeProps as M, Fragment as j, renderList as E, normalizeClass as F, toDisplayString as z } from "vue";
|
|
2
|
+
import { useMap as P } from "asamap";
|
|
3
|
+
const R = { class: "SuperAsaOrg relative" }, U = { class: "inputGroup" }, q = { class: "inputGroupLeft noShrink" }, H = { class: "flexMode vc g4" }, J = { class: "txt-dark5" }, K = D({
|
|
4
|
+
name: "SuperAsaOrg"
|
|
5
|
+
}), Y = /* @__PURE__ */ Object.assign(K, {
|
|
6
|
+
props: {
|
|
7
|
+
app: {
|
|
8
|
+
type: Number,
|
|
9
|
+
default: 0
|
|
10
|
+
},
|
|
11
|
+
changeImmediately: {
|
|
12
|
+
type: Boolean,
|
|
13
|
+
default: !1
|
|
14
|
+
},
|
|
15
|
+
modelValue: {
|
|
16
|
+
type: [Number, String],
|
|
17
|
+
default: 0
|
|
18
|
+
},
|
|
19
|
+
readonly: {
|
|
20
|
+
type: Boolean,
|
|
21
|
+
default: !1
|
|
22
|
+
},
|
|
23
|
+
unTimezone: {
|
|
24
|
+
type: Boolean,
|
|
25
|
+
default: !1
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
emits: [
|
|
29
|
+
"update:modelValue",
|
|
30
|
+
"update:name",
|
|
31
|
+
"update:currency",
|
|
32
|
+
"update:readonly",
|
|
33
|
+
"success",
|
|
34
|
+
"error",
|
|
35
|
+
"change"
|
|
36
|
+
],
|
|
37
|
+
setup(C, { emit: k }) {
|
|
38
|
+
const l = C, a = G({
|
|
39
|
+
loading: !1,
|
|
40
|
+
single: "",
|
|
41
|
+
multiple: [],
|
|
42
|
+
options: []
|
|
43
|
+
}), v = L("store").ai();
|
|
44
|
+
O(() => {
|
|
45
|
+
B();
|
|
46
|
+
});
|
|
47
|
+
const t = k, B = async () => {
|
|
48
|
+
u.value.length ? (a.single || y(u.value[0].id), t("success")) : t("error");
|
|
49
|
+
}, y = (e) => {
|
|
50
|
+
var n, r, c, p;
|
|
51
|
+
t("update:modelValue", e), t("update:name", (n = d.value) == null ? void 0 : n.name), t("update:currency", (r = d.value) == null ? void 0 : r.currency), t("update:timezone", (c = d.value) == null ? void 0 : c.timezone), t("update:readonly", (p = d.value) == null ? void 0 : p.readonly), l.changeImmediately && t("change", e), l.unTimezone || N();
|
|
52
|
+
}, N = () => {
|
|
53
|
+
var n;
|
|
54
|
+
let e = d.value;
|
|
55
|
+
v.saveData("accountTimezone", {
|
|
56
|
+
timezoneName: e == null ? void 0 : e.timezone,
|
|
57
|
+
tip: "Account",
|
|
58
|
+
timezone: (n = P("common.timezone").filter1(
|
|
59
|
+
(r) => r.label === (e == null ? void 0 : e.timezone)
|
|
60
|
+
).data) == null ? void 0 : n.value
|
|
61
|
+
});
|
|
62
|
+
}, $ = () => {
|
|
63
|
+
a.single = "", t("update:modelValue", ""), t("update:name", ""), t("update:currency", ""), t("update:timezone", ""), t("update:readonly", !1);
|
|
64
|
+
}, w = m(() => window.$l("Campaign Group")), u = m(() => {
|
|
65
|
+
var e;
|
|
66
|
+
return l.app ? ((e = v.appOptions.filter1((n) => n.id === l.app).data) == null ? void 0 : e.orgs) || [] : [];
|
|
67
|
+
}), d = m(() => u.value.filter1((e) => e.id === a.single).data), I = m(() => !l.app);
|
|
68
|
+
return T(
|
|
69
|
+
() => l.modelValue,
|
|
70
|
+
(e) => {
|
|
71
|
+
e ? e !== a.single && (a.single = e, y(e)) : $();
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
immediate: !0
|
|
75
|
+
}
|
|
76
|
+
), (e, n) => {
|
|
77
|
+
const r = g("IconLoading"), c = g("el-button"), p = g("el-option"), S = g("el-select");
|
|
78
|
+
return f(), b("div", R, [
|
|
79
|
+
i(a).loading ? (f(), h(r, { key: 0 })) : x("", !0),
|
|
80
|
+
s("div", U, [
|
|
81
|
+
s("div", q, [
|
|
82
|
+
V(c, {
|
|
83
|
+
circle: "",
|
|
84
|
+
onClick: n[0] || (n[0] = (o) => e.$copy(i(a).single, "ID"))
|
|
85
|
+
}, {
|
|
86
|
+
icon: _(() => [...n[2] || (n[2] = [
|
|
87
|
+
s("i", { class: "imicon im-copy" }, null, -1)
|
|
88
|
+
])]),
|
|
89
|
+
_: 1
|
|
90
|
+
})
|
|
91
|
+
]),
|
|
92
|
+
V(S, M({
|
|
93
|
+
modelValue: i(a).single,
|
|
94
|
+
"onUpdate:modelValue": n[1] || (n[1] = (o) => i(a).single = o),
|
|
95
|
+
placeholder: i(w),
|
|
96
|
+
disabled: i(I),
|
|
97
|
+
filterable: ""
|
|
98
|
+
}, e.$attrs, {
|
|
99
|
+
class: "inputGroupRight",
|
|
100
|
+
onChange: y
|
|
101
|
+
}), {
|
|
102
|
+
default: _(() => [
|
|
103
|
+
(f(!0), b(j, null, E(i(u), (o, A) => (f(), h(p, {
|
|
104
|
+
key: A,
|
|
105
|
+
label: `${o.name} (${o.id})`,
|
|
106
|
+
value: o.id,
|
|
107
|
+
disabled: l.readonly && o.readonly
|
|
108
|
+
}, {
|
|
109
|
+
default: _(() => [
|
|
110
|
+
s("div", H, [
|
|
111
|
+
s("i", {
|
|
112
|
+
class: F(["imicon", o.readonly ? "" : "im-writing"])
|
|
113
|
+
}, null, 2),
|
|
114
|
+
s("span", null, z(o.name), 1),
|
|
115
|
+
s("span", J, "(" + z(o.id) + ")", 1)
|
|
116
|
+
])
|
|
117
|
+
]),
|
|
118
|
+
_: 2
|
|
119
|
+
}, 1032, ["label", "value", "disabled"]))), 128))
|
|
120
|
+
]),
|
|
121
|
+
_: 1
|
|
122
|
+
}, 16, ["modelValue", "placeholder", "disabled"])
|
|
123
|
+
])
|
|
124
|
+
]);
|
|
125
|
+
};
|
|
126
|
+
}
|
|
127
|
+
});
|
|
128
|
+
export {
|
|
129
|
+
Y as default
|
|
130
|
+
};
|
|
@@ -0,0 +1,261 @@
|
|
|
1
|
+
import { defineComponent as z, reactive as E, getCurrentInstance as J, computed as y, watch as S, resolveComponent as v, createElementBlock as C, openBlock as w, createBlock as I, createCommentVNode as P, unref as n, mergeProps as k, withCtx as d, createElementVNode as c, createVNode as m, withModifiers as R, createTextVNode as V, toDisplayString as _, createSlots as q } from "vue";
|
|
2
|
+
import { useMap as F } from "asamap";
|
|
3
|
+
const H = { class: "SuperAsaAdGroup relative" }, K = { class: "flexMode vc g8" }, Q = { class: "flexMode vc hb h30" }, W = { class: "outsideIgnore" }, X = { class: "flexMode hr outsideIgnore" }, Y = {
|
|
4
|
+
key: 2,
|
|
5
|
+
class: "inputGroup"
|
|
6
|
+
}, Z = { class: "inputGroupLeft noShrink" }, ee = { class: "flexMode vc g8" }, te = z({
|
|
7
|
+
name: "SuperAsaAdGroup"
|
|
8
|
+
}), oe = /* @__PURE__ */ Object.assign(te, {
|
|
9
|
+
props: {
|
|
10
|
+
modelValue: {
|
|
11
|
+
type: [Number, Array],
|
|
12
|
+
default: 0
|
|
13
|
+
},
|
|
14
|
+
app: {
|
|
15
|
+
type: [Number, Array],
|
|
16
|
+
default: 0
|
|
17
|
+
},
|
|
18
|
+
org: {
|
|
19
|
+
type: [String, Number, Array],
|
|
20
|
+
default: 0
|
|
21
|
+
},
|
|
22
|
+
campaign: {
|
|
23
|
+
type: [String, Number, Array],
|
|
24
|
+
default: 0
|
|
25
|
+
},
|
|
26
|
+
multiple: {
|
|
27
|
+
type: Boolean,
|
|
28
|
+
default: !1
|
|
29
|
+
},
|
|
30
|
+
value: {
|
|
31
|
+
type: String,
|
|
32
|
+
default: "id"
|
|
33
|
+
},
|
|
34
|
+
special: {
|
|
35
|
+
type: Boolean,
|
|
36
|
+
default: !1
|
|
37
|
+
},
|
|
38
|
+
confirmAction: {
|
|
39
|
+
type: Boolean,
|
|
40
|
+
default: !1
|
|
41
|
+
},
|
|
42
|
+
useex: {
|
|
43
|
+
type: Boolean,
|
|
44
|
+
default: !1
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
emits: [
|
|
48
|
+
"change",
|
|
49
|
+
"confirm",
|
|
50
|
+
"update:modelValue",
|
|
51
|
+
"update:name"
|
|
52
|
+
],
|
|
53
|
+
setup(x, { expose: N, emit: T }) {
|
|
54
|
+
const t = x, l = E({
|
|
55
|
+
loading: !1,
|
|
56
|
+
single: "",
|
|
57
|
+
multiple: [],
|
|
58
|
+
options: [],
|
|
59
|
+
filterTxt: ""
|
|
60
|
+
}), { proxy: M } = J(), u = T, h = async () => {
|
|
61
|
+
const e = window.$getType(t.campaign);
|
|
62
|
+
let a;
|
|
63
|
+
if (e === "Array" ? a = t.campaign.join(",") : a = t.campaign.toString(), !a)
|
|
64
|
+
return;
|
|
65
|
+
l.loading = !0;
|
|
66
|
+
const { code: s, data: i } = await window.$post({
|
|
67
|
+
url: window.$api.asa.adGroupOptions,
|
|
68
|
+
data: {
|
|
69
|
+
appId: t.app,
|
|
70
|
+
orgId: t.org,
|
|
71
|
+
campaignId: a
|
|
72
|
+
},
|
|
73
|
+
ex: t.useex ? +/* @__PURE__ */ new Date() : null
|
|
74
|
+
});
|
|
75
|
+
if (l.loading = !1, s === 200) {
|
|
76
|
+
let p;
|
|
77
|
+
t.permission ? p = i.filter((o) => o.permission === t.permission) : p = i, l.options = p.map((o) => (o.sort = F("statusMap")[o.status].sort, o.ca = `${o.campaignId}_${o.id}`, o.oca = `${o.orgId}_${o.valueCA}`, o)).sort((o, f) => o.sort - f.sort);
|
|
78
|
+
}
|
|
79
|
+
if (t.multiple && t.modelValue && t.modelValue.length > 0) {
|
|
80
|
+
const p = t.modelValue.map((o) => {
|
|
81
|
+
const { data: f } = l.options.filter1((r) => r[t.value] === o);
|
|
82
|
+
return f ? f.name : `Unknown Name ${o}`;
|
|
83
|
+
});
|
|
84
|
+
u("update:name", p);
|
|
85
|
+
}
|
|
86
|
+
!t.multiple && g.value && u("update:name", g.value.name);
|
|
87
|
+
}, B = (e) => {
|
|
88
|
+
l.filterTxt = e;
|
|
89
|
+
}, G = () => {
|
|
90
|
+
M.$refs.multipleSelect.blur(), t.confirmAction && u("confirm");
|
|
91
|
+
}, D = (e) => {
|
|
92
|
+
const a = e.map((s) => {
|
|
93
|
+
const { data: i } = l.options.filter1((p) => p[t.value] === s);
|
|
94
|
+
return i ? i.name : `Unknown Name ${s}`;
|
|
95
|
+
});
|
|
96
|
+
u("update:modelValue", l.multiple), u("update:name", a), u("change", e);
|
|
97
|
+
}, O = () => {
|
|
98
|
+
u("update:modelValue", l.single), u("update:name", g.value.name), u("change", l.single);
|
|
99
|
+
}, U = () => {
|
|
100
|
+
l.multiple = l.multiple.concat(b.value.map((e) => e[t.value])), u("update:modelValue", l.multiple);
|
|
101
|
+
}, L = () => {
|
|
102
|
+
h();
|
|
103
|
+
}, $ = y(() => window.$l("Ad Group")), g = y(() => l.single ? l.options.filter1((e) => e[t.value] === l.single).data : ""), b = y(() => l.filterTxt ? l.options.filter((e) => e.name.includes(l.filterTxt)) : l.options), j = y(() => b.value.length), A = y(() => {
|
|
104
|
+
var s, i;
|
|
105
|
+
let e = !1;
|
|
106
|
+
const a = window.$getType(t.campaign);
|
|
107
|
+
return t.multiple && a === "Array" ? e = t.special ? ((s = t.campaign) == null ? void 0 : s.length) !== 1 : !((i = t.campaign) != null && i.length) : e = !t.campaign, e;
|
|
108
|
+
});
|
|
109
|
+
return S(
|
|
110
|
+
() => t.campaign,
|
|
111
|
+
(e, a) => {
|
|
112
|
+
const s = window.$getType(e);
|
|
113
|
+
t.multiple ? (s === "Array" && e.length || s === "Number" && e) && h() : e && e !== a && h();
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
immediate: !0
|
|
117
|
+
}
|
|
118
|
+
), S(
|
|
119
|
+
() => t.modelValue,
|
|
120
|
+
(e) => {
|
|
121
|
+
t.multiple ? JSON.stringify(l.single) !== JSON.stringify(e) && (l.multiple = e) : e ? l.single !== e && (l.single = e) : l.single = "";
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
immediate: !0
|
|
125
|
+
}
|
|
126
|
+
), N({
|
|
127
|
+
reload: L
|
|
128
|
+
}), (e, a) => {
|
|
129
|
+
const s = v("IconLoading"), i = v("StatusItem"), p = v("el-button"), o = v("el-tag"), f = v("el-select-v2");
|
|
130
|
+
return w(), C("div", H, [
|
|
131
|
+
n(l).loading ? (w(), I(s, { key: 0 })) : P("", !0),
|
|
132
|
+
t.multiple ? (w(), I(f, k({
|
|
133
|
+
key: 1,
|
|
134
|
+
ref: "multipleSelect",
|
|
135
|
+
modelValue: n(l).multiple,
|
|
136
|
+
"onUpdate:modelValue": a[0] || (a[0] = (r) => n(l).multiple = r),
|
|
137
|
+
placeholder: n($),
|
|
138
|
+
clearable: "",
|
|
139
|
+
filterable: "",
|
|
140
|
+
multiple: "",
|
|
141
|
+
"collapse-tags": "",
|
|
142
|
+
"collapse-tags-tooltip": ""
|
|
143
|
+
}, e.$attrs, {
|
|
144
|
+
options: n(b),
|
|
145
|
+
disabled: n(A),
|
|
146
|
+
"filter-method": B,
|
|
147
|
+
props: {
|
|
148
|
+
label: "name",
|
|
149
|
+
value: t.value
|
|
150
|
+
},
|
|
151
|
+
onChange: D
|
|
152
|
+
}), {
|
|
153
|
+
default: d(({ item: r }) => [
|
|
154
|
+
c("div", K, [
|
|
155
|
+
m(i, {
|
|
156
|
+
status: r.status,
|
|
157
|
+
nolabel: ""
|
|
158
|
+
}, null, 8, ["status"]),
|
|
159
|
+
c("span", null, _(r.name), 1)
|
|
160
|
+
])
|
|
161
|
+
]),
|
|
162
|
+
header: d(() => [
|
|
163
|
+
c("div", Q, [
|
|
164
|
+
c("div", W, [
|
|
165
|
+
m(p, {
|
|
166
|
+
onClick: U,
|
|
167
|
+
size: "small",
|
|
168
|
+
class: "outsideIgnore"
|
|
169
|
+
}, {
|
|
170
|
+
default: d(() => [
|
|
171
|
+
V(_(e.$l("Select All")), 1)
|
|
172
|
+
]),
|
|
173
|
+
_: 1
|
|
174
|
+
})
|
|
175
|
+
]),
|
|
176
|
+
m(o, {
|
|
177
|
+
type: "info",
|
|
178
|
+
effect: "light",
|
|
179
|
+
round: "",
|
|
180
|
+
size: "small",
|
|
181
|
+
class: "noevent"
|
|
182
|
+
}, {
|
|
183
|
+
default: d(() => [
|
|
184
|
+
V(_(n(j)), 1)
|
|
185
|
+
]),
|
|
186
|
+
_: 1
|
|
187
|
+
})
|
|
188
|
+
])
|
|
189
|
+
]),
|
|
190
|
+
footer: d(() => [
|
|
191
|
+
c("div", X, [
|
|
192
|
+
m(p, {
|
|
193
|
+
type: "primary",
|
|
194
|
+
onClick: R(G, ["stop"])
|
|
195
|
+
}, {
|
|
196
|
+
default: d(() => [
|
|
197
|
+
V(_(e.$l("Confirm")), 1)
|
|
198
|
+
]),
|
|
199
|
+
_: 1
|
|
200
|
+
})
|
|
201
|
+
])
|
|
202
|
+
]),
|
|
203
|
+
_: 1
|
|
204
|
+
}, 16, ["modelValue", "placeholder", "options", "disabled", "props"])) : (w(), C("div", Y, [
|
|
205
|
+
c("div", Z, [
|
|
206
|
+
m(p, {
|
|
207
|
+
circle: "",
|
|
208
|
+
onClick: a[1] || (a[1] = (r) => e.$copy(n(l).single, "ID"))
|
|
209
|
+
}, {
|
|
210
|
+
icon: d(() => [...a[3] || (a[3] = [
|
|
211
|
+
c("i", { class: "imicon im-copy" }, null, -1)
|
|
212
|
+
])]),
|
|
213
|
+
_: 1
|
|
214
|
+
})
|
|
215
|
+
]),
|
|
216
|
+
m(f, k({
|
|
217
|
+
modelValue: n(l).single,
|
|
218
|
+
"onUpdate:modelValue": a[2] || (a[2] = (r) => n(l).single = r),
|
|
219
|
+
placeholder: n($),
|
|
220
|
+
clearable: "",
|
|
221
|
+
filterable: ""
|
|
222
|
+
}, e.$attrs, {
|
|
223
|
+
options: n(b),
|
|
224
|
+
disabled: n(A),
|
|
225
|
+
props: {
|
|
226
|
+
label: "name",
|
|
227
|
+
value: t.value
|
|
228
|
+
},
|
|
229
|
+
class: "inputGroupRight",
|
|
230
|
+
onChange: O
|
|
231
|
+
}), q({
|
|
232
|
+
default: d(({ item: r }) => [
|
|
233
|
+
c("div", ee, [
|
|
234
|
+
m(i, {
|
|
235
|
+
status: r.status,
|
|
236
|
+
nolabel: ""
|
|
237
|
+
}, null, 8, ["status"]),
|
|
238
|
+
c("span", null, _(r.name), 1)
|
|
239
|
+
])
|
|
240
|
+
]),
|
|
241
|
+
_: 2
|
|
242
|
+
}, [
|
|
243
|
+
n(g) ? {
|
|
244
|
+
name: "prefix",
|
|
245
|
+
fn: d(() => [
|
|
246
|
+
m(i, {
|
|
247
|
+
status: n(g).status,
|
|
248
|
+
nolabel: ""
|
|
249
|
+
}, null, 8, ["status"])
|
|
250
|
+
]),
|
|
251
|
+
key: "0"
|
|
252
|
+
} : void 0
|
|
253
|
+
]), 1040, ["modelValue", "placeholder", "options", "disabled", "props"])
|
|
254
|
+
]))
|
|
255
|
+
]);
|
|
256
|
+
};
|
|
257
|
+
}
|
|
258
|
+
});
|
|
259
|
+
export {
|
|
260
|
+
oe as default
|
|
261
|
+
};
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
import { defineComponent as O, reactive as I, inject as N, onMounted as $, computed as c, watch as v, resolveComponent as d, createElementBlock as w, openBlock as p, createBlock as y, createCommentVNode as j, createVNode as f, unref as n, mergeProps as E, createSlots as M, withCtx as g, Fragment as F, renderList as P, createElementVNode as _, toDisplayString as b } from "vue";
|
|
2
|
+
const U = { class: "SuperAsaApp relative" }, q = { class: "flexMode vc g8" }, z = { class: "txt-nowrap" }, G = { class: "txt-dark5" }, H = O({
|
|
3
|
+
name: "SuperAsaApp"
|
|
4
|
+
}), Q = /* @__PURE__ */ Object.assign(H, {
|
|
5
|
+
props: {
|
|
6
|
+
modelValue: {
|
|
7
|
+
type: Number,
|
|
8
|
+
default: null
|
|
9
|
+
},
|
|
10
|
+
loadData: {
|
|
11
|
+
type: Boolean,
|
|
12
|
+
default: !0
|
|
13
|
+
},
|
|
14
|
+
multiple: {
|
|
15
|
+
type: Boolean,
|
|
16
|
+
default: !1
|
|
17
|
+
},
|
|
18
|
+
placeholder: {
|
|
19
|
+
type: String,
|
|
20
|
+
default: ""
|
|
21
|
+
},
|
|
22
|
+
useDefault: {
|
|
23
|
+
type: Boolean,
|
|
24
|
+
default: !1
|
|
25
|
+
},
|
|
26
|
+
aiDefault: {
|
|
27
|
+
type: Boolean,
|
|
28
|
+
default: !1
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
emits: [
|
|
32
|
+
"change",
|
|
33
|
+
"success",
|
|
34
|
+
"update:icon",
|
|
35
|
+
"update:orgs",
|
|
36
|
+
"update:name"
|
|
37
|
+
],
|
|
38
|
+
setup(V, { emit: D }) {
|
|
39
|
+
const s = V, a = I({
|
|
40
|
+
loading: !1,
|
|
41
|
+
single: "",
|
|
42
|
+
multiple: [],
|
|
43
|
+
options: []
|
|
44
|
+
}), r = N("store").asa();
|
|
45
|
+
$(() => {
|
|
46
|
+
s.loadData && B();
|
|
47
|
+
});
|
|
48
|
+
const o = D, B = async () => {
|
|
49
|
+
if (i.value.length) {
|
|
50
|
+
o("success");
|
|
51
|
+
return;
|
|
52
|
+
}
|
|
53
|
+
await r.getAppOptions(), o("success");
|
|
54
|
+
}, u = (e) => {
|
|
55
|
+
o("update:modelValue", e);
|
|
56
|
+
const { data: t } = r.appOptions.filter1((m) => m.id === a.single);
|
|
57
|
+
t && (o("update:name", t.name), o("update:icon", t.icon), o("update:orgs", t.orgs)), o("change", e);
|
|
58
|
+
}, S = c(() => r.appLoading), i = c(() => r.appOptions), x = c(() => s.placeholder ? window.$l(s.placeholder) : window.$l("App")), h = c(() => i.value.filter1((t) => t.id === a.single).data);
|
|
59
|
+
return v(
|
|
60
|
+
() => s.modelValue,
|
|
61
|
+
(e) => {
|
|
62
|
+
e && e !== a.v && (a.single = e, u(e));
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
immediate: !0
|
|
66
|
+
}
|
|
67
|
+
), v(
|
|
68
|
+
() => i.value,
|
|
69
|
+
(e) => {
|
|
70
|
+
(s.useDefault && (e == null ? void 0 : e.length) === 1 || s.aiDefault && e.length > 0) && (a.single = e[0].id, u(e[0].id));
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
immediate: !0
|
|
74
|
+
}
|
|
75
|
+
), (e, t) => {
|
|
76
|
+
const m = d("IconLoading"), k = d("Image"), A = d("el-option"), C = d("el-select");
|
|
77
|
+
return p(), w("div", U, [
|
|
78
|
+
n(S) ? (p(), y(m, { key: 0 })) : j("", !0),
|
|
79
|
+
f(C, E({
|
|
80
|
+
modelValue: n(a).single,
|
|
81
|
+
"onUpdate:modelValue": t[0] || (t[0] = (l) => n(a).single = l),
|
|
82
|
+
placeholder: n(x),
|
|
83
|
+
filterable: "",
|
|
84
|
+
clearable: "",
|
|
85
|
+
"default-first-option": "",
|
|
86
|
+
"fit-input-width": ""
|
|
87
|
+
}, e.$attrs, { onChange: u }), M({
|
|
88
|
+
default: g(() => [
|
|
89
|
+
(p(!0), w(F, null, P(n(i), (l, L) => (p(), y(A, {
|
|
90
|
+
key: L,
|
|
91
|
+
label: l.label,
|
|
92
|
+
value: l.id
|
|
93
|
+
}, {
|
|
94
|
+
default: g(() => [
|
|
95
|
+
_("div", q, [
|
|
96
|
+
f(k, {
|
|
97
|
+
src: l.icon,
|
|
98
|
+
class: "noShrink w24 h24 radius radius4 border-dark1"
|
|
99
|
+
}, null, 8, ["src"]),
|
|
100
|
+
_("span", z, b(l.name), 1),
|
|
101
|
+
_("span", G, "(" + b(l.id) + ")", 1)
|
|
102
|
+
])
|
|
103
|
+
]),
|
|
104
|
+
_: 2
|
|
105
|
+
}, 1032, ["label", "value"]))), 128))
|
|
106
|
+
]),
|
|
107
|
+
_: 2
|
|
108
|
+
}, [
|
|
109
|
+
n(h) ? {
|
|
110
|
+
name: "prefix",
|
|
111
|
+
fn: g(() => [
|
|
112
|
+
f(k, {
|
|
113
|
+
src: n(h).icon,
|
|
114
|
+
class: "noShrink w24 h24 radius radius4 border-dark1"
|
|
115
|
+
}, null, 8, ["src"])
|
|
116
|
+
]),
|
|
117
|
+
key: "0"
|
|
118
|
+
} : void 0
|
|
119
|
+
]), 1040, ["modelValue", "placeholder"])
|
|
120
|
+
]);
|
|
121
|
+
};
|
|
122
|
+
}
|
|
123
|
+
});
|
|
124
|
+
export {
|
|
125
|
+
Q as default
|
|
126
|
+
};
|