@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,567 @@
1
+ var se = Object.defineProperty, ce = Object.defineProperties;
2
+ var ue = Object.getOwnPropertyDescriptors;
3
+ var A = Object.getOwnPropertySymbols;
4
+ var de = Object.prototype.hasOwnProperty, pe = Object.prototype.propertyIsEnumerable;
5
+ var J = (t, l, o) => l in t ? se(t, l, { enumerable: !0, configurable: !0, writable: !0, value: o }) : t[l] = o, B = (t, l) => {
6
+ for (var o in l || (l = {}))
7
+ de.call(l, o) && J(t, o, l[o]);
8
+ if (A)
9
+ for (var o of A(l))
10
+ pe.call(l, o) && J(t, o, l[o]);
11
+ return t;
12
+ }, U = (t, l) => ce(t, ue(l));
13
+ var q = (t, l, o) => new Promise((m, v) => {
14
+ var f = (d) => {
15
+ try {
16
+ u(o.next(d));
17
+ } catch (V) {
18
+ v(V);
19
+ }
20
+ }, h = (d) => {
21
+ try {
22
+ u(o.throw(d));
23
+ } catch (V) {
24
+ v(V);
25
+ }
26
+ }, u = (d) => d.done ? m(d.value) : Promise.resolve(d.value).then(f, h);
27
+ u((o = o.apply(t, l)).next());
28
+ });
29
+ import { defineComponent as me, ref as I, reactive as z, unref as b, computed as fe, resolveComponent as S, openBlock as F, createBlock as W, mergeProps as ge, withCtx as y, createVNode as x, createElementVNode as C, createTextVNode as P } from "vue";
30
+ import { useModalInner as he, BasicModal as be } from "/@/components/Modal";
31
+ import { useForm as ye, BasicForm as xe } from "/@/components/Form/index";
32
+ import { useJvxeMethod as _e } from "/@/hooks/system/useJvxeMethods.ts";
33
+ import { JVxeTypes as s } from "/@/components/jeecg/JVxeTable/types";
34
+ import { duplicateCheck as Se } from "/@/views/system/user/user.api";
35
+ import { defHttp as _ } from "/@/utils/http/axios";
36
+ import { useMessage as K } from "/@/hooks/web/useMessage";
37
+ const { createConfirm: Ce } = K(), ve = "/online/cgreport/param/listByHeadId", ke = "/online/cgreport/item/listByHeadId", je = (t) => _.get({ url: "/online/cgreport/head/list", params: t }), Ze = (t, l) => _.delete({ url: "/online/cgreport/head/delete", params: t }, { joinParamsToUrl: !0 }).then(() => {
38
+ l();
39
+ }), Ge = (t, l) => {
40
+ Ce({
41
+ title: "确认删除",
42
+ content: "是否删除选中数据",
43
+ okText: "确认",
44
+ cancelText: "取消",
45
+ iconType: "warning",
46
+ onOk: () => _.delete({ url: "/online/cgreport/head/deleteBatch", data: t }, { joinParamsToUrl: !0 }).then(() => {
47
+ l();
48
+ })
49
+ });
50
+ }, we = (t, l) => l ? _.put({ url: "/online/cgreport/head/editAll", params: t }) : _.post({ url: "/online/cgreport/head/add", params: t }), Xe = (t) => _.get({ url: "/online/cgreport/api/getParamsInfo/" + t }), Ie = () => _.get({
51
+ url: "/sys/dataSource/options"
52
+ /* getDataSourceList */
53
+ }), Pe = (t) => _.get({
54
+ url: "/online/cgreport/head/parseSql?" + t
55
+ }), Ye = [
56
+ {
57
+ title: "报表名字",
58
+ align: "center",
59
+ dataIndex: "name",
60
+ width: 120
61
+ },
62
+ {
63
+ title: "报表编码",
64
+ align: "center",
65
+ dataIndex: "code",
66
+ width: 120
67
+ },
68
+ {
69
+ title: "报表SQL",
70
+ align: "center",
71
+ dataIndex: "cgrSql",
72
+ width: 360
73
+ },
74
+ {
75
+ title: "数据源",
76
+ align: "center",
77
+ dataIndex: "dbSource",
78
+ width: 120
79
+ },
80
+ {
81
+ title: "创建时间",
82
+ align: "center",
83
+ dataIndex: "createTime",
84
+ width: 120
85
+ }
86
+ ], et = [
87
+ {
88
+ label: "报表名称",
89
+ field: "name",
90
+ component: "JInput"
91
+ },
92
+ {
93
+ label: "报表编码",
94
+ field: "code",
95
+ component: "JInput"
96
+ }
97
+ ], Ve = /^[a-z|A-Z][a-z|A-Z|\d|_|-]{0,}$/, Le = [
98
+ {
99
+ label: "",
100
+ field: "id",
101
+ component: "Input",
102
+ show: !1
103
+ },
104
+ {
105
+ label: "报表编码",
106
+ field: "code",
107
+ component: "Input",
108
+ colProps: {
109
+ sm: 24,
110
+ xs: 24,
111
+ md: 12,
112
+ lg: 8,
113
+ xl: 8,
114
+ xxl: 8
115
+ },
116
+ dynamicRules: ({ values: t, model: l }) => (console.log("values:", t), [
117
+ {
118
+ required: !0,
119
+ validator: (o, m) => new Promise((v, f) => {
120
+ if (!m)
121
+ return f("请输入报表编码!");
122
+ if (!Ve.test(m))
123
+ return f("编码必须以字母开头,可包含数字、下划线、横杠!");
124
+ let h = {
125
+ tableName: "onl_cgreport_head",
126
+ fieldName: "code",
127
+ fieldVal: m,
128
+ dataId: l.id
129
+ };
130
+ Se(h).then((u) => {
131
+ u.success ? v() : f("报表编码已存在!");
132
+ }).catch((u) => {
133
+ f(u.message || "校验失败");
134
+ });
135
+ })
136
+ }
137
+ ])
138
+ },
139
+ {
140
+ label: "报表名字",
141
+ field: "name",
142
+ component: "Input",
143
+ colProps: {
144
+ sm: 24,
145
+ xs: 24,
146
+ md: 12,
147
+ lg: 8,
148
+ xl: 8,
149
+ xxl: 8
150
+ },
151
+ dynamicRules: () => [{ required: !0, message: "请输入报表名字!" }]
152
+ },
153
+ {
154
+ label: "动态数据源",
155
+ field: "dbSource",
156
+ colProps: {
157
+ sm: 24,
158
+ xs: 24,
159
+ md: 12,
160
+ lg: 8,
161
+ xl: 8,
162
+ xxl: 8
163
+ },
164
+ component: "ApiSelect",
165
+ componentProps: {
166
+ api: Ie
167
+ }
168
+ },
169
+ /* {
170
+ label: ' ',
171
+ field: 'line1',
172
+ component: 'Input',
173
+ slot: 'line1',
174
+ colProps: {
175
+ span: 24
176
+ },
177
+ itemProps:{
178
+ labelCol: { xs: 1, sm: 1 },
179
+ wrapperCol: { xs: 23, sm: 23 },
180
+ colon: false
181
+ },
182
+ },*/
183
+ {
184
+ label: "报表SQL",
185
+ field: "cgrSql",
186
+ component: "JCodeEditor",
187
+ rules: [{ required: !0, message: "请填写报表SQL" }],
188
+ itemProps: {
189
+ labelCol: { xs: 24, sm: 2 },
190
+ wrapperCol: { xs: 24, sm: 22 }
191
+ },
192
+ componentProps: {
193
+ height: "200px",
194
+ fullScreen: !0
195
+ },
196
+ colProps: {
197
+ span: 20
198
+ }
199
+ },
200
+ {
201
+ label: " ",
202
+ field: "analyseButton",
203
+ component: "Input",
204
+ slot: "analyseButton",
205
+ colProps: {
206
+ span: 4
207
+ },
208
+ itemProps: {
209
+ labelCol: { xs: 1, sm: 1 },
210
+ wrapperCol: { xs: 23, sm: 23 },
211
+ colon: !1
212
+ }
213
+ }
214
+ ], Te = [
215
+ {
216
+ title: "参数字段",
217
+ key: "paramName",
218
+ type: s.input,
219
+ width: "200px",
220
+ placeholder: "请输入${title}",
221
+ defaultValue: "",
222
+ validateRules: [{ required: !0, message: "${title}不能为空" }]
223
+ },
224
+ {
225
+ title: "参数文本",
226
+ key: "paramTxt",
227
+ type: s.input,
228
+ width: "200px",
229
+ placeholder: "请输入${title}",
230
+ defaultValue: "",
231
+ validateRules: [{ required: !0, message: "${title}不能为空" }]
232
+ },
233
+ {
234
+ title: "参数默认值",
235
+ key: "paramValue",
236
+ type: s.input,
237
+ width: "200px",
238
+ placeholder: "请输入${title}",
239
+ defaultValue: ""
240
+ }
241
+ ], $e = [
242
+ {
243
+ title: "字段名字",
244
+ key: "fieldName",
245
+ type: s.input,
246
+ minWidth: "150px",
247
+ placeholder: "请输入${title}",
248
+ defaultValue: "",
249
+ validateRules: [{ required: !0, message: "${title}不能为空" }]
250
+ },
251
+ {
252
+ title: "字段文本",
253
+ key: "fieldTxt",
254
+ type: s.input,
255
+ minWidth: "150px",
256
+ placeholder: "请输入${title}",
257
+ defaultValue: "",
258
+ validateRules: [{ required: !0, message: "${title}不能为空" }]
259
+ },
260
+ {
261
+ title: "字段类型",
262
+ key: "fieldType",
263
+ minWidth: "150px",
264
+ placeholder: "请输入${title}",
265
+ defaultValue: "",
266
+ validateRules: [{ required: !0, message: "${title}不能为空" }],
267
+ type: s.select,
268
+ options: [
269
+ { title: "数值类型", value: "Integer" },
270
+ { title: "字符类型", value: "String" },
271
+ { title: "日期类型", value: "Date" },
272
+ { title: "时间类型", value: "Datetime" },
273
+ { title: "长整型", value: "Long" }
274
+ ]
275
+ },
276
+ {
277
+ title: "是否显示",
278
+ key: "isShow",
279
+ minWidth: "80px",
280
+ align: "center",
281
+ type: s.checkbox,
282
+ customValue: [1, 0],
283
+ defaultChecked: !0
284
+ },
285
+ {
286
+ title: "字段href",
287
+ key: "fieldHref",
288
+ type: s.input,
289
+ minWidth: "150px",
290
+ placeholder: "请输入${title}",
291
+ defaultValue: ""
292
+ },
293
+ {
294
+ title: "查询模式",
295
+ key: "searchMode",
296
+ type: s.select,
297
+ minWidth: "150px",
298
+ placeholder: "请选择${title}",
299
+ options: [
300
+ { title: "单条件查询", value: "single" },
301
+ { title: "范围查询", value: "group" }
302
+ ]
303
+ },
304
+ {
305
+ title: "取值表达式",
306
+ key: "replaceVal",
307
+ type: s.input,
308
+ minWidth: "150px",
309
+ placeholder: "请输入${title}",
310
+ defaultValue: ""
311
+ },
312
+ {
313
+ title: "字典code",
314
+ key: "dictCode",
315
+ type: s.input,
316
+ minWidth: "150px",
317
+ placeholder: "请输入${title}",
318
+ defaultValue: ""
319
+ },
320
+ {
321
+ title: "分组标题",
322
+ key: "groupTitle",
323
+ type: s.input,
324
+ minWidth: "150px",
325
+ placeholder: "请输入${title}",
326
+ defaultValue: ""
327
+ },
328
+ {
329
+ title: "是否查询",
330
+ key: "isSearch",
331
+ type: s.checkbox,
332
+ customValue: ["1", "0"],
333
+ minWidth: "80px",
334
+ align: "center",
335
+ defaultChecked: !1
336
+ },
337
+ {
338
+ title: "是否合计",
339
+ align: "center",
340
+ key: "isTotal",
341
+ type: s.checkbox,
342
+ customValue: ["1", "0"],
343
+ minWidth: "80px",
344
+ defaultChecked: !1
345
+ }
346
+ ], qe = { style: { flex: "1", "text-align": "left" } }, Ne = /* @__PURE__ */ C("br", null, null, -1), Re = /* @__PURE__ */ C("br", null, null, -1), De = /* @__PURE__ */ C("br", null, null, -1), Be = /* @__PURE__ */ C("br", null, null, -1), Fe = /* @__PURE__ */ C("br", null, null, -1), We = /* @__PURE__ */ C("span", { style: { color: "red" } }, "注:参数只支持动态报表,popup暂不支持", -1), tt = /* @__PURE__ */ me({
347
+ __name: "CgreportModal",
348
+ emits: ["register", "success"],
349
+ setup(t, { emit: l }) {
350
+ const { createMessage: o } = K(), m = I(!0), v = I(!0), f = I(["onlCgreportItem", "onlCgreportParam"]), h = I("onlCgreportItem"), u = I(), d = I(), V = { onlCgreportItem: d, onlCgreportParam: u }, k = z({
351
+ loading: !1,
352
+ dataSource: [],
353
+ columns: Te
354
+ }), w = z({
355
+ loading: !1,
356
+ dataSource: [],
357
+ columns: $e
358
+ }), [Q, { setProps: H, resetFields: E, setFieldsValue: j, validate: Me, validateFields: Z }] = ye({
359
+ // labelWidth: 150,
360
+ schemas: Le,
361
+ showActionButtonGroup: !1
362
+ }), [G, { setModalProps: L, closeModal: X }] = he((e) => q(this, null, function* () {
363
+ var r, a;
364
+ yield oe(), L({ confirmLoading: !1, showCancelBtn: e == null ? void 0 : e.showFooter, showOkBtn: e == null ? void 0 : e.showFooter }), m.value = !!(e != null && e.isUpdate), b(m) && (yield j(B({}, e.record)), M(ve, { headId: (r = e == null ? void 0 : e.record) == null ? void 0 : r.id }, k), M(ke, { headId: (a = e == null ? void 0 : e.record) == null ? void 0 : a.id }, w)), H({ disabled: !(e != null && e.showFooter) });
365
+ })), [Y, ee, M, te] = _e(
366
+ ae,
367
+ re,
368
+ V,
369
+ h,
370
+ f
371
+ ), le = fe(() => b(m) ? "编辑" : "新增");
372
+ function oe() {
373
+ return q(this, null, function* () {
374
+ yield E(), h.value = "onlCgreportItem", k.dataSource = [], w.dataSource = [];
375
+ });
376
+ }
377
+ function re(e) {
378
+ let r = Object.assign({}, e.formValue);
379
+ return U(B({}, r), {
380
+ // 展开
381
+ onlCgreportParamList: e.tablesValue[1].tableData,
382
+ onlCgreportItemList: e.tablesValue[0].tableData
383
+ });
384
+ }
385
+ function ae(e) {
386
+ return q(this, null, function* () {
387
+ try {
388
+ L({ confirmLoading: !0 });
389
+ let r = [], a = [], n = {};
390
+ Object.keys(e).map((i) => {
391
+ i == "onlCgreportItemList" ? a = e[i] : i == "onlCgreportParamList" ? r = e[i] : n[i] = e[i];
392
+ });
393
+ let c = { head: n, params: r, items: a };
394
+ console.log("报表配置保存请求参数", c), yield we(c, m.value), X(), l("success");
395
+ } finally {
396
+ L({ confirmLoading: !1 });
397
+ }
398
+ });
399
+ }
400
+ function ne() {
401
+ L({ confirmLoading: !0 }), Z(["cgrSql", "dbSource"]).then((e) => {
402
+ let { cgrSql: r, dbSource: a } = e, n = "sql=" + encodeURIComponent(r);
403
+ a && (n += "&dbKey=" + a), console.log("urlParam----", n), Pe(n).then((c) => {
404
+ if (c) {
405
+ o.success("解析成功");
406
+ let { fields: i, params: p } = c, g = i.filter(($) => $.fieldName != "__row_number__"), N = d.value.getTableData(), T = O(N, g || [], "fieldName");
407
+ T = T.sort(($, D) => $.orderNum - D.orderNum), w.dataSource = T;
408
+ let ie = u.value.getTableData(), R = O(ie, p || [], "paramName");
409
+ R = R.sort(($, D) => $.orderNum - D.orderNum), k.dataSource = R;
410
+ }
411
+ });
412
+ }).catch(() => {
413
+ console.log("解析失败");
414
+ }).finally(() => {
415
+ L({ confirmLoading: !1 });
416
+ });
417
+ }
418
+ function O(e, r, a) {
419
+ if (e.length > 0) {
420
+ let n = [], c = [], i = 1;
421
+ for (let p of r)
422
+ for (let g of e)
423
+ if (g[a] == p[a]) {
424
+ n.push(g), c.push(p[a]), g.orderNum > i && (i = g.orderNum);
425
+ break;
426
+ }
427
+ for (let p of r)
428
+ c.indexOf(p[a]) < 0 && (p.orderNum = ++i, n.push(p));
429
+ return n;
430
+ } else {
431
+ let n = 0;
432
+ for (let c of r)
433
+ c.orderNum || (c.orderNum = ++n);
434
+ return r;
435
+ }
436
+ }
437
+ return (e, r) => {
438
+ const a = S("a-icon"), n = S("a-popover"), c = S("a-button"), i = S("a-divider"), p = S("JVxeTable"), g = S("a-tab-pane"), N = S("a-tabs");
439
+ return F(), W(b(be), ge(e.$attrs, {
440
+ onRegister: b(G),
441
+ title: le.value,
442
+ width: 1200,
443
+ maskClosable: !1,
444
+ defaultFullscreen: !0,
445
+ confirmLoading: v.value,
446
+ onOk: b(ee)
447
+ }), {
448
+ default: y(() => [
449
+ x(b(xe), {
450
+ onRegister: b(Q),
451
+ ref_key: "formRef",
452
+ ref: te
453
+ }, {
454
+ analyseButton: y(() => [
455
+ C("div", qe, [
456
+ x(n, {
457
+ title: "使用指南",
458
+ trigger: "hover",
459
+ style: { margin: "0 10px 0 6px" }
460
+ }, {
461
+ content: y(() => [
462
+ P(" 您可以键入“”作为一个参数,这里abc是参数的名称。例如:"),
463
+ Ne,
464
+ P(" select * from table where id = ${abc}。"),
465
+ Re,
466
+ P(" select * from table where id like concat('%',${abc},'%')。(mysql模糊查询)"),
467
+ De,
468
+ P(" select * from table where id like '%'||${abc}||'%'。(oracle模糊查询)"),
469
+ Be,
470
+ P(" select * from table where id like '%'+${abc}+'%'。(sqlserver模糊查询)"),
471
+ Fe,
472
+ We
473
+ ]),
474
+ default: y(() => [
475
+ x(a, { type: "question-circle" })
476
+ ]),
477
+ _: 1
478
+ }),
479
+ x(c, {
480
+ style: { "margin-left": "10px" },
481
+ type: "primary",
482
+ onClick: ne
483
+ }, {
484
+ default: y(() => [
485
+ P("SQL解析")
486
+ ]),
487
+ _: 1
488
+ })
489
+ ])
490
+ ]),
491
+ _: 1
492
+ }, 8, ["onRegister"]),
493
+ x(i, {
494
+ style: { margin: "1px 0" },
495
+ class: "cust-divider"
496
+ }),
497
+ x(N, {
498
+ activeKey: h.value,
499
+ "onUpdate:activeKey": r[0] || (r[0] = (T) => h.value = T),
500
+ animated: "",
501
+ onChange: b(Y)
502
+ }, {
503
+ default: y(() => [
504
+ (F(), W(g, {
505
+ tab: "动态报表配置明细",
506
+ key: f.value[0],
507
+ forceRender: !0
508
+ }, {
509
+ default: y(() => [
510
+ x(p, {
511
+ "keep-source": "",
512
+ dragSort: "",
513
+ resizable: "",
514
+ ref_key: "onlCgreportItem",
515
+ ref: d,
516
+ loading: w.loading,
517
+ columns: w.columns,
518
+ dataSource: w.dataSource,
519
+ height: 390,
520
+ rowNumber: !0,
521
+ rowSelection: !0,
522
+ toolbar: !0
523
+ }, null, 8, ["loading", "columns", "dataSource"])
524
+ ]),
525
+ _: 1
526
+ })),
527
+ (F(), W(g, {
528
+ tab: "报表参数",
529
+ key: f.value[1],
530
+ forceRender: !0
531
+ }, {
532
+ default: y(() => [
533
+ x(p, {
534
+ "keep-source": "",
535
+ resizable: "",
536
+ dragSort: "",
537
+ ref_key: "onlCgreportParam",
538
+ ref: u,
539
+ loading: k.loading,
540
+ columns: k.columns,
541
+ dataSource: k.dataSource,
542
+ height: 390,
543
+ rowNumber: !0,
544
+ rowSelection: !0,
545
+ toolbar: !0
546
+ }, null, 8, ["loading", "columns", "dataSource"])
547
+ ]),
548
+ _: 1
549
+ }))
550
+ ]),
551
+ _: 1
552
+ }, 8, ["activeKey", "onChange"])
553
+ ]),
554
+ _: 1
555
+ }, 16, ["onRegister", "title", "confirmLoading", "onOk"]);
556
+ };
557
+ }
558
+ });
559
+ export {
560
+ tt as _,
561
+ Ge as b,
562
+ Ye as c,
563
+ Ze as d,
564
+ Xe as g,
565
+ je as l,
566
+ et as s
567
+ };