vxe-gantt 3.1.18 → 3.1.19
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-chart.js +91 -48
- package/es/gantt/src/gantt-view.js +19 -9
- package/es/gantt/src/gantt.js +86 -75
- package/es/gantt/src/util.js +0 -3
- package/es/gantt/style.css +16 -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 +2 -1
- package/es/ui/src/log.js +1 -1
- package/es/vxe-gantt/style.css +16 -2
- package/es/vxe-gantt/style.min.css +1 -1
- package/lib/gantt/src/gantt-chart.js +79 -40
- package/lib/gantt/src/gantt-chart.min.js +1 -1
- package/lib/gantt/src/gantt-view.js +19 -9
- package/lib/gantt/src/gantt-view.min.js +1 -1
- package/lib/gantt/src/gantt.js +92 -91
- package/lib/gantt/src/gantt.min.js +1 -1
- package/lib/gantt/src/util.js +0 -4
- package/lib/gantt/src/util.min.js +1 -1
- package/lib/gantt/style/style.css +16 -2
- package/lib/gantt/style/style.min.css +1 -1
- package/lib/index.umd.js +195 -148
- 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 +2 -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/lib/vxe-gantt/style/style.css +16 -2
- package/lib/vxe-gantt/style/style.min.css +1 -1
- package/package.json +2 -2
- package/packages/gantt/src/gantt-chart.ts +92 -53
- package/packages/gantt/src/gantt-view.ts +19 -9
- package/packages/gantt/src/gantt.ts +91 -78
- package/packages/gantt/src/util.ts +0 -4
- package/packages/ui/index.ts +1 -0
- package/styles/components/gantt-module/gantt-chart.scss +14 -2
- package/styles/theme/base.scss +1 -0
package/lib/index.umd.js
CHANGED
|
@@ -8286,7 +8286,7 @@ var core_ = __webpack_require__(4345);
|
|
|
8286
8286
|
|
|
8287
8287
|
var setConfig = core_.VxeUI.setConfig,
|
|
8288
8288
|
setIcon = core_.VxeUI.setIcon;
|
|
8289
|
-
core_.VxeUI.ganttVersion = "3.1.
|
|
8289
|
+
core_.VxeUI.ganttVersion = "3.1.19";
|
|
8290
8290
|
var ymdFormat = 'yyyy-MM-dd';
|
|
8291
8291
|
var ymdhmsFormat = 'yyyy-MM-dd HH:mm:ss';
|
|
8292
8292
|
setConfig({
|
|
@@ -8332,6 +8332,7 @@ setConfig({
|
|
|
8332
8332
|
},
|
|
8333
8333
|
taskLinkConfig: {
|
|
8334
8334
|
enabled: true,
|
|
8335
|
+
isHover: true,
|
|
8335
8336
|
showArrow: true
|
|
8336
8337
|
},
|
|
8337
8338
|
taskViewScaleConfig: {
|
|
@@ -8399,7 +8400,7 @@ var es_array_concat = __webpack_require__(8706);
|
|
|
8399
8400
|
;// ./packages/ui/src/log.ts
|
|
8400
8401
|
|
|
8401
8402
|
var log = core_.VxeUI.log;
|
|
8402
|
-
var version = "gantt v".concat("3.1.
|
|
8403
|
+
var version = "gantt v".concat("3.1.19");
|
|
8403
8404
|
var warnLog = log.create('warn', version);
|
|
8404
8405
|
var errLog = log.create('error', version);
|
|
8405
8406
|
;// ./packages/ui/src/depend.ts
|
|
@@ -9123,8 +9124,9 @@ function getSlotVNs(vns) {
|
|
|
9123
9124
|
}
|
|
9124
9125
|
return [vns];
|
|
9125
9126
|
}
|
|
9127
|
+
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.string.pad-start.js
|
|
9128
|
+
var es_string_pad_start = __webpack_require__(8156);
|
|
9126
9129
|
;// ./packages/gantt/src/util.ts
|
|
9127
|
-
|
|
9128
9130
|
function getRefElem(refEl) {
|
|
9129
9131
|
if (refEl) {
|
|
9130
9132
|
return refEl.$el || refEl;
|
|
@@ -9151,9 +9153,6 @@ function getTaskBarLeft(chartRest, viewCellWidth) {
|
|
|
9151
9153
|
function getTaskBarWidth(chartRest, viewCellWidth) {
|
|
9152
9154
|
return Math.max(1, chartRest ? Math.floor(viewCellWidth * chartRest.oWidthSize) - 1 : 0);
|
|
9153
9155
|
}
|
|
9154
|
-
function getTaskLinkKey(from, to) {
|
|
9155
|
-
return "".concat(from, "_").concat(to);
|
|
9156
|
-
}
|
|
9157
9156
|
var taskTypeMaps = {
|
|
9158
9157
|
milestone: true
|
|
9159
9158
|
};
|
|
@@ -9163,8 +9162,6 @@ function hasMilestoneTask(type) {
|
|
|
9163
9162
|
function gettaskType(type) {
|
|
9164
9163
|
return taskTypeMaps[type] ? type : 'default';
|
|
9165
9164
|
}
|
|
9166
|
-
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.string.pad-start.js
|
|
9167
|
-
var es_string_pad_start = __webpack_require__(8156);
|
|
9168
9165
|
;// ./packages/gantt/src/gantt-header.ts
|
|
9169
9166
|
|
|
9170
9167
|
|
|
@@ -9368,8 +9365,6 @@ var gantt_chart_viewType = 'chart';
|
|
|
9368
9365
|
renderTaskBar: function renderTaskBar(h, $xeTable, row, rowid, rowIndex, $rowIndex, _rowIndex) {
|
|
9369
9366
|
var _vm = this;
|
|
9370
9367
|
var $xeGantt = _vm.$xeGantt;
|
|
9371
|
-
var tableProps = $xeTable;
|
|
9372
|
-
var treeConfig = tableProps.treeConfig;
|
|
9373
9368
|
var tableReactData = $xeTable;
|
|
9374
9369
|
var resizeHeightFlag = tableReactData.resizeHeightFlag;
|
|
9375
9370
|
var tableInternalData = $xeTable;
|
|
@@ -9378,9 +9373,13 @@ var gantt_chart_viewType = 'chart';
|
|
|
9378
9373
|
var rowOpts = $xeTable.computeRowOpts;
|
|
9379
9374
|
var defaultRowHeight = $xeTable.computeDefaultRowHeight;
|
|
9380
9375
|
var ganttProps = $xeGantt;
|
|
9376
|
+
var ganttReactData = $xeGantt.reactData;
|
|
9377
|
+
var ganttInternalData = $xeGantt.internalData;
|
|
9381
9378
|
var ganttSlots = $xeGantt.$scopedSlots;
|
|
9382
9379
|
var taskBarSlot = ganttSlots.taskBar || ganttSlots['task-bar'];
|
|
9383
9380
|
var taskBarMilestoneConfig = ganttProps.taskBarMilestoneConfig;
|
|
9381
|
+
var activeLink = ganttReactData.activeLink,
|
|
9382
|
+
activeBarRowid = ganttReactData.activeBarRowid;
|
|
9384
9383
|
var titleField = $xeGantt.computeTitleField;
|
|
9385
9384
|
var progressField = $xeGantt.computeProgressField;
|
|
9386
9385
|
var typeField = $xeGantt.computeTypeField;
|
|
@@ -9438,29 +9437,27 @@ var gantt_chart_viewType = 'chart';
|
|
|
9438
9437
|
rowIndex: rowIndex,
|
|
9439
9438
|
_rowIndex: _rowIndex
|
|
9440
9439
|
};
|
|
9441
|
-
var
|
|
9442
|
-
click: function click(evnt) {
|
|
9443
|
-
$xeGantt.handleTaskBarClickEvent(evnt, barParams);
|
|
9444
|
-
},
|
|
9445
|
-
dblclick: function dblclick(evnt) {
|
|
9446
|
-
$xeGantt.handleTaskBarDblclickEvent(evnt, barParams);
|
|
9447
|
-
},
|
|
9448
|
-
mousedown: function mousedown(evnt) {
|
|
9449
|
-
if ($xeGantt.handleTaskBarMousedownEvent) {
|
|
9450
|
-
$xeGantt.handleTaskBarMousedownEvent(evnt, barParams);
|
|
9451
|
-
}
|
|
9452
|
-
}
|
|
9453
|
-
};
|
|
9440
|
+
var ctOns = {};
|
|
9454
9441
|
if (showTooltip) {
|
|
9455
|
-
|
|
9456
|
-
|
|
9442
|
+
ctOns.mouseover = function (evnt) {
|
|
9443
|
+
var dragBarRow = ganttInternalData.dragBarRow;
|
|
9444
|
+
var ttParams = Object.assign({
|
|
9457
9445
|
$event: evnt
|
|
9458
|
-
}, ctParams)
|
|
9446
|
+
}, ctParams);
|
|
9447
|
+
if (!dragBarRow) {
|
|
9448
|
+
$xeGantt.triggerTaskBarTooltipEvent(evnt, ttParams);
|
|
9449
|
+
}
|
|
9450
|
+
$xeGantt.dispatchEvent('task-bar-mouseenter', ttParams, evnt);
|
|
9459
9451
|
};
|
|
9460
|
-
|
|
9461
|
-
|
|
9452
|
+
ctOns.mouseleave = function (evnt) {
|
|
9453
|
+
var dragBarRow = ganttInternalData.dragBarRow;
|
|
9454
|
+
var ttParams = Object.assign({
|
|
9462
9455
|
$event: evnt
|
|
9463
|
-
}, ctParams)
|
|
9456
|
+
}, ctParams);
|
|
9457
|
+
if (!dragBarRow) {
|
|
9458
|
+
$xeGantt.handleTaskBarTooltipLeaveEvent(evnt, ttParams);
|
|
9459
|
+
}
|
|
9460
|
+
$xeGantt.dispatchEvent('task-bar-mouseleave', ttParams, evnt);
|
|
9464
9461
|
};
|
|
9465
9462
|
}
|
|
9466
9463
|
var cbVNs = [];
|
|
@@ -9469,12 +9466,15 @@ var gantt_chart_viewType = 'chart';
|
|
|
9469
9466
|
isMilestone: isMilestone,
|
|
9470
9467
|
title: title,
|
|
9471
9468
|
vbStyle: vbStyle,
|
|
9472
|
-
vpStyle: vpStyle
|
|
9469
|
+
vpStyle: vpStyle,
|
|
9470
|
+
rowid: rowid,
|
|
9471
|
+
ctOns: ctOns
|
|
9473
9472
|
});
|
|
9474
9473
|
} else if (taskBarSlot) {
|
|
9475
9474
|
cbVNs.push(h('div', {
|
|
9476
9475
|
key: 'cbc',
|
|
9477
|
-
class: 'vxe-gantt-view--chart-custom-bar-content'
|
|
9476
|
+
class: 'vxe-gantt-view--chart-custom-bar-content-wrapper',
|
|
9477
|
+
on: ctOns
|
|
9478
9478
|
}, $xeGantt.callSlot(taskBarSlot, barParams, h)));
|
|
9479
9479
|
} else {
|
|
9480
9480
|
if (isMilestone) {
|
|
@@ -9487,7 +9487,8 @@ var gantt_chart_viewType = 'chart';
|
|
|
9487
9487
|
};
|
|
9488
9488
|
cbVNs.push(h('div', {
|
|
9489
9489
|
key: 'vcm',
|
|
9490
|
-
class: 'vxe-gantt-view--chart-milestone-wrapper'
|
|
9490
|
+
class: 'vxe-gantt-view--chart-milestone-wrapper',
|
|
9491
|
+
on: ctOns
|
|
9491
9492
|
}, [h('div', {
|
|
9492
9493
|
class: ['vxe-gantt-view--chart-milestone-icon', iconStatus ? "theme--".concat(external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(iconStatus) ? iconStatus(tbmParams) : iconStatus) : ''],
|
|
9493
9494
|
style: iconStyle ? Object.assign({}, external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(iconStyle) ? iconStyle(tbmParams) : iconStyle) : undefined
|
|
@@ -9497,18 +9498,22 @@ var gantt_chart_viewType = 'chart';
|
|
|
9497
9498
|
class: 'vxe-gantt-view--chart-milestone-content'
|
|
9498
9499
|
}, title) : renderEmptyElement($xeGantt)]));
|
|
9499
9500
|
} else {
|
|
9500
|
-
cbVNs.push(
|
|
9501
|
+
cbVNs.push(h('div', {
|
|
9502
|
+
key: 'vbc',
|
|
9503
|
+
class: 'vxe-gantt-view--chart-bar-content-wrapper',
|
|
9504
|
+
on: ctOns
|
|
9505
|
+
}, [showProgress ? h('div', {
|
|
9501
9506
|
key: 'vcp',
|
|
9502
9507
|
class: 'vxe-gantt-view--chart-progress',
|
|
9503
9508
|
style: vpStyle
|
|
9504
9509
|
}) : renderEmptyElement($xeGantt), showContent ? h('div', {
|
|
9505
9510
|
key: 'vcc',
|
|
9506
9511
|
class: 'vxe-gantt-view--chart-content'
|
|
9507
|
-
}, title) : renderEmptyElement($xeGantt));
|
|
9512
|
+
}, title) : renderEmptyElement($xeGantt)]));
|
|
9508
9513
|
}
|
|
9509
9514
|
}
|
|
9510
9515
|
return h('div', {
|
|
9511
|
-
key:
|
|
9516
|
+
key: rowid,
|
|
9512
9517
|
attrs: {
|
|
9513
9518
|
rowid: rowid
|
|
9514
9519
|
},
|
|
@@ -9525,12 +9530,27 @@ var gantt_chart_viewType = 'chart';
|
|
|
9525
9530
|
}
|
|
9526
9531
|
}
|
|
9527
9532
|
}, [h('div', {
|
|
9528
|
-
class: [taskBarSlot ? 'vxe-gantt-view--chart-custom-bar' : 'vxe-gantt-view--chart-bar', "is--".concat(gettaskType(typeValue))
|
|
9533
|
+
class: [taskBarSlot ? 'vxe-gantt-view--chart-custom-bar' : 'vxe-gantt-view--chart-bar', "is--".concat(gettaskType(typeValue)), {
|
|
9534
|
+
'is--active': activeBarRowid === rowid,
|
|
9535
|
+
'active--link': activeLink && (rowid === "".concat(activeLink.from) || rowid === "".concat(activeLink.to))
|
|
9536
|
+
}],
|
|
9529
9537
|
style: vbStyle,
|
|
9530
9538
|
attrs: {
|
|
9531
9539
|
rowid: rowid
|
|
9532
9540
|
},
|
|
9533
|
-
on:
|
|
9541
|
+
on: {
|
|
9542
|
+
click: function click(evnt) {
|
|
9543
|
+
$xeGantt.handleTaskBarClickEvent(evnt, barParams);
|
|
9544
|
+
},
|
|
9545
|
+
dblclick: function dblclick(evnt) {
|
|
9546
|
+
$xeGantt.handleTaskBarDblclickEvent(evnt, barParams);
|
|
9547
|
+
},
|
|
9548
|
+
mousedown: function mousedown(evnt) {
|
|
9549
|
+
if ($xeGantt.handleTaskBarMousedownEvent) {
|
|
9550
|
+
$xeGantt.handleTaskBarMousedownEvent(evnt, barParams);
|
|
9551
|
+
}
|
|
9552
|
+
}
|
|
9553
|
+
}
|
|
9534
9554
|
}, cbVNs)]);
|
|
9535
9555
|
},
|
|
9536
9556
|
renderTaskRows: function renderTaskRows(h, $xeTable, tableData) {
|
|
@@ -9576,24 +9596,38 @@ var gantt_chart_viewType = 'chart';
|
|
|
9576
9596
|
var _vm = this;
|
|
9577
9597
|
var $xeGantt = _vm.$xeGantt;
|
|
9578
9598
|
var $xeGanttView = _vm.$xeGanttView;
|
|
9599
|
+
var ganttReactData = $xeGantt.reactData;
|
|
9579
9600
|
var ganttViewInternalData = $xeGanttView.internalData;
|
|
9580
9601
|
var ganttViewReactData = $xeGanttView.reactData;
|
|
9581
9602
|
var $xeTable = ganttViewInternalData.xeTable;
|
|
9603
|
+
var dragLinkFromStore = ganttReactData.dragLinkFromStore;
|
|
9582
9604
|
var tableData = ganttViewReactData.tableData;
|
|
9583
9605
|
var taskLinkOpts = $xeGantt.computeTaskLinkOpts;
|
|
9584
|
-
var
|
|
9606
|
+
var taskBarOpts = $xeGantt.computeTaskBarOpts;
|
|
9607
|
+
var isCurrent = taskLinkOpts.isCurrent,
|
|
9608
|
+
isHover = taskLinkOpts.isHover;
|
|
9609
|
+
var linkCreatable = taskBarOpts.linkCreatable;
|
|
9585
9610
|
return h('div', {
|
|
9586
9611
|
ref: 'refElem',
|
|
9587
|
-
class: 'vxe-gantt-view--chart-wrapper'
|
|
9588
|
-
|
|
9589
|
-
|
|
9590
|
-
|
|
9591
|
-
|
|
9612
|
+
class: ['vxe-gantt-view--chart-wrapper', {
|
|
9613
|
+
'is--cl-drag': dragLinkFromStore.rowid
|
|
9614
|
+
}]
|
|
9615
|
+
}, [$xeGantt.renderGanttTaskChartBefores ? h('div', {
|
|
9616
|
+
ref: 'refChartBeforeWrapperElem',
|
|
9617
|
+
class: ['vxe-gantt-view--chart-before-wrapper', {
|
|
9618
|
+
'link--current': isCurrent,
|
|
9619
|
+
'link--hover': isHover
|
|
9592
9620
|
}]
|
|
9593
|
-
}, $xeTable && isEnableConf(taskLinkOpts) ? $xeGantt.
|
|
9621
|
+
}, $xeTable && isEnableConf(taskLinkOpts) ? $xeGantt.renderGanttTaskChartBefores(h) : []) : renderEmptyElement($xeGantt), h('div', {
|
|
9594
9622
|
ref: 'refTaskWrapperElem',
|
|
9595
|
-
class: 'vxe-gantt-view--chart-task-wrapper'
|
|
9596
|
-
|
|
9623
|
+
class: ['vxe-gantt-view--chart-task-wrapper', {
|
|
9624
|
+
'link--current': isCurrent,
|
|
9625
|
+
'link--create': linkCreatable
|
|
9626
|
+
}]
|
|
9627
|
+
}, $xeTable ? _vm.renderTaskRows(h, $xeTable, tableData) : []), $xeGantt.renderGanttTaskChartAfters ? h('div', {
|
|
9628
|
+
ref: 'refChartAfterWrapperElem',
|
|
9629
|
+
class: 'vxe-gantt-view--chart-after-wrapper'
|
|
9630
|
+
}, $xeTable && isEnableConf(taskLinkOpts) ? $xeGantt.renderGanttTaskChartAfters(h) : []) : renderEmptyElement($xeGantt)]);
|
|
9597
9631
|
}
|
|
9598
9632
|
},
|
|
9599
9633
|
mounted: function mounted() {
|
|
@@ -9603,7 +9637,8 @@ var gantt_chart_viewType = 'chart';
|
|
|
9603
9637
|
var elemStore = ganttViewInternalData.elemStore;
|
|
9604
9638
|
var prefix = 'main-chart-';
|
|
9605
9639
|
elemStore["".concat(prefix, "task-wrapper")] = _vm.$refs.refTaskWrapperElem;
|
|
9606
|
-
elemStore["".concat(prefix, "
|
|
9640
|
+
elemStore["".concat(prefix, "before-wrapper")] = _vm.$refs.refChartBeforeWrapperElem;
|
|
9641
|
+
elemStore["".concat(prefix, "after-wrapper")] = _vm.$refs.refChartAfterWrapperElem;
|
|
9607
9642
|
},
|
|
9608
9643
|
destroyed: function destroyed() {
|
|
9609
9644
|
var _vm = this;
|
|
@@ -9612,7 +9647,8 @@ var gantt_chart_viewType = 'chart';
|
|
|
9612
9647
|
var elemStore = ganttViewInternalData.elemStore;
|
|
9613
9648
|
var prefix = 'main-chart-';
|
|
9614
9649
|
elemStore["".concat(prefix, "task-wrapper")] = null;
|
|
9615
|
-
elemStore["".concat(prefix, "
|
|
9650
|
+
elemStore["".concat(prefix, "before-wrapper")] = null;
|
|
9651
|
+
elemStore["".concat(prefix, "after-wrapper")] = null;
|
|
9616
9652
|
},
|
|
9617
9653
|
render: function render(h) {
|
|
9618
9654
|
return this.renderVN(h);
|
|
@@ -10867,7 +10903,7 @@ function updateStyle($xeGanttView) {
|
|
|
10867
10903
|
bodyTableElem.style.width = "".concat(vmTableWidth, "px");
|
|
10868
10904
|
}
|
|
10869
10905
|
reactData.scrollXWidth = viewTableWidth;
|
|
10870
|
-
return Promise.all([updateTaskChart($xeGanttView), $xeGantt.
|
|
10906
|
+
return Promise.all([updateTaskChart($xeGanttView), $xeGantt.handleUpdateTaskLinkStyle ? $xeGantt.handleUpdateTaskLinkStyle($xeGanttView) : null]);
|
|
10871
10907
|
}
|
|
10872
10908
|
function handleRecalculateStyle($xeGanttView) {
|
|
10873
10909
|
var internalData = $xeGanttView.internalData;
|
|
@@ -11044,10 +11080,15 @@ function updateScrollXSpace($xeGanttView) {
|
|
|
11044
11080
|
if (scrollXSpaceEl) {
|
|
11045
11081
|
scrollXSpaceEl.style.width = "".concat(scrollXWidth, "px");
|
|
11046
11082
|
}
|
|
11047
|
-
var
|
|
11048
|
-
var
|
|
11049
|
-
if (
|
|
11050
|
-
|
|
11083
|
+
var beforeWrapper = getRefElem(elemStore['main-chart-before-wrapper']);
|
|
11084
|
+
var beforeSvgElem = beforeWrapper ? beforeWrapper.firstElementChild : null;
|
|
11085
|
+
if (beforeSvgElem) {
|
|
11086
|
+
beforeSvgElem.style.width = "".concat(scrollXWidth, "px");
|
|
11087
|
+
}
|
|
11088
|
+
var afterWrapper = getRefElem(elemStore['main-chart-after-wrapper']);
|
|
11089
|
+
var afterSvgElem = afterWrapper ? afterWrapper.firstElementChild : null;
|
|
11090
|
+
if (afterSvgElem) {
|
|
11091
|
+
afterSvgElem.style.width = "".concat(scrollXWidth, "px");
|
|
11051
11092
|
}
|
|
11052
11093
|
calcScrollbar($xeGanttView);
|
|
11053
11094
|
return $xeGanttView.$nextTick();
|
|
@@ -11106,10 +11147,15 @@ function updateScrollYSpace($xeGanttView) {
|
|
|
11106
11147
|
if (scrollYSpaceEl) {
|
|
11107
11148
|
scrollYSpaceEl.style.height = ySpaceHeight ? "".concat(ySpaceHeight, "px") : '';
|
|
11108
11149
|
}
|
|
11109
|
-
var
|
|
11110
|
-
var
|
|
11111
|
-
if (
|
|
11112
|
-
|
|
11150
|
+
var beforeWrapper = getRefElem(elemStore['main-chart-before-wrapper']);
|
|
11151
|
+
var beforeSvgElem = beforeWrapper ? beforeWrapper.firstElementChild : null;
|
|
11152
|
+
if (beforeSvgElem) {
|
|
11153
|
+
beforeSvgElem.style.height = ySpaceHeight ? "".concat(ySpaceHeight, "px") : '';
|
|
11154
|
+
}
|
|
11155
|
+
var afterWrapper = getRefElem(elemStore['main-chart-after-wrapper']);
|
|
11156
|
+
var afterSvgElem = afterWrapper ? afterWrapper.firstElementChild : null;
|
|
11157
|
+
if (afterSvgElem) {
|
|
11158
|
+
afterSvgElem.style.height = ySpaceHeight ? "".concat(ySpaceHeight, "px") : '';
|
|
11113
11159
|
}
|
|
11114
11160
|
reactData.scrollYTop = scrollYTop;
|
|
11115
11161
|
reactData.scrollYHeight = scrollYHeight;
|
|
@@ -11787,7 +11833,6 @@ var external_root_VxeUITable_commonjs_vxe_table_commonjs2_vxe_table_amd_vxe_tabl
|
|
|
11787
11833
|
|
|
11788
11834
|
|
|
11789
11835
|
|
|
11790
|
-
|
|
11791
11836
|
|
|
11792
11837
|
|
|
11793
11838
|
var gantt_getConfig = core_.VxeUI.getConfig,
|
|
@@ -11851,48 +11896,58 @@ external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default(
|
|
|
11851
11896
|
return $xeTable && $xeTable[name].apply($xeTable, arguments);
|
|
11852
11897
|
};
|
|
11853
11898
|
});
|
|
11854
|
-
function handleTaskAddLink(item, linkConfs, fromConfMaps, fromKeyMaps, uniqueMaps) {
|
|
11855
|
-
if (item) {
|
|
11856
|
-
var type = item.type,
|
|
11857
|
-
from = item.from,
|
|
11858
|
-
to = item.to,
|
|
11859
|
-
lineStatus = item.lineStatus,
|
|
11860
|
-
lineColor = item.lineColor,
|
|
11861
|
-
lineType = item.lineType,
|
|
11862
|
-
lineWidth = item.lineWidth,
|
|
11863
|
-
showArrow = item.showArrow;
|
|
11864
|
-
var tlKey = getTaskLinkKey(from, to);
|
|
11865
|
-
if (from && to && !uniqueMaps[tlKey]) {
|
|
11866
|
-
var confs = fromConfMaps[from];
|
|
11867
|
-
if (!confs) {
|
|
11868
|
-
confs = fromConfMaps[from] = [];
|
|
11869
|
-
}
|
|
11870
|
-
var confObj = {
|
|
11871
|
-
type: type,
|
|
11872
|
-
from: from,
|
|
11873
|
-
to: to,
|
|
11874
|
-
lineStatus: lineStatus,
|
|
11875
|
-
lineColor: lineColor,
|
|
11876
|
-
lineType: lineType,
|
|
11877
|
-
lineWidth: lineWidth,
|
|
11878
|
-
showArrow: showArrow
|
|
11879
|
-
};
|
|
11880
|
-
confs.push(confObj);
|
|
11881
|
-
linkConfs.push(confObj);
|
|
11882
|
-
fromKeyMaps[from] = confObj;
|
|
11883
|
-
uniqueMaps[tlKey] = confObj;
|
|
11884
|
-
}
|
|
11885
|
-
}
|
|
11886
|
-
}
|
|
11887
11899
|
function gantt_createInternalData() {
|
|
11888
11900
|
return {
|
|
11889
11901
|
linkFromConfMaps: {},
|
|
11890
11902
|
linkFromKeyMaps: {},
|
|
11891
11903
|
linkUniqueMaps: {},
|
|
11892
11904
|
uFoot: false,
|
|
11893
|
-
resizeTableWidth: 0
|
|
11894
|
-
// barTipTimeout: null
|
|
11895
|
-
// dragBarRow: null
|
|
11905
|
+
resizeTableWidth: 0,
|
|
11906
|
+
// barTipTimeout: null,
|
|
11907
|
+
// dragBarRow: null,
|
|
11908
|
+
// dragLineRow: null,
|
|
11909
|
+
dragLinkToStore: {
|
|
11910
|
+
rowid: null,
|
|
11911
|
+
type: 0
|
|
11912
|
+
}
|
|
11913
|
+
};
|
|
11914
|
+
}
|
|
11915
|
+
function createReactData() {
|
|
11916
|
+
var _getConfig$pager;
|
|
11917
|
+
return {
|
|
11918
|
+
tableLoading: false,
|
|
11919
|
+
proxyInited: false,
|
|
11920
|
+
isZMax: false,
|
|
11921
|
+
tableLinks: [],
|
|
11922
|
+
tableData: [],
|
|
11923
|
+
filterData: [],
|
|
11924
|
+
formData: {},
|
|
11925
|
+
sortData: [],
|
|
11926
|
+
footerData: [],
|
|
11927
|
+
tZindex: 0,
|
|
11928
|
+
tablePage: {
|
|
11929
|
+
total: 0,
|
|
11930
|
+
pageSize: ((_getConfig$pager = gantt_getConfig().pager) === null || _getConfig$pager === void 0 ? void 0 : _getConfig$pager.pageSize) || 10,
|
|
11931
|
+
currentPage: 1
|
|
11932
|
+
},
|
|
11933
|
+
showLeftView: true,
|
|
11934
|
+
showRightView: true,
|
|
11935
|
+
taskScaleList: [],
|
|
11936
|
+
barTipStore: {
|
|
11937
|
+
row: null,
|
|
11938
|
+
content: '',
|
|
11939
|
+
visible: false,
|
|
11940
|
+
params: null
|
|
11941
|
+
},
|
|
11942
|
+
dragLinkFromStore: {
|
|
11943
|
+
rowid: null,
|
|
11944
|
+
type: 0
|
|
11945
|
+
},
|
|
11946
|
+
activeBarRowid: null,
|
|
11947
|
+
activeLink: null,
|
|
11948
|
+
isActiveCeLe: false,
|
|
11949
|
+
linkList: [],
|
|
11950
|
+
upLinkFlag: 0
|
|
11896
11951
|
};
|
|
11897
11952
|
}
|
|
11898
11953
|
/* harmony default export */ var gantt = (/* define-vxe-component start */defineVxeComponent({
|
|
@@ -11933,36 +11988,8 @@ function gantt_createInternalData() {
|
|
|
11933
11988
|
};
|
|
11934
11989
|
},
|
|
11935
11990
|
data: function data() {
|
|
11936
|
-
var _getConfig$pager;
|
|
11937
11991
|
var xID = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().uniqueId();
|
|
11938
|
-
var reactData =
|
|
11939
|
-
tableLoading: false,
|
|
11940
|
-
proxyInited: false,
|
|
11941
|
-
isZMax: false,
|
|
11942
|
-
tableLinks: [],
|
|
11943
|
-
tableData: [],
|
|
11944
|
-
filterData: [],
|
|
11945
|
-
formData: {},
|
|
11946
|
-
sortData: [],
|
|
11947
|
-
footerData: [],
|
|
11948
|
-
tZindex: 0,
|
|
11949
|
-
tablePage: {
|
|
11950
|
-
total: 0,
|
|
11951
|
-
pageSize: ((_getConfig$pager = gantt_getConfig().pager) === null || _getConfig$pager === void 0 ? void 0 : _getConfig$pager.pageSize) || 10,
|
|
11952
|
-
currentPage: 1
|
|
11953
|
-
},
|
|
11954
|
-
showLeftView: true,
|
|
11955
|
-
showRightView: true,
|
|
11956
|
-
taskScaleList: [],
|
|
11957
|
-
barTipStore: {
|
|
11958
|
-
row: null,
|
|
11959
|
-
content: '',
|
|
11960
|
-
visible: false,
|
|
11961
|
-
params: null
|
|
11962
|
-
},
|
|
11963
|
-
linkList: [],
|
|
11964
|
-
upLinkFlag: 0
|
|
11965
|
-
};
|
|
11992
|
+
var reactData = createReactData();
|
|
11966
11993
|
var internalData = gantt_createInternalData();
|
|
11967
11994
|
return {
|
|
11968
11995
|
xID: xID,
|
|
@@ -12081,6 +12108,15 @@ function gantt_createInternalData() {
|
|
|
12081
12108
|
var scales = taskViewOpts.scales;
|
|
12082
12109
|
return scales;
|
|
12083
12110
|
},
|
|
12111
|
+
computeTaskLinkStyle: function computeTaskLinkStyle() {
|
|
12112
|
+
var $xeGantt = this;
|
|
12113
|
+
var _$xeGantt$computeTask = $xeGantt.computeTaskLinkOpts,
|
|
12114
|
+
lineType = _$xeGantt$computeTask.lineType,
|
|
12115
|
+
lineWidth = _$xeGantt$computeTask.lineWidth,
|
|
12116
|
+
lineStatus = _$xeGantt$computeTask.lineStatus,
|
|
12117
|
+
lineColor = _$xeGantt$computeTask.lineColor;
|
|
12118
|
+
return "".concat(lineType || '', "_").concat(lineWidth || '', "_").concat(lineStatus || '', "_").concat(lineColor || '');
|
|
12119
|
+
},
|
|
12084
12120
|
/**
|
|
12085
12121
|
* 已废弃,保留兼容
|
|
12086
12122
|
* @deprecated
|
|
@@ -12354,6 +12390,12 @@ function gantt_createInternalData() {
|
|
|
12354
12390
|
var $xeGantt = this;
|
|
12355
12391
|
$xeGantt.handleTaskScaleConfig();
|
|
12356
12392
|
$xeGantt.refreshTaskView();
|
|
12393
|
+
},
|
|
12394
|
+
computeTaskLinkStyle: function computeTaskLinkStyle() {
|
|
12395
|
+
var $xeGantt = this;
|
|
12396
|
+
if ($xeGantt.handleUpdateTaskLinkData) {
|
|
12397
|
+
$xeGantt.handleUpdateTaskLinkData();
|
|
12398
|
+
}
|
|
12357
12399
|
}
|
|
12358
12400
|
},
|
|
12359
12401
|
methods: _objectSpread2(_objectSpread2({}, tableMethods), {}, {
|
|
@@ -13707,6 +13749,7 @@ function gantt_createInternalData() {
|
|
|
13707
13749
|
},
|
|
13708
13750
|
handleTaskCellClickEvent: function handleTaskCellClickEvent(evnt, params) {
|
|
13709
13751
|
var $xeGantt = this;
|
|
13752
|
+
var reactData = $xeGantt.reactData;
|
|
13710
13753
|
var $xeTable = $xeGantt.$refs.refTable;
|
|
13711
13754
|
if ($xeTable) {
|
|
13712
13755
|
var _tableProps = $xeTable;
|
|
@@ -13735,6 +13778,9 @@ function gantt_createInternalData() {
|
|
|
13735
13778
|
$xeTable.handleToggleCheckRowEvent(evnt, params);
|
|
13736
13779
|
}
|
|
13737
13780
|
}
|
|
13781
|
+
reactData.isActiveCeLe = false;
|
|
13782
|
+
reactData.activeBarRowid = null;
|
|
13783
|
+
reactData.activeLink = null;
|
|
13738
13784
|
$xeGantt.dispatchEvent('task-cell-click', params, evnt);
|
|
13739
13785
|
},
|
|
13740
13786
|
handleTaskCellDblclickEvent: function handleTaskCellDblclickEvent(evnt, params) {
|
|
@@ -13743,6 +13789,14 @@ function gantt_createInternalData() {
|
|
|
13743
13789
|
},
|
|
13744
13790
|
handleTaskBarClickEvent: function handleTaskBarClickEvent(evnt, params) {
|
|
13745
13791
|
var $xeGantt = this;
|
|
13792
|
+
var reactData = $xeGantt.reactData;
|
|
13793
|
+
var $xeTable = $xeGantt.$refs.refTable;
|
|
13794
|
+
var taskBarOpts = $xeGantt.computeTaskBarOpts;
|
|
13795
|
+
var linkCreatable = taskBarOpts.linkCreatable;
|
|
13796
|
+
var row = params.row;
|
|
13797
|
+
reactData.isActiveCeLe = !!linkCreatable;
|
|
13798
|
+
reactData.activeBarRowid = $xeTable ? $xeTable.getRowid(row) : row;
|
|
13799
|
+
reactData.activeLink = null;
|
|
13746
13800
|
$xeGantt.dispatchEvent('task-bar-click', params, evnt);
|
|
13747
13801
|
},
|
|
13748
13802
|
handleTaskBarDblclickEvent: function handleTaskBarDblclickEvent(evnt, params) {
|
|
@@ -13753,9 +13807,14 @@ function gantt_createInternalData() {
|
|
|
13753
13807
|
var $xeGantt = this;
|
|
13754
13808
|
var reactData = $xeGantt.reactData;
|
|
13755
13809
|
var internalData = $xeGantt.internalData;
|
|
13756
|
-
var barTipStore = reactData.barTipStore
|
|
13757
|
-
|
|
13758
|
-
|
|
13810
|
+
var barTipStore = reactData.barTipStore,
|
|
13811
|
+
activeLink = reactData.activeLink;
|
|
13812
|
+
var dragBarRow = internalData.dragBarRow,
|
|
13813
|
+
dragLineRow = internalData.dragLineRow;
|
|
13814
|
+
if (dragBarRow || dragLineRow) {
|
|
13815
|
+
return;
|
|
13816
|
+
}
|
|
13817
|
+
if (activeLink) {
|
|
13759
13818
|
return;
|
|
13760
13819
|
}
|
|
13761
13820
|
var taskBarTooltipOpts = $xeGantt.computeTaskBarTooltipOpts;
|
|
@@ -13826,25 +13885,6 @@ function gantt_createInternalData() {
|
|
|
13826
13885
|
var linkList = reactData.linkList;
|
|
13827
13886
|
reactData.tableLinks = linkList.slice(0);
|
|
13828
13887
|
},
|
|
13829
|
-
handleTaskAddLink: handleTaskAddLink,
|
|
13830
|
-
handleTaskUpdateLinks: function handleTaskUpdateLinks(links) {
|
|
13831
|
-
var $xeGantt = this;
|
|
13832
|
-
var reactData = $xeGantt.reactData;
|
|
13833
|
-
var internalData = $xeGantt.internalData;
|
|
13834
|
-
var linkConfs = [];
|
|
13835
|
-
var fromConfMaps = {};
|
|
13836
|
-
var fromKeyMaps = {};
|
|
13837
|
-
var uniqueMaps = {};
|
|
13838
|
-
external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().each(links || [], function (item) {
|
|
13839
|
-
handleTaskAddLink(item, linkConfs, fromConfMaps, fromKeyMaps, uniqueMaps);
|
|
13840
|
-
});
|
|
13841
|
-
reactData.linkList = linkConfs;
|
|
13842
|
-
internalData.linkFromConfMaps = fromConfMaps;
|
|
13843
|
-
internalData.linkFromKeyMaps = fromKeyMaps;
|
|
13844
|
-
internalData.linkUniqueMaps = uniqueMaps;
|
|
13845
|
-
$xeGantt.handleTableLinks();
|
|
13846
|
-
return $xeGantt.$nextTick();
|
|
13847
|
-
},
|
|
13848
13888
|
handleTaskHeaderContextmenuEvent: function handleTaskHeaderContextmenuEvent(evnt, params) {
|
|
13849
13889
|
var $xeGantt = this;
|
|
13850
13890
|
var $xeTable = $xeGantt.$refs.refTable;
|
|
@@ -14397,7 +14437,7 @@ function gantt_createInternalData() {
|
|
|
14397
14437
|
if (props.expandConfig) {
|
|
14398
14438
|
warnLog('vxe.error.notProp', ['expand-config']);
|
|
14399
14439
|
}
|
|
14400
|
-
if (!$xeGantt.
|
|
14440
|
+
if (!$xeGantt.handleUpdateTaskLinkData) {
|
|
14401
14441
|
if (props.taskLinkConfig) {
|
|
14402
14442
|
warnLog('vxe.error.notProp', ['task-link-config']);
|
|
14403
14443
|
}
|
|
@@ -14431,8 +14471,10 @@ function gantt_createInternalData() {
|
|
|
14431
14471
|
}
|
|
14432
14472
|
}
|
|
14433
14473
|
});
|
|
14434
|
-
if (
|
|
14435
|
-
|
|
14474
|
+
if ($xeGantt.handleTaskLoadLinks) {
|
|
14475
|
+
if (props.links) {
|
|
14476
|
+
$xeGantt.handleTaskLoadLinks(props.links);
|
|
14477
|
+
}
|
|
14436
14478
|
}
|
|
14437
14479
|
$xeGantt.handleTaskScaleConfig();
|
|
14438
14480
|
$xeGantt.initPages();
|
|
@@ -14449,6 +14491,11 @@ function gantt_createInternalData() {
|
|
|
14449
14491
|
$xeGantt.initGanttView();
|
|
14450
14492
|
gantt_globalEvents.on($xeGantt, 'keydown', $xeGantt.handleGlobalKeydownEvent);
|
|
14451
14493
|
},
|
|
14494
|
+
beforeDestroy: function beforeDestroy() {
|
|
14495
|
+
var $xeGantt = this;
|
|
14496
|
+
var reactData = $xeGantt.reactData;
|
|
14497
|
+
external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().assign(reactData, createReactData());
|
|
14498
|
+
},
|
|
14452
14499
|
destroyed: function destroyed() {
|
|
14453
14500
|
var $xeGantt = this;
|
|
14454
14501
|
var internalData = $xeGantt.internalData;
|