@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
@@ -1,289 +0,0 @@
1
- var __defProp = Object.defineProperty;
2
- var __getOwnPropSymbols = Object.getOwnPropertySymbols;
3
- var __hasOwnProp = Object.prototype.hasOwnProperty;
4
- var __propIsEnum = Object.prototype.propertyIsEnumerable;
5
- var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
6
- var __spreadValues = (a, b) => {
7
- for (var prop in b || (b = {}))
8
- if (__hasOwnProp.call(b, prop))
9
- __defNormalProp(a, prop, b[prop]);
10
- if (__getOwnPropSymbols)
11
- for (var prop of __getOwnPropSymbols(b)) {
12
- if (__propIsEnum.call(b, prop))
13
- __defNormalProp(a, prop, b[prop]);
14
- }
15
- return a;
16
- };
17
- var __async = (__this, __arguments, generator) => {
18
- return new Promise((resolve, reject) => {
19
- var fulfilled = (value) => {
20
- try {
21
- step(generator.next(value));
22
- } catch (e) {
23
- reject(e);
24
- }
25
- };
26
- var rejected = (value) => {
27
- try {
28
- step(generator.throw(value));
29
- } catch (e) {
30
- reject(e);
31
- }
32
- };
33
- var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
34
- step((generator = generator.apply(__this, __arguments)).next());
35
- });
36
- };
37
- import { BasicModal, useModalInner } from "/@/components/Modal";
38
- import { ref, computed, resolveComponent, openBlock, createBlock, mergeProps, withCtx, createVNode } from "vue";
39
- import { BasicForm, useForm } from "/@/components/Form/index";
40
- import { defHttp } from "/@/utils/http/axios";
41
- import { _ as _export_sfc } from "./index.js";
42
- import { o as omit } from "./omit.js";
43
- import "/@/components/jeecg/OnLine/JPopupOnlReport.vue";
44
- import "/@/hooks/web/useMessage";
45
- import "vue-router";
46
- import "./toString.js";
47
- import "./isArray.js";
48
- import "./_baseClone.js";
49
- import "./_arrayPush.js";
50
- import "./_flatRest.js";
51
- import "./_baseSlice.js";
52
- const _sfc_main = {
53
- name: "LinkTableConfigModal",
54
- emits: ["success", "register"],
55
- components: {
56
- BasicModal,
57
- BasicForm
58
- },
59
- setup(_p, { emit }) {
60
- const spinningLoading = ref(false);
61
- const fieldName = ref("");
62
- let oldValue = {};
63
- const [registerModal, { closeModal }] = useModalInner((data) => __async(this, null, function* () {
64
- console.log("data", data);
65
- oldValue = __spreadValues({}, data.record);
66
- yield setFieldsValue({ dictTable: data.record.dictTable });
67
- setTimeout(() => __async(this, null, function* () {
68
- let otherValue = omit(data.record, "dictTable");
69
- yield setFieldsValue(otherValue);
70
- yield clearValidate();
71
- }), 200);
72
- fieldName.value = data.fieldName;
73
- }));
74
- const titleFieldName = ref("");
75
- const imageFieldName = ref("");
76
- const fieldOptions = ref([]);
77
- const imageFieldOptions = ref([]);
78
- function getFieldOptions(tableName) {
79
- return __async(this, null, function* () {
80
- if (tableName) {
81
- const url = "/online/cgform/field/listByHeadCode";
82
- const dataList = yield defHttp.get({ url, params: { headCode: tableName } });
83
- if (dataList && dataList.length > 0) {
84
- let arr1 = dataList.filter((item) => item.dbFieldName != "id" && item.dbIsPersist == 1);
85
- console.log("\u5B57\u6BB5\u5B57\u5178", arr1);
86
- if (arr1.length > 0) {
87
- fieldOptions.value = arr1.map((item) => {
88
- return {
89
- text: item.dbFieldTxt,
90
- value: item.dbFieldName
91
- };
92
- });
93
- } else {
94
- fieldOptions.value = [];
95
- }
96
- let arr2 = dataList.filter((item) => item.dbFieldName != "id" && item.fieldShowType == "image" && item.dbIsPersist == 1);
97
- console.log("\u56FE\u7247\u5B57\u6BB5", arr2);
98
- if (arr2.length > 0) {
99
- imageFieldOptions.value = arr2.map((item) => {
100
- return {
101
- text: item.dbFieldTxt,
102
- value: item.dbFieldName
103
- };
104
- });
105
- } else {
106
- imageFieldOptions.value = [{ text: "\u65E0\u56FE\u7247\u5B57\u6BB5\u53EF\u4EE5\u9009\u62E9", value: "", key: "", disabled: true }];
107
- }
108
- } else {
109
- fieldOptions.value = [];
110
- imageFieldOptions.value = [{ text: "\u65E0\u56FE\u7247\u5B57\u6BB5\u53EF\u4EE5\u9009\u62E9", value: "", key: "", disabled: true }];
111
- }
112
- }
113
- });
114
- }
115
- function handleTableChange(tableName) {
116
- return __async(this, null, function* () {
117
- titleFieldName.value = "";
118
- imageFieldName.value = "";
119
- yield getFieldOptions(tableName);
120
- });
121
- }
122
- const otherFieldOptions = computed(() => {
123
- let arr = fieldOptions.value;
124
- let titleField = titleFieldName.value;
125
- let imageField = imageFieldName.value;
126
- return arr.filter((item) => item.value != titleField && item.value != imageField);
127
- });
128
- const formSchemas = [
129
- {
130
- label: "rowKey",
131
- field: "rowKey",
132
- component: "Input",
133
- show: false
134
- },
135
- {
136
- label: "dictField",
137
- field: "dictField",
138
- component: "Input",
139
- defaultValue: "id",
140
- show: false
141
- },
142
- {
143
- label: "\u5B57\u6BB5\u63CF\u8FF0",
144
- field: "dbFieldTxt",
145
- component: "Input",
146
- required: true
147
- },
148
- {
149
- label: "\u5173\u8054\u8868",
150
- field: "dictTable",
151
- component: "JSearchSelect",
152
- required: true,
153
- componentProps: ({ formActionType }) => {
154
- return {
155
- dict: "onl_cgform_head where copy_type = 0,table_txt,table_name",
156
- pageSize: 10,
157
- async: true,
158
- immediateChange: true,
159
- popContainer: ".link-table-config-modal",
160
- params: { order: "desc", column: "create_time" },
161
- onChange: (name) => __async(this, null, function* () {
162
- if (oldValue.titleField || oldValue.otherFields) {
163
- yield formActionType.setFieldsValue({
164
- titleField: "",
165
- otherFields: "",
166
- imageField: ""
167
- });
168
- yield formActionType.clearValidate();
169
- }
170
- yield handleTableChange(name);
171
- })
172
- };
173
- }
174
- },
175
- {
176
- label: "\u6807\u9898\u5B57\u6BB5",
177
- field: "titleField",
178
- component: "JSearchSelect",
179
- required: true,
180
- componentProps: {
181
- async: false,
182
- popContainer: ".link-table-config-modal",
183
- dictOptions: fieldOptions,
184
- immediateChange: true,
185
- onChange: (str) => {
186
- titleFieldName.value = str;
187
- oldValue["titleField"] = str;
188
- }
189
- }
190
- },
191
- {
192
- label: "\u5C01\u9762\u56FE\u7247",
193
- field: "imageField",
194
- component: "JSearchSelect",
195
- componentProps: {
196
- async: false,
197
- popContainer: ".link-table-config-modal",
198
- dictOptions: imageFieldOptions,
199
- immediateChange: true,
200
- onChange: (str) => {
201
- imageFieldName.value = str;
202
- oldValue["imageFieldName"] = str;
203
- }
204
- }
205
- },
206
- {
207
- label: "\u5176\u4ED6\u5B57\u6BB5",
208
- field: "otherFields",
209
- component: "JSelectMultiple",
210
- componentProps: {
211
- popContainer: ".link-table-config-modal",
212
- options: otherFieldOptions,
213
- onChange: (str) => {
214
- oldValue["otherFields"] = str;
215
- console.error("oldValue", oldValue);
216
- }
217
- }
218
- },
219
- {
220
- label: "\u663E\u793A\u65B9\u5F0F",
221
- field: "showType",
222
- component: "Select",
223
- defaultValue: "card",
224
- componentProps: {
225
- options: [
226
- { label: "\u5361\u7247", value: "card" },
227
- { label: "\u4E0B\u62C9\u6846", value: "select" }
228
- ]
229
- }
230
- },
231
- {
232
- label: "\u662F\u5426\u591A\u9009",
233
- field: "multiSelect",
234
- component: "RadioGroup",
235
- defaultValue: false,
236
- componentProps: {
237
- options: [
238
- { label: "\u5426", value: false },
239
- { label: "\u662F", value: true }
240
- ]
241
- }
242
- }
243
- ];
244
- const [registerForm, { validate, setFieldsValue, clearValidate, resetFields }] = useForm({
245
- schemas: formSchemas,
246
- showActionButtonGroup: false,
247
- labelAlign: "right"
248
- });
249
- function handleSubmit() {
250
- return __async(this, null, function* () {
251
- let data = yield validate();
252
- data["fieldName"] = fieldName.value;
253
- emit("success", data);
254
- closeModal();
255
- });
256
- }
257
- return {
258
- registerModal,
259
- spinningLoading,
260
- registerForm,
261
- handleSubmit
262
- };
263
- }
264
- };
265
- function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
266
- const _component_BasicForm = resolveComponent("BasicForm");
267
- const _component_a_spin = resolveComponent("a-spin");
268
- const _component_BasicModal = resolveComponent("BasicModal");
269
- return openBlock(), createBlock(_component_BasicModal, mergeProps({ wrapClassName: "link-table-config-modal" }, _ctx.$attrs, {
270
- title: "\u5173\u8054\u8BB0\u5F55\u914D\u7F6E",
271
- onRegister: $setup.registerModal,
272
- keyboard: "",
273
- canFullscreen: false,
274
- cancelText: "\u5173\u95ED",
275
- onOk: $setup.handleSubmit
276
- }), {
277
- default: withCtx(() => [
278
- createVNode(_component_a_spin, { spinning: $setup.spinningLoading }, {
279
- default: withCtx(() => [
280
- createVNode(_component_BasicForm, { onRegister: $setup.registerForm }, null, 8, ["onRegister"])
281
- ]),
282
- _: 1
283
- }, 8, ["spinning"])
284
- ]),
285
- _: 1
286
- }, 16, ["onRegister", "onOk"]);
287
- }
288
- var LinkTableConfigModal = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
289
- export { LinkTableConfigModal as default };
@@ -1,218 +0,0 @@
1
- var __defProp = Object.defineProperty;
2
- var __getOwnPropSymbols = Object.getOwnPropertySymbols;
3
- var __hasOwnProp = Object.prototype.hasOwnProperty;
4
- var __propIsEnum = Object.prototype.propertyIsEnumerable;
5
- var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
6
- var __spreadValues = (a, b) => {
7
- for (var prop in b || (b = {}))
8
- if (__hasOwnProp.call(b, prop))
9
- __defNormalProp(a, prop, b[prop]);
10
- if (__getOwnPropSymbols)
11
- for (var prop of __getOwnPropSymbols(b)) {
12
- if (__propIsEnum.call(b, prop))
13
- __defNormalProp(a, prop, b[prop]);
14
- }
15
- return a;
16
- };
17
- var __async = (__this, __arguments, generator) => {
18
- return new Promise((resolve, reject) => {
19
- var fulfilled = (value) => {
20
- try {
21
- step(generator.next(value));
22
- } catch (e) {
23
- reject(e);
24
- }
25
- };
26
- var rejected = (value) => {
27
- try {
28
- step(generator.throw(value));
29
- } catch (e) {
30
- reject(e);
31
- }
32
- };
33
- var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
34
- step((generator = generator.apply(__this, __arguments)).next());
35
- });
36
- };
37
- import { BasicModal, useModalInner } from "/@/components/Modal";
38
- import { ref, resolveComponent, openBlock, createBlock, mergeProps, withCtx, createVNode } from "vue";
39
- import { BasicForm, useForm } from "/@/components/Form/index";
40
- import { defHttp } from "/@/utils/http/axios";
41
- import { useMessage } from "/@/hooks/web/useMessage";
42
- import { _ as _export_sfc } from "./index.js";
43
- import { o as omit } from "./omit.js";
44
- import "/@/components/jeecg/OnLine/JPopupOnlReport.vue";
45
- import "vue-router";
46
- import "./toString.js";
47
- import "./isArray.js";
48
- import "./_baseClone.js";
49
- import "./_arrayPush.js";
50
- import "./_flatRest.js";
51
- import "./_baseSlice.js";
52
- const _sfc_main = {
53
- name: "LinkTableFieldConfigModal",
54
- emits: ["success", "register"],
55
- components: {
56
- BasicModal,
57
- BasicForm
58
- },
59
- setup(_p, { emit }) {
60
- const spinningLoading = ref(false);
61
- const linkTableOptions = ref([]);
62
- const fieldOptions = ref([]);
63
- let tableAndFieldsMap = {};
64
- let oldValue = {};
65
- const { createMessage: $message } = useMessage();
66
- const [registerModal, { closeModal }] = useModalInner((data) => __async(this, null, function* () {
67
- console.log("data", data);
68
- oldValue = __spreadValues({}, data.record);
69
- tableAndFieldsMap = data.tableAndFieldsMap;
70
- yield initLinkTableOptions();
71
- yield setFieldsValue({ dictTable: data.record.dictTable });
72
- setTimeout(() => __async(this, null, function* () {
73
- let otherValue = omit(data.record, "dictTable");
74
- yield setFieldsValue(otherValue);
75
- yield clearValidate();
76
- }), 200);
77
- }));
78
- function initLinkTableOptions() {
79
- return __async(this, null, function* () {
80
- let fieldNames = Object.keys(tableAndFieldsMap);
81
- if (!fieldNames || fieldNames.length == 0) {
82
- linkTableOptions.value = [];
83
- } else {
84
- let arr = [];
85
- for (let name of fieldNames) {
86
- arr.push({
87
- text: tableAndFieldsMap[name].title,
88
- value: name
89
- });
90
- }
91
- linkTableOptions.value = arr;
92
- }
93
- });
94
- }
95
- function handleChange(fieldName) {
96
- return __async(this, null, function* () {
97
- if (fieldName) {
98
- const { table, fields } = tableAndFieldsMap[fieldName];
99
- if (!table) {
100
- $message.warning("\u8BF7\u5148\u5B8C\u5584\u5B57\u6BB5[" + fieldName + "]\u5173\u8054\u8BB0\u5F55\u7684\u914D\u7F6E");
101
- return;
102
- }
103
- const url = "/online/cgform/field/listByHeadCode";
104
- const dataList = yield defHttp.get({ url, params: { headCode: table } });
105
- if (dataList && dataList.length > 0) {
106
- let arr = dataList.map((item) => {
107
- return {
108
- text: item.dbFieldTxt,
109
- value: item.dbFieldName
110
- };
111
- });
112
- console.log("\u5B57\u6BB5\u5B57\u5178", arr);
113
- let fieldArray = fields.split(",");
114
- fieldOptions.value = arr.filter((item) => fieldArray.indexOf(item.value) > 0);
115
- } else {
116
- fieldOptions.value = [];
117
- }
118
- }
119
- });
120
- }
121
- const formSchemas = [
122
- {
123
- label: "rowKey",
124
- field: "rowKey",
125
- component: "Input",
126
- show: false
127
- },
128
- {
129
- label: "\u5B57\u6BB5\u63CF\u8FF0",
130
- field: "dbFieldTxt",
131
- component: "Input",
132
- required: true
133
- },
134
- {
135
- label: "\u5173\u8054\u8BB0\u5F55",
136
- field: "dictTable",
137
- component: "JSearchSelect",
138
- required: true,
139
- componentProps: ({ formActionType }) => {
140
- let tempOptions = linkTableOptions.value;
141
- return {
142
- async: false,
143
- popContainer: ".link-table-field-config-modal",
144
- dictOptions: tempOptions,
145
- immediateChange: true,
146
- onChange: (name) => __async(this, null, function* () {
147
- if (oldValue.dictText) {
148
- yield formActionType.setFieldsValue({
149
- dictText: ""
150
- });
151
- yield formActionType.clearValidate();
152
- }
153
- handleChange(name);
154
- })
155
- };
156
- }
157
- },
158
- {
159
- label: "\u663E\u793A\u5B57\u6BB5",
160
- field: "dictText",
161
- component: "JSearchSelect",
162
- required: true,
163
- componentProps: {
164
- async: false,
165
- popContainer: ".link-table-field-config-modal",
166
- dictOptions: fieldOptions,
167
- onChange: (value) => {
168
- oldValue["dictText"] = value;
169
- }
170
- }
171
- }
172
- ];
173
- const [registerForm, { validate, setFieldsValue, clearValidate }] = useForm({
174
- schemas: formSchemas,
175
- showActionButtonGroup: false,
176
- labelAlign: "right"
177
- });
178
- function handleSubmit() {
179
- return __async(this, null, function* () {
180
- const data = yield validate();
181
- console.log("handlesub", data);
182
- emit("success", data);
183
- closeModal();
184
- });
185
- }
186
- return {
187
- registerModal,
188
- spinningLoading,
189
- registerForm,
190
- handleSubmit
191
- };
192
- }
193
- };
194
- function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
195
- const _component_BasicForm = resolveComponent("BasicForm");
196
- const _component_a_spin = resolveComponent("a-spin");
197
- const _component_BasicModal = resolveComponent("BasicModal");
198
- return openBlock(), createBlock(_component_BasicModal, mergeProps({ wrapClassName: "link-table-field-config-modal" }, _ctx.$attrs, {
199
- title: "\u4ED6\u8868\u5B57\u6BB5\u914D\u7F6E",
200
- onRegister: $setup.registerModal,
201
- keyboard: "",
202
- canFullscreen: false,
203
- cancelText: "\u5173\u95ED",
204
- onOk: $setup.handleSubmit
205
- }), {
206
- default: withCtx(() => [
207
- createVNode(_component_a_spin, { spinning: $setup.spinningLoading }, {
208
- default: withCtx(() => [
209
- createVNode(_component_BasicForm, { onRegister: $setup.registerForm }, null, 8, ["onRegister"])
210
- ]),
211
- _: 1
212
- }, 8, ["spinning"])
213
- ]),
214
- _: 1
215
- }, 16, ["onRegister", "onOk"]);
216
- }
217
- var LinkTableFieldConfigModal = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
218
- export { LinkTableFieldConfigModal as default };
@@ -1,36 +0,0 @@
1
- import { propTypes } from "/@/utils/propTypes";
2
- import { openBlock, createElementBlock, createElementVNode, toDisplayString } from "vue";
3
- import { _ as _export_sfc } from "./index.js";
4
- import "/@/components/jeecg/OnLine/JPopupOnlReport.vue";
5
- import "/@/hooks/web/useMessage";
6
- import "vue-router";
7
- var LinkTableListPiece_vue_vue_type_style_index_0_scoped_true_lang = "";
8
- const _sfc_main = {
9
- name: "LinkTableListPiece",
10
- props: {
11
- text: propTypes.string.def(""),
12
- id: propTypes.string.def("")
13
- },
14
- emits: ["tab"],
15
- setup(props, { emit }) {
16
- function handleClick(e) {
17
- e == null ? void 0 : e.stopPropagation();
18
- e == null ? void 0 : e.preventDefault();
19
- console.log(props.id);
20
- emit("tab", props.id);
21
- }
22
- return {
23
- handleClick
24
- };
25
- }
26
- };
27
- function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
28
- return openBlock(), createElementBlock("div", {
29
- class: "link-table-piece",
30
- onClick: _cache[0] || (_cache[0] = (...args) => $setup.handleClick && $setup.handleClick(...args))
31
- }, [
32
- createElementVNode("span", null, toDisplayString($props.text), 1)
33
- ]);
34
- }
35
- var LinkTableListPiece = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-33745cde"]]);
36
- export { LinkTableListPiece as default };
package/ModalFormDemo.js DELETED
@@ -1,85 +0,0 @@
1
- import { defineComponent, resolveComponent, openBlock, createElementBlock, createVNode } from "vue";
2
- import { BasicForm, useForm } from "/@/components/Form/index";
3
- import { defHttp } from "/@/utils/http/axios";
4
- import { _ as _export_sfc } from "./index.js";
5
- import { p as pick } from "./pick.js";
6
- import "/@/components/jeecg/OnLine/JPopupOnlReport.vue";
7
- import "/@/hooks/web/useMessage";
8
- import "vue-router";
9
- import "./_flatRest.js";
10
- import "./isArray.js";
11
- import "./toString.js";
12
- import "./_arrayPush.js";
13
- const getSchemas = () => {
14
- return [
15
- {
16
- field: "name",
17
- component: "Input",
18
- label: "\u540D\u79F0"
19
- },
20
- {
21
- field: "age",
22
- component: "InputNumber",
23
- label: "\u5E74\u9F84",
24
- componentProps: {
25
- style: {
26
- width: "100%"
27
- }
28
- }
29
- },
30
- {
31
- field: "sex",
32
- label: "\u6027\u522B",
33
- component: "JDictSelectTag",
34
- componentProps: {
35
- dictCode: "sex"
36
- }
37
- },
38
- {
39
- field: "birthday",
40
- component: "DatePicker",
41
- label: "\u751F\u65E5",
42
- componentProps: {
43
- valueFormat: "YYYY-MM-DD",
44
- style: {
45
- width: "100%"
46
- }
47
- }
48
- },
49
- {
50
- field: "email",
51
- component: "Input",
52
- label: "\u90AE\u7BB1"
53
- }
54
- ];
55
- };
56
- const _sfc_main = defineComponent({
57
- components: { BasicForm },
58
- props: ["id"],
59
- setup(props) {
60
- const [registerForm, { setFieldsValue }] = useForm({
61
- schemas: getSchemas(),
62
- showActionButtonGroup: false,
63
- baseColProps: { span: 24 }
64
- });
65
- let params = { id: props.id };
66
- defHttp.get({ url: "/test/jeecgDemo/queryById", params }, { isTransformResponse: false }).then((res) => {
67
- if (res.success) {
68
- let values = pick(res.result, "name", "age", "birthday", "sex", "email");
69
- setFieldsValue(values);
70
- }
71
- });
72
- return {
73
- registerForm
74
- };
75
- }
76
- });
77
- const _hoisted_1 = { style: { "margin": "50px auto", "width": "800px" } };
78
- function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
79
- const _component_BasicForm = resolveComponent("BasicForm");
80
- return openBlock(), createElementBlock("div", _hoisted_1, [
81
- createVNode(_component_BasicForm, { onRegister: _ctx.registerForm }, null, 8, ["onRegister"])
82
- ]);
83
- }
84
- var ModalFormDemo = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
85
- export { ModalFormDemo as default };