vxe-gantt 3.2.5 → 3.2.8

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.
Files changed (48) hide show
  1. package/es/gantt/src/gantt-chart.js +94 -14
  2. package/es/gantt/src/gantt-view.js +91 -8
  3. package/es/gantt/src/gantt.js +13 -4
  4. package/es/gantt/src/static.js +6 -2
  5. package/es/gantt/src/util.js +8 -4
  6. package/es/gantt/style.css +34 -6
  7. package/es/gantt/style.min.css +1 -1
  8. package/es/style.css +1 -1
  9. package/es/style.min.css +1 -1
  10. package/es/ui/index.js +4 -1
  11. package/es/ui/src/log.js +1 -1
  12. package/es/ui/src/utils.js +3 -0
  13. package/es/vxe-gantt/style.css +34 -6
  14. package/es/vxe-gantt/style.min.css +1 -1
  15. package/lib/gantt/src/gantt-chart.js +78 -12
  16. package/lib/gantt/src/gantt-chart.min.js +1 -1
  17. package/lib/gantt/src/gantt-view.js +92 -7
  18. package/lib/gantt/src/gantt-view.min.js +1 -1
  19. package/lib/gantt/src/gantt.js +14 -2
  20. package/lib/gantt/src/gantt.min.js +1 -1
  21. package/lib/gantt/src/static.js +6 -2
  22. package/lib/gantt/src/static.min.js +1 -1
  23. package/lib/gantt/src/util.js +10 -5
  24. package/lib/gantt/src/util.min.js +1 -1
  25. package/lib/gantt/style/style.css +34 -6
  26. package/lib/gantt/style/style.min.css +1 -1
  27. package/lib/index.umd.js +208 -29
  28. package/lib/index.umd.min.js +1 -1
  29. package/lib/style.css +1 -1
  30. package/lib/style.min.css +1 -1
  31. package/lib/ui/index.js +4 -1
  32. package/lib/ui/index.min.js +1 -1
  33. package/lib/ui/src/log.js +1 -1
  34. package/lib/ui/src/log.min.js +1 -1
  35. package/lib/ui/src/utils.js +4 -0
  36. package/lib/ui/src/utils.min.js +1 -1
  37. package/lib/vxe-gantt/style/style.css +34 -6
  38. package/lib/vxe-gantt/style/style.min.css +1 -1
  39. package/package.json +2 -2
  40. package/packages/gantt/src/gantt-chart.ts +100 -14
  41. package/packages/gantt/src/gantt-view.ts +90 -8
  42. package/packages/gantt/src/gantt.ts +14 -3
  43. package/packages/gantt/src/static.ts +7 -3
  44. package/packages/gantt/src/util.ts +11 -7
  45. package/packages/ui/index.ts +3 -0
  46. package/packages/ui/src/utils.ts +4 -0
  47. package/styles/components/gantt-module/gantt-chart.scss +35 -4
  48. 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.2.5";
8289
+ core_.VxeUI.ganttVersion = "3.2.8";
8290
8290
  var ymdFormat = 'yyyy-MM-dd';
8291
8291
  var ymdhmsFormat = 'yyyy-MM-dd HH:mm:ss';
8292
8292
  setConfig({
@@ -8377,6 +8377,9 @@ setConfig({
8377
8377
  resize: true,
8378
8378
  showCollapseTableButton: true,
8379
8379
  showCollapseTaskButton: true
8380
+ },
8381
+ taskBarSubviewConfig: {
8382
+ // showOverview: false
8380
8383
  }
8381
8384
  }
8382
8385
  });
@@ -8400,7 +8403,7 @@ var es_array_concat = __webpack_require__(8706);
8400
8403
  ;// ./packages/ui/src/log.ts
8401
8404
 
8402
8405
  var log = core_.VxeUI.log;
8403
- var version = "gantt v".concat("3.2.5");
8406
+ var version = "gantt v".concat("3.2.8");
8404
8407
  var warnLog = log.create('warn', version);
8405
8408
  var errLog = log.create('error', version);
8406
8409
  ;// ./packages/ui/src/depend.ts
@@ -8862,6 +8865,9 @@ var getConfig = core_.VxeUI.getConfig;
8862
8865
  function isEnableConf(conf) {
8863
8866
  return conf && conf.enabled !== false;
8864
8867
  }
