vxe-gantt 4.0.24 → 4.0.25
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/es/gantt/src/gantt.js +155 -37
- package/es/ui/index.js +1 -1
- package/es/ui/src/log.js +1 -1
- package/lib/gantt/src/gantt.js +171 -48
- package/lib/gantt/src/gantt.min.js +1 -1
- package/lib/index.umd.js +176 -51
- package/lib/index.umd.min.js +1 -1
- package/lib/ui/index.js +1 -1
- package/lib/ui/index.min.js +1 -1
- package/lib/ui/src/log.js +1 -1
- package/lib/ui/src/log.min.js +1 -1
- package/package.json +1 -1
- package/packages/gantt/src/gantt.ts +187 -70
package/lib/gantt/src/gantt.js
CHANGED
|
@@ -35,6 +35,7 @@ const tableComponentMethodKeys = ['clearAll', 'syncData', 'updateData', 'loadDat
|
|
|
35
35
|
const defaultLayouts = [['Form'], ['Toolbar', 'Top', 'Gantt', 'Bottom', 'Pager']];
|
|
36
36
|
function createInternalData() {
|
|
37
37
|
return {
|
|
38
|
+
uFoot: false,
|
|
38
39
|
resizeTableWidth: 0
|
|
39
40
|
};
|
|
40
41
|
}
|
|
@@ -99,6 +100,7 @@ var _default = exports.default = (0, _comp.defineVxeComponent)({
|
|
|
99
100
|
filterData: [],
|
|
100
101
|
formData: {},
|
|
101
102
|
sortData: [],
|
|
103
|
+
footerData: [],
|
|
102
104
|
tZindex: 0,
|
|
103
105
|
tablePage: {
|
|
104
106
|
total: 0,
|
|
@@ -272,13 +274,17 @@ var _default = exports.default = (0, _comp.defineVxeComponent)({
|
|
|
272
274
|
});
|
|
273
275
|
const computeTableExtendProps = (0, _vue.computed)(() => {
|
|
274
276
|
const rest = {};
|
|
277
|
+
const ganttProps = props;
|
|
275
278
|
tableComponentPropKeys.forEach(key => {
|
|
276
|
-
|
|
279
|
+
if (ganttProps[key] !== undefined) {
|
|
280
|
+
rest[key] = ganttProps[key];
|
|
281
|
+
}
|
|
277
282
|
});
|
|
278
283
|
return rest;
|
|
279
284
|
});
|
|
280
285
|
const computeTableProps = (0, _vue.computed)(() => {
|
|
281
286
|
const {
|
|
287
|
+
showFooter,
|
|
282
288
|
seqConfig,
|
|
283
289
|
pagerConfig,
|
|
284
290
|
editConfig,
|
|
@@ -286,7 +292,8 @@ var _default = exports.default = (0, _comp.defineVxeComponent)({
|
|
|
286
292
|
} = props;
|
|
287
293
|
const {
|
|
288
294
|
isZMax,
|
|
289
|
-
tablePage
|
|
295
|
+
tablePage,
|
|
296
|
+
footerData
|
|
290
297
|
} = reactData;
|
|
291
298
|
const taskViewOpts = computeTaskViewOpts.value;
|
|
292
299
|
const {
|
|
@@ -310,8 +317,15 @@ var _default = exports.default = (0, _comp.defineVxeComponent)({
|
|
|
310
317
|
tProps.border = border;
|
|
311
318
|
}
|
|
312
319
|
}
|
|
320
|
+
if (showFooter && !tProps.footerData) {
|
|
321
|
+
// 如果未设置自己的标位数据,则使用代理的
|
|
322
|
+
tProps.footerData = footerData;
|
|
323
|
+
} else if (proxyOpts.footer && footerData.length) {
|
|
324
|
+
// 如果代理标为数据,且未请求到数据,则用自己的
|
|
325
|
+
tProps.footerData = footerData;
|
|
326
|
+
}
|
|
313
327
|
if (isZMax) {
|
|
314
|
-
if (
|
|
328
|
+
if (tProps.maxHeight) {
|
|
315
329
|
tProps.maxHeight = '100%';
|
|
316
330
|
} else {
|
|
317
331
|
tProps.height = '100%';
|
|
@@ -693,9 +707,12 @@ var _default = exports.default = (0, _comp.defineVxeComponent)({
|
|
|
693
707
|
reactData.filterData = params.filterList;
|
|
694
708
|
if (proxyConfig && (0, _utils.isEnableConf)(proxyOpts)) {
|
|
695
709
|
reactData.tablePage.currentPage = 1;
|
|
710
|
+
internalData.uFoot = true;
|
|
696
711
|
$xeGantt.commitProxy('query').then(rest => {
|
|
697
712
|
$xeGantt.dispatchEvent('proxy-query', rest, params.$event);
|
|
698
713
|
});
|
|
714
|
+
internalData.uFoot = false;
|
|
715
|
+
updateQueryFooter();
|
|
699
716
|
}
|
|
700
717
|
}
|
|
701
718
|
};
|
|
@@ -716,11 +733,14 @@ var _default = exports.default = (0, _comp.defineVxeComponent)({
|
|
|
716
733
|
return;
|
|
717
734
|
}
|
|
718
735
|
if (proxyConfig && (0, _utils.isEnableConf)(proxyOpts)) {
|
|
736
|
+
internalData.uFoot = true;
|
|
719
737
|
$xeGantt.commitProxy('reload').then(rest => {
|
|
720
738
|
$xeGantt.dispatchEvent('proxy-query', Object.assign(Object.assign({}, rest), {
|
|
721
739
|
isReload: true
|
|
722
740
|
}), params.$event);
|
|
723
741
|
});
|
|
742
|
+
internalData.uFoot = false;
|
|
743
|
+
updateQueryFooter();
|
|
724
744
|
}
|
|
725
745
|
$xeGantt.dispatchEvent('form-submit', params, params.$event);
|
|
726
746
|
};
|
|
@@ -737,11 +757,14 @@ var _default = exports.default = (0, _comp.defineVxeComponent)({
|
|
|
737
757
|
if ($xeTable) {
|
|
738
758
|
$xeTable.clearScroll();
|
|
739
759
|
}
|
|
760
|
+
internalData.uFoot = true;
|
|
740
761
|
$xeGantt.commitProxy('reload').then(rest => {
|
|
741
762
|
$xeGantt.dispatchEvent('proxy-query', Object.assign(Object.assign({}, rest), {
|
|
742
763
|
isReload: true
|
|
743
764
|
}), $event);
|
|
744
765
|
});
|
|
766
|
+
internalData.uFoot = false;
|
|
767
|
+
updateQueryFooter();
|
|
745
768
|
}
|
|
746
769
|
$xeGantt.dispatchEvent('form-reset', params, $event);
|
|
747
770
|
};
|
|
@@ -899,6 +922,8 @@ var _default = exports.default = (0, _comp.defineVxeComponent)({
|
|
|
899
922
|
let itemValue = null;
|
|
900
923
|
if (itemRender) {
|
|
901
924
|
const {
|
|
925
|
+
startField,
|
|
926
|
+
endField,
|
|
902
927
|
defaultValue
|
|
903
928
|
} = itemRender;
|
|
904
929
|
if (_xeUtils.default.isFunction(defaultValue)) {
|
|
@@ -908,6 +933,10 @@ var _default = exports.default = (0, _comp.defineVxeComponent)({
|
|
|
908
933
|
} else if (!_xeUtils.default.isUndefined(defaultValue)) {
|
|
909
934
|
itemValue = defaultValue;
|
|
910
935
|
}
|
|
936
|
+
if (startField && endField) {
|
|
937
|
+
_xeUtils.default.set(fData, startField, null);
|
|
938
|
+
_xeUtils.default.set(fData, endField, null);
|
|
939
|
+
}
|
|
911
940
|
}
|
|
912
941
|
fData[field] = itemValue;
|
|
913
942
|
}
|
|
@@ -933,7 +962,13 @@ var _default = exports.default = (0, _comp.defineVxeComponent)({
|
|
|
933
962
|
if (!proxyInited) {
|
|
934
963
|
reactData.proxyInited = true;
|
|
935
964
|
if (proxyOpts.autoLoad !== false) {
|
|
936
|
-
(0, _vue.nextTick)().then(() =>
|
|
965
|
+
(0, _vue.nextTick)().then(() => {
|
|
966
|
+
internalData.uFoot = true;
|
|
967
|
+
const rest = $xeGantt.commitProxy('initial');
|
|
968
|
+
internalData.uFoot = false;
|
|
969
|
+
updateQueryFooter();
|
|
970
|
+
return rest;
|
|
971
|
+
}).then(rest => {
|
|
937
972
|
dispatchEvent('proxy-query', Object.assign(Object.assign({}, rest), {
|
|
938
973
|
isInited: true
|
|
939
974
|
}), new Event('initial'));
|
|
@@ -942,6 +977,15 @@ var _default = exports.default = (0, _comp.defineVxeComponent)({
|
|
|
942
977
|
}
|
|
943
978
|
}
|
|
944
979
|
};
|
|
980
|
+
const updateQueryFooter = () => {
|
|
981
|
+
const proxyOpts = computeProxyOpts.value;
|
|
982
|
+
const {
|
|
983
|
+
ajax
|
|
984
|
+
} = proxyOpts;
|
|
985
|
+
if (ajax && ajax.queryFooter) {
|
|
986
|
+
return $xeGantt.commitProxy('queryFooter');
|
|
987
|
+
}
|
|
988
|
+
};
|
|
945
989
|
const handleGlobalKeydownEvent = evnt => {
|
|
946
990
|
const zoomOpts = computeZoomOpts.value;
|
|
947
991
|
const isEsc = globalEvents.hasKey(evnt, GLOBAL_EVENT_KEYS.ESCAPE);
|
|
@@ -966,6 +1010,7 @@ var _default = exports.default = (0, _comp.defineVxeComponent)({
|
|
|
966
1010
|
*/
|
|
967
1011
|
commitProxy(proxyTarget, ...args) {
|
|
968
1012
|
const {
|
|
1013
|
+
showFooter,
|
|
969
1014
|
proxyConfig,
|
|
970
1015
|
toolbarConfig,
|
|
971
1016
|
pagerConfig,
|
|
@@ -983,6 +1028,8 @@ var _default = exports.default = (0, _comp.defineVxeComponent)({
|
|
|
983
1028
|
const {
|
|
984
1029
|
beforeQuery,
|
|
985
1030
|
afterQuery,
|
|
1031
|
+
beforeQueryFooter,
|
|
1032
|
+
afterQueryFooter,
|
|
986
1033
|
beforeDelete,
|
|
987
1034
|
afterDelete,
|
|
988
1035
|
beforeSave,
|
|
@@ -1047,15 +1094,16 @@ var _default = exports.default = (0, _comp.defineVxeComponent)({
|
|
|
1047
1094
|
case 'reload':
|
|
1048
1095
|
case 'query':
|
|
1049
1096
|
{
|
|
1050
|
-
const
|
|
1051
|
-
const
|
|
1052
|
-
const
|
|
1053
|
-
if (
|
|
1097
|
+
const qMethods = ajax.query;
|
|
1098
|
+
const qsMethods = ajax.querySuccess;
|
|
1099
|
+
const qeMethods = ajax.queryError;
|
|
1100
|
+
if (qMethods) {
|
|
1054
1101
|
const isInited = code === 'initial';
|
|
1055
1102
|
const isReload = code === 'reload';
|
|
1056
1103
|
if (!isInited && reactData.tableLoading) {
|
|
1057
1104
|
return (0, _vue.nextTick)();
|
|
1058
1105
|
}
|
|
1106
|
+
let operPromise = null;
|
|
1059
1107
|
let sortList = [];
|
|
1060
1108
|
let filterList = [];
|
|
1061
1109
|
let pageParams = {};
|
|
@@ -1117,7 +1165,7 @@ var _default = exports.default = (0, _comp.defineVxeComponent)({
|
|
|
1117
1165
|
} else {
|
|
1118
1166
|
if ($xeTable) {
|
|
1119
1167
|
if (isReload) {
|
|
1120
|
-
$xeTable.clearAll();
|
|
1168
|
+
operPromise = $xeTable.clearAll();
|
|
1121
1169
|
} else {
|
|
1122
1170
|
sortList = $xeTable.getSortColumns();
|
|
1123
1171
|
filterList = $xeTable.getCheckedFilters();
|
|
@@ -1137,31 +1185,27 @@ var _default = exports.default = (0, _comp.defineVxeComponent)({
|
|
|
1137
1185
|
sorts: sortList,
|
|
1138
1186
|
filters: filterList,
|
|
1139
1187
|
form: formData,
|
|
1140
|
-
options:
|
|
1188
|
+
options: qMethods
|
|
1141
1189
|
};
|
|
1142
1190
|
reactData.sortData = sortList;
|
|
1143
1191
|
reactData.filterData = filterList;
|
|
1144
1192
|
reactData.tableLoading = true;
|
|
1145
|
-
return Promise.resolve((beforeQuery ||
|
|
1193
|
+
return Promise.all([Promise.resolve((beforeQuery || qMethods)(commitParams, ...args)), operPromise]).then(([rest]) => {
|
|
1146
1194
|
let tableData = [];
|
|
1147
1195
|
reactData.tableLoading = false;
|
|
1148
1196
|
if (rest) {
|
|
1197
|
+
const reParams = {
|
|
1198
|
+
data: rest,
|
|
1199
|
+
$table: $xeTable,
|
|
1200
|
+
$grid: null,
|
|
1201
|
+
$gantt: $xeGantt
|
|
1202
|
+
};
|
|
1149
1203
|
if (pagerConfig && (0, _utils.isEnableConf)(pagerOpts)) {
|
|
1150
1204
|
const totalProp = resConfigs.total;
|
|
1151
|
-
const total = (_xeUtils.default.isFunction(totalProp) ? totalProp(
|
|
1152
|
-
data: rest,
|
|
1153
|
-
$table: $xeTable,
|
|
1154
|
-
$grid: null,
|
|
1155
|
-
$gantt: $xeGantt
|
|
1156
|
-
}) : _xeUtils.default.get(rest, totalProp || 'page.total')) || 0;
|
|
1205
|
+
const total = (_xeUtils.default.isFunction(totalProp) ? totalProp(reParams) : _xeUtils.default.get(rest, totalProp || 'page.total')) || 0;
|
|
1157
1206
|
tablePage.total = _xeUtils.default.toNumber(total);
|
|
1158
1207
|
const resultProp = resConfigs.result;
|
|
1159
|
-
tableData = (_xeUtils.default.isFunction(resultProp) ? resultProp(
|
|
1160
|
-
data: rest,
|
|
1161
|
-
$table: $xeTable,
|
|
1162
|
-
$grid: null,
|
|
1163
|
-
$gantt: $xeGantt
|
|
1164
|
-
}) : _xeUtils.default.get(rest, resultProp || 'result')) || [];
|
|
1208
|
+
tableData = (_xeUtils.default.isFunction(resultProp) ? resultProp(reParams) : _xeUtils.default.get(rest, resultProp || 'result')) || [];
|
|
1165
1209
|
// 检验当前页码,不能超出当前最大页数
|
|
1166
1210
|
const pageCount = Math.max(Math.ceil(total / tablePage.pageSize), 1);
|
|
1167
1211
|
if (tablePage.currentPage > pageCount) {
|
|
@@ -1169,18 +1213,25 @@ var _default = exports.default = (0, _comp.defineVxeComponent)({
|
|
|
1169
1213
|
}
|
|
1170
1214
|
} else {
|
|
1171
1215
|
const listProp = resConfigs.list;
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1216
|
+
if (_xeUtils.default.isArray(rest)) {
|
|
1217
|
+
tableData = rest;
|
|
1218
|
+
} else if (listProp) {
|
|
1219
|
+
tableData = (_xeUtils.default.isFunction(listProp) ? listProp(reParams) : _xeUtils.default.get(rest, listProp)) || [];
|
|
1220
|
+
}
|
|
1221
|
+
}
|
|
1222
|
+
if (showFooter) {
|
|
1223
|
+
const fdProp = resConfigs.footerData;
|
|
1224
|
+
const footerList = fdProp ? _xeUtils.default.isFunction(fdProp) ? fdProp(reParams) : _xeUtils.default.get(rest, fdProp) : [];
|
|
1225
|
+
if (_xeUtils.default.isArray(footerList)) {
|
|
1226
|
+
reactData.footerData = footerList;
|
|
1227
|
+
}
|
|
1178
1228
|
}
|
|
1179
1229
|
}
|
|
1180
1230
|
if ($xeTable) {
|
|
1181
1231
|
$xeTable.loadData(tableData);
|
|
1182
1232
|
} else {
|
|
1183
1233
|
(0, _vue.nextTick)(() => {
|
|
1234
|
+
const $xeTable = refTable.value;
|
|
1184
1235
|
if ($xeTable) {
|
|
1185
1236
|
$xeTable.loadData(tableData);
|
|
1186
1237
|
}
|
|
@@ -1189,8 +1240,8 @@ var _default = exports.default = (0, _comp.defineVxeComponent)({
|
|
|
1189
1240
|
if (afterQuery) {
|
|
1190
1241
|
afterQuery(commitParams, ...args);
|
|
1191
1242
|
}
|
|
1192
|
-
if (
|
|
1193
|
-
|
|
1243
|
+
if (qsMethods) {
|
|
1244
|
+
qsMethods(Object.assign(Object.assign({}, commitParams), {
|
|
1194
1245
|
response: rest
|
|
1195
1246
|
}));
|
|
1196
1247
|
}
|
|
@@ -1199,8 +1250,56 @@ var _default = exports.default = (0, _comp.defineVxeComponent)({
|
|
|
1199
1250
|
};
|
|
1200
1251
|
}).catch(rest => {
|
|
1201
1252
|
reactData.tableLoading = false;
|
|
1202
|
-
if (
|
|
1203
|
-
|
|
1253
|
+
if (qeMethods) {
|
|
1254
|
+
qeMethods(Object.assign(Object.assign({}, commitParams), {
|
|
1255
|
+
response: rest
|
|
1256
|
+
}));
|
|
1257
|
+
}
|
|
1258
|
+
return {
|
|
1259
|
+
status: false
|
|
1260
|
+
};
|
|
1261
|
+
});
|
|
1262
|
+
} else {
|
|
1263
|
+
(0, _log.errLog)('vxe.error.notFunc', ['[gantt] proxy-config.ajax.query']);
|
|
1264
|
+
}
|
|
1265
|
+
break;
|
|
1266
|
+
}
|
|
1267
|
+
case 'queryFooter':
|
|
1268
|
+
{
|
|
1269
|
+
const qfMethods = ajax.queryFooter;
|
|
1270
|
+
const qfSuccessMethods = ajax.queryFooterSuccess;
|
|
1271
|
+
const qfErrorMethods = ajax.queryFooterError;
|
|
1272
|
+
if (qfMethods) {
|
|
1273
|
+
let filterList = [];
|
|
1274
|
+
if ($xeTable) {
|
|
1275
|
+
filterList = $xeTable.getCheckedFilters();
|
|
1276
|
+
}
|
|
1277
|
+
const commitParams = {
|
|
1278
|
+
$table: $xeTable,
|
|
1279
|
+
$grid: null,
|
|
1280
|
+
$gantt: $xeGantt,
|
|
1281
|
+
code,
|
|
1282
|
+
button,
|
|
1283
|
+
filters: filterList,
|
|
1284
|
+
form: formData,
|
|
1285
|
+
options: qfMethods
|
|
1286
|
+
};
|
|
1287
|
+
return Promise.resolve((beforeQueryFooter || qfMethods)(commitParams, ...args)).then(rest => {
|
|
1288
|
+
reactData.footerData = _xeUtils.default.isArray(rest) ? rest : [];
|
|
1289
|
+
if (afterQueryFooter) {
|
|
1290
|
+
afterQueryFooter(commitParams, ...args);
|
|
1291
|
+
}
|
|
1292
|
+
if (qfSuccessMethods) {
|
|
1293
|
+
qfSuccessMethods(Object.assign(Object.assign({}, commitParams), {
|
|
1294
|
+
response: rest
|
|
1295
|
+
}));
|
|
1296
|
+
}
|
|
1297
|
+
return {
|
|
1298
|
+
status: true
|
|
1299
|
+
};
|
|
1300
|
+
}).catch(rest => {
|
|
1301
|
+
if (qfErrorMethods) {
|
|
1302
|
+
qfErrorMethods(Object.assign(Object.assign({}, commitParams), {
|
|
1204
1303
|
response: rest
|
|
1205
1304
|
}));
|
|
1206
1305
|
}
|
|
@@ -1209,16 +1308,16 @@ var _default = exports.default = (0, _comp.defineVxeComponent)({
|
|
|
1209
1308
|
};
|
|
1210
1309
|
});
|
|
1211
1310
|
} else {
|
|
1212
|
-
(0, _log.errLog)('vxe.error.notFunc', ['proxy-config.ajax.
|
|
1311
|
+
(0, _log.errLog)('vxe.error.notFunc', ['[gantt] proxy-config.ajax.queryFooter']);
|
|
1213
1312
|
}
|
|
1214
1313
|
break;
|
|
1215
1314
|
}
|
|
1216
1315
|
case 'delete':
|
|
1217
1316
|
{
|
|
1218
|
-
const
|
|
1317
|
+
const dMethods = ajax.delete;
|
|
1219
1318
|
const deleteSuccessMethods = ajax.deleteSuccess;
|
|
1220
1319
|
const deleteErrorMethods = ajax.deleteError;
|
|
1221
|
-
if (
|
|
1320
|
+
if (dMethods) {
|
|
1222
1321
|
const selectRecords = $xeGantt.getCheckboxRecords();
|
|
1223
1322
|
const removeRecords = selectRecords.filter(row => !$xeTable.isInsertByRow(row));
|
|
1224
1323
|
const body = {
|
|
@@ -1232,7 +1331,7 @@ var _default = exports.default = (0, _comp.defineVxeComponent)({
|
|
|
1232
1331
|
button,
|
|
1233
1332
|
body,
|
|
1234
1333
|
form: formData,
|
|
1235
|
-
options:
|
|
1334
|
+
options: dMethods
|
|
1236
1335
|
};
|
|
1237
1336
|
if (selectRecords.length) {
|
|
1238
1337
|
return handleDeleteRow(code, 'vxe.grid.deleteSelectRecord', () => {
|
|
@@ -1240,7 +1339,7 @@ var _default = exports.default = (0, _comp.defineVxeComponent)({
|
|
|
1240
1339
|
return $xeTable.remove(selectRecords);
|
|
1241
1340
|
}
|
|
1242
1341
|
reactData.tableLoading = true;
|
|
1243
|
-
return Promise.resolve((beforeDelete ||
|
|
1342
|
+
return Promise.resolve((beforeDelete || dMethods)(commitParams, ...args)).then(rest => {
|
|
1244
1343
|
reactData.tableLoading = false;
|
|
1245
1344
|
$xeTable.setPendingRow(removeRecords, false);
|
|
1246
1345
|
if (isRespMsg) {
|
|
@@ -1254,7 +1353,10 @@ var _default = exports.default = (0, _comp.defineVxeComponent)({
|
|
|
1254
1353
|
if (afterDelete) {
|
|
1255
1354
|
afterDelete(commitParams, ...args);
|
|
1256
1355
|
} else {
|
|
1356
|
+
internalData.uFoot = true;
|
|
1257
1357
|
$xeGantt.commitProxy('query');
|
|
1358
|
+
internalData.uFoot = false;
|
|
1359
|
+
updateQueryFooter();
|
|
1258
1360
|
}
|
|
1259
1361
|
if (deleteSuccessMethods) {
|
|
1260
1362
|
deleteSuccessMethods(Object.assign(Object.assign({}, commitParams), {
|
|
@@ -1297,7 +1399,7 @@ var _default = exports.default = (0, _comp.defineVxeComponent)({
|
|
|
1297
1399
|
}
|
|
1298
1400
|
}
|
|
1299
1401
|
} else {
|
|
1300
|
-
(0, _log.errLog)('vxe.error.notFunc', ['proxy-config.ajax.delete']);
|
|
1402
|
+
(0, _log.errLog)('vxe.error.notFunc', ['[gantt] proxy-config.ajax.delete']);
|
|
1301
1403
|
}
|
|
1302
1404
|
break;
|
|
1303
1405
|
}
|
|
@@ -1358,7 +1460,10 @@ var _default = exports.default = (0, _comp.defineVxeComponent)({
|
|
|
1358
1460
|
if (afterSave) {
|
|
1359
1461
|
afterSave(commitParams, ...args);
|
|
1360
1462
|
} else {
|
|
1463
|
+
internalData.uFoot = true;
|
|
1361
1464
|
$xeGantt.commitProxy('query');
|
|
1465
|
+
internalData.uFoot = false;
|
|
1466
|
+
updateQueryFooter();
|
|
1362
1467
|
}
|
|
1363
1468
|
if (saveSuccessMethods) {
|
|
1364
1469
|
saveSuccessMethods(Object.assign(Object.assign({}, commitParams), {
|
|
@@ -1401,7 +1506,7 @@ var _default = exports.default = (0, _comp.defineVxeComponent)({
|
|
|
1401
1506
|
}
|
|
1402
1507
|
});
|
|
1403
1508
|
} else {
|
|
1404
|
-
(0, _log.errLog)('vxe.error.notFunc', ['proxy-config.ajax.save']);
|
|
1509
|
+
(0, _log.errLog)('vxe.error.notFunc', ['[gantt] proxy-config.ajax.save']);
|
|
1405
1510
|
}
|
|
1406
1511
|
break;
|
|
1407
1512
|
}
|
|
@@ -1419,7 +1524,7 @@ var _default = exports.default = (0, _comp.defineVxeComponent)({
|
|
|
1419
1524
|
$gantt: $xeGantt
|
|
1420
1525
|
}, ...args);
|
|
1421
1526
|
} else {
|
|
1422
|
-
(0, _log.errLog)('vxe.error.notCommands', [code]);
|
|
1527
|
+
(0, _log.errLog)('vxe.error.notCommands', [`[grid] ${code}`]);
|
|
1423
1528
|
}
|
|
1424
1529
|
}
|
|
1425
1530
|
}
|
|
@@ -1638,6 +1743,9 @@ var _default = exports.default = (0, _comp.defineVxeComponent)({
|
|
|
1638
1743
|
* 获取需要排除的高度
|
|
1639
1744
|
*/
|
|
1640
1745
|
getExcludeHeight() {
|
|
1746
|
+
const {
|
|
1747
|
+
height
|
|
1748
|
+
} = props;
|
|
1641
1749
|
const {
|
|
1642
1750
|
isZMax
|
|
1643
1751
|
} = reactData;
|
|
@@ -1649,7 +1757,10 @@ var _default = exports.default = (0, _comp.defineVxeComponent)({
|
|
|
1649
1757
|
const bottomWrapper = refBottomWrapper.value;
|
|
1650
1758
|
const pagerWrapper = refPagerWrapper.value;
|
|
1651
1759
|
const parentEl = el.parentElement;
|
|
1652
|
-
|
|
1760
|
+
let parentPaddingSize = 0;
|
|
1761
|
+
if (parentEl && (height === '100%' || height === 'auto')) {
|
|
1762
|
+
parentPaddingSize = isZMax ? 0 : (0, _dom.getPaddingTopBottomSize)(parentEl);
|
|
1763
|
+
}
|
|
1653
1764
|
return parentPaddingSize + (0, _dom.getPaddingTopBottomSize)(el) + (0, _dom.getOffsetHeight)(formWrapper) + (0, _dom.getOffsetHeight)(toolbarWrapper) + (0, _dom.getOffsetHeight)(topWrapper) + (0, _dom.getOffsetHeight)(bottomWrapper) + (0, _dom.getOffsetHeight)(pagerWrapper);
|
|
1654
1765
|
}
|
|
1655
1766
|
return 0;
|
|
@@ -1666,13 +1777,25 @@ var _default = exports.default = (0, _comp.defineVxeComponent)({
|
|
|
1666
1777
|
const {
|
|
1667
1778
|
code
|
|
1668
1779
|
} = params;
|
|
1669
|
-
|
|
1670
|
-
|
|
1671
|
-
|
|
1672
|
-
|
|
1673
|
-
}), evnt);
|
|
1780
|
+
if (code) {
|
|
1781
|
+
const isUf = ['reload', 'delete', 'save'].includes(code);
|
|
1782
|
+
if (isUf) {
|
|
1783
|
+
internalData.uFoot = true;
|
|
1674
1784
|
}
|
|
1675
|
-
|
|
1785
|
+
const rest = $xeGantt.commitProxy(params, evnt).then(rest => {
|
|
1786
|
+
if (rest && rest.status && ['query', 'reload', 'delete', 'save'].includes(code)) {
|
|
1787
|
+
$xeGantt.dispatchEvent(code === 'delete' || code === 'save' ? `proxy-${code}` : 'proxy-query', Object.assign(Object.assign({}, rest), {
|
|
1788
|
+
isReload: code === 'reload'
|
|
1789
|
+
}), evnt);
|
|
1790
|
+
}
|
|
1791
|
+
});
|
|
1792
|
+
internalData.uFoot = false;
|
|
1793
|
+
if (isUf) {
|
|
1794
|
+
updateQueryFooter();
|
|
1795
|
+
}
|
|
1796
|
+
return rest;
|
|
1797
|
+
}
|
|
1798
|
+
return (0, _vue.nextTick)();
|
|
1676
1799
|
},
|
|
1677
1800
|
triggerToolbarBtnEvent(button, evnt) {
|
|
1678
1801
|
$xeGantt.triggerToolbarCommitEvent(button, evnt);
|