@jeecg/online 3.6.2-beta → 3.7.1-RC

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 (127) hide show
  1. package/AiModal-6de335e3.mjs +84 -0
  2. package/AuthButtonConfig-89763932.mjs +154 -0
  3. package/{AuthButtonTree-3aa0ed49.mjs → AuthButtonTree-2d87d0b3.mjs} +6 -5
  4. package/AuthDataConfig-5c3a8e6b.mjs +238 -0
  5. package/{AuthDataTree-94e026e3.mjs → AuthDataTree-dd7a1240.mjs} +6 -6
  6. package/AuthFieldConfig-9f6fa06c.mjs +245 -0
  7. package/{AuthFieldTree-69864163.mjs → AuthFieldTree-e326fc38.mjs} +2 -2
  8. package/AuthManagerDrawer-76f15e8d.mjs +119 -0
  9. package/AuthSetterModal-f5d2e87f.mjs +274 -0
  10. package/{CgformCopyList-14b76108.mjs → CgformCopyList-365b3e8f.mjs} +49 -46
  11. package/CgformModal-21c5c387.mjs +671 -0
  12. package/{CgreportModal.vue_vue_type_script_setup_true_lang-c89d9222.mjs → CgreportModal-edefa8e3.mjs} +153 -129
  13. package/CheckDictTable-1bc8322d.mjs +229 -0
  14. package/{CodeFileListModal-a6d3290d.mjs → CodeFileListModal-24601898.mjs} +5 -4
  15. package/CodeFileViewModal-2fe911f4.mjs +253 -0
  16. package/CodeGeneratorModal-f09fe903.mjs +282 -0
  17. package/CustomButtonList-f07bc695.mjs +397 -0
  18. package/{DBAttributeTable-370de07b.mjs → DBAttributeTable-285d40db.mjs} +118 -89
  19. package/DbToOnlineModal-5dcb67c3.mjs +169 -0
  20. package/DetailForm-deecbf3d.mjs +486 -0
  21. package/{EnhanceJavaModal-f63aa2d3.mjs → EnhanceJavaModal-45c66cd5.mjs} +3 -3
  22. package/{EnhanceJsHistory-352b46b1.mjs → EnhanceJsHistory-fab3102e.mjs} +2 -2
  23. package/EnhanceJsModal-175357a1.mjs +548 -0
  24. package/{EnhanceSqlModal-5e4ae84f.mjs → EnhanceSqlModal-7ea1b300.mjs} +3 -3
  25. package/ExtendConfigModal-a89ae052.mjs +117 -0
  26. package/FieldExtendJsonModal-32135634.mjs +277 -0
  27. package/{FileSelectModal-9a02560b.mjs → FileSelectModal-1643c8b9.mjs} +1 -1
  28. package/{ForeignKeyTable-6a843c4b.mjs → ForeignKeyTable-7f7e28a7.mjs} +3 -3
  29. package/{IndexTable-f8af9d44.mjs → IndexTable-cdcc2b48.mjs} +28 -20
  30. package/{JModalTip-33c7dc44.mjs → JModalTip-b055ab60.mjs} +1 -1
  31. package/JOnlineSearchSelect-22aae934.mjs +128 -0
  32. package/{LeftDepart-fa85523d.mjs → LeftDepart-d5615ed9.mjs} +1 -1
  33. package/{LeftRole-8b8dfe21.mjs → LeftRole-2ed8a2bf.mjs} +1 -1
  34. package/{LeftUser-dc24ef2f.mjs → LeftUser-22baa378.mjs} +3 -3
  35. package/LinkTableConfigModal-9242d750.mjs +240 -0
  36. package/{LinkTableFieldConfigModal-787bc55c.mjs → LinkTableFieldConfigModal-24adc50c.mjs} +41 -41
  37. package/{LinkTableListPiece-8499a318.mjs → LinkTableListPiece-f3a8e0d7.mjs} +1 -1
  38. package/{ModalFormDemo-977a49eb.mjs → ModalFormDemo-711418db.mjs} +1 -1
  39. package/OnlCgformErpList-58acdfa0.mjs +470 -0
  40. package/OnlCgformErpSubTable-9b1e1938.mjs +426 -0
  41. package/OnlCgformInnerSubTable-6c23781f.mjs +265 -0
  42. package/OnlCgformInnerTableList-4b5e14ed.mjs +458 -0
  43. package/OnlCgformTabList-019ad753.mjs +408 -0
  44. package/OnlineAutoList-48589d09.mjs +493 -0
  45. package/OnlineAutoModal-c2928847.mjs +239 -0
  46. package/{OnlineAutoTreeList-89265688.mjs → OnlineAutoTreeList-3baa1d00.mjs} +207 -204
  47. package/{OnlineCustomModal-518ad33c.mjs → OnlineCustomModal-9e17b6ce.mjs} +16 -12
  48. package/{OnlineDetailModal-9675390d.mjs → OnlineDetailModal-d5895734.mjs} +74 -64
  49. package/OnlineForm-9f1153ba.mjs +985 -0
  50. package/OnlineForm.vue_vue_type_style_index_0_scoped_4657b304_lang-4ed993c7.mjs +1 -0
  51. package/OnlineFormDetail-022ca117.mjs +342 -0
  52. package/OnlineFormUrlAdd-9715d70a.mjs +115 -0
  53. package/OnlineFormUrlDetail-8f864b1a.mjs +119 -0
  54. package/OnlineFormUrlEdit-ac985b36.mjs +113 -0
  55. package/OnlineFormUrlSuccess-3dfc54ab.mjs +59 -0
  56. package/OnlineQueryForm-eedb9a60.mjs +466 -0
  57. package/{OnlineSearchFormItem-0cc85a8a.mjs → OnlineSearchFormItem-6c557343.mjs} +2 -2
  58. package/{OnlineSelectCascade-4265c95d.mjs → OnlineSelectCascade-05c40fef.mjs} +1 -1
  59. package/{OnlineSubFormDetail-f0d2c016.mjs → OnlineSubFormDetail-58e896ce.mjs} +30 -28
  60. package/OnlineTabAutoModal-47b18ad6.mjs +306 -0
  61. package/{OnlineTabDetailModal-7356d3a8.mjs → OnlineTabDetailModal-82de1465.mjs} +22 -20
  62. package/OnlineTabForm-27655c83.mjs +817 -0
  63. package/OnlineTabFormDetail-8d0c40c0.mjs +327 -0
  64. package/PageAttributeTable-25e3b7da.mjs +466 -0
  65. package/{ProcessOnlineForm-67558898.mjs → ProcessOnlineForm-148632fe.mjs} +66 -56
  66. package/QueryTable-f7bfca7f.mjs +147 -0
  67. package/SetSwitchOptions-b2af757f.mjs +62 -0
  68. package/SuperQuery-a8592995.mjs +967 -0
  69. package/auth.api-ea1d33d4.mjs +41 -0
  70. package/auth.data-511e5197.mjs +217 -0
  71. package/{cgform.data-cbdd88c3.mjs → cgform.data-475d4984.mjs} +5 -1
  72. package/constant-fa63bd66.mjs +10 -0
  73. package/{enhance.data-efc7e155.mjs → enhance.data-a67572e1.mjs} +11 -10
  74. package/index-1d1a6e56.mjs +57 -0
  75. package/{index-b7a05eef.mjs → index-30e0e923.mjs} +396 -362
  76. package/{index-49508cad.mjs → index-f30613d1.mjs} +29 -27
  77. package/main.index.js +1 -1
  78. package/package.json +1 -1
  79. package/style.css +1 -1
  80. package/useCgformList-f41d4dc1.mjs +426 -0
  81. package/useExtendComponent-dcae5c78.mjs +4399 -0
  82. package/useFormUrl-2ee1a82d.mjs +24 -0
  83. package/useListButton-bfac4ecf.mjs +697 -0
  84. package/{useSchemas-0433a403.mjs → useSchemas-a9c75b0f.mjs} +191 -101
  85. package/useTableSync-d7e9f18d.mjs +89 -0
  86. package/AuthButtonConfig-244ec09f.mjs +0 -125
  87. package/AuthDataConfig-83891eea.mjs +0 -212
  88. package/AuthFieldConfig-6b21915c.mjs +0 -139
  89. package/AuthManagerDrawer-300dd4e4.mjs +0 -114
  90. package/AuthSetterModal-a414fb35.mjs +0 -267
  91. package/CgformModal-eccfc38e.mjs +0 -611
  92. package/CgreportModal-2065f5a9.mjs +0 -13
  93. package/CheckDictTable-134cbb83.mjs +0 -211
  94. package/CodeFileViewModal-373e8058.mjs +0 -244
  95. package/CodeGeneratorModal-f08a89cd.mjs +0 -233
  96. package/CustomButtonList-02e3d897.mjs +0 -363
  97. package/DbToOnlineModal-9f13956f.mjs +0 -160
  98. package/DetailForm-424638eb.mjs +0 -462
  99. package/EnhanceJsModal-05c73a59.mjs +0 -311
  100. package/ExtendConfigModal-1dde390a.mjs +0 -111
  101. package/FieldExtendJsonModal-a70a9ccd.mjs +0 -219
  102. package/JOnlineSearchSelect-c287af12.mjs +0 -95
  103. package/LinkTableConfigModal-d4fbdef2.mjs +0 -230
  104. package/OnlCgformErpList-db45e22b.mjs +0 -454
  105. package/OnlCgformErpSubTable-54b50eec.mjs +0 -403
  106. package/OnlCgformInnerSubTable-fbca73e0.mjs +0 -253
  107. package/OnlCgformInnerTableList-782eaf04.mjs +0 -444
  108. package/OnlCgformTabList-a9e1e36a.mjs +0 -395
  109. package/OnlineAutoList-0583a910.mjs +0 -479
  110. package/OnlineAutoModal-510991eb.mjs +0 -207
  111. package/OnlineForm-1fa2d893.mjs +0 -750
  112. package/OnlineFormDetail-0e7294ca.mjs +0 -297
  113. package/OnlineQueryForm-1bfc8320.mjs +0 -386
  114. package/OnlineTabAutoModal-6f636ee2.mjs +0 -254
  115. package/OnlineTabForm-512d3951.mjs +0 -766
  116. package/OnlineTabFormDetail-5a70219d.mjs +0 -324
  117. package/PageAttributeTable-965dc58e.mjs +0 -404
  118. package/QueryTable-eb9a5b21.mjs +0 -115
  119. package/SuperQuery-5d1ca957.mjs +0 -843
  120. package/auth.api-d3a6c4b3.mjs +0 -39
  121. package/auth.data-8be5c9e3.mjs +0 -141
  122. package/constant-754f1a9d.mjs +0 -9
  123. package/index-0e3ab3af.mjs +0 -56
  124. package/useCgformList-423282b7.mjs +0 -400
  125. package/useExtendComponent-325fe3f1.mjs +0 -3926
  126. package/useListButton-cdbab702.mjs +0 -676
  127. package/useTableSync-774c3774.mjs +0 -87
