magtool 1.6.37 → 1.6.38
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/Org.js +35 -35
- package/package.json +1 -1
package/dist/cpt/Org.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
const L =
|
|
1
|
+
import { defineComponent as w, reactive as b, inject as C, onMounted as k, nextTick as g, computed as I, watch as S, resolveComponent as m, createElementBlock as u, openBlock as i, normalizeClass as M, unref as l, createBlock as f, createCommentVNode as N, createVNode as x, withCtx as $, Fragment as z, renderList as B } from "vue";
|
|
2
|
+
const L = w({
|
|
3
3
|
name: "SuperOrg",
|
|
4
4
|
inheritAttrs: !1
|
|
5
|
-
}),
|
|
5
|
+
}), P = /* @__PURE__ */ Object.assign(L, {
|
|
6
6
|
props: {
|
|
7
7
|
modelValue: {
|
|
8
8
|
type: [Number, String],
|
|
@@ -14,20 +14,20 @@ const L = V({
|
|
|
14
14
|
}
|
|
15
15
|
},
|
|
16
16
|
emits: "change",
|
|
17
|
-
setup(O, { emit:
|
|
18
|
-
const
|
|
17
|
+
setup(O, { emit: _ }) {
|
|
18
|
+
const s = O, e = b({
|
|
19
19
|
loading: !1,
|
|
20
20
|
v: "",
|
|
21
21
|
orgOptions: []
|
|
22
|
-
}),
|
|
23
|
-
|
|
24
|
-
|
|
22
|
+
}), p = C("store").asa();
|
|
23
|
+
k(() => {
|
|
24
|
+
v();
|
|
25
25
|
});
|
|
26
|
-
const a =
|
|
27
|
-
if (
|
|
28
|
-
e.orgOptions =
|
|
26
|
+
const a = _, v = async () => {
|
|
27
|
+
if (p.orgOptions.length > 0) {
|
|
28
|
+
e.orgOptions = p.orgOptions, a("success", e.orgOptions), g(() => {
|
|
29
29
|
const t = e.orgOptions.filter1(
|
|
30
|
-
(
|
|
30
|
+
(c) => c.orgId === e.v
|
|
31
31
|
).data;
|
|
32
32
|
a("update:paymentModel", t == null ? void 0 : t.paymentModel);
|
|
33
33
|
});
|
|
@@ -37,51 +37,51 @@ const L = V({
|
|
|
37
37
|
const { code: n, data: o } = await window.$post({
|
|
38
38
|
url: window.$api.asa.orgOptions
|
|
39
39
|
});
|
|
40
|
-
e.loading = !1, n === 200 && (e.orgOptions = o.map((t) => (t.label = `${t.orgName} (${t.orgId})`, t)),
|
|
41
|
-
|
|
42
|
-
(s) => s.orgId === e.v
|
|
43
|
-
).data;
|
|
44
|
-
a("update:paymentModel", t == null ? void 0 : t.paymentModel);
|
|
40
|
+
e.loading = !1, n === 200 && (e.orgOptions = o.map((t) => (t.label = `${t.orgName} (${t.orgId})`, t)), p.saveData("orgOptions", e.orgOptions), e.needSuccessProcess && g(() => {
|
|
41
|
+
d(s.modelValue);
|
|
45
42
|
}), a("success", e.orgOptions));
|
|
46
|
-
},
|
|
47
|
-
a("update:modelValue", n)
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
43
|
+
}, d = (n) => {
|
|
44
|
+
if (a("update:modelValue", n), e.orgOptions.length === 0)
|
|
45
|
+
s.modelValue && (e.needSuccessProcess = !0);
|
|
46
|
+
else {
|
|
47
|
+
const o = e.orgOptions.filter1((t) => t.orgId === n).data;
|
|
48
|
+
a("update:currency", o == null ? void 0 : o.currency), a("update:name", o == null ? void 0 : o.orgName), a("update:timezone", o == null ? void 0 : o.timezone), a("update:paymentModel", o == null ? void 0 : o.paymentModel), a("change", n);
|
|
49
|
+
}
|
|
50
|
+
}, y = I(() => {
|
|
51
|
+
if (s.permission === "all")
|
|
52
52
|
return e.orgOptions;
|
|
53
53
|
{
|
|
54
|
-
const n =
|
|
54
|
+
const n = s.permission === "readonly";
|
|
55
55
|
return e.orgOptions.filter((t) => t.readonly === n);
|
|
56
56
|
}
|
|
57
57
|
});
|
|
58
|
-
return
|
|
59
|
-
() =>
|
|
58
|
+
return S(
|
|
59
|
+
() => s.modelValue,
|
|
60
60
|
(n) => {
|
|
61
|
-
n ? n !== e.v && (e.v = n,
|
|
62
|
-
|
|
61
|
+
n ? n !== e.v && (e.v = n, g(() => {
|
|
62
|
+
d(n);
|
|
63
63
|
})) : e.v = "";
|
|
64
64
|
},
|
|
65
65
|
{
|
|
66
66
|
immediate: !0
|
|
67
67
|
}
|
|
68
68
|
), (n, o) => {
|
|
69
|
-
const t =
|
|
69
|
+
const t = m("IconLoading"), c = m("el-option"), V = m("el-select");
|
|
70
70
|
return i(), u("div", {
|
|
71
|
-
class:
|
|
71
|
+
class: M(["SuperOrg relative wp100", l(e).loading && "noevent"])
|
|
72
72
|
}, [
|
|
73
|
-
l(e).loading ? (i(), f(t, { key: 0 })) :
|
|
74
|
-
|
|
73
|
+
l(e).loading ? (i(), f(t, { key: 0 })) : N("", !0),
|
|
74
|
+
x(V, {
|
|
75
75
|
modelValue: l(e).v,
|
|
76
76
|
"onUpdate:modelValue": o[0] || (o[0] = (r) => l(e).v = r),
|
|
77
77
|
filterable: "",
|
|
78
78
|
"collapse-tags": "",
|
|
79
79
|
placeholder: " ",
|
|
80
80
|
class: "wp100",
|
|
81
|
-
onChange:
|
|
81
|
+
onChange: d
|
|
82
82
|
}, {
|
|
83
83
|
default: $(() => [
|
|
84
|
-
(i(!0), u(z, null, B(l(
|
|
84
|
+
(i(!0), u(z, null, B(l(y), (r, h) => (i(), f(c, {
|
|
85
85
|
key: h,
|
|
86
86
|
label: r.label,
|
|
87
87
|
value: r.orgId
|
|
@@ -94,5 +94,5 @@ const L = V({
|
|
|
94
94
|
}
|
|
95
95
|
});
|
|
96
96
|
export {
|
|
97
|
-
|
|
97
|
+
P as default
|
|
98
98
|
};
|