ss-component-new 1.3.659 → 1.3.660

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.
@@ -0,0 +1,49 @@
1
+ import { u as S, p as h, a as w, k as N, E as b, s as v, m as A } from "./_plugin-vue_export-helper-BZ_eTSzz.js";
2
+ const f = S(h), { isDefaultModel: M } = w(), P = async (c, s) => {
3
+ var u, o, r, i, a, d, g, p, y;
4
+ let t = Object.values(c), e = await N({
5
+ userName: (u = t == null ? void 0 : t[0]) == null ? void 0 : u.trim(),
6
+ password: (o = t == null ? void 0 : t[1]) == null ? void 0 : o.trim()
7
+ });
8
+ if (((r = e == null ? void 0 : e.data) == null ? void 0 : r.status) === 200 && ((a = (i = e == null ? void 0 : e.data) == null ? void 0 : i.result) == null ? void 0 : a.length) > 0) {
9
+ const n = ((g = (d = e == null ? void 0 : e.data) == null ? void 0 : d.result) == null ? void 0 : g.find((q) => M(q))) || ((y = (p = e == null ? void 0 : e.data) == null ? void 0 : p.result) == null ? void 0 : y[0]);
10
+ sessionStorage.setItem("systemKey", s && s !== "" ? s : n == null ? void 0 : n.id);
11
+ let m = n;
12
+ return m.plat_id = m.id ?? s, f.setLoginUserInfo(m), f.setSystemKey(s && s !== "" ? s : n == null ? void 0 : n.id), !0;
13
+ } else
14
+ return b.error("输入的密码错误,请重新输入"), !1;
15
+ }, k = S(h), { systemInfo: _, loginUserInfo: l } = v(k), L = async () => (sessionStorage.setItem("loginToken", "111"), !0), T = async () => (sessionStorage.setItem("magicToken", "123456"), !0), D = async (c) => {
16
+ var o, r, i;
17
+ let s = [P(c, (o = _.value) == null ? void 0 : o.plat_id), L(), T()];
18
+ const t = await Promise.all(s), e = t == null ? void 0 : t.every((a) => a);
19
+ let u = [
20
+ {
21
+ id: "1",
22
+ request_method: "Post",
23
+ request_url: "/platform/getdata",
24
+ request_param: JSON.stringify({
25
+ userName: l.value.userName,
26
+ password: l.value.password
27
+ }),
28
+ request_result: "{}",
29
+ is_delete: !1,
30
+ request_table: "admin_user",
31
+ request_type: "login"
32
+ }
33
+ ];
34
+ try {
35
+ const a = ((r = l == null ? void 0 : l.value) == null ? void 0 : r.plat_id) || ((i = _.value) == null ? void 0 : i.plat_id);
36
+ return await A({
37
+ platId: parseInt(a),
38
+ changeContents: [{
39
+ tableName: "log",
40
+ tableContents: u
41
+ }]
42
+ }), e;
43
+ } catch {
44
+ return e;
45
+ }
46
+ };
47
+ export {
48
+ D as l
49
+ };
@@ -0,0 +1,55 @@
1
+ import { defineComponent as u, ref as c, resolveComponent as m, createBlock as s, openBlock as y, withCtx as f, createTextVNode as g, toDisplayString as p } from "vue";
2
+ const B = /* @__PURE__ */ u({
3
+ __name: "index",
4
+ props: {
5
+ modelValue: String,
6
+ disabled: {
7
+ type: Boolean,
8
+ default: !1
9
+ },
10
+ content: {
11
+ type: Array,
12
+ default: () => []
13
+ },
14
+ isEdit: {
15
+ type: Boolean,
16
+ default: !0
17
+ },
18
+ loading: {
19
+ type: Boolean,
20
+ default: !1
21
+ },
22
+ emptyColor: {
23
+ type: Boolean,
24
+ default: !1
25
+ },
26
+ buttonType: {
27
+ type: String,
28
+ default: "primary"
29
+ }
30
+ },
31
+ emits: ["clickTrigger"],
32
+ setup(n, { emit: a }) {
33
+ const e = n, t = c(e.modelValue), i = a, d = (l) => {
34
+ i("clickTrigger", l);
35
+ };
36
+ return (l, o) => {
37
+ const r = m("el-button");
38
+ return y(), s(r, {
39
+ type: e == null ? void 0 : e.buttonType,
40
+ id: e != null && e.emptyColor ? "" : "themeButton",
41
+ onClick: o[0] || (o[0] = (_) => d(t.value)),
42
+ loading: e == null ? void 0 : e.loading,
43
+ disabled: e == null ? void 0 : e.disabled
44
+ }, {
45
+ default: f(() => [
46
+ g(p(t.value), 1)
47
+ ]),
48
+ _: 1
49
+ }, 8, ["type", "id", "loading", "disabled"]);
50
+ };
51
+ }
52
+ });
53
+ export {
54
+ B as _
55
+ };