@@ -0,0 +1,84 @@
1
+ import { ref as l, resolveComponent as c, openBlock as x, createBlock as I, unref as r, mergeProps as A, withCtx as p, createElementVNode as e, createVNode as d, createTextVNode as k, pushScopeId as y, popScopeId as B } from "vue";
2
+ import { useModalInner as S, BasicModal as V } from "/@/components/Modal";
3
+ import { useMessage as z } from "/@/hooks/web/useMessage";
4
+ import { defHttp as N } from "/@/utils/http/axios";
5
+ import { _ as $ } from "./index-1d1a6e56.mjs";
6
+ import "/@/components/jeecg/OnLine/JPopupOnlReport.vue";
7
+ import "vue-router";
8
+ const u = (o) => (y("data-v-4ab211b3"), o = o(), B(), o), R = { class: "aiWrap" }, U = /* @__PURE__ */ u(() => /* @__PURE__ */ e("div", { class: "titleArea" }, [
9
+ /* @__PURE__ */ e("svg", {
10
+ t: "1707100353985",
11
+ class: "icon",
12
+ viewBox: "0 0 1024 1024",
13
+ version: "1.1",
14
+ xmlns: "http://www.w3.org/2000/svg",
15
+ "p-id": "4235",
16
+ width: "26",
17
+ height: "26"
18
+ }, [
19
+ /* @__PURE__ */ e("path", {
20
+ d: "M512 64C264.8 64 64 264.8 64 512s200.8 448 448 448 448-200.8 448-448S759.2 64 512 64z m32 704h-64v-64h64v64z m11.2-203.2l-5.6 4.8c-3.2 2.4-5.6 8-5.6 12.8v58.4h-64v-58.4c0-24.8 11.2-48 29.6-63.2l5.6-4.8c56-44.8 83.2-68 83.2-108C598.4 358.4 560 320 512 320c-49.6 0-86.4 36.8-86.4 86.4h-64C361.6 322.4 428 256 512 256c83.2 0 150.4 67.2 150.4 150.4 0 72.8-49.6 112.8-107.2 158.4z",
21
+ "p-id": "4236",
22
+ fill: "currentColor"
23
+ })
24
+ ]),
25
+ /* @__PURE__ */ e("h3", null, "创建工作表字段需要专业建议?试试AI智能推荐吧")
26
+ ], -1)), E = /* @__PURE__ */ u(() => /* @__PURE__ */ e("p", { class: "tip" }, "可尝试添加修饰词,如:智能家居行业的生产计划表", -1)), H = { class: "content" }, P = {
27
+ __name: "AiModal",
28
+ emits: ["register", "success"],
29
+ setup(o, { emit: _ }) {
30
+ const m = {
31
+ aigc: "/online/cgform/api/aigc"
32
+ }, [v, { closeModal: h }] = S(), { createMessage: f } = z(), t = l(""), a = l(!1), g = l("ai创建表"), i = () => {
33
+ h();
34
+ }, C = () => {
35
+ t.value.trim() === "" ? f.warning("请输入修饰词~") : (a.value = !0, N.post({ url: `${m.aigc}?prompt=${t.value}`, timeout: 1e3 * 60 }).then((s) => {
36
+ a.value = !1, i(), _("success"), t.value = "";
37
+ }).catch((s) => {
38
+ a.value = !1;
39
+ }));
40
+ };
41
+ return (s, n) => {
42
+ const M = c("a-input"), w = c("a-button");
43
+ return x(), I(r(V), A({
44
+ height: 180,
45
+ title: g.value,
46
+ width: 600,
47
+ maskClosable: !1
48
+ }, s.$attrs, {
49
+ onRegister: r(v),
50
+ footer: null,
51
+ onCancel: i
52
+ }), {
53
+ default: p(() => [
54
+ e("div", R, [
55
+ U,
56
+ E,
57
+ e("div", H, [
58
+ d(M, {
59
+ value: t.value,
60
+ "onUpdate:value": n[0] || (n[0] = (b) => t.value = b),
61
+ valueModifiers: { trim: !0 },
62
+ placeholder: "请输入修饰词"
63
+ }, null, 8, ["value"]),
64
+ d(w, {
65
+ loading: a.value,
66
+ type: "primary",
67
+ onClick: C
68
+ }, {
69
+ default: p(() => [
70
+ k("生成表")
71
+ ]),
72
+ _: 1
73
+ }, 8, ["loading"])
74
+ ])
75
+ ])
76
+ ]),
77
+ _: 1
78
+ }, 16, ["title", "onRegister"]);
79
+ };
80
+ }
81
+ }, J = /* @__PURE__ */ $(P, [["__scopeId", "data-v-4ab211b3"]]);
82
+ export {
83
+ J as default
84
+ };
@@ -0,0 +1,154 @@
1
+ var h = (s, r, l) => new Promise((p, m) => {
2
+ var b = (a) => {
3
+ try {
4
+ c(l.next(a));
5
+ } catch (u) {
6
+ m(u);
7
+ }
8
+ }, f = (a) => {
9
+ try {
10
+ c(l.throw(a));
11
+ } catch (u) {
12
+ m(u);
13
+ }
14
+ }, c = (a) => a.done ? p(a.value) : Promise.resolve(a.value).then(b, f);
15
+ c((l = l.apply(s, r)).next());
16
+ });
17
+ import { defineComponent as R, ref as g, watch as S, resolveComponent as B, openBlock as A, createElementBlock as E, createVNode as C, withCtx as w, createTextVNode as N } from "vue";
18
+ import { cloneDeep as $ } from "lodash-es";
19
+ import { BasicTable as q, useTable as F } from "/@/components/Table";
20
+ import { f as j, g as z, h as O } from "./auth.api-ea1d33d4.mjs";
21
+ import { b as U, c as V } from "./auth.data-511e5197.mjs";
22
+ import { _ as K } from "./index-1d1a6e56.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 P = R({
29
+ name: "AuthButtonConfig",
30
+ components: { BasicTable: q },
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(s) {
44
+ const r = g(""), l = g(2), p = g(3), m = g(5), [b, { reload: f, getTableRef: c, setPagination: a }] = F({
45
+ api: T,
46
+ rowKey: "code",
47
+ bordered: !0,
48
+ columns: U,
49
+ showIndexColumn: !1
50
+ });
51
+ S(
52
+ () => s.headId,
53
+ (t) => {
54
+ r.value = t.split("?")[0], c().value && a({ current: 1, pageSize: 10 }), f().catch(() => null);
55
+ },
56
+ { immediate: !0 }
57
+ );
58
+ const u = (t) => {
59
+ const e = $(V);
60
+ if (t.mainRelationType != null && t.mainThemeTemplate != null && s.tableType == 3) {
61
+ let n = [];
62
+ switch (t.mainThemeTemplate) {
63
+ case "normal":
64
+ case "innerTable":
65
+ case "tab":
66
+ t.mainRelationType == 1 ? n = [] : n = e.filter((o) => ["add", "update", "batch_delete"].includes(o.code));
67
+ break;
68
+ case "erp":
69
+ n = e.filter((o) => !["super_query"].includes(o.code));
70
+ break;
71
+ }
72
+ return n;
73
+ } else
74
+ return e;
75
+ };
76
+ function T(t) {
77
+ return h(this, null, function* () {
78
+ let e = yield j(r.value, t), { authList: n, buttonList: o } = e, d = [];
79
+ const _ = u(e);
80
+ for (let i of _) {
81
+ let y = {
82
+ status: 0,
83
+ page: p.value
84
+ }, L = n.find((D) => D.code == i.code);
85
+ Object.assign(i, y, L), d.push(i);
86
+ }
87
+ if (s.tableType == 3) {
88
+ const i = d.findIndex((y) => y.code === "super_query");
89
+ i != -1 && d.splice(i, 1);
90
+ }
91
+ return v(n, o, d);
92
+ });
93
+ }
94
+ function v(t, e, n) {
95
+ for (let o of e) {
96
+ let d = t.find((i) => i.code == o.buttonCode), _ = {
97
+ code: o.buttonCode,
98
+ title: o.buttonName,
99
+ status: 0,
100
+ page: o.buttonStyle == "form" ? m.value : p.value
101
+ };
102
+ n.push(Object.assign(_, d));
103
+ }
104
+ return n;
105
+ }
106
+ function x(t, e) {
107
+ return h(this, null, function* () {
108
+ t ? I(e) : k(e);
109
+ });
110
+ }
111
+ function I(t) {
112
+ return h(this, null, function* () {
113
+ let e = yield z({
114
+ id: t.id,
115
+ code: t.code,
116
+ page: t.page,
117
+ cgformId: r.value,
118
+ type: l.value,
119
+ control: 5,
120
+ status: 1
121
+ });
122
+ t.id = e.id, t.status = 1;
123
+ });
124
+ }
125
+ function k(t) {
126
+ return h(this, null, function* () {
127
+ yield O(t.id), t.status = 0;
128
+ });
129
+ }
130
+ return { registerTable: b, onUpdateStatus: x };
131
+ }
132
+ }), G = { class: "auth-field-config" };
133
+ function H(s, r, l, p, m, b) {
134
+ const f = B("a-switch"), c = B("BasicTable");
135
+ return A(), E("div", G, [
136
+ C(c, { onRegister: s.registerTable }, {
137
+ switch: w(({ text: a, record: u }) => [
138
+ C(f, {
139
+ size: "small",
140
+ checked: u.status === 1,
141
+ onChange: (T) => s.onUpdateStatus(T, u)
142
+ }, null, 8, ["checked", "onChange"])
143
+ ]),
144
+ control: w(() => [
145
+ N(" 可见 ")
146
+ ]),
147
+ _: 1
148
+ }, 8, ["onRegister"])
149
+ ]);
150
+ }
151
+ const st = /* @__PURE__ */ K(P, [["render", H]]);
152
+ export {
153
+ st as default
154
+ };
@@ -16,9 +16,10 @@ var y = (e, l, a) => new Promise((f, i) => {
16
16
  });
