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/index.umd.js
CHANGED
|
@@ -2780,7 +2780,7 @@ var core_ = __webpack_require__(4345);
|
|
|
2780
2780
|
const {
|
|
2781
2781
|
log
|
|
2782
2782
|
} = core_.VxeUI;
|
|
2783
|
-
const version = `gantt v${"4.0.
|
|
2783
|
+
const version = `gantt v${"4.0.25"}`;
|
|
2784
2784
|
const warnLog = log.create('warn', version);
|
|
2785
2785
|
const errLog = log.create('error', version);
|
|
2786
2786
|
;// ./packages/ui/index.ts
|
|
@@ -2791,7 +2791,7 @@ const {
|
|
|
2791
2791
|
setIcon,
|
|
2792
2792
|
checkVersion
|
|
2793
2793
|
} = core_.VxeUI;
|
|
2794
|
-
core_.VxeUI.ganttVersion = "4.0.
|
|
2794
|
+
core_.VxeUI.ganttVersion = "4.0.25";
|
|
2795
2795
|
setConfig({
|
|
2796
2796
|
gantt: {
|
|
2797
2797
|
// size: null,
|
|
@@ -5459,6 +5459,7 @@ const tableComponentMethodKeys = ['clearAll', 'syncData', 'updateData', 'loadDat
|
|
|
5459
5459
|
const defaultLayouts = [['Form'], ['Toolbar', 'Top', 'Gantt', 'Bottom', 'Pager']];
|
|
5460
5460
|
function gantt_createInternalData() {
|
|
5461
5461
|
return {
|
|
5462
|
+
uFoot: false,
|
|
5462
5463
|
resizeTableWidth: 0
|
|
5463
5464
|
};
|
|
5464
5465
|
}
|
|
@@ -5523,6 +5524,7 @@ function getViewTypeLevel(type) {
|
|
|
5523
5524
|
filterData: [],
|
|
5524
5525
|
formData: {},
|
|
5525
5526
|
sortData: [],
|
|
5527
|
+
footerData: [],
|
|
5526
5528
|
tZindex: 0,
|
|
5527
5529
|
tablePage: {
|
|
5528
5530
|
total: 0,
|
|
@@ -5696,13 +5698,17 @@ function getViewTypeLevel(type) {
|
|
|
5696
5698
|
});
|
|
5697
5699
|
const computeTableExtendProps = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.computed)(() => {
|
|
5698
5700
|
const rest = {};
|
|
5701
|
+
const ganttProps = props;
|
|
5699
5702
|
tableComponentPropKeys.forEach(key => {
|
|
5700
|
-
|
|
5703
|
+
if (ganttProps[key] !== undefined) {
|
|
5704
|
+
rest[key] = ganttProps[key];
|
|
5705
|
+
}
|
|
5701
5706
|
});
|
|
5702
5707
|
return rest;
|
|
5703
5708
|
});
|
|
5704
5709
|
const computeTableProps = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.computed)(() => {
|
|
5705
5710
|
const {
|
|
5711
|
+
showFooter,
|
|
5706
5712
|
seqConfig,
|
|
5707
5713
|
pagerConfig,
|
|
5708
5714
|
editConfig,
|
|
@@ -5710,7 +5716,8 @@ function getViewTypeLevel(type) {
|
|
|
5710
5716
|
} = props;
|
|
5711
5717
|
const {
|
|
5712
5718
|
isZMax,
|
|
5713
|
-
tablePage
|
|
5719
|
+
tablePage,
|
|
5720
|
+
footerData
|
|
5714
5721
|
} = reactData;
|
|
5715
5722
|
const taskViewOpts = computeTaskViewOpts.value;
|
|
5716
5723
|
const {
|
|
@@ -5734,8 +5741,15 @@ function getViewTypeLevel(type) {
|
|
|
5734
5741
|
tProps.border = border;
|
|
5735
5742
|
}
|
|
5736
5743
|
}
|
|
5744
|
+
if (showFooter && !tProps.footerData) {
|
|
5745
|
+
// 如果未设置自己的标位数据,则使用代理的
|
|
5746
|
+
tProps.footerData = footerData;
|
|
5747
|
+
} else if (proxyOpts.footer && footerData.length) {
|
|
5748
|
+
// 如果代理标为数据,且未请求到数据,则用自己的
|
|
5749
|
+
tProps.footerData = footerData;
|
|
5750
|
+
}
|
|
5737
5751
|
if (isZMax) {
|
|
5738
|
-
if (
|
|
5752
|
+
if (tProps.maxHeight) {
|
|
5739
5753
|
tProps.maxHeight = '100%';
|
|
5740
5754
|
} else {
|
|
5741
5755
|
tProps.height = '100%';
|
|
@@ -6117,9 +6131,12 @@ function getViewTypeLevel(type) {
|
|
|
6117
6131
|
reactData.filterData = params.filterList;
|
|
6118
6132
|
if (proxyConfig && isEnableConf(proxyOpts)) {
|
|
6119
6133
|
reactData.tablePage.currentPage = 1;
|
|
6134
|
+
internalData.uFoot = true;
|
|
6120
6135
|
$xeGantt.commitProxy('query').then(rest => {
|
|
6121
6136
|
$xeGantt.dispatchEvent('proxy-query', rest, params.$event);
|
|
6122
6137
|
});
|
|
6138
|
+
internalData.uFoot = false;
|
|
6139
|
+
updateQueryFooter();
|
|
6123
6140
|
}
|
|
6124
6141
|
}
|
|
6125
6142
|
};
|
|
@@ -6140,12 +6157,15 @@ function getViewTypeLevel(type) {
|
|
|
6140
6157
|
return;
|
|
6141
6158
|
}
|
|
6142
6159
|
if (proxyConfig && isEnableConf(proxyOpts)) {
|
|
6160
|
+
internalData.uFoot = true;
|
|
6143
6161
|
$xeGantt.commitProxy('reload').then(rest => {
|
|
6144
6162
|
$xeGantt.dispatchEvent('proxy-query', {
|
|
6145
6163
|
...rest,
|
|
6146
6164
|
isReload: true
|
|
6147
6165
|
}, params.$event);
|
|
6148
6166
|
});
|
|
6167
|
+
internalData.uFoot = false;
|
|
6168
|
+
updateQueryFooter();
|
|
6149
6169
|
}
|
|
6150
6170
|
$xeGantt.dispatchEvent('form-submit', params, params.$event);
|
|
6151
6171
|
};
|
|
@@ -6162,12 +6182,15 @@ function getViewTypeLevel(type) {
|
|
|
6162
6182
|
if ($xeTable) {
|
|
6163
6183
|
$xeTable.clearScroll();
|
|
6164
6184
|
}
|
|
6185
|
+
internalData.uFoot = true;
|
|
6165
6186
|
$xeGantt.commitProxy('reload').then(rest => {
|
|
6166
6187
|
$xeGantt.dispatchEvent('proxy-query', {
|
|
6167
6188
|
...rest,
|
|
6168
6189
|
isReload: true
|
|
6169
6190
|
}, $event);
|
|
6170
6191
|
});
|
|
6192
|
+
internalData.uFoot = false;
|
|
6193
|
+
updateQueryFooter();
|
|
6171
6194
|
}
|
|
6172
6195
|
$xeGantt.dispatchEvent('form-reset', params, $event);
|
|
6173
6196
|
};
|
|
@@ -6325,6 +6348,8 @@ function getViewTypeLevel(type) {
|
|
|
6325
6348
|
let itemValue = null;
|
|
6326
6349
|
if (itemRender) {
|
|
6327
6350
|
const {
|
|
6351
|
+
startField,
|
|
6352
|
+
endField,
|
|
6328
6353
|
defaultValue
|
|
6329
6354
|
} = itemRender;
|
|
6330
6355
|
if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(defaultValue)) {
|
|
@@ -6334,6 +6359,10 @@ function getViewTypeLevel(type) {
|
|
|
6334
6359
|
} else if (!external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isUndefined(defaultValue)) {
|
|
6335
6360
|
itemValue = defaultValue;
|
|
6336
6361
|
}
|
|
6362
|
+
if (startField && endField) {
|
|
6363
|
+
external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().set(fData, startField, null);
|
|
6364
|
+
external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().set(fData, endField, null);
|
|
6365
|
+
}
|
|
6337
6366
|
}
|
|
6338
6367
|
fData[field] = itemValue;
|
|
6339
6368
|
}
|
|
@@ -6359,7 +6388,13 @@ function getViewTypeLevel(type) {
|
|
|
6359
6388
|
if (!proxyInited) {
|
|
6360
6389
|
reactData.proxyInited = true;
|
|
6361
6390
|
if (proxyOpts.autoLoad !== false) {
|
|
6362
|
-
(0,external_commonjs_vue_commonjs2_vue_root_Vue_.nextTick)().then(() =>
|
|
6391
|
+
(0,external_commonjs_vue_commonjs2_vue_root_Vue_.nextTick)().then(() => {
|
|
6392
|
+
internalData.uFoot = true;
|
|
6393
|
+
const rest = $xeGantt.commitProxy('initial');
|
|
6394
|
+
internalData.uFoot = false;
|
|
6395
|
+
updateQueryFooter();
|
|
6396
|
+
return rest;
|
|
6397
|
+
}).then(rest => {
|
|
6363
6398
|
dispatchEvent('proxy-query', {
|
|
6364
6399
|
...rest,
|
|
6365
6400
|
isInited: true
|
|
@@ -6369,6 +6404,15 @@ function getViewTypeLevel(type) {
|
|
|
6369
6404
|
}
|
|
6370
6405
|
}
|
|
6371
6406
|
};
|
|
6407
|
+
const updateQueryFooter = () => {
|
|
6408
|
+
const proxyOpts = computeProxyOpts.value;
|
|
6409
|
+
const {
|
|
6410
|
+
ajax
|
|
6411
|
+
} = proxyOpts;
|
|
6412
|
+
if (ajax && ajax.queryFooter) {
|
|
6413
|
+
return $xeGantt.commitProxy('queryFooter');
|
|
6414
|
+
}
|
|
6415
|
+
};
|
|
6372
6416
|
const handleGlobalKeydownEvent = evnt => {
|
|
6373
6417
|
const zoomOpts = computeZoomOpts.value;
|
|
6374
6418
|
const isEsc = gantt_globalEvents.hasKey(evnt, GLOBAL_EVENT_KEYS.ESCAPE);
|
|
@@ -6393,6 +6437,7 @@ function getViewTypeLevel(type) {
|
|
|
6393
6437
|
*/
|
|
6394
6438
|
commitProxy(proxyTarget, ...args) {
|
|
6395
6439
|
const {
|
|
6440
|
+
showFooter,
|
|
6396
6441
|
proxyConfig,
|
|
6397
6442
|
toolbarConfig,
|
|
6398
6443
|
pagerConfig,
|
|
@@ -6410,6 +6455,8 @@ function getViewTypeLevel(type) {
|
|
|
6410
6455
|
const {
|
|
6411
6456
|
beforeQuery,
|
|
6412
6457
|
afterQuery,
|
|
6458
|
+
beforeQueryFooter,
|
|
6459
|
+
afterQueryFooter,
|
|
6413
6460
|
beforeDelete,
|
|
6414
6461
|
afterDelete,
|
|
6415
6462
|
beforeSave,
|
|
@@ -6474,15 +6521,16 @@ function getViewTypeLevel(type) {
|
|
|
6474
6521
|
case 'reload':
|
|
6475
6522
|
case 'query':
|
|
6476
6523
|
{
|
|
6477
|
-
const
|
|
6478
|
-
const
|
|
6479
|
-
const
|
|
6480
|
-
if (
|
|
6524
|
+
const qMethods = ajax.query;
|
|
6525
|
+
const qsMethods = ajax.querySuccess;
|
|
6526
|
+
const qeMethods = ajax.queryError;
|
|
6527
|
+
if (qMethods) {
|
|
6481
6528
|
const isInited = code === 'initial';
|
|
6482
6529
|
const isReload = code === 'reload';
|
|
6483
6530
|
if (!isInited && reactData.tableLoading) {
|
|
6484
6531
|
return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.nextTick)();
|
|
6485
6532
|
}
|
|
6533
|
+
let operPromise = null;
|
|
6486
6534
|
let sortList = [];
|
|
6487
6535
|
let filterList = [];
|
|
6488
6536
|
let pageParams = {};
|
|
@@ -6546,7 +6594,7 @@ function getViewTypeLevel(type) {
|
|
|
6546
6594
|
} else {
|
|
6547
6595
|
if ($xeTable) {
|
|
6548
6596
|
if (isReload) {
|
|
6549
|
-
$xeTable.clearAll();
|
|
6597
|
+
operPromise = $xeTable.clearAll();
|
|
6550
6598
|
} else {
|
|
6551
6599
|
sortList = $xeTable.getSortColumns();
|
|
6552
6600
|
filterList = $xeTable.getCheckedFilters();
|
|
@@ -6566,31 +6614,27 @@ function getViewTypeLevel(type) {
|
|
|
6566
6614
|
sorts: sortList,
|
|
6567
6615
|
filters: filterList,
|
|
6568
6616
|
form: formData,
|
|
6569
|
-
options:
|
|
6617
|
+
options: qMethods
|
|
6570
6618
|
};
|
|
6571
6619
|
reactData.sortData = sortList;
|
|
6572
6620
|
reactData.filterData = filterList;
|
|
6573
6621
|
reactData.tableLoading = true;
|
|
6574
|
-
return Promise.resolve((beforeQuery ||
|
|
6622
|
+
return Promise.all([Promise.resolve((beforeQuery || qMethods)(commitParams, ...args)), operPromise]).then(([rest]) => {
|
|
6575
6623
|
let tableData = [];
|
|
6576
6624
|
reactData.tableLoading = false;
|
|
6577
6625
|
if (rest) {
|
|
6626
|
+
const reParams = {
|
|
6627
|
+
data: rest,
|
|
6628
|
+
$table: $xeTable,
|
|
6629
|
+
$grid: null,
|
|
6630
|
+
$gantt: $xeGantt
|
|
6631
|
+
};
|
|
6578
6632
|
if (pagerConfig && isEnableConf(pagerOpts)) {
|
|
6579
6633
|
const totalProp = resConfigs.total;
|
|
6580
|
-
const total = (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(totalProp) ? totalProp(
|
|
6581
|
-
data: rest,
|
|
6582
|
-
$table: $xeTable,
|
|
6583
|
-
$grid: null,
|
|
6584
|
-
$gantt: $xeGantt
|
|
6585
|
-
}) : external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().get(rest, totalProp || 'page.total')) || 0;
|
|
6634
|
+
const total = (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(totalProp) ? totalProp(reParams) : external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().get(rest, totalProp || 'page.total')) || 0;
|
|
6586
6635
|
tablePage.total = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(total);
|
|
6587
6636
|
const resultProp = resConfigs.result;
|
|
6588
|
-
tableData = (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(resultProp) ? resultProp(
|
|
6589
|
-
data: rest,
|
|
6590
|
-
$table: $xeTable,
|
|
6591
|
-
$grid: null,
|
|
6592
|
-
$gantt: $xeGantt
|
|
6593
|
-
}) : external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().get(rest, resultProp || 'result')) || [];
|
|
6637
|
+
tableData = (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(resultProp) ? resultProp(reParams) : external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().get(rest, resultProp || 'result')) || [];
|
|
6594
6638
|
// 检验当前页码,不能超出当前最大页数
|
|
6595
6639
|
const pageCount = Math.max(Math.ceil(total / tablePage.pageSize), 1);
|
|
6596
6640
|
if (tablePage.currentPage > pageCount) {
|
|
@@ -6598,18 +6642,25 @@ function getViewTypeLevel(type) {
|
|
|
6598
6642
|
}
|
|
6599
6643
|
} else {
|
|
6600
6644
|
const listProp = resConfigs.list;
|
|
6601
|
-
|
|
6602
|
-
|
|
6603
|
-
|
|
6604
|
-
|
|
6605
|
-
|
|
6606
|
-
|
|
6645
|
+
if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isArray(rest)) {
|
|
6646
|
+
tableData = rest;
|
|
6647
|
+
} else if (listProp) {
|
|
6648
|
+
tableData = (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(listProp) ? listProp(reParams) : external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().get(rest, listProp)) || [];
|
|
6649
|
+
}
|
|
6650
|
+
}
|
|
6651
|
+
if (showFooter) {
|
|
6652
|
+
const fdProp = resConfigs.footerData;
|
|
6653
|
+
const footerList = fdProp ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(fdProp) ? fdProp(reParams) : external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().get(rest, fdProp) : [];
|
|
6654
|
+
if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isArray(footerList)) {
|
|
6655
|
+
reactData.footerData = footerList;
|
|
6656
|
+
}
|
|
6607
6657
|
}
|
|
6608
6658
|
}
|
|
6609
6659
|
if ($xeTable) {
|
|
6610
6660
|
$xeTable.loadData(tableData);
|
|
6611
6661
|
} else {
|
|
6612
6662
|
(0,external_commonjs_vue_commonjs2_vue_root_Vue_.nextTick)(() => {
|
|
6663
|
+
const $xeTable = refTable.value;
|
|
6613
6664
|
if ($xeTable) {
|
|
6614
6665
|
$xeTable.loadData(tableData);
|
|
6615
6666
|
}
|
|
@@ -6618,8 +6669,8 @@ function getViewTypeLevel(type) {
|
|
|
6618
6669
|
if (afterQuery) {
|
|
6619
6670
|
afterQuery(commitParams, ...args);
|
|
6620
6671
|
}
|
|
6621
|
-
if (
|
|
6622
|
-
|
|
6672
|
+
if (qsMethods) {
|
|
6673
|
+
qsMethods({
|
|
6623
6674
|
...commitParams,
|
|
6624
6675
|
response: rest
|
|
6625
6676
|
});
|
|
@@ -6629,8 +6680,58 @@ function getViewTypeLevel(type) {
|
|
|
6629
6680
|
};
|
|
6630
6681
|
}).catch(rest => {
|
|
6631
6682
|
reactData.tableLoading = false;
|
|
6632
|
-
if (
|
|
6633
|
-
|
|
6683
|
+
if (qeMethods) {
|
|
6684
|
+
qeMethods({
|
|
6685
|
+
...commitParams,
|
|
6686
|
+
response: rest
|
|
6687
|
+
});
|
|
6688
|
+
}
|
|
6689
|
+
return {
|
|
6690
|
+
status: false
|
|
6691
|
+
};
|
|
6692
|
+
});
|
|
6693
|
+
} else {
|
|
6694
|
+
errLog('vxe.error.notFunc', ['[gantt] proxy-config.ajax.query']);
|
|
6695
|
+
}
|
|
6696
|
+
break;
|
|
6697
|
+
}
|
|
6698
|
+
case 'queryFooter':
|
|
6699
|
+
{
|
|
6700
|
+
const qfMethods = ajax.queryFooter;
|
|
6701
|
+
const qfSuccessMethods = ajax.queryFooterSuccess;
|
|
6702
|
+
const qfErrorMethods = ajax.queryFooterError;
|
|
6703
|
+
if (qfMethods) {
|
|
6704
|
+
let filterList = [];
|
|
6705
|
+
if ($xeTable) {
|
|
6706
|
+
filterList = $xeTable.getCheckedFilters();
|
|
6707
|
+
}
|
|
6708
|
+
const commitParams = {
|
|
6709
|
+
$table: $xeTable,
|
|
6710
|
+
$grid: null,
|
|
6711
|
+
$gantt: $xeGantt,
|
|
6712
|
+
code,
|
|
6713
|
+
button,
|
|
6714
|
+
filters: filterList,
|
|
6715
|
+
form: formData,
|
|
6716
|
+
options: qfMethods
|
|
6717
|
+
};
|
|
6718
|
+
return Promise.resolve((beforeQueryFooter || qfMethods)(commitParams, ...args)).then(rest => {
|
|
6719
|
+
reactData.footerData = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isArray(rest) ? rest : [];
|
|
6720
|
+
if (afterQueryFooter) {
|
|
6721
|
+
afterQueryFooter(commitParams, ...args);
|
|
6722
|
+
}
|
|
6723
|
+
if (qfSuccessMethods) {
|
|
6724
|
+
qfSuccessMethods({
|
|
6725
|
+
...commitParams,
|
|
6726
|
+
response: rest
|
|
6727
|
+
});
|
|
6728
|
+
}
|
|
6729
|
+
return {
|
|
6730
|
+
status: true
|
|
6731
|
+
};
|
|
6732
|
+
}).catch(rest => {
|
|
6733
|
+
if (qfErrorMethods) {
|
|
6734
|
+
qfErrorMethods({
|
|
6634
6735
|
...commitParams,
|
|
6635
6736
|
response: rest
|
|
6636
6737
|
});
|
|
@@ -6640,16 +6741,16 @@ function getViewTypeLevel(type) {
|
|
|
6640
6741
|
};
|
|
6641
6742
|
});
|
|
6642
6743
|
} else {
|
|
6643
|
-
errLog('vxe.error.notFunc', ['proxy-config.ajax.
|
|
6744
|
+
errLog('vxe.error.notFunc', ['[gantt] proxy-config.ajax.queryFooter']);
|
|
6644
6745
|
}
|
|
6645
6746
|
break;
|
|
6646
6747
|
}
|
|
6647
6748
|
case 'delete':
|
|
6648
6749
|
{
|
|
6649
|
-
const
|
|
6750
|
+
const dMethods = ajax.delete;
|
|
6650
6751
|
const deleteSuccessMethods = ajax.deleteSuccess;
|
|
6651
6752
|
const deleteErrorMethods = ajax.deleteError;
|
|
6652
|
-
if (
|
|
6753
|
+
if (dMethods) {
|
|
6653
6754
|
const selectRecords = $xeGantt.getCheckboxRecords();
|
|
6654
6755
|
const removeRecords = selectRecords.filter(row => !$xeTable.isInsertByRow(row));
|
|
6655
6756
|
const body = {
|
|
@@ -6663,7 +6764,7 @@ function getViewTypeLevel(type) {
|
|
|
6663
6764
|
button,
|
|
6664
6765
|
body,
|
|
6665
6766
|
form: formData,
|
|
6666
|
-
options:
|
|
6767
|
+
options: dMethods
|
|
6667
6768
|
};
|
|
6668
6769
|
if (selectRecords.length) {
|
|
6669
6770
|
return handleDeleteRow(code, 'vxe.grid.deleteSelectRecord', () => {
|
|
@@ -6671,7 +6772,7 @@ function getViewTypeLevel(type) {
|
|
|
6671
6772
|
return $xeTable.remove(selectRecords);
|
|
6672
6773
|
}
|
|
6673
6774
|
reactData.tableLoading = true;
|
|
6674
|
-
return Promise.resolve((beforeDelete ||
|
|
6775
|
+
return Promise.resolve((beforeDelete || dMethods)(commitParams, ...args)).then(rest => {
|
|
6675
6776
|
reactData.tableLoading = false;
|
|
6676
6777
|
$xeTable.setPendingRow(removeRecords, false);
|
|
6677
6778
|
if (isRespMsg) {
|
|
@@ -6685,7 +6786,10 @@ function getViewTypeLevel(type) {
|
|
|
6685
6786
|
if (afterDelete) {
|
|
6686
6787
|
afterDelete(commitParams, ...args);
|
|
6687
6788
|
} else {
|
|
6789
|
+
internalData.uFoot = true;
|
|
6688
6790
|
$xeGantt.commitProxy('query');
|
|
6791
|
+
internalData.uFoot = false;
|
|
6792
|
+
updateQueryFooter();
|
|
6689
6793
|
}
|
|
6690
6794
|
if (deleteSuccessMethods) {
|
|
6691
6795
|
deleteSuccessMethods({
|
|
@@ -6730,7 +6834,7 @@ function getViewTypeLevel(type) {
|
|
|
6730
6834
|
}
|
|
6731
6835
|
}
|
|
6732
6836
|
} else {
|
|
6733
|
-
errLog('vxe.error.notFunc', ['proxy-config.ajax.delete']);
|
|
6837
|
+
errLog('vxe.error.notFunc', ['[gantt] proxy-config.ajax.delete']);
|
|
6734
6838
|
}
|
|
6735
6839
|
break;
|
|
6736
6840
|
}
|
|
@@ -6791,7 +6895,10 @@ function getViewTypeLevel(type) {
|
|
|
6791
6895
|
if (afterSave) {
|
|
6792
6896
|
afterSave(commitParams, ...args);
|
|
6793
6897
|
} else {
|
|
6898
|
+
internalData.uFoot = true;
|
|
6794
6899
|
$xeGantt.commitProxy('query');
|
|
6900
|
+
internalData.uFoot = false;
|
|
6901
|
+
updateQueryFooter();
|
|
6795
6902
|
}
|
|
6796
6903
|
if (saveSuccessMethods) {
|
|
6797
6904
|
saveSuccessMethods({
|
|
@@ -6836,7 +6943,7 @@ function getViewTypeLevel(type) {
|
|
|
6836
6943
|
}
|
|
6837
6944
|
});
|
|
6838
6945
|
} else {
|
|
6839
|
-
errLog('vxe.error.notFunc', ['proxy-config.ajax.save']);
|
|
6946
|
+
errLog('vxe.error.notFunc', ['[gantt] proxy-config.ajax.save']);
|
|
6840
6947
|
}
|
|
6841
6948
|
break;
|
|
6842
6949
|
}
|
|
@@ -6854,7 +6961,7 @@ function getViewTypeLevel(type) {
|
|
|
6854
6961
|
$gantt: $xeGantt
|
|
6855
6962
|
}, ...args);
|
|
6856
6963
|
} else {
|
|
6857
|
-
errLog('vxe.error.notCommands', [code]);
|
|
6964
|
+
errLog('vxe.error.notCommands', [`[grid] ${code}`]);
|
|
6858
6965
|
}
|
|
6859
6966
|
}
|
|
6860
6967
|
}
|
|
@@ -7073,6 +7180,9 @@ function getViewTypeLevel(type) {
|
|
|
7073
7180
|
* 获取需要排除的高度
|
|
7074
7181
|
*/
|
|
7075
7182
|
getExcludeHeight() {
|
|
7183
|
+
const {
|
|
7184
|
+
height
|
|
7185
|
+
} = props;
|
|
7076
7186
|
const {
|
|
7077
7187
|
isZMax
|
|
7078
7188
|
} = reactData;
|
|
@@ -7084,7 +7194,10 @@ function getViewTypeLevel(type) {
|
|
|
7084
7194
|
const bottomWrapper = refBottomWrapper.value;
|
|
7085
7195
|
const pagerWrapper = refPagerWrapper.value;
|
|
7086
7196
|
const parentEl = el.parentElement;
|
|
7087
|
-
|
|
7197
|
+
let parentPaddingSize = 0;
|
|
7198
|
+
if (parentEl && (height === '100%' || height === 'auto')) {
|
|
7199
|
+
parentPaddingSize = isZMax ? 0 : getPaddingTopBottomSize(parentEl);
|
|
7200
|
+
}
|
|
7088
7201
|
return parentPaddingSize + getPaddingTopBottomSize(el) + getOffsetHeight(formWrapper) + getOffsetHeight(toolbarWrapper) + getOffsetHeight(topWrapper) + getOffsetHeight(bottomWrapper) + getOffsetHeight(pagerWrapper);
|
|
7089
7202
|
}
|
|
7090
7203
|
return 0;
|
|
@@ -7101,14 +7214,26 @@ function getViewTypeLevel(type) {
|
|
|
7101
7214
|
const {
|
|
7102
7215
|
code
|
|
7103
7216
|
} = params;
|
|
7104
|
-
|
|
7105
|
-
|
|
7106
|
-
|
|
7107
|
-
|
|
7108
|
-
isReload: code === 'reload'
|
|
7109
|
-
}, evnt);
|
|
7217
|
+
if (code) {
|
|
7218
|
+
const isUf = ['reload', 'delete', 'save'].includes(code);
|
|
7219
|
+
if (isUf) {
|
|
7220
|
+
internalData.uFoot = true;
|
|
7110
7221
|
}
|
|
7111
|
-
|
|
7222
|
+
const rest = $xeGantt.commitProxy(params, evnt).then(rest => {
|
|
7223
|
+
if (rest && rest.status && ['query', 'reload', 'delete', 'save'].includes(code)) {
|
|
7224
|
+
$xeGantt.dispatchEvent(code === 'delete' || code === 'save' ? `proxy-${code}` : 'proxy-query', {
|
|
7225
|
+
...rest,
|
|
7226
|
+
isReload: code === 'reload'
|
|
7227
|
+
}, evnt);
|
|
7228
|
+
}
|
|
7229
|
+
});
|
|
7230
|
+
internalData.uFoot = false;
|
|
7231
|
+
if (isUf) {
|
|
7232
|
+
updateQueryFooter();
|
|
7233
|
+
}
|
|
7234
|
+
return rest;
|
|
7235
|
+
}
|
|
7236
|
+
return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.nextTick)();
|
|
7112
7237
|
},
|
|
7113
7238
|
triggerToolbarBtnEvent(button, evnt) {
|
|
7114
7239
|
$xeGantt.triggerToolbarCommitEvent(button, evnt);
|