8868
+ function hasEnableConf(conf, opts) {
8869
+ return opts && (conf ? opts.enabled !== false : opts.enabled);
8870
+ }
8865
8871
  function isEmptyValue(cellValue) {
8866
8872
  return cellValue === null || cellValue === undefined || cellValue === '';
8867
8873
  }
@@ -9151,15 +9157,19 @@ function getTaskBarLeft(chartRest, viewCellWidth) {
9151
9157
  return chartRest ? viewCellWidth * chartRest.oLeftSize : 0;
9152
9158
  }
9153
9159
  function getTaskBarWidth(chartRest, viewCellWidth) {
9154
- return Math.max(1, chartRest ? Math.floor(viewCellWidth * chartRest.oWidthSize) - 1 : 0);
9160
+ return chartRest && chartRest.oWidthSize ? Math.max(1, chartRest ? Math.floor(viewCellWidth * chartRest.oWidthSize) - 1 : 0) : 0;
9155
9161
  }
9156
9162
  var taskTypeMaps = {
9157
- milestone: true
9163
+ milestone: true,
9164
+ subview: true
9158
9165
  };
9159
9166
  function hasMilestoneTask(type) {
9160
- return taskTypeMaps[type];
9167
+ return type === 'milestone';
9168
+ }
9169
+ function hasSubviewTask(type) {
9170
+ return type === 'subview';
9161
9171
  }
