@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
@@ -1,158 +0,0 @@
1
- var M = (d, l, i) => new Promise((e, m) => {
2
- var p = (o) => {
3
- try {
4
- n(i.next(o));
5
- } catch (r) {
6
- m(r);
7
- }
8
- }, a = (o) => {
9
- try {
10
- n(i.throw(o));
11
- } catch (r) {
12
- m(r);
13
- }
14
- }, n = (o) => o.done ? e(o.value) : Promise.resolve(o.value).then(p, a);
15
- n((i = i.apply(d, l)).next());
16
- });
17
- import { ref as u, reactive as x, resolveComponent as _, openBlock as C, createElementBlock as h, Fragment as v, createVNode as s, withCtx as c, createTextVNode as f, createElementVNode as y, normalizeStyle as F, renderList as B, toDisplayString as N } from "vue";
18
- import { defHttp as R } from "/@/utils/http/axios";
19
- import "/@/components/Form";
20
- import { BasicModal as T, useModalInner as z, useModal as G } from "/@/components/Modal";
21
- import { InfoCircleTwoTone as K } from "@ant-design/icons-vue";
22
- import S from "./CodeFileViewModal-9d4a5b5f.mjs";
23
- import { useMessage as H } from "/@/hooks/web/useMessage";
24
- import { downloadByData as I } from "/@/utils/file/download";
25
- import { _ as E } from "./index-173949bb.mjs";
26
- import "ant-design-vue";
27
- import "/@/components/jeecg/OnLine/JPopupOnlReport.vue";
28
- import "vue-router";
29
- const j = {
30
- name: "CodeFileListModal",
31
- components: {
32
- BasicModal: T,
33
- InfoCircleTwoTone: K,
34
- CodeFileViewModal: S
35
- },
36
- emits: ["register"],
37
- setup() {
38
- const { createMessage: d } = H(), l = u([]), i = window.innerHeight - 150, e = x({
39
- overflowY: "auto",
40
- maxHeight: i + "px"
41
- }), m = u(!1), p = u(""), a = u(""), [n, { closeModal: o }] = z((t) => M(this, null, function* () {
42
- l.value = t.codeList, p.value = t.tableName, a.value = t.pathKey;
43
- }));
44
- function r() {
45
- o();
46
- }
47
- function g() {
48
- let t = l.value;
49
- if (!t || t.length == 0) {
50
- d.warning("无代码!");
51
- return;
52
- }
53
- let V = t.join(",");
54
- return R.post(
55
- {
56
- url: "/online/cgform/api/downGenerateCode",
57
- params: {
58
- fileList: encodeURI(V),
59
- pathKey: a.value
60
- },
61
- responseType: "blob"
62
- },
63
- { isTransformResponse: !1 }
64
- ).then((w) => {
65
- if (!w || w.size == 0) {
66
- d.warning("导出代码失败!");
67
- return;
68
- }
69
- let b = "导到生成代码_" + p.value + "_" + (/* @__PURE__ */ new Date()).getTime() + ".zip";
70
- I(w, b, "application/zip");
71
- });
72
- }
73
- const [L, { openModal: k }] = G();
74
- function D() {
75
- let t = l.value;
76
- k(!0, {
77
- codeList: t,
78
- pathKey: a.value
79
- });
80
- }
81
- return {
82
- registerModal: n,
83
- registerCodeViewModal: L,
84
- divStyle: e,
85
- codeList: l,
86
- onDownloadGenerateCode: g,
87
- handleClose: r,
88
- handleView: D,
89
- loading: m
90
- };
91
- }
92
- }, U = /* @__PURE__ */ y("br", null, null, -1);
93
- function Y(d, l, i, e, m, p) {
94
- const a = _("info-circle-two-tone"), n = _("a-button"), o = _("BasicModal"), r = _("code-file-view-modal");
95
- return C(), h(v, null, [
96
- s(o, {
97
- onRegister: e.registerModal,
98
- width: 1200,
99
- defaultFullscreen: !1,
100
- canFullscreen: !1
101
- }, {
102
- title: c(() => [
103
- s(a),
104
- f(" 代码生成结果 ")
105
- ]),
106
- footer: c(() => [
107
- s(n, { onClick: e.handleClose }, {
108
- default: c(() => [
109
- f("关闭")
110
- ]),
111
- _: 1
112
- }, 8, ["onClick"]),
113
- s(n, {
114
- type: "primary",
115
- ghost: "",
116
- onClick: e.handleView
117
- }, {
118
- default: c(() => [
119
- f("在线预览")
120
- ]),
121
- _: 1
122
- }, 8, ["onClick"]),
123
- s(n, {
124
- type: "primary",
125
- onClick: e.onDownloadGenerateCode,
126
- loading: e.loading
127
- }, {
128
- default: c(() => [
129
- f("下载到本地")
130
- ]),
131
- _: 1
132
- }, 8, ["onClick", "loading"])
133
- ]),
134
- default: c(() => [
135
- y("div", {
136
- style: F(e.divStyle)
137
- }, [
138
- y("p", null, [
139
- (C(!0), h(v, null, B(e.codeList, (g) => (C(), h(v, null, [
140
- f(N(g), 1),
141
- U
142
- ], 64))), 256))
143
- ])
144
- ], 4)
145
- ]),
146
- _: 1
147
- }, 8, ["onRegister"]),
148
- s(r, {
149
- onRegister: e.registerCodeViewModal,
150
- onDownload: e.onDownloadGenerateCode,
151
- onClose: e.handleClose
152
- }, null, 8, ["onRegister", "onDownload", "onClose"])
153
- ], 64);
154
- }
155
- const te = /* @__PURE__ */ E(j, [["render", Y]]);
156
- export {
157
- te as default
158
- };
@@ -1,248 +0,0 @@
1
- var k = (l, h, u) => new Promise((w, m) => {
2
- var v = (i) => {
3
- try {
4
- s(u.next(i));
5
- } catch (r) {
6
- m(r);
7
- }
8
- }, _ = (i) => {
9
- try {
10
- s(u.throw(i));
11
- } catch (r) {
12
- m(r);
13
- }
14
- }, s = (i) => i.done ? w(i.value) : Promise.resolve(i.value).then(v, _);
15
- s((u = u.apply(l, h)).next());
16
- });
17
- import { defineComponent as P, ref as g, reactive as S, resolveComponent as f, openBlock as x, createBlock as D, withCtx as p, createVNode as C, createTextVNode as R, createElementVNode as W, normalizeStyle as j, createCommentVNode as q } from "vue";
18
- import { defHttp as z } from "/@/utils/http/axios";
19
- import { BasicModal as H, useModalInner as U } from "/@/components/Modal";
20
- import { InfoCircleTwoTone as Y } from "@ant-design/icons-vue";
21
- import { message as $ } from "ant-design-vue";
22
- import { JCodeEditor as Q } from "/@/components/Form";
23
- import { _ as X } from "./index-173949bb.mjs";
24
- import "/@/components/jeecg/OnLine/JPopupOnlReport.vue";
25
- import "/@/hooks/web/useMessage";
26
- import "vue-router";
27
- const Z = P({
28
- name: "CodeFileViewModal",
29
- components: {
30
- BasicModal: H,
31
- InfoCircleTwoTone: Y,
32
- JCodeEditor: Q
33
- },
34
- emits: ["download", "register", "close"],
35
- setup(l, { emit: h }) {
36
- const u = g([]), w = g(""), m = g([]), v = g(!1), _ = window.innerHeight - 160, s = g("java"), i = g("");
37
- let r = S({});
38
- const [T, { closeModal: b }] = U((t) => k(this, null, function* () {
39
- r = S({}), i.value = "", u.value = t.codeList, w.value = t.pathKey, y(), v.value = !0;
40
- }));
41
- function y() {
42
- let t = G(), o = t[0];
43
- E(o, t);
44
- let n = [];
45
- const e = function(d) {
46
- if (d.children) {
47
- let a = d.children;
48
- a.length == 1 ? e(a[0]) : a.length > 1 && n.push(d);
49
- }
50
- };
51
- e(o), m.value = n, setTimeout(() => {
52
- B(o);
53
- }, 300);
54
- }
55
- function B(t) {
56
- return k(this, null, function* () {
57
- const o = function(e) {
58
- if (e.isLeaf === !0)
59
- return e;
60
- if (e.children)
61
- return o(e.children[0]);
62
- };
63
- let n = o(t);
64
- if (n && n.isLeaf === !0) {
65
- let e = n.path;
66
- r[e] || (yield K(e)), s.value = A(e), i.value = r[e];
67
- }
68
- });
69
- }
70
- function E(t, o) {
71
- for (let n of o)
72
- t.key == n.pid && (t.children || (t.children = []), t.children.push(n), E(n, o));
73
- }
74
- function V(t, o) {
75
- let n = 0, e = "";
76
- for (; n <= o; )
77
- e += t[n], n++;
78
- return e;
79
- }
80
- function G() {
81
- let t = [], o = [], n = u.value;
82
- for (let e of n) {
83
- let d = e.replace(new RegExp("\\\\", "g"), "/").replace("生成成功:", "").trim();
84
- if (d) {
85
- let a = d.split("/");
86
- for (let c = 0; c < a.length; c++) {
87
- let M = a[c], L = V(a, c);
88
- if (M) {
89
- let F = {
90
- title: M,
91
- key: L
92
- };
93
- if (M != 0) {
94
- let N = V(a, c - 1);
95
- N && (F.pid = N);
96
- }
97
- c == a.length - 1 && (F.isLeaf = !0, F.path = d), (o.indexOf(L) < 0 || c == a.length - 1) && (t.push(F), o.push(L));
98
- }
99
- }
100
- }
101
- }
102
- return t;
103
- }
104
- function I() {
105
- b(), h("close");
106
- }
107
- function J() {
108
- h("download");
109
- }
110
- function A(t) {
111
- return t.endsWith("xml") ? "application/xml" : t.endsWith("sql") ? "text/x-sql" : t.endsWith("vue") ? "text/x-vue" : t.endsWith("ts") ? "text/typescript" : "text/x-java";
112
- }
113
- function O(t, o) {
114
- return k(this, null, function* () {
115
- let n = o.node.dataRef;
116
- if (n.isLeaf) {
117
- let e = n.path;
118
- r[e] || (yield K(e)), s.value = A(e), i.value = r[e];
119
- }
120
- });
121
- }
122
- function K(t) {
123
- return new Promise((o) => {
124
- let n = {
125
- path: encodeURI(t),
126
- pathKey: w.value
127
- };
128
- z.get({ url: "/online/cgform/api/codeView", params: n }, { isTransformResponse: !1 }).then((e) => {
129
- if (!e || e.size === 0) {
130
- $.warning("文件下载失败");
131
- return;
132
- } else if (e.message) {
133
- $.warning(e.message);
134
- return;
135
- }
136
- let d = new Blob([e]), a = new FileReader();
137
- a.readAsText(d, "utf8"), a.onload = function() {
138
- let c = this.result;
139
- r[t] = c, o(1);
140
- };
141
- });
142
- });
143
- }
144
- return {
145
- registerModal: T,
146
- codeList: u,
147
- onDownloadGenerateCode: J,
148
- handleClose: I,
149
- treeData: m,
150
- showCodeContent: O,
151
- activeCodeContent: i,
152
- expandStatus: v,
153
- height: _,
154
- language: s
155
- };
156
- }
157
- });
158
- function ee(l, h, u, w, m, v) {
159
- const _ = f("info-circle-two-tone"), s = f("a-directory-tree"), i = f("a-col"), r = f("JCodeEditor"), T = f("a-empty"), b = f("a-row"), y = f("a-button"), B = f("BasicModal");
160
- return x(), D(B, {
161
- onRegister: l.registerModal,
162
- okText: "",
163
- cancelText: "关闭",
164
- width: 1200,
165
- defaultFullscreen: !0,
166
- canFullscreen: !1,
167
- onOk: l.onDownloadGenerateCode
168
- }, {
169
- title: p(() => [
170
- C(_),
171
- R(" 代码在线预览 ")
172
- ]),
173
- footer: p(() => [
174
- C(y, { onClick: l.handleClose }, {
175
- default: p(() => [
176
- R("关闭")
177
- ]),
178
- _: 1
179
- }, 8, ["onClick"]),
180
- C(y, {
181
- type: "primary",
182
- onClick: l.onDownloadGenerateCode
183
- }, {
184
- default: p(() => [
185
- R("下载到本地")
186
- ]),
187
- _: 1
188
- }, 8, ["onClick"])
189
- ]),
190
- default: p(() => [
191
- W("div", null, [
192
- C(b, null, {
193
- default: p(() => [
194
- C(i, {
195
- span: 6,
196
- gutter: 3,
197
- style: { "border-right": "1px solid #eee" }
198
- }, {
199
- default: p(() => [
200
- W("div", {
201
- style: j({ height: l.height + "px", overflowY: "auto" })
202
- }, [
203
- l.treeData.length ? (x(), D(s, {
204
- key: 0,
205
- defaultExpandAll: !0,
206
- "tree-data": l.treeData,
207
- onSelect: l.showCodeContent
208
- }, null, 8, ["tree-data", "onSelect"])) : q("", !0)
209
- ], 4)
210
- ]),
211
- _: 1
212
- }),
213
- C(i, {
214
- span: 18,
215
- gutter: 3
216
- }, {
217
- default: p(() => [
218
- l.activeCodeContent ? (x(), D(r, {
219
- key: 0,
220
- value: l.activeCodeContent,
221
- "onUpdate:value": h[0] || (h[0] = (E) => l.activeCodeContent = E),
222
- theme: "idea",
223
- language: l.language,
224
- fullScreen: !1,
225
- lineNumbers: !0,
226
- height: l.height + "px",
227
- disabled: !0,
228
- "language-change": !0
229
- }, null, 8, ["value", "language", "height"])) : (x(), D(T, {
230
- key: 1,
231
- style: { "margin-top": "50px" },
232
- description: "请选择左侧文件,显示详细代码"
233
- }))
234
- ]),
235
- _: 1
236
- })
237
- ]),
238
- _: 1
239
- })
240
- ])
241
- ]),
242
- _: 1
243
- }, 8, ["onRegister", "onOk"]);
244
- }
245
- const fe = /* @__PURE__ */ X(Z, [["render", ee]]);
246
- export {
247
- fe as default
248
- };
@@ -1,238 +0,0 @@
1
- var T = (t, i, r) => new Promise((u, c) => {
2
- var y = (a) => {
3
- try {
4
- n(r.next(a));
5
- } catch (m) {
6
- c(m);
7
- }
8
- }, d = (a) => {
9
- try {
10
- n(r.throw(a));
11
- } catch (m) {
12
- c(m);
13
- }
14
- }, n = (a) => a.done ? u(a.value) : Promise.resolve(a.value).then(y, d);
15
- n((r = r.apply(t, i)).next());
16
- });
17
- import { defineComponent as le, ref as g, computed as O, reactive as w, nextTick as ne, resolveComponent as p, openBlock as B, createElementBlock as se, Fragment as re, createVNode as b, withCtx as F, createBlock as ie, mergeProps as ce, createCommentVNode as me } from "vue";
18
- import { defHttp as G } from "/@/utils/http/axios";
19
- import { BasicForm as pe, useForm as ue } from "/@/components/Form";
20
- import { BasicModal as de, useModalInner as fe, useModal as J } from "/@/components/Modal";
21
- import { JVxeTypes as P } from "/@/components/jeecg/JVxeTable/types";
22
- import { b as ge } from "./useSchemas-47e45edc.mjs";
23
- import { underLine2CamelCase as D } from "/@/utils/common/compUtils";
24
- import be from "./CodeFileListModal-0e26b7e0.mjs";
25
- import _e from "./FileSelectModal-38660e3c.mjs";
26
- import { message as Ce } from "ant-design-vue";
27
- import { useDesign as he } from "/@/hooks/web/useDesign";
28
- import { _ as ye } from "./index-173949bb.mjs";
29
- import "@ant-design/icons-vue";
30
- import "/@/hooks/web/usePermission";
31
- import "/@/utils/helper/validator";
32
- import "./CodeFileViewModal-9d4a5b5f.mjs";
33
- import "/@/components/jeecg/OnLine/JPopupOnlReport.vue";
34
- import "/@/hooks/web/useMessage";
35
- import "vue-router";
36
- import "/@/utils/file/download";
37
- const Me = le({
38
- name: "CodeGenerator",
39
- components: { BasicForm: pe, BasicModal: de, FileSelectModal: _e, CodeFileListModal: be },
40
- emits: ["register"],
41
- setup(t) {
42
- const i = "JEECG_ONL_PROJECT_PATH", r = "JEECG_ONL_PROJECT_NAME", u = g(!0), c = g(), y = O(() => u.value ? 800 : 1200), d = g("代码生成"), n = g(!1), { prefixCls: a } = he("code-generator-modal"), m = a, _ = g(""), M = w({
43
- projectPath: "",
44
- packageStyle: "service",
45
- jspMode: "",
46
- jformType: "1",
47
- tableName_tmp: "",
48
- ftlDescription: "",
49
- entityName: "",
50
- codeTypes: "controller,service,dao,mapper,entity,vue"
51
- }), o = w({}), S = g([]), N = w({
52
- dataSource: [],
53
- columns: [
54
- {
55
- title: "子表名",
56
- key: "tableName",
57
- type: P.input,
58
- disabled: !0,
59
- validateRules: [{ required: !0, message: "请输入${title}" }]
60
- },
61
- {
62
- title: "子表实体",
63
- key: "entityName",
64
- type: P.input,
65
- validateRules: [{ required: !0, message: "请输入${title}" }]
66
- },
67
- {
68
- title: "功能说明",
69
- key: "ftlDescription",
70
- type: P.input,
71
- validateRules: [{ required: !0, message: "请输入${title}" }]
72
- }
73
- ]
74
- }), j = O(() => N.dataSource.length > 0), { formSchemas: I } = ge(
75
- t,
76
- {
77
- onProjectPathChange: oe,
78
- onProjectPathSearch: X,
79
- jspModeOptions: S
80
- },
81
- u
82
- ), [V, { resetFields: $, setFieldsValue: L, validate: A }] = ue({
83
- schemas: I,
84
- showActionButtonGroup: !1,
85
- labelAlign: "right"
86
- }), [H, { closeModal: R }] = fe((e) => T(this, null, function* () {
87
- yield $(), _.value = e.code, n.value = !1, N.dataSource = [], S.value = [], te(), Object.assign(o, M), q();
88
- }));
89
- function q() {
90
- return T(this, null, function* () {
91
- let { main: e, sub: l, jspModeList: f, projectPath: s } = yield G.get({
92
- url: "/online/cgform/head/tableInfo",
93
- params: { code: _.value }
94
- }), C = [];
95
- for (let h of f) {
96
- const { code: k, note: ae } = h;
97
- k == "many" || C.push({
98
- label: ae,
99
- value: k
100
- });
101
- }
102
- S.value = C, e.isTree == "Y" ? o.jspMode = "tree" : o.jspMode = C[0].value, u.value = e.tableType == 1, d.value = "代码生成【" + e.tableName + "】", o.projectPath || (o.projectPath = s, window.localStorage.setItem(i, s));
103
- const v = localStorage.getItem(r);
104
- v && (o.entityPackage = v), o.jformType = e.tableType + "", o.tableName_tmp = e.tableName, o.ftlDescription = e.tableTxt;
105
- let E = D(e.tableName);
106
- o.entityName = E.substring(0, 1).toUpperCase() + E.substring(1), yield ne(), L(o), l && l.length > 0 && (N.dataSource = l.map((h) => ({
107
- tableName: h.tableName,
108
- entityName: ee(h.tableName),
109
- ftlDescription: h.tableTxt
110
- })));
111
- });
112
- }
113
- const [K, { openModal: U }] = J();
114
- function W() {
115
- return T(this, null, function* () {
116
- try {
117
- const e = yield A();
118
- let l = Object.assign({}, e, { code: _.value, tableName: e.tableName_tmp });
119
- if (j.value) {
120
- if (yield c.value.validateTable())
121
- return;
122
- l.subList = c.value.getTableData();
123
- }
124
- n.value = !0;
125
- let f = yield x(l);
126
- U(!0, {
127
- codeList: f.codeList,
128
- pathKey: f.pathKey,
129
- tableName: e.tableName_tmp
130
- }), R(), localStorage.setItem(r, e.entityPackage);
131
- } catch (e) {
132
- } finally {
133
- n.value = !1;
134
- }
135
- });
136
- }
137
- function x(e) {
138
- return new Promise((l, f) => {
139
- G.post({ url: "/online/cgform/api/codeGenerate", params: e }, { isTransformResponse: !1 }).then((s) => {
140
- if (s.success) {
141
- let C = s.result, v = s.message;
142
- l({
143
- codeList: C,
144
- pathKey: v
145
- });
146
- } else
147
- Ce.error(s.message), f(s.message);
148
- });
149
- });
150
- }
151
- function z() {
152
- R();
153
- }
154
- const [Y, Q] = J();
155
- function X() {
156
- Q.openModal(!0, {});
157
- }
158
- function Z(e) {
159
- window.localStorage.setItem(i, e), L({ projectPath: e });
160
- }
161
- function ee(e) {
162
- let l = D(e);
163
- return l.substring(0, 1).toUpperCase() + l.substring(1);
164
- }
165
- function te() {
166
- let e = window.localStorage.getItem(i);
167
- e && (M.projectPath = e);
168
- }
169
- function oe(e) {
170
- e.target.value && window.localStorage.setItem(i, e.target.value);
171
- }
172
- return {
173
- title: d,
174
- modalWidth: y,
175
- confirmLoading: n,
176
- subTable: N,
177
- showSubTable: j,
178
- onSubmit: W,
179
- onCancel: z,
180
- onFileSelect: Z,
181
- registerFileSelectModal: Y,
182
- subTableRef: c,
183
- registerForm: V,
184
- registerModal: H,
185
- registerCodeFileListModal: K,
186
- wrapClassName: m
187
- };
188
- }
189
- });
190
- function Ne(t, i, r, u, c, y) {
191
- const d = p("BasicForm"), n = p("JVxeTable"), a = p("a-card"), m = p("a-spin"), _ = p("BasicModal"), M = p("FileSelectModal"), o = p("code-file-list-modal");
192
- return B(), se(re, null, [
193
- b(_, {
194
- onRegister: t.registerModal,
195
- title: t.title,
196
- width: t.modalWidth,
197
- confirmLoading: t.confirmLoading,
198
- okText: "开始生成",
199
- cancelText: "取消",
200
- onOk: t.onSubmit,
201
- onCancel: t.onCancel,
202
- wrapClassName: t.wrapClassName
203
- }, {
204
- default: F(() => [
205
- b(m, { spinning: t.confirmLoading }, {
206
- default: F(() => [
207
- b(d, { onRegister: t.registerForm }, null, 8, ["onRegister"]),
208
- t.showSubTable ? (B(), ie(a, {
209
- key: 0,
210
- title: "子表信息",
211
- size: "small"
212
- }, {
213
- default: F(() => [
214
- b(n, ce({
215
- ref: "subTableRef",
216
- rowNumber: "",
217
- maxHeight: 580
218
- }, t.subTable), null, 16)
219
- ]),
220
- _: 1
221
- })) : me("", !0)
222
- ]),
223
- _: 1
224
- }, 8, ["spinning"])
225
- ]),
226
- _: 1
227
- }, 8, ["onRegister", "title", "width", "confirmLoading", "onOk", "onCancel", "wrapClassName"]),
228
- b(M, {
229
- onRegister: t.registerFileSelectModal,
230
- onSelect: t.onFileSelect
231
- }, null, 8, ["onRegister", "onSelect"]),
232
- b(o, { onRegister: t.registerCodeFileListModal }, null, 8, ["onRegister"])
233
- ], 64);
234
- }
235
- const qe = /* @__PURE__ */ ye(Me, [["render", Ne]]);
236
- export {
237
- qe as default
238
- };