@jeecg/online 3.5.3-beta2 → 3.5.3-vite4
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/AuthButtonConfig-2f71787c.mjs +125 -0
- package/AuthButtonTree-d73bccf5.mjs +156 -0
- package/AuthDataConfig-32cf23d2.mjs +212 -0
- package/AuthDataTree-03d62d3f.mjs +139 -0
- package/AuthFieldConfig-b1217a0c.mjs +139 -0
- package/AuthFieldTree-888e04a9.mjs +232 -0
- package/AuthManagerDrawer-f127b8a2.mjs +114 -0
- package/AuthSetterModal-37da78ed.mjs +261 -0
- package/CgformCopyList-3adab58f.mjs +245 -0
- package/CgformModal-6938d8c2.mjs +613 -0
- package/CgreportModal-77ec8c17.mjs +12 -0
- package/CgreportModal.vue_vue_type_script_setup_true_lang-52dcec5e.mjs +567 -0
- package/CheckDictTable-414313f2.mjs +211 -0
- package/CodeFileListModal-4831ce3d.mjs +158 -0
- package/CodeFileViewModal-5990dac4.mjs +244 -0
- package/CodeGeneratorModal-7df9e25d.mjs +234 -0
- package/CustomButtonList-1c9bd859.mjs +363 -0
- package/DBAttributeTable-cd1c41e5.mjs +473 -0
- package/DbToOnlineModal-dc5d2030.mjs +160 -0
- package/DetailForm-e4538e7a.mjs +446 -0
- package/EnhanceJavaModal-7f53d2ca.mjs +260 -0
- package/EnhanceJsHistory-c30805ce.mjs +184 -0
- package/EnhanceJsModal-0b133341.mjs +233 -0
- package/EnhanceSqlModal-33a94c83.mjs +259 -0
- package/ExtendConfigModal-60f2cf86.mjs +111 -0
- package/FieldExtendJsonModal-48f7d67f.mjs +220 -0
- package/FileSelectModal-64aaf623.mjs +91 -0
- package/ForeignKeyTable-cb1abd1d.mjs +69 -0
- package/IndexTable-4e94cd1f.mjs +89 -0
- package/JModalTip-abe1515a.mjs +46 -0
- package/JOnlineSearchSelect-5608a5cf.mjs +94 -0
- package/LeftDepart-ca7a7375.mjs +82 -0
- package/LeftRole-d0fa8398.mjs +86 -0
- package/LeftUser-0c88c240.mjs +105 -0
- package/LinkTableConfigModal-77d7c0b9.mjs +230 -0
- package/LinkTableFieldConfigModal-c5689ab0.mjs +178 -0
- package/LinkTableListPiece-34266919.mjs +34 -0
- package/ModalFormDemo-0eeea994.mjs +78 -0
- package/OnlCgformErpList-7a0388d8.mjs +425 -0
- package/OnlCgformErpSubTable-fc6ade76.mjs +388 -0
- package/OnlineAutoList-85e6a30d.mjs +472 -0
- package/OnlineAutoModal-2a146238.mjs +206 -0
- package/OnlineAutoTreeList-f8d0e100.mjs +495 -0
- package/OnlineCustomModal-456a85a6.mjs +227 -0
- package/OnlineDetailModal-f967f080.mjs +177 -0
- package/OnlineForm-630a22c2.mjs +778 -0
- package/OnlineFormDetail-1b216792.mjs +296 -0
- package/OnlineQueryForm-1c5949a7.mjs +378 -0
- package/OnlineSearchFormItem-7c2ea9ed.mjs +352 -0
- package/OnlineSelectCascade-c7baf52b.mjs +160 -0
- package/OnlineSubFormDetail-0aa4966c.mjs +140 -0
- package/PageAttributeTable-811185fd.mjs +404 -0
- package/ProcessOnlineForm-27be6f6f.mjs +177 -0
- package/QueryTable-4ba771ef.mjs +115 -0
- package/SuperQuery-3821f984.mjs +845 -0
- package/SuperQueryValComponent-471110b5.mjs +8 -0
- package/SuperQueryValComponent.vue_vue_type_script_lang-e3ad7ee8.mjs +101 -0
- package/auth.api-d3a6c4b3.mjs +39 -0
- package/auth.data-8be5c9e3.mjs +141 -0
- package/{cgform.data.js → cgform.data-cbdd88c3.mjs} +93 -62
- package/constant-fe20103a.mjs +6 -0
- package/enhance.api-138e6826.mjs +104 -0
- package/enhance.data-efc7e155.mjs +175 -0
- package/index-074b92e5.mjs +236 -0
- package/index-6a09a912.mjs +58 -0
- package/index-9d32ae88.mjs +313 -0
- package/main.index.js +7 -1
- package/package.json +1 -1
- package/style.css +1 -1
- package/useCgformList-2d6a5955.mjs +388 -0
- package/useExtendComponent-48d37d9b.mjs +3919 -0
- package/useListButton-cef1371a.mjs +656 -0
- package/useOnlinePopEvent-e9a042f8.mjs +19 -0
- package/useOnlineTest-0df0ae86.mjs +43 -0
- package/useSchemas-fc8d97ce.mjs +669 -0
- package/useTableSync-dc333087.mjs +83 -0
- package/AuthButtonConfig.js +0 -147
- package/AuthButtonTree.js +0 -183
- package/AuthDataConfig.js +0 -246
- package/AuthDataTree.js +0 -160
- package/AuthFieldConfig.js +0 -170
- package/AuthFieldTree.js +0 -281
- package/AuthManagerDrawer.js +0 -125
- package/AuthSetterModal.js +0 -316
- package/CgformCopyList.js +0 -266
- package/CgformModal.js +0 -780
- package/CgreportModal.js +0 -667
- package/CheckDictTable.js +0 -242
- package/CodeFileListModal.js +0 -175
- package/CodeFileViewModal.js +0 -325
- package/CodeGeneratorModal.js +0 -297
- package/CustomButtonList.js +0 -410
- package/DBAttributeTable.js +0 -526
- package/DbToOnlineModal.js +0 -192
- package/DetailForm.js +0 -608
- package/EnhanceJavaModal.js +0 -298
- package/EnhanceJsHistory.js +0 -229
- package/EnhanceJsModal.js +0 -293
- package/EnhanceSqlModal.js +0 -299
- package/ExtendConfigModal.js +0 -151
- package/FieldExtendJsonModal.js +0 -283
- package/FileSelectModal.js +0 -102
- package/ForeignKeyTable.js +0 -79
- package/IndexTable.js +0 -97
- package/JModalTip.js +0 -54
- package/JOnlineSearchSelect.js +0 -115
- package/LICENSE +0 -9
- package/LeftDepart.js +0 -96
- package/LeftRole.js +0 -98
- package/LeftUser.js +0 -117
- package/LinkTableConfigModal.js +0 -289
- package/LinkTableFieldConfigModal.js +0 -218
- package/LinkTableListPiece.js +0 -36
- package/ModalFormDemo.js +0 -85
- package/OnlineAutoList.js +0 -524
- package/OnlineAutoModal.js +0 -226
- package/OnlineAutoTreeList.js +0 -553
- package/OnlineCustomModal.js +0 -286
- package/OnlineDetailModal.js +0 -190
- package/OnlineForm.js +0 -1018
- package/OnlineFormDetail.js +0 -347
- package/OnlineQueryForm.js +0 -484
- package/OnlineSearchFormItem.js +0 -436
- package/OnlineSelectCascade.js +0 -228
- package/OnlineSubFormDetail.js +0 -166
- package/PageAttributeTable.js +0 -486
- package/ProcessOnlineForm.js +0 -208
- package/QueryTable.js +0 -129
- package/SuperQuery.js +0 -1021
- package/SuperQueryValComponent.js +0 -9
- package/SuperQueryValComponent.vue_vue_type_script_lang.js +0 -162
- package/_arrayPush.js +0 -278
- package/_baseClone.js +0 -471
- package/_baseSlice.js +0 -18
- package/_commonjsHelpers.js +0 -5
- package/_flatRest.js +0 -174
- package/auth.api.js +0 -43
- package/auth.data.js +0 -142
- package/clipboard.js +0 -565
- package/enhance.api.js +0 -129
- package/enhance.data.js +0 -196
- package/index.js +0 -87
- package/index2.js +0 -340
- package/index3.js +0 -264
- package/isArray.js +0 -47
- package/omit.js +0 -60
- package/pick.js +0 -68
- package/toString.js +0 -31
- package/useCgformList.js +0 -470
- package/useExtendComponent.js +0 -5205
- package/useListButton.js +0 -923
- package/useOnlineTest.js +0 -44
- package/useSchemas.js +0 -653
- package/useTableSync.js +0 -117
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
var f = (u, i, n) => new Promise((l, r) => {
|
|
2
|
+
var h = (e) => {
|
|
3
|
+
try {
|
|
4
|
+
s(n.next(e));
|
|
5
|
+
} catch (o) {
|
|
6
|
+
r(o);
|
|
7
|
+
}
|
|
8
|
+
}, d = (e) => {
|
|
9
|
+
try {
|
|
10
|
+
s(n.throw(e));
|
|
11
|
+
} catch (o) {
|
|
12
|
+
r(o);
|
|
13
|
+
}
|
|
14
|
+
}, s = (e) => e.done ? l(e.value) : Promise.resolve(e.value).then(h, d);
|
|
15
|
+
s((n = n.apply(u, i)).next());
|
|
16
|
+
});
|
|
17
|
+
import { defineComponent as D, ref as g, watch as I, resolveComponent as _, openBlock as L, createElementBlock as k, createVNode as w, withCtx as v, createTextVNode as A } from "vue";
|
|
18
|
+
import { cloneDeep as E } from "lodash-es";
|
|
19
|
+
import { BasicTable as S, useTable as $ } from "/@/components/Table";
|
|
20
|
+
import { d as F, e as N, f as j } from "./auth.api-d3a6c4b3.mjs";
|
|
21
|
+
import { b as O, c as R } from "./auth.data-8be5c9e3.mjs";
|
|
22
|
+
import { _ as U } from "./index-6a09a912.mjs";
|
|
23
|
+
import "/@/utils/http/axios";
|
|
24
|
+
import "/@/components/jeecg/OnLine/JPopupOnlReport.vue";
|
|
25
|
+
import "/@/hooks/web/useMessage";
|
|
26
|
+
import "vue-router";
|
|
27
|
+
const V = D({
|
|
28
|
+
name: "AuthButtonConfig",
|
|
29
|
+
components: { BasicTable: S },
|
|
30
|
+
props: {
|
|
31
|
+
headId: {
|
|
32
|
+
type: String,
|
|
33
|
+
default: "",
|
|
34
|
+
required: !0
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
setup(u) {
|
|
38
|
+
const i = g(""), n = g(2), l = g(3), r = g(5), [h, { reload: d }] = $({
|
|
39
|
+
api: s,
|
|
40
|
+
rowKey: "code",
|
|
41
|
+
bordered: !0,
|
|
42
|
+
columns: O,
|
|
43
|
+
showIndexColumn: !1
|
|
44
|
+
});
|
|
45
|
+
I(
|
|
46
|
+
() => u.headId,
|
|
47
|
+
(t) => {
|
|
48
|
+
i.value = t.split("?")[0], d().catch(() => null);
|
|
49
|
+
},
|
|
50
|
+
{ immediate: !0 }
|
|
51
|
+
);
|
|
52
|
+
function s(t) {
|
|
53
|
+
return f(this, null, function* () {
|
|
54
|
+
let a = yield F(i.value, t), { authList: p, buttonList: c } = a, b = [];
|
|
55
|
+
for (let m of E(R)) {
|
|
56
|
+
let C = {
|
|
57
|
+
status: 0,
|
|
58
|
+
page: l.value
|
|
59
|
+
}, T = p.find((x) => x.code == m.code);
|
|
60
|
+
Object.assign(m, C, T), b.push(m);
|
|
61
|
+
}
|
|
62
|
+
return e(p, c, b);
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
function e(t, a, p) {
|
|
66
|
+
for (let c of a) {
|
|
67
|
+
let b = t.find((C) => C.code == c.buttonCode), m = {
|
|
68
|
+
code: c.buttonCode,
|
|
69
|
+
title: c.buttonName,
|
|
70
|
+
status: 0,
|
|
71
|
+
page: c.buttonStyle == "form" ? r.value : l.value
|
|
72
|
+
};
|
|
73
|
+
p.push(Object.assign(m, b));
|
|
74
|
+
}
|
|
75
|
+
return p;
|
|
76
|
+
}
|
|
77
|
+
function o(t, a) {
|
|
78
|
+
return f(this, null, function* () {
|
|
79
|
+
t ? B(a) : y(a);
|
|
80
|
+
});
|
|
81
|
+
}
|
|
82
|
+
function B(t) {
|
|
83
|
+
return f(this, null, function* () {
|
|
84
|
+
let a = yield N({
|
|
85
|
+
id: t.id,
|
|
86
|
+
code: t.code,
|
|
87
|
+
page: t.page,
|
|
88
|
+
cgformId: i.value,
|
|
89
|
+
type: n.value,
|
|
90
|
+
control: 5,
|
|
91
|
+
status: 1
|
|
92
|
+
});
|
|
93
|
+
t.id = a.id, t.status = 1;
|
|
94
|
+
});
|
|
95
|
+
}
|
|
96
|
+
function y(t) {
|
|
97
|
+
return f(this, null, function* () {
|
|
98
|
+
yield j(t.id), t.status = 0;
|
|
99
|
+
});
|
|
100
|
+
}
|
|
101
|
+
return { registerTable: h, onUpdateStatus: o };
|
|
102
|
+
}
|
|
103
|
+
}), q = { class: "auth-field-config" };
|
|
104
|
+
function z(u, i, n, l, r, h) {
|
|
105
|
+
const d = _("a-switch"), s = _("BasicTable");
|
|
106
|
+
return L(), k("div", q, [
|
|
107
|
+
w(s, { onRegister: u.registerTable }, {
|
|
108
|
+
switch: v(({ text: e, record: o }) => [
|
|
109
|
+
w(d, {
|
|
110
|
+
size: "small",
|
|
111
|
+
checked: o.status === 1,
|
|
112
|
+
onChange: (B) => u.onUpdateStatus(B, o)
|
|
113
|
+
}, null, 8, ["checked", "onChange"])
|
|
114
|
+
]),
|
|
115
|
+
control: v(() => [
|
|
116
|
+
A(" 可见 ")
|
|
117
|
+
]),
|
|
118
|
+
_: 1
|
|
119
|
+
}, 8, ["onRegister"])
|
|
120
|
+
]);
|
|
121
|
+
}
|
|
122
|
+
const tt = /* @__PURE__ */ U(V, [["render", z]]);
|
|
123
|
+
export {
|
|
124
|
+
tt as default
|
|
125
|
+
};
|
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
var y = (e, l, a) => new Promise((f, i) => {
|
|
2
|
+
var m = (t) => {
|
|
3
|
+
try {
|
|
4
|
+
u(a.next(t));
|
|
5
|
+
} catch (s) {
|
|
6
|
+
i(s);
|
|
7
|
+
}
|
|
8
|
+
}, n = (t) => {
|
|
9
|
+
try {
|
|
10
|
+
u(a.throw(t));
|
|
11
|
+
} catch (s) {
|
|
12
|
+
i(s);
|
|
13
|
+
}
|
|
14
|
+
}, u = (t) => t.done ? f(t.value) : Promise.resolve(t.value).then(m, n);
|
|
15
|
+
u((a = a.apply(e, l)).next());
|
|
16
|
+
});
|
|
17
|
+
import { defineComponent as w, ref as d, computed as A, watch as N, resolveComponent as g, openBlock as v, createElementBlock as E, createBlock as I, Fragment as M, createElementVNode as P, createVNode as k, withCtx as B, createTextVNode as C } from "vue";
|
|
18
|
+
import { useMessage as S } from "/@/hooks/web/useMessage";
|
|
19
|
+
import { c as R } from "./auth.data-8be5c9e3.mjs";
|
|
20
|
+
import { m as V, l as $, n as z } from "./auth.api-d3a6c4b3.mjs";
|
|
21
|
+
import { _ as L } from "./index-6a09a912.mjs";
|
|
22
|
+
import "/@/utils/http/axios";
|
|
23
|
+
import "/@/components/jeecg/OnLine/JPopupOnlReport.vue";
|
|
24
|
+
import "vue-router";
|
|
25
|
+
const q = w({
|
|
26
|
+
name: "AuthButtonTree",
|
|
27
|
+
props: {
|
|
28
|
+
cgformId: { type: String, required: !0 }
|
|
29
|
+
},
|
|
30
|
+
setup(e) {
|
|
31
|
+
const { createMessage: l } = S(), a = d(""), f = d(2), i = d(!0), m = d([]), n = d([]), u = d([]), t = d(""), s = A(() => !a.value);
|
|
32
|
+
N(() => e.cgformId, h, { immediate: !0 });
|
|
33
|
+
function h() {
|
|
34
|
+
return y(this, null, function* () {
|
|
35
|
+
if (!e.cgformId)
|
|
36
|
+
return;
|
|
37
|
+
let o = yield V(e.cgformId, f.value);
|
|
38
|
+
o.forEach((c) => {
|
|
39
|
+
for (const p of R)
|
|
40
|
+
if (c.code == p.code) {
|
|
41
|
+
c.title = p.title;
|
|
42
|
+
break;
|
|
43
|
+
}
|
|
44
|
+
});
|
|
45
|
+
let r = [];
|
|
46
|
+
for (let c of o) {
|
|
47
|
+
let p = T(c);
|
|
48
|
+
r.push({ key: c.id, title: p });
|
|
49
|
+
}
|
|
50
|
+
u.value = r;
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
function D() {
|
|
54
|
+
h(), _(a.value, t.value);
|
|
55
|
+
}
|
|
56
|
+
function _(o, r) {
|
|
57
|
+
return y(this, null, function* () {
|
|
58
|
+
a.value = o, t.value = r, n.value = [], yield h();
|
|
59
|
+
let c = yield $({
|
|
60
|
+
roleId: o,
|
|
61
|
+
cgformId: e.cgformId,
|
|
62
|
+
type: f.value,
|
|
63
|
+
authMode: r
|
|
64
|
+
});
|
|
65
|
+
n.value = c.map((p) => p.authId);
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
function K() {
|
|
69
|
+
a.value = "", h();
|
|
70
|
+
}
|
|
71
|
+
function x() {
|
|
72
|
+
return y(this, null, function* () {
|
|
73
|
+
yield z(a.value, e.cgformId, {
|
|
74
|
+
authId: JSON.stringify(n.value),
|
|
75
|
+
authMode: t.value
|
|
76
|
+
}), l.success("保存成功");
|
|
77
|
+
});
|
|
78
|
+
}
|
|
79
|
+
function T(o) {
|
|
80
|
+
let r = o.title + "-";
|
|
81
|
+
return o.page == 3 ? r += "列表可见" : o.page == 5 && (r += "表单可见"), r;
|
|
82
|
+
}
|
|
83
|
+
function b(o) {
|
|
84
|
+
m.value = o, i.value = !1;
|
|
85
|
+
}
|
|
86
|
+
function F() {
|
|
87
|
+
a.value = "", n.value = [];
|
|
88
|
+
}
|
|
89
|
+
return {
|
|
90
|
+
loadChecked: _,
|
|
91
|
+
clear: F,
|
|
92
|
+
expandedKeys: m,
|
|
93
|
+
autoExpandParent: i,
|
|
94
|
+
checkedKeys: n,
|
|
95
|
+
treeData: u,
|
|
96
|
+
disabled: s,
|
|
97
|
+
onSave: x,
|
|
98
|
+
onExpand: b,
|
|
99
|
+
onRefresh: D,
|
|
100
|
+
clearChecked: K
|
|
101
|
+
};
|
|
102
|
+
}
|
|
103
|
+
});
|
|
104
|
+
const J = { class: "onl-auth-tree-btns" };
|
|
105
|
+
function O(e, l, a, f, i, m) {
|
|
106
|
+
const n = g("a-empty"), u = g("a-button"), t = g("a-tree");
|
|
107
|
+
return v(), E("div", null, [
|
|
108
|
+
e.disabled ? (v(), I(n, {
|
|
109
|
+
key: 0,
|
|
110
|
+
description: "请先选中左侧角色/部门/用户"
|
|
111
|
+
})) : e.treeData.length === 0 ? (v(), I(n, {
|
|
112
|
+
key: 1,
|
|
113
|
+
description: "无权限信息"
|
|
114
|
+
})) : (v(), E(M, { key: 2 }, [
|
|
115
|
+
P("div", J, [
|
|
116
|
+
k(u, {
|
|
117
|
+
onClick: e.onRefresh,
|
|
118
|
+
size: "small",
|
|
119
|
+
type: "primary",
|
|
120
|
+
preIcon: "ant-design:redo",
|
|
121
|
+
ghost: ""
|
|
122
|
+
}, {
|
|
123
|
+
default: B(() => [
|
|
124
|
+
C("刷新")
|
|
125
|
+
]),
|
|
126
|
+
_: 1
|
|
127
|
+
}, 8, ["onClick"]),
|
|
128
|
+
k(u, {
|
|
129
|
+
onClick: e.onSave,
|
|
130
|
+
size: "small",
|
|
131
|
+
type: "primary",
|
|
132
|
+
preIcon: "ant-design:save",
|
|
133
|
+
ghost: ""
|
|
134
|
+
}, {
|
|
135
|
+
default: B(() => [
|
|
136
|
+
C("保存")
|
|
137
|
+
]),
|
|
138
|
+
_: 1
|
|
139
|
+
}, 8, ["onClick"])
|
|
140
|
+
]),
|
|
141
|
+
k(t, {
|
|
142
|
+
checkable: "",
|
|
143
|
+
checkedKeys: e.checkedKeys,
|
|
144
|
+
"onUpdate:checkedKeys": l[0] || (l[0] = (s) => e.checkedKeys = s),
|
|
145
|
+
expandedKeys: e.expandedKeys,
|
|
146
|
+
autoExpandParent: e.autoExpandParent,
|
|
147
|
+
treeData: e.treeData,
|
|
148
|
+
onExpand: e.onExpand
|
|
149
|
+
}, null, 8, ["checkedKeys", "expandedKeys", "autoExpandParent", "treeData", "onExpand"])
|
|
150
|
+
], 64))
|
|
151
|
+
]);
|
|
152
|
+
}
|
|
153
|
+
const ee = /* @__PURE__ */ L(q, [["render", O], ["__scopeId", "data-v-d165a23e"]]);
|
|
154
|
+
export {
|
|
155
|
+
ee as default
|
|
156
|
+
};
|
|
@@ -0,0 +1,212 @@
|
|
|
1
|
+
var P = Object.defineProperty, $ = Object.defineProperties;
|
|
2
|
+
var j = Object.getOwnPropertyDescriptors;
|
|
3
|
+
var T = Object.getOwnPropertySymbols;
|
|
4
|
+
var V = Object.prototype.hasOwnProperty, q = Object.prototype.propertyIsEnumerable;
|
|
5
|
+
var B = (e, o, a) => o in e ? P(e, o, { enumerable: !0, configurable: !0, writable: !0, value: a }) : e[o] = a, y = (e, o) => {
|
|
6
|
+
for (var a in o || (o = {}))
|
|
7
|
+
V.call(o, a) && B(e, a, o[a]);
|
|
8
|
+
if (T)
|
|
9
|
+
for (var a of T(o))
|
|
10
|
+
q.call(o, a) && B(e, a, o[a]);
|
|
11
|
+
return e;
|
|
12
|
+
}, M = (e, o) => $(e, j(o));
|
|
13
|
+
var C = (e, o, a) => new Promise((c, m) => {
|
|
14
|
+
var d = (n) => {
|
|
15
|
+
try {
|
|
16
|
+
i(a.next(n));
|
|
17
|
+
} catch (s) {
|
|
18
|
+
m(s);
|
|
19
|
+
}
|
|
20
|
+
}, f = (n) => {
|
|
21
|
+
try {
|
|
22
|
+
i(a.throw(n));
|
|
23
|
+
} catch (s) {
|
|
24
|
+
m(s);
|
|
25
|
+
}
|
|
26
|
+
}, i = (n) => n.done ? c(n.value) : Promise.resolve(n.value).then(d, f);
|
|
27
|
+
i((a = a.apply(e, o)).next());
|
|
28
|
+
});
|
|
29
|
+
import { defineComponent as z, ref as N, watch as k, reactive as x, nextTick as G, resolveComponent as r, openBlock as K, createElementBlock as Q, createVNode as l, withCtx as u, createTextVNode as H, normalizeProps as J, guardReactiveProps as W } from "vue";
|
|
30
|
+
import { BasicTable as X, TableAction as Y, useTable as Z } from "/@/components/Table";
|
|
31
|
+
import { BasicModal as tt, useModal as et } from "/@/components/Modal";
|
|
32
|
+
import { BasicForm as ot, useForm as at } from "/@/components/Form";
|
|
33
|
+
import { g as nt, h as it, i as st, j as rt } from "./auth.api-d3a6c4b3.mjs";
|
|
34
|
+
import { d as lt, u as ct, U as F } from "./auth.data-8be5c9e3.mjs";
|
|
35
|
+
import { _ as ut } from "./index-6a09a912.mjs";
|
|
36
|
+
import "/@/utils/http/axios";
|
|
37
|
+
import "/@/components/jeecg/OnLine/JPopupOnlReport.vue";
|
|
38
|
+
import "/@/hooks/web/useMessage";
|
|
39
|
+
import "vue-router";
|
|
40
|
+
const mt = z({
|
|
41
|
+
name: "AuthDataConfig",
|
|
42
|
+
components: { BasicTable: X, TableAction: Y, BasicModal: tt, BasicForm: ot },
|
|
43
|
+
props: {
|
|
44
|
+
cgformId: { type: String, required: !0 },
|
|
45
|
+
authFields: { type: Array, required: !0 }
|
|
46
|
+
},
|
|
47
|
+
setup(e) {
|
|
48
|
+
const o = N(!1), [a, { reload: c, setLoading: m }] = Z({
|
|
49
|
+
api: (t) => nt(e.cgformId, t),
|
|
50
|
+
rowKey: "id",
|
|
51
|
+
bordered: !0,
|
|
52
|
+
columns: lt,
|
|
53
|
+
showIndexColumn: !1,
|
|
54
|
+
// 操作列
|
|
55
|
+
actionColumn: {
|
|
56
|
+
width: 120,
|
|
57
|
+
title: "操作",
|
|
58
|
+
fixed: !1,
|
|
59
|
+
dataIndex: "action",
|
|
60
|
+
slots: { customRender: "action" }
|
|
61
|
+
}
|
|
62
|
+
});
|
|
63
|
+
k(o, (t) => m(t));
|
|
64
|
+
const [d, { openModal: f, closeModal: i }] = et(), n = x({
|
|
65
|
+
title: "",
|
|
66
|
+
width: 800,
|
|
67
|
+
confirmLoading: !1,
|
|
68
|
+
onOk: U,
|
|
69
|
+
onCancel: i,
|
|
70
|
+
onRegister: d
|
|
71
|
+
});
|
|
72
|
+
let s = !1, p = {};
|
|
73
|
+
const { formSchemas: b } = ct(e, {
|
|
74
|
+
onRuleOperatorChange: L
|
|
75
|
+
}), [w, { validate: g, resetFields: _, setFieldsValue: D }] = at({
|
|
76
|
+
schemas: b,
|
|
77
|
+
showActionButtonGroup: !1,
|
|
78
|
+
labelAlign: "right"
|
|
79
|
+
});
|
|
80
|
+
k(
|
|
81
|
+
() => e.cgformId,
|
|
82
|
+
() => {
|
|
83
|
+
c().catch(() => null);
|
|
84
|
+
},
|
|
85
|
+
{ immediate: !0 }
|
|
86
|
+
);
|
|
87
|
+
function A(t) {
|
|
88
|
+
return C(this, null, function* () {
|
|
89
|
+
var h;
|
|
90
|
+
s = (h = t.isUpdate) != null ? h : !1, n.title = t.title, f(), yield G(), yield _(), p = Object.assign({}, t.record), yield D(p);
|
|
91
|
+
});
|
|
92
|
+
}
|
|
93
|
+
function S() {
|
|
94
|
+
A({ title: "新增" });
|
|
95
|
+
}
|
|
96
|
+
function v(t) {
|
|
97
|
+
A({ title: "编辑", record: t, isUpdate: !0 });
|
|
98
|
+
}
|
|
99
|
+
function R(t) {
|
|
100
|
+
o.value = !0, rt(t).then(c).finally(() => o.value = !1);
|
|
101
|
+
}
|
|
102
|
+
function U() {
|
|
103
|
+
return C(this, null, function* () {
|
|
104
|
+
try {
|
|
105
|
+
n.confirmLoading = !0;
|
|
106
|
+
let t = yield g();
|
|
107
|
+
t = Object.assign({}, p, t), t.ruleOperator == F && (t.ruleColumn = ""), t.cgformId = e.cgformId, yield it(t, s), c(), i();
|
|
108
|
+
} finally {
|
|
109
|
+
n.confirmLoading = !1;
|
|
110
|
+
}
|
|
111
|
+
});
|
|
112
|
+
}
|
|
113
|
+
function I(t) {
|
|
114
|
+
o.value = !0;
|
|
115
|
+
let h = Math.abs(t.status - 1);
|
|
116
|
+
st(M(y({}, t), { status: h })).then(() => {
|
|
117
|
+
t.status = h;
|
|
118
|
+
}).finally(() => {
|
|
119
|
+
o.value = !1;
|
|
120
|
+
});
|
|
121
|
+
}
|
|
122
|
+
function L(t) {
|
|
123
|
+
t == F && D({
|
|
124
|
+
ruleColumn: ""
|
|
125
|
+
});
|
|
126
|
+
}
|
|
127
|
+
function O(t) {
|
|
128
|
+
return [
|
|
129
|
+
{
|
|
130
|
+
label: "编辑",
|
|
131
|
+
onClick: () => v(t)
|
|
132
|
+
}
|
|
133
|
+
];
|
|
134
|
+
}
|
|
135
|
+
function E(t) {
|
|
136
|
+
return [
|
|
137
|
+
{
|
|
138
|
+
label: "删除",
|
|
139
|
+
popConfirm: {
|
|
140
|
+
title: "确定删除吗?",
|
|
141
|
+
placement: "left",
|
|
142
|
+
confirm: () => R(t.id)
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
];
|
|
146
|
+
}
|
|
147
|
+
return {
|
|
148
|
+
loading: o,
|
|
149
|
+
formModalProps: n,
|
|
150
|
+
onAdd: S,
|
|
151
|
+
onUpdateStatus: I,
|
|
152
|
+
getTableAction: O,
|
|
153
|
+
getDropDownAction: E,
|
|
154
|
+
registerTable: a,
|
|
155
|
+
registerModal: d,
|
|
156
|
+
registerForm: w
|
|
157
|
+
};
|
|
158
|
+
}
|
|
159
|
+
});
|
|
160
|
+
function dt(e, o, a, c, m, d) {
|
|
161
|
+
const f = r("a-button"), i = r("a-switch"), n = r("TableAction"), s = r("BasicTable"), p = r("BasicForm"), b = r("a-spin"), w = r("BasicModal");
|
|
162
|
+
return K(), Q("div", null, [
|
|
163
|
+
l(s, {
|
|
164
|
+
onRegister: e.registerTable,
|
|
165
|
+
loading: e.loading
|
|
166
|
+
}, {
|
|
167
|
+
tableTitle: u(() => [
|
|
168
|
+
l(f, {
|
|
169
|
+
onClick: e.onAdd,
|
|
170
|
+
type: "primary",
|
|
171
|
+
preIcon: "ant-design:plus"
|
|
172
|
+
}, {
|
|
173
|
+
default: u(() => [
|
|
174
|
+
H("新增")
|
|
175
|
+
]),
|
|
176
|
+
_: 1
|
|
177
|
+
}, 8, ["onClick"])
|
|
178
|
+
]),
|
|
179
|
+
switch: u(({ text: g, record: _ }) => [
|
|
180
|
+
l(i, {
|
|
181
|
+
size: "small",
|
|
182
|
+
checked: _.status === 1,
|
|
183
|
+
onClick: () => e.onUpdateStatus(_)
|
|
184
|
+
}, null, 8, ["checked", "onClick"])
|
|
185
|
+
]),
|
|
186
|
+
action: u(({ record: g }) => [
|
|
187
|
+
l(n, {
|
|
188
|
+
actions: e.getTableAction(g),
|
|
189
|
+
dropDownActions: e.getDropDownAction(g)
|
|
190
|
+
}, null, 8, ["actions", "dropDownActions"])
|
|
191
|
+
]),
|
|
192
|
+
_: 1
|
|
193
|
+
}, 8, ["onRegister", "loading"]),
|
|
194
|
+
l(w, J(W(e.formModalProps)), {
|
|
195
|
+
default: u(() => [
|
|
196
|
+
l(b, {
|
|
197
|
+
spinning: e.formModalProps.confirmLoading
|
|
198
|
+
}, {
|
|
199
|
+
default: u(() => [
|
|
200
|
+
l(p, { onRegister: e.registerForm }, null, 8, ["onRegister"])
|
|
201
|
+
]),
|
|
202
|
+
_: 1
|
|
203
|
+
}, 8, ["spinning"])
|
|
204
|
+
]),
|
|
205
|
+
_: 1
|
|
206
|
+
}, 16)
|
|
207
|
+
]);
|
|
208
|
+
}
|
|
209
|
+
const yt = /* @__PURE__ */ ut(mt, [["render", dt]]);
|
|
210
|
+
export {
|
|
211
|
+
yt as default
|
|
212
|
+
};
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
var f = (e, s, t) => new Promise((l, c) => {
|
|
2
|
+
var i = (a) => {
|
|
3
|
+
try {
|
|
4
|
+
o(t.next(a));
|
|
5
|
+
} catch (u) {
|
|
6
|
+
c(u);
|
|
7
|
+
}
|
|
8
|
+
}, n = (a) => {
|
|
9
|
+
try {
|
|
10
|
+
o(t.throw(a));
|
|
11
|
+
} catch (u) {
|
|
12
|
+
c(u);
|
|
13
|
+
}
|
|
14
|
+
}, o = (a) => a.done ? l(a.value) : Promise.resolve(a.value).then(i, n);
|
|
15
|
+
o((t = t.apply(e, s)).next());
|
|
16
|
+
});
|
|
17
|
+
import { defineComponent as A, ref as r, computed as B, watch as F, resolveComponent as y, openBlock as h, createElementBlock as _, createBlock as g, Fragment as N, createElementVNode as M, createVNode as v, withCtx as E, createTextVNode as D } from "vue";
|
|
18
|
+
import { useMessage as P } from "/@/hooks/web/useMessage";
|
|
19
|
+
import { o as S, l as R, p as V } from "./auth.api-d3a6c4b3.mjs";
|
|
20
|
+
import { _ as $ } from "./index-6a09a912.mjs";
|
|
21
|
+
import "/@/utils/http/axios";
|
|
22
|
+
import "/@/components/jeecg/OnLine/JPopupOnlReport.vue";
|
|
23
|
+
import "vue-router";
|
|
24
|
+
const z = A({
|
|
25
|
+
name: "AuthDataTree",
|
|
26
|
+
props: {
|
|
27
|
+
cgformId: { type: String, required: !0 }
|
|
28
|
+
},
|
|
29
|
+
setup(e) {
|
|
30
|
+
const { createMessage: s } = P(), t = r(""), l = r(3), c = r(!0), i = r([]), n = r([]), o = r([]), a = r(""), u = B(() => !t.value);
|
|
31
|
+
F(() => e.cgformId, m, { immediate: !0 });
|
|
32
|
+
function m() {
|
|
33
|
+
return f(this, null, function* () {
|
|
34
|
+
if (!e.cgformId)
|
|
35
|
+
return;
|
|
36
|
+
let d = yield S(e.cgformId, l.value);
|
|
37
|
+
o.value = d.map((p) => ({ key: p.id, title: p.ruleName }));
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
function k(d, p) {
|
|
41
|
+
return f(this, null, function* () {
|
|
42
|
+
t.value = d, a.value = p, n.value = [], yield m();
|
|
43
|
+
let T = yield R({
|
|
44
|
+
roleId: d,
|
|
45
|
+
cgformId: e.cgformId,
|
|
46
|
+
type: l.value,
|
|
47
|
+
authMode: p
|
|
48
|
+
});
|
|
49
|
+
n.value = T.map((w) => w.authId);
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
function I() {
|
|
53
|
+
t.value = "", m();
|
|
54
|
+
}
|
|
55
|
+
function C() {
|
|
56
|
+
m(), k(t.value, a.value);
|
|
57
|
+
}
|
|
58
|
+
function K() {
|
|
59
|
+
return f(this, null, function* () {
|
|
60
|
+
yield V(t.value, e.cgformId, {
|
|
61
|
+
authId: JSON.stringify(n.value),
|
|
62
|
+
authMode: a.value
|
|
63
|
+
}), s.success("保存成功");
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
function b(d) {
|
|
67
|
+
i.value = d, c.value = !1;
|
|
68
|
+
}
|
|
69
|
+
function x() {
|
|
70
|
+
t.value = "", n.value = [];
|
|
71
|
+
}
|
|
72
|
+
return {
|
|
73
|
+
loadChecked: k,
|
|
74
|
+
clear: x,
|
|
75
|
+
expandedKeys: i,
|
|
76
|
+
autoExpandParent: c,
|
|
77
|
+
checkedKeys: n,
|
|
78
|
+
treeData: o,
|
|
79
|
+
disabled: u,
|
|
80
|
+
onSave: K,
|
|
81
|
+
onExpand: b,
|
|
82
|
+
onRefresh: C,
|
|
83
|
+
clearChecked: I
|
|
84
|
+
};
|
|
85
|
+
}
|
|
86
|
+
});
|
|
87
|
+
const q = { class: "onl-auth-tree-btns" };
|
|
88
|
+
function J(e, s, t, l, c, i) {
|
|
89
|
+
const n = y("a-empty"), o = y("a-button"), a = y("a-tree");
|
|
90
|
+
return h(), _("div", null, [
|
|
91
|
+
e.disabled ? (h(), g(n, {
|
|
92
|
+
key: 0,
|
|
93
|
+
description: "请先选中左侧角色/部门/用户"
|
|
94
|
+
})) : e.treeData.length === 0 ? (h(), g(n, {
|
|
95
|
+
key: 1,
|
|
96
|
+
description: "无权限信息"
|
|
97
|
+
})) : (h(), _(N, { key: 2 }, [
|
|
98
|
+
M("div", q, [
|
|
99
|
+
v(o, {
|
|
100
|
+
onClick: e.onRefresh,
|
|
101
|
+
size: "small",
|
|
102
|
+
type: "primary",
|
|
103
|
+
preIcon: "ant-design:redo",
|
|
104
|
+
ghost: ""
|
|
105
|
+
}, {
|
|
106
|
+
default: E(() => [
|
|
107
|
+
D("刷新")
|
|
108
|
+
]),
|
|
109
|
+
_: 1
|
|
110
|
+
}, 8, ["onClick"]),
|
|
111
|
+
v(o, {
|
|
112
|
+
onClick: e.onSave,
|
|
113
|
+
size: "small",
|
|
114
|
+
type: "primary",
|
|
115
|
+
preIcon: "ant-design:save",
|
|
116
|
+
ghost: ""
|
|
117
|
+
}, {
|
|
118
|
+
default: E(() => [
|
|
119
|
+
D("保存")
|
|
120
|
+
]),
|
|
121
|
+
_: 1
|
|
122
|
+
}, 8, ["onClick"])
|
|
123
|
+
]),
|
|
124
|
+
v(a, {
|
|
125
|
+
checkable: "",
|
|
126
|
+
checkedKeys: e.checkedKeys,
|
|
127
|
+
"onUpdate:checkedKeys": s[0] || (s[0] = (u) => e.checkedKeys = u),
|
|
128
|
+
expandedKeys: e.expandedKeys,
|
|
129
|
+
autoExpandParent: e.autoExpandParent,
|
|
130
|
+
treeData: e.treeData,
|
|
131
|
+
onExpand: e.onExpand
|
|
132
|
+
}, null, 8, ["checkedKeys", "expandedKeys", "autoExpandParent", "treeData", "onExpand"])
|
|
133
|
+
], 64))
|
|
134
|
+
]);
|
|
135
|
+
}
|
|
136
|
+
const X = /* @__PURE__ */ $(z, [["render", J], ["__scopeId", "data-v-c6be2157"]]);
|
|
137
|
+
export {
|
|
138
|
+
X as default
|
|
139
|
+
};
|