@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,296 @@
1
+ var q = Object.defineProperty;
2
+ var V = Object.getOwnPropertySymbols;
3
+ var G = Object.prototype.hasOwnProperty, X = Object.prototype.propertyIsEnumerable;
4
+ var J = (a, i, n) => i in a ? q(a, i, { enumerable: !0, configurable: !0, writable: !0, value: n }) : a[i] = n, R = (a, i) => {
5
+ for (var n in i || (i = {}))
6
+ G.call(i, n) && J(a, n, i[n]);
7
+ if (V)
8
+ for (var n of V(i))
9
+ X.call(i, n) && J(a, n, i[n]);
10
+ return a;
11
+ };
12
+ var T = (a, i, n) => new Promise((o, h) => {
13
+ var S = (m) => {
14
+ try {
15
+ s(n.next(m));
16
+ } catch (u) {
17
+ h(u);
18
+ }
19
+ }, b = (m) => {
20
+ try {
21
+ s(n.throw(m));
22
+ } catch (u) {
23
+ h(u);
24
+ }
25
+ }, s = (m) => m.done ? o(m.value) : Promise.resolve(m.value).then(S, b);
26
+ s((n = n.apply(a, i)).next());
27
+ });
28
+ import { useMessage as Y } from "/@/hooks/web/useMessage";
29
+ import { ref as d, reactive as Z, resolveComponent as c, openBlock as p, createElementBlock as y, createVNode as k, createCommentVNode as B, createBlock as w, withCtx as E, Fragment as $, renderList as ee, normalizeStyle as te, renderSlot as oe } from "vue";
30
+ import { Loading as ne } from "/@/components/Loading";
31
+ import { getToken as re } from "/@/utils/auth";
32
+ import { goJmReportViewPage as ie } from "/@/utils";
33
+ import { PrinterOutlined as ae } from "@ant-design/icons-vue";
34
+ import le from "./DetailForm-e4538e7a.mjs";
35
+ import me from "./OnlineSubFormDetail-0aa4966c.mjs";
36
+ import { p as se } from "./useExtendComponent-48d37d9b.mjs";
37
+ import { defHttp as pe } from "/@/utils/http/axios";
38
+ import { E as ce } from "./constant-fe20103a.mjs";
39
+ import { _ as ue } from "./index-6a09a912.mjs";
40
+ import "/@/utils/propTypes";
41
+ import "/@/utils/dict";
42
+ import "/@/utils/dict/JDictSelectUtil";
43
+ import "/@/utils/dict/index";
44
+ import "/@/api/common/api";
45
+ import "/@/components/Form/src/utils/Area";
46
+ import "/@/utils/common/compUtils";
47
+ import "/@/components/Preview/index";
48
+ import "/@/components/Form/index";
49
+ import "/@/components/Form/src/componentMap";
50
+ import "/@/components/Modal";
51
+ import "lodash-es";
52
+ import "/@/components/Form/src/jeecg/components/JUpload";
53
+ import "/@/views/system/user/user.api";
54
+ import "/@/store/modules/user";
55
+ import "/@/utils/desform/customExpression";
56
+ import "/@/store/modules/permission";
57
+ import "/@/components/Table";
58
+ import "/@/hooks/system/useListPage";
59
+ import "vue-router";
60
+ import "./LinkTableListPiece-34266919.mjs";
61
+ import "./OnlineSelectCascade-c7baf52b.mjs";
62
+ import "./JModalTip-abe1515a.mjs";
63
+ import "ant-design-vue";
64
+ import "@vueuse/core";
65
+ import "/@/components/jeecg/OnLine/JPopupOnlReport.vue";
66
+ const fe = {
67
+ name: "OnlineFormDetail",
68
+ components: {
69
+ DetailForm: le,
70
+ Loading: ne,
71
+ PrinterOutlined: ae,
72
+ OnlineSubFormDetail: me
73
+ },
74
+ props: {
75
+ id: {
76
+ type: String,
77
+ default: ""
78
+ },
79
+ formTemplate: {
80
+ type: Number,
81
+ default: 1
82
+ },
83
+ disabled: {
84
+ type: Boolean,
85
+ default: !1
86
+ },
87
+ isTree: {
88
+ type: Boolean,
89
+ default: !1
90
+ },
91
+ pidField: {
92
+ type: String,
93
+ default: ""
94
+ },
95
+ submitTip: {
96
+ type: Boolean,
97
+ default: !0
98
+ },
99
+ showSub: {
100
+ type: Boolean,
101
+ default: !0
102
+ },
103
+ themeTemplate: {
104
+ type: String,
105
+ default: ""
106
+ }
107
+ },
108
+ emits: ["success", "rendered"],
109
+ setup(a, { emit: i }) {
110
+ console.log("onlineForm-setup》》");
111
+ const { createMessage: n } = Y(), o = d(""), h = d(!0), S = d(!1), b = d(1), s = d({}), m = d(300), u = d(340), g = Z({
112
+ reportPrintShow: 0,
113
+ reportPrintUrl: "",
114
+ joinQuery: 0,
115
+ modelFullscreen: 0,
116
+ modalMinWidth: ""
117
+ }), { detailFormSchemas: P, hasSubTable: x, subTabInfo: C, refMap: l, showStatus: _, subDataSource: F, createFormSchemas: N, formSpan: M } = se(a);
118
+ function H(e) {
119
+ let t = { reportPrintShow: 0, reportPrintUrl: "", joinQuery: 0, modelFullscreen: 1, modalMinWidth: "" };
120
+ e && (t = JSON.parse(e)), Object.keys(t).map((r) => {
121
+ g[r] = t[r];
122
+ });
123
+ }
124
+ function L(e) {
125
+ return T(this, null, function* () {
126
+ b.value = e.head.tableType, o.value = e.head.tableName, h.value = e.head.tableType == 1, H(e.head.extConfigJson), N(e.schema.properties), i("rendered", g);
127
+ });
128
+ }
129
+ function j(e, t) {
130
+ return T(this, null, function* () {
131
+ console.log("进入表单详情》》form", t), yield z(t), v(!0);
132
+ });
133
+ }
134
+ function I(e) {
135
+ let t = `/online/cgform/api/detail/${a.id}/${e}`;
136
+ return new Promise((r, f) => {
137
+ pe.get({ url: t }, { isTransformResponse: !1 }).then((D) => {
138
+ D.success ? r(D.result) : (f(), n.warning(D.message));
139
+ }).catch(() => {
140
+ f();
141
+ });
142
+ });
143
+ }
144
+ function v(e) {
145
+ Object.keys(_).map((t) => {
146
+ _[t] = e;
147
+ });
148
+ }
149
+ function U() {
150
+ v(!1), setTimeout(() => {
151
+ v(!0);
152
+ }, 300);
153
+ }
154
+ function z(e) {
155
+ return T(this, null, function* () {
156
+ let t = yield I(e.id);
157
+ s.value = R({}, t), K(t);
158
+ });
159
+ }
160
+ function K(e) {
161
+ e || (e = {});
162
+ let t = Object.keys(F.value);
163
+ if (t && t.length > 0) {
164
+ let r = {};
165
+ for (let f of t)
166
+ r[f] = e[f] || [];
167
+ F.value = r;
168
+ }
169
+ }
170
+ function A(e) {
171
+ return "online_" + e + ":";
172
+ }
173
+ function Q() {
174
+ let e = g.reportPrintUrl, t = s.value;
175
+ if (t) {
176
+ let r = t.id, f = re();
177
+ ie(e, r, f);
178
+ }
179
+ }
180
+ function W(e) {
181
+ let t = s.value;
182
+ return console.log("getValueIgnoreCase(temp, key)", t, e, O(t, e)), O(t, e);
183
+ }
184
+ function O(e, t) {
185
+ if (e) {
186
+ let r = e[t];
187
+ return !r && r !== 0 && (r = e[t.toLowerCase()], !r && r !== 0 && (r = e[t.toUpperCase()])), r;
188
+ }
189
+ return "";
190
+ }
191
+ return {
192
+ detailFormSchemas: P,
193
+ formData: s,
194
+ formSpan: M,
195
+ //主表
196
+ tableName: o,
197
+ loading: S,
198
+ //子表
199
+ hasSubTable: x,
200
+ subTabInfo: C,
201
+ subFormHeight: m,
202
+ subTableHeight: u,
203
+ refMap: l,
204
+ onTabChange: U,
205
+ //一对多子表
206
+ subDataSource: F,
207
+ getSubTableAuthPre: A,
208
+ //父组件调用
209
+ show: j,
210
+ createRootProperties: L,
211
+ // 扩展配置
212
+ onOpenReportPrint: Q,
213
+ onlineExtConfigJson: g,
214
+ getSubTableForeignKeyValue: W,
215
+ showStatus: _,
216
+ ERP: ce
217
+ };
218
+ }
219
+ }, de = ["id"], ge = {
220
+ key: 0,
221
+ style: { "text-align": "right", position: "absolute", top: "15px", right: "20px", "z-index": "999" }
222
+ }, he = { key: 1 };
223
+ function be(a, i, n, o, h, S) {
224
+ const b = c("PrinterOutlined"), s = c("detail-form"), m = c("online-sub-form-detail"), u = c("JVxeTable"), g = c("a-spin"), P = c("a-tab-pane"), x = c("a-tabs"), C = c("Loading");
225
+ return p(), y("div", {
226
+ id: o.tableName + "_form"
227
+ }, [
228
+ o.formData.id && o.onlineExtConfigJson.reportPrintShow ? (p(), y("div", ge, [
229
+ k(b, {
230
+ title: "打印",
231
+ onClick: o.onOpenReportPrint,
232
+ style: { "font-size": "16px" }
233
+ }, null, 8, ["onClick"])
234
+ ])) : B("", !0),
235
+ k(s, {
236
+ schemas: o.detailFormSchemas,
237
+ data: o.formData,
238
+ span: o.formSpan
239
+ }, null, 8, ["schemas", "data", "span"]),
240
+ n.themeTemplate !== o.ERP && o.hasSubTable && n.showSub ? (p(), w(x, {
241
+ key: 1,
242
+ onChange: o.onTabChange
243
+ }, {
244
+ default: E(() => [
245
+ (p(!0), y($, null, ee(o.subTabInfo, (l, _) => (p(), w(P, {
246
+ tab: l.describe,
247
+ key: _ + "",
248
+ forceRender: !0
249
+ }, {
250
+ default: E(() => [
251
+ l.relationType == 1 ? (p(), y("div", {
252
+ key: 0,
253
+ style: te({ "overflow-y": "auto", "overflow-x": "hidden", "max-height": o.subFormHeight + "px" })
254
+ }, [
255
+ k(m, {
256
+ table: l.key,
257
+ "form-template": n.formTemplate,
258
+ "main-id": o.getSubTableForeignKeyValue(l.foreignKey),
259
+ properties: l.properties
260
+ }, null, 8, ["table", "form-template", "main-id", "properties"])
261
+ ], 4)) : (p(), y("div", he, [
262
+ o.showStatus[l.key] ? (p(), w(u, {
263
+ key: 0,
264
+ ref_for: !0,
265
+ ref: o.refMap[l.key],
266
+ toolbar: "",
267
+ "keep-source": "",
268
+ "row-number": "",
269
+ "row-selection": "",
270
+ height: o.subTableHeight,
271
+ disabled: !0,
272
+ columns: l.columns,
273
+ dataSource: o.subDataSource[l.key],
274
+ authPre: o.getSubTableAuthPre(l.key)
275
+ }, null, 8, ["height", "columns", "dataSource", "authPre"])) : (p(), w(g, {
276
+ key: 1,
277
+ spinning: !0
278
+ }))
279
+ ]))
280
+ ]),
281
+ _: 2
282
+ }, 1032, ["tab"]))), 128))
283
+ ]),
284
+ _: 1
285
+ }, 8, ["onChange"])) : B("", !0),
286
+ k(C, {
287
+ loading: o.loading,
288
+ absolute: !1
289
+ }, null, 8, ["loading"]),
290
+ oe(a.$slots, "bottom")
291
+ ], 8, de);
292
+ }
293
+ const nt = /* @__PURE__ */ ue(fe, [["render", be]]);
294
+ export {
295
+ nt as default
296
+ };
@@ -0,0 +1,378 @@
1
+ var le = Object.defineProperty;
2
+ var A = Object.getOwnPropertySymbols;
3
+ var ie = Object.prototype.hasOwnProperty, ce = Object.prototype.propertyIsEnumerable;
4
+ var H = (l, n, s) => n in l ? le(l, n, { enumerable: !0, configurable: !0, writable: !0, value: s }) : l[n] = s, U = (l, n) => {
5
+ for (var s in n || (n = {}))
6
+ ie.call(n, s) && H(l, s, n[s]);
7
+ if (A)
8
+ for (var s of A(n))
9
+ ce.call(n, s) && H(l, s, n[s]);
10
+ return l;
11
+ };
12
+ var k = (l, n, s) => new Promise((c, w) => {
13
+ var j = (h) => {
14
+ try {
15
+ _(s.next(h));
16
+ } catch (F) {
17
+ w(F);
18
+ }
19
+ }, b = (h) => {
20
+ try {
21
+ _(s.throw(h));
22
+ } catch (F) {
23
+ w(F);
24
+ }
25
+ }, _ = (h) => h.done ? c(h.value) : Promise.resolve(h.value).then(j, b);
26
+ _((s = s.apply(l, n)).next());
27
+ });
28
+ import { BasicForm as me, useForm as ue } from "/@/components/Form/index";
29
+ import { ref as D, reactive as pe, watch as N, toRaw as B, resolveComponent as I, openBlock as q, createElementBlock as W, createVNode as p, withCtx as v, createElementVNode as M, createTextVNode as E, toDisplayString as de, createCommentVNode as J, pushScopeId as fe, popScopeId as he } from "vue";
30
+ import { defHttp as ge } from "/@/utils/http/axios";
31
+ import { useMessage as _e } from "/@/hooks/web/useMessage";
32
+ import { b as ye, g as ve, c as K, l as we, F as P, L as be, h as Fe, d as G } from "./useExtendComponent-48d37d9b.mjs";
33
+ import { _ as Se } from "./index-6a09a912.mjs";
34
+ import "/@/components/Form/src/componentMap";
35
+ import "/@/utils/propTypes";
36
+ import "@ant-design/icons-vue";
37
+ import "/@/components/Modal";
38
+ import "lodash-es";
39
+ import "/@/components/Form/src/jeecg/components/JUpload";
40
+ import "/@/views/system/user/user.api";
41
+ import "/@/store/modules/user";
42
+ import "/@/utils";
43
+ import "/@/utils/desform/customExpression";
44
+ import "/@/store/modules/permission";
45
+ import "/@/utils/dict/JDictSelectUtil";
46
+ import "/@/utils/common/compUtils";
47
+ import "/@/components/Table";
48
+ import "/@/hooks/system/useListPage";
49
+ import "vue-router";
50
+ import "/@/components/Form/src/utils/Area";
51
+ import "/@/components/Preview/index";
52
+ import "./LinkTableListPiece-34266919.mjs";
53
+ import "./OnlineSelectCascade-c7baf52b.mjs";
54
+ import "/@/components/Loading";
55
+ import "/@/utils/auth";
56
+ import "./JModalTip-abe1515a.mjs";
57
+ import "ant-design-vue";
58
+ import "@vueuse/core";
59
+ import "/@/components/jeecg/OnLine/JPopupOnlReport.vue";
60
+ const xe = {
61
+ name: "OnlineQueryForm",
62
+ components: {
63
+ BasicForm: me
64
+ },
65
+ props: {
66
+ id: {
67
+ type: String,
68
+ default: ""
69
+ }
70
+ },
71
+ emits: ["search", "loaded"],
72
+ setup(l, { emit: n }) {
73
+ const s = "/online/cgform/api/getQueryInfoVue3/", c = D(null), w = D([]), j = D({ xs: 24, sm: 24, md: 12, lg: 6, xl: 6 }), b = D(!1), _ = D(!1), h = D({}), F = D([]), { createMessage: C } = _e(), { linkTableCard2Select: Q } = ye(), d = pe({
74
+ config: {},
75
+ cache: {},
76
+ param: {},
77
+ status: !1
78
+ });
79
+ N(
80
+ () => d.status,
81
+ (e) => k(this, null, function* () {
82
+ console.log("-------------defaultValues发生改变,需要重置表单---------------");
83
+ const { config: t, cache: r, param: y } = B(d);
84
+ let S = Object.assign({}, t, r, y);
85
+ yield z(S);
86
+ }),
87
+ { immediate: !0, deep: !0 }
88
+ );
89
+ function i(e, t) {
90
+ return k(this, null, function* () {
91
+ d.cache = U({}, e), d.param = U({}, t), d.status = !d.status;
92
+ });
93
+ }
94
+ N(
95
+ () => l.id,
96
+ (e) => {
97
+ e ? f() : w.value = [];
98
+ },
99
+ { immediate: !0 }
100
+ );
101
+ function m(e) {
102
+ return k(this, null, function* () {
103
+ let t = [], r = {}, y = Object.keys(e);
104
+ for (let o of y) {
105
+ const a = e[o];
106
+ o === "sys_org_code" && (a.fieldExtendJson || (a.fieldExtendJson = '{"store":"orgCode"}'));
107
+ let u = a.view;
108
+ if (K[u] && (a.view = K[u]), yield we(o, a, r), a.mode == "group" && (u == "date" || u == "datetime" || u == "number")) {
109
+ let x = P.createSlotFormSchema(o, a);
110
+ t.push(x);
111
+ } else if (a.view === be) {
112
+ let x = Fe(a, o);
113
+ for (let O of x) {
114
+ let Y = P.createFormSchema(O.key, O), V = G(t, O.key);
115
+ V == -1 ? t.push(Y) : t[V] = Y;
116
+ }
117
+ } else if (G(t, o) == -1) {
118
+ let O = P.createFormSchema(o, a);
119
+ t.push(O);
120
+ }
121
+ }
122
+ t.sort(function(o, a) {
123
+ return o.order - a.order;
124
+ });
125
+ let S = [];
126
+ t.length > 2 && (b.value = !0);
127
+ let g = [];
128
+ for (let o = 0; o < t.length; o++) {
129
+ let a = t[o];
130
+ a.setFormRef(c), a.noChange(), a.asSearchForm(), o > 1 && (g.push(a.field), a.isHidden());
131
+ let u = a.getFormItemSchema();
132
+ a.slot == "groupDatetime" && (u.colProps = { xs: 24, sm: 24, md: 12, lg: 8, xl: 8 }), Q(u), S.push(u);
133
+ }
134
+ F.value = g, w.value = S, d.config = U({}, r), d.status = !d.status;
135
+ });
136
+ }
137
+ function f() {
138
+ return k(this, null, function* () {
139
+ let e = yield $(), t = Z(e);
140
+ n("loaded", e);
141
+ let { formProperties: r, hasField: y } = X(t, e);
142
+ if (y == !1) {
143
+ w.value = [];
144
+ return;
145
+ }
146
+ yield m(r);
147
+ });
148
+ }
149
+ function z(e) {
150
+ return k(this, null, function* () {
151
+ yield ve(c), console.log("rawValues", e), yield L(e), Object.keys(e).length > 0 && R();
152
+ });
153
+ }
154
+ function X(e, t) {
155
+ const { searchFieldList: r, joinQuery: y, table: S } = t;
156
+ let g = !1, o = {};
157
+ return e && Object.keys(e).map((a) => {
158
+ r.indexOf(a) >= 0 && (y == !0 ? a.indexOf("@") < 0 ? (o[S + "@" + a] = e[a], g = !0) : (o[a] = e[a], g = !0) : a.indexOf("@") < 0 && (o[a] = e[a], g = !0));
159
+ }), {
160
+ formProperties: o,
161
+ hasField: g
162
+ };
163
+ }
164
+ function Z(e) {
165
+ const { properties: t, searchFieldList: r, joinQuery: y, table: S } = e;
166
+ let g = {}, o = 1;
167
+ return Object.keys(t).map((a) => {
168
+ let u = t[a];
169
+ if (u.view == "table") {
170
+ let x = u.properties, O = o * 100;
171
+ Object.keys(x).map((Y) => {
172
+ let V = x[Y];
173
+ V.order = O + Number(V.order);
174
+ let se = a + "@" + Y;
175
+ g[se] = V;
176
+ }), o++;
177
+ } else
178
+ u.order = Number(u.order), g[a] = u;
179
+ }), g;
180
+ }
181
+ function $() {
182
+ let e = `${s}${l.id}`;
183
+ return new Promise((t) => {
184
+ ge.get({ url: e }, { isTransformResponse: !1 }).then((r) => {
185
+ r.success ? t(r.result) : (t(!1), C.warning(r.message));
186
+ }).catch(() => {
187
+ C.warning("获取查询条件失败!"), t(!1);
188
+ });
189
+ });
190
+ }
191
+ const [ee, { resetFields: te, setFieldsValue: L, updateSchema: ae, getFieldsValue: oe }] = ue({
192
+ schemas: w,
193
+ showActionButtonGroup: !1,
194
+ baseColProps: j,
195
+ autoSubmitOnEnter: !0,
196
+ submitFunc() {
197
+ R();
198
+ }
199
+ /* labelCol: ONL_QUERY_LABEL_COL,
200
+ wrapperCol: ONL_QUERY_WRAPPER_COL*/
201
+ });
202
+ function R() {
203
+ let e = oe(), t = Object.assign({}, B(d.param), ne(e));
204
+ n("search", t, !0);
205
+ }
206
+ function re() {
207
+ return k(this, null, function* () {
208
+ yield te();
209
+ const { config: e, param: t } = B(d);
210
+ let r = Object.assign({}, e, t);
211
+ Object.keys(r).length > 0 && (yield L(r)), n("search", r, !1);
212
+ });
213
+ }
214
+ function ne(e) {
215
+ return Object.keys(e).map((t) => {
216
+ e[t] && e[t] instanceof Array && (e[t] = e[t].join(","));
217
+ }), e;
218
+ }
219
+ return N(
220
+ () => _.value,
221
+ (e) => {
222
+ let t = F.value;
223
+ if (t && t.length > 0) {
224
+ let r = [];
225
+ for (let y of t)
226
+ r.push({
227
+ field: y,
228
+ show: e
229
+ });
230
+ ae(r);
231
+ }
232
+ },
233
+ { immediate: !1 }
234
+ ), {
235
+ onlineQueryFormRef: c,
236
+ registerForm: ee,
237
+ initDefaultValues: i,
238
+ toggleButtonShow: b,
239
+ toggleSearchStatus: _,
240
+ doSearch: R,
241
+ resetSearch: re,
242
+ queryParams: h,
243
+ formSchemas: w
244
+ };
245
+ }
246
+ }, T = (l) => (fe("data-v-90f5c109"), l = l(), he(), l), Oe = {
247
+ key: 0,
248
+ class: "jeecg-basic-table-form-container p-0"
249
+ }, ke = /* @__PURE__ */ T(() => /* @__PURE__ */ M("span", { class: "group-query-string" }, "~", -1)), De = /* @__PURE__ */ T(() => /* @__PURE__ */ M("span", { class: "group-query-string" }, "~", -1)), Ie = /* @__PURE__ */ T(() => /* @__PURE__ */ M("span", { class: "group-query-string" }, "~", -1)), Ve = {
250
+ style: { float: "left", overflow: "hidden", "margin-left": "10px" },
251
+ class: "table-page-search-submitButtons"
252
+ };
253
+ function Ye(l, n, s, c, w, j) {
254
+ const b = I("a-date-picker"), _ = I("a-form-item-rest"), h = I("a-input-number"), F = I("a-button"), C = I("a-icon"), Q = I("a-col"), d = I("BasicForm");
255
+ return c.formSchemas && c.formSchemas.length > 0 ? (q(), W("div", Oe, [
256
+ p(d, {
257
+ ref: "onlineQueryFormRef",
258
+ onRegister: c.registerForm
259
+ }, {
260
+ groupDate: v(({ model: i, field: m }) => [
261
+ p(b, {
262
+ showTime: !1,
263
+ valueFormat: "YYYY-MM-DD",
264
+ placeholder: "开始日期",
265
+ value: i[m + "_begin"],
266
+ "onUpdate:value": (f) => i[m + "_begin"] = f,
267
+ style: { width: "calc(50% - 15px)", "min-width": "100px" }
268
+ }, null, 8, ["value", "onUpdate:value"]),
269
+ ke,
270
+ p(_, null, {
271
+ default: v(() => [
272
+ p(b, {
273
+ showTime: !1,
274
+ valueFormat: "YYYY-MM-DD",
275
+ placeholder: "结束日期",
276
+ value: i[m + "_end"],
277
+ "onUpdate:value": (f) => i[m + "_end"] = f,
278
+ style: { width: "calc(50% - 15px)", "min-width": "100px" }
279
+ }, null, 8, ["value", "onUpdate:value"])
280
+ ]),
281
+ _: 2
282
+ }, 1024)
283
+ ]),
284
+ groupDatetime: v(({ model: i, field: m }) => [
285
+ p(b, {
286
+ showTime: !0,
287
+ valueFormat: "YYYY-MM-DD HH:mm:ss",
288
+ placeholder: "开始时间",
289
+ value: i[m + "_begin"],
290
+ "onUpdate:value": (f) => i[m + "_begin"] = f,
291
+ style: { "min-width": "100px", width: "calc(50% - 15px)" }
292
+ }, null, 8, ["value", "onUpdate:value"]),
293
+ De,
294
+ p(_, null, {
295
+ default: v(() => [
296
+ p(b, {
297
+ showTime: !0,
298
+ valueFormat: "YYYY-MM-DD HH:mm:ss",
299
+ placeholder: "结束时间",
300
+ value: i[m + "_end"],
301
+ "onUpdate:value": (f) => i[m + "_end"] = f,
302
+ style: { "min-width": "100px", width: "calc(50% - 15px)" }
303
+ }, null, 8, ["value", "onUpdate:value"])
304
+ ]),
305
+ _: 2
306
+ }, 1024)
307
+ ]),
308
+ groupNumber: v(({ model: i, field: m }) => [
309
+ p(h, {
310
+ placeholder: "开始值",
311
+ value: i[m + "_begin"],
312
+ "onUpdate:value": (f) => i[m + "_begin"] = f,
313
+ style: { width: "calc(50% - 15px)" }
314
+ }, null, 8, ["value", "onUpdate:value"]),
315
+ Ie,
316
+ p(_, null, {
317
+ default: v(() => [
318
+ p(h, {
319
+ placeholder: "结束值",
320
+ value: i[m + "_end"],
321
+ "onUpdate:value": (f) => i[m + "_end"] = f,
322
+ style: { width: "calc(50% - 15px)" }
323
+ }, null, 8, ["value", "onUpdate:value"])
324
+ ]),
325
+ _: 2
326
+ }, 1024)
327
+ ]),
328
+ formFooter: v(() => [
329
+ p(Q, {
330
+ md: 6,
331
+ sm: 8
332
+ }, {
333
+ default: v(() => [
334
+ M("span", Ve, [
335
+ p(F, {
336
+ preIcon: "ant-design:search",
337
+ type: "primary",
338
+ onClick: c.doSearch
339
+ }, {
340
+ default: v(() => [
341
+ E("查询")
342
+ ]),
343
+ _: 1
344
+ }, 8, ["onClick"]),
345
+ p(F, {
346
+ preIcon: "ant-design:reload",
347
+ type: "primary",
348
+ onClick: c.resetSearch,
349
+ style: { "margin-left": "8px" }
350
+ }, {
351
+ default: v(() => [
352
+ E("重置")
353
+ ]),
354
+ _: 1
355
+ }, 8, ["onClick"]),
356
+ c.toggleButtonShow ? (q(), W("a", {
357
+ key: 0,
358
+ onClick: n[0] || (n[0] = (i) => c.toggleSearchStatus = !c.toggleSearchStatus),
359
+ style: { "margin-left": "8px" }
360
+ }, [
361
+ E(de(c.toggleSearchStatus ? "收起" : "展开") + " ", 1),
362
+ p(C, {
363
+ type: c.toggleSearchStatus ? "up" : "down"
364
+ }, null, 8, ["type"])
365
+ ])) : J("", !0)
366
+ ])
367
+ ]),
368
+ _: 1
369
+ })
370
+ ]),
371
+ _: 1
372
+ }, 8, ["onRegister"])
373
+ ])) : J("", !0);
374
+ }
375
+ const mt = /* @__PURE__ */ Se(xe, [["render", Ye], ["__scopeId", "data-v-90f5c109"]]);
376
+ export {
377
+ mt as default
378
+ };