@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.
Files changed (154) hide show
  1. package/AuthButtonConfig-2f71787c.mjs +125 -0
  2. package/AuthButtonTree-d73bccf5.mjs +156 -0
  3. package/AuthDataConfig-32cf23d2.mjs +212 -0
  4. package/AuthDataTree-03d62d3f.mjs +139 -0
  5. package/AuthFieldConfig-b1217a0c.mjs +139 -0
  6. package/AuthFieldTree-888e04a9.mjs +232 -0
  7. package/AuthManagerDrawer-f127b8a2.mjs +114 -0
  8. package/AuthSetterModal-37da78ed.mjs +261 -0
  9. package/CgformCopyList-3adab58f.mjs +245 -0
  10. package/CgformModal-6938d8c2.mjs +613 -0
  11. package/CgreportModal-77ec8c17.mjs +12 -0
  12. package/CgreportModal.vue_vue_type_script_setup_true_lang-52dcec5e.mjs +567 -0
  13. package/CheckDictTable-414313f2.mjs +211 -0
  14. package/CodeFileListModal-4831ce3d.mjs +158 -0
  15. package/CodeFileViewModal-5990dac4.mjs +244 -0
  16. package/CodeGeneratorModal-7df9e25d.mjs +234 -0
  17. package/CustomButtonList-1c9bd859.mjs +363 -0
  18. package/DBAttributeTable-cd1c41e5.mjs +473 -0
  19. package/DbToOnlineModal-dc5d2030.mjs +160 -0
  20. package/DetailForm-e4538e7a.mjs +446 -0
  21. package/EnhanceJavaModal-7f53d2ca.mjs +260 -0
  22. package/EnhanceJsHistory-c30805ce.mjs +184 -0
  23. package/EnhanceJsModal-0b133341.mjs +233 -0
  24. package/EnhanceSqlModal-33a94c83.mjs +259 -0
  25. package/ExtendConfigModal-60f2cf86.mjs +111 -0
  26. package/FieldExtendJsonModal-48f7d67f.mjs +220 -0
  27. package/FileSelectModal-64aaf623.mjs +91 -0
  28. package/ForeignKeyTable-cb1abd1d.mjs +69 -0
  29. package/IndexTable-4e94cd1f.mjs +89 -0
  30. package/JModalTip-abe1515a.mjs +46 -0
  31. package/JOnlineSearchSelect-5608a5cf.mjs +94 -0
  32. package/LeftDepart-ca7a7375.mjs +82 -0
  33. package/LeftRole-d0fa8398.mjs +86 -0
  34. package/LeftUser-0c88c240.mjs +105 -0
  35. package/LinkTableConfigModal-77d7c0b9.mjs +230 -0
  36. package/LinkTableFieldConfigModal-c5689ab0.mjs +178 -0
  37. package/LinkTableListPiece-34266919.mjs +34 -0
  38. package/ModalFormDemo-0eeea994.mjs +78 -0
  39. package/OnlCgformErpList-7a0388d8.mjs +425 -0
  40. package/OnlCgformErpSubTable-fc6ade76.mjs +388 -0
  41. package/OnlineAutoList-85e6a30d.mjs +472 -0
  42. package/OnlineAutoModal-2a146238.mjs +206 -0
  43. package/OnlineAutoTreeList-f8d0e100.mjs +495 -0
  44. package/OnlineCustomModal-456a85a6.mjs +227 -0
  45. package/OnlineDetailModal-f967f080.mjs +177 -0
  46. package/OnlineForm-630a22c2.mjs +778 -0
  47. package/OnlineFormDetail-1b216792.mjs +296 -0
  48. package/OnlineQueryForm-1c5949a7.mjs +378 -0
  49. package/OnlineSearchFormItem-7c2ea9ed.mjs +352 -0
  50. package/OnlineSelectCascade-c7baf52b.mjs +160 -0
  51. package/OnlineSubFormDetail-0aa4966c.mjs +140 -0
  52. package/PageAttributeTable-811185fd.mjs +404 -0
  53. package/ProcessOnlineForm-27be6f6f.mjs +177 -0
  54. package/QueryTable-4ba771ef.mjs +115 -0
  55. package/SuperQuery-3821f984.mjs +845 -0
  56. package/SuperQueryValComponent-471110b5.mjs +8 -0
  57. package/SuperQueryValComponent.vue_vue_type_script_lang-e3ad7ee8.mjs +101 -0
  58. package/auth.api-d3a6c4b3.mjs +39 -0
  59. package/auth.data-8be5c9e3.mjs +141 -0
  60. package/{cgform.data.js → cgform.data-cbdd88c3.mjs} +93 -62
  61. package/constant-fe20103a.mjs +6 -0
  62. package/enhance.api-138e6826.mjs +104 -0
  63. package/enhance.data-efc7e155.mjs +175 -0
  64. package/index-074b92e5.mjs +236 -0
  65. package/index-6a09a912.mjs +58 -0
  66. package/index-9d32ae88.mjs +313 -0
  67. package/main.index.js +7 -1
  68. package/package.json +1 -1
  69. package/style.css +1 -1
  70. package/useCgformList-2d6a5955.mjs +388 -0
  71. package/useExtendComponent-48d37d9b.mjs +3919 -0
  72. package/useListButton-cef1371a.mjs +656 -0
  73. package/useOnlinePopEvent-e9a042f8.mjs +19 -0
  74. package/useOnlineTest-0df0ae86.mjs +43 -0
  75. package/useSchemas-fc8d97ce.mjs +669 -0
  76. package/useTableSync-dc333087.mjs +83 -0
  77. package/AuthButtonConfig.js +0 -147
  78. package/AuthButtonTree.js +0 -183
  79. package/AuthDataConfig.js +0 -246
  80. package/AuthDataTree.js +0 -160
  81. package/AuthFieldConfig.js +0 -170
  82. package/AuthFieldTree.js +0 -281
  83. package/AuthManagerDrawer.js +0 -125
  84. package/AuthSetterModal.js +0 -316
  85. package/CgformCopyList.js +0 -266
  86. package/CgformModal.js +0 -780
  87. package/CgreportModal.js +0 -667
  88. package/CheckDictTable.js +0 -242
  89. package/CodeFileListModal.js +0 -175
  90. package/CodeFileViewModal.js +0 -325
  91. package/CodeGeneratorModal.js +0 -297
  92. package/CustomButtonList.js +0 -410
  93. package/DBAttributeTable.js +0 -526
  94. package/DbToOnlineModal.js +0 -192
  95. package/DetailForm.js +0 -608
  96. package/EnhanceJavaModal.js +0 -298
  97. package/EnhanceJsHistory.js +0 -229
  98. package/EnhanceJsModal.js +0 -293
  99. package/EnhanceSqlModal.js +0 -299
  100. package/ExtendConfigModal.js +0 -151
  101. package/FieldExtendJsonModal.js +0 -283
  102. package/FileSelectModal.js +0 -102
  103. package/ForeignKeyTable.js +0 -79
  104. package/IndexTable.js +0 -97
  105. package/JModalTip.js +0 -54
  106. package/JOnlineSearchSelect.js +0 -115
  107. package/LICENSE +0 -9
  108. package/LeftDepart.js +0 -96
  109. package/LeftRole.js +0 -98
  110. package/LeftUser.js +0 -117
  111. package/LinkTableConfigModal.js +0 -289
  112. package/LinkTableFieldConfigModal.js +0 -218
  113. package/LinkTableListPiece.js +0 -36
  114. package/ModalFormDemo.js +0 -85
  115. package/OnlineAutoList.js +0 -524
  116. package/OnlineAutoModal.js +0 -226
  117. package/OnlineAutoTreeList.js +0 -553
  118. package/OnlineCustomModal.js +0 -286
  119. package/OnlineDetailModal.js +0 -190
  120. package/OnlineForm.js +0 -1018
  121. package/OnlineFormDetail.js +0 -347
  122. package/OnlineQueryForm.js +0 -484
  123. package/OnlineSearchFormItem.js +0 -436
  124. package/OnlineSelectCascade.js +0 -228
  125. package/OnlineSubFormDetail.js +0 -166
  126. package/PageAttributeTable.js +0 -486
  127. package/ProcessOnlineForm.js +0 -208
  128. package/QueryTable.js +0 -129
  129. package/SuperQuery.js +0 -1021
  130. package/SuperQueryValComponent.js +0 -9
  131. package/SuperQueryValComponent.vue_vue_type_script_lang.js +0 -162
  132. package/_arrayPush.js +0 -278
  133. package/_baseClone.js +0 -471
  134. package/_baseSlice.js +0 -18
  135. package/_commonjsHelpers.js +0 -5
  136. package/_flatRest.js +0 -174
  137. package/auth.api.js +0 -43
  138. package/auth.data.js +0 -142
  139. package/clipboard.js +0 -565
  140. package/enhance.api.js +0 -129
  141. package/enhance.data.js +0 -196
  142. package/index.js +0 -87
  143. package/index2.js +0 -340
  144. package/index3.js +0 -264
  145. package/isArray.js +0 -47
  146. package/omit.js +0 -60
  147. package/pick.js +0 -68
  148. package/toString.js +0 -31
  149. package/useCgformList.js +0 -470
  150. package/useExtendComponent.js +0 -5205
  151. package/useListButton.js +0 -923
  152. package/useOnlineTest.js +0 -44
  153. package/useSchemas.js +0 -653
  154. package/useTableSync.js +0 -117
