@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
package/useCgformList.js DELETED
@@ -1,470 +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 { unref, isRef, watch, ref, h } from "vue";
41
- import { useRouter } from "vue-router";
42
- import { RadioGroup, Radio, Input } from "ant-design-vue";
43
- import { useModal } from "/@/components/Modal";
44
- import { useDrawer } from "/@/components/Drawer";
45
- import { useListPage } from "/@/hooks/system/useListPage";
46
- import { l as list, d as doCopyOnlineView, a as doSingleDelete, b as doSingleRemove, c as doBatchRemove, e as doBatchDelete, f as doDatabaseSync, g as doCopyTable } from "./CgformModal.js";
47
- import { C as Clipboard } from "./clipboard.js";
48
- import { useMessage } from "/@/hooks/web/useMessage";
49
- import { buildUUID } from "/@/utils/uuid";
50
- import { isArray } from "/@/utils/is";
51
- var CgformPageType = /* @__PURE__ */ ((CgformPageType2) => {
52
- CgformPageType2[CgformPageType2["normal"] = 0] = "normal";
53
- CgformPageType2[CgformPageType2["copy"] = 1] = "copy";
54
- return CgformPageType2;
55
- })(CgformPageType || {});
56
- const COPY_CLASS = "copy-this-text";
57
- const CLIPBOARD_TEXT = "data-clipboard-text";
58
- function useCopyModal() {
59
- return { createCopyModal };
60
- }
61
- const { createMessage, createConfirm } = useMessage();
62
- function createCopyModal(options) {
63
- var _a, _b, _c, _d, _e;
64
- const url = unref(options.copyText);
65
- const insertMenuSql = `INSERT INTO sys_permission(id, parent_id, name, url, component, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_route, is_leaf, keep_alive, hidden, hide_tab, description, status, del_flag, rule_flag, create_by, create_time, update_by, update_time, internal_or_external)
66
- VALUES ('${buildUUID()}', NULL, '${options.copyTitle}', '${url}', '1', NULL, NULL, 0, NULL, '1', 0.00, 0, NULL, 0, 1, 0, 0, 0, NULL, '1', 0, 0, 'admin', null, NULL, NULL, 0)`;
67
- let modal = createConfirm(__spreadProps(__spreadValues({}, options), {
68
- iconType: (_a = options.iconType) != null ? _a : "info",
69
- width: (_b = options.width) != null ? _b : 500,
70
- title: (_c = options.title) != null ? _c : "\u590D\u5236",
71
- closable: true,
72
- maskClosable: (_d = options.maskClosable) != null ? _d : true,
73
- cancelText: "\u590D\u5236SQL",
74
- okText: (_e = options.okText) != null ? _e : "\u590D\u5236URL",
75
- cancelButtonProps: {
76
- class: "copy-this-sql",
77
- "data-clipboard-text": insertMenuSql
78
- },
79
- okButtonProps: __spreadProps(__spreadValues({}, options.okButtonProps), {
80
- class: COPY_CLASS,
81
- [CLIPBOARD_TEXT]: url
82
- }),
83
- onOk() {
84
- return new Promise((resolve) => {
85
- const clipboard = new Clipboard("." + COPY_CLASS);
86
- clipboard.on("success", () => {
87
- clipboard.destroy();
88
- createMessage.success("\u590D\u5236URL\u6210\u529F");
89
- resolve();
90
- });
91
- clipboard.on("error", () => {
92
- createMessage.error("\u8BE5\u6D4F\u89C8\u5668\u4E0D\u652F\u6301\u81EA\u52A8\u590D\u5236");
93
- clipboard.destroy();
94
- resolve();
95
- });
96
- });
97
- },
98
- onCancel() {
99
- return new Promise((resolve) => {
100
- const clipboard = new Clipboard(".copy-this-sql");
101
- clipboard.on("success", () => {
102
- clipboard.destroy();
103
- createMessage.success("\u590D\u5236\u63D2\u5165\u83DC\u5355SQL\u6210\u529F");
104
- resolve();
105
- });
106
- clipboard.on("error", () => {
107
- createMessage.error("\u8BE5\u6D4F\u89C8\u5668\u4E0D\u652F\u6301\u81EA\u52A8\u590D\u5236");
108
- clipboard.destroy();
109
- resolve();
110
- });
111
- });
112
- }
113
- }));
114
- if (isRef(options.copyText)) {
115
- watch(options.copyText, (copyText) => {
116
- modal.update({
117
- okButtonProps: __spreadProps(__spreadValues({}, options.okButtonProps), {
118
- class: COPY_CLASS,
119
- [CLIPBOARD_TEXT]: copyText
120
- })
121
- });
122
- });
123
- }
124
- return modal;
125
- }
126
- function useCgformList(options) {
127
- const isNormalPage = options.pageType === CgformPageType.normal;
128
- const router = useRouter();
129
- const pageContext = useListPage({
130
- designScope: options.designScope,
131
- tableProps: {
132
- api: list,
133
- columns: options.columns,
134
- formConfig: {
135
- schemas: options.formSchemas
136
- },
137
- beforeFetch: (params) => {
138
- let copyType = isNormalPage ? 0 : 1;
139
- let physicId = isNormalPage ? void 0 : router.currentRoute.value.params.code;
140
- if (isArray(params.tableType_MultiString)) {
141
- params.tableType_MultiString = params.tableType_MultiString.join(",");
142
- }
143
- return Object.assign(params, { copyType, physicId });
144
- }
145
- }
146
- });
147
- const { tableContext, createMessage: $message, createConfirm: $confirm } = pageContext;
148
- const [, { reload, setLoading }, { selectedRowKeys, selectedRows }] = tableContext;
149
- const [registerCgformModal, cgformModal] = useModal();
150
- const [registerDbToOnlineModal, dbToOnlineModal] = useModal();
151
- const [registerCodeGeneratorModal, codeGeneratorModal] = useModal();
152
- const [registerCustomButtonModal, customButtonModal] = useModal();
153
- const [registerEnhanceJsModal, enhanceJsModal] = useModal();
154
- const [registerEnhanceSqlModal, enhanceSqlModal] = useModal();
155
- const [registerEnhanceJavaModal, enhanceJavaModal] = useModal();
156
- const [registerAuthManagerDrawer, authManagerDrawer] = useDrawer();
157
- const [registerAuthSetterModal, authSetterModal] = useModal();
158
- function onAdd() {
159
- cgformModal.openModal(true, { isUpdate: false });
160
- }
161
- function onEdit(record) {
162
- cgformModal.openModal(true, { isUpdate: true, record });
163
- }
164
- function handleDelete(id) {
165
- return __async(this, null, function* () {
166
- yield doSingleDelete(id);
167
- reload();
168
- });
169
- }
170
- function handleRemove(id) {
171
- return __async(this, null, function* () {
172
- yield doSingleRemove(id);
173
- reload();
174
- });
175
- }
176
- function onDeleteBatch() {
177
- let idList = selectedRowKeys.value;
178
- if (idList.length <= 0) {
179
- $message.warning("\u8BF7\u5148\u9009\u62E9\u4E00\u6761\u8BB0\u5F55\uFF01");
180
- return;
181
- }
182
- $confirm({
183
- title: "\u5220\u9664",
184
- content: "<p>\u79FB\u9664\u53EA\u4F1A\u5220\u9664\u8868\u5355\u914D\u7F6E\uFF1B<br>\u5220\u9664\u5219\u4F1A\u5220\u9664\u5BF9\u5E94\u7684\u6570\u636E\u5E93\u8868\u4EE5\u53CA\u5B50\u8868\u4E14\u4E0D\u80FD\u6062\u590D\u3002<br>\u8BF7\u786E\u8BA4\u60A8\u7684\u64CD\u4F5C\u2026</p>",
185
- iconType: "warning",
186
- closable: true,
187
- okText: "\u79FB\u9664",
188
- cancelText: "\u5220\u9664",
189
- cancelButtonProps: { danger: true },
190
- onOk: () => __async(this, null, function* () {
191
- return executeDelete(doBatchRemove, idList, true);
192
- }),
193
- onCancel(event) {
194
- if (!(event == null ? void 0 : event.triggerCancel)) {
195
- return executeDelete(doBatchDelete, idList, true);
196
- }
197
- return Promise.resolve();
198
- }
199
- });
200
- }
201
- function executeDelete(fn, idList, clearSelected = false) {
202
- return __async(this, null, function* () {
203
- try {
204
- setLoading(true);
205
- const res = yield fn(idList);
206
- reload();
207
- if (clearSelected) {
208
- selectedRowKeys.value = [];
209
- }
210
- return res;
211
- } finally {
212
- setLoading(false);
213
- }
214
- return Promise.reject();
215
- });
216
- }
217
- function onShowCustomButton() {
218
- getSelectedRows(([row]) => customButtonModal.openModal(true, { row }));
219
- }
220
- function onShowEnhanceJs() {
221
- getSelectedRows(([row]) => enhanceJsModal.openModal(true, { row }));
222
- }
223
- function onShowEnhanceSql() {
224
- getSelectedRows(([row]) => enhanceSqlModal.openModal(true, { row }));
225
- }
226
- function onShowEnhanceJava() {
227
- getSelectedRows(([row]) => enhanceJavaModal.openModal(true, { row }));
228
- }
229
- function onImportDbTable() {
230
- dbToOnlineModal.openModal(true, {});
231
- }
232
- function getSelectedRows(fn, min = 1, max = 1) {
233
- if (selectedRows.value.length < min) {
234
- $message.warning(`\u8BF7\u5148\u81F3\u5C11\u9009\u4E2D ${min} \u6761\u8BB0\u5F55`);
235
- } else if (selectedRows.value.length > max) {
236
- $message.warning(`\u6700\u591A\u53EA\u80FD\u9009\u4E2D ${min} \u6761\u8BB0\u5F55`);
237
- } else {
238
- fn(selectedRows.value);
239
- }
240
- }
241
- function onGenerateCode() {
242
- if (selectedRows.value.length === 0) {
243
- $message.warning("\u8BF7\u5148\u9009\u4E2D\u4E00\u6761\u8BB0\u5F55");
244
- } else if (selectedRows.value.length > 1) {
245
- $message.warning("\u4EE3\u7801\u751F\u6210\u53EA\u80FD\u9009\u4E2D\u4E00\u6761\u8BB0\u5F55");
246
- } else {
247
- let row = selectedRows.value[0];
248
- if (!row) {
249
- $message.warning("\u8BF7\u9009\u4E2D\u5F53\u524D\u9875\u7684\u6570\u636E\uFF01");
250
- } else if (row.isDbSynch != "Y") {
251
- $message.warning("\u8BF7\u5148\u540C\u6B65\u6570\u636E\u5E93\uFF01");
252
- } else if (row.tableType == 3) {
253
- $message.warning("\u8BF7\u9009\u4E2D\u8BE5\u8868\u5BF9\u5E94\u7684\u4E3B\u8868");
254
- } else {
255
- codeGeneratorModal.openModal(true, { code: row.id });
256
- }
257
- }
258
- }
259
- function onGoToTest(record) {
260
- console.log(record);
261
- if (record.isTree == "Y") {
262
- router.push({ path: "/online/cgformTreeList/" + record.id });
263
- } else {
264
- router.push({ path: "/online/cgformList/" + record.id });
265
- }
266
- }
267
- function onSyncDatabase(record) {
268
- const syncMethod = ref("normal");
269
- const disabled = ref(false);
270
- const modalFunc = $confirm({
271
- iconType: "info",
272
- title: "\u540C\u6B65\u6570\u636E\u5E93",
273
- content: () => h(
274
- "div",
275
- {
276
- style: "margin: 20px 0;"
277
- },
278
- h(
279
- RadioGroup,
280
- {
281
- value: syncMethod.value,
282
- disabled: disabled.value,
283
- "onUpdate:value": (v) => syncMethod.value = v
284
- },
285
- () => [h(Radio, { value: "normal" }, () => "\u666E\u901A\u540C\u6B65\uFF08\u4FDD\u7559\u8868\u6570\u636E\uFF09"), h(Radio, { value: "force" }, () => "\u5F3A\u5236\u540C\u6B65\uFF08\u5220\u9664\u8868\uFF0C\u91CD\u65B0\u751F\u6210\uFF09")]
286
- )
287
- ),
288
- maskClosable: true,
289
- okText: "\u5F00\u59CB\u540C\u6B65",
290
- onOk() {
291
- return __async(this, null, function* () {
292
- disabled.value = true;
293
- modalFunc.update({
294
- maskClosable: false,
295
- keyboard: false,
296
- okText: "\u540C\u6B65\u4E2D\u2026",
297
- okButtonProps: { loading: disabled.value },
298
- cancelButtonProps: { disabled: disabled.value }
299
- });
300
- try {
301
- yield doDatabaseSync(record.id, syncMethod.value);
302
- } catch (e) {
303
- $message.warn(e.message || e);
304
- } finally {
305
- reload();
306
- }
307
- });
308
- }
309
- });
310
- }
311
- const { createCopyModal: createCopyModal2 } = useCopyModal();
312
- function onShowOnlineUrl(record) {
313
- let onlineUrl;
314
- if (record.themeTemplate === "erp") {
315
- onlineUrl = `/online/cgformErpList/${record.id}`;
316
- } else if (record.themeTemplate === "innerTable") {
317
- onlineUrl = `/online/cgformInnerTableList/${record.id}`;
318
- } else if (record.themeTemplate === "tab") {
319
- onlineUrl = `/online/cgformTabList/${record.id}`;
320
- } else if (record.isTree == "Y") {
321
- onlineUrl = `/online/cgformTreeList/${record.id}`;
322
- } else {
323
- onlineUrl = `/online/cgformList/${record.id}`;
324
- }
325
- createCopyModal2({
326
- title: `\u83DC\u5355\u94FE\u63A5\u3010${record.tableTxt}\u3011`,
327
- content: onlineUrl,
328
- copyText: onlineUrl,
329
- copyTitle: `${record.tableTxt}`
330
- });
331
- }
332
- function onCopyTable(record) {
333
- const tableName = ref(record.tableName + "_copy");
334
- $confirm({
335
- title: "\u590D\u5236\u8868",
336
- content: () => h(
337
- "div",
338
- {
339
- style: "margin: 20px 0;"
340
- },
341
- [
342
- "\u8BF7\u8F93\u5165\u65B0\u8868\u540D\uFF1A",
343
- h(Input, {
344
- value: tableName.value,
345
- "onUpdate:value": (v) => tableName.value = v
346
- })
347
- ]
348
- ),
349
- iconType: "info",
350
- closable: true,
351
- okText: "\u590D\u5236",
352
- onOk() {
353
- if (!tableName.value) {
354
- $message.warning("\u8BF7\u8F93\u5165\u65B0\u8868\u540D");
355
- } else if (tableName.value === record.tableName) {
356
- $message.warning("\u65B0\u8868\u540D\u548C\u65E7\u8868\u540D\u4E0D\u80FD\u4E00\u81F4");
357
- } else {
358
- doCopyTable(record.id, tableName.value).then(reload);
359
- }
360
- }
361
- });
362
- }
363
- function getTableAction(record) {
364
- return [
365
- {
366
- label: "\u7F16\u8F91",
367
- onClick: () => onEdit(record)
368
- }
369
- ];
370
- }
371
- function getDropDownAction(record) {
372
- return [
373
- {
374
- label: "\u540C\u6B65\u6570\u636E\u5E93",
375
- onClick: () => onSyncDatabase(record),
376
- ifShow: () => isNormalPage && record.isDbSynch != "Y"
377
- },
378
- {
379
- label: "\u529F\u80FD\u6D4B\u8BD5",
380
- class: ["low-app-hide"],
381
- onClick: () => onGoToTest(record),
382
- ifShow: () => isNormalPage ? record.isDbSynch == "Y" && record.tableType !== 3 : true
383
- },
384
- {
385
- label: "\u914D\u7F6E\u5730\u5740",
386
- class: ["low-app-hide"],
387
- onClick: () => onShowOnlineUrl(record),
388
- ifShow: () => isNormalPage ? record.isDbSynch == "Y" && record.tableType !== 3 : true
389
- },
390
- {
391
- label: "\u6743\u9650\u63A7\u5236",
392
- onClick: () => authManagerDrawer.openDrawer(true, { cgformId: record.id })
393
- },
394
- {
395
- label: "\u89D2\u8272\u6388\u6743",
396
- onClick: () => authSetterModal.openModal(true, { cgformId: record.id })
397
- },
398
- {
399
- label: "\u89C6\u56FE\u7BA1\u7406",
400
- class: ["low-app-hide"],
401
- onClick: () => router.push(`/online/copyform/${record.id}`),
402
- ifShow: () => isNormalPage && record.hascopy == 1
403
- },
404
- {
405
- label: "\u751F\u6210\u89C6\u56FE",
406
- class: ["low-app-hide"],
407
- popConfirm: {
408
- title: "\u786E\u5B9A\u751F\u6210\u89C6\u56FE\u5417\uFF1F",
409
- placement: "left",
410
- confirm: () => {
411
- setLoading(true);
412
- doCopyOnlineView(record.id).then(() => {
413
- $message.success("\u5DF2\u6210\u529F\u751F\u6210\u89C6\u56FE");
414
- }).finally(() => {
415
- setLoading(false);
416
- reload();
417
- });
418
- }
419
- },
420
- ifShow: () => isNormalPage
421
- },
422
- {
423
- label: "\u590D\u5236\u8868",
424
- onClick: () => onCopyTable(record),
425
- ifShow: () => isNormalPage
426
- },
427
- {
428
- label: "\u79FB\u9664",
429
- popConfirm: {
430
- title: "\u786E\u5B9A\u79FB\u9664\u5417\uFF1F",
431
- placement: "left",
432
- confirm: () => handleRemove(record.id)
433
- }
434
- },
435
- {
436
- label: "\u5220\u9664",
437
- popConfirm: {
438
- title: "\u786E\u5B9A\u5220\u9664\u5417\uFF1F",
439
- placement: "left",
440
- confirm: () => handleDelete(record.id)
441
- },
442
- ifShow: () => isNormalPage
443
- }
444
- ];
445
- }
446
- return {
447
- router,
448
- pageContext,
449
- onAdd,
450
- onDeleteBatch,
451
- onImportDbTable,
452
- onGenerateCode,
453
- onShowCustomButton,
454
- onShowEnhanceJs,
455
- onShowEnhanceSql,
456
- onShowEnhanceJava,
457
- getTableAction,
458
- getDropDownAction,
459
- registerCustomButtonModal,
460
- registerEnhanceJsModal,
461
- registerEnhanceSqlModal,
462
- registerEnhanceJavaModal,
463
- registerAuthManagerDrawer,
464
- registerAuthSetterModal,
465
- registerCgformModal,
466
- registerDbToOnlineModal,
467
- registerCodeGeneratorModal
468
- };
469
- }
470
- export { CgformPageType as C, useCgformList as u };