17
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
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-0e3ab3af.mjs";
19
+ import { c as R } from "./auth.data-511e5197.mjs";
20
+ import { o as V, n as $, p as z } from "./auth.api-ea1d33d4.mjs";
21
+ import { _ as L } from "./index-1d1a6e56.mjs";
22
+ import "/@/utils/index";
22
23
  import "/@/utils/http/axios";
23
24
  import "/@/components/jeecg/OnLine/JPopupOnlReport.vue";
24
25
  import "vue-router";
@@ -150,7 +151,7 @@ function O(e, l, a, f, i, m) {
150
151
  ], 64))
151
152
  ]);
152
153
  }
153
- const ee = /* @__PURE__ */ L(q, [["render", O], ["__scopeId", "data-v-d165a23e"]]);
154
+ const te = /* @__PURE__ */ L(q, [["render", O], ["__scopeId", "data-v-d165a23e"]]);
154
155
  export {
155
- ee as default
156
+ te as default
156
157
  };
@@ -0,0 +1,238 @@
1
+ var K = Object.defineProperty, Q = Object.defineProperties;
2
+ var H = Object.getOwnPropertyDescriptors;
3
+ var F = Object.getOwnPropertySymbols;
4
+ var W = Object.prototype.hasOwnProperty, X = Object.prototype.propertyIsEnumerable;
5
+ var M = (t, n, o) => n in t ? K(t, n, { enumerable: !0, configurable: !0, writable: !0, value: o }) : t[n] = o, S = (t, n) => {
6
+ for (var o in n || (n = {}))
7
+ W.call(n, o) && M(t, o, n[o]);
8
+ if (F)
9
+ for (var o of F(n))
10
+ X.call(n, o) && M(t, o, n[o]);
11
+ return t;
12
+ }, k = (t, n) => Q(t, H(n));
13
+ var A = (t, n, o) => new Promise((u, f) => {
14
+ var p = (a) => {
15
+ try {
16
+ i(o.next(a));
17
+ } catch (l) {
18
+ f(l);
19
+ }
20
+ }, g = (a) => {
21
+ try {
22
+ i(o.throw(a));
23
+ } catch (l) {
24
+ f(l);
25
+ }
26
+ }, i = (a) => a.done ? u(a.value) : Promise.resolve(a.value).then(p, g);
27
+ i((o = o.apply(t, n)).next());
28
+ });
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 c, withCtx as d, createTextVNode as ae, mergeProps as ie } from "vue";
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";
32
+ import { BasicForm as me, useForm as de } from "/@/components/Form";
33
+ import { i as fe, j as pe, k as ge, l as he } from "./auth.api-ea1d33d4.mjs";
34
+ import { d as Ce, u as be, U as v } from "./auth.data-511e5197.mjs";
35
+ import { _ as _e } from "./index-1d1a6e56.mjs";
36
+ import "/@/utils/http/axios";
37
+ import "/@/utils/index";
38
+ import "/@/components/jeecg/OnLine/JPopupOnlReport.vue";
39
+ import "/@/hooks/web/useMessage";
40
+ import "vue-router";
41
+ const we = Y({
42
+ name: "AuthDataConfig",
43
+ components: { BasicTable: le, TableAction: se, BasicModal: ce, BasicForm: me },
44
+ props: {
45
+ cgformId: { type: String, required: !0 },
46
+ authFields: { type: Array, required: !0 }
47
+ },
48
+ setup(t) {
49
+ const n = Z(!1), [o, { reload: u, setLoading: f }] = re({
50
+ api: (e) => fe(t.cgformId, e),
51
+ rowKey: "id",
52
+ bordered: !0,
53
+ columns: Ce,
54
+ showIndexColumn: !1,
55
+ // 操作列
56
+ actionColumn: {
57
+ width: 120,
58
+ title: "操作",
59
+ fixed: !1,
60
+ dataIndex: "action",
61
+ slots: { customRender: "action" }
62
+ }
63
+ });
64
+ y(n, (e) => f(e));
65
+ const [p, { openModal: g, closeModal: i }] = ue(), a = ee({
66
+ title: "",
67
+ width: 800,
68
+ confirmLoading: !1,
69
+ onOk: E,
70
+ onCancel: i,
71
+ onRegister: p
72
+ });
73
+ let l = !1, h = {}, m = !1;
74
+ const { formSchemas: _ } = be(t, {
75
+ onRuleOperatorChange: P,
76
+ onRuleColumnChange: $,
77
+ onRuleNameChange: j
78
+ }), [C, { validate: b, resetFields: I, setFieldsValue: w, getFieldsValue: R, clearValidate: O, updateSchema: D }] = de({
79
+ schemas: _,
80
+ showActionButtonGroup: !1,
81
+ labelAlign: "right"
82
+ });
83
+ y(
84
+ () => t.cgformId,
85
+ () => {
86
+ u().catch(() => null);
87
+ },
88
+ { immediate: !0 }
89
+ );
90
+ function T(e) {
91
+ return A(this, null, function* () {
92
+ var s;
93
+ l = (s = e.isUpdate) != null ? s : !1, a.title = e.title, g(), yield te(), yield I(), h = Object.assign({}, e.record), yield w(h);
94
+ });
95
+ }
96
+ function U() {
97
+ T({ title: "新增" });
98
+ }
99
+ function V(e) {
100
+ T({ title: "编辑", record: e, isUpdate: !0 });
101
+ }
102
+ function L(e) {
103
+ n.value = !0, he(e).then(u).finally(() => n.value = !1);
104
+ }
105
+ function E() {
106
+ return A(this, null, function* () {
107
+ try {
108
+ a.confirmLoading = !0;
109
+ let e = yield b();
110
+ e = Object.assign({}, h, e), e.ruleOperator == v && (e.ruleColumn = ""), e.cgformId = t.cgformId, yield pe(e, l), u(), i();
111
+ } finally {
112
+ a.confirmLoading = !1;
113
+ }
114
+ });
115
+ }
116
+ function N(e) {
117
+ n.value = !0;
118
+ let s = Math.abs(e.status - 1);
119
+ ge(k(S({}, e), { status: s })).then(() => {
120
+ e.status = s;
121
+ }).finally(() => {
122
+ n.value = !1;
123
+ });
124
+ }
125
+ function P(e) {
126
+ e == v ? (w({
127
+ ruleColumn: "",
128
+ ruleValue: ""
129
+ }), D({
130
+ field: "ruleValue",
131
+ component: "InputTextArea"
132
+ }), O(["ruleValue"])) : D({
133
+ field: "ruleValue",
134
+ component: "JInputSelect"
135
+ });
136
+ }
137
+ function $(e) {
138
+ const s = R();
139
+ if (!s.ruleName || s.ruleName && !m) {
140
+ const B = t.authFields.find((J) => J.value === e), G = B ? B.text : e;
141
+ w({
142
+ ruleName: G
143
+ });
144
+ }
145
+ }
146
+ function j(e) {
147
+ e.target.value.length ? m = !0 : m = !1;
148
+ }
149
+ function x(e) {
150
+ e && (m = !1);
151
+ }
152
+ function q(e) {
153
+ return [
154
+ {
155
+ label: "编辑",
156
+ onClick: () => V(e)
157
+ }
158
+ ];
159
+ }
160
+ function z(e) {
161
+ return [
162
+ {
163
+ label: "删除",
164
+ popConfirm: {
165
+ title: "确定删除吗?",
166
+ placement: "left",
167
+ confirm: () => L(e.id)
168
+ }
169
+ }
170
+ ];
171
+ }
172
+ return {
173
+ loading: n,
174
+ formModalProps: a,
175
+ onAdd: U,
176
+ onUpdateStatus: N,
177
+ getTableAction: q,
178
+ getDropDownAction: z,
179
+ registerTable: o,
180
+ registerModal: p,
181
+ registerForm: C,
182
+ handleOpenChange: x
183
+ };
184
+ }
185
+ });
186
+ function Ae(t, n, o, u, f, p) {
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");
188
+ return ne(), oe("div", null, [
189
+ c(l, {
190
+ onRegister: t.registerTable,
191
+ loading: t.loading
192
+ }, {
193
+ tableTitle: d(() => [
194
+ c(g, {
195
+ onClick: t.onAdd,
196
+ type: "primary",
197
+ preIcon: "ant-design:plus"
198
+ }, {
199
+ default: d(() => [
200
+ ae("新增")
201
+ ]),
202
+ _: 1
203
+ }, 8, ["onClick"])
204
+ ]),
205
+ switch: d(({ text: C, record: b }) => [
206
+ c(i, {
207
+ size: "small",
208
+ checked: b.status === 1,
209
+ onClick: () => t.onUpdateStatus(b)
210
+ }, null, 8, ["checked", "onClick"])
211
+ ]),
212
+ action: d(({ record: C }) => [
213
+ c(a, {
214
+ actions: t.getTableAction(C),
215
+ dropDownActions: t.getDropDownAction(C)
216
+ }, null, 8, ["actions", "dropDownActions"])
217
+ ]),
218
+ _: 1
219
+ }, 8, ["onRegister", "loading"]),
220
+ c(_, ie(t.formModalProps, { onOpenChange: t.handleOpenChange }), {
221
+ default: d(() => [
222
+ c(m, {
223
+ spinning: t.formModalProps.confirmLoading
224
+ }, {
225
+ default: d(() => [
226
+ c(h, { onRegister: t.registerForm }, null, 8, ["onRegister"])
227
+ ]),
228
+ _: 1
229
+ }, 8, ["spinning"])
230
+ ]),
231
+ _: 1
232
+ }, 16, ["onOpenChange"])
233
+ ]);
234
+ }
235
+ const Ve = /* @__PURE__ */ _e(we, [["render", Ae]]);
236
+ export {
237
+ Ve as default
238
+ };
@@ -16,12 +16,12 @@ var f = (e, s, t) => new Promise((l, c) => {
16
16
  });
