@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
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 };