vxe-gantt 3.2.6 → 3.3.0

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.
@@ -35,12 +35,13 @@ export default defineVxeComponent({
35
35
  const cellOpts = $xeTable.computeCellOpts;
36
36
  const rowOpts = $xeTable.computeRowOpts;
37
37
  const defaultRowHeight = $xeTable.computeDefaultRowHeight;
38
+ const treeOpts = $xeTable.computeTreeOpts;
39
+ const childrenField = treeOpts.children || treeOpts.childrenField;
38
40
  const ganttProps = $xeGantt;
39
41
  const ganttReactData = $xeGantt.reactData;
40
- const ganttInternalData = $xeGantt.internalData;
41
42
  const ganttSlots = $xeGantt.$scopedSlots;
42
43
  const taskBarSlot = ganttSlots.taskBar || ganttSlots['task-bar'];
43
- const { taskBarMilestoneConfig, taskBarSubviewConfig } = ganttProps;
44
+ const { treeConfig, taskBarMilestoneConfig, taskBarSubviewConfig } = ganttProps;
44
45
  const { activeLink, activeBarRowid } = ganttReactData;
45
46
  const titleField = $xeGantt.computeTitleField;
46
47
  const progressField = $xeGantt.computeProgressField;
@@ -59,8 +60,6 @@ export default defineVxeComponent({
59
60
  let title = getStringValue(XEUtils.get(row, titleField));
60
61
  const progressValue = showProgress ? Math.min(100, Math.max(0, XEUtils.toNumber(XEUtils.get(row, progressField)))) : 0;
61
62
  const renderTaskType = getTaskType(XEUtils.get(row, typeField));
62
- const isMilestone = !!(hasEnableConf(taskBarMilestoneConfig, taskBarMilestoneOpts) && hasMilestoneTask(renderTaskType));
63
- const isSubview = !!(hasEnableConf(taskBarSubviewConfig, taskBarSubviewOpts) && hasSubviewTask(renderTaskType));
64
63
  const vbStyle = {};
65
64
  const vpStyle = {
66
65
  width: `${progressValue || 0}%`
@@ -74,9 +73,6 @@ export default defineVxeComponent({
74
73
  vpStyle.backgroundColor = completedBgColor;
75
74
  }
76
75
  }
77
- if (contentMethod) {
78
- title = getStringValue(contentMethod({ row, title, scaleType: scaleUnit }));
79
- }
80
76
  const ctParams = {
81
77
  $gantt: $xeGantt,
82
78
  source: sourceType,
@@ -87,162 +83,184 @@ export default defineVxeComponent({
87
83
  rowIndex,
88
84
  _rowIndex
89
85
  };
90
- const ctOns = {};
91
- if (showTooltip) {
92
- ctOns.mouseover = (evnt) => {
93
- const { dragBarRow } = ganttInternalData;
94
- const ttParams = Object.assign({ $event: evnt }, ctParams);
95
- if (!dragBarRow) {
96
- $xeGantt.triggerTaskBarTooltipEvent(evnt, ttParams);
97
- }
98
- $xeGantt.dispatchEvent('task-bar-mouseenter', ttParams, evnt);
99
- };
100
- ctOns.mouseleave = (evnt) => {
101
- const { dragBarRow } = ganttInternalData;
102
- const ttParams = Object.assign({ $event: evnt }, ctParams);
103
- if (!dragBarRow) {
104
- $xeGantt.handleTaskBarTooltipLeaveEvent(evnt, ttParams);
105
- }
106
- $xeGantt.dispatchEvent('task-bar-mouseleave', ttParams, evnt);
107
- };
108
- }
109
86
  let cbVNs = [];
110
87
  if ($xeGantt.renderGanttTaskBarContent) {
111
88
  cbVNs = $xeGantt.renderGanttTaskBarContent(h, ctParams, {
112
- isMilestone,
113
- title,
114
- vbStyle,
115
- vpStyle,
116
- rowid,
117
- ctOns
89
+ $gantt: $xeGantt,
90
+ $table: $xeTable,
91
+ rowid
118
92
  });
119
93
  }
120
- else if (taskBarSlot) {
121
- cbVNs.push(h('div', {
122
- key: 'cbc',
123
- class: 'vxe-gantt-view--chart-custom-bar-content-wrapper',
124
- on: ctOns
125
- }, $xeGantt.callSlot(taskBarSlot, barParams, h)));
126
- }
127
94
  else {
128
- if (isSubview && rowChildren && rowChildren.length) {
129
- if (isExpandTree) {
130
- if (taskBarSubviewOpts.showOverview) {
131
- cbVNs.push(h('div', {
132
- key: 'vcso',
133
- class: ['vxe-gantt-view--chart-subview-wrapper is--overview', {
134
- 'is--round': round,
135
- 'is--move': moveable
136
- }]
137
- }, [
138
- h('div', {
139
- key: rowid,
95
+ const isMilestone = !!(hasEnableConf(taskBarMilestoneConfig, taskBarMilestoneOpts) && hasMilestoneTask(renderTaskType));
96
+ const isSubview = !!(hasEnableConf(taskBarSubviewConfig, taskBarSubviewOpts) && hasSubviewTask(renderTaskType));
97
+ if (contentMethod) {
98
+ title = getStringValue(contentMethod({ row, title, scaleType: scaleUnit }));
99
+ }
100
+ const ctOns = {};
101
+ if (showTooltip) {
102
+ ctOns.mouseover = (evnt) => {
103
+ const ttParams = Object.assign({ $event: evnt }, ctParams);
104
+ $xeGantt.dispatchEvent('task-bar-mouseenter', ttParams, evnt);
105
+ };
106
+ ctOns.mouseleave = (evnt) => {
107
+ const ttParams = Object.assign({ $event: evnt }, ctParams);
108
+ $xeGantt.dispatchEvent('task-bar-mouseleave', ttParams, evnt);
109
+ };
110
+ }
111
+ if (taskBarSlot) {
112
+ cbVNs.push(h('div', {
113
+ key: 'cbc',
114
+ class: 'vxe-gantt-view--chart-custom-bar-content-wrapper',
115
+ on: ctOns
116
+ }, $xeGantt.callSlot(taskBarSlot, barParams, h)));
117
+ }
118
+ else {
119
+ if (isSubview && treeConfig && rowChildren && rowChildren.length) {
120
+ if (isExpandTree) {
121
+ if (taskBarSubviewOpts.showOverview) {
122
+ cbVNs.push(h('div', {
123
+ key: 'vcso',
124
+ class: 'vxe-gantt-view--chart-subview-wrapper is--overview'
125
+ }, [
126
+ h('div', {
127
+ key: rowid,
128
+ attrs: {
129
+ rowid: rowid
130
+ },
131
+ class: ['vxe-gantt-view--chart-subview-row', {
132
+ 'is--progress': showProgress,
133
+ 'is--round': round,
134
+ 'is--move': moveable
135
+ }]
136
+ }, [
137
+ h('div', {
138
+ attrs: {
139
+ rowid: rowid
140
+ },
141
+ class: 'vxe-gantt-view--chart-subview-bar'
142
+ }, [
143
+ h('div', {
144
+ class: 'vxe-gantt-view--chart-subview-bar-content-wrapper'
145
+ }, [
146
+ showContent
147
+ ? h('div', {
148
+ class: 'vxe-gantt-view--chart-content'
149
+ }, title)
150
+ : renderEmptyElement($xeGantt)
151
+ ])
152
+ ])
153
+ ])
154
+ ]));
155
+ }
156
+ }
157
+ else {
158
+ const cbcVNs = [];
159
+ XEUtils.eachTree(rowChildren, childRow => {
160
+ const childRowid = $xeTable.getRowid(childRow);
161
+ let childTitle = getStringValue(XEUtils.get(childRow, titleField));
162
+ const childProgressValue = showProgress ? Math.min(100, Math.max(0, XEUtils.toNumber(XEUtils.get(childRow, progressField)))) : 0;
163
+ const childRenderTaskType = getTaskType(XEUtils.get(childRow, typeField));
164
+ const isChildSubview = !!(hasEnableConf(taskBarSubviewConfig, taskBarSubviewOpts) && hasSubviewTask(childRenderTaskType));
165
+ if (isChildSubview) {
166
+ return;
167
+ }
168
+ const vpcStyle = {
169
+ width: `${childProgressValue || 0}%`
170
+ };
171
+ if (isBarRowStyle) {
172
+ const { completedBgColor } = barStyObj;
173
+ if (completedBgColor) {
174
+ vpcStyle.backgroundColor = completedBgColor;
175
+ }
176
+ }
177
+ if (contentMethod) {
178
+ childTitle = getStringValue(contentMethod({ row: childRow, title: childTitle, scaleType: scaleUnit }));
179
+ }
180
+ cbcVNs.push(h('div', {
181
+ key: childRowid,
140
182
  attrs: {
141
- rowid: rowid
183
+ rowid: childRowid
142
184
  },
143
- class: 'vxe-gantt-view--chart-subview-bar'
185
+ class: ['vxe-gantt-view--chart-subview-row', `is--${childRenderTaskType}`, {
186
+ 'is--progress': showProgress,
187
+ 'is--round': round,
188
+ 'is--move': moveable,
189
+ 'row--pending': !!pendingRowFlag && !!pendingRowMaps[childRowid]
190
+ }]
144
191
  }, [
145
192
  h('div', {
146
- class: 'vxe-gantt-view--chart-subview-bar-content-wrapper'
193
+ attrs: {
194
+ rowid: childRowid
195
+ },
196
+ class: 'vxe-gantt-view--chart-subview-bar'
147
197
  }, [
148
- showContent
149
- ? h('div', {
150
- class: 'vxe-gantt-view--chart-content'
151
- }, title)
152
- : renderEmptyElement($xeGantt)
198
+ h('div', {
199
+ class: 'vxe-gantt-view--chart-subview-bar-content-wrapper'
200
+ }, [
201
+ showProgress
202
+ ? h('div', {
203
+ class: 'vxe-gantt-view--chart-progress',
204
+ style: vpcStyle
205
+ })
206
+ : renderEmptyElement($xeGantt),
207
+ showContent
208
+ ? h('div', {
209
+ class: 'vxe-gantt-view--chart-content'
210
+ }, childTitle)
211
+ : renderEmptyElement($xeGantt)
212
+ ])
153
213
  ])
154
- ])
155
- ]));
214
+ ]));
215
+ }, { children: childrenField });
216
+ cbVNs.push(h('div', {
217
+ key: 'vcsc',
218
+ class: 'vxe-gantt-view--chart-subview-wrappe is--inliner'
219
+ }, cbcVNs));
156
220
  }
157
221
  }
158
- else {
222
+ else if (isMilestone) {
223
+ const { icon, iconStatus, iconStyle } = taskBarMilestoneOpts;
224
+ const tbmParams = { $gantt: $xeGantt, row };
159
225
  cbVNs.push(h('div', {
160
- key: 'vcsc',
161
- class: 'vxe-gantt-view--chart-subview-wrapper is--inline'
162
- }, rowChildren.map(childRow => {
163
- const childRowid = $xeTable.getRowid(childRow);
164
- let childTitle = getStringValue(XEUtils.get(childRow, titleField));
165
- const childProgressValue = showProgress ? Math.min(100, Math.max(0, XEUtils.toNumber(XEUtils.get(childRow, progressField)))) : 0;
166
- const childRenderTaskType = getTaskType(XEUtils.get(childRow, typeField));
167
- const vpcStyle = {
168
- width: `${childProgressValue || 0}%`
169
- };
170
- if (isBarRowStyle) {
171
- const { completedBgColor } = barStyObj;
172
- if (completedBgColor) {
173
- vpcStyle.backgroundColor = completedBgColor;
174
- }
175
- }
176
- if (contentMethod) {
177
- childTitle = getStringValue(contentMethod({ row: childRow, title: childTitle, scaleType: scaleUnit }));
178
- }
179
- return h('div', {
180
- key: childRowid,
181
- attrs: {
182
- rowid: childRowid
183
- },
184
- class: ['vxe-gantt-view--chart-subview-bar', `is--${childRenderTaskType}`]
226
+ key: 'vcm',
227
+ class: 'vxe-gantt-view--chart-milestone-wrapper',
228
+ on: ctOns
229
+ }, [
230
+ h('div', {
231
+ class: ['vxe-gantt-view--chart-milestone-icon', iconStatus ? `theme--${XEUtils.isFunction(iconStatus) ? iconStatus(tbmParams) : iconStatus}` : ''],
232
+ style: iconStyle ? Object.assign({}, XEUtils.isFunction(iconStyle) ? iconStyle(tbmParams) : iconStyle) : undefined
185
233
  }, [
186
- h('div', {
187
- class: 'vxe-gantt-view--chart-subview-bar-content-wrapper'
188
- }, [
189
- showProgress
190
- ? h('div', {
191
- class: 'vxe-gantt-view--chart-progress',
192
- style: vpcStyle
193
- })
194
- : renderEmptyElement($xeGantt),
195
- showContent
196
- ? h('div', {
197
- class: 'vxe-gantt-view--chart-content'
198
- }, childTitle)
199
- : renderEmptyElement($xeGantt)
200
- ])
201
- ]);
202
- })));
234
+ h('i', {
235
+ class: (icon ? (XEUtils.isFunction(icon) ? icon(tbmParams) : icon) : '') || getIcon().GANTT_VIEW_TASK_MILESTONE
236
+ })
237
+ ]),
238
+ showContent
239
+ ? h('div', {
240
+ class: 'vxe-gantt-view--chart-milestone-content'
241
+ }, title)
242
+ : renderEmptyElement($xeGantt)
243
+ ]));
203
244
  }
204
- }
205
- else if (isMilestone) {
206
- const { icon, iconStatus, iconStyle } = taskBarMilestoneOpts;
207
- const tbmParams = { $gantt: $xeGantt, row };
208
- cbVNs.push(h('div', {
209
- key: 'vcm',
210
- class: 'vxe-gantt-view--chart-milestone-wrapper',
211
- on: ctOns
212
- }, [
213
- h('div', {
214
- class: ['vxe-gantt-view--chart-milestone-icon', iconStatus ? `theme--${XEUtils.isFunction(iconStatus) ? iconStatus(tbmParams) : iconStatus}` : ''],
215
- style: iconStyle ? Object.assign({}, XEUtils.isFunction(iconStyle) ? iconStyle(tbmParams) : iconStyle) : undefined
245
+ else {
246
+ cbVNs.push(h('div', {
247
+ key: 'vbc',
248
+ class: 'vxe-gantt-view--chart-bar-content-wrapper',
249
+ on: ctOns
216
250
  }, [
217
- h('i', {
218
- class: (icon ? (XEUtils.isFunction(icon) ? icon(tbmParams) : icon) : '') || getIcon().GANTT_VIEW_TASK_MILESTONE
219
- })
220
- ]),
221
- showContent
222
- ? h('div', {
223
- class: 'vxe-gantt-view--chart-milestone-content'
224
- }, title)
225
- : renderEmptyElement($xeGantt)
226
- ]));
227
- }
228
- else {
229
- cbVNs.push(h('div', {
230
- key: 'vbc',
231
- class: 'vxe-gantt-view--chart-bar-content-wrapper',
232
- on: ctOns
233
- }, [
234
- showProgress
235
- ? h('div', {
236
- class: 'vxe-gantt-view--chart-progress',
237
- style: vpStyle
238
- })
239
- : renderEmptyElement($xeGantt),
240
- showContent
241
- ? h('div', {
242
- class: 'vxe-gantt-view--chart-content'
243
- }, title)
244
- : renderEmptyElement($xeGantt)
245
- ]));
251
+ showProgress
252
+ ? h('div', {
253
+ class: 'vxe-gantt-view--chart-progress',
254
+ style: vpStyle
255
+ })
256
+ : renderEmptyElement($xeGantt),
257
+ showContent
258
+ ? h('div', {
259
+ class: 'vxe-gantt-view--chart-content'
260
+ }, title)
261
+ : renderEmptyElement($xeGantt)
262
+ ]));
263
+ }
246
264
  }
247
265
  }
248
266
  return h('div', {
@@ -251,6 +269,7 @@ export default defineVxeComponent({
251
269
  rowid
252
270
  },
253
271
  class: ['vxe-gantt-view--chart-row', `is--${renderTaskType}`, {
272
+ 'is--progress': showProgress,
254
273
  'row--pending': !!pendingRowFlag && !!pendingRowMaps[rowid],
255
274
  'is--round': round,
256
275
  'is--move': moveable
@@ -670,6 +670,32 @@ function calcScrollbar($xeGanttView) {
670
670
  reactData.overflowX = overflowX;
671
671
  }
672
672
  }
673
+ function handleSubTaskMinMaxSize($xeGanttView, $xeTable, list) {
674
+ const $xeGantt = $xeGanttView.$xeGantt;
675
+ const internalData = $xeGanttView.internalData;
676
+ const { chartMaps } = internalData;
677
+ const treeOpts = $xeTable.computeTreeOpts;
678
+ const childrenField = treeOpts.children || treeOpts.childrenField;
679
+ const typeField = $xeGantt.computeTypeField;
680
+ let minChildLeftSize = 0;
681
+ let maxChildLeftSize = 0;
682
+ XEUtils.eachTree(list, childRow => {
683
+ const childRowid = $xeTable.getRowid(childRow);
684
+ const renderTaskType = XEUtils.get(childRow, typeField);
685
+ if (hasSubviewTask(renderTaskType)) {
686
+ return;
687
+ }
688
+ const childChartRest = childRowid ? chartMaps[childRowid] : null;
689
+ if (childChartRest) {
690
+ maxChildLeftSize = Math.max(maxChildLeftSize, childChartRest.oLeftSize + childChartRest.oWidthSize);
691
+ minChildLeftSize = minChildLeftSize ? Math.min(minChildLeftSize, childChartRest.oLeftSize) : childChartRest.oLeftSize;
692
+ }
693
+ }, { children: childrenField });
694
+ return {
695
+ minSize: minChildLeftSize,
696
+ maxSize: maxChildLeftSize
697
+ };
698
+ }
673
699
  function updateTaskChartStyle($xeGanttView) {
674
700
  const $xeGantt = $xeGanttView.$xeGantt;
675
701
  const reactData = $xeGanttView.reactData;
@@ -681,6 +707,8 @@ function updateTaskChartStyle($xeGanttView) {
681
707
  const { elemStore, chartMaps } = internalData;
682
708
  const chartWrapper = getRefElem(elemStore['main-chart-task-wrapper']);
683
709
  if (chartWrapper && $xeTable) {
710
+ const treeOpts = $xeTable.computeTreeOpts;
711
+ const childrenField = treeOpts.children || treeOpts.childrenField;
684
712
  XEUtils.arrayEach(chartWrapper.children, (rowEl) => {
685
713
  const barEl = rowEl.children[0];
686
714
  if (!barEl) {
@@ -691,20 +719,47 @@ function updateTaskChartStyle($xeGanttView) {
691
719
  return;
692
720
  }
693
721
  const chartRest = rowid ? chartMaps[rowid] : null;
722
+ const row = chartRest ? chartRest.row : null;
694
723
  // 子任务视图
695
724
  if (hasClass(barEl, 'is--subview')) {
696
725
  const childWrapperEl = barEl.firstElementChild;
697
726
  if (childWrapperEl) {
698
- XEUtils.arrayEach(childWrapperEl.children, (childEl) => {
699
- const childBarEl = childEl;
700
- const childRowid = childBarEl.getAttribute('rowid') || '';
701
- const childChartRest = childRowid ? chartMaps[childRowid] : null;
702
- childBarEl.style.left = `${getTaskBarLeft(childChartRest, viewCellWidth)}px`;
703
- // 里程碑不需要宽度
704
- if (!hasClass(childBarEl, 'is--milestone')) {
705
- childBarEl.style.width = `${getTaskBarWidth(childChartRest, viewCellWidth)}px`;
727
+ // 行内展示
728
+ if (hasClass(childWrapperEl, 'is--inline')) {
729
+ XEUtils.arrayEach(childWrapperEl.children, (childRowEl) => {
730
+ const childBarEl = childRowEl.children[0];
731
+ const childRowid = childBarEl.getAttribute('rowid') || '';
732
+ const childChartRest = childRowid ? chartMaps[childRowid] : null;
733
+ if (childChartRest) {
734
+ const childRow = childChartRest.row;
735
+ // 如果是子视图
736
+ if (hasClass(childBarEl, 'is--subview')) {
737
+ const subChildren = childRow[childrenField];
738
+ const { minSize: minChildLeftSize, maxSize: maxChildLeftSize } = handleSubTaskMinMaxSize($xeGanttView, $xeTable, subChildren);
739
+ childBarEl.style.left = `${viewCellWidth * minChildLeftSize}px`;
740
+ childBarEl.style.width = `${viewCellWidth * (maxChildLeftSize - minChildLeftSize)}px`;
741
+ }
742
+ else {
743
+ childBarEl.style.left = `${getTaskBarLeft(childChartRest, viewCellWidth)}px`;
744
+ if (!hasClass(childBarEl, 'is--milestone')) {
745
+ // 里程碑不需要宽度
746
+ childBarEl.style.width = `${getTaskBarWidth(childChartRest, viewCellWidth)}px`;
747
+ }
748
+ }
749
+ }
750
+ });
751
+ }
752
+ else {
753
+ // 如果展开子任务
754
+ const childRowEl = childWrapperEl.children[0];
755
+ const childBarEl = childRowEl ? childRowEl.children[0] : null;
756
+ if (childBarEl) {
757
+ const rowChildren = row ? row[childrenField] : [];
758
+ const { minSize: minChildLeftSize, maxSize: maxChildLeftSize } = handleSubTaskMinMaxSize($xeGanttView, $xeTable, rowChildren);
759
+ childBarEl.style.left = `${viewCellWidth * minChildLeftSize}px`;
760
+ childBarEl.style.width = `${viewCellWidth * (maxChildLeftSize - minChildLeftSize)}px`;
706
761
  }
707
- });
762
+ }
708
763
  }
709
764
  }
710
765
  else {
@@ -6,13 +6,14 @@
6
6
  pointer-events: none;
7
7
  }
8
8
 
9
- .vxe-gantt-view--chart-row {
9
+ .vxe-gantt-view--chart-row,
10
+ .vxe-gantt-view--chart-subview-row {
10
11
  position: relative;
11
12
  width: 100%;
12
13
  height: 0;
13
14
  }
14
- .vxe-gantt-view--chart-row.row--pending .vxe-gantt-view--chart-bar,
15
- .vxe-gantt-view--chart-row.row--pending .vxe-gantt-view--chart-subview-bar {
15
+
16
+ .vxe-gantt-view--chart-row.row--pending .vxe-gantt-view--chart-bar {
16
17
  color: var(--vxe-ui-font-disabled-color);
17
18
  opacity: 0.5;
18
19
  text-decoration: line-through;
@@ -29,16 +30,22 @@
29
30
  border-radius: var(--vxe-ui-gantt-view-task-bar-border-radius);
30
31
  }
31
32
 
32
- .vxe-gantt-view--chart-subview-wrapper.is--round > .vxe-gantt-view--chart-subview-bar {
33
+ .vxe-gantt-view--chart-subview-row.row--pending .vxe-gantt-view--chart-subview-bar {
34
+ color: var(--vxe-ui-font-disabled-color);
35
+ opacity: 0.5;
36
+ text-decoration: line-through;
37
+ }
38
+ .vxe-gantt-view--chart-subview-row.is--round > .vxe-gantt-view--chart-subview-bar {
33
39
  border-radius: var(--vxe-ui-gantt-view-task-bar-border-radius);
34
40
  }
35
- .vxe-gantt-view--chart-subview-wrapper.is--round > .vxe-gantt-view--chart-subview-bar .vxe-gantt-view--chart-subview-bar-content-wrapper {
41
+ .vxe-gantt-view--chart-subview-row.is--round > .vxe-gantt-view--chart-subview-bar .vxe-gantt-view--chart-subview-bar-content-wrapper {
36
42
  border-radius: var(--vxe-ui-gantt-view-task-bar-border-radius);
37
43
  }
38
- .vxe-gantt-view--chart-subview-wrapper.is--round > .vxe-gantt-view--chart-subview-bar:hover::after {
44
+ .vxe-gantt-view--chart-subview-row.is--round > .vxe-gantt-view--chart-subview-bar:hover::after {
39
45
  border-radius: var(--vxe-ui-gantt-view-task-bar-border-radius);
40
46
  }
41
- .vxe-gantt-view--chart-subview-wrapper.is--overview > .vxe-gantt-view--chart-subview-bar {
47
+
48
+ .vxe-gantt-view--chart-subview-wrapper.is--overview > .vxe-gantt-view--chart-subview-row .vxe-gantt-view--chart-subview-bar {
42
49
  color: #ffffff;
43
50
  background-color: var(--vxe-ui-gantt-view-task-bar-overview-background-color);
44
51
  }
@@ -54,12 +61,32 @@
54
61
  transform: translateY(-50%);
55
62
  pointer-events: all;
56
63
  }
57
- .vxe-gantt-view--chart-bar.is--default,
58
- .vxe-gantt-view--chart-subview-bar.is--default,
59
- .vxe-gantt-view--chart-custom-bar.is--default {
64
+
65
+ .vxe-gantt-view--chart-row.is--progress > .vxe-gantt-view--chart-bar.is--default {
60
66
  color: #ffffff;
61
67
  background-color: var(--vxe-ui-gantt-view-task-bar-background-color);
62
68
  }
69
+ .vxe-gantt-view--chart-row:not(.is--progress) > .vxe-gantt-view--chart-bar.is--default {
70
+ color: #ffffff;
71
+ background-color: var(--vxe-ui-gantt-view-task-bar-completed-background-color);
72
+ }
73
+
74
+ .vxe-gantt-view--chart-subview-row.is--progress > .vxe-gantt-view--chart-subview-bar.is--subview {
75
+ color: #ffffff;
76
+ background-color: var(--vxe-ui-gantt-view-task-bar-overview-background-color);
77
+ }
78
+ .vxe-gantt-view--chart-subview-row.is--progress > .vxe-gantt-view--chart-subview-bar.is--default {
79
+ color: #ffffff;
80
+ background-color: var(--vxe-ui-gantt-view-task-bar-background-color);
81
+ }
82
+ .vxe-gantt-view--chart-subview-row:not(.is--progress) > .vxe-gantt-view--chart-subview-bar.is--subview {
83
+ color: #ffffff;
84
+ background-color: var(--vxe-ui-gantt-view-task-bar-overview-background-color);
85
+ }
86
+ .vxe-gantt-view--chart-subview-row:not(.is--progress) > .vxe-gantt-view--chart-subview-bar.is--default {
87
+ color: #ffffff;
88
+ background-color: var(--vxe-ui-gantt-view-task-bar-completed-background-color);
89
+ }
63
90
 
64
91
  .vxe-gantt-view--chart-bar-content-wrapper,
65
92
  .vxe-gantt-view--chart-custom-bar-content-wrapper,
@@ -157,10 +184,12 @@
157
184
  }
158
185
 
159
186
  /*行拖拽*/
160
- .vxe-gantt-view--chart-row.row--drag-move {
187
+ .vxe-gantt-view--chart-row.row--drag-move,
188
+ .vxe-gantt-view--chart-subview-row.row--drag-move {
161
189
  transition: transform 0.5s ease;
162
190
  }
163
- .vxe-gantt-view--chart-row.row--drag-origin {
191
+ .vxe-gantt-view--chart-row.row--drag-origin,
192
+ .vxe-gantt-view--chart-subview-row.row--drag-origin {
164
193
  opacity: 0.3;
165
194
  }
166
195