@jeecg/online 3.7.0-beta → 3.7.4-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 (150) hide show
  1. package/AccountLoginForm-84cbd344.mjs +254 -0
  2. package/AiModal-26903538.mjs +84 -0
  3. package/AppForgetPassword-52443f23.mjs +310 -0
  4. package/AppLogin-ecf798fa.mjs +287 -0
  5. package/AppLoginHeader-4432c584.mjs +27 -0
  6. package/AppNameEmail-3303a037.mjs +180 -0
  7. package/AppRegister-79a62c59.mjs +303 -0
  8. package/AppTenant-f0bef7ca.mjs +373 -0
  9. package/AppThirdForm-fd8b4604.mjs +189 -0
  10. package/AuthButtonConfig-d5bffca0.mjs +156 -0
  11. package/AuthButtonTree-b0bd6c40.mjs +165 -0
  12. package/{AuthDataConfig-7bb0cd85.mjs → AuthDataConfig-d3b7afa4.mjs} +30 -29
  13. package/{AuthDataTree-6e3bb86f.mjs → AuthDataTree-f14a98d9.mjs} +47 -47
  14. package/AuthFieldConfig-f1e224cc.mjs +245 -0
  15. package/AuthFieldTree-5cc0da05.mjs +232 -0
  16. package/{AuthManagerDrawer-5e2ed5ce.mjs → AuthManagerDrawer-32556109.mjs} +9 -8
  17. package/{AuthSetterModal-6f74449c.mjs → AuthSetterModal-364f1f67.mjs} +12 -11
  18. package/BuiltInButtonList-bb6cf95c.mjs +10 -0
  19. package/BuiltInButtonList.vue_vue_type_script_setup_true_lang-07d0b7d0.mjs +338 -0
  20. package/CgformAddressModal-1131274c.mjs +260 -0
  21. package/CgformCopyList-5fba0810.mjs +252 -0
  22. package/CgformModal-c4a4e0c2.mjs +667 -0
  23. package/{CgreportModal-5a23d089.mjs → CgreportModal-8a84aae5.mjs} +186 -172
  24. package/{CheckDictTable-b5cb0e2b.mjs → CheckDictTable-8a938e3a.mjs} +37 -34
  25. package/CodeFileListModal-a924902a.mjs +159 -0
  26. package/CodeFileViewModal-405e2b58.mjs +253 -0
  27. package/CodeGeneratorModal-2e1dc13d.mjs +281 -0
  28. package/CustomButtonList-c453b654.mjs +274 -0
  29. package/{DBAttributeTable-95dc66c1.mjs → DBAttributeTable-1a45c7b7.mjs} +80 -72
  30. package/DbToOnlineModal-f28ff0a3.mjs +168 -0
  31. package/{DetailForm-4aa2570b.mjs → DetailForm-c592b8d8.mjs} +50 -49
  32. package/DropMenuItem-1e49abea.mjs +44 -0
  33. package/{EnhanceJavaModal-98934198.mjs → EnhanceJavaModal-d5a93f2a.mjs} +62 -62
  34. package/{EnhanceJsHistory-9c4acdaf.mjs → EnhanceJsHistory-8ddb0657.mjs} +35 -35
  35. package/{EnhanceJsModal-247f640d.mjs → EnhanceJsModal-dc4f9ade.mjs} +154 -138
  36. package/{EnhanceSqlModal-65b74b0f.mjs → EnhanceSqlModal-984f045d.mjs} +67 -67
  37. package/ErrorTip-bb616e32.mjs +7 -0
  38. package/ErrorTip.vue_vue_type_script_setup_true_lang-49d35987.mjs +60 -0
  39. package/{ExtendConfigModal-00f2fb55.mjs → ExtendConfigModal-7d70f362.mjs} +2 -2
  40. package/{FieldExtendJsonModal-cc7fce26.mjs → FieldExtendJsonModal-bf04d70e.mjs} +2 -2
  41. package/{FileSelectModal-38660e3c.mjs → FileSelectModal-ffc69d4a.mjs} +23 -23
  42. package/{ForeignKeyTable-a78cb5ad.mjs → ForeignKeyTable-92decaea.mjs} +3 -3
  43. package/{IndexTable-1b496559.mjs → IndexTable-2ded2014.mjs} +28 -20
  44. package/JModalTip-a927f85d.mjs +49 -0
  45. package/JOnlineSearchSelect-04ec87d0.mjs +128 -0
  46. package/{LeftDepart-8ade4bf7.mjs → LeftDepart-52cb6743.mjs} +1 -1
  47. package/LeftRole-b0e0b496.mjs +86 -0
  48. package/{LeftUser-b4d1372a.mjs → LeftUser-dd4b10e2.mjs} +30 -30
  49. package/{LinkTableConfigModal-a138c85e.mjs → LinkTableConfigModal-7eeb3e58.mjs} +43 -31
  50. package/{LinkTableFieldConfigModal-17b413b0.mjs → LinkTableFieldConfigModal-b078fcef.mjs} +1 -1
  51. package/{LinkTableListPiece-2660d709.mjs → LinkTableListPiece-e016b8e6.mjs} +1 -1
  52. package/{ModalFormDemo-0544737d.mjs → ModalFormDemo-aaa719a7.mjs} +1 -1
  53. package/OnlCgformErpList-5c5acdaa.mjs +488 -0
  54. package/OnlCgformErpSubTable-e1b88312.mjs +441 -0
  55. package/{OnlCgformInnerSubTable-290ace5d.mjs → OnlCgformInnerSubTable-6b6fa15a.mjs} +106 -107
  56. package/OnlCgformInnerTableList-b283a525.mjs +474 -0
  57. package/OnlCgformTabList-91e3dd78.mjs +424 -0
  58. package/OnlineAutoList-84475f1b.mjs +513 -0
  59. package/OnlineAutoModal-95f46901.mjs +260 -0
  60. package/OnlineAutoTreeList-20b9ce04.mjs +523 -0
  61. package/OnlineCustomModal-c8b1e780.mjs +232 -0
  62. package/{OnlineDetailModal-2a271e0b.mjs → OnlineDetailModal-5b412bb9.mjs} +74 -65
  63. package/OnlineForm-58282699.mjs +1012 -0
  64. package/{OnlineFormDetail-e036cd11.mjs → OnlineFormDetail-fc087725.mjs} +7 -7
  65. package/{OnlineFormUrlAdd-7fb3dcca.mjs → OnlineFormUrlAdd-bc9105bb.mjs} +10 -10
  66. package/{OnlineFormUrlDetail-b2292137.mjs → OnlineFormUrlDetail-ad912560.mjs} +12 -12
  67. package/{OnlineFormUrlEdit-44080fb3.mjs → OnlineFormUrlEdit-f2fa79ff.mjs} +10 -10
  68. package/OnlineFormUrlSuccess-76813d45.mjs +59 -0
  69. package/OnlineQueryForm-9248341f.mjs +484 -0
  70. package/{OnlineSearchFormItem-6feacae6.mjs → OnlineSearchFormItem-1e437bd3.mjs} +82 -82
  71. package/{OnlineSelectCascade-471fcc76.mjs → OnlineSelectCascade-d631ed72.mjs} +1 -1
  72. package/{OnlineSubFormDetail-03f8ee5c.mjs → OnlineSubFormDetail-8be879b9.mjs} +53 -54
  73. package/{OnlineTabAutoModal-7b9bcd0b.mjs → OnlineTabAutoModal-c9ca3c24.mjs} +108 -95
  74. package/{OnlineTabDetailModal-88143301.mjs → OnlineTabDetailModal-fd4c9a72.mjs} +36 -36
  75. package/OnlineTabForm-1940e88b.mjs +814 -0
  76. package/{OnlineTabFormDetail-bbf23caa.mjs → OnlineTabFormDetail-2aa67564.mjs} +17 -17
  77. package/{PageAttributeTable-6c23547b.mjs → PageAttributeTable-66e7b485.mjs} +169 -149
  78. package/PhoneLoginForm-86437a9d.mjs +214 -0
  79. package/{ProcessOnlineForm-b42198f5.mjs → ProcessOnlineForm-98ede18d.mjs} +64 -58
  80. package/{QueryTable-96b3dbd0.mjs → QueryTable-65d3f54f.mjs} +40 -37
  81. package/SetSwitchOptions-f914bc17.mjs +62 -0
  82. package/ShareAddView-657f0f8b.mjs +86 -0
  83. package/ShareEditView-1b945fd3.mjs +92 -0
  84. package/ShareView-222ed3d8.mjs +80 -0
  85. package/ShareView.vue_vue_type_script_setup_true_lang-44fbeaff.mjs +162 -0
  86. package/SingleView-23b0cb4e.mjs +68 -0
  87. package/SingleView.vue_vue_type_style_index_0_lang-e0f2f6c0.mjs +131 -0
  88. package/SuperQuery-46032e66.mjs +974 -0
  89. package/{SuperQueryValComponent-7ad86d4b.mjs → SuperQueryValComponent-5a9ccfd4.mjs} +1 -1
  90. package/{SuperQueryValComponent.vue_vue_type_script_lang-e9196096.mjs → SuperQueryValComponent.vue_vue_type_script_lang-8fe34917.mjs} +11 -11
  91. package/auth.api-53df4c33.mjs +41 -0
  92. package/{auth.data-22948e87.mjs → auth.data-626c5083.mjs} +68 -30
  93. package/button.data-fe45d43b.mjs +12 -0
  94. package/{cgform.data-475d4984.mjs → cgform.data-0ca62d09.mjs} +4 -1
  95. package/{enhance.data-3304d553.mjs → enhance.data-6601ff44.mjs} +9 -8
  96. package/index-19eaef11.mjs +11 -0
  97. package/index-1a2e8832.mjs +135 -0
  98. package/{index-581bef24.mjs → index-2fb8e07f.mjs} +59 -59
  99. package/index-5e89258d.mjs +8 -0
  100. package/index-9e1e1e53.mjs +57 -0
  101. package/{index-d2abb8a0.mjs → index-a039036e.mjs} +273 -262
  102. package/index-c5a79b0b.mjs +219 -0
  103. package/index-cce225be.mjs +110 -0
  104. package/index-f2c2d1cf.mjs +74 -0
  105. package/main.index.js +1 -1
  106. package/package.json +1 -1
  107. package/shareStore-7de6c7a6.mjs +67 -0
  108. package/style.css +1 -1
  109. package/useCgformList-f3cb9156.mjs +378 -0
  110. package/useExtendComponent-bb98e568.mjs +4460 -0
  111. package/useListButton-98908683.mjs +719 -0
  112. package/{useSchemas-47e45edc.mjs → useSchemas-b074f3a1.mjs} +88 -46
  113. package/useTableSync-075826a1.mjs +89 -0
  114. package/utils-9fce7606.mjs +16 -0
  115. package/AiModal-fe3988fb.mjs +0 -84
  116. package/AuthButtonConfig-d50a0a65.mjs +0 -134
  117. package/AuthButtonTree-589395ed.mjs +0 -156
  118. package/AuthFieldConfig-490fc0ab.mjs +0 -139
  119. package/AuthFieldTree-b7cd091e.mjs +0 -232
  120. package/CgformCopyList-8077ccc6.mjs +0 -250
  121. package/CgformModal-36faf29a.mjs +0 -621
  122. package/CodeFileListModal-0e26b7e0.mjs +0 -158
  123. package/CodeFileViewModal-9d4a5b5f.mjs +0 -248
  124. package/CodeGeneratorModal-b722d976.mjs +0 -238
  125. package/CustomButtonList-37639061.mjs +0 -381
  126. package/DbToOnlineModal-f49b9530.mjs +0 -166
  127. package/JModalTip-4a83aaed.mjs +0 -49
  128. package/JOnlineSearchSelect-34a37ec9.mjs +0 -95
  129. package/LeftRole-7d8c5acc.mjs +0 -86
  130. package/OnlCgformErpList-30e416c8.mjs +0 -470
  131. package/OnlCgformErpSubTable-9a876058.mjs +0 -427
  132. package/OnlCgformInnerTableList-f89b6687.mjs +0 -458
  133. package/OnlCgformTabList-7a2f2c03.mjs +0 -408
  134. package/OnlineAutoList-46c6c8b9.mjs +0 -493
  135. package/OnlineAutoModal-971bef13.mjs +0 -236
  136. package/OnlineAutoTreeList-3b92454c.mjs +0 -502
  137. package/OnlineCustomModal-594244f3.mjs +0 -232
  138. package/OnlineForm-018981b2.mjs +0 -924
  139. package/OnlineFormUrlSuccess-af285b02.mjs +0 -59
  140. package/OnlineQueryForm-998c12a4.mjs +0 -444
  141. package/OnlineTabForm-9ad7d29a.mjs +0 -805
  142. package/SetSwitchOptions-a452fa0f.mjs +0 -62
  143. package/SuperQuery-cbfba908.mjs +0 -975
  144. package/auth.api-d3a6c4b3.mjs +0 -39
  145. package/index-173949bb.mjs +0 -57
  146. package/useCgformList-8755a94e.mjs +0 -426
  147. package/useExtendComponent-bb7cca20.mjs +0 -4295
  148. package/useListButton-7ddb9a46.mjs +0 -697
  149. package/useTableSync-f6089e8a.mjs +0 -87
  150. /package/{OnlineForm.vue_vue_type_style_index_0_scoped_0f9f2964_lang-4ed993c7.mjs → OnlineForm.vue_vue_type_style_index_0_scoped_3f26e7bd_lang-4ed993c7.mjs} +0 -0