17
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
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-0e3ab3af.mjs";
19
+ import { q as S, n as R, r as V } from "./auth.api-ea1d33d4.mjs";
20
+ import { _ as $ } from "./index-1d1a6e56.mjs";
21
21
  import "/@/utils/http/axios";
22
22
  import "/@/components/jeecg/OnLine/JPopupOnlReport.vue";
23
23
  import "vue-router";
24
- const z = A({
24
+ const q = A({
25
25
  name: "AuthDataTree",
26
26
  props: {
27
27
  cgformId: { type: String, required: !0 }
@@ -84,7 +84,7 @@ const z = A({
84
84
  };
85
85
  }
86
86
  });
87
- const q = { class: "onl-auth-tree-btns" };
87
+ const z = { class: "onl-auth-tree-btns" };
88
88
  function J(e, s, t, l, c, i) {
89
89
  const n = y("a-empty"), o = y("a-button"), a = y("a-tree");
90
90
  return h(), _("div", null, [
@@ -95,7 +95,7 @@ function J(e, s, t, l, c, i) {
95
95
  key: 1,
96
96
  description: "无权限信息"
97
97
  })) : (h(), _(N, { key: 2 }, [
98
- M("div", q, [
98
+ M("div", z, [
99
99
  v(o, {
100
100
  onClick: e.onRefresh,
101
101
  size: "small",
@@ -133,7 +133,7 @@ function J(e, s, t, l, c, i) {
133
133
  ], 64))
134
134
  ]);
135
135
  }
136
- const X = /* @__PURE__ */ $(z, [["render", J], ["__scopeId", "data-v-c6be2157"]]);
136
+ const X = /* @__PURE__ */ $(q, [["render", J], ["__scopeId", "data-v-c6be2157"]]);
137
137
  export {
138
138
  X as default
139
139
  };