@jeecg/online 3.8.2-beta → 3.9.0-beta

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (114) hide show
  1. package/{AccountLoginForm-79fa7b01.mjs → AccountLoginForm-cbc75a49.mjs} +1 -1
  2. package/{AiModal-942b59ec.mjs → AiModal-5bec5218.mjs} +1 -1
  3. package/{AppForgetPassword-d762e5b3.mjs → AppForgetPassword-dbc8377e.mjs} +2 -2
  4. package/{AppLogin-41372985.mjs → AppLogin-786949d3.mjs} +9 -9
  5. package/{AppLoginHeader-3b6fa33d.mjs → AppLoginHeader-37034b2f.mjs} +1 -1
  6. package/{AppNameEmail-8dfbad62.mjs → AppNameEmail-7c6a1406.mjs} +2 -2
  7. package/{AppRegister-433c54db.mjs → AppRegister-29a00a9d.mjs} +3 -3
  8. package/{AppTenant-e49dfa9b.mjs → AppTenant-92890383.mjs} +2 -2
  9. package/{AppThirdForm-7b75b4fc.mjs → AppThirdForm-760064e5.mjs} +1 -1
  10. package/{AuthButtonConfig-a0f59cb5.mjs → AuthButtonConfig-78180aec.mjs} +1 -1
  11. package/{AuthButtonTree-f0a5cc0b.mjs → AuthButtonTree-62c8e70c.mjs} +1 -1
  12. package/{AuthDataConfig-647c4a27.mjs → AuthDataConfig-c978c469.mjs} +1 -1
  13. package/{AuthDataTree-b80a3ea5.mjs → AuthDataTree-0647a06c.mjs} +1 -1
  14. package/{AuthFieldConfig-d36a1b2d.mjs → AuthFieldConfig-558283bc.mjs} +1 -1
  15. package/{AuthFieldTree-dba6af79.mjs → AuthFieldTree-106db4e2.mjs} +1 -1
  16. package/{AuthManagerDrawer-5acbd451.mjs → AuthManagerDrawer-ec5190d2.mjs} +4 -4
  17. package/{AuthSetterModal-95b5f616.mjs → AuthSetterModal-90a76886.mjs} +7 -7
  18. package/{CgformAddressModal-5d889870.mjs → CgformAddressModal-690b8940.mjs} +1 -1
  19. package/{CgformCopyList-cc5f76cd.mjs → CgformCopyList-af9c99a4.mjs} +40 -39
  20. package/{CgformModal-cebc698b.mjs → CgformModal-b04a492a.mjs} +10 -10
  21. package/{CgreportAigcModal-d1e62385.mjs → CgreportAigcModal-8fdcbd31.mjs} +1 -1
  22. package/{CgreportModal-2e4421e6.mjs → CgreportModal-da62724c.mjs} +143 -139
  23. package/{CheckDictTable-8fb7299c.mjs → CheckDictTable-7320189b.mjs} +1 -1
  24. package/{CodeFileListModal-25fad54f.mjs → CodeFileListModal-e5ec210d.mjs} +2 -2
  25. package/CodeFileViewModal-09053f3a.mjs +269 -0
  26. package/CodeGeneratorModal-aba790e3.mjs +298 -0
  27. package/{CustomButtonList-26490688.mjs → CustomButtonList-704e6d1c.mjs} +1 -1
  28. package/{DBAttributeTable-dea8ab11.mjs → DBAttributeTable-4a65c897.mjs} +40 -39
  29. package/{DbToOnlineModal-60317a16.mjs → DbToOnlineModal-cc398c70.mjs} +1 -1
  30. package/{DetailForm-b92a5e9d.mjs → DetailForm-a2bf8c33.mjs} +165 -153
  31. package/{DropMenuItem-82213be6.mjs → DropMenuItem-884f9464.mjs} +1 -1
  32. package/{EnhanceJavaModal-6ebefc8b.mjs → EnhanceJavaModal-fe8d475d.mjs} +1 -1
  33. package/{EnhanceJsHistory-8d9b86ca.mjs → EnhanceJsHistory-95ca545c.mjs} +1 -1
  34. package/{EnhanceJsModal-9439e6f8.mjs → EnhanceJsModal-742b0ee2.mjs} +2 -2
  35. package/{EnhanceSqlModal-ea4592bf.mjs → EnhanceSqlModal-6e36bc4f.mjs} +1 -1
  36. package/{ExtendConfigModal-f509db46.mjs → ExtendConfigModal-74d657c7.mjs} +1 -1
  37. package/{FieldExtendJsonModal-73bab5b5.mjs → FieldExtendJsonModal-fe7f7902.mjs} +2 -2
  38. package/{FileSelectModal-49d6dade.mjs → FileSelectModal-cf41604b.mjs} +1 -1
  39. package/{ForeignKeyTable-330963c1.mjs → ForeignKeyTable-4a59ded1.mjs} +1 -1
  40. package/{IndexTable-c0478faa.mjs → IndexTable-87d67830.mjs} +1 -1
  41. package/{JModalTip-b1d19eaa.mjs → JModalTip-5401f43d.mjs} +1 -1
  42. package/{JOnlineSearchSelect-97662e1b.mjs → JOnlineSearchSelect-d8c57973.mjs} +1 -1
  43. package/{LeftDepart-4b1003f0.mjs → LeftDepart-463bf432.mjs} +1 -1
  44. package/{LeftRole-8486ba4f.mjs → LeftRole-1631d3d4.mjs} +1 -1
  45. package/{LeftUser-09894a2f.mjs → LeftUser-5774a5db.mjs} +1 -1
  46. package/{LinkTableConfigModal-cd0980e9.mjs → LinkTableConfigModal-1bab1423.mjs} +1 -1
  47. package/{LinkTableFieldConfigModal-f4106ab7.mjs → LinkTableFieldConfigModal-49470140.mjs} +1 -1
  48. package/{LinkTableListPiece-4187ad7d.mjs → LinkTableListPiece-47f4286c.mjs} +1 -1
  49. package/{ModalFormDemo-4ec79769.mjs → ModalFormDemo-dbd0aa28.mjs} +1 -1
  50. package/OnlCgformErpList-35ad1d6e.mjs +528 -0
  51. package/{OnlCgformErpSubTable-421e2051.mjs → OnlCgformErpSubTable-5093d438.mjs} +43 -41
  52. package/{OnlCgformInnerSubTable-9616ebf2.mjs → OnlCgformInnerSubTable-f1dc90db.mjs} +106 -102
  53. package/{OnlCgformInnerTableList-5ed887e4.mjs → OnlCgformInnerTableList-1b82a7da.mjs} +21 -19
  54. package/{OnlCgformTabList-c03a1d0a.mjs → OnlCgformTabList-d66d1261.mjs} +21 -19
  55. package/{OnlineAutoList-e5a61211.mjs → OnlineAutoList-fbba2a52.mjs} +20 -18
  56. package/{OnlineAutoModal-38f2d522.mjs → OnlineAutoModal-68909692.mjs} +10 -9
  57. package/{OnlineAutoTreeList-16fa962f.mjs → OnlineAutoTreeList-5153f09d.mjs} +20 -18
  58. package/OnlineCustomModal-b5f8c799.mjs +247 -0
  59. package/{OnlineDetailModal-79085ba8.mjs → OnlineDetailModal-ac078a9a.mjs} +45 -43
  60. package/OnlineForm-20604e4f.mjs +1080 -0
  61. package/OnlineFormDetail-719118b6.mjs +350 -0
  62. package/{OnlineFormUrlAdd-2e05ba0f.mjs → OnlineFormUrlAdd-5b675f48.mjs} +12 -11
  63. package/{OnlineFormUrlDetail-06b2d9e6.mjs → OnlineFormUrlDetail-91156bf2.mjs} +15 -13
  64. package/{OnlineFormUrlEdit-77ac4bba.mjs → OnlineFormUrlEdit-fb810de6.mjs} +12 -11
  65. package/{OnlineFormUrlSuccess-cb3f7be4.mjs → OnlineFormUrlSuccess-302ecb21.mjs} +1 -1
  66. package/{OnlineQueryForm-528af6ed.mjs → OnlineQueryForm-5eeceb51.mjs} +120 -120
  67. package/{OnlineSearchFormItem-51eefaf4.mjs → OnlineSearchFormItem-5536a1a6.mjs} +2 -2
  68. package/{OnlineSelectCascade-b218691c.mjs → OnlineSelectCascade-180e8c9a.mjs} +61 -55
  69. package/{OnlineSubFormDetail-a1b7f33f.mjs → OnlineSubFormDetail-4d64e7be.mjs} +48 -44
  70. package/{OnlineTabAutoModal-1c7c4ed2.mjs → OnlineTabAutoModal-c127ed50.mjs} +9 -8
  71. package/{OnlineTabDetailModal-7c45e727.mjs → OnlineTabDetailModal-e4e9f7e3.mjs} +39 -37
  72. package/{OnlineTabForm-9682158f.mjs → OnlineTabForm-827e7089.mjs} +25 -24
  73. package/OnlineTabFormDetail-0f96377e.mjs +329 -0
  74. package/{PageAttributeTable-21314341.mjs → PageAttributeTable-5703e2f1.mjs} +5 -5
  75. package/{PhoneLoginForm-c3c16f16.mjs → PhoneLoginForm-15dc68ed.mjs} +18 -18
  76. package/ProcessOnlineForm-1fcbe0af.mjs +219 -0
  77. package/{QueryTable-413d1366.mjs → QueryTable-26c9ee22.mjs} +1 -1
  78. package/{SetSwitchOptions-82fd6265.mjs → SetSwitchOptions-a3428177.mjs} +1 -1
  79. package/{ShareAddView-a2dba2ef.mjs → ShareAddView-0512e884.mjs} +23 -21
  80. package/{ShareEditView-ecd590dc.mjs → ShareEditView-b89dfbd3.mjs} +23 -21
  81. package/{ShareView-84f333e7.mjs → ShareView-faf1a0ab.mjs} +21 -19
  82. package/{ShareView.vue_vue_type_script_setup_true_lang-9a3a259e.mjs → ShareView.vue_vue_type_script_setup_true_lang-d1597c0d.mjs} +2 -2
  83. package/{SingleView-d4f29169.mjs → SingleView-21d3a558.mjs} +16 -14
  84. package/{SingleView.vue_vue_type_style_index_0_lang-40ea7e64.mjs → SingleView.vue_vue_type_style_index_0_lang-914483d0.mjs} +4 -4
  85. package/{SuperQuery-290f5080.mjs → SuperQuery-c95f86ee.mjs} +41 -40
  86. package/TaskOpinionList-73ecb3c8.mjs +101 -0
  87. package/{aiModal-6e338c79.mjs → aiModal-b44fa135.mjs} +2 -2
  88. package/dayjs.min-eea532a3.mjs +301 -0
  89. package/{index-9bebbfe5.mjs → index-02f6dc7d.mjs} +2 -2
  90. package/{index-7890e2b4.mjs → index-22a99f2e.mjs} +1 -1
  91. package/{index-7bab525f.mjs → index-26940246.mjs} +3 -3
  92. package/{index-254a82b7.mjs → index-30da2fc0.mjs} +130 -123
  93. package/{index-c5737cbb.mjs → index-391aec04.mjs} +4 -4
  94. package/index-94b6319e.mjs +57 -0
  95. package/{index-bc0d747e.mjs → index-abbfd327.mjs} +2 -2
  96. package/main.index.js +1 -1
  97. package/package.json +1 -1
  98. package/style.css +1 -1
  99. package/useCgformList-aaa30c8c.mjs +410 -0
  100. package/useExtendComponent-ad499dff.mjs +4164 -0
  101. package/{useListButton-7f9674a0.mjs → useListButton-308458cd.mjs} +21 -21
  102. package/CodeFileViewModal-12299ab5.mjs +0 -253
  103. package/CodeGeneratorModal-791b1695.mjs +0 -281
  104. package/OnlCgformErpList-63089149.mjs +0 -498
  105. package/OnlineCustomModal-7e31297e.mjs +0 -232
  106. package/OnlineForm-0438f4bf.mjs +0 -1012
  107. package/OnlineFormDetail-76d243ed.mjs +0 -348
  108. package/OnlineTabFormDetail-b8650175.mjs +0 -327
  109. package/ProcessOnlineForm-d6113dec.mjs +0 -188
  110. package/README.md +0 -26
  111. package/index-30c0a14f.mjs +0 -57
  112. package/useCgformList-52631580.mjs +0 -395
  113. package/useExtendComponent-d1db211d.mjs +0 -4460
  114. /package/{OnlineForm.vue_vue_type_style_index_0_scoped_3f26e7bd_lang-4ed993c7.mjs → OnlineForm.vue_vue_type_style_index_0_scoped_60bd1850_lang-4ed993c7.mjs} +0 -0
