@jeecg/online 3.5.3-beta3 → 3.6.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 (163) hide show
  1. package/AuthButtonConfig-b6a674fa.mjs +125 -0
  2. package/AuthButtonTree-09e57bc4.mjs +156 -0
  3. package/AuthDataConfig-6e7e61ec.mjs +212 -0
  4. package/AuthDataTree-e83286c5.mjs +139 -0
  5. package/AuthFieldConfig-f1ec2708.mjs +139 -0
  6. package/AuthFieldTree-bb72e21f.mjs +232 -0
  7. package/AuthManagerDrawer-28a2d108.mjs +114 -0
  8. package/AuthSetterModal-2990d553.mjs +261 -0
  9. package/CgformCopyList-36a4cbf0.mjs +246 -0
  10. package/CgformModal-7399a5ac.mjs +611 -0
  11. package/CgreportModal-2eb9c9e1.mjs +13 -0
  12. package/CgreportModal.vue_vue_type_script_setup_true_lang-c2ceb064.mjs +566 -0
  13. package/CheckDictTable-3a8a54b3.mjs +211 -0
  14. package/CodeFileListModal-72f0d3bb.mjs +158 -0
  15. package/CodeFileViewModal-9eb88c47.mjs +244 -0
  16. package/CodeGeneratorModal-a89958f5.mjs +233 -0
  17. package/CustomButtonList-c44aec5a.mjs +363 -0
  18. package/DBAttributeTable-7d285e8d.mjs +473 -0
  19. package/DbToOnlineModal-d23cbeb1.mjs +160 -0
  20. package/DetailForm-2901d215.mjs +461 -0
  21. package/EnhanceJavaModal-153899a9.mjs +264 -0
  22. package/EnhanceJsHistory-7f5db3b1.mjs +184 -0
  23. package/EnhanceJsModal-c2fb75b8.mjs +311 -0
  24. package/EnhanceSqlModal-965e9b0a.mjs +268 -0
  25. package/ExtendConfigModal-8f08466f.mjs +111 -0
  26. package/FieldExtendJsonModal-adfcf5a7.mjs +219 -0
  27. package/FileSelectModal-432d4521.mjs +103 -0
  28. package/ForeignKeyTable-faab7ccf.mjs +69 -0
  29. package/IndexTable-0a2d3718.mjs +89 -0
  30. package/JModalTip-e1938b49.mjs +46 -0
  31. package/JOnlineSearchSelect-7e908492.mjs +95 -0
  32. package/LeftDepart-54f245b3.mjs +82 -0
  33. package/LeftRole-c138f892.mjs +86 -0
  34. package/LeftUser-9c812f8a.mjs +105 -0
  35. package/LinkTableConfigModal-c2c5c7e6.mjs +230 -0
  36. package/LinkTableFieldConfigModal-a3553b1f.mjs +176 -0
  37. package/LinkTableListPiece-7f793b08.mjs +34 -0
  38. package/ModalFormDemo-65685b0e.mjs +78 -0
  39. package/OnlCgformErpList-52c87ed3.mjs +449 -0
  40. package/OnlCgformErpSubTable-6e7fb17b.mjs +398 -0
  41. package/OnlCgformInnerSubTable-f0727b8f.mjs +248 -0
  42. package/OnlCgformInnerTableList-9f89c173.mjs +430 -0
  43. package/OnlCgformTabList-15516315.mjs +390 -0
  44. package/OnlineAutoList-63a0224f.mjs +474 -0
  45. package/OnlineAutoModal-ffe19c3f.mjs +206 -0
  46. package/OnlineAutoTreeList-317c7105.mjs +495 -0
  47. package/OnlineCustomModal-3939ce78.mjs +227 -0
  48. package/OnlineDetailModal-bfb1375f.mjs +177 -0
  49. package/OnlineForm-069f6092.mjs +749 -0
  50. package/OnlineFormDetail-ad5735fb.mjs +296 -0
  51. package/OnlineQueryForm-0771c80f.mjs +385 -0
  52. package/OnlineSearchFormItem-0db5834f.mjs +348 -0
  53. package/OnlineSelectCascade-a05c30f4.mjs +159 -0
  54. package/OnlineSubFormDetail-583d01eb.mjs +142 -0
  55. package/OnlineTabAutoModal-747e071d.mjs +253 -0
  56. package/OnlineTabDetailModal-887f0174.mjs +222 -0
  57. package/OnlineTabForm-b1dcd4b4.mjs +765 -0
  58. package/OnlineTabFormDetail-8e494a96.mjs +323 -0
  59. package/PageAttributeTable-5966b201.mjs +404 -0
  60. package/ProcessOnlineForm-4382bea7.mjs +177 -0
  61. package/QueryTable-6e8053ad.mjs +115 -0
  62. package/README.md +2 -1
  63. package/SuperQuery-78db6998.mjs +841 -0
  64. package/SuperQueryValComponent-471110b5.mjs +8 -0
  65. package/SuperQueryValComponent.vue_vue_type_script_lang-e3ad7ee8.mjs +101 -0
  66. package/auth.api-d3a6c4b3.mjs +39 -0
  67. package/auth.data-8be5c9e3.mjs +141 -0
  68. package/{cgform.data.js → cgform.data-cbdd88c3.mjs} +93 -62
  69. package/constant-754f1a9d.mjs +9 -0
  70. package/enhance.api-138e6826.mjs +104 -0
  71. package/enhance.data-efc7e155.mjs +175 -0
  72. package/index-0a93652b.mjs +237 -0
  73. package/index-7e9a23f2.mjs +1494 -0
  74. package/index-b70302f2.mjs +56 -0
  75. package/main.index.js +7 -1
  76. package/package.json +1 -1
  77. package/style.css +1 -1
  78. package/useCgformList-0c603af1.mjs +424 -0
  79. package/useCustomHook-acb00837.mjs +53 -0
  80. package/useExtendComponent-aa1cdfc8.mjs +3917 -0
  81. package/useListButton-0f18bf6a.mjs +671 -0
  82. package/useOnlinePopEvent-687070b7.mjs +19 -0
  83. package/useOnlineTest-e4bd8be3.mjs +42 -0
  84. package/useSchemas-43429d80.mjs +685 -0
  85. package/useTableSync-774c3774.mjs +87 -0
  86. package/AuthButtonConfig.js +0 -147
  87. package/AuthButtonTree.js +0 -183
  88. package/AuthDataConfig.js +0 -246
  89. package/AuthDataTree.js +0 -160
  90. package/AuthFieldConfig.js +0 -170
  91. package/AuthFieldTree.js +0 -281
  92. package/AuthManagerDrawer.js +0 -125
  93. package/AuthSetterModal.js +0 -316
  94. package/CgformCopyList.js +0 -266
  95. package/CgformModal.js +0 -780
  96. package/CgreportModal.js +0 -667
  97. package/CheckDictTable.js +0 -242
  98. package/CodeFileListModal.js +0 -175
  99. package/CodeFileViewModal.js +0 -325
  100. package/CodeGeneratorModal.js +0 -297
  101. package/CustomButtonList.js +0 -410
  102. package/DBAttributeTable.js +0 -526
  103. package/DbToOnlineModal.js +0 -192
  104. package/DetailForm.js +0 -608
  105. package/EnhanceJavaModal.js +0 -298
  106. package/EnhanceJsHistory.js +0 -229
  107. package/EnhanceJsModal.js +0 -293
  108. package/EnhanceSqlModal.js +0 -299
  109. package/ExtendConfigModal.js +0 -151
  110. package/FieldExtendJsonModal.js +0 -283
  111. package/FileSelectModal.js +0 -102
  112. package/ForeignKeyTable.js +0 -79
  113. package/IndexTable.js +0 -97
  114. package/JModalTip.js +0 -54
  115. package/JOnlineSearchSelect.js +0 -115
  116. package/LICENSE +0 -9
  117. package/LeftDepart.js +0 -96
  118. package/LeftRole.js +0 -98
  119. package/LeftUser.js +0 -117
  120. package/LinkTableConfigModal.js +0 -289
  121. package/LinkTableFieldConfigModal.js +0 -218
  122. package/LinkTableListPiece.js +0 -36
  123. package/ModalFormDemo.js +0 -85
  124. package/OnlineAutoList.js +0 -523
  125. package/OnlineAutoModal.js +0 -226
  126. package/OnlineAutoTreeList.js +0 -552
  127. package/OnlineCustomModal.js +0 -286
  128. package/OnlineDetailModal.js +0 -190
  129. package/OnlineForm.js +0 -1016
  130. package/OnlineFormDetail.js +0 -347
  131. package/OnlineQueryForm.js +0 -484
  132. package/OnlineSearchFormItem.js +0 -436
  133. package/OnlineSelectCascade.js +0 -228
  134. package/OnlineSubFormDetail.js +0 -166
  135. package/PageAttributeTable.js +0 -486
  136. package/ProcessOnlineForm.js +0 -208
  137. package/QueryTable.js +0 -129
  138. package/SuperQuery.js +0 -1020
  139. package/SuperQueryValComponent.js +0 -8
  140. package/SuperQueryValComponent.vue_vue_type_script_lang.js +0 -168
  141. package/_arrayPush.js +0 -278
  142. package/_baseClone.js +0 -471
  143. package/_baseSlice.js +0 -18
  144. package/_commonjsHelpers.js +0 -5
  145. package/_flatRest.js +0 -174
  146. package/auth.api.js +0 -43
  147. package/auth.data.js +0 -142
  148. package/clipboard.js +0 -565
  149. package/enhance.api.js +0 -129
  150. package/enhance.data.js +0 -196
  151. package/index.js +0 -87
  152. package/index2.js +0 -340
  153. package/index3.js +0 -264
  154. package/isArray.js +0 -47
  155. package/omit.js +0 -60
  156. package/pick.js +0 -68
  157. package/toString.js +0 -31
  158. package/useCgformList.js +0 -470
  159. package/useExtendComponent.js +0 -5205
  160. package/useListButton.js +0 -923
  161. package/useOnlineTest.js +0 -44
  162. package/useSchemas.js +0 -653
  163. package/useTableSync.js +0 -117
