@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.
- package/AuthButtonConfig-2f71787c.mjs +125 -0
- package/AuthButtonTree-d73bccf5.mjs +156 -0
- package/AuthDataConfig-32cf23d2.mjs +212 -0
- package/AuthDataTree-03d62d3f.mjs +139 -0
- package/AuthFieldConfig-b1217a0c.mjs +139 -0
- package/AuthFieldTree-888e04a9.mjs +232 -0
- package/AuthManagerDrawer-f127b8a2.mjs +114 -0
- package/AuthSetterModal-37da78ed.mjs +261 -0
- package/CgformCopyList-3adab58f.mjs +245 -0
- package/CgformModal-6938d8c2.mjs +613 -0
- package/CgreportModal-77ec8c17.mjs +12 -0
- package/CgreportModal.vue_vue_type_script_setup_true_lang-52dcec5e.mjs +567 -0
- package/CheckDictTable-414313f2.mjs +211 -0
- package/CodeFileListModal-4831ce3d.mjs +158 -0
- package/CodeFileViewModal-5990dac4.mjs +244 -0
- package/CodeGeneratorModal-7df9e25d.mjs +234 -0
- package/CustomButtonList-1c9bd859.mjs +363 -0
- package/DBAttributeTable-cd1c41e5.mjs +473 -0
- package/DbToOnlineModal-dc5d2030.mjs +160 -0
- package/DetailForm-e4538e7a.mjs +446 -0
- package/EnhanceJavaModal-7f53d2ca.mjs +260 -0
- package/EnhanceJsHistory-c30805ce.mjs +184 -0
- package/EnhanceJsModal-0b133341.mjs +233 -0
- package/EnhanceSqlModal-33a94c83.mjs +259 -0
- package/ExtendConfigModal-60f2cf86.mjs +111 -0
- package/FieldExtendJsonModal-48f7d67f.mjs +220 -0
- package/FileSelectModal-64aaf623.mjs +91 -0
- package/ForeignKeyTable-cb1abd1d.mjs +69 -0
- package/IndexTable-4e94cd1f.mjs +89 -0
- package/JModalTip-abe1515a.mjs +46 -0
- package/JOnlineSearchSelect-5608a5cf.mjs +94 -0
- package/LeftDepart-ca7a7375.mjs +82 -0
- package/LeftRole-d0fa8398.mjs +86 -0
- package/LeftUser-0c88c240.mjs +105 -0
- package/LinkTableConfigModal-77d7c0b9.mjs +230 -0
- package/LinkTableFieldConfigModal-c5689ab0.mjs +178 -0
- package/LinkTableListPiece-34266919.mjs +34 -0
- package/ModalFormDemo-0eeea994.mjs +78 -0
- package/OnlCgformErpList-7a0388d8.mjs +425 -0
- package/OnlCgformErpSubTable-fc6ade76.mjs +388 -0
- package/OnlineAutoList-85e6a30d.mjs +472 -0
- package/OnlineAutoModal-2a146238.mjs +206 -0
- package/OnlineAutoTreeList-f8d0e100.mjs +495 -0
- package/OnlineCustomModal-456a85a6.mjs +227 -0
- package/OnlineDetailModal-f967f080.mjs +177 -0
- package/OnlineForm-630a22c2.mjs +778 -0
- package/OnlineFormDetail-1b216792.mjs +296 -0
- package/OnlineQueryForm-1c5949a7.mjs +378 -0
- package/OnlineSearchFormItem-7c2ea9ed.mjs +352 -0
- package/OnlineSelectCascade-c7baf52b.mjs +160 -0
- package/OnlineSubFormDetail-0aa4966c.mjs +140 -0
- package/PageAttributeTable-811185fd.mjs +404 -0
- package/ProcessOnlineForm-27be6f6f.mjs +177 -0
- package/QueryTable-4ba771ef.mjs +115 -0
- package/SuperQuery-3821f984.mjs +845 -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-fe20103a.mjs +6 -0
- package/enhance.api-138e6826.mjs +104 -0
- package/enhance.data-efc7e155.mjs +175 -0
- package/index-074b92e5.mjs +236 -0
- package/index-6a09a912.mjs +58 -0
- package/index-9d32ae88.mjs +313 -0
- package/main.index.js +7 -1
- package/package.json +1 -1
- package/style.css +1 -1
- package/useCgformList-2d6a5955.mjs +388 -0
- package/useExtendComponent-48d37d9b.mjs +3919 -0
- package/useListButton-cef1371a.mjs +656 -0
- package/useOnlinePopEvent-e9a042f8.mjs +19 -0
- package/useOnlineTest-0df0ae86.mjs +43 -0
- package/useSchemas-fc8d97ce.mjs +669 -0
- package/useTableSync-dc333087.mjs +83 -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 -524
- package/OnlineAutoModal.js +0 -226
- package/OnlineAutoTreeList.js +0 -553
- package/OnlineCustomModal.js +0 -286
- package/OnlineDetailModal.js +0 -190
- package/OnlineForm.js +0 -1018
- 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 -1021
- package/SuperQueryValComponent.js +0 -9
- package/SuperQueryValComponent.vue_vue_type_script_lang.js +0 -162
- 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/useTableSync.js
DELETED
|
@@ -1,117 +0,0 @@
|
|
|
1
|
-
var __async = (__this, __arguments, generator) => {
|
|
2
|
-
return new Promise((resolve, reject) => {
|
|
3
|
-
var fulfilled = (value) => {
|
|
4
|
-
try {
|
|
5
|
-
step(generator.next(value));
|
|
6
|
-
} catch (e) {
|
|
7
|
-
reject(e);
|
|
8
|
-
}
|
|
9
|
-
};
|
|
10
|
-
var rejected = (value) => {
|
|
11
|
-
try {
|
|
12
|
-
step(generator.throw(value));
|
|
13
|
-
} catch (e) {
|
|
14
|
-
reject(e);
|
|
15
|
-
}
|
|
16
|
-
};
|
|
17
|
-
var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
|
|
18
|
-
step((generator = generator.apply(__this, __arguments)).next());
|
|
19
|
-
});
|
|
20
|
-
};
|
|
21
|
-
import { inject, ref, computed, nextTick } from "vue";
|
|
22
|
-
import { V as VALIDATE_FAILED } from "./cgform.data.js";
|
|
23
|
-
import { p as pick } from "./pick.js";
|
|
24
|
-
function useTableSync(columns) {
|
|
25
|
-
const tables = inject("tables");
|
|
26
|
-
const fullScreenRef = inject("fullScreenRef");
|
|
27
|
-
const tableRef = ref();
|
|
28
|
-
const loading = ref(false);
|
|
29
|
-
const dataSource = ref([]);
|
|
30
|
-
const tableHeight = computed(() => ({
|
|
31
|
-
normal: (fullScreenRef == null ? void 0 : fullScreenRef.value) ? 430 : 260,
|
|
32
|
-
noToolbar: (fullScreenRef == null ? void 0 : fullScreenRef.value) ? 480 : 320
|
|
33
|
-
}));
|
|
34
|
-
const columnKeys = computed(() => ["id"].concat(columns.value.map((col) => col.key)));
|
|
35
|
-
const tableProps = computed(() => {
|
|
36
|
-
return {
|
|
37
|
-
scrollY: {
|
|
38
|
-
gt: 15
|
|
39
|
-
},
|
|
40
|
-
scrollX: {
|
|
41
|
-
gt: 20
|
|
42
|
-
}
|
|
43
|
-
};
|
|
44
|
-
});
|
|
45
|
-
function validateData(activeKey) {
|
|
46
|
-
return __async(this, null, function* () {
|
|
47
|
-
let instance = tableRef.value;
|
|
48
|
-
let errMap = yield instance.fullValidateTable();
|
|
49
|
-
if (errMap) {
|
|
50
|
-
throw { code: VALIDATE_FAILED, activeKey };
|
|
51
|
-
}
|
|
52
|
-
let tableData = instance.getTableData().map((data) => pick(data, columnKeys.value));
|
|
53
|
-
let deleteIds = instance.getDeleteData().map((d) => d.id);
|
|
54
|
-
return { tableData, deleteIds };
|
|
55
|
-
});
|
|
56
|
-
}
|
|
57
|
-
function setDataSource(data, insert = false) {
|
|
58
|
-
return __async(this, null, function* () {
|
|
59
|
-
if (insert) {
|
|
60
|
-
dataSource.value = [];
|
|
61
|
-
yield nextTick();
|
|
62
|
-
yield tableRef.value.addOrInsert(data, 0, null, { setActive: false });
|
|
63
|
-
yield nextTick();
|
|
64
|
-
tableRef.value.recalcDisableRows();
|
|
65
|
-
} else {
|
|
66
|
-
dataSource.value = data;
|
|
67
|
-
}
|
|
68
|
-
});
|
|
69
|
-
}
|
|
70
|
-
function syncTable(dbTable) {
|
|
71
|
-
let targetTable = tableRef.value;
|
|
72
|
-
let sourceTable = dbTable.value.tableRef;
|
|
73
|
-
let removeIds = dbTable.value.getRemoveIds();
|
|
74
|
-
let sourceData = sourceTable.getXTable().internalData.tableFullData;
|
|
75
|
-
let targetData = targetTable.getXTable().internalData.tableFullData;
|
|
76
|
-
sourceData.forEach((sourceValue) => {
|
|
77
|
-
let flag = false;
|
|
78
|
-
targetData.forEach((targetValue) => {
|
|
79
|
-
if (sourceValue.id === targetValue.id) {
|
|
80
|
-
let dbFieldName = targetValue["dbFieldName"];
|
|
81
|
-
let dbFieldTxt = targetValue["dbFieldTxt"];
|
|
82
|
-
if (sourceValue.dbFieldName !== dbFieldName || sourceValue.dbFieldTxt !== dbFieldTxt) {
|
|
83
|
-
targetTable.setValues([
|
|
84
|
-
{
|
|
85
|
-
rowKey: targetValue.id,
|
|
86
|
-
values: {
|
|
87
|
-
dbFieldName: sourceValue.dbFieldName,
|
|
88
|
-
dbFieldTxt: sourceValue.dbFieldTxt
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
]);
|
|
92
|
-
}
|
|
93
|
-
flag = true;
|
|
94
|
-
} else {
|
|
95
|
-
removeIds.forEach((deletedId) => {
|
|
96
|
-
if (deletedId === targetValue.id) {
|
|
97
|
-
targetTable.removeRowsById(deletedId);
|
|
98
|
-
flag = true;
|
|
99
|
-
}
|
|
100
|
-
});
|
|
101
|
-
}
|
|
102
|
-
});
|
|
103
|
-
if (!flag) {
|
|
104
|
-
let record = Object.assign({}, sourceValue);
|
|
105
|
-
columns.value.forEach((column) => {
|
|
106
|
-
if (column.key !== "dbFieldName" && column.key !== "dbFieldTxt") {
|
|
107
|
-
record[column.key] = column.defaultValue;
|
|
108
|
-
}
|
|
109
|
-
});
|
|
110
|
-
targetTable.addRows(record);
|
|
111
|
-
}
|
|
112
|
-
});
|
|
113
|
-
return nextTick();
|
|
114
|
-
}
|
|
115
|
-
return { tables, tableRef, loading, dataSource, columnKeys, tableHeight, tableProps, syncTable, validateData, setDataSource };
|
|
116
|
-
}
|
|
117
|
-
export { useTableSync as u };
|