vxe-gantt 3.0.3 → 3.0.5

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 (41) hide show
  1. package/es/gantt/src/gantt-body.js +47 -5
  2. package/es/gantt/src/gantt-header.js +22 -6
  3. package/es/gantt/src/gantt-view.js +230 -87
  4. package/es/gantt/src/gantt.js +64 -2
  5. package/es/gantt/style.css +35 -3
  6. package/es/gantt/style.min.css +1 -1
  7. package/es/style.css +1 -1
  8. package/es/style.min.css +1 -1
  9. package/es/ui/index.js +6 -1
  10. package/es/ui/src/log.js +1 -1
  11. package/es/vxe-gantt/style.css +35 -3
  12. package/es/vxe-gantt/style.min.css +1 -1
  13. package/lib/gantt/src/gantt-body.js +53 -5
  14. package/lib/gantt/src/gantt-body.min.js +1 -1
  15. package/lib/gantt/src/gantt-header.js +29 -6
  16. package/lib/gantt/src/gantt-header.min.js +1 -1
  17. package/lib/gantt/src/gantt-view.js +261 -91
  18. package/lib/gantt/src/gantt-view.min.js +1 -1
  19. package/lib/gantt/src/gantt.js +75 -1
  20. package/lib/gantt/src/gantt.min.js +1 -1
  21. package/lib/gantt/style/style.css +35 -3
  22. package/lib/gantt/style/style.min.css +1 -1
  23. package/lib/index.umd.js +550 -112
  24. package/lib/index.umd.min.js +1 -1
  25. package/lib/style.css +1 -1
  26. package/lib/style.min.css +1 -1
  27. package/lib/ui/index.js +6 -1
  28. package/lib/ui/index.min.js +1 -1
  29. package/lib/ui/src/log.js +1 -1
  30. package/lib/ui/src/log.min.js +1 -1
  31. package/lib/vxe-gantt/style/style.css +35 -3
  32. package/lib/vxe-gantt/style/style.min.css +1 -1
  33. package/package.json +3 -3
  34. package/packages/gantt/src/gantt-body.ts +51 -6
  35. package/packages/gantt/src/gantt-header.ts +23 -7
  36. package/packages/gantt/src/gantt-view.ts +241 -91
  37. package/packages/gantt/src/gantt.ts +73 -1
  38. package/packages/ui/index.ts +5 -0
  39. package/styles/components/gantt-module/gantt-chart.scss +10 -0
  40. package/styles/components/gantt.scss +37 -3
  41. package/styles/theme/base.scss +1 -1
@@ -9,7 +9,7 @@ import GanttViewBodyComponent from './gantt-body'
9
9
  import GanttViewFooterComponent from './gantt-footer'
10
10
 
11
11
  import type { TableReactData, TableInternalData, VxeTableConstructor, VxeTableMethods, VxeTablePrivateMethods } from 'vxe-table'
12
- import type { VxeGanttViewConstructor, GanttViewReactData, VxeGanttPropTypes, VxeGanttDefines, VxeGanttViewPrivateMethods, GanttViewInternalData, VxeGanttConstructor, VxeGanttPrivateMethods } from '../../../types'
12
+ import type { VxeGanttViewConstructor, GanttViewReactData, VxeGanttDefines, VxeGanttViewPrivateMethods, GanttViewInternalData, VxeGanttConstructor, VxeGanttPrivateMethods } from '../../../types'
13
13
 
14
14
  const { globalEvents } = VxeUI
15
15
 