@@ -0,0 +1,566 @@
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, o, l) => o in t ? se(t, o, { enumerable: !0, configurable: !0, writable: !0, value: l }) : t[o] = l, B = (t, o) => {
6
+ for (var l in o || (o = {}))
7
+ de.call(o, l) && J(t, l, o[l]);
8
+ if (A)
9
+ for (var l of A(o))
10
+ pe.call(o, l) && J(t, l, o[l]);
11
+ return t;
12
+ }, U = (t, o) => ce(t, ue(o));
13
+ var q = (t, o, l) => new Promise((m, v) => {
14
+ var f = (u) => {
15
+ try {
16
+ c(l.next(u));
17
+ } catch (V) {
18
+ v(V);
19
+ }
20
+ }, h = (u) => {
21
+ try {
22
+ c(l.throw(u));
23
+ } catch (V) {
24
+ v(V);
25
+ }
26
+ }, c = (u) => u.done ? m(u.value) : Promise.resolve(u.value).then(f, h);
27
+ c((l = l.apply(t, o)).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 M, 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 i } 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
+ import { usePermissionStore as Ce } from "/@/store/modules/permission";
38
+ const { createConfirm: ve } = K(), ke = "/online/cgreport/param/listByHeadId", we = "/online/cgreport/item/listByHeadId", Xe = (t) => _.get({ url: "/online/cgreport/head/list", params: t }), Ye = (t, o) => _.delete({ url: "/online/cgreport/head/delete", params: t }, { joinParamsToUrl: !0 }).then(() => {
39
+ o();
40
+ }), et = (t, o) => {
41
+ ve({
42
+ title: "确认删除",
43
+ content: "是否删除选中数据",
44
+ okText: "确认",
45
+ cancelText: "取消",
46
+ iconType: "warning",
47
+ onOk: () => _.delete({ url: "/online/cgreport/head/deleteBatch", data: t }, { joinParamsToUrl: !0 }).then(() => {
48
+ o();
49
+ })
50
+ });
51
+ }, Ie = (t, o) => o ? _.put({ url: "/online/cgreport/head/editAll", params: t }) : _.post({ url: "/online/cgreport/head/add", params: t }), tt = (t) => _.get({ url: "/online/cgreport/api/getParamsInfo/" + t }), Pe = () => _.get({
52
+ url: "/sys/dataSource/options"
53
+ /* getDataSourceList */
54
+ }), Ve = (t) => _.get({
55
+ url: "/online/cgreport/head/parseSql?" + t
56
+ }), Le = Ce(), ot = [
57
+ {
58
+ title: "报表名字",
59
+ align: "center",
60
+ dataIndex: "name",
61
+ width: 120
62
+ },
63
+ {
64
+ title: "报表编码",
65
+ align: "center",
66
+ dataIndex: "code",
67
+ width: 120
68
+ },
69
+ {
70
+ title: "报表SQL",
71
+ align: "center",
72
+ dataIndex: "cgrSql",
73
+ width: 360
74
+ },
75
+ {
76
+ title: "数据源",
77
+ align: "center",
78
+ dataIndex: "dbSource",
79
+ width: 120
80
+ },
81
+ {
82
+ title: "创建时间",
83
+ align: "center",
84
+ dataIndex: "createTime",
85
+ width: 120
86
+ }
87
+ ], lt = [
88
+ {
89
+ label: "报表名称",
90
+ field: "name",
91
+ component: "JInput"
92
+ },
93
+ {
94
+ label: "报表编码",
95
+ field: "code",
96
+ component: "JInput"
97
+ }
98
+ ], Te = /^[a-z|A-Z][a-z|A-Z|\d|_|-]{0,}$/, $e = [
99
+ {
100
+ label: "",
101
+ field: "id",
102
+ component: "Input",
103
+ show: !1
104
+ },
105
+ {
106
+ label: "报表编码",
107
+ field: "code",
108
+ component: "Input",
109
+ colProps: {
110
+ sm: 24,
111
+ xs: 24,
112
+ md: 12,
113
+ lg: 8,
114
+ xl: 8,
115
+ xxl: 8
116
+ },
117
+ dynamicRules: ({ values: t, model: o }) => [
118
+ {
119
+ required: !0,
120
+ validator: (l, m) => new Promise((v, f) => {
121
+ if (!m)
122
+ return f("请输入报表编码!");
123
+ if (!Te.test(m))
124
+ return f("编码必须以字母开头,可包含数字、下划线、横杠!");
125
+ let h = {
126
+ tableName: "onl_cgreport_head",
127
+ fieldName: "code",
128
+ fieldVal: m,
129
+ dataId: o.id
130
+ };
131
+ Se(h).then((c) => {
132
+ c.success ? v() : f("报表编码已存在!");
133
+ }).catch((c) => {
134
+ f(c.message || "校验失败");
135
+ });
136
+ })
137
+ }
138
+ ]
139
+ },
140
+ {
141
+ label: "报表名字",
142
+ field: "name",
143
+ component: "Input",
144
+ colProps: {
145
+ sm: 24,
146
+ xs: 24,
147
+ md: 12,
148
+ lg: 8,
149
+ xl: 8,
150
+ xxl: 8
151
+ },
152
+ dynamicRules: () => [{ required: !0, message: "请输入报表名字!" }]
153
+ },
154
+ {
155
+ label: "动态数据源",
156
+ field: "dbSource",
157
+ colProps: {
158
+ sm: 24,
159
+ xs: 24,
160
+ md: 12,
161
+ lg: 8,
162
+ xl: 8,
163
+ xxl: 8
164
+ },
165
+ component: "ApiSelect",
166
+ rules: [{ required: Le.sysSafeMode, message: "请选择数据源!" }],
167
+ componentProps: {
168
+ api: Pe
169
+ }
170
+ },
171
+ /* {
172
+ label: ' ',
173
+ field: 'line1',
174
+ component: 'Input',
175
+ slot: 'line1',
176
+ colProps: {
177
+ span: 24
178
+ },
179
+ itemProps:{
180
+ labelCol: { xs: 1, sm: 1 },
181
+ wrapperCol: { xs: 23, sm: 23 },
182
+ colon: false
183
+ },
184
+ },*/
185
+ {
186
+ label: "报表SQL",
187
+ field: "cgrSql",
188
+ component: "JCodeEditor",
189
+ rules: [{ required: !0, message: "请填写报表SQL" }],
190
+ itemProps: {
191
+ labelCol: { xs: 24, sm: 2 },
192
+ wrapperCol: { xs: 24, sm: 22 }
193
+ },
194
+ componentProps: {
195
+ height: "200px",
196
+ fullScreen: !0
197
+ },
198
+ colProps: {
199
+ span: 20
200
+ }
201
+ },
202
+ {
203
+ label: " ",
204
+ field: "analyseButton",
205
+ component: "Input",
206
+ slot: "analyseButton",
207
+ colProps: {
208
+ span: 4
209
+ },
210
+ itemProps: {
211
+ labelCol: { xs: 1, sm: 1 },
212
+ wrapperCol: { xs: 23, sm: 23 },
213
+ colon: !1
214
+ }
215
+ }
216
+ ], qe = [
217
+ {
218
+ title: "参数字段",
219
+ key: "paramName",
220
+ type: i.input,
221
+ width: "200px",
222
+ placeholder: "请输入${title}",
223
+ defaultValue: "",
224
+ validateRules: [{ required: !0, message: "${title}不能为空" }]
225
+ },
226
+ {
227
+ title: "参数文本",
228
+ key: "paramTxt",
229
+ type: i.input,
230
+ width: "200px",
231
+ placeholder: "请输入${title}",
232
+ defaultValue: "",
233
+ validateRules: [{ required: !0, message: "${title}不能为空" }]
234
+ },
235
+ {
236
+ title: "参数默认值",
237
+ key: "paramValue",
238
+ type: i.input,
239
+ width: "200px",
240
+ placeholder: "请输入${title}",
241
+ defaultValue: ""
242
+ }
243
+ ], Ne = [
244
+ {
245
+ title: "字段名字",
246
+ key: "fieldName",
247
+ type: i.input,
248
+ minWidth: "150px",
249
+ placeholder: "请输入${title}",
250
+ defaultValue: "",
251
+ validateRules: [{ required: !0, message: "${title}不能为空" }]
252
+ },
253
+ {
254
+ title: "字段文本",
255
+ key: "fieldTxt",
256
+ type: i.input,
257
+ minWidth: "150px",
258
+ placeholder: "请输入${title}",
259
+ defaultValue: "",
260
+ validateRules: [{ required: !0, message: "${title}不能为空" }]
261
+ },
262
+ {
263
+ title: "字段类型",
264
+ key: "fieldType",
265
+ minWidth: "150px",
266
+ placeholder: "请输入${title}",
267
+ defaultValue: "",
268
+ validateRules: [{ required: !0, message: "${title}不能为空" }],
269
+ type: i.select,
270
+ options: [
271
+ { title: "数值类型", value: "Integer" },
272
+ { title: "字符类型", value: "String" },
273
+ { title: "日期类型", value: "Date" },
274
+ { title: "时间类型", value: "Datetime" },
275
+ { title: "长整型", value: "Long" }
276
+ ]
277
+ },
278
+ {
279
+ title: "是否显示",
280
+ key: "isShow",
281
+ minWidth: "80px",
282
+ align: "center",
283
+ type: i.checkbox,
284
+ customValue: [1, 0],
285
+ defaultChecked: !0
286
+ },
287
+ {
288
+ title: "字段href",
289
+ key: "fieldHref",
290
+ type: i.input,
291
+ minWidth: "150px",
292
+ placeholder: "请输入${title}",
293
+ defaultValue: ""
294
+ },
295
+ {
296
+ title: "查询模式",
297
+ key: "searchMode",
298
+ type: i.select,
299
+ minWidth: "150px",
300
+ placeholder: "请选择${title}",
301
+ options: [
302
+ { title: "单条件查询", value: "single" },
303
+ { title: "范围查询", value: "group" }
304
+ ]
305
+ },
306
+ {
307
+ title: "取值表达式",
308
+ key: "replaceVal",
309
+ type: i.input,
310
+ minWidth: "150px",
311
+ placeholder: "请输入${title}",
312
+ defaultValue: ""
313
+ },
314
+ {
315
+ title: "字典code",
316
+ key: "dictCode",
317
+ type: i.input,
318
+ minWidth: "150px",
319
+ placeholder: "请输入${title}",
320
+ defaultValue: ""
321
+ },
322
+ {
323
+ title: "分组标题",
324
+ key: "groupTitle",
325
+ type: i.input,
326
+ minWidth: "150px",
327
+ placeholder: "请输入${title}",
328
+ defaultValue: ""
329
+ },
330
+ {
331
+ title: "是否查询",
332
+ key: "isSearch",
333
+ type: i.checkbox,
334
+ customValue: ["1", "0"],
335
+ minWidth: "80px",
336
+ align: "center",
337
+ defaultChecked: !1
338
+ },
339
+ {
340
+ title: "是否合计",
341
+ align: "center",
342
+ key: "isTotal",
343
+ type: i.checkbox,
344
+ customValue: ["1", "0"],
345
+ minWidth: "80px",
346
+ defaultChecked: !1
347
+ }
348
+ ], Re = { style: { flex: "1", "text-align": "left" } }, De = /* @__PURE__ */ C("br", null, null, -1), Be = /* @__PURE__ */ C("br", null, null, -1), Fe = /* @__PURE__ */ C("br", null, null, -1), Me = /* @__PURE__ */ C("br", null, null, -1), We = /* @__PURE__ */ C("br", null, null, -1), Oe = /* @__PURE__ */ C("span", { style: { color: "red" } }, "注:参数只支持动态报表,popup暂不支持", -1), rt = /* @__PURE__ */ me({
349
+ __name: "CgreportModal",
350
+ emits: ["register", "success"],
351
+ setup(t, { emit: o }) {
352
+ const { createMessage: l } = K(), m = I(!0), v = I(!0), f = I(["onlCgreportItem", "onlCgreportParam"]), h = I("onlCgreportItem"), c = I(), u = I(), V = { onlCgreportItem: u, onlCgreportParam: c }, k = z({
353
+ loading: !1,
354
+ dataSource: [],
355
+ columns: qe
356
+ }), w = z({
357
+ loading: !1,
358
+ dataSource: [],
359
+ columns: Ne
360
+ }), [Q, { setProps: H, resetFields: j, setFieldsValue: E, validate: Ae, validateFields: Z }] = ye({
361
+ // labelWidth: 150,
362
+ schemas: $e,
363
+ showActionButtonGroup: !1
364
+ }), [G, { setModalProps: L, closeModal: X }] = he((e) => q(this, null, function* () {
365
+ var r, a;
366
+ yield le(), 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 E(B({}, e.record)), W(ke, { headId: (r = e == null ? void 0 : e.record) == null ? void 0 : r.id }, k), W(we, { headId: (a = e == null ? void 0 : e.record) == null ? void 0 : a.id }, w)), H({ disabled: !(e != null && e.showFooter) });
367
+ })), [Y, ee, W, te] = _e(
368
+ ae,
369
+ re,
370
+ V,
371
+ h,
372
+ f
373
+ ), oe = fe(() => b(m) ? "编辑" : "新增");
374
+ function le() {
375
+ return q(this, null, function* () {
376
+ yield j(), h.value = "onlCgreportItem", k.dataSource = [], w.dataSource = [];
377
+ });
378
+ }
379
+ function re(e) {
380
+ let r = Object.assign({}, e.formValue);
381
+ return U(B({}, r), {
382
+ // 展开
383
+ onlCgreportParamList: e.tablesValue[1].tableData,
384
+ onlCgreportItemList: e.tablesValue[0].tableData
385
+ });
386
+ }
387
+ function ae(e) {
388
+ return q(this, null, function* () {
389
+ try {
390
+ L({ confirmLoading: !0 });
391
+ let r = [], a = [], s = {};
392
+ Object.keys(e).map((n) => {
393
+ n == "onlCgreportItemList" ? a = e[n] : n == "onlCgreportParamList" ? r = e[n] : s[n] = e[n];
394
+ }), yield Ie({ head: s, params: r, items: a }, m.value), X(), o("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, s = "sql=" + encodeURIComponent(r);
403
+ a && (s += "&dbKey=" + a), Ve(s).then((d) => {
404
+ if (d) {
405
+ l.success("解析成功");
406
+ let { fields: n, params: p } = d, g = n.filter(($) => $.fieldName != "__row_number__"), N = u.value.getTableData(), T = O(N, g || [], "fieldName");
407
+ T = T.sort(($, D) => $.orderNum - D.orderNum), w.dataSource = T;
408
+ let ie = c.value.getTableData(), R = O(ie, p || [], "paramName");
409
+ R = R.sort(($, D) => $.orderNum - D.orderNum), k.dataSource = R;
410
+ }
411
+ });
412
+ }).catch(() => {
413
+ }).finally(() => {
414
+ L({ confirmLoading: !1 });
415
+ });
416
+ }
417
+ function O(e, r, a) {
418
+ if (e.length > 0) {
419
+ let s = [], d = [], n = 1;
420
+ for (let p of r)
421
+ for (let g of e)
422
+ if (g[a] == p[a]) {
423
+ s.push(g), d.push(p[a]), g.orderNum > n && (n = g.orderNum);
424
+ break;
425
+ }
426
+ for (let p of r)
427
+ d.indexOf(p[a]) < 0 && (p.orderNum = ++n, s.push(p));
428
+ return s;
429
+ } else {
430
+ let s = 0;
431
+ for (let d of r)
432
+ d.orderNum || (d.orderNum = ++s);
433
+ return r;
434
+ }
435
+ }
436
+ return (e, r) => {
437
+ const a = S("a-icon"), s = S("a-popover"), d = S("a-button"), n = S("a-divider"), p = S("JVxeTable"), g = S("a-tab-pane"), N = S("a-tabs");
438
+ return F(), M(b(be), ge(e.$attrs, {
439
+ onRegister: b(G),
440
+ title: oe.value,
441
+ width: 1200,
442
+ maskClosable: !1,
443
+ defaultFullscreen: !0,
444
+ confirmLoading: v.value,
445
+ onOk: b(ee)
446
+ }), {
447
+ default: y(() => [
448
+ x(b(xe), {
449
+ onRegister: b(Q),
450
+ ref_key: "formRef",
451
+ ref: te
452
+ }, {
453
+ analyseButton: y(() => [
454
+ C("div", Re, [
455
+ x(s, {
456
+ title: "使用指南",
457
+ trigger: "hover",
458
+ style: { margin: "0 10px 0 6px" }
459
+ }, {
460
+ content: y(() => [
461
+ P(" 您可以键入“”作为一个参数,这里abc是参数的名称。例如:"),
462
+ De,
463
+ P(" select * from table where id = ${abc}。"),
464
+ Be,
465
+ P(" select * from table where id like concat('%',${abc},'%')。(mysql模糊查询)"),
466
+ Fe,
467
+ P(" select * from table where id like '%'||${abc}||'%'。(oracle模糊查询)"),
468
+ Me,
469
+ P(" select * from table where id like '%'+${abc}+'%'。(sqlserver模糊查询)"),
470
+ We,
471
+ Oe
472
+ ]),
473
+ default: y(() => [
474
+ x(a, { type: "question-circle" })
475
+ ]),
476
+ _: 1
477
+ }),
478
+ x(d, {
479
+ style: { "margin-left": "10px" },
480
+ type: "primary",
481
+ onClick: ne
482
+ }, {
483
+ default: y(() => [
484
+ P("SQL解析")
485
+ ]),
486
+ _: 1
487
+ })
488
+ ])
489
+ ]),
490
+ _: 1
491
+ }, 8, ["onRegister"]),
492
+ x(n, {
493
+ style: { margin: "1px 0" },
494
+ class: "cust-divider"
495
+ }),
496
+ x(N, {
497
+ activeKey: h.value,
498
+ "onUpdate:activeKey": r[0] || (r[0] = (T) => h.value = T),
499
+ animated: "",
500
+ onChange: b(Y)
501
+ }, {
502
+ default: y(() => [
503
+ (F(), M(g, {
504
+ tab: "动态报表配置明细",
505
+ key: f.value[0],
506
+ forceRender: !0
507
+ }, {
508
+ default: y(() => [
509
+ x(p, {
510
+ "keep-source": "",
511
+ dragSort: "",
512
+ resizable: "",
513
+ ref_key: "onlCgreportItem",
514
+ ref: u,
515
+ loading: w.loading,
516
+ columns: w.columns,
517
+ dataSource: w.dataSource,
518
+ height: 390,
519
+ rowNumber: !0,
520
+ rowSelection: !0,
521
+ toolbar: !0
522
+ }, null, 8, ["loading", "columns", "dataSource"])
523
+ ]),
524
+ _: 1
525
+ })),
526
+ (F(), M(g, {
527
+ tab: "报表参数",
528
+ key: f.value[1],
529
+ forceRender: !0
530
+ }, {
531
+ default: y(() => [
532
+ x(p, {
533
+ "keep-source": "",
534
+ resizable: "",
535
+ dragSort: "",
536
+ ref_key: "onlCgreportParam",
537
+ ref: c,
538
+ loading: k.loading,
539
+ columns: k.columns,
540
+ dataSource: k.dataSource,
541
+ height: 390,
542
+ rowNumber: !0,
543
+ rowSelection: !0,
544
+ toolbar: !0
545
+ }, null, 8, ["loading", "columns", "dataSource"])
546
+ ]),
547
+ _: 1
548
+ }))
549
+ ]),
550
+ _: 1
551
+ }, 8, ["activeKey", "onChange"])
552
+ ]),
553
+ _: 1
554
+ }, 16, ["onRegister", "title", "confirmLoading", "onOk"]);
555
+ };
556
+ }
557
+ });
558
+ export {
559
+ rt as _,
560
+ et as b,
561
+ ot as c,
562
+ Ye as d,
563
+ tt as g,
564
+ Xe as l,
565
+ lt as s
566
+ };