@jeecg/online 3.5.3-beta3 → 3.6.0-beta

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.
Files changed (163) hide show
  1. package/AuthButtonConfig-b6a674fa.mjs +125 -0
  2. package/AuthButtonTree-09e57bc4.mjs +156 -0
  3. package/AuthDataConfig-6e7e61ec.mjs +212 -0
  4. package/AuthDataTree-e83286c5.mjs +139 -0
  5. package/AuthFieldConfig-f1ec2708.mjs +139 -0
  6. package/AuthFieldTree-bb72e21f.mjs +232 -0
  7. package/AuthManagerDrawer-28a2d108.mjs +114 -0
  8. package/AuthSetterModal-2990d553.mjs +261 -0
  9. package/CgformCopyList-36a4cbf0.mjs +246 -0
  10. package/CgformModal-7399a5ac.mjs +611 -0
  11. package/CgreportModal-2eb9c9e1.mjs +13 -0
  12. package/CgreportModal.vue_vue_type_script_setup_true_lang-c2ceb064.mjs +566 -0
  13. package/CheckDictTable-3a8a54b3.mjs +211 -0
  14. package/CodeFileListModal-72f0d3bb.mjs +158 -0
  15. package/CodeFileViewModal-9eb88c47.mjs +244 -0
  16. package/CodeGeneratorModal-a89958f5.mjs +233 -0
  17. package/CustomButtonList-c44aec5a.mjs +363 -0
  18. package/DBAttributeTable-7d285e8d.mjs +473 -0
  19. package/DbToOnlineModal-d23cbeb1.mjs +160 -0
  20. package/DetailForm-2901d215.mjs +461 -0
  21. package/EnhanceJavaModal-153899a9.mjs +264 -0
  22. package/EnhanceJsHistory-7f5db3b1.mjs +184 -0
  23. package/EnhanceJsModal-c2fb75b8.mjs +311 -0
  24. package/EnhanceSqlModal-965e9b0a.mjs +268 -0
  25. package/ExtendConfigModal-8f08466f.mjs +111 -0
  26. package/FieldExtendJsonModal-adfcf5a7.mjs +219 -0
  27. package/FileSelectModal-432d4521.mjs +103 -0
  28. package/ForeignKeyTable-faab7ccf.mjs +69 -0
  29. package/IndexTable-0a2d3718.mjs +89 -0
  30. package/JModalTip-e1938b49.mjs +46 -0
  31. package/JOnlineSearchSelect-7e908492.mjs +95 -0
  32. package/LeftDepart-54f245b3.mjs +82 -0
  33. package/LeftRole-c138f892.mjs +86 -0
  34. package/LeftUser-9c812f8a.mjs +105 -0
  35. package/LinkTableConfigModal-c2c5c7e6.mjs +230 -0
  36. package/LinkTableFieldConfigModal-a3553b1f.mjs +176 -0
  37. package/LinkTableListPiece-7f793b08.mjs +34 -0
  38. package/ModalFormDemo-65685b0e.mjs +78 -0
  39. package/OnlCgformErpList-52c87ed3.mjs +449 -0
  40. package/OnlCgformErpSubTable-6e7fb17b.mjs +398 -0
  41. package/OnlCgformInnerSubTable-f0727b8f.mjs +248 -0
  42. package/OnlCgformInnerTableList-9f89c173.mjs +430 -0
  43. package/OnlCgformTabList-15516315.mjs +390 -0
  44. package/OnlineAutoList-63a0224f.mjs +474 -0
  45. package/OnlineAutoModal-ffe19c3f.mjs +206 -0
  46. package/OnlineAutoTreeList-317c7105.mjs +495 -0
  47. package/OnlineCustomModal-3939ce78.mjs +227 -0
  48. package/OnlineDetailModal-bfb1375f.mjs +177 -0
  49. package/OnlineForm-069f6092.mjs +749 -0
  50. package/OnlineFormDetail-ad5735fb.mjs +296 -0
  51. package/OnlineQueryForm-0771c80f.mjs +385 -0
  52. package/OnlineSearchFormItem-0db5834f.mjs +348 -0
  53. package/OnlineSelectCascade-a05c30f4.mjs +159 -0
  54. package/OnlineSubFormDetail-583d01eb.mjs +142 -0
  55. package/OnlineTabAutoModal-747e071d.mjs +253 -0
  56. package/OnlineTabDetailModal-887f0174.mjs +222 -0
  57. package/OnlineTabForm-b1dcd4b4.mjs +765 -0
  58. package/OnlineTabFormDetail-8e494a96.mjs +323 -0
  59. package/PageAttributeTable-5966b201.mjs +404 -0
  60. package/ProcessOnlineForm-4382bea7.mjs +177 -0
  61. package/QueryTable-6e8053ad.mjs +115 -0
  62. package/README.md +2 -1
  63. package/SuperQuery-78db6998.mjs +841 -0
  64. package/SuperQueryValComponent-471110b5.mjs +8 -0
  65. package/SuperQueryValComponent.vue_vue_type_script_lang-e3ad7ee8.mjs +101 -0
  66. package/auth.api-d3a6c4b3.mjs +39 -0
  67. package/auth.data-8be5c9e3.mjs +141 -0
  68. package/{cgform.data.js → cgform.data-cbdd88c3.mjs} +93 -62
  69. package/constant-754f1a9d.mjs +9 -0
  70. package/enhance.api-138e6826.mjs +104 -0
  71. package/enhance.data-efc7e155.mjs +175 -0
  72. package/index-0a93652b.mjs +237 -0
  73. package/index-7e9a23f2.mjs +1494 -0
  74. package/index-b70302f2.mjs +56 -0
  75. package/main.index.js +7 -1
  76. package/package.json +1 -1
  77. package/style.css +1 -1
  78. package/useCgformList-0c603af1.mjs +424 -0
  79. package/useCustomHook-acb00837.mjs +53 -0
  80. package/useExtendComponent-aa1cdfc8.mjs +3917 -0
  81. package/useListButton-0f18bf6a.mjs +671 -0
  82. package/useOnlinePopEvent-687070b7.mjs +19 -0
  83. package/useOnlineTest-e4bd8be3.mjs +42 -0
  84. package/useSchemas-43429d80.mjs +685 -0
  85. package/useTableSync-774c3774.mjs +87 -0
  86. package/AuthButtonConfig.js +0 -147
  87. package/AuthButtonTree.js +0 -183
  88. package/AuthDataConfig.js +0 -246
  89. package/AuthDataTree.js +0 -160
  90. package/AuthFieldConfig.js +0 -170
  91. package/AuthFieldTree.js +0 -281
  92. package/AuthManagerDrawer.js +0 -125
  93. package/AuthSetterModal.js +0 -316
  94. package/CgformCopyList.js +0 -266
  95. package/CgformModal.js +0 -780
  96. package/CgreportModal.js +0 -667
  97. package/CheckDictTable.js +0 -242
  98. package/CodeFileListModal.js +0 -175
  99. package/CodeFileViewModal.js +0 -325
  100. package/CodeGeneratorModal.js +0 -297
  101. package/CustomButtonList.js +0 -410
  102. package/DBAttributeTable.js +0 -526
  103. package/DbToOnlineModal.js +0 -192
  104. package/DetailForm.js +0 -608
  105. package/EnhanceJavaModal.js +0 -298
  106. package/EnhanceJsHistory.js +0 -229
  107. package/EnhanceJsModal.js +0 -293
  108. package/EnhanceSqlModal.js +0 -299
  109. package/ExtendConfigModal.js +0 -151
  110. package/FieldExtendJsonModal.js +0 -283
  111. package/FileSelectModal.js +0 -102
  112. package/ForeignKeyTable.js +0 -79
  113. package/IndexTable.js +0 -97
  114. package/JModalTip.js +0 -54
  115. package/JOnlineSearchSelect.js +0 -115
  116. package/LICENSE +0 -9
  117. package/LeftDepart.js +0 -96
  118. package/LeftRole.js +0 -98
  119. package/LeftUser.js +0 -117
  120. package/LinkTableConfigModal.js +0 -289
  121. package/LinkTableFieldConfigModal.js +0 -218
  122. package/LinkTableListPiece.js +0 -36
  123. package/ModalFormDemo.js +0 -85
  124. package/OnlineAutoList.js +0 -523
  125. package/OnlineAutoModal.js +0 -226
  126. package/OnlineAutoTreeList.js +0 -552
  127. package/OnlineCustomModal.js +0 -286
  128. package/OnlineDetailModal.js +0 -190
  129. package/OnlineForm.js +0 -1016
  130. package/OnlineFormDetail.js +0 -347
  131. package/OnlineQueryForm.js +0 -484
  132. package/OnlineSearchFormItem.js +0 -436
  133. package/OnlineSelectCascade.js +0 -228
  134. package/OnlineSubFormDetail.js +0 -166
  135. package/PageAttributeTable.js +0 -486
  136. package/ProcessOnlineForm.js +0 -208
  137. package/QueryTable.js +0 -129
  138. package/SuperQuery.js +0 -1020
  139. package/SuperQueryValComponent.js +0 -8
  140. package/SuperQueryValComponent.vue_vue_type_script_lang.js +0 -168
  141. package/_arrayPush.js +0 -278
  142. package/_baseClone.js +0 -471
  143. package/_baseSlice.js +0 -18
  144. package/_commonjsHelpers.js +0 -5
  145. package/_flatRest.js +0 -174
  146. package/auth.api.js +0 -43
  147. package/auth.data.js +0 -142
  148. package/clipboard.js +0 -565
  149. package/enhance.api.js +0 -129
  150. package/enhance.data.js +0 -196
  151. package/index.js +0 -87
  152. package/index2.js +0 -340
  153. package/index3.js +0 -264
  154. package/isArray.js +0 -47
  155. package/omit.js +0 -60
  156. package/pick.js +0 -68
  157. package/toString.js +0 -31
  158. package/useCgformList.js +0 -470
  159. package/useExtendComponent.js +0 -5205
  160. package/useListButton.js +0 -923
  161. package/useOnlineTest.js +0 -44
  162. package/useSchemas.js +0 -653
  163. 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-b70302f2.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-b70302f2.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-b70302f2.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-b70302f2.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
+ };