@jeecg/online 1.0.1 → 3.4.3

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 (95) hide show
  1. package/AuthButtonConfig.js +15 -9
  2. package/AuthButtonTree.js +4 -7
  3. package/AuthDataConfig.js +10 -8
  4. package/AuthDataTree.js +4 -7
  5. package/AuthFieldConfig.js +16 -14
  6. package/AuthFieldTree.js +25 -20
  7. package/AuthManagerDrawer.js +2 -3
  8. package/AuthSetterModal.js +2 -2
  9. package/CgformCopyList.js +34 -24
  10. package/CgformModal.js +57 -50
  11. package/CgreportModal.js +32 -39
  12. package/CheckDictTable.js +146 -26
  13. package/CodeFileListModal.js +174 -0
  14. package/CodeFileViewModal.js +324 -0
  15. package/CodeGeneratorModal.js +42 -40
  16. package/CustomButtonList.js +19 -23
  17. package/DBAttributeTable.js +250 -14
  18. package/DbToOnlineModal.js +28 -27
  19. package/DetailForm.js +607 -0
  20. package/EnhanceJavaModal.js +12 -19
  21. package/EnhanceJsHistory.js +6 -8
  22. package/EnhanceJsModal.js +17 -18
  23. package/EnhanceSqlModal.js +12 -19
  24. package/ExtendConfigModal.js +26 -17
  25. package/FileSelectModal.js +1 -2
  26. package/ForeignKeyTable.js +6 -5
  27. package/FormSchemaFactory.js +163 -30
  28. package/IndexTable.js +8 -7
  29. package/JModalTip.js +54 -0
  30. package/LeftDepart.js +3 -3
  31. package/LeftRole.js +8 -6
  32. package/LeftUser.js +8 -6
  33. package/LinkTableConfigModal.js +288 -0
  34. package/LinkTableFieldConfigModal.js +217 -0
  35. package/LinkTableListPiece.js +36 -0
  36. package/ModalFormDemo.js +4 -4
  37. package/OnlCgReportList.js +34 -0
  38. package/OnlineAutoList.js +155 -58
  39. package/OnlineAutoModal.js +91 -132
  40. package/OnlineAutoTreeList.js +92 -54
  41. package/OnlineCustomModal.js +31 -17
  42. package/OnlineDetailModal.js +182 -0
  43. package/OnlineForm.js +272 -141
  44. package/OnlineFormDetail.js +324 -0
  45. package/OnlineQueryForm.js +72 -42
  46. package/OnlineSearchFormItem.js +28 -23
  47. package/OnlineSubFormDetail.js +165 -0
  48. package/OnlineSuperQuery.js +72 -76
  49. package/OnlineSuperQueryValComponent.js +1 -0
  50. package/OnlineSuperQueryValComponent.vue_vue_type_script_lang.js +1 -17
  51. package/PageAttributeTable.js +233 -31
  52. package/ProcessOnlineForm.js +41 -18
  53. package/QueryTable.js +6 -5
  54. package/README.md +3 -8
  55. package/_arrayPush.js +5 -3
  56. package/{cloneDeep.js → _baseClone.js} +5 -9
  57. package/_baseSlice.js +18 -0
  58. package/_commonjsHelpers.js +5 -0
  59. package/_flatRest.js +174 -0
  60. package/auth.data.js +1 -3
  61. package/cgform.data.js +18 -9
  62. package/enhance.api.js +27 -18
  63. package/index.js +358 -34
  64. package/index2.js +49 -48
  65. package/index3.js +29 -26
  66. package/isArray.js +1 -1
  67. package/main.index.js +3 -3
  68. package/omit.js +60 -0
  69. package/package.json +1 -1
  70. package/pick.js +3 -173
  71. package/style.css +1 -1
  72. package/toString.js +2 -2
  73. package/useAutoForm.js +3457 -3792
  74. package/useCgformList.js +44 -31
  75. package/{useTableColumns.js → useListButton.js} +218 -409
  76. package/useOnlineTest.js +5 -26827
  77. package/useSchemas.js +382 -234
  78. package/useTableSync.js +19 -7
  79. package/ChartAutoRender.js +0 -69
  80. package/ChartDoubleRender.js +0 -154
  81. package/ChartSingleRender.js +0 -132
  82. package/ChartTabsRender.js +0 -218
  83. package/ErrorTip.js +0 -21
  84. package/FieldTable.js +0 -185
  85. package/GraphreportAutoChart.js +0 -352
  86. package/GraphreportList.js +0 -239
  87. package/GraphreportModal.js +0 -559
  88. package/JOnlineSearchSelect.js +0 -107
  89. package/LICENSE +0 -7
  90. package/OnlineSelectCascade.js +0 -217
  91. package/OnlineSubForm.js +0 -200
  92. package/ParamsTable.js +0 -71
  93. package/graphreport.api.js +0 -23
  94. package/useChartRender.js +0 -405
  95. package/useMessageOnline.js +0 -71
