vxe-gantt 3.1.5 → 3.1.7
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/index.js +3 -0
- package/es/gantt/src/gantt-body.js +2 -5
- package/es/gantt/src/gantt-chart.js +66 -37
- package/es/gantt/src/gantt-view.js +34 -13
- package/es/gantt/src/gantt.js +71 -6
- package/es/gantt/src/static.js +22 -0
- package/es/gantt/src/util.js +9 -0
- package/es/gantt/style.css +2 -2
- package/es/gantt/style.min.css +1 -1
- package/es/style.css +1 -1
- package/es/style.min.css +1 -1
- package/es/ui/index.js +6 -13
- package/es/ui/src/depend.js +14 -0
- package/es/ui/src/log.js +1 -1
- package/es/vxe-gantt/style.css +2 -2
- package/es/vxe-gantt/style.min.css +1 -1
- package/lib/gantt/index.js +18 -0
- package/lib/gantt/index.min.js +1 -1
- package/lib/gantt/src/gantt-body.js +2 -5
- package/lib/gantt/src/gantt-body.min.js +1 -1
- package/lib/gantt/src/gantt-chart.js +42 -22
- package/lib/gantt/src/gantt-chart.min.js +1 -1
- package/lib/gantt/src/gantt-view.js +29 -11
- package/lib/gantt/src/gantt-view.min.js +1 -1
- package/lib/gantt/src/gantt.js +89 -6
- package/lib/gantt/src/gantt.min.js +1 -1
- package/lib/gantt/src/static.js +28 -0
- package/lib/gantt/src/static.min.js +1 -0
- package/lib/gantt/src/util.js +12 -0
- package/lib/gantt/src/util.min.js +1 -1
- package/lib/gantt/style/style.css +2 -2
- package/lib/gantt/style/style.min.css +1 -1
- package/lib/index.umd.js +235 -68
- package/lib/index.umd.min.js +1 -1
- package/lib/style.css +1 -1
- package/lib/style.min.css +1 -1
- package/lib/ui/index.js +6 -13
- package/lib/ui/index.min.js +1 -1
- package/lib/ui/src/depend.js +19 -0
- package/lib/ui/src/depend.min.js +1 -0
- package/lib/ui/src/log.js +1 -1
- package/lib/ui/src/log.min.js +1 -1
- package/lib/vxe-gantt/style/style.css +2 -2
- package/lib/vxe-gantt/style/style.min.css +1 -1
- package/package.json +3 -7
- package/packages/gantt/index.ts +4 -0
- package/packages/gantt/src/gantt-body.ts +2 -5
- package/packages/gantt/src/gantt-chart.ts +66 -37
- package/packages/gantt/src/gantt-view.ts +37 -14
- package/packages/gantt/src/gantt.ts +89 -17
- package/packages/gantt/src/static.ts +21 -0
- package/packages/gantt/src/util.ts +12 -0
- package/packages/ui/index.ts +5 -12
- package/packages/ui/src/depend.ts +14 -0
- package/styles/components/gantt-module/gantt-chart.scss +3 -2
- package/styles/components/gantt.scss +0 -1
- package/styles/theme/base.scss +2 -0
package/lib/index.umd.js
CHANGED
|
@@ -8234,6 +8234,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
8234
8234
|
__webpack_require__.d(__webpack_exports__, {
|
|
8235
8235
|
Gantt: function() { return /* reexport */ Gantt; },
|
|
8236
8236
|
VxeGantt: function() { return /* reexport */ VxeGantt; },
|
|
8237
|
+
VxeGanttDependencyType: function() { return /* reexport */ VxeGanttDependencyType; },
|
|
8237
8238
|
VxeUI: function() { return /* reexport */ ui; },
|
|
8238
8239
|
"default": function() { return /* binding */ entry_lib; },
|
|
8239
8240
|
install: function() { return /* reexport */ install; }
|
|
@@ -8245,6 +8246,7 @@ __webpack_require__.r(components_namespaceObject);
|
|
|
8245
8246
|
__webpack_require__.d(components_namespaceObject, {
|
|
8246
8247
|
Gantt: function() { return Gantt; },
|
|
8247
8248
|
VxeGantt: function() { return VxeGantt; },
|
|
8249
|
+
VxeGanttDependencyType: function() { return VxeGanttDependencyType; },
|
|
8248
8250
|
VxeUI: function() { return ui; },
|
|
8249
8251
|
install: function() { return install; }
|
|
8250
8252
|
});
|
|
@@ -8276,24 +8278,13 @@ if (typeof window !== 'undefined') {
|
|
|
8276
8278
|
|
|
8277
8279
|
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.object.to-string.js
|
|
8278
8280
|
var es_object_to_string = __webpack_require__(6099);
|
|
8279
|
-
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.concat.js
|
|
8280
|
-
var es_array_concat = __webpack_require__(8706);
|
|
8281
8281
|
// EXTERNAL MODULE: external {"root":"VxeUI","commonjs":"@vxe-ui/core","commonjs2":"@vxe-ui/core","amd":"@vxe-ui/core"}
|
|
8282
8282
|
var core_ = __webpack_require__(4345);
|
|
8283
|
-
;// ./packages/ui/src/log.ts
|
|
8284
|
-
|
|
8285
|
-
var log = core_.VxeUI.log;
|
|
8286
|
-
var version = "gantt v".concat("3.1.5");
|
|
8287
|
-
var warnLog = log.create('warn', version);
|
|
8288
|
-
var errLog = log.create('error', version);
|
|
8289
8283
|
;// ./packages/ui/index.ts
|
|
8290
8284
|
|
|
8291
|
-
|
|
8292
|
-
|
|
8293
8285
|
var setConfig = core_.VxeUI.setConfig,
|
|
8294
|
-
setIcon = core_.VxeUI.setIcon
|
|
8295
|
-
|
|
8296
|
-
core_.VxeUI.ganttVersion = "3.1.5";
|
|
8286
|
+
setIcon = core_.VxeUI.setIcon;
|
|
8287
|
+
core_.VxeUI.ganttVersion = "3.1.7";
|
|
8297
8288
|
var ymdFormat = 'yyyy-MM-dd';
|
|
8298
8289
|
var ymdhmsFormat = 'yyyy-MM-dd HH:mm:ss';
|
|
8299
8290
|
setConfig({
|
|
@@ -8337,6 +8328,10 @@ setConfig({
|
|
|
8337
8328
|
taskBarTooltipConfig: {
|
|
8338
8329
|
enterable: true
|
|
8339
8330
|
},
|
|
8331
|
+
taskLinkConfig: {
|
|
8332
|
+
enabled: true,
|
|
8333
|
+
showArrow: true
|
|
8334
|
+
},
|
|
8340
8335
|
taskViewScaleConfig: {
|
|
8341
8336
|
year: {
|
|
8342
8337
|
valueFormat: ymdFormat
|
|
@@ -8390,21 +8385,35 @@ setIcon({
|
|
|
8390
8385
|
GANTT_VIEW_RIGHT_OPEN: iconPrefix + 'arrow-right',
|
|
8391
8386
|
GANTT_VIEW_RIGHT_CLOSE: iconPrefix + 'arrow-left'
|
|
8392
8387
|
});
|
|
8393
|
-
var pVersion = 3;
|
|
8394
|
-
var sVersion = 18;
|
|
8395
|
-
if (checkVersion) {
|
|
8396
|
-
if (!checkVersion(core_.VxeUI.tableVersion, pVersion, sVersion)) {
|
|
8397
|
-
errLog('vxe.error.errorVersion', ["vxe-table@".concat(core_.VxeUI.tableVersion || '?'), "vxe-table v".concat(pVersion, ".").concat(sVersion, "+")]);
|
|
8398
|
-
}
|
|
8399
|
-
} else {
|
|
8400
|
-
errLog("Requires vxe-table v".concat(pVersion, ".").concat(sVersion, "+"));
|
|
8401
|
-
}
|
|
8402
8388
|
|
|
8403
8389
|
/* harmony default export */ var ui = (core_.VxeUI);
|
|
8404
8390
|
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.function.name.js
|
|
8405
8391
|
var es_function_name = __webpack_require__(2010);
|
|
8406
8392
|
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.object.assign.js
|
|
8407
8393
|
var es_object_assign = __webpack_require__(9085);
|
|
8394
|
+
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.concat.js
|
|
8395
|
+
var es_array_concat = __webpack_require__(8706);
|
|
8396
|
+
;// ./packages/ui/src/log.ts
|
|
8397
|
+
|
|
8398
|
+
var log = core_.VxeUI.log;
|
|
8399
|
+
var version = "gantt v".concat("3.1.7");
|
|
8400
|
+
var warnLog = log.create('warn', version);
|
|
8401
|
+
var errLog = log.create('error', version);
|
|
8402
|
+
;// ./packages/ui/src/depend.ts
|
|
8403
|
+
|
|
8404
|
+
|
|
8405
|
+
|
|
8406
|
+
function checkDependVersion() {
|
|
8407
|
+
var pVersion = 3;
|
|
8408
|
+
var sVersion = 19;
|
|
8409
|
+
if (core_.VxeUI.checkVersion) {
|
|
8410
|
+
if (!core_.VxeUI.checkVersion(core_.VxeUI.tableVersion, pVersion, sVersion)) {
|
|
8411
|
+
errLog('vxe.error.errorVersion', ["vxe-table@".concat(core_.VxeUI.tableVersion || '?'), "vxe-table v".concat(pVersion, ".").concat(sVersion, "+")]);
|
|
8412
|
+
}
|
|
8413
|
+
} else {
|
|
8414
|
+
errLog("Requires vxe-table v".concat(pVersion, ".").concat(sVersion, "+"));
|
|
8415
|
+
}
|
|
8416
|
+
}
|
|
8408
8417
|
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.symbol.js
|
|
8409
8418
|
var es_symbol = __webpack_require__(2675);
|
|
8410
8419
|
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.symbol.description.js
|
|
@@ -9111,9 +9120,8 @@ function getSlotVNs(vns) {
|
|
|
9111
9120
|
}
|
|
9112
9121
|
return [vns];
|
|
9113
9122
|
}
|
|
9114
|
-
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.string.pad-start.js
|
|
9115
|
-
var es_string_pad_start = __webpack_require__(8156);
|
|
9116
9123
|
;// ./packages/gantt/src/util.ts
|
|
9124
|
+
|
|
9117
9125
|
function getRefElem(refEl) {
|
|
9118
9126
|
if (refEl) {
|
|
9119
9127
|
return refEl.$el || refEl;
|
|
@@ -9134,6 +9142,17 @@ function getStandardGapTime(type) {
|
|
|
9134
9142
|
}
|
|
9135
9143
|
return 1000 * 60 * 60 * 24;
|
|
9136
9144
|
}
|
|
9145
|
+
function getTaskBarLeft(chartRest, viewCellWidth) {
|
|
9146
|
+
return chartRest ? viewCellWidth * chartRest.oLeftSize : 0;
|
|
9147
|
+
}
|
|
9148
|
+
function getTaskBarWidth(chartRest, viewCellWidth) {
|
|
9149
|
+
return Math.max(1, chartRest ? Math.floor(viewCellWidth * chartRest.oWidthSize) - 1 : 0);
|
|
9150
|
+
}
|
|
9151
|
+
function getTaskLinkKey(from, to) {
|
|
9152
|
+
return "".concat(from, "_").concat(to);
|
|
9153
|
+
}
|
|
9154
|
+
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.string.pad-start.js
|
|
9155
|
+
var es_string_pad_start = __webpack_require__(8156);
|
|
9137
9156
|
;// ./packages/gantt/src/gantt-header.ts
|
|
9138
9157
|
|
|
9139
9158
|
|
|
@@ -9360,15 +9379,13 @@ var gantt_chart_viewType = 'chart';
|
|
|
9360
9379
|
showContent = taskBarOpts.showContent,
|
|
9361
9380
|
contentMethod = taskBarOpts.contentMethod,
|
|
9362
9381
|
barStyle = taskBarOpts.barStyle,
|
|
9363
|
-
|
|
9382
|
+
move = taskBarOpts.move,
|
|
9364
9383
|
showTooltip = taskBarOpts.showTooltip;
|
|
9365
9384
|
var isBarRowStyle = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(barStyle);
|
|
9366
9385
|
var barStyObj = (barStyle ? isBarRowStyle ? barStyle(barParams) : barStyle : {}) || {};
|
|
9367
9386
|
var round = barStyObj.round;
|
|
9368
9387
|
var rowRest = fullAllDataRowIdData[rowid] || {};
|
|
9369
|
-
var
|
|
9370
|
-
var isRsHeight = resizeHeight > 0;
|
|
9371
|
-
var cellHeight = getCellRestHeight(rowRest, cellOpts, rowOpts, defaultRowHeight);
|
|
9388
|
+
var cellHeight = resizeHeightFlag ? getCellRestHeight(rowRest, cellOpts, rowOpts, defaultRowHeight) : 0;
|
|
9372
9389
|
var title = getStringValue(external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().get(row, titleField));
|
|
9373
9390
|
var progressValue = showProgress ? Math.min(100, Math.max(0, external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().get(row, progressField)))) : 0;
|
|
9374
9391
|
var vbStyle = {};
|
|
@@ -9434,8 +9451,7 @@ var gantt_chart_viewType = 'chart';
|
|
|
9434
9451
|
},
|
|
9435
9452
|
class: ['vxe-gantt-view--chart-row', {
|
|
9436
9453
|
'is--round': round,
|
|
9437
|
-
'is--
|
|
9438
|
-
'col--rs-height': isRsHeight
|
|
9454
|
+
'is--move': move
|
|
9439
9455
|
}],
|
|
9440
9456
|
style: {
|
|
9441
9457
|
height: "".concat(cellHeight, "px")
|
|
@@ -9452,17 +9468,26 @@ var gantt_chart_viewType = 'chart';
|
|
|
9452
9468
|
rowid: rowid
|
|
9453
9469
|
},
|
|
9454
9470
|
on: ons
|
|
9455
|
-
},
|
|
9471
|
+
}, $xeGantt.renderGanttTaskBarContent ? $xeGantt.renderGanttTaskBarContent(h, ctParams, {
|
|
9472
|
+
title: title,
|
|
9473
|
+
vbStyle: vbStyle,
|
|
9474
|
+
vpStyle: vpStyle
|
|
9475
|
+
}) : taskBarSlot ? [h('div', {
|
|
9476
|
+
key: 'cbc',
|
|
9477
|
+
class: 'vxe-gantt-view--chart-custom-bar-content'
|
|
9478
|
+
}, $xeGantt.callSlot(taskBarSlot, barParams, h))] : [showProgress ? h('div', {
|
|
9479
|
+
key: 'vcp',
|
|
9456
9480
|
class: 'vxe-gantt-view--chart-progress',
|
|
9457
9481
|
style: vpStyle
|
|
9458
9482
|
}) : renderEmptyElement($xeGantt), showContent ? h('div', {
|
|
9483
|
+
key: 'vcc',
|
|
9459
9484
|
class: 'vxe-gantt-view--chart-content'
|
|
9460
9485
|
}, title) : renderEmptyElement($xeGantt)])]);
|
|
9461
9486
|
},
|
|
9462
|
-
|
|
9487
|
+
renderTaskRows: function renderTaskRows(h, $xeTable, tableData) {
|
|
9463
9488
|
var _vm = this;
|
|
9464
9489
|
var $xeGanttView = _vm.$xeGanttView;
|
|
9465
|
-
var
|
|
9490
|
+
var ganttViewReactData = $xeGanttView.reactData;
|
|
9466
9491
|
var tableProps = $xeTable;
|
|
9467
9492
|
var treeConfig = tableProps.treeConfig;
|
|
9468
9493
|
var tableReactData = $xeTable;
|
|
@@ -9473,10 +9498,10 @@ var gantt_chart_viewType = 'chart';
|
|
|
9473
9498
|
var treeOpts = $xeTable.computeTreeOpts;
|
|
9474
9499
|
var transform = treeOpts.transform;
|
|
9475
9500
|
var childrenField = treeOpts.children || treeOpts.childrenField;
|
|
9476
|
-
var scrollYLoad =
|
|
9501
|
+
var scrollYLoad = ganttViewReactData.scrollYLoad;
|
|
9477
9502
|
var trVNs = [];
|
|
9478
9503
|
tableData.forEach(function (row, $rowIndex) {
|
|
9479
|
-
var rowid = $xeTable
|
|
9504
|
+
var rowid = $xeTable.getRowid(row);
|
|
9480
9505
|
var rowRest = fullAllDataRowIdData[rowid] || {};
|
|
9481
9506
|
var rowIndex = $rowIndex;
|
|
9482
9507
|
var _rowIndex = -1;
|
|
@@ -9493,38 +9518,52 @@ var gantt_chart_viewType = 'chart';
|
|
|
9493
9518
|
}
|
|
9494
9519
|
// 如果是树形表格
|
|
9495
9520
|
if (isExpandTree) {
|
|
9496
|
-
trVNs.push.apply(trVNs, _toConsumableArray(_vm.
|
|
9521
|
+
trVNs.push.apply(trVNs, _toConsumableArray(_vm.renderTaskRows(h, $xeTable, rowChildren)));
|
|
9497
9522
|
}
|
|
9498
9523
|
});
|
|
9499
9524
|
return trVNs;
|
|
9500
9525
|
},
|
|
9501
9526
|
renderVN: function renderVN(h) {
|
|
9502
9527
|
var _vm = this;
|
|
9528
|
+
var $xeGantt = _vm.$xeGantt;
|
|
9503
9529
|
var $xeGanttView = _vm.$xeGanttView;
|
|
9504
|
-
var
|
|
9505
|
-
var
|
|
9506
|
-
var
|
|
9530
|
+
var ganttViewInternalData = $xeGanttView.internalData;
|
|
9531
|
+
var ganttViewReactData = $xeGanttView.reactData;
|
|
9532
|
+
var $xeTable = ganttViewInternalData.xeTable;
|
|
9533
|
+
var tableData = ganttViewReactData.tableData;
|
|
9534
|
+
var taskLinkOpts = $xeGantt.computeTaskLinkOpts;
|
|
9535
|
+
var showArrow = taskLinkOpts.showArrow;
|
|
9507
9536
|
return h('div', {
|
|
9508
9537
|
ref: 'refElem',
|
|
9509
9538
|
class: 'vxe-gantt-view--chart-wrapper'
|
|
9510
|
-
}, $
|
|
9539
|
+
}, [$xeGantt.renderGanttTaskLines ? h('div', {
|
|
9540
|
+
ref: 'reflineWrapperElem',
|
|
9541
|
+
class: ['vxe-gantt-view--chart-line-wrapper', {
|
|
9542
|
+
'show-arrow': showArrow
|
|
9543
|
+
}]
|
|
9544
|
+
}, $xeTable && isEnableConf(taskLinkOpts) ? $xeGantt.renderGanttTaskLines(h) : []) : renderEmptyElement($xeGantt), h('div', {
|
|
9545
|
+
ref: 'refTaskWrapperElem',
|
|
9546
|
+
class: 'vxe-gantt-view--chart-task-wrapper'
|
|
9547
|
+
}, $xeTable ? _vm.renderTaskRows(h, $xeTable, tableData) : [])]);
|
|
9511
9548
|
}
|
|
9512
9549
|
},
|
|
9513
9550
|
mounted: function mounted() {
|
|
9514
9551
|
var _vm = this;
|
|
9515
9552
|
var $xeGanttView = _vm.$xeGanttView;
|
|
9516
|
-
var
|
|
9517
|
-
var elemStore =
|
|
9553
|
+
var ganttViewInternalData = $xeGanttView.internalData;
|
|
9554
|
+
var elemStore = ganttViewInternalData.elemStore;
|
|
9518
9555
|
var prefix = 'main-chart-';
|
|
9519
|
-
elemStore["".concat(prefix, "wrapper")] = _vm.$refs.
|
|
9556
|
+
elemStore["".concat(prefix, "task-wrapper")] = _vm.$refs.refTaskWrapperElem;
|
|
9557
|
+
elemStore["".concat(prefix, "line-wrapper")] = _vm.$refs.reflineWrapperElem;
|
|
9520
9558
|
},
|
|
9521
9559
|
destroyed: function destroyed() {
|
|
9522
9560
|
var _vm = this;
|
|
9523
9561
|
var $xeGanttView = _vm.$xeGanttView;
|
|
9524
|
-
var
|
|
9525
|
-
var elemStore =
|
|
9562
|
+
var ganttViewInternalData = $xeGanttView.internalData;
|
|
9563
|
+
var elemStore = ganttViewInternalData.elemStore;
|
|
9526
9564
|
var prefix = 'main-chart-';
|
|
9527
|
-
elemStore["".concat(prefix, "wrapper")] = null;
|
|
9565
|
+
elemStore["".concat(prefix, "task-wrapper")] = null;
|
|
9566
|
+
elemStore["".concat(prefix, "line-wrapper")] = null;
|
|
9528
9567
|
},
|
|
9529
9568
|
render: function render(h) {
|
|
9530
9569
|
return this.renderVN(h);
|
|
@@ -9594,9 +9633,7 @@ var gantt_body_viewType = 'body';
|
|
|
9594
9633
|
cellStyle = _ref2.cellStyle;
|
|
9595
9634
|
var todayValue = showNowLine && scaleItem ? todayDateMaps[scaleItem.type] : null;
|
|
9596
9635
|
var rowRest = fullAllDataRowIdData[rowid] || {};
|
|
9597
|
-
var
|
|
9598
|
-
var isRsHeight = resizeHeight > 0;
|
|
9599
|
-
var cellHeight = getCellRestHeight(rowRest, cellOpts, rowOpts, defaultRowHeight);
|
|
9636
|
+
var cellHeight = resizeHeightFlag ? getCellRestHeight(rowRest, cellOpts, rowOpts, defaultRowHeight) : 0;
|
|
9600
9637
|
var tdVNs = [];
|
|
9601
9638
|
if (isAllRowDrag && rowOpts.resizable) {
|
|
9602
9639
|
var cellParams = {
|
|
@@ -9651,8 +9688,7 @@ var gantt_body_viewType = 'body';
|
|
|
9651
9688
|
return h('td', {
|
|
9652
9689
|
key: $columnIndex,
|
|
9653
9690
|
class: ['vxe-gantt-view--body-column', {
|
|
9654
|
-
'is--now': showNowLine && todayValue === field
|
|
9655
|
-
'col--rs-height': isRsHeight
|
|
9691
|
+
'is--now': showNowLine && todayValue === field
|
|
9656
9692
|
}, getClass(cellClassName, ctParams)],
|
|
9657
9693
|
style: cellStyle ? Object.assign({}, external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(cellStyle) ? cellStyle(ctParams) : cellStyle, {
|
|
9658
9694
|
height: "".concat(cellHeight, "px")
|
|
@@ -9941,6 +9977,9 @@ var gantt_footer_viewType = 'footer';
|
|
|
9941
9977
|
|
|
9942
9978
|
|
|
9943
9979
|
|
|
9980
|
+
|
|
9981
|
+
|
|
9982
|
+
|
|
9944
9983
|
|
|
9945
9984
|
|
|
9946
9985
|
|
|
@@ -10585,23 +10624,30 @@ function calcScrollbar($xeGanttView) {
|
|
|
10585
10624
|
reactData.overflowX = overflowX;
|
|
10586
10625
|
}
|
|
10587
10626
|
}
|
|
10588
|
-
function
|
|
10627
|
+
function updateTaskChart($xeGanttView) {
|
|
10628
|
+
var $xeGantt = $xeGanttView.$xeGantt;
|
|
10589
10629
|
var reactData = $xeGanttView.reactData;
|
|
10590
10630
|
var internalData = $xeGanttView.internalData;
|
|
10631
|
+
var ganttInternalData = $xeGantt.internalData;
|
|
10632
|
+
var $xeTable = internalData.xeTable;
|
|
10633
|
+
var dragBarRow = ganttInternalData.dragBarRow;
|
|
10591
10634
|
var viewCellWidth = reactData.viewCellWidth;
|
|
10592
10635
|
var elemStore = internalData.elemStore,
|
|
10593
10636
|
chartMaps = internalData.chartMaps;
|
|
10594
|
-
var chartWrapper = getRefElem(elemStore['main-chart-wrapper']);
|
|
10595
|
-
if (chartWrapper) {
|
|
10637
|
+
var chartWrapper = getRefElem(elemStore['main-chart-task-wrapper']);
|
|
10638
|
+
if (chartWrapper && $xeTable) {
|
|
10596
10639
|
external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().arrayEach(chartWrapper.children, function (rowEl) {
|
|
10597
10640
|
var barEl = rowEl.children[0];
|
|
10598
|
-
if (!barEl
|
|
10641
|
+
if (!barEl) {
|
|
10599
10642
|
return;
|
|
10600
10643
|
}
|
|
10601
10644
|
var rowid = rowEl.getAttribute('rowid');
|
|
10602
|
-
|
|
10603
|
-
|
|
10604
|
-
|
|
10645
|
+
if (dragBarRow && $xeTable.getRowid(dragBarRow) === rowid) {
|
|
10646
|
+
return;
|
|
10647
|
+
}
|
|
10648
|
+
var chartRest = rowid ? chartMaps[rowid] : null;
|
|
10649
|
+
barEl.style.left = "".concat(getTaskBarLeft(chartRest, viewCellWidth), "px");
|
|
10650
|
+
barEl.style.width = "".concat(getTaskBarWidth(chartRest, viewCellWidth), "px");
|
|
10605
10651
|
});
|
|
10606
10652
|
}
|
|
10607
10653
|
return $xeGanttView.$nextTick();
|
|
@@ -10621,6 +10667,9 @@ function updateStyle($xeGanttView) {
|
|
|
10621
10667
|
if (!el) {
|
|
10622
10668
|
return;
|
|
10623
10669
|
}
|
|
10670
|
+
if (!$xeGantt) {
|
|
10671
|
+
return;
|
|
10672
|
+
}
|
|
10624
10673
|
var scrollbarOpts = $xeGantt.computeScrollbarOpts;
|
|
10625
10674
|
var scrollbarXToTop = $xeGantt.computeScrollbarXToTop;
|
|
10626
10675
|
var scrollbarYToLeft = $xeGantt.computeScrollbarYToLeft;
|
|
@@ -10720,18 +10769,21 @@ function updateStyle($xeGanttView) {
|
|
|
10720
10769
|
bodyTableElem.style.width = "".concat(vmTableWidth, "px");
|
|
10721
10770
|
}
|
|
10722
10771
|
reactData.scrollXWidth = viewTableWidth;
|
|
10723
|
-
return
|
|
10772
|
+
return Promise.all([updateTaskChart($xeGanttView), $xeGantt.handleUpdateTaskLink ? $xeGantt.handleUpdateTaskLink($xeGanttView) : null]);
|
|
10724
10773
|
}
|
|
10725
10774
|
function handleRecalculateStyle($xeGanttView) {
|
|
10726
10775
|
var internalData = $xeGanttView.internalData;
|
|
10776
|
+
var $xeGantt = $xeGanttView.$xeGantt;
|
|
10727
10777
|
var el = $xeGanttView.$refs.refElem;
|
|
10728
10778
|
internalData.rceRunTime = Date.now();
|
|
10729
10779
|
if (!el || !el.clientWidth) {
|
|
10730
10780
|
return $xeGanttView.$nextTick();
|
|
10731
10781
|
}
|
|
10782
|
+
if (!$xeGantt) {
|
|
10783
|
+
return $xeGanttView.$nextTick();
|
|
10784
|
+
}
|
|
10732
10785
|
calcScrollbar($xeGanttView);
|
|
10733
10786
|
updateStyle($xeGanttView);
|
|
10734
|
-
updateChart($xeGanttView);
|
|
10735
10787
|
return computeScrollLoad($xeGanttView);
|
|
10736
10788
|
}
|
|
10737
10789
|
function _handleLazyRecalculate($xeGanttView) {
|
|
@@ -10936,7 +10988,7 @@ function updateScrollYSpace($xeGanttView) {
|
|
|
10936
10988
|
if (!(scrollYLoad && overflowY)) {
|
|
10937
10989
|
scrollYTop = 0;
|
|
10938
10990
|
}
|
|
10939
|
-
var bodyChartWrapperElem = getRefElem(elemStore['main-chart-wrapper']);
|
|
10991
|
+
var bodyChartWrapperElem = getRefElem(elemStore['main-chart-task-wrapper']);
|
|
10940
10992
|
if (bodyTableElem) {
|
|
10941
10993
|
bodyTableElem.style.transform = "translate(".concat(reactData.scrollXLeft || 0, "px, ").concat(scrollYTop, "px)");
|
|
10942
10994
|
}
|
|
@@ -10951,6 +11003,11 @@ function updateScrollYSpace($xeGanttView) {
|
|
|
10951
11003
|
if (scrollYSpaceEl) {
|
|
10952
11004
|
scrollYSpaceEl.style.height = ySpaceHeight ? "".concat(ySpaceHeight, "px") : '';
|
|
10953
11005
|
}
|
|
11006
|
+
var lineWrapper = getRefElem(elemStore['main-chart-line-wrapper']);
|
|
11007
|
+
var svgElem = lineWrapper ? lineWrapper.firstElementChild : null;
|
|
11008
|
+
if (svgElem) {
|
|
11009
|
+
svgElem.style.height = ySpaceHeight ? "".concat(ySpaceHeight, "px") : '';
|
|
11010
|
+
}
|
|
10954
11011
|
reactData.scrollYTop = scrollYTop;
|
|
10955
11012
|
reactData.scrollYHeight = scrollYHeight;
|
|
10956
11013
|
reactData.isScrollYBig = isScrollYBig;
|
|
@@ -11136,7 +11193,7 @@ function syncTableScrollTop($xeGanttView, scrollTop) {
|
|
|
11136
11193
|
tableData: [],
|
|
11137
11194
|
tableColumn: [],
|
|
11138
11195
|
headerGroups: [],
|
|
11139
|
-
viewCellWidth:
|
|
11196
|
+
viewCellWidth: 40
|
|
11140
11197
|
};
|
|
11141
11198
|
var internalData = createInternalData();
|
|
11142
11199
|
return {
|
|
@@ -11622,6 +11679,8 @@ var external_root_VxeUITable_commonjs_vxe_table_commonjs2_vxe_table_amd_vxe_tabl
|
|
|
11622
11679
|
|
|
11623
11680
|
|
|
11624
11681
|
|
|
11682
|
+
|
|
11683
|
+
|
|
11625
11684
|
|
|
11626
11685
|
|
|
11627
11686
|
|
|
@@ -11686,8 +11745,44 @@ external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default(
|
|
|
11686
11745
|
return $xeTable && $xeTable[name].apply($xeTable, arguments);
|
|
11687
11746
|
};
|
|
11688
11747
|
});
|
|
11748
|
+
function handleTaskAddLink(item, linkConfs, fromConfMaps, fromKeyMaps, uniqueMaps) {
|
|
11749
|
+
if (item) {
|
|
11750
|
+
var type = item.type,
|
|
11751
|
+
from = item.from,
|
|
11752
|
+
to = item.to,
|
|
11753
|
+
lineStatus = item.lineStatus,
|
|
11754
|
+
lineColor = item.lineColor,
|
|
11755
|
+
lineTyle = item.lineTyle,
|
|
11756
|
+
lineWidth = item.lineWidth,
|
|
11757
|
+
showArrow = item.showArrow;
|
|
11758
|
+
var tlKey = getTaskLinkKey(from, to);
|
|
11759
|
+
if (from && to && !uniqueMaps[tlKey]) {
|
|
11760
|
+
var confs = fromConfMaps[from];
|
|
11761
|
+
if (!confs) {
|
|
11762
|
+
confs = fromConfMaps[from] = [];
|
|
11763
|
+
}
|
|
11764
|
+
var confObj = {
|
|
11765
|
+
type: type,
|
|
11766
|
+
from: from,
|
|
11767
|
+
to: to,
|
|
11768
|
+
lineStatus: lineStatus,
|
|
11769
|
+
lineColor: lineColor,
|
|
11770
|
+
lineTyle: lineTyle,
|
|
11771
|
+
lineWidth: lineWidth,
|
|
11772
|
+
showArrow: showArrow
|
|
11773
|
+
};
|
|
11774
|
+
confs.push(confObj);
|
|
11775
|
+
linkConfs.push(confObj);
|
|
11776
|
+
fromKeyMaps[from] = confObj;
|
|
11777
|
+
uniqueMaps[tlKey] = confObj;
|
|
11778
|
+
}
|
|
11779
|
+
}
|
|
11780
|
+
}
|
|
11689
11781
|
function gantt_createInternalData() {
|
|
11690
11782
|
return {
|
|
11783
|
+
linkFromConfMaps: {},
|
|
11784
|
+
linkFromKeyMaps: {},
|
|
11785
|
+
linkUniqueMaps: {},
|
|
11691
11786
|
uFoot: false,
|
|
11692
11787
|
resizeTableWidth: 0
|
|
11693
11788
|
// barTipTimeout: null
|
|
@@ -11704,15 +11799,17 @@ function gantt_createInternalData() {
|
|
|
11704
11799
|
toolbarConfig: Object,
|
|
11705
11800
|
formConfig: Object,
|
|
11706
11801
|
zoomConfig: Object,
|
|
11802
|
+
links: Array,
|
|
11707
11803
|
layouts: Array,
|
|
11708
11804
|
taskConfig: Object,
|
|
11709
11805
|
taskViewScaleConfig: Object,
|
|
11710
11806
|
taskViewConfig: Object,
|
|
11807
|
+
taskLinkConfig: Object,
|
|
11711
11808
|
taskBarConfig: Object,
|
|
11712
11809
|
taskBarTooltipConfig: Object,
|
|
11713
11810
|
taskSplitConfig: Object,
|
|
11714
11811
|
taskBarResizeConfig: Object,
|
|
11715
|
-
|
|
11812
|
+
taskBarMoveConfig: Object,
|
|
11716
11813
|
size: {
|
|
11717
11814
|
type: String,
|
|
11718
11815
|
default: function _default() {
|
|
@@ -11735,6 +11832,7 @@ function gantt_createInternalData() {
|
|
|
11735
11832
|
tableLoading: false,
|
|
11736
11833
|
proxyInited: false,
|
|
11737
11834
|
isZMax: false,
|
|
11835
|
+
tableLinks: [],
|
|
11738
11836
|
tableData: [],
|
|
11739
11837
|
filterData: [],
|
|
11740
11838
|
formData: {},
|
|
@@ -11754,7 +11852,9 @@ function gantt_createInternalData() {
|
|
|
11754
11852
|
content: '',
|
|
11755
11853
|
visible: false,
|
|
11756
11854
|
params: null
|
|
11757
|
-
}
|
|
11855
|
+
},
|
|
11856
|
+
linkList: [],
|
|
11857
|
+
upLinkFlag: 0
|
|
11758
11858
|
};
|
|
11759
11859
|
var internalData = gantt_createInternalData();
|
|
11760
11860
|
return {
|
|
@@ -11819,10 +11919,10 @@ function gantt_createInternalData() {
|
|
|
11819
11919
|
var props = $xeGantt;
|
|
11820
11920
|
return Object.assign({}, gantt_getConfig().gantt.taskBarConfig, props.taskBarConfig);
|
|
11821
11921
|
},
|
|
11822
|
-
|
|
11922
|
+
computeTaskBarMoveOpts: function computeTaskBarMoveOpts() {
|
|
11823
11923
|
var $xeGantt = this;
|
|
11824
11924
|
var props = $xeGantt;
|
|
11825
|
-
return Object.assign({}, gantt_getConfig().gantt.
|
|
11925
|
+
return Object.assign({}, gantt_getConfig().gantt.taskBarMoveConfig, props.taskBarMoveConfig);
|
|
11826
11926
|
},
|
|
11827
11927
|
computeTaskBarResizeOpts: function computeTaskBarResizeOpts() {
|
|
11828
11928
|
var $xeGantt = this;
|
|
@@ -11839,6 +11939,11 @@ function gantt_createInternalData() {
|
|
|
11839
11939
|
var props = $xeGantt;
|
|
11840
11940
|
return Object.assign({}, gantt_getConfig().gantt.taskBarTooltipConfig, props.taskBarTooltipConfig);
|
|
11841
11941
|
},
|
|
11942
|
+
computeTaskLinkOpts: function computeTaskLinkOpts() {
|
|
11943
|
+
var $xeGantt = this;
|
|
11944
|
+
var props = $xeGantt;
|
|
11945
|
+
return Object.assign({}, gantt_getConfig().gantt.taskLinkConfig, props.taskLinkConfig);
|
|
11946
|
+
},
|
|
11842
11947
|
computeScaleUnit: function computeScaleUnit() {
|
|
11843
11948
|
var $xeGantt = this;
|
|
11844
11949
|
var minScale = $xeGantt.computeMinScale;
|
|
@@ -13369,8 +13474,8 @@ function gantt_createInternalData() {
|
|
|
13369
13474
|
return $xeGantt.$nextTick();
|
|
13370
13475
|
},
|
|
13371
13476
|
/**
|
|
13372
|
-
|
|
13373
|
-
|
|
13477
|
+
* 关闭 bar tooltip
|
|
13478
|
+
*/
|
|
13374
13479
|
closeTaskBarTooltip: function closeTaskBarTooltip() {
|
|
13375
13480
|
var $xeGantt = this;
|
|
13376
13481
|
var reactData = $xeGantt.reactData;
|
|
@@ -13589,6 +13694,31 @@ function gantt_createInternalData() {
|
|
|
13589
13694
|
$xeGantt.closeTaskBarTooltip();
|
|
13590
13695
|
}
|
|
13591
13696
|
},
|
|
13697
|
+
handleTableLinks: function handleTableLinks() {
|
|
13698
|
+
var $xeGantt = this;
|
|
13699
|
+
var reactData = $xeGantt.reactData;
|
|
13700
|
+
var linkList = reactData.linkList;
|
|
13701
|
+
reactData.tableLinks = linkList.slice(0);
|
|
13702
|
+
},
|
|
13703
|
+
handleTaskAddLink: handleTaskAddLink,
|
|
13704
|
+
handleTaskUpdateLinks: function handleTaskUpdateLinks(links) {
|
|
13705
|
+
var $xeGantt = this;
|
|
13706
|
+
var reactData = $xeGantt.reactData;
|
|
13707
|
+
var internalData = $xeGantt.internalData;
|
|
13708
|
+
var linkConfs = [];
|
|
13709
|
+
var fromConfMaps = {};
|
|
13710
|
+
var fromKeyMaps = {};
|
|
13711
|
+
var uniqueMaps = {};
|
|
13712
|
+
external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().each(links || [], function (item) {
|
|
13713
|
+
handleTaskAddLink(item, linkConfs, fromConfMaps, fromKeyMaps, uniqueMaps);
|
|
13714
|
+
});
|
|
13715
|
+
reactData.linkList = linkConfs;
|
|
13716
|
+
internalData.linkFromConfMaps = fromConfMaps;
|
|
13717
|
+
internalData.linkFromKeyMaps = fromKeyMaps;
|
|
13718
|
+
internalData.linkUniqueMaps = uniqueMaps;
|
|
13719
|
+
$xeGantt.handleTableLinks();
|
|
13720
|
+
return $xeGantt.$nextTick();
|
|
13721
|
+
},
|
|
13592
13722
|
handleTaskHeaderContextmenuEvent: function handleTaskHeaderContextmenuEvent(evnt, params) {
|
|
13593
13723
|
var $xeGantt = this;
|
|
13594
13724
|
var $xeTable = $xeGantt.$refs.refTable;
|
|
@@ -14141,6 +14271,14 @@ function gantt_createInternalData() {
|
|
|
14141
14271
|
if (props.expandConfig) {
|
|
14142
14272
|
warnLog('vxe.error.notProp', ['expand-config']);
|
|
14143
14273
|
}
|
|
14274
|
+
if (!$xeGantt.handleUpdateTaskLink) {
|
|
14275
|
+
if (props.taskLinkConfig) {
|
|
14276
|
+
warnLog('vxe.error.notProp', ['task-link-config']);
|
|
14277
|
+
}
|
|
14278
|
+
if (props.links) {
|
|
14279
|
+
errLog('vxe.error.notProp', ['links']);
|
|
14280
|
+
}
|
|
14281
|
+
}
|
|
14144
14282
|
$xeGantt.$nextTick(function () {
|
|
14145
14283
|
if (props.formConfig) {
|
|
14146
14284
|
if (!VxeUIFormComponent) {
|
|
@@ -14158,6 +14296,9 @@ function gantt_createInternalData() {
|
|
|
14158
14296
|
}
|
|
14159
14297
|
}
|
|
14160
14298
|
});
|
|
14299
|
+
if (props.links) {
|
|
14300
|
+
$xeGantt.handleTaskUpdateLinks(props.links);
|
|
14301
|
+
}
|
|
14161
14302
|
$xeGantt.handleTaskScaleConfig();
|
|
14162
14303
|
$xeGantt.initPages();
|
|
14163
14304
|
},
|
|
@@ -14183,11 +14324,35 @@ function gantt_createInternalData() {
|
|
|
14183
14324
|
return this.renderVN(h);
|
|
14184
14325
|
}
|
|
14185
14326
|
})); /* define-vxe-component end */
|
|
14327
|
+
;// ./packages/gantt/src/static.ts
|
|
14328
|
+
/**
|
|
14329
|
+
* 依赖线枚举类型
|
|
14330
|
+
*/
|
|
14331
|
+
var VxeGanttDependencyType;
|
|
14332
|
+
(function (VxeGanttDependencyType) {
|
|
14333
|
+
/**
|
|
14334
|
+
* 结束后才开始,表示一个任务必须在另一个任务开始之前完成
|
|
14335
|
+
*/
|
|
14336
|
+
VxeGanttDependencyType[VxeGanttDependencyType["FinishToStart"] = 0] = "FinishToStart";
|
|
14337
|
+
/**
|
|
14338
|
+
* 开始到结束,表示从某个过程的开始到结束的整个过程
|
|
14339
|
+
*/
|
|
14340
|
+
VxeGanttDependencyType[VxeGanttDependencyType["StartToFinish"] = 1] = "StartToFinish";
|
|
14341
|
+
/**
|
|
14342
|
+
* 开始后才开始,表示一个活动结束了,另一个活动才能开始,它们之间按先后顺序进行
|
|
14343
|
+
*/
|
|
14344
|
+
VxeGanttDependencyType[VxeGanttDependencyType["StartToStart"] = 2] = "StartToStart";
|
|
14345
|
+
/**
|
|
14346
|
+
* 完成到完成,表示一个任务必须在另一个任务完成之后才能完成
|
|
14347
|
+
*/
|
|
14348
|
+
VxeGanttDependencyType[VxeGanttDependencyType["FinishToFinish"] = 3] = "FinishToFinish";
|
|
14349
|
+
})(VxeGanttDependencyType || (VxeGanttDependencyType = {}));
|
|
14186
14350
|
;// ./packages/gantt/index.ts
|
|
14187
14351
|
|
|
14188
14352
|
|
|
14189
14353
|
|
|
14190
14354
|
|
|
14355
|
+
|
|
14191
14356
|
var isReg = false;
|
|
14192
14357
|
var VxeGantt = Object.assign({}, gantt, {
|
|
14193
14358
|
install: function install(app) {
|
|
@@ -14203,10 +14368,12 @@ var VxeGantt = Object.assign({}, gantt, {
|
|
|
14203
14368
|
core_.VxeUI.dynamicApp.use(VxeGantt);
|
|
14204
14369
|
}
|
|
14205
14370
|
}
|
|
14371
|
+
checkDependVersion();
|
|
14206
14372
|
app.component(gantt.name, gantt);
|
|
14207
14373
|
}
|
|
14208
14374
|
});
|
|
14209
14375
|
core_.VxeUI.component(gantt);
|
|
14376
|
+
|
|
14210
14377
|
var Gantt = VxeGantt;
|
|
14211
14378
|
/* harmony default export */ var packages_gantt = (VxeGantt);
|
|
14212
14379
|
;// ./packages/components.ts
|