9162
- function gettaskType(type) {
9172
+ function getTaskType(type) {
9163
9173
  return taskTypeMaps[type] ? type : 'default';
9164
9174
  }
9165
9175
  ;// ./packages/gantt/src/gantt-header.ts
@@ -9339,6 +9349,8 @@ var viewType = 'header';
9339
9349
 
9340
9350
 
9341
9351
 
9352
+
9353
+
9342
9354
  var getIcon = core_.VxeUI.getIcon,
9343
9355
  renderEmptyElement = core_.VxeUI.renderEmptyElement;
9344
9356
  var gantt_chart_sourceType = 'gantt';
@@ -9362,7 +9374,7 @@ var gantt_chart_viewType = 'chart';
9362
9374
  //
9363
9375
  // Render
9364
9376
  //
9365
- renderTaskBar: function renderTaskBar(h, $xeTable, row, rowid, rowIndex, $rowIndex, _rowIndex) {
9377
+ renderTaskBar: function renderTaskBar(h, $xeTable, row, rowid, rowIndex, $rowIndex, _rowIndex, rowChildren, isExpandTree) {
9366
9378
  var _vm = this;
9367
9379
  var $xeGantt = _vm.$xeGantt;
9368
9380
  var tableReactData = $xeTable;
@@ -9379,7 +9391,8 @@ var gantt_chart_viewType = 'chart';
9379
9391
  var ganttInternalData = $xeGantt.internalData;
9380
9392
  var ganttSlots = $xeGantt.$scopedSlots;
9381
9393
  var taskBarSlot = ganttSlots.taskBar || ganttSlots['task-bar'];
9382
- var taskBarMilestoneConfig = ganttProps.taskBarMilestoneConfig;
9394
+ var taskBarMilestoneConfig = ganttProps.taskBarMilestoneConfig,
9395
+ taskBarSubviewConfig = ganttProps.taskBarSubviewConfig;
9383
9396
  var activeLink = ganttReactData.activeLink,
9384
9397
  activeBarRowid = ganttReactData.activeBarRowid;
9385
9398
  var titleField = $xeGantt.computeTitleField;
@@ -9387,6 +9400,7 @@ var gantt_chart_viewType = 'chart';
9387
9400
  var typeField = $xeGantt.computeTypeField;
9388
9401
  var taskBarOpts = $xeGantt.computeTaskBarOpts;
9389
9402
  var taskBarMilestoneOpts = $xeGantt.computeTaskBarMilestoneOpts;
9403
+ var taskBarSubviewOpts = $xeGantt.computeTaskBarSubviewOpts;
9390
9404
  var scaleUnit = $xeGantt.computeScaleUnit;
9391
9405
  var barParams = {
9392
9406
  $gantt: $xeGantt,
@@ -9406,8 +9420,9 @@ var gantt_chart_viewType = 'chart';
9406
9420
  var cellHeight = resizeHeightFlag ? getCellRestHeight(rowRest, cellOpts, rowOpts, defaultRowHeight) : 0;
9407
9421
  var title = getStringValue(external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().get(row, titleField));
9408
9422
  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;
9409
- var typeValue = gettaskType(external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().get(row, typeField));
9410
- var isMilestone = !!(taskBarMilestoneConfig && hasMilestoneTask(typeValue));
9423
+ var renderTaskType = getTaskType(external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().get(row, typeField));
9424
+ var isMilestone = !!(hasEnableConf(taskBarMilestoneConfig, taskBarMilestoneOpts) && hasMilestoneTask(renderTaskType));
9425
+ var isSubview = !!(hasEnableConf(taskBarSubviewConfig, taskBarSubviewOpts) && hasSubviewTask(renderTaskType));
9411
9426
  var vbStyle = {};
9412
9427
  var vpStyle = {
9413
9428
  width: "".concat(progressValue || 0, "%")
@@ -9479,7 +9494,72 @@ var gantt_chart_viewType = 'chart';
9479
9494
  on: ctOns
9480
9495
  }, $xeGantt.callSlot(taskBarSlot, barParams, h)));
9481
9496
  } else {
9482
- if (isMilestone) {
9497
+ if (isSubview && rowChildren && rowChildren.length) {
9498
+ if (isExpandTree) {
9499
+ if (taskBarSubviewOpts.showOverview) {
9500
+ cbVNs.push(h('div', {
9501
+ key: 'vcso',
9502
+ class: ['vxe-gantt-view--chart-subview-wrapper is--overview', {
9503
+ 'is--round': round,
9504
+ 'is--move': moveable
9505
+ }]
9506
+ }, [h('div', {
9507
+ key: rowid,
9508
+ attrs: {
9509
+ rowid: rowid
9510
+ },
9511
+ class: 'vxe-gantt-view--chart-subview-bar'
9512
+ }, [h('div', {
9513
+ class: 'vxe-gantt-view--chart-subview-bar-content-wrapper'
9514
+ }, [showContent ? h('div', {
9515
+ class: 'vxe-gantt-view--chart-content'
9516
+ }, title) : renderEmptyElement($xeGantt)])])]));
9517
+ }
9518
+ } else {
9519
+ cbVNs.push(h('div', {
9520
+ key: 'vcsc',
9521
+ class: ['vxe-gantt-view--chart-subview-wrapper is--inline', {
9522
+ 'is--round': round,
9523
+ 'is--move': moveable
9524
+ }]
9525
+ }, rowChildren.map(function (childRow) {
9526
+ var childRowid = $xeTable.getRowid(childRow);
9527
+ var childTitle = getStringValue(external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().get(childRow, titleField));
9528
+ var childProgressValue = 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(childRow, progressField)))) : 0;
9529
+ var childRenderTaskType = getTaskType(external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().get(childRow, typeField));
9530
+ var vpcStyle = {
9531
+ width: "".concat(childProgressValue || 0, "%")
9532
+ };
9533
+ if (isBarRowStyle) {
9534
+ var _completedBgColor = barStyObj.completedBgColor;
9535
+ if (_completedBgColor) {
9536
+ vpcStyle.backgroundColor = _completedBgColor;
9537
+ }
9538
+ }
9539
+ if (contentMethod) {
9540
+ childTitle = getStringValue(contentMethod({
9541
+ row: childRow,
9542
+ title: childTitle,
9543
+ scaleType: scaleUnit
9544
+ }));
9545
+ }
9546
+ return h('div', {
9547
+ key: childRowid,
9548
+ attrs: {
9549
+ rowid: childRowid
9550
+ },
9551
+ class: ['vxe-gantt-view--chart-subview-bar', "is--".concat(childRenderTaskType)]
9552
+ }, [h('div', {
9553
+ class: 'vxe-gantt-view--chart-subview-bar-content-wrapper'
9554
+ }, [showProgress ? h('div', {
9555
+ class: 'vxe-gantt-view--chart-progress',
9556
+ style: vpcStyle
9557
+ }) : renderEmptyElement($xeGantt), showContent ? h('div', {
9558
+ class: 'vxe-gantt-view--chart-content'
9559
+ }, childTitle) : renderEmptyElement($xeGantt)])]);
9560
+ })));
9561
+ }
9562
+ } else if (isMilestone) {
9483
9563
  var icon = taskBarMilestoneOpts.icon,
9484
9564
  iconStatus = taskBarMilestoneOpts.iconStatus,
9485
9565
  iconStyle = taskBarMilestoneOpts.iconStyle;
@@ -9505,11 +9585,9 @@ var gantt_chart_viewType = 'chart';
9505
9585
  class: 'vxe-gantt-view--chart-bar-content-wrapper',
9506
9586
  on: ctOns
9507
9587
  }, [showProgress ? h('div', {
9508
- key: 'vcp',
9509
9588
  class: 'vxe-gantt-view--chart-progress',
9510
9589
  style: vpStyle
9511
9590
  }) : renderEmptyElement($xeGantt), showContent ? h('div', {
9512
- key: 'vcc',
9513
9591
  class: 'vxe-gantt-view--chart-content'
9514
9592
  }, title) : renderEmptyElement($xeGantt)]));