@@ -59,92 +59,251 @@ function handleParseColumn ($xeGanttView: VxeGanttViewConstructor & VxeGanttView
59
59
  const internalData = $xeGanttView.internalData
60
60
 
61
61
  const ganttProps = $xeGantt
62
+ const ganttReactData = $xeGantt.reactData
62
63
  const { treeConfig } = ganttProps
64
+ const { taskScaleList } = ganttReactData
63
65
  const { minViewDate, maxViewDate } = reactData
64
- const taskViewOpts = $xeGantt.computeTaskViewOpts
65
- const fullCols: VxeGanttPropTypes.Column[] = []
66
- const groupCols: VxeGanttPropTypes.Column[][] = []
67
- switch (taskViewOpts.mode) {
68
- case 'year':
69
- break
70
- case 'quarter':
71
- break
72
- case 'month':
73
- break
74
- case 'week':
75
- break
76
- default: {
77
- if (minViewDate && maxViewDate) {
78
- const currTime = minViewDate.getTime()
79
- const diffDayNum = maxViewDate.getTime() - minViewDate.getTime()
80
- const countDayNum = Math.max(6, Math.floor(diffDayNum / 86400000) + 1)
81
- const groupList: VxeGanttDefines.GroupHeaderColumn[] = []
82
- const colList: VxeGanttPropTypes.Column[] = []
83
- const groupMaps: Record<string, VxeGanttDefines.GroupHeaderColumn> = {}
84
- for (let i = 0; i < countDayNum; i++) {
85
- const itemDate = new Date(currTime + (i * 86400000))
86
- const yyyyy = `${itemDate.getFullYear()}-${itemDate.getMonth() + 1}`
87
- const mmDd = `${itemDate.getDate()}`
88
- let groupCol = groupMaps[yyyyy]
89
- const column = {
90
- field: `${yyyyy}-${mmDd}`,
91
- title: mmDd
92
- }
93
- if (groupCol) {
94
- groupCol.children.push(column)
95
- fullCols.push(groupCol)
96
- } else {
97
- groupCol = {
98
- field: yyyyy,
99
- title: yyyyy,
100
- children: [column]
101
- }
102
- groupList.push(groupCol)
103
- fullCols.push(groupCol)
104
- groupMaps[yyyyy] = groupCol
105
- }
106
- colList.push(column)
66
+ const minScale = XEUtils.last(taskScaleList)
67
+ const fullCols: VxeGanttDefines.ViewColumn[] = []
68
+ const groupCols: VxeGanttDefines.HeaderColumn[] = []
69
+ if (minScale && minViewDate && maxViewDate) {
70
+ const minSType = minScale.type
71
+ const weekScale = taskScaleList.find(item => item.type === 'week')
72
+ let gapTime = 1000 * 60 * 60 * 24
73
+ switch (minScale.type) {
74
+ case 'hour':
75
+ gapTime = 1000 * 60 * 60
76
+ break
77
+ case 'minute':
78
+ gapTime = 1000 * 60
79
+ break
80
+ case 'second':
81
+ gapTime = 1000
82
+ break
83
+ default: {
84
+ break
85
+ }
86
+ }
87
+ const currTime = minViewDate.getTime()
88
+ const diffDayNum = maxViewDate.getTime() - minViewDate.getTime()
89
+ const countSize = Math.max(5, Math.floor(diffDayNum / gapTime) + 1)
90
+
91
+ switch (minScale.type) {
92
+ case 'day':
93
+ case 'date':
94
+ if (diffDayNum > (1000 * 60 * 60 * 24 * 366 * 3)) {
95
+ reactData.tableColumn = []
96
+ reactData.headerGroups = []
97
+ return
107
98
  }
108
- groupCols.push(groupList, colList)
109
-
110
- const $xeTable = internalData.xeTable
111
- if ($xeTable) {
112
- const startField = $xeGantt.computeStartField
113
- const endField = $xeGantt.computeEndField
114
- const tableInternalData = $xeTable as unknown as TableInternalData
115
- const { afterFullData, afterTreeFullData } = tableInternalData
116
- const treeOpts = $xeTable.computeTreeOpts
117
- const { transform } = treeOpts
118
- const childrenField = treeOpts.children || treeOpts.childrenField
119
-
120
- const ctMaps: Record<string, VxeGanttDefines.RowCacheItem> = {}
121
- const handleParseRender = (row: any) => {
122
- const rowid = $xeTable.getRowid(row)
123
- const startValue = XEUtils.get(row, startField)
124
- const endValue = XEUtils.get(row, endField)
125
- if (startValue && endValue) {
126
- const startDate = parseStringDate($xeGanttView, startValue)
127
- const endDate = parseStringDate($xeGanttView, endValue)
128
- const oLeftSize = Math.floor((startDate.getTime() - minViewDate.getTime()) / 86400000)
129
- const oWidthSize = Math.floor((endDate.getTime() - startDate.getTime()) / 86400000) + 1
130
- ctMaps[rowid] = {
131
- row,
132
- rowid,
133
- oLeftSize,
134
- oWidthSize
135
- }
136
- }
137
- }
99
+ break
100
+ case 'hour':
101
+ if (diffDayNum > (1000 * 60 * 60 * 24 * 31 * 3)) {
102
+ reactData.tableColumn = []
103
+ reactData.headerGroups = []
104
+ return
105
+ }
106
+ break
107
+ case 'minute':
108
+ if (diffDayNum > (1000 * 60 * 60 * 24 * 3)) {
109
+ reactData.tableColumn = []
110
+ reactData.headerGroups = []
111
+ return
112
+ }
113
+ break
114
+ case 'second':
115
+ if (diffDayNum > (1000 * 60 * 60 * 3)) {
116
+ reactData.tableColumn = []
117
+ reactData.headerGroups = []
118
+ return
119
+ }
120
+ break
121
+ }
122
+
123
+ const renderListMaps: Record<VxeGanttDefines.ColumnScaleType, VxeGanttDefines.ViewColumn[]> = {
124
+ year: [],
125
+ quarter: [],
126
+ month: [],
127
+ week: [],
128
+ day: [],
129
+ date: [],
130
+ hour: [],
131
+ minute: [],
132
+ second: []
133
+ }
134
+
135
+ const tempTypeMaps: Record<VxeGanttDefines.ColumnScaleType, Record<string, VxeGanttDefines.ViewColumn>> = {
136
+ year: {},
137
+ quarter: {},
138
+ month: {},
139
+ week: {},
140
+ day: {},
141
+ date: {},
142
+ hour: {},
143
+ minute: {},
144
+ second: {}
145
+ }
146
+
147
+ const handleData = (type: VxeGanttDefines.ColumnScaleType, colMaps: Record<VxeGanttDefines.ColumnScaleType, VxeGanttDefines.ViewColumn>, minCol: VxeGanttDefines.ViewColumn) => {
148
+ if (minSType === type) {
149
+ return
150
+ }
151
+ const currCol = colMaps[type]
152
+ const currKey = `${currCol.field}`
153
+ let currGpCol = tempTypeMaps[type][currKey]
154
+ if (!currGpCol) {
155
+ currGpCol = currCol
156
+ tempTypeMaps[type][currKey] = currGpCol
157
+ renderListMaps[type].push(currGpCol)
158
+ }
159
+ if (currGpCol) {
160
+ if (!currGpCol.children) {
161
+ currGpCol.children = []
162
+ }
163
+ currGpCol.children.push(minCol)
164
+ }
165
+ }
138
166
 
139
- if (treeConfig) {
140
- XEUtils.eachTree(afterTreeFullData, handleParseRender, { children: transform ? treeOpts.mapChildrenField : childrenField })
141
- } else {
142
- afterFullData.forEach(handleParseRender)
167
+ for (let i = 0; i < countSize; i++) {
168
+ const itemDate = new Date(currTime + (i * gapTime))
169
+ const [yyyy, MM, dd, HH, mm, ss] = XEUtils.toDateString(itemDate, 'yyyy-M-d-H-m-s').split('-')
170
+ const e = itemDate.getDay()
171
+ const E = e + 1
172
+ const q = Math.ceil((itemDate.getMonth() + 1) / 3)
173
+ const W = XEUtils.getYearWeek(itemDate, weekScale ? weekScale.startDay : undefined)
174
+ const dateObj: VxeGanttDefines.ScaleDateObj = { yy: yyyy, M: MM, d: dd, H: HH, m: mm, s: ss, q, W, E, e }
175
+ const colMaps: Record<VxeGanttDefines.ColumnScaleType, VxeGanttDefines.ViewColumn> = {
176
+ year: {
177
+ field: yyyy,
178
+ title: yyyy,
179
+ params: dateObj
180
+ },
181
+ quarter: {
182
+ field: `${yyyy}_q${q}`,
183
+ title: q,
184
+ params: dateObj
185
+ },
186
+ month: {
187
+ field: `${yyyy}_${MM}`,
188
+ title: MM,
189
+ params: dateObj
190
+ },
191
+ week: {
192
+ field: `${yyyy}_W${W}`,
193
+ title: W,
194
+ params: dateObj
195
+ },
196
+ day: {
197
+ field: `${yyyy}_${MM}_${dd}_E${E}`,
198
+ title: E,
199
+ params: dateObj
200
+ },
201
+ date: {
202
+ field: `${yyyy}_${MM}_${dd}`,
203
+ title: dd,
204
+ params: dateObj
205
+ },
206
+ hour: {
207
+ field: `${yyyy}_${MM}_${dd}_${HH}`,
208
+ title: HH,
209
+ params: dateObj
210
+ },
211
+ minute: {
212
+ field: `${yyyy}_${MM}_${dd}_${HH}_${mm}`,
213
+ title: mm,
214
+ params: dateObj
215
+ },
216
+ second: {
217
+ field: `${yyyy}_${MM}_${dd}_${HH}_${mm}_${ss}`,
218
+ title: ss,
219
+ params: dateObj
220
+ }
221
+ }
222
+ const minCol = colMaps[minSType]
223
+ if (minScale.level < 19) {
224
+ handleData('year', colMaps, minCol)
225
+ }
226
+ if (minScale.level < 17) {
227
+ handleData('quarter', colMaps, minCol)
228
+ }
229
+ if (minScale.level < 14) {
230
+ handleData('month', colMaps, minCol)
231
+ }
232
+ if (minScale.level < 13) {
233
+ handleData('week', colMaps, minCol)
234
+ }
235
+ if (minScale.level < 11) {
236
+ handleData('day', colMaps, minCol)
237
+ }
238
+ if (minScale.level < 12) {
239
+ handleData('date', colMaps, minCol)
240
+ }
241
+ if (minScale.level < 7) {
242
+ handleData('hour', colMaps, minCol)
243
+ }
244
+ if (minScale.level < 5) {
245
+ handleData('minute', colMaps, minCol)
246
+ }
247
+
248
+ fullCols.push(minCol)
249
+ }
250
+
251
+ taskScaleList.forEach(scaleItem => {
252
+ if (scaleItem.type === minSType) {
253
+ groupCols.push({
254
+ scaleItem,
255
+ columns: fullCols
256
+ })
257
+ return
258
+ }
259
+ const list = renderListMaps[scaleItem.type] || []
260
+ if (list) {
261
+ list.forEach(item => {
262
+ item.childCount = item.children ? item.children.length : 0
263
+ item.children = undefined
264
+ })
265
+ }
266
+ groupCols.push({
267
+ scaleItem,
268
+ columns: list
269
+ })
270
+ })
271
+
272
+ const $xeTable = internalData.xeTable
273
+ if ($xeTable) {
274
+ const startField = $xeGantt.computeStartField
275
+ const endField = $xeGantt.computeEndField
276
+ const tableInternalData = $xeTable as unknown as TableInternalData
277
+ const { afterFullData, afterTreeFullData } = tableInternalData
278
+ const treeOpts = $xeTable.computeTreeOpts
279
+ const { transform } = treeOpts
280
+ const childrenField = treeOpts.children || treeOpts.childrenField
281
+
282
+ const ctMaps: Record<string, VxeGanttDefines.RowCacheItem> = {}
283
+ const handleParseRender = (row: any) => {
284
+ const rowid = $xeTable.getRowid(row)
285
+ const startValue = XEUtils.get(row, startField)
286
+ const endValue = XEUtils.get(row, endField)
287
+ if (startValue && endValue) {
288
+ const startDate = parseStringDate($xeGanttView, startValue)
289
+ const endDate = parseStringDate($xeGanttView, endValue)
290
+ const oLeftSize = Math.floor((startDate.getTime() - minViewDate.getTime()) / gapTime)
291
+ const oWidthSize = Math.floor((endDate.getTime() - startDate.getTime()) / gapTime) + 1
292
+ ctMaps[rowid] = {
293
+ row,
294
+ rowid,
295
+ oLeftSize,
296
+ oWidthSize
143
297
  }
144
- internalData.chartMaps = ctMaps
145
298
  }
146
299
  }
147
- break
300
+
301
+ if (treeConfig) {
302
+ XEUtils.eachTree(afterTreeFullData, handleParseRender, { children: transform ? treeOpts.mapChildrenField : childrenField })
303
+ } else {
304
+ afterFullData.forEach(handleParseRender)
305
+ }
306
+ internalData.chartMaps = ctMaps
148
307
  }
149
308
  }
150
309
  reactData.tableColumn = fullCols
@@ -599,15 +758,7 @@ export default defineVxeComponent({
599
758
  tableColumn: [],
600
759
  headerGroups: [],
601
760
 
602
- viewCellWidth: 40,
603
-
604
- rowHeightStore: {
605
- large: 52,
606
- default: 48,
607
- medium: 44,
608
- small: 40,
609
- mini: 36
610
- }
761
+ viewCellWidth: 20
611
762
  }
612
763
 
613
764
  const internalData = createInternalData()
@@ -957,11 +1108,10 @@ export default defineVxeComponent({
957
1108
  const reactData = $xeGanttView.reactData
958
1109
 
959
1110
  const { overflowX, overflowY, scrollXLoad, scrollYLoad } = reactData
960
- const taskViewOpts = $xeGantt.computeTaskViewOpts
961
1111
  const scrollbarXToTop = $xeGantt.computeScrollbarXToTop
962
1112
  return h('div', {
963
1113
  ref: 'refElem',
964
- class: ['vxe-gantt-view', `mode--${taskViewOpts.mode || 'day'}`, {
1114
+ class: ['vxe-gantt-view', {
965
1115
  'is--scroll-y': overflowY,
966
1116
  'is--scroll-x': overflowX,
967
1117
  'is--virtual-x': scrollXLoad,
@@ -22,6 +22,22 @@ const propKeys = Object.keys(tableProps) as (keyof VxeTableProps)[]
22
22
 
23
23
  const defaultLayouts: VxeGanttPropTypes.Layouts = [['Form'], ['Toolbar', 'Top', 'Gantt', 'Bottom', 'Pager']]
24
24
 
25
+ const viewTypeLevelMaps = {
26
+ year: 19,
27
+ quarter: 17,
28
+ month: 15,
29
+ week: 13,
30
+ day: 11,
31
+ date: 9,
32
+ hour: 7,
33
+ minute: 5,
34
+ second: 3
35
+ }
36
+
37
+ function getViewTypeLevel (type: VxeGanttDefines.ColumnScaleType) {
38
+ return viewTypeLevelMaps[type || 'date'] || viewTypeLevelMaps.date
39
+ }
40
+
25
41
  function getTableOns ($xeGantt: VxeGanttConstructor) {
26
42
  const _vm = $xeGantt as any
27
43
  const $listeners = _vm.$listeners
@@ -99,6 +115,7 @@ export default /* define-vxe-component start */ defineVxeComponent({
99
115
 
100
116
  layouts: Array as PropType<VxeGanttPropTypes.Layouts>,
101
117
  taskConfig: Object as PropType<VxeGanttPropTypes.TaskConfig>,
118
+ taskViewScaleConfs: Object as PropType<VxeGanttPropTypes.TaskViewScaleConfs>,
102
119
  taskViewConfig: Object as PropType<VxeGanttPropTypes.TaskViewConfig>,
103
120
  taskBarConfig: Object as PropType<VxeGanttPropTypes.TaskBarConfig>,
104
121
  taskSplitConfig: Object as PropType<VxeGanttPropTypes.TaskSplitConfig>,
@@ -134,7 +151,8 @@ export default /* define-vxe-component start */ defineVxeComponent({
134
151
  currentPage: 1
135
152
  },
136
153
  showLeftView: true,
137
- showRightView: true
154
+ showRightView: true,
155
+ taskScaleList: []
138
156
  }
139
157
 
140
158
  const internalData = createInternalData()
@@ -197,6 +215,12 @@ export default /* define-vxe-component start */ defineVxeComponent({
197
215
 
198
216
  return Object.assign({}, getConfig().gantt.taskConfig, props.taskConfig)
199
217
  },
218
+ computeTaskViewScaleMapsOpts () {
219
+ const $xeGantt = this
220
+ const props = $xeGantt
221
+
222
+ return XEUtils.merge({}, getConfig().gantt.taskViewScaleConfs, props.taskViewScaleConfs)
223
+ },
200
224
  computeTaskViewOpts () {
201
225
  const $xeGantt = this
202
226
  const props = $xeGantt
@@ -215,6 +239,13 @@ export default /* define-vxe-component start */ defineVxeComponent({
215
239
 
216
240
  return Object.assign({}, getConfig().gantt.taskSplitConfig, props.taskSplitConfig)
217
241
  },
242
+ computeTaskScaleConfs () {
243
+ const $xeGantt = this
244
+
245
+ const taskViewOpts = $xeGantt.computeTaskViewOpts as VxeGanttPropTypes.TaskViewConfig
246
+ const { scales } = taskViewOpts
247
+ return scales
248
+ },
218
249
  computeTitleField () {
219
250
  const $xeGantt = this
220
251
 
@@ -472,6 +503,11 @@ export default /* define-vxe-component start */ defineVxeComponent({
472
503
  const $xeGantt = this
473
504
 
474
505
  $xeGantt.initProxy()
506
+ },
507
+ computeTaskScaleConfs () {
508
+ const $xeGantt = this
509
+
510
+ $xeGantt.handleTaskScaleConfig()
475
511
  }
476
512
  },
477
513
  methods: {
@@ -481,6 +517,40 @@ export default /* define-vxe-component start */ defineVxeComponent({
481
517
 
482
518
  $xeGantt.$emit(type, createEvent(evnt, { $grid: null, $gantt: $xeGantt }, params))
483
519
  },
520
+ handleTaskScaleConfig () {
521
+ const $xeGantt = this
522
+ const reactData = $xeGantt.reactData
523
+
524
+ const taskScaleConfs = $xeGantt.computeTaskScaleConfs
525
+ const taskViewScaleMapsOpts = $xeGantt.computeTaskViewScaleMapsOpts
526
+ const scaleConfs: VxeGanttDefines.ColumnScaleObj[] = []
527
+ if (taskScaleConfs) {
528
+ const keyMaps: Record<string, boolean> = {}
529
+ taskScaleConfs.forEach(conf => {
530
+ const sConf = !conf || XEUtils.isString(conf) ? { type: conf } : conf
531
+ const { type } = sConf
532
+ if (!type || !viewTypeLevelMaps[type]) {
533
+ errLog('vxe.error.errProp', [`type=${type}`, XEUtils.keys(viewTypeLevelMaps).join(',')])
534
+ return
535
+ }
536
+ if (keyMaps[type]) {
537
+ errLog('vxe.error.repeatProp', ['type', type])
538
+ return
539
+ }
540
+ keyMaps[type] = true
541
+ scaleConfs.push(Object.assign({}, type ? taskViewScaleMapsOpts[type] || {} : {}, sConf, {
542
+ level: getViewTypeLevel(type)
543
+ }))
544
+ })
545
+ }
546
+ if (!scaleConfs.length) {
547
+ scaleConfs.push(
548
+ { type: 'month', level: viewTypeLevelMaps.month },
549
+ { type: 'day', level: viewTypeLevelMaps.day }
550
+ )
551
+ }
552
+ reactData.taskScaleList = XEUtils.orderBy(scaleConfs, { field: 'level', order: 'desc' })
553
+ },
484
554
  initToolbar () {
485
555
  const $xeGantt = this
486
556
 
@@ -1871,6 +1941,7 @@ export default /* define-vxe-component start */ defineVxeComponent({
1871
1941
 
1872
1942
  const tableProps = $xeGantt.computeTableProps
1873
1943
  return h('div', {
1944
+ ref: 'refTableWrapper',
1874
1945
  class: 'vxe-gantt--table-wrapper'
1875
1946
  }, [
1876
1947
  h(VxeTableComponent as Component, {
@@ -2172,6 +2243,7 @@ export default /* define-vxe-component start */ defineVxeComponent({
2172
2243
  }
2173
2244
  })
2174
2245
 
2246
+ $xeGantt.handleTaskScaleConfig()
2175
2247
  $xeGantt.initPages()
2176
2248
  },
2177
2249
  mounted () {
@@ -43,6 +43,11 @@ setConfig({
43
43
  // beforeSave: null,
44
44
  // afterSave: null
45
45
  },
46
+ taskViewScaleConfs: {
47
+ week: {
48
+ startDay: 1
49
+ }
50
+ },
46
51
  taskSplitConfig: {
47
52
  enabled: true,
48
53
  resize: true,
@@ -65,4 +65,14 @@
65
65
  white-space: nowrap;
66
66
  font-size: 0.9em;
67
67
  padding: 0 0.6em;
68
+ }
69
+
70
+ /*行拖拽*/
71
+ .vxe-gantt-view--chart-row {
72
+ &.row--drag-move {
73
+ transition: transform 0.5s ease;
74
+ }
75
+ &.row--drag-origin {
76
+ opacity: 0.3;
77
+ }
68
78
  }
@@ -289,7 +289,7 @@
289
289
  left: 0;
290
290
  width: 100%;
291
291
  height: 100%;
292
- z-index: 13;
292
+ z-index: 3;
293
293
  }
294
294
  .vxe-gantt--view-split-bar-btn-wrapper {
295
295
  display: flex;
@@ -299,7 +299,7 @@
299
299
  left: 50%;
300
300
  top: 50%;
301
301
  transform: translate(-50%, -50%);
302
- z-index: 15;
302
+ z-index: 5;
303
303
  pointer-events: none;
304
304
  & > div {
305
305
  margin-top: 1em;
@@ -339,7 +339,7 @@
339
339
  left: 0;
340
340
  width: 1px;
341
341
  height: 100%;
342
- z-index: 18;
342
+ z-index: 7;
343
343
  pointer-events: none;
344
344
  user-select: none;
345
345
  cursor: col-resize;
@@ -624,6 +624,40 @@
624
624
  }
625
625
  }
626
626
 
627
+ /*行拖拽*/
628
+ .vxe-gantt-view--body-row {
629
+ &.row--drag-move {
630
+ transition: transform 0.5s ease;
631
+ }
632
+ &.row--drag-origin {
633
+ & > .vxe-gantt-view--body-column {
634
+ opacity: 0.3;
635
+ }
636
+ }
637
+ }
638
+ .vxe-gantt-view--body-column {
639
+ .vxe-gantt-view-cell--row-resizable {
640
+ position: absolute;
641
+ left: 0;
642
+ bottom: -0.4em;
643
+ height: 0.8em;
644
+ width: 100%;
645
+ text-align: center;
646
+ z-index: 1;
647
+ cursor: row-resize;
648
+ }
649
+ }
650
+ .vxe-gantt-view--body-row {
651
+ &:last-child {
652
+ .vxe-gantt-view--body-column {
653
+ .vxe-gantt-view-cell--row-resizable {
654
+ height: 0.4em;
655
+ bottom: -0px;
656
+ }
657
+ }
658
+ }
659
+ }
660
+
627
661
  .vxe-gantt {
628
662
  font-size: var(--vxe-ui-font-size-default);
629
663
  &.size--medium {
@@ -1,6 +1,6 @@
1
1
  :root {
2
2
  /*gantt*/
3
- --vxe-ui-gantt-view-default-cell-width: 40px;
3
+ --vxe-ui-gantt-view-default-cell-width: 2.2em;
4
4
  --vxe-ui-gantt-view-chart-bar-height: 1.6em;
5
5
  --vxe-ui-gantt-view-split-bar-width: 10px;
6
6
  --vxe-ui-gantt-view-split-bar-height: 6.8em;