@@ -2,7 +2,7 @@ var Re = Object.defineProperty, ke = Object.defineProperties;
2
2
  var _e = Object.getOwnPropertyDescriptors;
3
3
  var we = Object.getOwnPropertySymbols;
4
4
  var Be = Object.prototype.hasOwnProperty, Fe = Object.prototype.propertyIsEnumerable;
5
- var ve = (l, m, s) => m in l ? Re(l, m, { enumerable: !0, configurable: !0, writable: !0, value: s }) : l[m] = s, I = (l, m) => {
5
+ var ve = (l, m, s) => m in l ? Re(l, m, { enumerable: !0, configurable: !0, writable: !0, value: s }) : l[m] = s, M = (l, m) => {
6
6
  for (var s in m || (m = {}))
7
7
  Be.call(m, s) && ve(l, s, m[s]);
8
8
  if (we)
@@ -26,8 +26,8 @@ var V = (l, m, s) => new Promise((B, R) => {
26
26
  }, v = (D) => D.done ? B(D.value) : Promise.resolve(D.value).then(k, g);
27
27
  v((s = s.apply(l, m)).next());
28
28
  });
29
- import { E as ae, s as Me } from "./useExtendComponent-d1db211d.mjs";
30
- import { useRoute as Ie } from "vue-router";
29
+ import { E as ae, r as Ie } from "./useExtendComponent-ad499dff.mjs";
30
+ import { useRoute as Me } from "vue-router";
31
31
  import { router as De } from "/@/router";
32
32
  import { ref as w, provide as Ce, onBeforeUnmount as Ne, toRaw as C, nextTick as Se, reactive as ne, computed as $e } from "vue";
33
33
  import { defHttp as _ } from "/@/utils/http/axios";
@@ -114,12 +114,12 @@ function yt(l = {}) {
114
114
  var te;
115
115
  const m = (te = l.code) != null ? te : "", s = w(m);
116
116
  Ce("tableId", s);
117
- const B = Ie(), R = w(), k = w(), g = w(!1), v = w([]), D = w(!0), O = w(), A = je(), ie = Ke(), h = w(!1), S = w(!1);
117
+ const B = Me(), R = w(), k = w(), g = w(!1), v = w([]), D = w(!0), O = w(), A = je(), ie = Ke(), h = w(!1), S = w(!1);
118
118
  let P = {};
119
119
  const F = {
120
120
  execButtonEnhance: function(r, n) {
121
121
  if (i[ae][r])
122
- if (Me === r)
122
+ if (Ie === r)
123
123
  b(r);
124
124
  else {
125
125
  let u = C(n);
@@ -189,7 +189,7 @@ function yt(l = {}) {
189
189
  }
190
190
  function q(r = "") {
191
191
  let n;
192
- return r == le ? n = `${i.onlineUrl.getErpColumns}${s.value}` : n = `${i.onlineUrl.getColumns}${s.value}`, new Promise((u, f) => {
192
+ return r == le ? n = `${i.onlineUrl.getErpColumns}${s.value}` : n = `${i.onlineUrl.getColumns}${s.value}`, i.isInnerSubTable === !0 && (n = n + "?tabletype=3"), new Promise((u, f) => {
193
193
  _.get(
194
194
  {
195
195
  url: n
@@ -210,7 +210,7 @@ function yt(l = {}) {
210
210
  o === c && (g.value.current = Math.ceil((t - n) / a));
211
211
  }
212
212
  let p = X(), e = `${i.onlineUrl.getData}${s.value}`;
213
- if (i.isTree() === !0 ? e = `${i.onlineUrl.getTreeData}${s.value}` : i.isInnerSubTable === !0 && (e = `${i.onlineUrl.getData}${i.innerSubTableId}`, p = { pageSize: -521 }, i.innerSubTableFk && i.mTableSelectedRcordId && (p[i.innerSubTableFk] = i.mTableSelectedRcordId)), i.isErpSubTable === !0) {
213
+ if (i.isTree() === !0 ? e = `${i.onlineUrl.getTreeData}${s.value}` : i.isInnerSubTable === !0 && (e = `${i.onlineUrl.getData}${i.innerSubTableId}`, p = { pageSize: -521 }, i.innerSubTableFk && i.mTableSelectedRcordId && (p[i.innerSubTableFk] = i.mTableSelectedRcordId), e = e + "?tabletype=3"), i.isErpSubTable === !0) {
214
214
  if (i.foreignKeyValue == null)
215
215
  return;
216
216
  p[i.foreignKeyField] = i.foreignKeyValue, p.tabletype = 3, delete p.hasQuery;
@@ -244,7 +244,7 @@ function yt(l = {}) {
244
244
  de(v.value);
245
245
  })) : (v.value = [], Se(() => {
246
246
  v.value = r.records;
247
- })), n = Number(r.total)) : v.value = [], g.value && (g.value = re(I({}, g.value), { total: n }));
247
+ })), n = Number(r.total)) : v.value = [], g.value && (g.value = re(M({}, g.value), { total: n }));
248
248
  }
249
249
  function G(r, n, u) {
250
250
  u && u.order ? (i.sortField = u.field, i.sortType = u.order == "ascend" ? "asc" : "desc") : (i.sortField = "id", i.sortType = "asc"), g.value && (g.value = r), $();
@@ -254,7 +254,7 @@ function yt(l = {}) {
254
254
  let { acceptHrefParams: n, queryParam: u, superQuery: f, currentPage: p, pageSize: e } = i;
255
255
  if (N(), u ? R.value && R.value.initDefaultValues(u, n) : i.queryParam = {}, f ? k.value && k.value.initDefaultValues(f) : i.superQuery = { params: "", matchType: "" }, r.paginationFlag == "Y") {
256
256
  let t = Ee.pageSizeOptions;
257
- l.themeTemplate == le && (t = ["5", "10", "30"]), g.value = re(I({}, Ee), { current: p, pageSize: e, pageSizeOptions: t });
257
+ l.themeTemplate == le && (t = ["5", "10", "30"]), g.value = re(M({}, Ee), { current: p, pageSize: e, pageSizeOptions: t });
258
258
  } else
259
259
  g.value = !1;
260
260
  }
@@ -274,7 +274,7 @@ function yt(l = {}) {
274
274
  let Y = w(!1);
275
275
  function pe() {
276
276
  return V(this, arguments, function* (r = {}) {
277
- g.value && (g.value = re(I({}, g.value), { current: r.mode == "search" || !g.value.current ? 1 : g.value.current })), l.themeTemplate !== le && i.clearSelectedRow(), yield $();
277
+ g.value && (g.value = re(M({}, g.value), { current: r.mode == "search" || !g.value.current ? 1 : g.value.current })), l.themeTemplate !== le && i.clearSelectedRow(), yield $();
278
278
  });
279
279
  }
280
280
  function j(r) {
@@ -312,12 +312,12 @@ function yt(l = {}) {
312
312
  Q == null && (Q = []), Q.push(E), d.set(T, Q);
313
313
  }
314
314
  }
315
- let y = d, M = (E) => {
315
+ let y = d, I = (E) => {
316
316
  E && E.forEach((T) => {
317
- n.includes(T.id) && (T.children = j(y.get(T.id)), M(T.children));
317
+ n.includes(T.id) && (T.children = j(y.get(T.id)), I(T.children));
318
318
  });
319
319
  };
320
- M(r);
320
+ I(r);
321
321
  }
322
322
  }).catch(() => {
323
323
  let o = "loadDataByExpandedRows请求列表数据异常!";
@@ -336,7 +336,7 @@ function yt(l = {}) {
336
336
  let f = u + "@", p = [];
337
337
  if (r.length > 0)
338
338
  for (let t of r) {
339
- let a = I({}, t), o = a.field;
339
+ let a = M({}, t), o = a.field;
340
340
  o.startsWith(f) && (a.field = o.replace(f, "")), p.push(a);
341
341
  }
342
342
  let e = p.length > 0 ? JSON.stringify(p) : "";
@@ -393,7 +393,7 @@ function yt(l = {}) {
393
393
  h.value = f;
394
394
  });
395
395
  }
396
- return ye(), I({
396
+ return ye(), M({
397
397
  ID: s,
398
398
  onlineQueryFormOuter: R,
399
399
  superQueryButtonRef: k,
@@ -543,11 +543,11 @@ function St(l, m, s = {}) {
543
543
  !y || y == "1" ? a.push(Y(e)) : a.push(pe(e));
544
544
  }
545
545
  if (m.value) {
546
- let { reportPrintShow: y, reportPrintUrl: M } = m.value;
547
- y && M && a.push({
546
+ let { reportPrintShow: y, reportPrintUrl: I } = m.value;
547
+ y && I && a.push({
548
548
  label: "打印",
549
549
  onClick() {
550
- let E = M, T = e.id, Q = Ae();
550
+ let E = I, T = e.id, Q = Ae();
551
551
  qe(E, T, Q);
552
552
  }
553
553
  });
@@ -592,9 +592,9 @@ function St(l, m, s = {}) {
592
592
  formUrlMobile: "check/onlineForm/detail"
593
593
  }
594
594
  }, d = { isTransformResponse: !1 };
595
- return new Promise((y, M) => {
595
+ return new Promise((y, I) => {
596
596
  _.post(c, d).then((E) => {
597
- E.success ? (y(E), h.success(E.message)) : (M(), h.warning(E.message));
597
+ E.success ? (y(E), h.success(E.message)) : (I(), h.warning(E.message));
598
598
  });
599
599
  });
600
600
  }
@@ -703,7 +703,7 @@ function St(l, m, s = {}) {
703
703
  l.isErpSubTable === !0 && (a = { tabletype: 3 }, l.foreignKeyField && l.foreignKeyValue && (e[l.foreignKeyField] = l.foreignKeyValue));
704
704
  let o = JSON.stringify(Oe(e)), c = `${l.onlineUrl.exportXls}${l.ID}`;
705
705
  const d = l.description;
706
- return r(d, c, I({ paramsStr: o }, a));
706
+ return r(d, c, M({ paramsStr: o }, a));
707
707
  }
708
708
  function u(e, t) {
709
709
  const a = [];
@@ -1,253 +0,0 @@
1
- var F = (o, r, u) => new Promise((w, g) => {
2
- var v = (i) => {
3
- try {
4
- d(u.next(i));
5
- } catch (s) {
6
- g(s);
7
- }
8
- }, y = (i) => {
9
- try {
10
- d(u.throw(i));
11
- } catch (s) {
12
- g(s);
13
- }
14
- }, d = (i) => i.done ? w(i.value) : Promise.resolve(i.value).then(v, y);
15
- d((u = u.apply(o, r)).next());
16
- });
17
- import { defineComponent as P, ref as h, reactive as H, resolveComponent as p, openBlock as k, createBlock as x, withCtx as m, createVNode as C, createTextVNode as V, createElementVNode as W, normalizeStyle as j, createCommentVNode as q } from "vue";
18
- import { defHttp as z } from "/@/utils/http/axios";
19
- import { BasicModal as U, useModalInner as Y } from "/@/components/Modal";
20
- import { InfoCircleTwoTone as Q } from "@ant-design/icons-vue";
21
- import { message as $ } from "ant-design-vue";
22
- import { JCodeEditor as X } from "/@/components/Form";
23
- import { useDesign as Z } from "/@/hooks/web/useDesign";
24
- import { _ as ee } from "./index-30c0a14f.mjs";
25
- import "/@/components/jeecg/OnLine/JPopupOnlReport.vue";
26
- import "/@/hooks/web/useMessage";
27
- import "vue-router";
28
- const te = P({
29
- name: "CodeFileViewModal",
30
- components: {
31
- BasicModal: U,
32
- InfoCircleTwoTone: Q,
33
- JCodeEditor: X
34
- },
35
- emits: ["download", "register", "close"],
36
- setup(o, { emit: r }) {
37
- const u = h([]), w = h(""), g = h([]), v = h(!1), y = window.innerHeight - 142, d = h("java"), i = h("");
38
- let s = H({});
39
- const [D, { closeModal: M }] = Y((t) => F(this, null, function* () {
40
- s = H({}), i.value = "", u.value = t.codeList, w.value = t.pathKey, T(), v.value = !0;
41
- })), { prefixCls: _ } = Z("online-codeFileViewModal");
42
- function T() {
43
- let t = G(), l = t[0];
44
- N(l, t);
45
- let n = [];
46
- const e = function(c) {
47
- if (c.children) {
48
- let a = c.children;
49
- a.length == 1 ? e(a[0]) : a.length > 1 && n.push(c);
50
- }
51
- };
52
- e(l), g.value = n, setTimeout(() => {
53
- b(l);
54
- }, 300);
55
- }
56
- function b(t) {
57
- return F(this, null, function* () {
58
- const l = function(e) {
59
- if (e.isLeaf === !0)
60
- return e;
61
- if (e.children)
62
- return l(e.children[0]);
63
- };
64
- let n = l(t);
65
- if (n && n.isLeaf === !0) {
66
- let e = n.path;
67
- s[e] || (yield K(e)), d.value = A(e), i.value = s[e];
68
- }
69
- });
70
- }
71
- function N(t, l) {
72
- for (let n of l)
73
- t.key == n.pid && (t.children || (t.children = []), t.children.push(n), N(n, l));
74
- }
75
- function R(t, l) {
76
- let n = 0, e = "";
77
- for (; n <= l; )
78
- e += t[n], n++;
79
- return e;
80
- }
81
- function G() {
82
- let t = [], l = [], n = u.value;
83
- for (let e of n) {
84
- let c = e.replace(new RegExp("\\\\", "g"), "/").replace("生成成功:", "").trim();
85
- if (c) {
86
- let a = c.split("/");
87
- for (let f = 0; f < a.length; f++) {
88
- let B = a[f], L = R(a, f);
89
- if (B) {
90
- let E = {
91
- title: B,
92
- key: L
93
- };
94
- if (B != 0) {
95
- let S = R(a, f - 1);
96
- S && (E.pid = S);
97
- }
98
- f == a.length - 1 && (E.isLeaf = !0, E.path = c), (l.indexOf(L) < 0 || f == a.length - 1) && (t.push(E), l.push(L));
99
- }
100
- }
101
- }
102
- }
103
- return t;
104
- }
105
- function I() {
106
- M(), r("close");
107
- }
108
- function J() {
109
- r("download");
110
- }
111
- function A(t) {
112
- 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";
113
- }
114
- function O(t, l) {
115
- return F(this, null, function* () {
116
- let n = l.node.dataRef;
117
- if (n.isLeaf) {
118
- let e = n.path;
119
- s[e] || (yield K(e)), d.value = A(e), i.value = s[e];
120
- }
121
- });
122
- }
123
- function K(t) {
124
- return new Promise((l) => {
125
- let n = {
126
- path: encodeURI(t),
127
- pathKey: w.value
128
- };
129
- z.get({ url: "/online/cgform/api/codeView", params: n }, { isTransformResponse: !1 }).then((e) => {
130
- if (!e || e.size === 0) {
131
- $.warning("文件下载失败");
132
- return;
133
- } else if (e.message) {
134
- $.warning(e.message);
135
- return;
136
- }
137
- let c = new Blob([e]), a = new FileReader();
138
- a.readAsText(c, "utf8"), a.onload = function() {
139
- let f = this.result;
140
- s[t] = f, l(1);
141
- };
142
- });
143
- });
144
- }
145
- return {
146
- registerModal: D,
147
- codeList: u,
148
- onDownloadGenerateCode: J,
149
- handleClose: I,
150
- treeData: g,
151
- showCodeContent: O,
152
- activeCodeContent: i,
153
- expandStatus: v,
154
- height: y,
155
- language: d,
156
- prefixCls: _,
157
- modalHeight: 1e3
158
- };
159
- }
160
- });
161
- function ne(o, r, u, w, g, v) {
162
- const y = p("info-circle-two-tone"), d = p("a-directory-tree"), i = p("a-col"), s = p("JCodeEditor"), D = p("a-empty"), M = p("a-row"), _ = p("a-button"), T = p("BasicModal");
163
- return k(), x(T, {
164
- height: o.modalHeight,
165
- onRegister: o.registerModal,
166
- okText: "",
167
- cancelText: "关闭",
168
- width: 1200,
169
- defaultFullscreen: !0,
170
- canFullscreen: !1,
171
- onOk: o.onDownloadGenerateCode,
172
- wrapClassName: o.prefixCls
173
- }, {
174
- title: m(() => [
175
- C(y),
176
- r[1] || (r[1] = V(" 代码在线预览 "))
177
- ]),
178
- footer: m(() => [
179
- C(_, { onClick: o.handleClose }, {
180
- default: m(() => r[2] || (r[2] = [
181
- V("关闭")
182
- ])),
183
- _: 1
184
- }, 8, ["onClick"]),
185
- C(_, {
186
- type: "primary",
187
- onClick: o.onDownloadGenerateCode
188
- }, {
189
- default: m(() => r[3] || (r[3] = [
190
- V("下载到本地")
191
- ])),
192
- _: 1
193
- }, 8, ["onClick"])
194
- ]),
195
- default: m(() => [
196
- W("div", null, [
197
- C(M, null, {
198
- default: m(() => [
199
- C(i, {
200
- span: 6,
201
- gutter: 3,
202
- style: { "border-right": "1px solid #eee" }
203
- }, {
204
- default: m(() => [
205
- W("div", {
206
- style: j({ height: o.height + "px", overflowY: "auto" })
207
- }, [
208
- o.treeData.length ? (k(), x(d, {
209
- key: 0,
210
- defaultExpandAll: !0,
211
- "tree-data": o.treeData,
212
- onSelect: o.showCodeContent
213
- }, null, 8, ["tree-data", "onSelect"])) : q("", !0)
214
- ], 4)
215
- ]),
216
- _: 1
217
- }),
218
- C(i, {
219
- span: 18,
220
- gutter: 3
221
- }, {
222
- default: m(() => [
223
- o.activeCodeContent ? (k(), x(s, {
224
- key: 0,
225
- value: o.activeCodeContent,
226
- "onUpdate:value": r[0] || (r[0] = (b) => o.activeCodeContent = b),
227
- theme: "idea",
228
- language: o.language,
229
- fullScreen: !1,
230
- lineNumbers: !0,
231
- height: o.height + "px",
232
- disabled: !0,
233
- "language-change": !0
234
- }, null, 8, ["value", "language", "height"])) : (k(), x(D, {
235
- key: 1,
236
- style: { "margin-top": "50px" },
237
- description: "请选择左侧文件,显示详细代码"
238
- }))
239
- ]),
240
- _: 1
241
- })
242
- ]),
243
- _: 1
244
- })
245
- ])
246
- ]),
247
- _: 1
248
- }, 8, ["height", "onRegister", "onOk", "wrapClassName"]);
249
- }
250
- const ge = /* @__PURE__ */ ee(te, [["render", ne]]);
251
- export {
252
- ge as default
253
- };
@@ -1,281 +0,0 @@
1
- var E = (t, o, c) => new Promise((F, p) => {
2
- var T = (n) => {
3
- try {
4
- l(c.next(n));
5
- } catch (f) {
6
- p(f);
7
- }
8
- }, d = (n) => {
9
- try {
10
- l(c.throw(n));
11
- } catch (f) {
12
- p(f);
13
- }
14
- }, l = (n) => n.done ? F(n.value) : Promise.resolve(n.value).then(T, d);
15
- l((c = c.apply(t, o)).next());
16
- });
17
- import { defineComponent as ie, ref as M, computed as G, reactive as P, nextTick as ue, resolveComponent as i, openBlock as L, createElementBlock as me, Fragment as ce, createVNode as u, withCtx as r, createElementVNode as J, createTextVNode as V, createBlock as I, createCommentVNode as $, mergeProps as pe } from "vue";
18
- import { defHttp as H } from "/@/utils/http/axios";
19
- import { BasicForm as de, useForm as fe } from "/@/components/Form";
20
- import { BasicModal as ge, useModalInner as Fe, useModal as U } from "/@/components/Modal";
21
- import { JVxeTypes as R } from "/@/components/jeecg/JVxeTable/types";
22
- import { b as be } from "./useSchemas-b074f3a1.mjs";
23
- import { underLine2CamelCase as q } from "/@/utils/common/compUtils";
24
- import Ce from "./CodeFileListModal-25fad54f.mjs";
25
- import _e from "./FileSelectModal-49d6dade.mjs";
26
- import { message as ve } from "ant-design-vue";
27
- import { useDesign as Me } from "/@/hooks/web/useDesign";
28
- import { _ as Ne } from "./index-30c0a14f.mjs";
29
- import "@ant-design/icons-vue";
30
- import "/@/hooks/web/usePermission";
31
- import "/@/utils/helper/validator";
32
- import "./CodeFileViewModal-12299ab5.mjs";
33
- import "/@/components/jeecg/OnLine/JPopupOnlReport.vue";
34
- import "/@/hooks/web/useMessage";
35
- import "vue-router";
36
- import "/@/utils/file/download";
37
- const ye = ie({
38
- name: "CodeGenerator",
39
- components: { BasicForm: de, BasicModal: ge, FileSelectModal: _e, CodeFileListModal: Ce },
40
- emits: ["register"],
41
- setup(t) {
42
- const o = "JEECG_ONL_PROJECT_PATH", c = "JEECG_ONL_PROJECT_NAME", F = M(!0), p = M(), T = G(() => F.value ? 800 : 1200), d = M("代码生成"), l = M(!1), { prefixCls: n } = Me("code-generator-modal"), f = n, N = M(""), h = P({
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
- }), a = P({}), y = M([]), b = P({
52
- dataSource: [],
53
- columns: [
54
- {
55
- title: "子表名",
56
- key: "tableName",
57
- type: R.input,
58
- disabled: !0,
59
- validateRules: [{ required: !0, message: "请输入${title}" }]
60
- },
61
- {
62
- title: "子表实体",
63
- key: "entityName",
64
- type: R.input,
65
- validateRules: [{ required: !0, message: "请输入${title}" }]
66
- },
67
- {
68
- title: "功能说明",
69
- key: "ftlDescription",
70
- type: R.input,
71
- validateRules: [{ required: !0, message: "请输入${title}" }]
72
- }
73
- ]
74
- }), B = G(() => b.dataSource.length > 0), { formSchemas: C } = be(
75
- t,
76
- {
77
- onProjectPathChange: se,
78
- onProjectPathSearch: oe,
79
- jspModeOptions: y
80
- },
81
- F
82
- ), [S, { resetFields: j, setFieldsValue: k, validate: K }] = fe({
83
- schemas: C,
84
- showActionButtonGroup: !1,
85
- labelAlign: "right"
86
- }), [x, { closeModal: O }] = Fe((e) => E(this, null, function* () {
87
- yield j(), N.value = e.code, l.value = !1, b.dataSource = [], y.value = [], ne(), Object.assign(a, h), W();
88
- }));
89
- function W() {
90
- return E(this, null, function* () {
91
- let { main: e, sub: s, jspModeList: _, projectPath: m } = yield H.get({
92
- url: "/online/cgform/head/tableInfo",
93
- params: { code: N.value }
94
- }), v = [];
95
- for (let g of _) {
96
- const { code: D, note: re } = g;
97
- D == "many" || v.push({
98
- label: re,
99
- value: D
100
- });
101
- }
102
- y.value = v, e.isTree == "Y" ? a.jspMode = "tree" : v.find((g) => g.value === e.themeTemplate) ? a.jspMode = e.themeTemplate : a.jspMode = v[0].value, F.value = e.tableType == 1, d.value = "代码生成【" + e.tableName + "】", a.projectPath || (a.projectPath = m, window.localStorage.setItem(o, m));
103
- const w = localStorage.getItem(c);
104
- w && (a.entityPackage = w), a.jformType = e.tableType + "", a.tableName_tmp = e.tableName, a.ftlDescription = e.tableTxt;
105
- let A = q(e.tableName);
106
- a.entityName = A.substring(0, 1).toUpperCase() + A.substring(1), yield ue(), k(a), s && s.length > 0 && (b.dataSource = s.map((g) => ({
107
- tableName: g.tableName,
108
- entityName: le(g.tableName),
109
- ftlDescription: g.tableTxt
110
- })));
111
- });
112
- }
113
- const [z, { openModal: Y }] = U();
114
- function Q() {
115
- return E(this, null, function* () {
116
- try {
117
- const e = yield K();
118
- let s = Object.assign({}, e, { code: N.value, tableName: e.tableName_tmp });
119
- if (B.value) {
120
- if (yield p.value.validateTable())
121
- return;
122
- s.subList = p.value.getTableData();
123
- }
124
- l.value = !0;
125
- let _ = yield X(s);
126
- Y(!0, {
127
- codeList: _.codeList,
128
- pathKey: _.pathKey,
129
- tableName: e.tableName_tmp
130
- }), O(), localStorage.setItem(c, e.entityPackage);
131
- } catch (e) {
132
- } finally {
133
- l.value = !1;
134
- }
135
- });
136
- }
137
- function X(e) {
138
- return new Promise((s, _) => {
139
- H.post({ url: "/online/cgform/api/codeGenerate", params: e }, { isTransformResponse: !1 }).then((m) => {
140
- if (m.success) {
141
- let v = m.result, w = m.message;
142
- s({
143
- codeList: v,
144
- pathKey: w
145
- });
146
- } else
147
- ve.error(m.message), _(m.message);
148
- });
149
- });
150
- }
151
- function Z() {
152
- O();
153
- }
154
- const [ee, te] = U();
155
- function oe() {
156
- te.openModal(!0, {});
157
- }
158
- function ae(e) {
159
- window.localStorage.setItem(o, e), k({ projectPath: e });
160
- }
161
- function le(e) {
162
- let s = q(e);
163
- return s.substring(0, 1).toUpperCase() + s.substring(1);
164
- }
165
- function ne() {
166
- let e = window.localStorage.getItem(o);
167
- e && (h.projectPath = e);
168
- }
169
- function se(e) {
170
- e.target.value && window.localStorage.setItem(o, e.target.value);
171
- }
172
- return {
173
- title: d,
174
- modalWidth: T,
175
- confirmLoading: l,
176
- subTable: b,
177
- showSubTable: B,
178
- onSubmit: Q,
179
- onCancel: Z,
180
- onFileSelect: ae,
181
- registerFileSelectModal: ee,
182
- subTableRef: p,
183
- registerForm: S,
184
- registerModal: x,
185
- registerCodeFileListModal: z,
186
- wrapClassName: f
187
- };
188
- }
189
- });
190
- function Te(t, o, c, F, p, T) {
191
- const d = i("a-radio"), l = i("a-tooltip"), n = i("a-radio-group"), f = i("BasicForm"), N = i("JVxeTable"), h = i("a-card"), a = i("a-spin"), y = i("BasicModal"), b = i("FileSelectModal"), B = i("code-file-list-modal");
192
- return L(), me(ce, null, [
193
- u(y, {
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: r(() => [
205
- u(a, { spinning: t.confirmLoading }, {
206
- default: r(() => [
207
- u(f, { onRegister: t.registerForm }, {
208
- pageCode: r(({ model: C, field: S }) => [
209
- u(n, {
210
- value: C[S],
211
- "onUpdate:value": (j) => C[S] = j
212
- }, {
213
- default: r(() => [
214
- u(l, { placement: "top" }, {
215
- title: r(() => o[0] || (o[0] = [
216
- J("span", null, "深度封装表单,用户只需定义字段json即可渲染表单,优点简单便捷,缺点扩展有难度", -1)
217
- ])),
218
- default: r(() => [
219
- u(d, { value: "vue3" }, {
220
- default: r(() => o[1] || (o[1] = [
221
- V("封装表单(BasicForm)")
222
- ])),
223
- _: 1
224
- })
225
- ]),
226
- _: 1
227
- }),
228
- u(l, { placement: "top" }, {
229
- title: r(() => o[2] || (o[2] = [
230
- J("span", null, "antd的原生表单,所有字段都需要硬编码,缺点编码繁琐,优点扩展容易", -1)
231
- ])),
232
- default: r(() => [
233
- C.jspMode == "innerTable" || C.jspMode == "tab" ? $("", !0) : (L(), I(d, {
234
- key: 0,
235
- value: "vue3Native"
236
- }, {
237
- default: r(() => o[3] || (o[3] = [
238
- V("原生表单(a-form)")
239
- ])),
240
- _: 1
241
- }))
242
- ]),
243
- _: 2
244
- }, 1024)
245
- ]),
246
- _: 2
247
- }, 1032, ["value", "onUpdate:value"])
248
- ]),
249
- _: 1
250
- }, 8, ["onRegister"]),
251
- t.showSubTable ? (L(), I(h, {
252
- key: 0,
253
- title: "子表信息",
254
- size: "small"
255
- }, {
256
- default: r(() => [
257
- u(N, pe({
258
- ref: "subTableRef",
259
- rowNumber: "",
260
- maxHeight: 580
261
- }, t.subTable), null, 16)
262
- ]),
263
- _: 1
264
- })) : $("", !0)
265
- ]),
266
- _: 1
267
- }, 8, ["spinning"])
268
- ]),
269
- _: 1
270
- }, 8, ["onRegister", "title", "width", "confirmLoading", "onOk", "onCancel", "wrapClassName"]),
271
- u(b, {
272
- onRegister: t.registerFileSelectModal,
273
- onSelect: t.onFileSelect
274
- }, null, 8, ["onRegister", "onSelect"]),
275
- u(B, { onRegister: t.registerCodeFileListModal }, null, 8, ["onRegister"])
276
- ], 64);
277
- }
278
- const Ke = /* @__PURE__ */ Ne(ye, [["render", Te]]);
279
- export {
280
- Ke as default
281
- };