9515
9593
  }
@@ -9519,7 +9597,7 @@ var gantt_chart_viewType = 'chart';
9519
9597
  attrs: {
9520
9598
  rowid: rowid
9521
9599
  },
9522
- class: ['vxe-gantt-view--chart-row', "is--".concat(gettaskType(typeValue)), {
9600
+ class: ['vxe-gantt-view--chart-row', "is--".concat(renderTaskType), {
9523
9601
  'row--pending': !!pendingRowFlag && !!pendingRowMaps[rowid],
9524
9602
  'is--round': round,
9525
9603
  'is--move': moveable
@@ -9533,7 +9611,7 @@ var gantt_chart_viewType = 'chart';
9533
9611
  }
9534
9612
  }
9535
9613
  }, [h('div', {
9536
- class: [taskBarSlot ? 'vxe-gantt-view--chart-custom-bar' : 'vxe-gantt-view--chart-bar', "is--".concat(gettaskType(typeValue)), {
9614
+ class: [taskBarSlot ? 'vxe-gantt-view--chart-custom-bar' : 'vxe-gantt-view--chart-bar', "is--".concat(renderTaskType), {
9537
9615
  'is--active': activeBarRowid === rowid,
9538
9616
  'active--link': activeLink && (rowid === "".concat(activeLink.from) || rowid === "".concat(activeLink.to))
9539
9617
  }],
@@ -9581,15 +9659,15 @@ var gantt_chart_viewType = 'chart';
9581
9659
  rowIndex = rowRest.index;
9582
9660
  _rowIndex = rowRest._index;
9583
9661
  }
9584
- trVNs.push(_vm.renderTaskBar(h, $xeTable, row, rowid, rowIndex, $rowIndex, _rowIndex));
9585
9662
  var isExpandTree = false;
9586
9663
  var rowChildren = [];
9587
- if (treeConfig && !scrollYLoad && !transform) {
9664
+ if (treeConfig) {
9588
9665
  rowChildren = row[childrenField];
9589
9666
  isExpandTree = !!treeExpandedFlag && rowChildren && rowChildren.length > 0 && !!treeExpandedMaps[rowid];
9590
9667
  }
9668
+ trVNs.push(_vm.renderTaskBar(h, $xeTable, row, rowid, rowIndex, $rowIndex, _rowIndex, rowChildren, isExpandTree));
9591
9669
  // 如果是树形表格
9592
- if (isExpandTree) {
9670
+ if (treeConfig && isExpandTree && !scrollYLoad && !transform) {
9593
9671
  trVNs.push.apply(trVNs, _toConsumableArray(_vm.renderTaskRows(h, $xeTable, rowChildren)));
9594
9672
  }
9595
9673
  });
@@ -10655,14 +10733,23 @@ function handleParseColumn($xeGanttView) {
10655
10733
  var rowid = $xeTable.getRowid(row);
10656
10734
  var startValue = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().get(row, startField);
10657
10735
  var endValue = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().get(row, endField);
10658
- var isMilestone = hasMilestoneTask(external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().get(row, typeField));
10736
+ var renderTaskType = getTaskType(external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().get(row, typeField));
10737
+ var isMilestone = hasMilestoneTask(renderTaskType);
10738
+ var isSubview = hasSubviewTask(renderTaskType);
10659
10739
  if (isMilestone) {
10660
10740
  if (!startValue) {
10661
10741
  startValue = endValue;
10662
10742
  }
10663
10743
  endValue = startValue;
10664
10744
  }
10665
- if (startValue && endValue) {
10745
+ if (isSubview) {
10746
+ ctMaps[rowid] = {
10747
+ row: row,
10748
+ rowid: rowid,
10749
+ oLeftSize: 0,
10750
+ oWidthSize: 0
10751
+ };
10752
+ } else if (startValue && endValue) {
10666
10753
  var _renderFn = renderFn(startValue, endValue),
10667
10754
  offsetLeftSize = _renderFn.offsetLeftSize,
10668
10755
  offsetWidthSize = _renderFn.offsetWidthSize;
@@ -10800,7 +10887,35 @@ function calcScrollbar($xeGanttView) {
10800
10887
  reactData.overflowX = overflowX;
10801
10888
  }
10802
10889
  }
10803
- function updateTaskChart($xeGanttView) {
10890
+ function handleSubTaskMinMaxSize($xeGanttView, $xeTable, list) {
10891
+ var $xeGantt = $xeGanttView.$xeGantt;
10892
+ var internalData = $xeGanttView.internalData;
10893
+ var chartMaps = internalData.chartMaps;
10894
+ var treeOpts = $xeTable.computeTreeOpts;
10895
+ var childrenField = treeOpts.children || treeOpts.childrenField;
10896
+ var typeField = $xeGantt.computeTypeField;
10897
+ var minChildLeftSize = 0;
10898
+ var maxChildLeftSize = 0;
10899
+ external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree(list, function (childRow) {
10900
+ var childRowid = $xeTable.getRowid(childRow);
10901
+ var renderTaskType = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().get(childRow, typeField);
10902
+ if (hasSubviewTask(renderTaskType)) {
10903
+ return;
10904
+ }
10905
+ var childChartRest = childRowid ? chartMaps[childRowid] : null;
10906
+ if (childChartRest) {
10907
+ maxChildLeftSize = Math.max(maxChildLeftSize, childChartRest.oLeftSize + childChartRest.oWidthSize);
10908
+ minChildLeftSize = minChildLeftSize ? Math.min(minChildLeftSize, childChartRest.oLeftSize) : childChartRest.oLeftSize;
10909
+ }
10910
+ }, {
10911
+ children: childrenField
10912
+ });
10913
+ return {
10914
+ minSize: minChildLeftSize,
10915
+ maxSize: maxChildLeftSize
10916
+ };
10917
+ }
10918
+ function updateTaskChartStyle($xeGanttView) {
10804
10919
  var $xeGantt = $xeGanttView.$xeGantt;
10805
10920
  var reactData = $xeGanttView.reactData;
10806
10921
  var internalData = $xeGanttView.internalData;
@@ -10812,6 +10927,8 @@ function updateTaskChart($xeGanttView) {
10812
10927
  chartMaps = internalData.chartMaps;
10813
10928
  var chartWrapper = getRefElem(elemStore['main-chart-task-wrapper']);
10814
10929
  if (chartWrapper && $xeTable) {
10930
+ var treeOpts = $xeTable.computeTreeOpts;
10931
+ var childrenField = treeOpts.children || treeOpts.childrenField;
10815
10932
  external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().arrayEach(chartWrapper.children, function (rowEl) {
10816
10933
  var barEl = rowEl.children[0];
10817
10934
  if (!barEl) {
@@ -10822,9 +10939,55 @@ function updateTaskChart($xeGanttView) {
10822
10939
  return;
10823
10940
  }
10824
10941
  var chartRest = rowid ? chartMaps[rowid] : null;
10825
- barEl.style.left = "".concat(getTaskBarLeft(chartRest, viewCellWidth), "px");
10826
- if (!hasClass(barEl, 'is--milestone')) {
10827
- barEl.style.width = "".concat(getTaskBarWidth(chartRest, viewCellWidth), "px");
10942
+ var row = chartRest ? chartRest.row : null;
10943
+ // 子任务视图
10944
+ if (hasClass(barEl, 'is--subview')) {
10945
+ var childWrapperEl = barEl.firstElementChild;
10946
+ if (childWrapperEl) {
10947
+ // 行内展示
10948
+ if (hasClass(childWrapperEl, 'is--inline')) {
10949
+ external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().arrayEach(childWrapperEl.children, function (childEl) {
10950
+ var childBarEl = childEl;
10951
+ var childRowid = childBarEl.getAttribute('rowid') || '';
10952
+ var childChartRest = childRowid ? chartMaps[childRowid] : null;
10953
+ if (childChartRest) {
10954
+ var childRow = childChartRest.row;
10955
+ // 如果是子视图
10956
+ if (hasClass(childBarEl, 'is--subview')) {
10957
+ var subChildren = childRow[childrenField];
10958
+ var _handleSubTaskMinMaxS = handleSubTaskMinMaxSize($xeGanttView, $xeTable, subChildren),
10959
+ minChildLeftSize = _handleSubTaskMinMaxS.minSize,
10960
+ maxChildLeftSize = _handleSubTaskMinMaxS.maxSize;
10961
+ childBarEl.style.left = "".concat(viewCellWidth * minChildLeftSize, "px");
10962
+ childBarEl.style.width = "".concat(viewCellWidth * (maxChildLeftSize - minChildLeftSize), "px");
10963
+ } else {
10964
+ childBarEl.style.left = "".concat(getTaskBarLeft(childChartRest, viewCellWidth), "px");
10965
+ if (!hasClass(childBarEl, 'is--milestone')) {
10966
+ // 里程碑不需要宽度
10967
+ childBarEl.style.width = "".concat(getTaskBarWidth(childChartRest, viewCellWidth), "px");
10968
+ }
10969
+ }
10970
+ }
10971
+ });
10972
+ } else {
10973
+ // 如果展开子任务
10974
+ var childBarEl = childWrapperEl.firstElementChild;
10975
+ if (childBarEl) {
10976
+ var rowChildren = row ? row[childrenField] : [];
10977
+ var _handleSubTaskMinMaxS2 = handleSubTaskMinMaxSize($xeGanttView, $xeTable, rowChildren),
10978
+ minChildLeftSize = _handleSubTaskMinMaxS2.minSize,
10979
+ maxChildLeftSize = _handleSubTaskMinMaxS2.maxSize;
10980
+ childBarEl.style.left = "".concat(viewCellWidth * minChildLeftSize, "px");
10981
+ childBarEl.style.width = "".concat(viewCellWidth * (maxChildLeftSize - minChildLeftSize), "px");
10982
+ }
10983
+ }
10984
+ }
10985
+ } else {
10986
+ barEl.style.left = "".concat(getTaskBarLeft(chartRest, viewCellWidth), "px");
10987
+ // 里程碑不需要宽度
10988
+ if (!hasClass(barEl, 'is--milestone')) {
10989
+ barEl.style.width = "".concat(getTaskBarWidth(chartRest, viewCellWidth), "px");
10990
+ }
10828
10991
  }
10829
10992
  });
10830
10993
  }
@@ -10950,7 +11113,7 @@ function updateStyle($xeGanttView) {
10950
11113
  bodyTableElem.style.width = "".concat(vmTableWidth, "px");
10951
11114
  }
10952
11115
  reactData.scrollXWidth = viewTableWidth;
10953
- return Promise.all([updateTaskChart($xeGanttView), $xeGantt.handleUpdateTaskLinkStyle ? $xeGantt.handleUpdateTaskLinkStyle($xeGanttView) : null]);
11116
+ return Promise.all([updateTaskChartStyle($xeGanttView), $xeGantt.handleUpdateTaskLinkStyle ? $xeGantt.handleUpdateTaskLinkStyle($xeGanttView) : null]);
10954
11117
  }
10955
11118
  function handleRecalculateStyle($xeGanttView) {
10956
11119
  var internalData = $xeGanttView.internalData;
@@ -11989,6 +12152,7 @@ function gantt_createReactData() {
11989
12152
  taskLinkConfig: Object,
11990
12153
  taskBarConfig: Object,
11991
12154
  taskBarMilestoneConfig: Object,
12155
+ taskBarSubviewConfig: Object,
11992
12156
  taskBarTooltipConfig: Object,
11993
12157
  taskSplitConfig: Object,
11994
12158
  taskBarResizeConfig: Object,
@@ -12094,6 +12258,11 @@ function gantt_createReactData() {
12094
12258
  var props = $xeGantt;
12095
12259
  return Object.assign({}, gantt_getConfig().gantt.taskBarMilestoneConfig, props.taskBarMilestoneConfig);
12096
12260
  },
12261
+ computeTaskBarSubviewOpts: function computeTaskBarSubviewOpts() {
12262
+ var $xeGantt = this;
12263
+ var props = $xeGantt;
12264
+ return Object.assign({}, gantt_getConfig().gantt.taskBarSubviewConfig, props.taskBarSubviewConfig);
12265
+ },
12097
12266
  computeTaskBarTooltipOpts: function computeTaskBarTooltipOpts() {
12098
12267
  var $xeGantt = this;
12099
12268
  var props = $xeGantt;
@@ -12190,13 +12359,15 @@ function gantt_createReactData() {
12190
12359
  var props = $xeGantt;
12191
12360
  var reactData = $xeGantt.reactData;
12192
12361
  var height = props.height,
12193
- maxHeight = props.maxHeight;
12362
+ maxHeight = props.maxHeight,
12363
+ taskBarSubviewConfig = props.taskBarSubviewConfig;
12194
12364
  var isZMax = reactData.isZMax,
12195
12365
  tZindex = reactData.tZindex;
12196
12366
  var taskViewOpts = $xeGantt.computeTaskViewOpts;
12197
12367
  var tableStyle = taskViewOpts.tableStyle;
12198
12368
  var taskBarOpts = $xeGantt.computeTaskBarOpts;
12199
12369
  var barStyle = taskBarOpts.barStyle;
12370
+ var taskBarSubviewOpts = $xeGantt.computeTaskBarSubviewOpts;
12200
12371
  var stys = {};
12201
12372
  if (isZMax) {
12202
12373
  stys.zIndex = tZindex;
@@ -12210,13 +12381,17 @@ function gantt_createReactData() {
12210
12381
  }
12211
12382
  if (barStyle && !external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(barStyle)) {
12212
12383
  var bgColor = barStyle.bgColor,
12213
- completedBgColor = barStyle.completedBgColor;
12384
+ completedBgColor = barStyle.completedBgColor,
12385
+ overviewBgColor = barStyle.overviewBgColor;
12214
12386
  if (bgColor) {
12215
12387
  stys['--vxe-ui-gantt-view-task-bar-background-color'] = bgColor;
12216
12388
  }
12217
12389
  if (completedBgColor) {
12218
12390
  stys['--vxe-ui-gantt-view-task-bar-completed-background-color'] = completedBgColor;
12219
12391
  }
12392
+ if (overviewBgColor && hasEnableConf(taskBarSubviewConfig, taskBarSubviewOpts)) {
12393
+ stys['--vxe-ui-gantt-view-task-bar-overview-background-color'] = overviewBgColor;
12394
+ }
12220
12395
  }
12221
12396
  if (tableStyle) {
12222
12397
  var defTbWidth = tableStyle.width;
@@ -14551,14 +14726,18 @@ var VxeGanttDependencyType;
14551
14726
  VxeGanttDependencyType[VxeGanttDependencyType["FinishToFinish"] = 3] = "FinishToFinish";
14552
14727
  })(VxeGanttDependencyType || (VxeGanttDependencyType = {}));
14553
14728
  /**
14554
- * 任务类型
14729
+ * 任务渲染类型
14555
14730
  */
14556
14731
  var VxeGanttTaskType;
14557
14732
  (function (VxeGanttTaskType) {
14558
14733
  /**
14559
- * 里程碑
14734
+ * 里程碑类型,该类型节点不需要结束日期
14560
14735
  */
14561
14736
  VxeGanttTaskType["Milestone"] = "milestone";
14737
+ /**
14738
+ * 子视图类型,该类型会将子任务渲染到一行,无需开始日期和结束日期
14739
+ */
14740
+ VxeGanttTaskType["Subview"] = "subview";
14562
14741
  })(VxeGanttTaskType || (VxeGanttTaskType = {}));
14563
14742
  ;// ./packages/gantt/index.ts
14564
14743