@@ -1,559 +0,0 @@
1
- var __defProp = Object.defineProperty;
2
- var __defProps = Object.defineProperties;
3
- var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
4
- var __getOwnPropSymbols = Object.getOwnPropertySymbols;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __propIsEnum = Object.prototype.propertyIsEnumerable;
7
- var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
8
- var __spreadValues = (a, b) => {
9
- for (var prop in b || (b = {}))
10
- if (__hasOwnProp.call(b, prop))
11
- __defNormalProp(a, prop, b[prop]);
12
- if (__getOwnPropSymbols)
13
- for (var prop of __getOwnPropSymbols(b)) {
14
- if (__propIsEnum.call(b, prop))
15
- __defNormalProp(a, prop, b[prop]);
16
- }
17
- return a;
18
- };
19
- var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
20
- var __async = (__this, __arguments, generator) => {
21
- return new Promise((resolve, reject) => {
22
- var fulfilled = (value) => {
23
- try {
24
- step(generator.next(value));
25
- } catch (e) {
26
- reject(e);
27
- }
28
- };
29
- var rejected = (value) => {
30
- try {
31
- step(generator.throw(value));
32
- } catch (e) {
33
- reject(e);
34
- }
35
- };
36
- var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
37
- step((generator = generator.apply(__this, __arguments)).next());
38
- });
39
- };
40
- import { ref, computed, defineComponent, reactive, nextTick, resolveComponent, openBlock, createBlock, mergeProps, withCtx, createVNode, createElementVNode, createTextVNode } from "vue";
41
- import { BasicModal, useModalInner } from "/@/components/Modal";
42
- import { BasicForm, useForm } from "/@/components/Form/index";
43
- import { useMessage } from "/@/hooks/web/useMessage";
44
- import { duplicateCheck } from "/@/views/system/user/user.api";
45
- import { bindMapFormSchema } from "/@/utils/common/compUtils";
46
- import { usePermissionStore } from "/@/store/modules/permission";
47
- import FieldTable from "./FieldTable.js";
48
- import ParamsTable from "./ParamsTable.js";
49
- import { defHttp } from "/@/utils/http/axios";
50
- import { isArray } from "/@/utils/is";
51
- import { _ as _export_sfc } from "./index.js";
52
- import "/@/components/jeecg/JVxeTable/types";
53
- import "./useMessageOnline.js";
54
- import "ant-design-vue";
55
- import "@ant-design/icons-vue";
56
- import "/@/components/jeecg/OnLine/JPopupOnlReport.vue";
57
- import "vue-router";
58
- function useFormSchemas(_, handler) {
59
- const permissionStore = usePermissionStore();
60
- const mapFormSchema = bindMapFormSchema({
61
- one: {
62
- colProps: { xs: 24, sm: 24 },
63
- itemProps: {
64
- labelCol: { xs: 24, sm: 2 },
65
- wrapperCol: { xs: 24, sm: 22 }
66
- }
67
- },
68
- tow: {
69
- colProps: { xs: 24, sm: 12 },
70
- itemProps: {
71
- labelCol: { xs: 24, sm: 4 },
72
- wrapperCol: { xs: 24, sm: 20 }
73
- }
74
- },
75
- threeTow: {
76
- colProps: { xs: 24, sm: 16 },
77
- itemProps: {
78
- labelCol: { xs: 24, sm: 3 },
79
- wrapperCol: { xs: 24, sm: 21 }
80
- }
81
- },
82
- three: {
83
- colProps: { xs: 24, sm: 8 },
84
- itemProps: {
85
- labelCol: { xs: 24, sm: 6 },
86
- wrapperCol: { xs: 24, sm: 18 }
87
- }
88
- }
89
- }, "three");
90
- const dataType = ref("sql");
91
- const isCombination = ref("combination");
92
- const formInfo = {
93
- cgrSql: {
94
- sql: { label: "\u67E5\u8BE2SQL", placeholder: "\u8BF7\u8F93\u5165\u67E5\u8BE2SQL", language: "sql" },
95
- json: { label: "\u6570\u636EJSON", placeholder: "\u8BF7\u8F93\u5165\u6570\u636EJSON", language: "javascript" },
96
- api: { label: "API\u63A5\u53E3", placeholder: "\u8BF7\u8F93\u5165API\u63A5\u53E3", language: "javascript" }
97
- }
98
- };
99
- const cgrSqlFormInfo = computed(() => {
100
- return formInfo.cgrSql[dataType.value];
101
- });
102
- const formSchemas = computed(() => {
103
- var _a, _b, _c;
104
- return [
105
- { label: "ID", field: "id", component: "Input", show: false },
106
- mapFormSchema({
107
- label: "\u56FE\u8868\u540D\u79F0",
108
- field: "name",
109
- component: "Input",
110
- required: true
111
- }),
112
- mapFormSchema({
113
- label: "\u7F16\u7801",
114
- field: "code",
115
- component: "Input",
116
- dynamicRules({ model }) {
117
- return [
118
- { required: true, message: "\u8BF7\u8F93\u5165\u7F16\u7801!" },
119
- {
120
- validator(_0, _1) {
121
- return __async(this, arguments, function* ({}, value) {
122
- if (/[\u4E00-\u9FA5]/g.test(value)) {
123
- return Promise.reject("\u7F16\u7801\u4E0D\u80FD\u4E3A\u6C49\u5B57");
124
- }
125
- let { success, message } = yield duplicateCheck({
126
- tableName: "onl_graphreport_head",
127
- fieldName: "code",
128
- fieldVal: value,
129
- dataId: model.id
130
- });
131
- if (!success) {
132
- return Promise.reject(message);
133
- }
134
- });
135
- }
136
- }
137
- ];
138
- }
139
- }),
140
- mapFormSchema({
141
- label: "\u5C55\u793A\u6A21\u677F",
142
- field: "displayTemplate",
143
- component: "Select",
144
- componentProps: {
145
- options: [
146
- { label: "Tab\u98CE\u683C", value: "tab" },
147
- { label: "\u5355\u6392\u5E03\u5C40", value: "single" },
148
- { label: "\u53CC\u6392\u5E03\u5C40", value: "double" }
149
- ]
150
- },
151
- defaultValue: "tab"
152
- }),
153
- mapFormSchema({
154
- label: "X\u8F74\u5B57\u6BB5",
155
- field: "xaxisField",
156
- component: "Input",
157
- required: true
158
- }),
159
- mapFormSchema({
160
- label: "Y\u8F74\u5B57\u6BB5",
161
- field: "yaxisField",
162
- component: "JDictSelectTag",
163
- componentProps: {
164
- mode: "tags",
165
- open: false,
166
- dictCode: "online_graph_display_template"
167
- },
168
- required: true
169
- }, "threeTow"),
170
- mapFormSchema({
171
- label: "\u6570\u636E\u7C7B\u578B",
172
- field: "dataType",
173
- component: "JDictSelectTag",
174
- componentProps: {
175
- dictCode: "online_graph_data_type",
176
- showChooseOption: false,
177
- onChange: (value) => dataType.value = value
178
- },
179
- defaultValue: "sql"
180
- }),
181
- mapFormSchema({
182
- label: "\u6570\u636E\u6E90",
183
- field: "dbSource",
184
- component: "Select",
185
- componentProps: {
186
- options: handler.dbSourceOptions.value
187
- },
188
- rules: [{ required: permissionStore.sysSafeMode, message: "\u8BF7\u9009\u62E9\u6570\u636E\u6E90\uFF01" }],
189
- ifShow: ({ model }) => model.dataType === "sql"
190
- }),
191
- mapFormSchema({
192
- label: "\u56FE\u8868\u7C7B\u578B",
193
- field: "graphType",
194
- component: "JDictSelectTag",
195
- componentProps: {
196
- mode: isCombination.value === "single" ? "default" : "multiple",
197
- dictCode: "online_graph_type",
198
- showChooseOption: false
199
- },
200
- defaultValue: ["bar"]
201
- }, dataType.value === "sql" ? "three" : "threeTow"),
202
- mapFormSchema({
203
- label: "\u63CF\u8FF0",
204
- field: "content",
205
- component: "Input"
206
- }, "one"),
207
- mapFormSchema({
208
- label: (_a = cgrSqlFormInfo.value) == null ? void 0 : _a.label,
209
- field: "cgrSql",
210
- required: true,
211
- component: "JCodeEditor",
212
- componentProps: {
213
- placeholder: (_b = cgrSqlFormInfo.value) == null ? void 0 : _b.placeholder,
214
- language: (_c = cgrSqlFormInfo.value) == null ? void 0 : _c.language,
215
- fullScreen: true,
216
- autoHeight: "!ie",
217
- height: "150px"
218
- },
219
- dynamicRules() {
220
- var _a2;
221
- return [
222
- {
223
- required: true,
224
- message: (_a2 = cgrSqlFormInfo.value) == null ? void 0 : _a2.placeholder
225
- },
226
- {
227
- validator(_0, _1) {
228
- return __async(this, arguments, function* ({}, value) {
229
- if (value && dataType.value === "json") {
230
- try {
231
- JSON.parse(value);
232
- } catch (e) {
233
- return Promise.reject("JSON\u683C\u5F0F\u4E0D\u6B63\u786E\uFF01");
234
- }
235
- }
236
- });
237
- }
238
- }
239
- ];
240
- }
241
- }, "one"),
242
- mapFormSchema({
243
- label: " ",
244
- field: "cgrSql",
245
- component: "Input",
246
- slot: "SQLAnalyzeButton",
247
- itemProps: { colon: false },
248
- ifShow: ({ model }) => model.dataType === "sql"
249
- }, "one"),
250
- mapFormSchema({
251
- label: "JS\u589E\u5F3A",
252
- field: "extendJs",
253
- component: "JCodeEditor",
254
- componentProps: {
255
- placeholder: "JS\u589E\u5F3A",
256
- language: "javascript",
257
- fullScreen: true,
258
- autoHeight: "!ie",
259
- height: "150px"
260
- }
261
- }, "one")
262
- ];
263
- });
264
- return { formSchemas, dataType, isCombination };
265
- }
266
- const _sfc_main = defineComponent({
267
- name: "GraphreportModal",
268
- components: { ParamsTable, FieldTable, BasicModal, BasicForm },
269
- emits: ["register", "success"],
270
- setup(props, { emit }) {
271
- const { createMessage: $message } = useMessage();
272
- const isUpdate = ref(false);
273
- const fieldTableRef = ref();
274
- const paramsTableRef = ref();
275
- let model = {};
276
- const title = computed(() => isUpdate.value ? "\u7F16\u8F91" : "\u65B0\u589E");
277
- const activeKey = ref("field");
278
- const confirmLoading = ref(false);
279
- const dbSourceOptions = ref([]);
280
- const fieldTable = reactive({
281
- dataSource: []
282
- });
283
- const paramsTable = reactive({
284
- dataSource: []
285
- });
286
- const [registerModal, { closeModal }] = useModalInner((data) => {
287
- var _a;
288
- isUpdate.value = (_a = data == null ? void 0 : data.isUpdate) != null ? _a : false;
289
- if (isUpdate.value) {
290
- edit(data == null ? void 0 : data.record);
291
- } else {
292
- add();
293
- }
294
- });
295
- const { formSchemas, dataType, isCombination } = useFormSchemas(props, {
296
- dbSourceOptions
297
- });
298
- const [registerForm, { resetFields, clearValidate, setFieldsValue, validate }] = useForm({
299
- schemas: formSchemas,
300
- showActionButtonGroup: false,
301
- labelAlign: "right"
302
- });
303
- function add() {
304
- return __async(this, null, function* () {
305
- var _a, _b;
306
- fieldTable.dataSource = [];
307
- paramsTable.dataSource = [];
308
- yield nextTick();
309
- (_b = (_a = fieldTableRef.value) == null ? void 0 : _a.tableRef) == null ? void 0 : _b.addRows({}, { setActive: false });
310
- edit({});
311
- });
312
- }
313
- function edit(record) {
314
- return __async(this, null, function* () {
315
- var _a;
316
- confirmLoading.value = false;
317
- activeKey.value = "field";
318
- yield resetFields();
319
- model = Object.assign({}, record);
320
- model.dbSource = model.dbSource == null ? "" : model.dbSource;
321
- if (isCombination.value === "combination" && typeof model.graphType === "string") {
322
- model.graphType = model.graphType.split(",");
323
- }
324
- if (typeof model.yaxisField === "string") {
325
- model.yaxisField = model.yaxisField.split(",");
326
- }
327
- yield setFieldsValue(model);
328
- yield clearValidate();
329
- dataType.value = (_a = model.dataType) != null ? _a : "sql";
330
- if (model.id) {
331
- requestSubData(model.id);
332
- }
333
- });
334
- }
335
- function requestSubData(headId) {
336
- confirmLoading.value = true;
337
- requestTabData("/online/graphreport/head/queryOnlGraphreportItemByMainId", { id: headId }, fieldTable).finally(() => {
338
- confirmLoading.value = false;
339
- });
340
- requestTabData("/online/graphreport/params/listByHeadId", { headId }, paramsTable);
341
- }
342
- function requestTabData(url, params, tab) {
343
- return defHttp.get({ url, params }).then((result) => {
344
- tab.dataSource = result || [];
345
- });
346
- }
347
- function onSQLAnalyze() {
348
- return __async(this, null, function* () {
349
- var _a, _b;
350
- confirmLoading.value = true;
351
- try {
352
- let { cgrSql } = yield validate(["cgrSql"]);
353
- let result = yield defHttp.get({ url: "/online/cgreport/head/parseSql", params: { sql: cgrSql } });
354
- $message.success("\u89E3\u6790\u6210\u529F");
355
- let newData = (result.fields || []).map((item) => {
356
- item.isShow = item.isShow === 1 ? "Y" : "N";
357
- return item;
358
- });
359
- let oldData = (_b = (_a = fieldTableRef.value) == null ? void 0 : _a.tableRef) == null ? void 0 : _b.getTableData();
360
- fieldTable.dataSource = getTableData(oldData, newData, "fieldName");
361
- paramsTable.dataSource = getTableData(paramsTable.dataSource, result.params || [], "paramName");
362
- } finally {
363
- confirmLoading.value = false;
364
- }
365
- });
366
- }
367
- function onSubmit() {
368
- return __async(this, null, function* () {
369
- var _a, _b, _c, _d;
370
- try {
371
- let mainValues = yield validate();
372
- let errMap = yield (_b = (_a = fieldTableRef.value) == null ? void 0 : _a.tableRef) == null ? void 0 : _b.validateTable();
373
- if (errMap) {
374
- activeKey.value = "field";
375
- return;
376
- }
377
- errMap = yield (_d = (_c = paramsTableRef.value) == null ? void 0 : _c.tableRef) == null ? void 0 : _d.validateTable();
378
- if (errMap) {
379
- activeKey.value = "params";
380
- return;
381
- }
382
- let formData = classifyIntoFormData(mainValues);
383
- confirmLoading.value = true;
384
- yield request(formData);
385
- emit("success");
386
- closeModal();
387
- } finally {
388
- confirmLoading.value = false;
389
- }
390
- });
391
- }
392
- function request(params) {
393
- if (isUpdate.value) {
394
- return defHttp.put({ url: "/online/graphreport/head/edit", params });
395
- } else {
396
- return defHttp.post({ url: "/online/graphreport/head/add", params });
397
- }
398
- }
399
- function classifyIntoFormData(mainValues) {
400
- var _a, _b, _c, _d;
401
- let main = Object.assign(model, mainValues);
402
- if (isArray(main.graphType)) {
403
- main.graphType = main.graphType.join(",");
404
- }
405
- if (isArray(main.yaxisField)) {
406
- main.yaxisField = main.yaxisField.join(",");
407
- }
408
- return __spreadProps(__spreadValues({}, main), {
409
- onlGraphreportItemList: (_b = (_a = fieldTableRef.value) == null ? void 0 : _a.tableRef) == null ? void 0 : _b.getTableData(),
410
- paramsList: (_d = (_c = paramsTableRef.value) == null ? void 0 : _c.tableRef) == null ? void 0 : _d.getTableData()
411
- });
412
- }
413
- function onCancel() {
414
- closeModal();
415
- }
416
- function queryDataSourceOptions() {
417
- return __async(this, null, function* () {
418
- let url = "/sys/dataSource/options";
419
- try {
420
- let result = yield defHttp.get({ url });
421
- dbSourceOptions.value = result || [];
422
- dbSourceOptions.value.unshift({ label: "\u8BF7\u9009\u62E9", value: "" });
423
- } catch (e) {
424
- dbSourceOptions.value = [{ label: "\u52A0\u8F7D\u5931\u8D25", value: void 0 }];
425
- }
426
- });
427
- }
428
- queryDataSourceOptions();
429
- return {
430
- fieldTableRef,
431
- paramsTableRef,
432
- title,
433
- confirmLoading,
434
- activeKey,
435
- fieldTable,
436
- paramsTable,
437
- onSubmit,
438
- onCancel,
439
- onSQLAnalyze,
440
- registerModal,
441
- registerForm
442
- };
443
- }
444
- });
445
- function getTableData(oldData, newData, columnName) {
446
- newData.forEach((newItem) => {
447
- for (let oldItem of oldData) {
448
- if (oldItem[columnName] === newItem[columnName]) {
449
- Object.assign(newItem, oldItem);
450
- break;
451
- }
452
- }
453
- });
454
- return newData;
455
- }
456
- const _hoisted_1 = { style: { "flex": "1", "text-align": "right" } };
457
- const _hoisted_2 = /* @__PURE__ */ createTextVNode("SQL\u89E3\u6790");
458
- const _hoisted_3 = /* @__PURE__ */ createTextVNode("\u5173\u95ED");
459
- const _hoisted_4 = /* @__PURE__ */ createTextVNode("\u4FDD\u5B58");
460
- function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
461
- const _component_a_button = resolveComponent("a-button");
462
- const _component_BasicForm = resolveComponent("BasicForm");
463
- const _component_FieldTable = resolveComponent("FieldTable");
464
- const _component_a_tab_pane = resolveComponent("a-tab-pane");
465
- const _component_ParamsTable = resolveComponent("ParamsTable");
466
- const _component_a_tabs = resolveComponent("a-tabs");
467
- const _component_a_spin = resolveComponent("a-spin");
468
- const _component_BasicModal = resolveComponent("BasicModal");
469
- return openBlock(), createBlock(_component_BasicModal, mergeProps({
470
- title: _ctx.title,
471
- width: 1200,
472
- maskClosable: false,
473
- confirmLoading: _ctx.confirmLoading,
474
- defaultFullscreen: ""
475
- }, _ctx.$attrs, {
476
- onCancel: _ctx.onCancel,
477
- onRegister: _ctx.registerModal
478
- }), {
479
- footer: withCtx(() => [
480
- createVNode(_component_a_button, { onClick: _ctx.onCancel }, {
481
- default: withCtx(() => [
482
- _hoisted_3
483
- ]),
484
- _: 1
485
- }, 8, ["onClick"]),
486
- createVNode(_component_a_button, {
487
- type: "primary",
488
- loading: _ctx.confirmLoading,
489
- preIcon: "ant-design:save",
490
- onClick: _ctx.onSubmit
491
- }, {
492
- default: withCtx(() => [
493
- _hoisted_4
494
- ]),
495
- _: 1
496
- }, 8, ["loading", "onClick"])
497
- ]),
498
- default: withCtx(() => [
499
- createVNode(_component_a_spin, { spinning: _ctx.confirmLoading }, {
500
- default: withCtx(() => [
501
- createVNode(_component_BasicForm, { onRegister: _ctx.registerForm }, {
502
- SQLAnalyzeButton: withCtx(() => [
503
- createElementVNode("div", _hoisted_1, [
504
- createVNode(_component_a_button, {
505
- type: "primary",
506
- onClick: _ctx.onSQLAnalyze
507
- }, {
508
- default: withCtx(() => [
509
- _hoisted_2
510
- ]),
511
- _: 1
512
- }, 8, ["onClick"])
513
- ])
514
- ]),
515
- _: 1
516
- }, 8, ["onRegister"]),
517
- createVNode(_component_a_tabs, {
518
- activeKey: _ctx.activeKey,
519
- "onUpdate:activeKey": _cache[0] || (_cache[0] = ($event) => _ctx.activeKey = $event)
520
- }, {
521
- default: withCtx(() => [
522
- createVNode(_component_a_tab_pane, {
523
- tab: "\u5217\u8868\u5B57\u6BB5",
524
- key: "field",
525
- forceRender: ""
526
- }, {
527
- default: withCtx(() => [
528
- createVNode(_component_FieldTable, {
529
- ref: "fieldTableRef",
530
- dataSource: _ctx.fieldTable.dataSource
531
- }, null, 8, ["dataSource"])
532
- ]),
533
- _: 1
534
- }),
535
- createVNode(_component_a_tab_pane, {
536
- tab: "\u56FE\u8868\u53C2\u6570",
537
- key: "params",
538
- forceRender: ""
539
- }, {
540
- default: withCtx(() => [
541
- createVNode(_component_ParamsTable, {
542
- ref: "paramsTableRef",
543
- dataSource: _ctx.paramsTable.dataSource
544
- }, null, 8, ["dataSource"])
545
- ]),
546
- _: 1
547
- })
548
- ]),
549
- _: 1
550
- }, 8, ["activeKey"])
551
- ]),
552
- _: 1
553
- }, 8, ["spinning"])
554
- ]),
555
- _: 1
556
- }, 16, ["title", "confirmLoading", "onCancel", "onRegister"]);
557
- }
558
- var GraphreportModal = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
559
- export { GraphreportModal as default };
@@ -1,107 +0,0 @@
1
- import { useDebounceFn } from "@vueuse/core";
2
- import { defHttp } from "/@/utils/http/axios";
3
- import { useMessage } from "/@/hooks/web/useMessage";
4
- import { ref, watch, resolveComponent, openBlock, createBlock, withCtx, createElementBlock, Fragment, renderList, createTextVNode, toDisplayString } from "vue";
5
- import { _ as _export_sfc } from "./index.js";
6
- import "/@/components/jeecg/OnLine/JPopupOnlReport.vue";
7
- import "vue-router";
8
- const { createMessage: $message } = useMessage();
9
- const _sfc_main = {
10
- name: "JOnlineSearchSelect",
11
- props: {
12
- placeholder: {
13
- type: String,
14
- default: "",
15
- required: false
16
- },
17
- value: {
18
- type: String,
19
- required: false
20
- },
21
- sql: {
22
- type: String,
23
- required: true
24
- }
25
- },
26
- emits: ["update:value"],
27
- setup(props, { emit }) {
28
- let selected = ref("");
29
- let selectOptions = ref([]);
30
- watch(() => props.value, (newVal) => {
31
- if (!newVal) {
32
- selected.value = void 0;
33
- } else {
34
- selected.value = newVal;
35
- }
36
- }, { immediate: true });
37
- watch(() => props.sql, () => {
38
- resetOptions();
39
- }, { immediate: true });
40
- const handleSearch = useDebounceFn(searchByKeyword, 800);
41
- function searchByKeyword(keyword = "") {
42
- let params = {
43
- keyword
44
- };
45
- let url = "/online/cgreport/api/getReportDictList?sql=" + props.sql;
46
- defHttp.get({ url, params }, { isTransformResponse: false }).then((res) => {
47
- if (res.success) {
48
- if (res.result && res.result.length > 0) {
49
- selectOptions.value = res.result;
50
- } else {
51
- selectOptions.value = [];
52
- }
53
- } else {
54
- $message.warning(res.message);
55
- }
56
- });
57
- }
58
- function handleChange(value) {
59
- emit("update:value", value);
60
- if (!value || value == "") {
61
- resetOptions();
62
- }
63
- }
64
- function resetOptions() {
65
- selectOptions.value = [];
66
- searchByKeyword();
67
- }
68
- return {
69
- selectOptions,
70
- handleSearch,
71
- handleChange,
72
- selected
73
- };
74
- }
75
- };
76
- function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
77
- const _component_a_select_option = resolveComponent("a-select-option");
78
- const _component_a_select = resolveComponent("a-select");
79
- return openBlock(), createBlock(_component_a_select, {
80
- value: $setup.selected,
81
- placeholder: $props.placeholder,
82
- "show-search": "",
83
- "default-active-first-option": false,
84
- "show-arrow": true,
85
- "filter-option": false,
86
- "not-found-content": null,
87
- onSearch: $setup.handleSearch,
88
- onChange: $setup.handleChange,
89
- allowClear: ""
90
- }, {
91
- default: withCtx(() => [
92
- (openBlock(true), createElementBlock(Fragment, null, renderList($setup.selectOptions, (d) => {
93
- return openBlock(), createBlock(_component_a_select_option, {
94
- key: d.value
95
- }, {
96
- default: withCtx(() => [
97
- createTextVNode(toDisplayString(d.text), 1)
98
- ]),
99
- _: 2
100
- }, 1024);
101
- }), 128))
102
- ]),
103
- _: 1
104
- }, 8, ["value", "placeholder", "onSearch", "onChange"]);
105
- }
106
- var JOnlineSearchSelect = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
107
- export { JOnlineSearchSelect as default };
package/LICENSE DELETED
@@ -1,7 +0,0 @@
1
- ## 协议和授权
2
-
3
- Jeecg Boot Online 低代码模块并非开源软件部分,作者保留全部的权利。
4
- 此部分不提供源码,仅提供功能,大家可以免费使用,但不允许用于商业目的。
5
- 擅自编译、改造、传播,即属严重侵权行为,与盗窃无异。产生的一切任何后果责任由侵权者自负。
6
-
7
- http://www.jeecg.com