@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
package/CgformModal.js CHANGED
@@ -37,7 +37,7 @@ var __async = (__this, __arguments, generator) => {
37
37
  step((generator = generator.apply(__this, __arguments)).next());
38
38
  });
39
39
  };
40
- import { defineComponent, ref, computed, provide, reactive, nextTick, resolveComponent, openBlock, createBlock, mergeProps, withCtx, createVNode, createElementBlock, Fragment, renderList, createTextVNode, toDisplayString, createCommentVNode, createElementVNode } from "vue";
40
+ import { defineComponent, ref, computed, provide, reactive, nextTick, resolveComponent, openBlock, createBlock, mergeProps, withCtx, createVNode, createTextVNode, createElementBlock, Fragment, renderList, toDisplayString, createCommentVNode, createElementVNode, toRaw } from "vue";
41
41
  import { BasicModal, useModalInner, useModal } from "/@/components/Modal";
42
42
  import { BasicForm, useForm } from "/@/components/Form/index";
43
43
  import { useMessage } from "/@/hooks/web/useMessage";
@@ -49,7 +49,7 @@ import ForeignKeyTable from "./ForeignKeyTable.js";
49
49
  import IndexTable from "./IndexTable.js";
50
50
  import QueryTable from "./QueryTable.js";
51
51
  import ExtendConfigModal from "./ExtendConfigModal.js";
52
- import { u as useInitialData, E as ExtConfigDefaultJson, V as VALIDATE_FAILED, a as useTreeNeedFields } from "./cgform.data.js";
52
+ import { u as useInitialData, E as ExtConfigDefaultJson, a as useTreeNeedFields, V as VALIDATE_FAILED } from "./cgform.data.js";
53
53
  import { defHttp } from "/@/utils/http/axios";
54
54
  import { simpleDebounce } from "/@/utils/common/compUtils";
55
55
  import { u as useOnlineTest } from "./useOnlineTest.js";
@@ -61,13 +61,16 @@ const list = (params) => defHttp.get({ url: "/online/cgform/head/list", params }
61
61
  const doBatchRemove = (idList) => doRemove(idList, 0);
62
62
  const doBatchDelete = (idList) => doRemove(idList, 1);
63
63
  function doRemove(idList, flag) {
64
- return defHttp.delete({
65
- url: "/online/cgform/head/deleteBatch",
66
- params: {
67
- ids: idList.join(","),
68
- flag
69
- }
70
- }, { joinParamsToUrl: true });
64
+ return defHttp.delete(
65
+ {
66
+ url: "/online/cgform/head/deleteBatch",
67
+ params: {
68
+ ids: idList.join(","),
69
+ flag
70
+ }
71
+ },
72
+ { joinParamsToUrl: true }
73
+ );
71
74
  }
72
75
  const doDatabaseSync = (id, method) => defHttp.post({ url: `${"/online/cgform/api/doDbSynch"}/${id}/${method}`, timeout: 12e3, timeoutErrorMessage: "\u540C\u6B65\u6570\u636E\u5E93\u8D85\u65F6\uFF0C\u5DF2\u81EA\u52A8\u5237\u65B0" });
73
76
  const doCopyOnlineView = (id) => defHttp.post({ url: `${"/online/cgform/head/copyOnline"}?code=${id}` });
@@ -81,6 +84,9 @@ const formApi = {
81
84
  } else {
82
85
  return defHttp.post({ url: "/online/cgform/api/addAll", params });
83
86
  }
87
+ },
88
+ editHead: (params) => {
89
+ return defHttp.put({ url: "/online/cgform/head/edit", params });
84
90
  }
85
91
  };