@@ -0,0 +1,189 @@
1
+ var O = Object.defineProperty;
2
+ var F = Object.getOwnPropertySymbols;
3
+ var R = Object.prototype.hasOwnProperty, q = Object.prototype.propertyIsEnumerable;
4
+ var E = (t, e, n) => e in t ? O(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n, _ = (t, e) => {
5
+ for (var n in e || (e = {}))
6
+ R.call(e, n) && E(t, n, e[n]);
7
+ if (F)
8
+ for (var n of F(e))
9
+ q.call(e, n) && E(t, n, e[n]);
10
+ return t;
11
+ };
12
+ var B = (t, e, n) => new Promise((m, g) => {
13
+ var h = (s) => {
14
+ try {
15
+ f(n.next(s));
16
+ } catch (r) {
17
+ g(r);
18
+ }
19
+ }, d = (s) => {
20
+ try {
21
+ f(n.throw(s));
22
+ } catch (r) {
23
+ g(r);
24
+ }
25
+ }, f = (s) => s.done ? m(s.value) : Promise.resolve(s.value).then(h, d);
26
+ f((n = n.apply(t, e)).next());
27
+ });
28
+ import { ref as c, unref as a, defineComponent as z, resolveComponent as G, withDirectives as Q, openBlock as J, createElementBlock as K, createElementVNode as p, createVNode as k, withCtx as L, createTextVNode as I, vShow as W } from "vue";
29
+ import { Form as $, Input as X } from "ant-design-vue";
30
+ import { CountdownInput as Y } from "/@/components/CountDown";
31
+ import { defHttp as D } from "/@/utils/http/axios";
32
+ import { useGlobSetting as Z } from "/@/hooks/setting";
33
+ import { useMessage as ee } from "/@/hooks/web/useMessage";
34
+ import { useUserStore as ne } from "/@/store/modules/user";
35
+ import { useI18n as te } from "/@/hooks/web/useI18n";
36
+ import { QuestionCircleFilled as oe } from "@ant-design/icons-vue";
37
+ import { _ as ie } from "./index-9e1e1e53.mjs";
38
+ import "/@/components/jeecg/OnLine/JPopupOnlReport.vue";
39
+ import "vue-router";
40
+ function se(t) {
41
+ const { createMessage: e, notification: n } = ee(), { t: m } = te(), g = Z(), h = ne(), d = c(""), f = c({}), s = c(!1), r = c(!1), b = c(""), T = c(!1), v = c(""), y = c("");
42
+ function S(o) {
43
+ let i = `${g.uploadUrl}/sys/thirdLogin/render/${o}`;
44
+ window.open(
45
+ i,
46
+ `login ${o}`,
47
+ "height=500, width=500, top=0, left=0, toolbar=no, menubar=no, scrollbars=no, resizable=no,location=n o, status=no"
48
+ ), d.value = o, f.value = {}, s.value = !1;
49
+ let l = function(j) {
50
+ let u = j.data;
51
+ if (typeof u == "string")
52
+ if (u === "登录失败")
53
+ e.warning(u);
54
+ else if (u.includes("绑定手机号")) {
55
+ r.value = !0;
56
+ let H = u.split(",");
57
+ b.value = H[1], t("type", { loginType: "thirdLogin" });
58
+ } else
59
+ w(u);
60
+ else
61
+ typeof u == "object" ? u.isObj === !0 && (T.value = !0, f.value = _({}, u)) : e.warning("不识别的信息传递");
62
+ window.removeEventListener("message", a(l), !1);
63
+ };
64
+ window.addEventListener("message", l, !1);
65
+ }
66
+ function w(o) {
67
+ a(s) === !1 && (s.value = !0, h.ThirdLogin({ token: o, thirdType: a(d) }).then((i) => {
68
+ i && i.userInfo ? n.success({
69
+ message: m("sys.login.loginSuccessTitle"),
70
+ description: `${m("sys.login.loginSuccessDesc")}: ${i.userInfo.realname}`,
71
+ duration: 3
72
+ }) : U(i);
73
+ }));
74
+ }
75
+ function U(o) {
76
+ n.error({
77
+ message: "登录失败",
78
+ description: ((o.response || {}).data || {}).message || o.message || "请求出现错误,请稍后再试",
79
+ duration: 4
80
+ });
81
+ }
82
+ function A() {
83
+ a(v) || C("请输入手机号"), a(y) || C("请输入验证码");
84
+ let o = {
85
+ mobile: a(v),
86
+ captcha: a(y),
87
+ thirdUserUuid: a(b)
88
+ };
89
+ D.post({ url: "/sys/thirdLogin/bindingThirdPhone", params: o }, { isTransformResponse: !1 }).then((i) => {
90
+ i.success ? (r.value = !1, w(i.result)) : e.warning(i.message);
91
+ }).catch((i) => {
92
+ e.warning(i.message);
93
+ });
94
+ }
95
+ function C(o) {
96
+ n.error({
97
+ message: "登录失败",
98
+ description: o,
99
+ duration: 4
100
+ });
101
+ }
102
+ function x() {
103
+ t("type", { loginType: "login" });
104
+ }
105
+ function P() {
106
+ t("type", { loginType: "register" });
107
+ }
108
+ function M() {
109
+ r.value = !1;
110
+ }
111
+ function N(o) {
112
+ return B(this, null, function* () {
113
+ let i = _({}, o);
114
+ i.thirdUserUuid = a(b), yield D.put({ url: "/sys/thirdLogin/registerBindThirdAccount", params: i }, { isTransformResponse: !1 }).then((l) => {
115
+ l.success ? (r.value = !1, w(l.result)) : e.warning(l.message);
116
+ }).catch((l) => {
117
+ e.warning(l.message);
118
+ });
119
+ });
120
+ }
121
+ function V(o) {
122
+ v.value = o.mobile, y.value = o.sms, A();
123
+ }
124
+ return {
125
+ thirdConfirmShow: T,
126
+ bindingAccount: r,
127
+ thirdHandleOk: A,
128
+ thirdPhone: v,
129
+ thirdCaptcha: y,
130
+ onThirdLogin: S,
131
+ loginAccountClick: x,
132
+ registerAccountClick: P,
133
+ hideBindThirdAccount: M,
134
+ bindThirdAccount: V,
135
+ createAccountBindThird: N
136
+ };
137
+ }
138
+ const re = $.Item, ue = X.Password, ae = z({
139
+ name: "AppThirdForm",
140
+ components: { FormItem: re, Form: $, InputPassword: ue, CountdownInput: Y, QuestionCircleFilled: oe },
141
+ setup(t, { emit: e }) {
142
+ return _({}, se(e));
143
+ }
144
+ });
145
+ const le = { class: "third-account" }, ce = { class: "content" }, de = { class: "enter-x bind-btn" }, pe = {
146
+ class: "enter-x bind-btn",
147
+ style: { "margin-top": "20px" }
148
+ };
149
+ function fe(t, e, n, m, g, h) {
150
+ const d = G("a-button");
151
+ return Q((J(), K("div", le, [
152
+ p("div", ce, [
153
+ e[2] || (e[2] = p("div", { class: "bind-title" }, [
154
+ p("span", null, "还未绑定敲敲云账号")
155
+ ], -1)),
156
+ e[3] || (e[3] = p("div", { class: "bind-title-desc" }, [
157
+ p("span", null, "请选择绑定已有帐户,或创建新帐号")
158
+ ], -1)),
159
+ p("div", de, [
160
+ k(d, {
161
+ type: "primary",
162
+ onClick: t.loginAccountClick
163
+ }, {
164
+ default: L(() => e[0] || (e[0] = [
165
+ I("登录并绑定")
166
+ ])),
167
+ _: 1
168
+ }, 8, ["onClick"])
169
+ ]),
170
+ p("div", pe, [
171
+ k(d, {
172
+ type: "primary",
173
+ onClick: t.registerAccountClick
174
+ }, {
175
+ default: L(() => e[1] || (e[1] = [
176
+ I("注册新账号")
177
+ ])),
178
+ _: 1
179
+ }, 8, ["onClick"])
180
+ ])
181
+ ])
182
+ ], 512)), [
183
+ [W, t.bindingAccount]
184
+ ]);
185
+ }
186
+ const Be = /* @__PURE__ */ ie(ae, [["render", fe], ["__scopeId", "data-v-c98a927f"]]);
187
+ export {
188
+ Be as default
189
+ };
@@ -0,0 +1,156 @@
1
+ var h = (i, u, c) => new Promise((p, m) => {
2
+ var g = (o) => {
3
+ try {
4
+ r(c.next(o));
5
+ } catch (l) {
6
+ m(l);
7
+ }
8
+ }, f = (o) => {
9
+ try {
10
+ r(c.throw(o));
11
+ } catch (l) {
12
+ m(l);
13
+ }
14
+ }, r = (o) => o.done ? p(o.value) : Promise.resolve(o.value).then(g, f);
15
+ r((c = c.apply(i, u)).next());
16
+ });
17
+ import { defineComponent as S, ref as T, watch as A, resolveComponent as w, openBlock as E, createElementBlock as $, createVNode as v, withCtx as x, createTextVNode as q } from "vue";
18
+ import { cloneDeep as F } from "lodash-es";
19
+ import { BasicTable as j, useTable as z } from "/@/components/Table";
20
+ import { f as O, g as U, h as V } from "./auth.api-53df4c33.mjs";
21
+ import { b as K, c as P } from "./auth.data-626c5083.mjs";
22
+ import { _ as G } from "./index-9e1e1e53.mjs";
23
+ import "/@/utils/http/axios";
24
+ import "/@/utils/index";
25
+ import "/@/components/jeecg/OnLine/JPopupOnlReport.vue";
26
+ import "/@/hooks/web/useMessage";
27
+ import "vue-router";
28
+ const H = S({
29
+ name: "AuthButtonConfig",
30
+ components: { BasicTable: j },
31
+ props: {
32
+ headId: {
33
+ type: String,
34
+ default: "",
35
+ required: !0
36
+ },
37
+ // 1单表 2主表 3附表
38
+ tableType: {
39
+ type: Number,
40
+ default: 1
41
+ }
42
+ },
43
+ setup(i) {
44
+ const u = T(""), c = T(2), p = T(3), m = T(5), [g, { reload: f, getTableRef: r, setPagination: o }] = z({
45
+ api: B,
46
+ rowKey: "code",
47
+ bordered: !0,
48
+ columns: K,
49
+ showIndexColumn: !1
50
+ });
51
+ A(
52
+ () => i.headId,
53
+ (t) => {
54
+ u.value = t.split("?")[0], r().value && o({ current: 1, pageSize: 10 }), f().catch(() => null);
55
+ },
56
+ { immediate: !0 }
57
+ );
58
+ const l = (t) => {
59
+ const e = F(P);
60
+ if (t.mainRelationType != null && t.mainThemeTemplate != null && i.tableType == 3) {
61
+ let a = [];
62
+ switch (t.mainThemeTemplate) {
63
+ case "normal":
64
+ case "innerTable":
65
+ case "tab":
66
+ t.mainRelationType == 1 ? a = [] : a = e.filter((n) => ["add", "update", "batch_delete"].includes(n.code));
67
+ break;
68
+ case "erp":
69
+ a = e.filter((n) => !["super_query"].includes(n.code));
70
+ break;
71
+ }
72
+ return a;
73
+ } else
74
+ return e;
75
+ };
76
+ function B(t) {
77
+ return h(this, null, function* () {
78
+ let e = yield O(u.value, t), { authList: a, buttonList: n } = e, d = [];
79
+ const y = l(e);
80
+ for (let s of y) {
81
+ const b = n.findIndex((C) => C.buttonCode === s.code), _ = {};
82
+ b !== -1 && (_.title = n[b].buttonName, n.splice(b, 1));
83
+ let N = {
84
+ status: 0,
85
+ page: p.value
86
+ }, R = a.find((C) => C.code == s.code);
87
+ Object.assign(s, N, R, _), d.push(s);
88
+ }
89
+ if (i.tableType == 3) {
90
+ const s = d.findIndex((b) => b.code === "super_query");
91
+ s != -1 && d.splice(s, 1);
92
+ }
93
+ return I(a, n, d);
94
+ });
95
+ }
96
+ function I(t, e, a) {
97
+ for (let n of e) {
98
+ let d = t.find((s) => s.code == n.buttonCode), y = {
99
+ code: n.buttonCode,
100
+ title: n.buttonName,
101
+ status: 0,
102
+ page: n.buttonStyle == "form" ? m.value : p.value
103
+ };
104
+ a.push(Object.assign(y, d));
105
+ }
106
+ return a;
107
+ }
108
+ function k(t, e) {
109
+ return h(this, null, function* () {
110
+ t ? L(e) : D(e);
111
+ });
112
+ }
113
+ function L(t) {
114
+ return h(this, null, function* () {
115
+ let e = yield U({
116
+ id: t.id,
117
+ code: t.code,
118
+ page: t.page,
119
+ cgformId: u.value,
120
+ type: c.value,
121
+ control: 5,
122
+ status: 1
123
+ });
124
+ t.id = e.id, t.status = 1;
125
+ });
126
+ }
127
+ function D(t) {
128
+ return h(this, null, function* () {
129
+ yield V(t.id), t.status = 0;
130
+ });
131
+ }
132
+ return { registerTable: g, onUpdateStatus: k };
133
+ }
134
+ }), J = { class: "auth-field-config" };
135
+ function M(i, u, c, p, m, g) {
136
+ const f = w("a-switch"), r = w("BasicTable");
137
+ return E(), $("div", J, [
138
+ v(r, { onRegister: i.registerTable }, {
139
+ switch: x(({ text: o, record: l }) => [
140
+ v(f, {
141
+ size: "small",
142
+ checked: l.status === 1,
143
+ onChange: (B) => i.onUpdateStatus(B, l)
144
+ }, null, 8, ["checked", "onChange"])
145
+ ]),
146
+ control: x(() => u[0] || (u[0] = [
147
+ q(" 可见 ")
148
+ ])),
149
+ _: 1
150
+ }, 8, ["onRegister"])
151
+ ]);
152
+ }
153
+ const ut = /* @__PURE__ */ G(H, [["render", M]]);
154
+ export {
155
+ ut as default
156
+ };
@@ -0,0 +1,165 @@
1
+ var h = (e, o, c) => new Promise((u, p) => {
2
+ var m = (r) => {
3
+ try {
4
+ n(c.next(r));
5
+ } catch (d) {
6
+ p(d);
7
+ }
8
+ }, l = (r) => {
9
+ try {
10
+ n(c.throw(r));
11
+ } catch (d) {
12
+ p(d);
13
+ }
14
+ }, n = (r) => r.done ? u(r.value) : Promise.resolve(r.value).then(m, l);
15
+ n((c = c.apply(e, o)).next());
16
+ });
17
+ import { defineComponent as N, ref as i, computed as w, watch as M, resolveComponent as g, openBlock as v, createElementBlock as b, createBlock as E, Fragment as S, createElementVNode as P, createVNode as k, withCtx as I, createTextVNode as B } from "vue";
18
+ import { useMessage as $ } from "/@/hooks/web/useMessage";
19
+ import { c as R } from "./auth.data-626c5083.mjs";
20
+ import { o as V, n as z, p as L } from "./auth.api-53df4c33.mjs";
21
+ import { _ as j } from "./index-9e1e1e53.mjs";
22
+ import "/@/utils/index";
23
+ import "/@/utils/http/axios";
24
+ import "/@/components/jeecg/OnLine/JPopupOnlReport.vue";
25
+ import "vue-router";
26
+ const q = N({
27
+ name: "AuthButtonTree",
28
+ props: {
29
+ cgformId: { type: String, required: !0 }
30
+ },
31
+ setup(e) {
32
+ const { createMessage: o, createSuccessModal: c } = $(), u = i(""), p = i(2), m = i(!0), l = i([]), n = i([]), r = i([]), d = i(""), C = w(() => !u.value);
33
+ M(() => e.cgformId, y, { immediate: !0 });
34
+ function y() {
35
+ return h(this, null, function* () {
36
+ if (!e.cgformId)
37
+ return;
38
+ let t = yield V(e.cgformId, p.value);
39
+ t.forEach((a) => {
40
+ for (const f of R)
41
+ if (a.code == f.code) {
42
+ a.title || (a.title = f.title);
43
+ break;
44
+ }
45
+ });
46
+ let s = [];
47
+ for (let a of t) {
48
+ let f = T(a);
49
+ s.push({ key: a.id, title: f });
50
+ }
51
+ r.value = s;
52
+ });
53
+ }
54
+ function D() {
55
+ y(), _(u.value, d.value);
56
+ }
57
+ function _(t, s) {
58
+ return h(this, null, function* () {
59
+ u.value = t, d.value = s, n.value = [], yield y();
60
+ let a = yield z({
61
+ roleId: t,
62
+ cgformId: e.cgformId,
63
+ type: p.value,
64
+ authMode: s
65
+ });
66
+ n.value = a.map((f) => f.authId);
67
+ });
68
+ }
69
+ function K() {
70
+ u.value = "", y();
71
+ }
72
+ function x() {
73
+ return h(this, null, function* () {
74
+ try {
75
+ const { success: t, message: s, result: a } = yield L(u.value, e.cgformId, {
76
+ authId: JSON.stringify(n.value),
77
+ authMode: d.value
78
+ });
79
+ t ? Array.isArray(a == null ? void 0 : a.disabledNames) ? c({
80
+ title: "保存成功",
81
+ content: `由于以下按钮未激活,所以权限未生效。<br>${a.disabledNames.join("<br>")}`
82
+ }) : o.success("保存成功") : o.error(s);
83
+ } catch (t) {
84
+ o.error("保存出现异常");
85
+ }
86
+ });
87
+ }
88
+ function T(t) {
89
+ let s = t.title + "-";
90
+ return t.code && t.code.includes("form_sub") ? s += "表单可见(附表)" : t.page == 3 ? s += "列表可见" : t.page == 5 && (s += "表单可见"), s;
91
+ }
92
+ function A(t) {
93
+ l.value = t, m.value = !1;
94
+ }
95
+ function F() {
96
+ u.value = "", n.value = [];
97
+ }
98
+ return {
99
+ loadChecked: _,
100
+ clear: F,
101
+ expandedKeys: l,
102
+ autoExpandParent: m,
103
+ checkedKeys: n,
104
+ treeData: r,
105
+ disabled: C,
106
+ onSave: x,
107
+ onExpand: A,
108
+ onRefresh: D,
109
+ clearChecked: K
110
+ };
111
+ }
112
+ });
113
+ const J = { class: "onl-auth-tree-btns" };
114
+ function O(e, o, c, u, p, m) {
115
+ const l = g("a-empty"), n = g("a-button"), r = g("a-tree");
116
+ return v(), b("div", null, [
117
+ e.disabled ? (v(), E(l, {
118
+ key: 0,
119
+ description: "请先选中左侧角色/部门/用户"
120
+ })) : e.treeData.length === 0 ? (v(), E(l, {
121
+ key: 1,
122
+ description: "无权限信息"
123
+ })) : (v(), b(S, { key: 2 }, [
124
+ P("div", J, [
125
+ k(n, {
126
+ onClick: e.onRefresh,
127
+ size: "small",
128
+ type: "primary",
129
+ preIcon: "ant-design:redo",
130
+ ghost: ""
131
+ }, {
132
+ default: I(() => o[1] || (o[1] = [
133
+ B("刷新")
134
+ ])),
135
+ _: 1
136
+ }, 8, ["onClick"]),
137
+ k(n, {
138
+ onClick: e.onSave,
139
+ size: "small",
140
+ type: "primary",
141
+ preIcon: "ant-design:save",
142
+ ghost: ""
143
+ }, {
144
+ default: I(() => o[2] || (o[2] = [
145
+ B("保存")
146
+ ])),
147
+ _: 1
148
+ }, 8, ["onClick"])
149
+ ]),
150
+ k(r, {
151
+ checkable: "",
152
+ checkedKeys: e.checkedKeys,
153
+ "onUpdate:checkedKeys": o[0] || (o[0] = (d) => e.checkedKeys = d),
154
+ expandedKeys: e.expandedKeys,
155
+ autoExpandParent: e.autoExpandParent,
156
+ treeData: e.treeData,
157
+ onExpand: e.onExpand
158
+ }, null, 8, ["checkedKeys", "expandedKeys", "autoExpandParent", "treeData", "onExpand"])
159
+ ], 64))
160
+ ]);
161
+ }
162
+ const ae = /* @__PURE__ */ j(q, [["render", O], ["__scopeId", "data-v-b62449eb"]]);
163
+ export {
164
+ ae as default
165
+ };
@@ -9,8 +9,8 @@ var M = (t, n, o) => n in t ? K(t, n, { enumerable: !0, configurable: !0, writab
9
9
  for (var o of F(n))
10
10
  X.call(n, o) && M(t, o, n[o]);
11
11
  return t;
12
- }, y = (t, n) => Q(t, H(n));
13
- var A = (t, n, o) => new Promise((u, f) => {
12
+ }, k = (t, n) => Q(t, H(n));
13
+ var A = (t, n, o) => new Promise((c, f) => {
14
14
  var p = (a) => {
15
15
  try {
16
16
  i(o.next(a));
@@ -23,29 +23,30 @@ var A = (t, n, o) => new Promise((u, f) => {
23
23
  } catch (l) {
24
24
  f(l);
25
25
  }
26
- }, i = (a) => a.done ? u(a.value) : Promise.resolve(a.value).then(p, g);
26
+ }, i = (a) => a.done ? c(a.value) : Promise.resolve(a.value).then(p, g);
27
27
  i((o = o.apply(t, n)).next());
28
28
  });
29
- import { defineComponent as Y, ref as Z, watch as k, reactive as ee, nextTick as te, resolveComponent as r, openBlock as ne, createElementBlock as oe, createVNode as c, withCtx as d, createTextVNode as ae, mergeProps as ie } from "vue";
29
+ import { defineComponent as Y, ref as Z, watch as y, reactive as ee, nextTick as te, resolveComponent as r, openBlock as ne, createElementBlock as oe, createVNode as u, withCtx as d, createTextVNode as ae, mergeProps as ie } from "vue";
30
30
  import { BasicTable as le, TableAction as se, useTable as re } from "/@/components/Table";
31
- import { BasicModal as ce, useModal as ue } from "/@/components/Modal";
31
+ import { BasicModal as ue, useModal as ce } from "/@/components/Modal";
32
32
  import { BasicForm as me, useForm as de } from "/@/components/Form";
33
- import { g as fe, h as pe, i as ge, j as he } from "./auth.api-d3a6c4b3.mjs";
34
- import { d as Ce, u as be, U as v } from "./auth.data-22948e87.mjs";
35
- import { _ as _e } from "./index-173949bb.mjs";
33
+ import { i as fe, j as pe, k as ge, l as he } from "./auth.api-53df4c33.mjs";
34
+ import { d as Ce, u as be, U as v } from "./auth.data-626c5083.mjs";
35
+ import { _ as _e } from "./index-9e1e1e53.mjs";
36
36
  import "/@/utils/http/axios";
37
+ import "/@/utils/index";
37
38
  import "/@/components/jeecg/OnLine/JPopupOnlReport.vue";
38
39
  import "/@/hooks/web/useMessage";
39
40
  import "vue-router";
40
41
  const we = Y({
41
42
  name: "AuthDataConfig",
42
- components: { BasicTable: le, TableAction: se, BasicModal: ce, BasicForm: me },
43
+ components: { BasicTable: le, TableAction: se, BasicModal: ue, BasicForm: me },
43
44
  props: {
44
45
  cgformId: { type: String, required: !0 },
45
46
  authFields: { type: Array, required: !0 }
46
47
  },
47
48
  setup(t) {
48
- const n = Z(!1), [o, { reload: u, setLoading: f }] = re({
49
+ const n = Z(!1), [o, { reload: c, setLoading: f }] = re({
49
50
  api: (e) => fe(t.cgformId, e),
50
51
  rowKey: "id",
51
52
  bordered: !0,
@@ -60,8 +61,8 @@ const we = Y({
60
61
  slots: { customRender: "action" }
61
62
  }
62
63
  });
63
- k(n, (e) => f(e));
64
- const [p, { openModal: g, closeModal: i }] = ue(), a = ee({
64
+ y(n, (e) => f(e));
65
+ const [p, { openModal: g, closeModal: i }] = ce(), a = ee({
65
66
  title: "",
66
67
  width: 800,
67
68
  confirmLoading: !1,
@@ -79,10 +80,10 @@ const we = Y({
79
80
  showActionButtonGroup: !1,
80
81
  labelAlign: "right"
81
82
  });
82
- k(
83
+ y(
83
84
  () => t.cgformId,
84
85
  () => {
85
- u().catch(() => null);
86
+ c().catch(() => null);
86
87
  },
87
88
  { immediate: !0 }
88
89
  );
@@ -99,14 +100,14 @@ const we = Y({
99
100
  T({ title: "编辑", record: e, isUpdate: !0 });
100
101
  }
101
102
  function L(e) {
102
- n.value = !0, he(e).then(u).finally(() => n.value = !1);
103
+ n.value = !0, he(e).then(c).finally(() => n.value = !1);
103
104
  }
104
105
  function E() {
105
106
  return A(this, null, function* () {
106
107
  try {
107
108
  a.confirmLoading = !0;
108
109
  let e = yield b();
109
- e = Object.assign({}, h, e), e.ruleOperator == v && (e.ruleColumn = ""), e.cgformId = t.cgformId, yield pe(e, l), u(), i();
110
+ e = Object.assign({}, h, e), e.ruleOperator == v && (e.ruleColumn = ""), e.cgformId = t.cgformId, yield pe(e, l), c(), i();
110
111
  } finally {
111
112
  a.confirmLoading = !1;
112
113
  }
@@ -115,7 +116,7 @@ const we = Y({
115
116
  function N(e) {
116
117
  n.value = !0;
117
118
  let s = Math.abs(e.status - 1);
118
- ge(y(S({}, e), { status: s })).then(() => {
119
+ ge(k(S({}, e), { status: s })).then(() => {
119
120
  e.status = s;
120
121
  }).finally(() => {
121
122
  n.value = !1;
@@ -182,47 +183,47 @@ const we = Y({
182
183
  };
183
184
  }
184
185
  });
185
- function Ae(t, n, o, u, f, p) {
186
+ function Ae(t, n, o, c, f, p) {
186
187
  const g = r("a-button"), i = r("a-switch"), a = r("TableAction"), l = r("BasicTable"), h = r("BasicForm"), m = r("a-spin"), _ = r("BasicModal");
187
188
  return ne(), oe("div", null, [
188
- c(l, {
189
+ u(l, {
189
190
  onRegister: t.registerTable,
190
191
  loading: t.loading
191
192
  }, {
192
193
  tableTitle: d(() => [
193
- c(g, {
194
+ u(g, {
194
195
  onClick: t.onAdd,
195
196
  type: "primary",
196
197
  preIcon: "ant-design:plus"
197
198
  }, {
198
- default: d(() => [
199
+ default: d(() => n[0] || (n[0] = [
199
200
  ae("新增")
200
- ]),
201
+ ])),
201
202
  _: 1
202
203
  }, 8, ["onClick"])
203
204
  ]),
204
205
  switch: d(({ text: C, record: b }) => [
205
- c(i, {
206
+ u(i, {
206
207
  size: "small",
207
208
  checked: b.status === 1,
208
209
  onClick: () => t.onUpdateStatus(b)
209
210
  }, null, 8, ["checked", "onClick"])
210
211
  ]),
211
212
  action: d(({ record: C }) => [
212
- c(a, {
213
+ u(a, {
213
214
  actions: t.getTableAction(C),
214
215
  dropDownActions: t.getDropDownAction(C)
215
216
  }, null, 8, ["actions", "dropDownActions"])
216
217
  ]),
217
218
  _: 1
218
219
  }, 8, ["onRegister", "loading"]),
219
- c(_, ie(t.formModalProps, { onOpenChange: t.handleOpenChange }), {
220
+ u(_, ie(t.formModalProps, { onOpenChange: t.handleOpenChange }), {
220
221
  default: d(() => [
221
- c(m, {
222
+ u(m, {
222
223
  spinning: t.formModalProps.confirmLoading
223
224
  }, {
224
225
  default: d(() => [
225
- c(h, { onRegister: t.registerForm }, null, 8, ["onRegister"])
226
+ u(h, { onRegister: t.registerForm }, null, 8, ["onRegister"])
226
227
  ]),
227
228
  _: 1
228
229
  }, 8, ["spinning"])
@@ -231,7 +232,7 @@ function Ae(t, n, o, u, f, p) {
231
232
  }, 16, ["onOpenChange"])
232
233
  ]);
233
234
  }
234
- const Ue = /* @__PURE__ */ _e(we, [["render", Ae]]);
235
+ const Ve = /* @__PURE__ */ _e(we, [["render", Ae]]);
235
236
  export {
236
- Ue as default
237
+ Ve as default
237
238
  };