@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.
- package/AuthButtonConfig-b6a674fa.mjs +125 -0
- package/AuthButtonTree-09e57bc4.mjs +156 -0
- package/AuthDataConfig-6e7e61ec.mjs +212 -0
- package/AuthDataTree-e83286c5.mjs +139 -0
- package/AuthFieldConfig-f1ec2708.mjs +139 -0
- package/AuthFieldTree-bb72e21f.mjs +232 -0
- package/AuthManagerDrawer-28a2d108.mjs +114 -0
- package/AuthSetterModal-2990d553.mjs +261 -0
- package/CgformCopyList-36a4cbf0.mjs +246 -0
- package/CgformModal-7399a5ac.mjs +611 -0
- package/CgreportModal-2eb9c9e1.mjs +13 -0
- package/CgreportModal.vue_vue_type_script_setup_true_lang-c2ceb064.mjs +566 -0
- package/CheckDictTable-3a8a54b3.mjs +211 -0
- package/CodeFileListModal-72f0d3bb.mjs +158 -0
- package/CodeFileViewModal-9eb88c47.mjs +244 -0
- package/CodeGeneratorModal-a89958f5.mjs +233 -0
- package/CustomButtonList-c44aec5a.mjs +363 -0
- package/DBAttributeTable-7d285e8d.mjs +473 -0
- package/DbToOnlineModal-d23cbeb1.mjs +160 -0
- package/DetailForm-2901d215.mjs +461 -0
- package/EnhanceJavaModal-153899a9.mjs +264 -0
- package/EnhanceJsHistory-7f5db3b1.mjs +184 -0
- package/EnhanceJsModal-c2fb75b8.mjs +311 -0
- package/EnhanceSqlModal-965e9b0a.mjs +268 -0
- package/ExtendConfigModal-8f08466f.mjs +111 -0
- package/FieldExtendJsonModal-adfcf5a7.mjs +219 -0
- package/FileSelectModal-432d4521.mjs +103 -0
- package/ForeignKeyTable-faab7ccf.mjs +69 -0
- package/IndexTable-0a2d3718.mjs +89 -0
- package/JModalTip-e1938b49.mjs +46 -0
- package/JOnlineSearchSelect-7e908492.mjs +95 -0
- package/LeftDepart-54f245b3.mjs +82 -0
- package/LeftRole-c138f892.mjs +86 -0
- package/LeftUser-9c812f8a.mjs +105 -0
- package/LinkTableConfigModal-c2c5c7e6.mjs +230 -0
- package/LinkTableFieldConfigModal-a3553b1f.mjs +176 -0
- package/LinkTableListPiece-7f793b08.mjs +34 -0
- package/ModalFormDemo-65685b0e.mjs +78 -0
- package/OnlCgformErpList-52c87ed3.mjs +449 -0
- package/OnlCgformErpSubTable-6e7fb17b.mjs +398 -0
- package/OnlCgformInnerSubTable-f0727b8f.mjs +248 -0
- package/OnlCgformInnerTableList-9f89c173.mjs +430 -0
- package/OnlCgformTabList-15516315.mjs +390 -0
- package/OnlineAutoList-63a0224f.mjs +474 -0
- package/OnlineAutoModal-ffe19c3f.mjs +206 -0
- package/OnlineAutoTreeList-317c7105.mjs +495 -0
- package/OnlineCustomModal-3939ce78.mjs +227 -0
- package/OnlineDetailModal-bfb1375f.mjs +177 -0
- package/OnlineForm-069f6092.mjs +749 -0
- package/OnlineFormDetail-ad5735fb.mjs +296 -0
- package/OnlineQueryForm-0771c80f.mjs +385 -0
- package/OnlineSearchFormItem-0db5834f.mjs +348 -0
- package/OnlineSelectCascade-a05c30f4.mjs +159 -0
- package/OnlineSubFormDetail-583d01eb.mjs +142 -0
- package/OnlineTabAutoModal-747e071d.mjs +253 -0
- package/OnlineTabDetailModal-887f0174.mjs +222 -0
- package/OnlineTabForm-b1dcd4b4.mjs +765 -0
- package/OnlineTabFormDetail-8e494a96.mjs +323 -0
- package/PageAttributeTable-5966b201.mjs +404 -0
- package/ProcessOnlineForm-4382bea7.mjs +177 -0
- package/QueryTable-6e8053ad.mjs +115 -0
- package/README.md +2 -1
- package/SuperQuery-78db6998.mjs +841 -0
- package/SuperQueryValComponent-471110b5.mjs +8 -0
- package/SuperQueryValComponent.vue_vue_type_script_lang-e3ad7ee8.mjs +101 -0
- package/auth.api-d3a6c4b3.mjs +39 -0
- package/auth.data-8be5c9e3.mjs +141 -0
- package/{cgform.data.js → cgform.data-cbdd88c3.mjs} +93 -62
- package/constant-754f1a9d.mjs +9 -0
- package/enhance.api-138e6826.mjs +104 -0
- package/enhance.data-efc7e155.mjs +175 -0
- package/index-0a93652b.mjs +237 -0
- package/index-7e9a23f2.mjs +1494 -0
- package/index-b70302f2.mjs +56 -0
- package/main.index.js +7 -1
- package/package.json +1 -1
- package/style.css +1 -1
- package/useCgformList-0c603af1.mjs +424 -0
- package/useCustomHook-acb00837.mjs +53 -0
- package/useExtendComponent-aa1cdfc8.mjs +3917 -0
- package/useListButton-0f18bf6a.mjs +671 -0
- package/useOnlinePopEvent-687070b7.mjs +19 -0
- package/useOnlineTest-e4bd8be3.mjs +42 -0
- package/useSchemas-43429d80.mjs +685 -0
- package/useTableSync-774c3774.mjs +87 -0
- package/AuthButtonConfig.js +0 -147
- package/AuthButtonTree.js +0 -183
- package/AuthDataConfig.js +0 -246
- package/AuthDataTree.js +0 -160
- package/AuthFieldConfig.js +0 -170
- package/AuthFieldTree.js +0 -281
- package/AuthManagerDrawer.js +0 -125
- package/AuthSetterModal.js +0 -316
- package/CgformCopyList.js +0 -266
- package/CgformModal.js +0 -780
- package/CgreportModal.js +0 -667
- package/CheckDictTable.js +0 -242
- package/CodeFileListModal.js +0 -175
- package/CodeFileViewModal.js +0 -325
- package/CodeGeneratorModal.js +0 -297
- package/CustomButtonList.js +0 -410
- package/DBAttributeTable.js +0 -526
- package/DbToOnlineModal.js +0 -192
- package/DetailForm.js +0 -608
- package/EnhanceJavaModal.js +0 -298
- package/EnhanceJsHistory.js +0 -229
- package/EnhanceJsModal.js +0 -293
- package/EnhanceSqlModal.js +0 -299
- package/ExtendConfigModal.js +0 -151
- package/FieldExtendJsonModal.js +0 -283
- package/FileSelectModal.js +0 -102
- package/ForeignKeyTable.js +0 -79
- package/IndexTable.js +0 -97
- package/JModalTip.js +0 -54
- package/JOnlineSearchSelect.js +0 -115
- package/LICENSE +0 -9
- package/LeftDepart.js +0 -96
- package/LeftRole.js +0 -98
- package/LeftUser.js +0 -117
- package/LinkTableConfigModal.js +0 -289
- package/LinkTableFieldConfigModal.js +0 -218
- package/LinkTableListPiece.js +0 -36
- package/ModalFormDemo.js +0 -85
- package/OnlineAutoList.js +0 -523
- package/OnlineAutoModal.js +0 -226
- package/OnlineAutoTreeList.js +0 -552
- package/OnlineCustomModal.js +0 -286
- package/OnlineDetailModal.js +0 -190
- package/OnlineForm.js +0 -1016
- package/OnlineFormDetail.js +0 -347
- package/OnlineQueryForm.js +0 -484
- package/OnlineSearchFormItem.js +0 -436
- package/OnlineSelectCascade.js +0 -228
- package/OnlineSubFormDetail.js +0 -166
- package/PageAttributeTable.js +0 -486
- package/ProcessOnlineForm.js +0 -208
- package/QueryTable.js +0 -129
- package/SuperQuery.js +0 -1020
- package/SuperQueryValComponent.js +0 -8
- package/SuperQueryValComponent.vue_vue_type_script_lang.js +0 -168
- package/_arrayPush.js +0 -278
- package/_baseClone.js +0 -471
- package/_baseSlice.js +0 -18
- package/_commonjsHelpers.js +0 -5
- package/_flatRest.js +0 -174
- package/auth.api.js +0 -43
- package/auth.data.js +0 -142
- package/clipboard.js +0 -565
- package/enhance.api.js +0 -129
- package/enhance.data.js +0 -196
- package/index.js +0 -87
- package/index2.js +0 -340
- package/index3.js +0 -264
- package/isArray.js +0 -47
- package/omit.js +0 -60
- package/pick.js +0 -68
- package/toString.js +0 -31
- package/useCgformList.js +0 -470
- package/useExtendComponent.js +0 -5205
- package/useListButton.js +0 -923
- package/useOnlineTest.js +0 -44
- package/useSchemas.js +0 -653
- package/useTableSync.js +0 -117
package/DBAttributeTable.js
DELETED
|
@@ -1,526 +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
|
-
import { defineComponent, getCurrentInstance, ref, resolveComponent, openBlock, createBlock, mergeProps } from "vue";
|
|
21
|
-
import { JVxeTypes } from "/@/components/jeecg/JVxeTable/types";
|
|
22
|
-
import { u as useTableSync } from "./useTableSync.js";
|
|
23
|
-
import { _ as _export_sfc } from "./index.js";
|
|
24
|
-
import "./cgform.data.js";
|
|
25
|
-
import "/@/utils/dict";
|
|
26
|
-
import "/@/utils/dict/JDictSelectUtil";
|
|
27
|
-
import "/@/utils/uuid";
|
|
28
|
-
import "./pick.js";
|
|
29
|
-
import "./_flatRest.js";
|
|
30
|
-
import "./isArray.js";
|
|
31
|
-
import "./toString.js";
|
|
32
|
-
import "./_arrayPush.js";
|
|
33
|
-
import "/@/components/jeecg/OnLine/JPopupOnlReport.vue";
|
|
34
|
-
import "/@/hooks/web/useMessage";
|
|
35
|
-
import "vue-router";
|
|
36
|
-
const MySQLKeywords = [
|
|
37
|
-
"ADD",
|
|
38
|
-
"ALL",
|
|
39
|
-
"ALTER",
|
|
40
|
-
"ANALYZE",
|
|
41
|
-
"AND",
|
|
42
|
-
"AS",
|
|
43
|
-
"ASC",
|
|
44
|
-
"ASENSITIVE",
|
|
45
|
-
"BEFORE",
|
|
46
|
-
"BETWEEN",
|
|
47
|
-
"BIGINT",
|
|
48
|
-
"BINARY",
|
|
49
|
-
"BLOB",
|
|
50
|
-
"BOTH",
|
|
51
|
-
"BY",
|
|
52
|
-
"CALL",
|
|
53
|
-
"CASCADE",
|
|
54
|
-
"CASE",
|
|
55
|
-
"CHANGE",
|
|
56
|
-
"CHAR",
|
|
57
|
-
"CHARACTER",
|
|
58
|
-
"CHECK",
|
|
59
|
-
"COLLATE",
|
|
60
|
-
"COLUMN",
|
|
61
|
-
"CONDITION",
|
|
62
|
-
"CONNECTION",
|
|
63
|
-
"CONSTRAINT",
|
|
64
|
-
"CONTINUE",
|
|
65
|
-
"CONVERT",
|
|
66
|
-
"CREATE",
|
|
67
|
-
"CROSS",
|
|
68
|
-
"CURRENT_DATE",
|
|
69
|
-
"CURRENT_TIME",
|
|
70
|
-
"CURRENT_TIMESTAMP",
|
|
71
|
-
"CURRENT_USER",
|
|
72
|
-
"CURSOR",
|
|
73
|
-
"DATABASE",
|
|
74
|
-
"DATABASES",
|
|
75
|
-
"DAY_HOUR",
|
|
76
|
-
"DAY_MICROSECOND",
|
|
77
|
-
"DAY_MINUTE",
|
|
78
|
-
"DAY_SECOND",
|
|
79
|
-
"DEC",
|
|
80
|
-
"DECIMAL",
|
|
81
|
-
"DECLARE",
|
|
82
|
-
"DEFAULT",
|
|
83
|
-
"DELAYED",
|
|
84
|
-
"DELETE",
|
|
85
|
-
"DESC",
|
|
86
|
-
"DESCRIBE",
|
|
87
|
-
"DETERMINISTIC",
|
|
88
|
-
"DISTINCT",
|
|
89
|
-
"DISTINCTROW",
|
|
90
|
-
"DIV",
|
|
91
|
-
"DOUBLE",
|
|
92
|
-
"DROP",
|
|
93
|
-
"DUAL",
|
|
94
|
-
"EACH",
|
|
95
|
-
"ELSE",
|
|
96
|
-
"ELSEIF",
|
|
97
|
-
"ENCLOSED",
|
|
98
|
-
"ESCAPED",
|
|
99
|
-
"EXISTS",
|
|
100
|
-
"EXIT",
|
|
101
|
-
"EXPLAIN",
|
|
102
|
-
"FALSE",
|
|
103
|
-
"FETCH",
|
|
104
|
-
"FLOAT",
|
|
105
|
-
"FLOAT4",
|
|
106
|
-
"FLOAT8",
|
|
107
|
-
"FOR",
|
|
108
|
-
"FORCE",
|
|
109
|
-
"FOREIGN",
|
|
110
|
-
"FROM",
|
|
111
|
-
"FULLTEXT",
|
|
112
|
-
"GOTO",
|
|
113
|
-
"GRANT",
|
|
114
|
-
"GROUP",
|
|
115
|
-
"HAVING",
|
|
116
|
-
"HIGH_PRIORITY",
|
|
117
|
-
"HOUR_MICROSECOND",
|
|
118
|
-
"HOUR_MINUTE",
|
|
119
|
-
"HOUR_SECOND",
|
|
120
|
-
"IF",
|
|
121
|
-
"IGNORE",
|
|
122
|
-
"IN",
|
|
123
|
-
"INDEX",
|
|
124
|
-
"INFILE",
|
|
125
|
-
"INNER",
|
|
126
|
-
"INOUT",
|
|
127
|
-
"INSENSITIVE",
|
|
128
|
-
"INSERT",
|
|
129
|
-
"INT",
|
|
130
|
-
"INT1",
|
|
131
|
-
"INT2",
|
|
132
|
-
"INT3",
|
|
133
|
-
"INT4",
|
|
134
|
-
"INT8",
|
|
135
|
-
"INTEGER",
|
|
136
|
-
"INTERVAL",
|
|
137
|
-
"INTO",
|
|
138
|
-
"IS",
|
|
139
|
-
"ITERATE",
|
|
140
|
-
"JOIN",
|
|
141
|
-
"KEY",
|
|
142
|
-
"KEYS",
|
|
143
|
-
"KILL",
|
|
144
|
-
"LABEL",
|
|
145
|
-
"LEADING",
|
|
146
|
-
"LEAVE",
|
|
147
|
-
"LEFT",
|
|
148
|
-
"LIKE",
|
|
149
|
-
"LIMIT",
|
|
150
|
-
"LINEAR",
|
|
151
|
-
"LINES",
|
|
152
|
-
"LOAD",
|
|
153
|
-
"LOCALTIME",
|
|
154
|
-
"LOCALTIMESTAMP",
|
|
155
|
-
"LOCK",
|
|
156
|
-
"LONG",
|
|
157
|
-
"LONGBLOB",
|
|
158
|
-
"LONGTEXT",
|
|
159
|
-
"LOOP",
|
|
160
|
-
"LOW_PRIORITY",
|
|
161
|
-
"MATCH",
|
|
162
|
-
"MEDIUMBLOB",
|
|
163
|
-
"MEDIUMINT",
|
|
164
|
-
"MEDIUMTEXT",
|
|
165
|
-
"MIDDLEINT",
|
|
166
|
-
"MINUTE_MICROSECOND",
|
|
167
|
-
"MINUTE_SECOND",
|
|
168
|
-
"MOD",
|
|
169
|
-
"MODIFIES",
|
|
170
|
-
"NATURAL",
|
|
171
|
-
"NOT",
|
|
172
|
-
"NO_WRITE_TO_BINLOG",
|
|
173
|
-
"NULL",
|
|
174
|
-
"NUMERIC",
|
|
175
|
-
"ON",
|
|
176
|
-
"OPTIMIZE",
|
|
177
|
-
"OPTION",
|
|
178
|
-
"OPTIONALLY",
|
|
179
|
-
"OR",
|
|
180
|
-
"ORDER",
|
|
181
|
-
"OUT",
|
|
182
|
-
"OUTER",
|
|
183
|
-
"OUTFILE",
|
|
184
|
-
"PRECISION",
|
|
185
|
-
"PRIMARY",
|
|
186
|
-
"PROCEDURE",
|
|
187
|
-
"PURGE",
|
|
188
|
-
"RAID0",
|
|
189
|
-
"RANGE",
|
|
190
|
-
"READ",
|
|
191
|
-
"READS",
|
|
192
|
-
"REAL",
|
|
193
|
-
"REFERENCES",
|
|
194
|
-
"REGEXP",
|
|
195
|
-
"RELEASE",
|
|
196
|
-
"RENAME",
|
|
197
|
-
"REPEAT",
|
|
198
|
-
"REPLACE",
|
|
199
|
-
"REQUIRE",
|
|
200
|
-
"RESTRICT",
|
|
201
|
-
"RETURN",
|
|
202
|
-
"REVOKE",
|
|
203
|
-
"RIGHT",
|
|
204
|
-
"RLIKE",
|
|
205
|
-
"SCHEMA",
|
|
206
|
-
"SCHEMAS",
|
|
207
|
-
"SECOND_MICROSECOND",
|
|
208
|
-
"SELECT",
|
|
209
|
-
"SENSITIVE",
|
|
210
|
-
"SEPARATOR",
|
|
211
|
-
"SET",
|
|
212
|
-
"SHOW",
|
|
213
|
-
"SMALLINT",
|
|
214
|
-
"SPATIAL",
|
|
215
|
-
"SPECIFIC",
|
|
216
|
-
"SQL",
|
|
217
|
-
"SQLEXCEPTION",
|
|
218
|
-
"SQLSTATE",
|
|
219
|
-
"SQLWARNING",
|
|
220
|
-
"SQL_BIG_RESULT",
|
|
221
|
-
"SQL_CALC_FOUND_ROWS",
|
|
222
|
-
"SQL_SMALL_RESULT",
|
|
223
|
-
"SSL",
|
|
224
|
-
"STARTING",
|
|
225
|
-
"STRAIGHT_JOIN",
|
|
226
|
-
"TABLE",
|
|
227
|
-
"TERMINATED",
|
|
228
|
-
"THEN",
|
|
229
|
-
"TINYBLOB",
|
|
230
|
-
"TINYINT",
|
|
231
|
-
"TINYTEXT",
|
|
232
|
-
"TO",
|
|
233
|
-
"TRAILING",
|
|
234
|
-
"TRIGGER",
|
|
235
|
-
"TRUE",
|
|
236
|
-
"UNDO",
|
|
237
|
-
"UNION",
|
|
238
|
-
"UNIQUE",
|
|
239
|
-
"UNLOCK",
|
|
240
|
-
"UNSIGNED",
|
|
241
|
-
"UPDATE",
|
|
242
|
-
"USAGE",
|
|
243
|
-
"USE",
|
|
244
|
-
"USING",
|
|
245
|
-
"UTC_DATE",
|
|
246
|
-
"UTC_TIME",
|
|
247
|
-
"UTC_TIMESTAMP",
|
|
248
|
-
"VALUES",
|
|
249
|
-
"VARBINARY",
|
|
250
|
-
"VARCHAR",
|
|
251
|
-
"VARCHARACTER",
|
|
252
|
-
"VARYING",
|
|
253
|
-
"WHEN",
|
|
254
|
-
"WHERE",
|
|
255
|
-
"WHILE",
|
|
256
|
-
"WITH",
|
|
257
|
-
"WRITE",
|
|
258
|
-
"X509",
|
|
259
|
-
"XOR",
|
|
260
|
-
"YEAR_MONTH",
|
|
261
|
-
"ZEROFILL"
|
|
262
|
-
];
|
|
263
|
-
const _sfc_main = defineComponent({
|
|
264
|
-
name: "DBAttributeTable",
|
|
265
|
-
props: {
|
|
266
|
-
actionButton: { type: Boolean, default: true }
|
|
267
|
-
},
|
|
268
|
-
emits: ["added", "removed", "inserted", "dragged", "syncDbType"],
|
|
269
|
-
setup(props, { emit }) {
|
|
270
|
-
const instance = getCurrentInstance();
|
|
271
|
-
const addBatching = ref(false);
|
|
272
|
-
const columns = ref([
|
|
273
|
-
{
|
|
274
|
-
title: "\u5B57\u6BB5\u540D\u79F0",
|
|
275
|
-
key: "dbFieldName",
|
|
276
|
-
width: 140,
|
|
277
|
-
type: JVxeTypes.input,
|
|
278
|
-
defaultValue: "",
|
|
279
|
-
placeholder: "\u8BF7\u8F93\u5165${title}",
|
|
280
|
-
validateRules: [
|
|
281
|
-
{ required: true, message: "${title}\u4E0D\u80FD\u4E3A\u7A7A" },
|
|
282
|
-
{
|
|
283
|
-
pattern: /^[a-zA-Z]{1}(?!_)[a-zA-Z0-9_\\$]+$/,
|
|
284
|
-
message: "\u547D\u540D\u89C4\u5219\uFF1A\u53EA\u80FD\u7531\u5B57\u6BCD\u3001\u6570\u5B57\u3001\u4E0B\u5212\u7EBF\u3001$\u7B26\u53F7\u7EC4\u6210\uFF1B\u5FC5\u987B\u4EE5\u5B57\u6BCD\u5F00\u5934\uFF1B\u4E0D\u80FD\u4EE5\u5355\u4E2A\u5B57\u6BCD\u52A0\u4E0B\u6ED1\u7EBF\u5F00\u5934"
|
|
285
|
-
},
|
|
286
|
-
{ unique: true, message: "${title}\u4E0D\u80FD\u91CD\u590D" },
|
|
287
|
-
{
|
|
288
|
-
handler({ cellValue }, callback) {
|
|
289
|
-
if (MySQLKeywords.includes(cellValue.toUpperCase())) {
|
|
290
|
-
callback(false, cellValue + "\u662F\u5173\u952E\u5B57\uFF0C\u4E0D\u80FD\u4F5C\u4E3A\u5B57\u6BB5\u540D\u79F0\u4F7F\u7528\uFF01");
|
|
291
|
-
} else {
|
|
292
|
-
callback(true);
|
|
293
|
-
}
|
|
294
|
-
}
|
|
295
|
-
},
|
|
296
|
-
{ handler: validateExistIndex }
|
|
297
|
-
],
|
|
298
|
-
disabled: !props.actionButton
|
|
299
|
-
},
|
|
300
|
-
{
|
|
301
|
-
title: "\u5B57\u6BB5\u5907\u6CE8",
|
|
302
|
-
key: "dbFieldTxt",
|
|
303
|
-
width: 140,
|
|
304
|
-
type: JVxeTypes.input,
|
|
305
|
-
defaultValue: "",
|
|
306
|
-
placeholder: "\u8BF7\u8F93\u5165${title}",
|
|
307
|
-
validateRules: [{ required: true, message: "${title}\u4E0D\u80FD\u4E3A\u7A7A" }]
|
|
308
|
-
},
|
|
309
|
-
{
|
|
310
|
-
title: "\u5B57\u6BB5\u957F\u5EA6",
|
|
311
|
-
key: "dbLength",
|
|
312
|
-
width: 120,
|
|
313
|
-
type: JVxeTypes.inputNumber,
|
|
314
|
-
defaultValue: 32,
|
|
315
|
-
placeholder: "\u8BF7\u8F93\u5165${title}",
|
|
316
|
-
validateRules: [{ required: true, message: "${title}\u4E0D\u80FD\u4E3A\u7A7A" }],
|
|
317
|
-
disabled: !props.actionButton
|
|
318
|
-
},
|
|
319
|
-
{
|
|
320
|
-
title: "\u5C0F\u6570\u70B9",
|
|
321
|
-
key: "dbPointLength",
|
|
322
|
-
width: 100,
|
|
323
|
-
type: JVxeTypes.inputNumber,
|
|
324
|
-
defaultValue: 0,
|
|
325
|
-
placeholder: "\u8BF7\u8F93\u5165${title}",
|
|
326
|
-
validateRules: [{ required: true, message: "${title}\u4E0D\u80FD\u4E3A\u7A7A" }],
|
|
327
|
-
disabled: !props.actionButton
|
|
328
|
-
},
|
|
329
|
-
{
|
|
330
|
-
title: "\u9ED8\u8BA4\u503C",
|
|
331
|
-
key: "dbDefaultVal",
|
|
332
|
-
width: 140,
|
|
333
|
-
type: JVxeTypes.input,
|
|
334
|
-
defaultValue: "",
|
|
335
|
-
disabled: !props.actionButton
|
|
336
|
-
},
|
|
337
|
-
{
|
|
338
|
-
title: "\u5B57\u6BB5\u7C7B\u578B",
|
|
339
|
-
key: "dbType",
|
|
340
|
-
width: 140,
|
|
341
|
-
type: JVxeTypes.select,
|
|
342
|
-
options: [
|
|
343
|
-
{ title: "String", value: "string" },
|
|
344
|
-
{ title: "Integer", value: "int" },
|
|
345
|
-
{ title: "Double", value: "double" },
|
|
346
|
-
{ title: "Date", value: "Date" },
|
|
347
|
-
{ title: "Datetime", value: "Datetime" },
|
|
348
|
-
{ title: "BigDecimal", value: "BigDecimal" },
|
|
349
|
-
{ title: "Text", value: "Text" },
|
|
350
|
-
{ title: "Blob", value: "Blob" }
|
|
351
|
-
],
|
|
352
|
-
defaultValue: "string",
|
|
353
|
-
placeholder: "\u8BF7\u9009\u62E9${title}",
|
|
354
|
-
disabled: !props.actionButton,
|
|
355
|
-
validateRules: [{ required: true, message: "\u8BF7\u9009\u62E9${title}" }]
|
|
356
|
-
},
|
|
357
|
-
{
|
|
358
|
-
title: "\u4E3B\u952E",
|
|
359
|
-
key: "dbIsKey",
|
|
360
|
-
width: 80,
|
|
361
|
-
type: JVxeTypes.checkbox,
|
|
362
|
-
align: "center",
|
|
363
|
-
customValue: ["1", "0"],
|
|
364
|
-
defaultChecked: false,
|
|
365
|
-
disabled: !props.actionButton
|
|
366
|
-
},
|
|
367
|
-
{
|
|
368
|
-
title: "\u5141\u8BB8\u7A7A\u503C",
|
|
369
|
-
key: "dbIsNull",
|
|
370
|
-
width: 80,
|
|
371
|
-
type: JVxeTypes.checkbox,
|
|
372
|
-
customValue: ["1", "0"],
|
|
373
|
-
defaultChecked: true,
|
|
374
|
-
disabled: !props.actionButton
|
|
375
|
-
},
|
|
376
|
-
{
|
|
377
|
-
title: "\u540C\u6B65\u6570\u636E\u5E93",
|
|
378
|
-
key: "dbIsPersist",
|
|
379
|
-
minWidth: 80,
|
|
380
|
-
type: JVxeTypes.checkbox,
|
|
381
|
-
customValue: ["1", "0"],
|
|
382
|
-
defaultChecked: true,
|
|
383
|
-
disabled: !props.actionButton
|
|
384
|
-
},
|
|
385
|
-
{ title: "orderNum", key: "orderNum", type: JVxeTypes.hidden }
|
|
386
|
-
]);
|
|
387
|
-
let removeIds = [];
|
|
388
|
-
const setup = useTableSync(columns);
|
|
389
|
-
const { tableRef, loading, dataSource, tableHeight, tableProps, setDataSource, validateData } = setup;
|
|
390
|
-
function handleAdded() {
|
|
391
|
-
emit("added", instance);
|
|
392
|
-
}
|
|
393
|
-
function handleRemoved(event) {
|
|
394
|
-
removeIds = removeIds.concat(event.deleteRows.map((r) => r.id));
|
|
395
|
-
emit("removed", __spreadProps(__spreadValues({}, event), { removeIds, target: instance }));
|
|
396
|
-
}
|
|
397
|
-
function handleDragged(event) {
|
|
398
|
-
emit("dragged", {
|
|
399
|
-
oldIndex: event.oldIndex,
|
|
400
|
-
newIndex: event.newIndex,
|
|
401
|
-
target: instance
|
|
402
|
-
});
|
|
403
|
-
}
|
|
404
|
-
function handleInserted(event) {
|
|
405
|
-
emit("inserted", __spreadProps(__spreadValues({}, event), { target: instance }));
|
|
406
|
-
}
|
|
407
|
-
function getRemoveIds() {
|
|
408
|
-
return removeIds;
|
|
409
|
-
}
|
|
410
|
-
function handleValueChange(event) {
|
|
411
|
-
let { type, row, col, value, target } = event;
|
|
412
|
-
if (type === JVxeTypes.select && col.key === "dbType") {
|
|
413
|
-
if (value === "Date" || value === "Datetime") {
|
|
414
|
-
emit("syncDbType", { row, value, target: instance });
|
|
415
|
-
}
|
|
416
|
-
if (value === "Blob" || value === "Text" || value === "Date") {
|
|
417
|
-
target.setValues([{ rowKey: row.id, values: { dbLength: "0" } }]);
|
|
418
|
-
} else if (value === "int" || value === "double" || value === "BigDecimal") {
|
|
419
|
-
target.setValues([{ rowKey: row.id, values: { dbLength: "10" } }]);
|
|
420
|
-
} else if (row["dbLength"] === "0") {
|
|
421
|
-
target.setValues([{ rowKey: row.id, values: { dbLength: "32" } }]);
|
|
422
|
-
}
|
|
423
|
-
}
|
|
424
|
-
}
|
|
425
|
-
function handleDisabledDbFieldName(value, _row, rowIndex) {
|
|
426
|
-
if (value === "has_child") {
|
|
427
|
-
return true;
|
|
428
|
-
}
|
|
429
|
-
if (value === "id") {
|
|
430
|
-
if (rowIndex === 0) {
|
|
431
|
-
return true;
|
|
432
|
-
}
|
|
433
|
-
}
|
|
434
|
-
return false;
|
|
435
|
-
}
|
|
436
|
-
function tableAddLine(newLine) {
|
|
437
|
-
tableRef.value.pushRows(newLine);
|
|
438
|
-
if (!addBatching.value) {
|
|
439
|
-
emit("added", instance);
|
|
440
|
-
}
|
|
441
|
-
}
|
|
442
|
-
function tableDeleteLines(ids) {
|
|
443
|
-
return tableRef.value.removeRowsById(ids);
|
|
444
|
-
}
|
|
445
|
-
function addBatchBegin() {
|
|
446
|
-
addBatching.value = true;
|
|
447
|
-
loading.value = true;
|
|
448
|
-
}
|
|
449
|
-
function addBatchEnd() {
|
|
450
|
-
addBatching.value = false;
|
|
451
|
-
loading.value = false;
|
|
452
|
-
emit("added", instance);
|
|
453
|
-
}
|
|
454
|
-
function validateExistIndex({ cellValue, row }, callback) {
|
|
455
|
-
const { tables } = setup;
|
|
456
|
-
if (tables) {
|
|
457
|
-
let dataSource2 = tables.dbTable.value.tableRef.dataSource;
|
|
458
|
-
let temp = dataSource2.filter((item) => item.id === row.id);
|
|
459
|
-
if (!temp || temp.length <= 0) {
|
|
460
|
-
callback(true);
|
|
461
|
-
}
|
|
462
|
-
let dbFieldName = temp[0]["dbFieldName"];
|
|
463
|
-
if (dbFieldName == cellValue) {
|
|
464
|
-
callback(true);
|
|
465
|
-
}
|
|
466
|
-
let arr = tables.idxTable.value.tableRef.getTableData();
|
|
467
|
-
for (let item of arr) {
|
|
468
|
-
let indexField = item.indexField;
|
|
469
|
-
let indexFieldArray = indexField.split(",");
|
|
470
|
-
if (indexFieldArray.indexOf(dbFieldName) >= 0) {
|
|
471
|
-
callback(false, "\u5F53\u524D\u5B57\u6BB5\u5B58\u5728\u7D22\u5F15\u914D\u7F6E\uFF0C\u8BF7\u5148\u5220\u9664\u7D22\u5F15\u518D\u4FEE\u6539\u5B57\u6BB5");
|
|
472
|
-
}
|
|
473
|
-
}
|
|
474
|
-
}
|
|
475
|
-
callback(true);
|
|
476
|
-
}
|
|
477
|
-
return {
|
|
478
|
-
tableRef,
|
|
479
|
-
loading,
|
|
480
|
-
columns,
|
|
481
|
-
dataSource,
|
|
482
|
-
setDataSource,
|
|
483
|
-
addBatchBegin,
|
|
484
|
-
addBatchEnd,
|
|
485
|
-
tableAddLine,
|
|
486
|
-
tableHeight,
|
|
487
|
-
tableProps,
|
|
488
|
-
tableDeleteLines,
|
|
489
|
-
handleAdded,
|
|
490
|
-
handleRemoved,
|
|
491
|
-
handleDragged,
|
|
492
|
-
handleInserted,
|
|
493
|
-
handleValueChange,
|
|
494
|
-
handleDisabledDbFieldName,
|
|
495
|
-
validateData,
|
|
496
|
-
getRemoveIds,
|
|
497
|
-
validateExistIndex
|
|
498
|
-
};
|
|
499
|
-
}
|
|
500
|
-
});
|
|
501
|
-
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
502
|
-
const _component_JVxeTable = resolveComponent("JVxeTable");
|
|
503
|
-
return openBlock(), createBlock(_component_JVxeTable, mergeProps({
|
|
504
|
-
ref: "tableRef",
|
|
505
|
-
rowNumber: "",
|
|
506
|
-
rowSelection: "",
|
|
507
|
-
dragSort: "",
|
|
508
|
-
keyboardEdit: "",
|
|
509
|
-
sortKey: "orderNum",
|
|
510
|
-
addButtonSettings: "",
|
|
511
|
-
loading: _ctx.loading,
|
|
512
|
-
columns: _ctx.columns,
|
|
513
|
-
dataSource: _ctx.dataSource,
|
|
514
|
-
toolbar: _ctx.actionButton,
|
|
515
|
-
maxHeight: _ctx.tableHeight.normal,
|
|
516
|
-
disabledRows: { dbFieldName: _ctx.handleDisabledDbFieldName }
|
|
517
|
-
}, _ctx.tableProps, {
|
|
518
|
-
onAdded: _ctx.handleAdded,
|
|
519
|
-
onRemoved: _ctx.handleRemoved,
|
|
520
|
-
onDragged: _ctx.handleDragged,
|
|
521
|
-
onInserted: _ctx.handleInserted,
|
|
522
|
-
onValueChange: _ctx.handleValueChange
|
|
523
|
-
}), null, 16, ["loading", "columns", "dataSource", "toolbar", "maxHeight", "disabledRows", "onAdded", "onRemoved", "onDragged", "onInserted", "onValueChange"]);
|
|
524
|
-
}
|
|
525
|
-
var DBAttributeTable = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
526
|
-
export { DBAttributeTable as default };
|
package/DbToOnlineModal.js
DELETED
|
@@ -1,192 +0,0 @@
|
|
|
1
|
-
import { defineComponent, ref, resolveComponent, openBlock, createBlock, withCtx, createVNode, createTextVNode, createElementVNode } from "vue";
|
|
2
|
-
import { defHttp } from "/@/utils/http/axios";
|
|
3
|
-
import { BasicTable } from "/@/components/Table";
|
|
4
|
-
import { BasicModal, useModalInner } from "/@/components/Modal";
|
|
5
|
-
import { useListTable } from "/@/hooks/system/useListPage";
|
|
6
|
-
import { useMessage } from "/@/hooks/web/useMessage";
|
|
7
|
-
import { _ as _export_sfc } from "./index.js";
|
|
8
|
-
import "/@/components/jeecg/OnLine/JPopupOnlReport.vue";
|
|
9
|
-
import "vue-router";
|
|
10
|
-
const _sfc_main = defineComponent({
|
|
11
|
-
name: "TransDb2Online",
|
|
12
|
-
components: { BasicModal, BasicTable },
|
|
13
|
-
emits: ["success", "register"],
|
|
14
|
-
setup(_, { emit }) {
|
|
15
|
-
const { createMessage: $message } = useMessage();
|
|
16
|
-
const emptyText = ref("\u6682\u65E0\u6570\u636E");
|
|
17
|
-
const confirmLoading = ref(false);
|
|
18
|
-
const btnLoading = ref(false);
|
|
19
|
-
const metaSource = ref([]);
|
|
20
|
-
const dataSource = ref([]);
|
|
21
|
-
const [registerModal, { closeModal }] = useModalInner(() => {
|
|
22
|
-
btnLoading.value = false;
|
|
23
|
-
emptyText.value = "\u6682\u65E0\u6570\u636E";
|
|
24
|
-
selectedRowKeys.value = [];
|
|
25
|
-
queryTables();
|
|
26
|
-
});
|
|
27
|
-
const [registerTable, { setPagination }, { rowSelection, selectedRowKeys }] = useListTable({
|
|
28
|
-
bordered: true,
|
|
29
|
-
columns: [{ title: "\u8868\u540D", align: "left", dataIndex: "id" }],
|
|
30
|
-
dataSource,
|
|
31
|
-
maxHeight: 300,
|
|
32
|
-
locale: { emptyText },
|
|
33
|
-
pagination: {
|
|
34
|
-
showQuickJumper: false,
|
|
35
|
-
showSizeChanger: false
|
|
36
|
-
},
|
|
37
|
-
clickToRowSelect: true,
|
|
38
|
-
showIndexColumn: true,
|
|
39
|
-
showActionColumn: false,
|
|
40
|
-
formConfig: {
|
|
41
|
-
schemas: [
|
|
42
|
-
{
|
|
43
|
-
label: "\u8868\u540D",
|
|
44
|
-
field: "tableName",
|
|
45
|
-
component: "Input",
|
|
46
|
-
componentProps: {
|
|
47
|
-
style: { width: "100%" },
|
|
48
|
-
placeholder: "\u8BF7\u8F93\u5165\u8868\u540D\u4EE5\u6A21\u7CCA\u7B5B\u9009",
|
|
49
|
-
onChange: (e) => searchFilter(e.target.value)
|
|
50
|
-
},
|
|
51
|
-
disabledLabelWidth: true,
|
|
52
|
-
itemProps: {
|
|
53
|
-
labelCol: { sm: 24, md: 4 },
|
|
54
|
-
wrapperCol: { sm: 24, md: 20 }
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
],
|
|
58
|
-
baseColProps: { xs: 24, sm: 24, md: 24, lg: 24, xl: 24, xxl: 24 },
|
|
59
|
-
showActionButtonGroup: false
|
|
60
|
-
}
|
|
61
|
-
});
|
|
62
|
-
function queryTables() {
|
|
63
|
-
confirmLoading.value = true;
|
|
64
|
-
return defHttp.get(
|
|
65
|
-
{
|
|
66
|
-
url: "/online/cgform/head/queryTables/"
|
|
67
|
-
},
|
|
68
|
-
{
|
|
69
|
-
errorMessageMode: "none"
|
|
70
|
-
}
|
|
71
|
-
).then(
|
|
72
|
-
(result) => {
|
|
73
|
-
dataSource.value = result;
|
|
74
|
-
metaSource.value = [...result];
|
|
75
|
-
return result;
|
|
76
|
-
},
|
|
77
|
-
(e) => {
|
|
78
|
-
if (e.message == "noadminauth") {
|
|
79
|
-
emptyText.value = "\u975Eadmin\u7528\u6237\u65E0\u6743\u9650\u64CD\u4F5C\uFF01";
|
|
80
|
-
$message.warn(emptyText.value);
|
|
81
|
-
} else {
|
|
82
|
-
console.error(e);
|
|
83
|
-
}
|
|
84
|
-
dataSource.value = [];
|
|
85
|
-
metaSource.value = [];
|
|
86
|
-
}
|
|
87
|
-
).finally(() => {
|
|
88
|
-
confirmLoading.value = false;
|
|
89
|
-
});
|
|
90
|
-
}
|
|
91
|
-
function searchFilter(keyword) {
|
|
92
|
-
if (metaSource.value.length === 0)
|
|
93
|
-
return;
|
|
94
|
-
if (!keyword) {
|
|
95
|
-
dataSource.value = [...metaSource.value];
|
|
96
|
-
} else {
|
|
97
|
-
dataSource.value = metaSource.value.filter((item) => item.id.toLowerCase().includes(keyword.toLowerCase()));
|
|
98
|
-
emptyText.value = dataSource.value.length === 0 ? "\u65E0\u7B5B\u9009\u7ED3\u679C" : "\u6682\u65E0\u6570\u636E";
|
|
99
|
-
}
|
|
100
|
-
setPagination({ current: 1 });
|
|
101
|
-
}
|
|
102
|
-
function handleCancel() {
|
|
103
|
-
closeModal();
|
|
104
|
-
}
|
|
105
|
-
function handleTrans() {
|
|
106
|
-
if (!selectedRowKeys.value || selectedRowKeys.value.length == 0) {
|
|
107
|
-
$message.warning("\u8BF7\u9009\u62E9\u4E00\u5F20\u8868");
|
|
108
|
-
return;
|
|
109
|
-
} else {
|
|
110
|
-
btnLoading.value = true;
|
|
111
|
-
let tbNames = selectedRowKeys.value.join(",");
|
|
112
|
-
defHttp.post({ url: "/online/cgform/head/transTables/" + tbNames }).then(() => {
|
|
113
|
-
closeModal();
|
|
114
|
-
emit("success");
|
|
115
|
-
}).finally(() => btnLoading.value = false);
|
|
116
|
-
}
|
|
117
|
-
}
|
|
118
|
-
return {
|
|
119
|
-
emptyText,
|
|
120
|
-
confirmLoading,
|
|
121
|
-
btnLoading,
|
|
122
|
-
metaSource,
|
|
123
|
-
handleTrans,
|
|
124
|
-
handleCancel,
|
|
125
|
-
queryTables,
|
|
126
|
-
registerModal,
|
|
127
|
-
registerTable,
|
|
128
|
-
rowSelection,
|
|
129
|
-
selectedRowKeys
|
|
130
|
-
};
|
|
131
|
-
}
|
|
132
|
-
});
|
|
133
|
-
const _hoisted_1 = /* @__PURE__ */ createElementVNode("div", null, [
|
|
134
|
-
/* @__PURE__ */ createTextVNode(" \u6CE8\uFF1A\u5BFC\u5165\u8868\u4F1A\u6392\u9664\u914D\u7F6E\u524D\u7F00\u8868 "),
|
|
135
|
-
/* @__PURE__ */ createElementVNode("a", {
|
|
136
|
-
href: "http://doc.jeecg.com/2043924",
|
|
137
|
-
target: "_blank"
|
|
138
|
-
}, " \u53C2\u8003\u6587\u6863")
|
|
139
|
-
], -1);
|
|
140
|
-
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
141
|
-
const _component_BasicTable = resolveComponent("BasicTable");
|
|
142
|
-
const _component_a_spin = resolveComponent("a-spin");
|
|
143
|
-
const _component_a_button = resolveComponent("a-button");
|
|
144
|
-
const _component_BasicModal = resolveComponent("BasicModal");
|
|
145
|
-
return openBlock(), createBlock(_component_BasicModal, {
|
|
146
|
-
onRegister: _ctx.registerModal,
|
|
147
|
-
width: 500,
|
|
148
|
-
title: "\u4ECE\u6570\u636E\u5E93\u5BFC\u5165\u8868\u5355",
|
|
149
|
-
confirmLoading: _ctx.confirmLoading,
|
|
150
|
-
onCancel: _ctx.handleCancel
|
|
151
|
-
}, {
|
|
152
|
-
footer: withCtx(() => [
|
|
153
|
-
createVNode(_component_a_button, { onClick: _ctx.handleCancel }, {
|
|
154
|
-
default: withCtx(() => [
|
|
155
|
-
createTextVNode("\u5173\u95ED")
|
|
156
|
-
]),
|
|
157
|
-
_: 1
|
|
158
|
-
}, 8, ["onClick"]),
|
|
159
|
-
createVNode(_component_a_button, {
|
|
160
|
-
onClick: _ctx.handleTrans,
|
|
161
|
-
type: "primary",
|
|
162
|
-
preIcon: "ant-design:swap",
|
|
163
|
-
loading: _ctx.confirmLoading || _ctx.btnLoading
|
|
164
|
-
}, {
|
|
165
|
-
default: withCtx(() => [
|
|
166
|
-
createTextVNode(" \u751F\u6210\u8868\u5355 ")
|
|
167
|
-
]),
|
|
168
|
-
_: 1
|
|
169
|
-
}, 8, ["onClick", "loading"])
|
|
170
|
-
]),
|
|
171
|
-
default: withCtx(() => [
|
|
172
|
-
createVNode(_component_a_spin, { spinning: _ctx.confirmLoading }, {
|
|
173
|
-
default: withCtx(() => [
|
|
174
|
-
createVNode(_component_BasicTable, {
|
|
175
|
-
onRegister: _ctx.registerTable,
|
|
176
|
-
rowSelection: _ctx.rowSelection,
|
|
177
|
-
onTableRedo: _ctx.queryTables
|
|
178
|
-
}, {
|
|
179
|
-
tableTitle: withCtx(() => [
|
|
180
|
-
_hoisted_1
|
|
181
|
-
]),
|
|
182
|
-
_: 1
|
|
183
|
-
}, 8, ["onRegister", "rowSelection", "onTableRedo"])
|
|
184
|
-
]),
|
|
185
|
-
_: 1
|
|
186
|
-
}, 8, ["spinning"])
|
|
187
|
-
]),
|
|
188
|
-
_: 1
|
|
189
|
-
}, 8, ["onRegister", "confirmLoading", "onCancel"]);
|
|
190
|
-
}
|
|
191
|
-
var DbToOnlineModal = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
192
|
-
export { DbToOnlineModal as default };
|