86
92
  const _sfc_main = defineComponent({
@@ -155,20 +161,7 @@ const _sfc_main = defineComponent({
155
161
  let showSubTableStr = false;
156
162
  let treeFieldAdded = false;
157
163
  let treeFieldIds = [];
158
- const {
159
- aiTestMode,
160
- aiTestTable,
161
- aiTableList,
162
- initVirtualData,
163
- tableJsonGetHelper,
164
- refreshCacheTableName
165
- } = useOnlineTest({
166
- oldTableName,
167
- tables
168
- }, {
169
- initialAllShowItem,
170
- setAllTableData
171
- }, formAction);
164
+ const { aiTestMode, aiTestTable, aiTableList, initVirtualData, tableJsonGetHelper, refreshCacheTableName } = useOnlineTest();
172
165
  function add() {
173
166
  edit({});
174
167
  }
@@ -351,7 +344,10 @@ const _sfc_main = defineComponent({
351
344
  function validateAll() {
352
345
  let options = {};
353
346
  return new Promise((resolve, reject) => {
354
- validate().then((values) => resolve({ values }), () => reject(VALIDATE_FAILED));
347
+ validate().then(
348
+ (values) => resolve({ values }),
349
+ () => reject(VALIDATE_FAILED)
350
+ );
355
351
  }).then((result) => {
356
352
  Object.assign(options, result);
357
353
  return validateTableFields();
@@ -460,29 +456,43 @@ const _sfc_main = defineComponent({
460
456
  }
461
457
  function onSubmit() {
462
458
  confirmLoading.value = true;
463
- validateAll().then((formData) => __async(this, null, function* () {
464
- var _a;
465
- if (formData.fields && formData.fields.length > 0) {
466
- for (let field of formData.fields) {
467
- field.dbFieldName = field.dbFieldName.toLowerCase().trim();
459
+ validateAll().then(
460
+ (formData) => __async(this, null, function* () {
461
+ var _a;
462
+ if (formData.fields && formData.fields.length > 0) {
463
+ for (let field of formData.fields) {
464
+ field.dbFieldName = field.dbFieldName.toLowerCase().trim();
465
+ }
468
466
  }
467
+ if ((_a = formData.head) == null ? void 0 : _a.tableName) {
468
+ formData.head.tableName = formData.head.tableName.toLowerCase().trim();
469
+ }
470
+ yield formApi.doSaveOrUpdate(formData, isUpdate.value);
471
+ refreshCacheTableName(oldTableName.value, formData.head["tableName"]);
472
+ emit("success");
473
+ sleep(1, () => onCancel());
474
+ }),
475
+ (e) => {
476
+ console.error(e);
469
477
  }
470
- if ((_a = formData.head) == null ? void 0 : _a.tableName) {
471
- formData.head.tableName = formData.head.tableName.toLowerCase().trim();
472
- }
473
- yield formApi.doSaveOrUpdate(formData, isUpdate.value);
474
- refreshCacheTableName(oldTableName.value, formData.head["tableName"]);
475
- emit("success");
476
- sleep(1, () => onCancel());
477
- }), (e) => {
478
- console.error(e);
479
- }).finally(() => {
478
+ ).finally(() => {
480
479
  confirmLoading.value = false;
481
480
  });
482
481
  }
483
482
  const [registerExtendConfigModal, extendConfigModal] = useModal();
484
483
  function onExtConfigOk(values) {
485
- extConfigJson = values;
484
+ return __async(this, null, function* () {
485
+ extConfigJson = values;
486
+ if (isUpdate.value == true) {
487
+ let json = toRaw(extConfigJson);
488
+ const params = {
489
+ id: model.id,
490
+ extConfigJson: JSON.stringify(json)
491
+ };
492
+ yield formApi.editHead(params);
493
+ emit("success");
494
+ }
495
+ });
486
496
  }
487
497
  function onOpenExtConfig() {
488
498
  extendConfigModal.openModal(true, {
@@ -524,14 +534,10 @@ const _sfc_main = defineComponent({
524
534
  }
525
535
  });
526
536
  const _hoisted_1 = { style: { "flex": "1", "text-align": "right" } };
527
- const _hoisted_2 = /* @__PURE__ */ createTextVNode("\u6269\u5C55\u914D\u7F6E");
528
- const _hoisted_3 = /* @__PURE__ */ createTextVNode("\u5173\u95ED");
529
- const _hoisted_4 = /* @__PURE__ */ createTextVNode("\u4FDD\u5B58");
530
- const _hoisted_5 = {
537
+ const _hoisted_2 = {
531
538
  key: 0,
532
539
  style: { "display": "inline-block", "text-align": "left", "position": "absolute", "left": "0" }
533
540
  };
534
- const _hoisted_6 = /* @__PURE__ */ createTextVNode("\u751F\u6210\u6570\u636E>>");
535
541
  function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
536
542
  const _component_a_button = resolveComponent("a-button");
537
543
  const _component_BasicForm = resolveComponent("BasicForm");
@@ -562,7 +568,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
562
568
  footer: withCtx(() => [
563
569
  createVNode(_component_a_button, { onClick: _ctx.onCancel }, {
564
570
  default: withCtx(() => [
565
- _hoisted_3
571
+ createTextVNode("\u5173\u95ED")
566
572
  ]),
567
573
  _: 1
568
574
  }, 8, ["onClick"]),
@@ -573,11 +579,11 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
573
579
  onClick: _ctx.onSubmit
574
580
  }, {
575
581
  default: withCtx(() => [
576
- _hoisted_4
582
+ createTextVNode("\u4FDD\u5B58")
577
583
  ]),
578
584
  _: 1
579
585
  }, 8, ["loading", "onClick"]),
580
- _ctx.aiTestMode ? (openBlock(), createElementBlock("div", _hoisted_5, [
586
+ _ctx.aiTestMode ? (openBlock(), createElementBlock("div", _hoisted_2, [
581
587
  createVNode(_component_a_select, {
582
588
  value: _ctx.aiTestTable,
583
589
  "onUpdate:value": _cache[1] || (_cache[1] = ($event) => _ctx.aiTestTable = $event),
@@ -606,7 +612,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
606
612
  onClick: _ctx.initVirtualData
607
613
  }, {
608
614
  default: withCtx(() => [
609
- _hoisted_6
615
+ createTextVNode("\u751F\u6210\u6570\u636E>>")
610
616
  ]),
611
617
  _: 1
612
618
  }, 8, ["onClick"])
@@ -626,7 +632,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
626
632
  onClick: _ctx.onOpenExtConfig
627
633
  }, {
628
634
  default: withCtx(() => [
629
- _hoisted_2
635
+ createTextVNode("\u6269\u5C55\u914D\u7F6E")
630
636
  ]),
631
637
  _: 1
632
638
  }, 8, ["onClick"])
@@ -642,6 +648,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
642
648
  key: 0,
643
649
  activeKey: _ctx.activeKey,
644
650
  "onUpdate:activeKey": _cache[0] || (_cache[0] = ($event) => _ctx.activeKey = $event),
651
+ animated: "",
645
652
  onChange: _ctx.onTabsChange
646
653
  }, {
647
654
  default: withCtx(() => [
package/CgreportModal.js CHANGED
@@ -37,15 +37,15 @@ var __async = (__this, __arguments, generator) => {
37
37
  step((generator = generator.apply(__this, __arguments)).next());
38
38
  });
39
39
  };
40
- import { defineComponent, ref, reactive, unref, computed, resolveComponent, openBlock, createBlock, mergeProps, withCtx, createVNode, createElementVNode, createTextVNode, nextTick } from "vue";
40
+ import { defineComponent, ref, reactive, unref, computed, resolveComponent, openBlock, createBlock, mergeProps, withCtx, createVNode, createElementVNode, createTextVNode } from "vue";
41
41
  import { useModalInner, BasicModal } from "/@/components/Modal";
42
42
  import { useForm, BasicForm } from "/@/components/Form/index";
43
43
  import { useJvxeMethod } from "/@/hooks/system/useJvxeMethods.ts";
44
44
  import { JVxeTypes } from "/@/components/jeecg/JVxeTable/types";
45
45
  import { duplicateCheck } from "/@/views/system/user/user.api";
46
46
  import { defHttp } from "/@/utils/http/axios";
47
- import { Modal } from "ant-design-vue";
48
47
  import { useMessage } from "/@/hooks/web/useMessage";
48
+ const { createConfirm } = useMessage();
49
49
  const onlCgreportParamList = "/online/cgreport/param/listByHeadId";
50
50
  const onlCgreportItemList = "/online/cgreport/item/listByHeadId";
51
51
  const list = (params) => defHttp.get({ url: "/online/cgreport/head/list", params });
@@ -55,11 +55,12 @@ const deleteOne = (params, handleSuccess) => {
55
55
  });
56
56
  };
57
57
  const batchDelete = (params, handleSuccess) => {
58
- Modal.confirm({
58
+ createConfirm({
59
59
  title: "\u786E\u8BA4\u5220\u9664",
60
60
  content: "\u662F\u5426\u5220\u9664\u9009\u4E2D\u6570\u636E",
61
61
  okText: "\u786E\u8BA4",
62
62
  cancelText: "\u53D6\u6D88",
63
+ iconType: "warning",
63
64
  onOk: () => {
64
65
  return defHttp.delete({ url: "/online/cgreport/head/deleteBatch", data: params }, { joinParamsToUrl: true }).then(() => {
65
66
  handleSuccess();
@@ -192,9 +193,7 @@ const formSchema = [
192
193
  xxl: 8
193
194
  },
194
195
  dynamicRules: () => {
195
- return [
196
- { required: true, message: "\u8BF7\u8F93\u5165\u62A5\u8868\u540D\u5B57!" }
197
- ];
196
+ return [{ required: true, message: "\u8BF7\u8F93\u5165\u62A5\u8868\u540D\u5B57!" }];
198
197
  }
199
198
  },
200
199
  {
@@ -380,20 +379,14 @@ const onlCgreportItemColumns = [
380
379
  }
381
380
  ];
382
381
  const _hoisted_1 = { style: { "flex": "1", "text-align": "left" } };
383
- const _hoisted_2 = /* @__PURE__ */ createTextVNode(" \u60A8\u53EF\u4EE5\u952E\u5165\u201C\u201D\u4F5C\u4E3A\u4E00\u4E2A\u53C2\u6570\uFF0C\u8FD9\u91CCabc\u662F\u53C2\u6570\u7684\u540D\u79F0\u3002\u4F8B\u5982\uFF1A");
382
+ const _hoisted_2 = /* @__PURE__ */ createElementVNode("br", null, null, -1);
384
383
  const _hoisted_3 = /* @__PURE__ */ createElementVNode("br", null, null, -1);
385
- const _hoisted_4 = /* @__PURE__ */ createTextVNode(" select * from table where id = ${abc}\u3002");
384
+ const _hoisted_4 = /* @__PURE__ */ createElementVNode("br", null, null, -1);
386
385
  const _hoisted_5 = /* @__PURE__ */ createElementVNode("br", null, null, -1);
387
- const _hoisted_6 = /* @__PURE__ */ createTextVNode(" select * from table where id like concat('%',${abc},'%')\u3002(mysql\u6A21\u7CCA\u67E5\u8BE2)");
388
- const _hoisted_7 = /* @__PURE__ */ createElementVNode("br", null, null, -1);
389
- const _hoisted_8 = /* @__PURE__ */ createTextVNode(" select * from table where id like '%'||${abc}||'%'\u3002(oracle\u6A21\u7CCA\u67E5\u8BE2)");
390
- const _hoisted_9 = /* @__PURE__ */ createElementVNode("br", null, null, -1);
391
- const _hoisted_10 = /* @__PURE__ */ createTextVNode(" select * from table where id like '%'+${abc}+'%'\u3002(sqlserver\u6A21\u7CCA\u67E5\u8BE2)");
392
- const _hoisted_11 = /* @__PURE__ */ createElementVNode("br", null, null, -1);
393
- const _hoisted_12 = /* @__PURE__ */ createElementVNode("span", { style: { "color": "red" } }, "\u6CE8\uFF1A\u53C2\u6570\u53EA\u652F\u6301\u52A8\u6001\u62A5\u8868\uFF0Cpopup\u6682\u4E0D\u652F\u6301", -1);
394
- const _hoisted_13 = /* @__PURE__ */ createTextVNode("SQL\u89E3\u6790");
386
+ const _hoisted_6 = /* @__PURE__ */ createElementVNode("br", null, null, -1);
387
+ const _hoisted_7 = /* @__PURE__ */ createElementVNode("span", { style: { "color": "red" } }, "\u6CE8\uFF1A\u53C2\u6570\u53EA\u652F\u6301\u52A8\u6001\u62A5\u8868\uFF0Cpopup\u6682\u4E0D\u652F\u6301", -1);
395
388
  const _sfc_main = /* @__PURE__ */ defineComponent({
396
- name: "CgreportModal",
389
+ __name: "CgreportModal",
397
390
  emits: ["register", "success"],
398
391
  setup(__props, { emit }) {
399
392
  const { createMessage } = useMessage();
@@ -415,7 +408,6 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
415
408
  columns: onlCgreportItemColumns
416
409
  });
417
410
  const [registerForm, { setProps, resetFields, setFieldsValue, validate, validateFields }] = useForm({
418
- labelWidth: 150,
419
411
  schemas: formSchema,
420
412
  showActionButtonGroup: false
421
413
  });
@@ -431,7 +423,13 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
431
423
  }
432
424
  setProps({ disabled: !(data == null ? void 0 : data.showFooter) });
433
425
  }));
434
- const [handleChangeTabs, handleSubmit, requestSubTableData, formRef] = useJvxeMethod(requestAddOrEdit, classifyIntoFormData, tableRefs, activeKey, refKeys);
426
+ const [handleChangeTabs, handleSubmit, requestSubTableData, formRef] = useJvxeMethod(
427
+ requestAddOrEdit,
428
+ classifyIntoFormData,
429
+ tableRefs,
430
+ activeKey,
431
+ refKeys
432
+ );
435
433
  const title = computed(() => !unref(isUpdate) ? "\u65B0\u589E" : "\u7F16\u8F91");
436
434
  function reset() {
437
435
  return __async(this, null, function* () {
@@ -486,12 +484,14 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
486
484
  createMessage.success("\u89E3\u6790\u6210\u529F");
487
485
  let { fields, params } = res;
488
486
  let newFields = fields.filter((item) => item.fieldName != "__row_number__");
489
- let newItemDataList = getTabData(onlCgreportParamTable.dataSource, newFields || [], "fieldName");
490
- onlCgreportItemTable.dataSource = [];
491
- setDataSource(onlCgreportItem, newItemDataList);
492
- let newParamList = getTabData(onlCgreportParamTable.dataSource, params || [], "paramName");
493
- onlCgreportParamTable.dataSource = [];
494
- setDataSource(onlCgreportParam, newParamList);
487
+ let itemDataSource = onlCgreportItem.value.getTableData();
488
+ let newItemDataList = getTabData(itemDataSource, newFields || [], "fieldName");
489
+ newItemDataList = newItemDataList.sort((a, b) => a.orderNum - b.orderNum);
490
+ onlCgreportItemTable.dataSource = newItemDataList;
491
+ let paramDataSource = onlCgreportParam.value.getTableData();
492
+ let newParamList = getTabData(paramDataSource, params || [], "paramName");
493
+ newParamList = newParamList.sort((a, b) => a.orderNum - b.orderNum);
494
+ onlCgreportParamTable.dataSource = newParamList;
495
495
  }
496
496
  });
497
497
  }).catch(() => {
@@ -532,13 +532,6 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
532
532
  return new_arr;
533
533
  }
534
534
  }
535
- function setDataSource(tableRef, data) {
536
- return __async(this, null, function* () {
537
- yield nextTick();
538
- yield tableRef.value.getXTable().insert(data);
539
- yield nextTick();
540
- });
541
- }
542
535
  return (_ctx, _cache) => {
543
536
  const _component_a_icon = resolveComponent("a-icon");
544
537
  const _component_a_popover = resolveComponent("a-popover");
@@ -570,17 +563,17 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
570
563
  style: { "margin": "0 10px 0 6px" }
571
564
  }, {
572
565
  content: withCtx(() => [
566
+ createTextVNode(" \u60A8\u53EF\u4EE5\u952E\u5165\u201C\u201D\u4F5C\u4E3A\u4E00\u4E2A\u53C2\u6570\uFF0C\u8FD9\u91CCabc\u662F\u53C2\u6570\u7684\u540D\u79F0\u3002\u4F8B\u5982\uFF1A"),
573
567
  _hoisted_2,
568
+ createTextVNode(" select * from table where id = ${abc}\u3002"),
574
569
  _hoisted_3,
570
+ createTextVNode(" select * from table where id like concat('%',${abc},'%')\u3002(mysql\u6A21\u7CCA\u67E5\u8BE2)"),
575
571
  _hoisted_4,
572
+ createTextVNode(" select * from table where id like '%'||${abc}||'%'\u3002(oracle\u6A21\u7CCA\u67E5\u8BE2)"),
576
573
  _hoisted_5,
574
+ createTextVNode(" select * from table where id like '%'+${abc}+'%'\u3002(sqlserver\u6A21\u7CCA\u67E5\u8BE2)"),
577
575
  _hoisted_6,
578
- _hoisted_7,
579
- _hoisted_8,
580
- _hoisted_9,
581
- _hoisted_10,
582
- _hoisted_11,
583
- _hoisted_12
576
+ _hoisted_7
584
577
  ]),
585
578
  default: withCtx(() => [
586
579
  createVNode(_component_a_icon, { type: "question-circle" })
@@ -593,7 +586,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
593
586
  onClick: handleSQLAnalyze
594
587
  }, {
595
588
  default: withCtx(() => [
596
- _hoisted_13
589
+ createTextVNode("SQL\u89E3\u6790")
597
590
  ]),
598
591
  _: 1
599
592
  })
package/CheckDictTable.js CHANGED
@@ -17,24 +17,33 @@ var __spreadValues = (a, b) => {
17
17
  return a;
18
18
  };
19
19
  var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
20
- import { defineComponent, ref, resolveComponent, openBlock, createBlock } from "vue";
20
+ import { defineComponent, ref, computed, resolveComponent, openBlock, createBlock, mergeProps, withCtx, createVNode, normalizeClass, withDirectives, createElementVNode, vShow } from "vue";
21
21
  import { JVxeTypes } from "/@/components/jeecg/JVxeTable/types";
22
22
  import { u as useTableSync } from "./useTableSync.js";
23
+ import { useMessage } from "/@/hooks/web/useMessage";
24
+ import { useJPrompt } from "/@/components/jeecg/JPrompt";
25
+ import { useDesign } from "/@/hooks/web/useDesign";
23
26
  import { _ as _export_sfc } from "./index.js";
24
27
  import "./cgform.data.js";
25
28
  import "/@/utils/dict";
26
29
  import "/@/utils/dict/JDictSelectUtil";
27
30
  import "/@/utils/uuid";
28
31
  import "./pick.js";
32
+ import "./_flatRest.js";
29
33
  import "./isArray.js";
30
34
  import "./toString.js";
31
35
  import "./_arrayPush.js";
32
- import "/@/components/jeecg/OnLine/JPopupOnlReport.vue";
33
- import "/@/hooks/web/useMessage";
34
- import "vue-router";
36
+ import "/@/utils/http/axios";
37
+ import "@vueuse/core";
38
+ var CheckDictTable_vue_vue_type_style_index_0_scoped_true_lang = "";
35
39
  const _sfc_main = defineComponent({
36
40
  name: "CheckDictTable",
41
+ components: {
42
+ VNodes: (_, { attrs }) => attrs.vnodes
43
+ },
37
44
  setup() {
45
+ const { prefixCls } = useDesign("cgform-check-dict-table");
46
+ const { createMessage: $message } = useMessage();
38
47
  const columns = ref([
39
48
  { title: "\u5B57\u6BB5\u540D\u79F0", key: "dbFieldName", width: 100 },
40
49
  { title: "\u5B57\u6BB5\u5907\u6CE8", key: "dbFieldTxt", width: 100 },
@@ -49,25 +58,11 @@ const _sfc_main = defineComponent({
49
58
  title: "\u9A8C\u8BC1\u89C4\u5219",
50
59
  key: "fieldValidType",
51
60
  width: 170,
52
- type: JVxeTypes.select,
61
+ type: JVxeTypes.slot,
62
+ slotName: "fieldValidType",
53
63
  allowInput: true,
54
- options: [
55
- { title: "\u7A7A", value: "" },
56
- { title: "\u552F\u4E00\u6821\u9A8C", value: "only" },
57
- { title: "6\u523016\u4F4D\u6570\u5B57", value: "n6-16" },
58
- { title: "6\u523018\u4F4D\u5B57\u6BCD", value: "s6-18" },
59
- { title: "6\u523016\u4F4D\u4EFB\u610F\u5B57\u7B26", value: "*6-16" },
60
- { title: "\u7F51\u5740", value: "url" },
61
- { title: "\u7535\u5B50\u90AE\u4EF6", value: "e" },
62
- { title: "\u624B\u673A\u53F7\u7801", value: "m" },
63
- { title: "\u90AE\u653F\u7F16\u7801", value: "p" },
64
- { title: "\u5B57\u6BCD", value: "s" },
65
- { title: "\u6570\u5B57", value: "n" },
66
- { title: "\u6574\u6570", value: "z" },
67
- { title: "\u975E\u7A7A", value: "*" },
68
- { title: "\u91D1\u989D", value: "money" }
69
- ],
70
- defaultValue: ""
64
+ defaultValue: "",
65
+ placeholder: "\u7A7A"
71
66
  },
72
67
  {
73
68
  title: "\u6821\u9A8C\u5FC5\u586B",
@@ -101,21 +96,146 @@ const _sfc_main = defineComponent({
101
96
  }
102
97
  ]);
103
98
  const setup = useTableSync(columns);
104
- return __spreadProps(__spreadValues({}, setup), { columns });
99
+ const validTypeOptions = ref([
100
+ { label: "\u7A7A", value: "" },
101
+ { label: "\u552F\u4E00\u6821\u9A8C", value: "only" },
102
+ { label: "6\u523016\u4F4D\u6570\u5B57", value: "n6-16" },
103
+ { label: "6\u523018\u4F4D\u5B57\u6BCD", value: "s6-18" },
104
+ { label: "6\u523016\u4F4D\u4EFB\u610F\u5B57\u7B26", value: "*6-16" },
105
+ { label: "\u7F51\u5740", value: "url" },
106
+ { label: "\u7535\u5B50\u90AE\u4EF6", value: "e" },
107
+ { label: "\u624B\u673A\u53F7\u7801", value: "m" },
108
+ { label: "\u90AE\u653F\u7F16\u7801", value: "p" },
109
+ { label: "\u5B57\u6BCD", value: "s" },
110
+ { label: "\u6570\u5B57", value: "n" },
111
+ { label: "\u6574\u6570", value: "z" },
112
+ { label: "\u975E\u7A7A", value: "*" },
113
+ { label: "\u91D1\u989D", value: "money" }
114
+ ]);
115
+ const validTypeValues = computed(() => {
116
+ return validTypeOptions.value.map((opt) => opt.value);
117
+ });
118
+ const { createJPrompt } = useJPrompt();
119
+ function isCustomRegexp(value) {
120
+ return !validTypeValues.value.includes(value);
121
+ }
122
+ function onAddCustomRegexp(props) {
123
+ createJPrompt({
124
+ title: "\u81EA\u5B9A\u4E49\u6B63\u5219\u8868\u8FBE\u5F0F",
125
+ placeholder: "\u8BF7\u8F93\u5165\u6B63\u5219\u8868\u8FBE\u5F0F",
126
+ rules: [{ required: true, message: "\u6B63\u5219\u8868\u8FBE\u5F0F\u4E0D\u80FD\u4E3A\u7A7A\uFF01" }, { validator: validatorCustomRegexp }],
127
+ onOk: (value) => {
128
+ props.triggerChange(value);
129
+ $message.success("\u6DFB\u52A0\u6210\u529F");
130
+ }
131
+ });
132
+ }
133
+ function onChangeCustomRegexp(props) {
134
+ createJPrompt({
135
+ title: "\u4FEE\u6539\u81EA\u5B9A\u4E49\u6B63\u5219\u8868\u8FBE\u5F0F",
136
+ defaultValue: props.value,
137
+ placeholder: "\u8BF7\u8F93\u5165\u6B63\u5219\u8868\u8FBE\u5F0F",
138
+ rules: [{ required: true, message: "\u6B63\u5219\u8868\u8FBE\u5F0F\u4E0D\u80FD\u4E3A\u7A7A\uFF01" }, { validator: validatorCustomRegexp }],
139
+ onOk: (value) => {
140
+ props.triggerChange(value);
141
+ if (value !== props.value) {
142
+ $message.success("\u4FEE\u6539\u6210\u529F");
143
+ }
144
+ }
145
+ });
146
+ }
147
+ function validatorCustomRegexp(_, value) {
148
+ if (isCustomRegexp(value)) {
149
+ return Promise.resolve();
150
+ } else {
151
+ return Promise.reject("\u5F53\u524D\u6821\u9A8C\u5DF2\u5B58\u5728");
152
+ }
153
+ }
154
+ return __spreadProps(__spreadValues({}, setup), {
155
+ prefixCls,
156
+ columns,
157
+ isCustomRegexp,
158
+ validTypeOptions,
159
+ validTypeValues,
160
+ onAddCustomRegexp,
161
+ onChangeCustomRegexp
162
+ });
105
163
  }
106
164
  });
165
+ const _hoisted_1 = {
166
+ class: "custom-option-list rc-virtual-list-holder-inner",
167
+ style: { "border-top": "1px solid #dfdfdf" }
168
+ };
169
+ const _hoisted_2 = ["onClick"];
107
170
  function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
171
+ const _component_VNodes = resolveComponent("VNodes");
172
+ const _component_a_select = resolveComponent("a-select");
173
+ const _component_a_col = resolveComponent("a-col");
174
+ const _component_a_button = resolveComponent("a-button");
175
+ const _component_a_row = resolveComponent("a-row");
108
176
  const _component_JVxeTable = resolveComponent("JVxeTable");
109
- return openBlock(), createBlock(_component_JVxeTable, {
177
+ return openBlock(), createBlock(_component_JVxeTable, mergeProps({
110
178
  ref: "tableRef",
111
179
  rowNumber: "",
112
180
  keyboardEdit: "",
181
+ class: [_ctx.prefixCls],
113
182
  maxHeight: _ctx.tableHeight.noToolbar,
114
183
  loading: _ctx.loading,
115
184
  columns: _ctx.columns,
116
185
  dataSource: _ctx.dataSource,
117
186
  disabledRows: { dbFieldName: ["id", "has_child"] }
118
- }, null, 8, ["maxHeight", "loading", "columns", "dataSource"]);
187
+ }, _ctx.tableProps), {
188
+ fieldValidType: withCtx((props) => [
189
+ createVNode(_component_a_row, {
190
+ type: "flex",
191
+ class: normalizeClass(["row-valid-type", { full: !_ctx.isCustomRegexp(props.value) }])
192
+ }, {
193
+ default: withCtx(() => [
194
+ createVNode(_component_a_col, {
195
+ class: normalizeClass(["left"])
196
+ }, {
197
+ default: withCtx(() => [
198
+ createVNode(_component_a_select, {
199
+ value: props.value,
200
+ options: _ctx.validTypeOptions,
201
+ style: { "width": "100%" },
202
+ onChange: props.triggerChange
203
+ }, {
204
+ dropdownRender: withCtx(({ menuNode }) => [
205
+ createVNode(_component_VNodes, { vnodes: menuNode }, null, 8, ["vnodes"]),
206
+ withDirectives(createElementVNode("div", _hoisted_1, [
207
+ createElementVNode("div", {
208
+ class: "ant-select-item ant-select-item-option",
209
+ title: "\u4F7F\u7528\u81EA\u5B9A\u4E49\u6B63\u5219\u8868\u8FBE\u5F0F\u4F5C\u4E3A\u6821\u9A8C\u89C4\u5219",
210
+ onClick: ($event) => _ctx.onAddCustomRegexp(props)
211
+ }, " \u6B63\u5219\u8868\u8FBE\u5F0F ", 8, _hoisted_2)
212
+ ], 512), [
213
+ [vShow, !_ctx.isCustomRegexp(props.value)]
214
+ ])
215
+ ]),
216
+ _: 2
217
+ }, 1032, ["value", "options", "onChange"])
218
+ ]),
219
+ _: 2
220
+ }, 1024),
221
+ createVNode(_component_a_col, {
222
+ class: "right",
223
+ title: "\u4FEE\u6539\u81EA\u5B9A\u4E49\u6B63\u5219\u8868\u8FBE\u5F0F"
224
+ }, {
225
+ default: withCtx(() => [
226
+ createVNode(_component_a_button, {
227
+ preIcon: "ant-design:edit",
228
+ onClick: () => _ctx.onChangeCustomRegexp(props)
229
+ }, null, 8, ["onClick"])
230
+ ]),
231
+ _: 2
232
+ }, 1024)
233
+ ]),
234
+ _: 2
235
+ }, 1032, ["class"])
236
+ ]),
237
+ _: 1
238
+ }, 16, ["class", "maxHeight", "loading", "columns", "dataSource"]);
119
239
  }
120
- var CheckDictTable = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
240
+ var CheckDictTable = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-8470723a"]]);
121
241
  export { CheckDictTable as default };