@@ -0,0 +1,184 @@
1
+ var x = Object.defineProperty;
2
+ var b = Object.getOwnPropertySymbols;
3
+ var N = Object.prototype.hasOwnProperty, $ = Object.prototype.propertyIsEnumerable;
4
+ var S = (e, n, t) => n in e ? x(e, n, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[n] = t, v = (e, n) => {
5
+ for (var t in n || (n = {}))
6
+ N.call(n, t) && S(e, t, n[t]);
7
+ if (b)
8
+ for (var t of b(n))
9
+ $.call(n, t) && S(e, t, n[t]);
10
+ return e;
11
+ };
12
+ var M = (e, n, t) => new Promise((u, _) => {
13
+ var m = (s) => {
14
+ try {
15
+ r(t.next(s));
16
+ } catch (d) {
17
+ _(d);
18
+ }
19
+ }, p = (s) => {
20
+ try {
21
+ r(t.throw(s));
22
+ } catch (d) {
23
+ _(d);
24
+ }
25
+ }, r = (s) => s.done ? u(s.value) : Promise.resolve(s.value).then(m, p);
26
+ r((t = t.apply(e, n)).next());
27
+ });
28
+ import { formatToDate as j } from "/@/utils/dateUtil";
29
+ import { defineComponent as I, ref as g, nextTick as R, resolveComponent as c, openBlock as w, createBlock as T, withCtx as a, createVNode as i, createTextVNode as k, normalizeClass as D, createElementVNode as F, toDisplayString as V } from "vue";
30
+ import { BasicModal as A, useModalInner as O } from "/@/components/Modal";
31
+ import { JCodeEditor as z } from "/@/components/Form";
32
+ import "/@/store";
33
+ import { defineStore as P } from "pinia";
34
+ import { createLocalStorage as q } from "/@/utils/cache";
35
+ import { _ as G } from "./index-6a09a912.mjs";
36
+ const B = q(), H = "enhance_", K = P({
37
+ id: "online-cgform-enhance",
38
+ state: () => ({
39
+ enhanceJs: {}
40
+ }),
41
+ getters: {},
42
+ actions: {
43
+ getEnhanceJs(e) {
44
+ return this.enhanceJs[e] = B.get(H + e), this.enhanceJs[e];
45
+ },
46
+ addEnhanceJs(e) {
47
+ this.enhanceJs[e.code] ? this.enhanceJs[e.code].push(v({}, e)) : this.enhanceJs[e.code] = [v({}, e)];
48
+ let n = this.enhanceJs[e.code];
49
+ for (; n.length > 16; )
50
+ n.shift();
51
+ B.set(H + e.code, n);
52
+ }
53
+ }
54
+ }), Q = I({
55
+ name: "EnhanceJsHistory",
56
+ components: { BasicModal: A, JCodeEditor: z },
57
+ setup() {
58
+ const e = K(), n = g(), t = g(!1), u = g([]), _ = g(""), m = g(0), [p, { closeModal: r }] = O((o) => M(this, null, function* () {
59
+ s(o.code, o.type);
60
+ }));
61
+ function s(o, E) {
62
+ _.value = "", u.value = [];
63
+ let J = e.getEnhanceJs(o), l = [], f = 0;
64
+ for (let h of J)
65
+ h.type === E && (f++, l.push(Object.assign({}, h, { index: f })));
66
+ l && l.length > 0 && l.sort((h, L) => L.date - h.date), u.value = [...l], R(() => y(l[0]));
67
+ }
68
+ function d() {
69
+ r();
70
+ }
71
+ function C(o) {
72
+ return j(o, "yyyy-MM-DD HH:mm:ss");
73
+ }
74
+ function y(o) {
75
+ m.value = o.index, n.value.setValue(o.str);
76
+ }
77
+ return {
78
+ codeEditorRef: n,
79
+ fullCode: y,
80
+ registerModal: p,
81
+ getFormatDate: C,
82
+ onCancel: d,
83
+ confirmLoading: t,
84
+ dataList: u,
85
+ jsStr: _,
86
+ activeIndex: m
87
+ };
88
+ }
89
+ });
90
+ const U = ["onClick"];
91
+ function W(e, n, t, u, _, m) {
92
+ const p = c("a-divider"), r = c("a-list-item"), s = c("a-list"), d = c("a-layout-sider"), C = c("JCodeEditor"), y = c("a-layout-content"), o = c("a-layout"), E = c("a-spin"), J = c("a-button"), l = c("BasicModal");
93
+ return w(), T(l, {
94
+ onRegister: e.registerModal,
95
+ title: "JS增强历史记录",
96
+ width: 1200,
97
+ maskClosable: !1,
98
+ confirmLoading: e.confirmLoading,
99
+ defaultFullscreen: "",
100
+ onCancel: e.onCancel
101
+ }, {
102
+ footer: a(() => [
103
+ i(J, { onClick: e.onCancel }, {
104
+ default: a(() => [
105
+ k("关闭")
106
+ ]),
107
+ _: 1
108
+ }, 8, ["onClick"])
109
+ ]),
110
+ default: a(() => [
111
+ i(E, { spinning: e.confirmLoading }, {
112
+ default: a(() => [
113
+ i(o, null, {
114
+ default: a(() => [
115
+ i(d, { theme: "light" }, {
116
+ default: a(() => [
117
+ i(s, {
118
+ bordered: "",
119
+ dataSource: e.dataList,
120
+ class: D("enhance-list")
121
+ }, {
122
+ header: a(() => [
123
+ F("div", null, [
124
+ i(p, { style: { margin: "0" } }, {
125
+ default: a(() => [
126
+ k("保存时间")
127
+ ]),
128
+ _: 1
129
+ })
130
+ ])
131
+ ]),
132
+ renderItem: a(({ item: f }) => [
133
+ i(r, {
134
+ class: D(e.activeIndex === f.index ? "bg-blue" : "")
135
+ }, {
136
+ default: a(() => [
137
+ F("a", {
138
+ onClick: (h) => e.fullCode(f)
139
+ }, V(e.getFormatDate(f.date)), 9, U)
140
+ ]),
141
+ _: 2
142
+ }, 1032, ["class"])
143
+ ]),
144
+ _: 1
145
+ }, 8, ["dataSource"])
146
+ ]),
147
+ _: 1
148
+ }),
149
+ i(o, null, {
150
+ default: a(() => [
151
+ i(y, { style: { margin: "8px 8px", padding: "8px", background: "#fff", minHeight: "280px" } }, {
152
+ default: a(() => [
153
+ i(C, {
154
+ ref: "codeEditorRef",
155
+ language: "javascript",
156
+ fullScreen: !0,
157
+ lineNumbers: !1,
158
+ "language-change": !1
159
+ }, null, 512)
160
+ ]),
161
+ _: 1
162
+ })
163
+ ]),
164
+ _: 1
165
+ })
166
+ ]),
167
+ _: 1
168
+ })
169
+ ]),
170
+ _: 1
171
+ }, 8, ["spinning"])
172
+ ]),
173
+ _: 1
174
+ }, 8, ["onRegister", "confirmLoading", "onCancel"]);
175
+ }
176
+ const X = /* @__PURE__ */ G(Q, [["render", W], ["__scopeId", "data-v-b15e9c26"]]), ie = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
177
+ __proto__: null,
178
+ default: X
179
+ }, Symbol.toStringTag, { value: "Module" }));
180
+ export {
181
+ X as E,
182
+ ie as a,
183
+ K as u
184
+ };
@@ -0,0 +1,233 @@
1
+ var J = (e, l, c) => new Promise((C, g) => {
2
+ var a = (s) => {
3
+ try {
4
+ u(c.next(s));
5
+ } catch (o) {
6
+ g(o);
7
+ }
8
+ }, r = (s) => {
9
+ try {
10
+ u(c.throw(s));
11
+ } catch (o) {
12
+ g(o);
13
+ }
14
+ }, u = (s) => s.done ? C(s.value) : Promise.resolve(s.value).then(a, r);
15
+ u((c = c.apply(e, l)).next());
16
+ });
17
+ import { defineComponent as A, ref as d, reactive as S, resolveComponent as v, openBlock as b, createBlock as T, withCtx as i, createVNode as m, createTextVNode as k, createCommentVNode as M } from "vue";
18
+ import { BasicModal as G, useModalInner as I, useModal as P } from "/@/components/Modal";
19
+ import { JCodeEditor as q } from "/@/components/Form";
20
+ import { u as z } from "./useOnlineTest-0df0ae86.mjs";
21
+ import { E as L, u as Q } from "./EnhanceJsHistory-c30805ce.mjs";
22
+ import { g as W, s as X } from "./enhance.api-138e6826.mjs";
23
+ import { useMessage as Y } from "/@/hooks/web/useMessage";
24
+ import { _ as Z } from "./index-6a09a912.mjs";
25
+ import "/@/utils/dateUtil";
26
+ import "/@/store";
27
+ import "pinia";
28
+ import "/@/utils/cache";
29
+ import "/@/utils/http/axios";
30
+ import "/@/utils/is";
31
+ import "/@/components/jeecg/OnLine/JPopupOnlReport.vue";
32
+ import "vue-router";
33
+ const x = A({
34
+ name: "EnhanceJs",
35
+ components: { BasicModal: G, JCodeEditor: q, EnhanceJsHistory: L },
36
+ emits: ["register"],
37
+ setup() {
38
+ const { createMessage: e } = Y(), l = Q(), c = d(), C = d(), g = S({ form: {}, list: {} }), a = d("list"), r = d(""), u = d(!1), s = d(!1), o = d(""), f = S({ form: "", list: "" }), p = { form: !1, list: !1 }, E = d(!1), [h, { closeModal: B }] = I((n) => J(this, null, function* () {
39
+ $(n.row);
40
+ })), [V, D] = P(), { aiTestMode: N, genEnhanceJsData: _ } = z();
41
+ function $(n) {
42
+ r.value = n.id, s.value = !1, o.value = n.tableName;
43
+ let t = l.getEnhanceJs(r.value);
44
+ (t == null ? void 0 : t.length) > 0 ? (a.value = t[t.length - 1].type, u.value = !0) : u.value = !1, p.form = !1, p.list = !1, a.value ? w(a.value) : w("form"), E.value = !0, setTimeout(() => E.value = !1, 150);
45
+ }
46
+ function j() {
47
+ return J(this, null, function* () {
48
+ yield Promise.all([H("form"), H("list")]), B(), e.success("保存成功");
49
+ });
50
+ }
51
+ function H(n) {
52
+ return J(this, null, function* () {
53
+ let t = g[n], y = {
54
+ cgJs: f[n],
55
+ cgJsType: n
56
+ };
57
+ if (!p[n] || t.cgJs === y.cgJs)
58
+ return;
59
+ let R = !!t.id;
60
+ R && (y = Object.assign({}, t, y)), yield X(r.value, y, R), l.addEnhanceJs({
61
+ code: r.value,
62
+ str: y.cgJs,
63
+ type: y.cgJsType,
64
+ date: (/* @__PURE__ */ new Date()).getTime()
65
+ });
66
+ });
67
+ }
68
+ function F() {
69
+ B();
70
+ }
71
+ function w(n) {
72
+ return J(this, null, function* () {
73
+ a.value = n;
74
+ try {
75
+ if (!p[n]) {
76
+ let t = yield W(r.value, n);
77
+ Object.assign(g[n], { id: null }, t), f[n] = g[n].cgJs, p[n] = !0;
78
+ }
79
+ } catch (t) {
80
+ console.error(t);
81
+ }
82
+ setTimeout(() => {
83
+ n == "list" ? C.value.refresh() : c.value.refresh();
84
+ }, 150);
85
+ });
86
+ }
87
+ function U() {
88
+ D.openModal(!0, {
89
+ code: r.value,
90
+ type: a.value
91
+ });
92
+ }
93
+ function K(n) {
94
+ f[a.value] != n && (s.value = !0, f[a.value] = n);
95
+ }
96
+ function O() {
97
+ a.value === "form" ? _(o.value, a.value, c.value) : _(o.value, a.value, C.value);
98
+ }
99
+ return {
100
+ formEditorRef: c,
101
+ listEditorRef: C,
102
+ reloading: E,
103
+ enhanceValues: f,
104
+ enhanceType: a,
105
+ showHistory: u,
106
+ aiTestMode: N,
107
+ tableName: o,
108
+ genEnhanceJsData: _,
109
+ onGenTestData: O,
110
+ onChangeType: w,
111
+ onCodeChange: K,
112
+ onShowHistory: U,
113
+ onSubmit: j,
114
+ onCancel: F,
115
+ registerModal: h,
116
+ registerEnhanceJsHistory: V
117
+ };
118
+ }
119
+ });
120
+ function ee(e, l, c, C, g, a) {
121
+ const r = v("JCodeEditor"), u = v("a-tab-pane"), s = v("a-tabs"), o = v("a-button"), f = v("a-space"), p = v("EnhanceJsHistory"), E = v("BasicModal");
122
+ return b(), T(E, {
123
+ onRegister: e.registerModal,
124
+ title: "JS增强",
125
+ width: 800,
126
+ bodyStyle: { height: "360px" }
127
+ }, {
128
+ footer: i(() => [
129
+ m(f, null, {
130
+ default: i(() => [
131
+ m(o, { onClick: e.onCancel }, {
132
+ default: i(() => [
133
+ k("关闭")
134
+ ]),
135
+ _: 1
136
+ }, 8, ["onClick"]),
137
+ m(o, {
138
+ type: "primary",
139
+ onClick: e.onSubmit
140
+ }, {
141
+ default: i(() => [
142
+ k("确定")
143
+ ]),
144
+ _: 1
145
+ }, 8, ["onClick"])
146
+ ]),
147
+ _: 1
148
+ }),
149
+ m(f, { style: { float: "left" } }, {
150
+ default: i(() => [
151
+ e.showHistory ? (b(), T(o, {
152
+ key: 0,
153
+ onClick: e.onShowHistory
154
+ }, {
155
+ default: i(() => [
156
+ k("查看历史版本")
157
+ ]),
158
+ _: 1
159
+ }, 8, ["onClick"])) : M("", !0),
160
+ e.aiTestMode ? (b(), T(o, {
161
+ key: 1,
162
+ onClick: e.onGenTestData
163
+ }, {
164
+ default: i(() => [
165
+ k("生成测试数据")
166
+ ]),
167
+ _: 1
168
+ }, 8, ["onClick"])) : M("", !0)
169
+ ]),
170
+ _: 1
171
+ })
172
+ ]),
173
+ default: i(() => [
174
+ m(s, {
175
+ activeKey: e.enhanceType,
176
+ "onUpdate:activeKey": l[2] || (l[2] = (h) => e.enhanceType = h),
177
+ onChange: e.onChangeType
178
+ }, {
179
+ default: i(() => [
180
+ m(u, {
181
+ tab: "form",
182
+ key: "form",
183
+ forceRender: ""
184
+ }, {
185
+ default: i(() => [
186
+ e.reloading ? M("", !0) : (b(), T(r, {
187
+ key: 0,
188
+ ref: "formEditorRef",
189
+ value: e.enhanceValues.form,
190
+ "onUpdate:value": l[0] || (l[0] = (h) => e.enhanceValues.form = h),
191
+ language: "javascript",
192
+ fullScreen: !0,
193
+ lineNumbers: !1,
194
+ height: "240px",
195
+ "language-change": !1,
196
+ onChange: e.onCodeChange
197
+ }, null, 8, ["value", "onChange"]))
198
+ ]),
199
+ _: 1
200
+ }),
201
+ m(u, {
202
+ tab: "list",
203
+ key: "list",
204
+ forceRender: ""
205
+ }, {
206
+ default: i(() => [
207
+ e.reloading ? M("", !0) : (b(), T(r, {
208
+ key: 0,
209
+ ref: "listEditorRef",
210
+ value: e.enhanceValues.list,
211
+ "onUpdate:value": l[1] || (l[1] = (h) => e.enhanceValues.list = h),
212
+ language: "javascript",
213
+ fullScreen: !0,
214
+ lineNumbers: !1,
215
+ height: "240px",
216
+ "language-change": !1,
217
+ onChange: e.onCodeChange
218
+ }, null, 8, ["value", "onChange"]))
219
+ ]),
220
+ _: 1
221
+ })
222
+ ]),
223
+ _: 1
224
+ }, 8, ["activeKey", "onChange"]),
225
+ m(p, { onRegister: e.registerEnhanceJsHistory }, null, 8, ["onRegister"])
226
+ ]),
227
+ _: 1
228
+ }, 8, ["onRegister"]);
229
+ }
230
+ const Ce = /* @__PURE__ */ Z(x, [["render", ee]]);
231
+ export {
232
+ Ce as default
233
+ };
@@ -0,0 +1,259 @@
1
+ var X = Object.defineProperty;
2
+ var E = Object.getOwnPropertySymbols;
3
+ var Y = Object.prototype.hasOwnProperty, Z = Object.prototype.propertyIsEnumerable;
4
+ var R = (e, t, o) => t in e ? X(e, t, { enumerable: !0, configurable: !0, writable: !0, value: o }) : e[t] = o, A = (e, t) => {
5
+ for (var o in t || (t = {}))
6
+ Y.call(t, o) && R(e, o, t[o]);
7
+ if (E)
8
+ for (var o of E(t))
9
+ Z.call(t, o) && R(e, o, t[o]);
10
+ return e;
11
+ };
12
+ var d = (e, t, o) => new Promise((_, p) => {
13
+ var b = (i) => {
14
+ try {
15
+ c(o.next(i));
16
+ } catch (u) {
17
+ p(u);
18
+ }
19
+ }, s = (i) => {
20
+ try {
21
+ c(o.throw(i));
22
+ } catch (u) {
23
+ p(u);
24
+ }
25
+ }, c = (i) => i.done ? _(i.value) : Promise.resolve(i.value).then(b, s);
26
+ c((o = o.apply(e, t)).next());
27
+ });
28
+ import { defineComponent as x, ref as y, reactive as ee, computed as oe, nextTick as ne, resolveComponent as r, openBlock as D, createBlock as q, withCtx as a, createVNode as l, createTextVNode as g, createElementBlock as te, createCommentVNode as L, normalizeProps as ae, guardReactiveProps as le } from "vue";
29
+ import { BasicModal as ie, useModalInner as re, useModal as se } from "/@/components/Modal";
30
+ import { BasicForm as ce, useForm as ue } from "/@/components/Form";
31
+ import { BasicTable as me, TableAction as de } from "/@/components/Table";
32
+ import { useListPage as pe } from "/@/hooks/system/useListPage";
33
+ import { u as fe } from "./useOnlineTest-0df0ae86.mjs";
34
+ import { b as ge, c as _e } from "./enhance.data-efc7e155.mjs";
35
+ import { c as be, e as he, f as P } from "./enhance.api-138e6826.mjs";
36
+ import { _ as we } from "./index-6a09a912.mjs";
37
+ import "./cgform.data-cbdd88c3.mjs";
38
+ import "/@/utils/dict";
39
+ import "/@/utils/dict/JDictSelectUtil";
40
+ import "/@/utils/uuid";
41
+ import "/@/utils/http/axios";
42
+ import "/@/utils/is";
43
+ import "/@/components/jeecg/OnLine/JPopupOnlReport.vue";
44
+ import "/@/hooks/web/useMessage";
45
+ import "vue-router";
46
+ const Ce = x({
47
+ name: "EnhanceSqlModal",
48
+ components: { BasicModal: ie, BasicTable: me, BasicForm: ce, TableAction: de },
49
+ emits: ["register"],
50
+ setup() {
51
+ const e = y(""), t = y(""), o = y([]), { columns: _ } = _e(o), { doRequest: p, doDeleteRecord: b, tableContext: s } = pe({
52
+ tableProps: {
53
+ api: (n) => d(this, null, function* () {
54
+ let { dataSource: C, btnList: W } = yield be(e.value, n);
55
+ return o.value = W, C;
56
+ }),
57
+ columns: _,
58
+ canResize: !1,
59
+ useSearchForm: !1,
60
+ beforeFetch(n) {
61
+ return Object.assign(n, { column: "orderNum", order: "asc" });
62
+ }
63
+ }
64
+ }), [c, { reload: i }, { rowSelection: u, selectedRowKeys: h }] = s, [M, { closeModal: S }] = re((n) => d(this, null, function* () {
65
+ e.value = n.row.id, t.value = n.row.tableName, i();
66
+ })), { aiTestMode: B, genEnhanceSqlData: v } = fe(), [w, m] = se(), f = y(!1), F = ee({
67
+ onRegister: w,
68
+ title: oe(() => f != null && f.value ? "修改" : "新增"),
69
+ width: 800,
70
+ confirmLoading: !1,
71
+ onOk: H,
72
+ onCancel: m.closeModal
73
+ });
74
+ let k = {};
75
+ const { formSchemas: N } = ge(o), [$, { resetFields: O, setFieldsValue: V, validate: G }] = ue({
76
+ schemas: N,
77
+ showActionButtonGroup: !1
78
+ });
79
+ function j() {
80
+ S();
81
+ }
82
+ function T(n) {
83
+ return d(this, null, function* () {
84
+ var C;
85
+ f.value = n.isUpdate, k = A({}, (C = n.record) != null ? C : {}), m.openModal(), yield ne(), yield O(), V(k);
86
+ });
87
+ }
88
+ function z() {
89
+ T({ isUpdate: !1 });
90
+ }
91
+ function I(n) {
92
+ T({ isUpdate: !0, record: n });
93
+ }
94
+ function K() {
95
+ v(e.value, t.value);
96
+ }
97
+ function U() {
98
+ return d(this, null, function* () {
99
+ p(() => P(h.value));
100
+ });
101
+ }
102
+ function H() {
103
+ return d(this, null, function* () {
104
+ try {
105
+ F.confirmLoading = !0;
106
+ let n = yield G();
107
+ n = Object.assign({}, k, n), yield he(e.value, n, f.value), i(), m.closeModal();
108
+ } finally {
109
+ F.confirmLoading = !1;
110
+ }
111
+ });
112
+ }
113
+ function Q(n) {
114
+ return [
115
+ {
116
+ label: "编辑",
117
+ onClick: () => I(n)
118
+ }
119
+ ];
120
+ }
121
+ function J(n) {
122
+ return [
123
+ {
124
+ label: "删除",
125
+ popConfirm: {
126
+ title: "确定删除吗?",
127
+ placement: "left",
128
+ confirm: () => b(() => P([n.id]))
129
+ }
130
+ }
131
+ ];
132
+ }
133
+ return {
134
+ rowSelection: u,
135
+ selectedRowKeys: h,
136
+ aiTestMode: B,
137
+ onCancel: j,
138
+ onAdd: z,
139
+ onGenEnhanceSqlData: K,
140
+ onBatchDelete: U,
141
+ getTableAction: Q,
142
+ getDropDownAction: J,
143
+ formModalProps: F,
144
+ registerModal: M,
145
+ registerTable: c,
146
+ registerForm: $
147
+ };
148
+ },
149
+ computed: {
150
+ tableScroll() {
151
+ return {
152
+ y: window.innerHeight - 320
153
+ };
154
+ }
155
+ }
156
+ }), ye = {
157
+ key: 0,
158
+ style: { float: "left" }
159
+ };
160
+ function Me(e, t, o, _, p, b) {
161
+ const s = r("a-button"), c = r("a-icon"), i = r("a-menu-item"), u = r("a-menu"), h = r("a-dropdown"), M = r("TableAction"), S = r("BasicTable"), B = r("BasicForm"), v = r("a-spin"), w = r("BasicModal");
162
+ return D(), q(w, {
163
+ onRegister: e.registerModal,
164
+ title: "SQL增强",
165
+ width: 1200,
166
+ defaultFullscreen: "",
167
+ onCancel: e.onCancel
168
+ }, {
169
+ footer: a(() => [
170
+ l(s, { onClick: e.onCancel }, {
171
+ default: a(() => [
172
+ g("关闭")
173
+ ]),
174
+ _: 1
175
+ }, 8, ["onClick"]),
176
+ e.aiTestMode ? (D(), te("div", ye, [
177
+ l(s, { onClick: e.onGenEnhanceSqlData }, {
178
+ default: a(() => [
179
+ g("生成测试数据")
180
+ ]),
181
+ _: 1
182
+ }, 8, ["onClick"])
183
+ ])) : L("", !0)
184
+ ]),
185
+ default: a(() => [
186
+ l(S, {
187
+ onRegister: e.registerTable,
188
+ rowSelection: e.rowSelection
189
+ }, {
190
+ tableTitle: a(() => [
191
+ l(s, {
192
+ onClick: e.onAdd,
193
+ type: "primary",
194
+ preIcon: "ant-design:plus"
195
+ }, {
196
+ default: a(() => [
197
+ g("新增")
198
+ ]),
199
+ _: 1
200
+ }, 8, ["onClick"]),
201
+ e.selectedRowKeys.length > 0 ? (D(), q(h, { key: 0 }, {
202
+ overlay: a(() => [
203
+ l(u, null, {
204
+ default: a(() => [
205
+ l(i, {
206
+ key: "1",
207
+ onClick: e.onBatchDelete
208
+ }, {
209
+ default: a(() => [
210
+ l(c, { type: "delete" }),
211
+ g(" 删除 ")
212
+ ]),
213
+ _: 1
214
+ }, 8, ["onClick"])
215
+ ]),
216
+ _: 1
217
+ })
218
+ ]),
219
+ default: a(() => [
220
+ l(s, { style: { "margin-left": "8px" } }, {
221
+ default: a(() => [
222
+ g(" 批量操作 "),
223
+ l(c, { type: "down" })
224
+ ]),
225
+ _: 1
226
+ })
227
+ ]),
228
+ _: 1
229
+ })) : L("", !0)
230
+ ]),
231
+ action: a(({ record: m }) => [
232
+ l(M, {
233
+ actions: e.getTableAction(m),
234
+ dropDownActions: e.getDropDownAction(m)
235
+ }, null, 8, ["actions", "dropDownActions"])
236
+ ]),
237
+ _: 1
238
+ }, 8, ["onRegister", "rowSelection"]),
239
+ l(w, ae(le(e.formModalProps)), {
240
+ default: a(() => [
241
+ l(v, {
242
+ spinning: e.formModalProps.confirmLoading
243
+ }, {
244
+ default: a(() => [
245
+ l(B, { onRegister: e.registerForm }, null, 8, ["onRegister"])
246
+ ]),
247
+ _: 1
248
+ }, 8, ["spinning"])
249
+ ]),
250
+ _: 1
251
+ }, 16)
252
+ ]),
253
+ _: 1
254
+ }, 8, ["onRegister", "onCancel"]);
255
+ }
256
+ const ze = /* @__PURE__ */ we(Ce, [["render", Me]]);
257
+ export {
258
+ ze as default
259
+ };