vxe-gantt 3.9.4 → 3.9.6
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/components.d.ts +2 -1
- package/es/components.js +3 -4
- package/es/gantt/src/gantt-body.js +103 -79
- package/es/gantt/src/gantt-chart.js +376 -252
- package/es/gantt/src/gantt-footer.js +22 -14
- package/es/gantt/src/gantt-header.js +141 -110
- package/es/gantt/src/gantt-view.js +243 -198
- package/es/gantt/src/gantt.js +295 -187
- package/es/index.esm.js +4 -2
- package/es/index.js +4 -2
- package/es/ui/index.d.ts +0 -1
- package/es/ui/index.js +1 -2
- package/es/ui/src/log.js +1 -1
- package/es/ui/src/utils.d.ts +1 -1
- package/lib/components.js +5 -6
- package/lib/gantt/src/gantt-body.js +103 -79
- package/lib/gantt/src/gantt-chart.js +376 -252
- package/lib/gantt/src/gantt-footer.js +22 -14
- package/lib/gantt/src/gantt-header.js +141 -110
- package/lib/gantt/src/gantt-view.js +243 -198
- package/lib/gantt/src/gantt.js +295 -187
- package/lib/index.common.js +4 -2
- package/lib/index.js +4 -2
- package/lib/index.umd.js +1369 -1029
- package/lib/index.umd.min.js +1 -1
- package/lib/ui/index.js +1 -2
- package/lib/ui/src/log.js +1 -1
- package/package.json +7 -7
- package/packages/components.ts +21 -22
- package/packages/gantt/index.ts +32 -32
- package/packages/gantt/src/gantt-body.ts +349 -325
- package/packages/gantt/src/gantt-chart.ts +699 -575
- package/packages/gantt/src/gantt-footer.ts +81 -73
- package/packages/gantt/src/gantt-header.ts +218 -187
- package/packages/gantt/src/gantt-view.ts +2861 -2823
- package/packages/gantt/src/gantt.ts +3308 -3192
- package/packages/gantt/src/static.ts +35 -35
- package/packages/gantt/src/util.ts +35 -35
- package/packages/index.ts +15 -13
- package/packages/ui/index.ts +132 -135
- package/packages/ui/src/comp.ts +3 -3
- package/packages/ui/src/depend.ts +14 -14
- package/packages/ui/src/dom.ts +202 -202
- package/packages/ui/src/log.ts +19 -19
- package/packages/ui/src/utils.ts +68 -68
- package/packages/ui/src/vn.ts +13 -13
- package/types/all.d.ts +29 -29
- package/types/index.d.ts +4 -4
|
@@ -132,260 +132,355 @@ var gantt_chart_default = defineVxeComponent({
|
|
|
132
132
|
if (isExpandTree) {
|
|
133
133
|
if (showOverview) {
|
|
134
134
|
cbVNs.push(
|
|
135
|
-
h(
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
135
|
+
h(
|
|
136
|
+
"div",
|
|
137
|
+
{
|
|
138
|
+
key: "vcso",
|
|
139
|
+
class: "vxe-gantt-view--chart-subview-wrapper is--overview"
|
|
140
|
+
},
|
|
141
|
+
[
|
|
142
|
+
h(
|
|
143
|
+
"div",
|
|
144
|
+
{
|
|
145
|
+
key: rowid,
|
|
146
|
+
attrs: {
|
|
147
|
+
rowid
|
|
148
|
+
},
|
|
149
|
+
class: [
|
|
150
|
+
"vxe-gantt-view--chart-subview-row",
|
|
151
|
+
{
|
|
152
|
+
"is--progress": showProgress,
|
|
153
|
+
"is--round": barRound,
|
|
154
|
+
"is--move": moveable
|
|
155
|
+
}
|
|
156
|
+
]
|
|
153
157
|
},
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
158
|
+
[
|
|
159
|
+
h(
|
|
160
|
+
"div",
|
|
161
|
+
{
|
|
162
|
+
attrs: {
|
|
163
|
+
rowid
|
|
164
|
+
},
|
|
165
|
+
class: [taskBarOverviewSlot ? "vxe-gantt-view--chart-subview-custom-bar" : "vxe-gantt-view--chart-subview-bar", `is--${renderTaskType}`]
|
|
166
|
+
},
|
|
167
|
+
[
|
|
168
|
+
taskBarOverviewSlot ? h(
|
|
169
|
+
"div",
|
|
170
|
+
{
|
|
171
|
+
key: "cbc",
|
|
172
|
+
class: "vxe-gantt-view--chart-subview-custom-bar-content-wrapper"
|
|
173
|
+
},
|
|
174
|
+
$xeGantt.callSlot(taskBarOverviewSlot, barParams, h)
|
|
175
|
+
) : h(
|
|
176
|
+
"div",
|
|
177
|
+
{
|
|
178
|
+
class: "vxe-gantt-view--chart-subview-bar-content-wrapper"
|
|
179
|
+
},
|
|
180
|
+
[
|
|
181
|
+
showContent ? h(
|
|
182
|
+
"div",
|
|
183
|
+
{
|
|
184
|
+
class: "vxe-gantt-view--chart-content"
|
|
185
|
+
},
|
|
186
|
+
title
|
|
187
|
+
) : renderEmptyElement($xeGantt)
|
|
188
|
+
]
|
|
189
|
+
)
|
|
190
|
+
]
|
|
191
|
+
)
|
|
192
|
+
]
|
|
193
|
+
)
|
|
194
|
+
]
|
|
195
|
+
)
|
|
169
196
|
);
|
|
170
197
|
}
|
|
171
198
|
} else {
|
|
172
199
|
const cbcVNs = [];
|
|
173
|
-
XEUtils.eachTree(
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
(barStyle ? isBarRowStyle ? barStyle(childBarParams) : barStyle : {}) || {},
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
if (isChildSubview) {
|
|
201
|
-
return;
|
|
202
|
-
}
|
|
203
|
-
const childVbStyle = {};
|
|
204
|
-
const childVpStyle = {
|
|
205
|
-
width: `${childProgressValue || 0}%`
|
|
206
|
-
};
|
|
207
|
-
if (!isChildMilestone) {
|
|
208
|
-
if (childBgColor) {
|
|
209
|
-
childVbStyle["--vxe-ui-gantt-view-task-bar-background-color"] = childBgColor;
|
|
200
|
+
XEUtils.eachTree(
|
|
201
|
+
rowChildren,
|
|
202
|
+
(childRow) => {
|
|
203
|
+
const childBarParams = {
|
|
204
|
+
$gantt: $xeGantt,
|
|
205
|
+
source: sourceType,
|
|
206
|
+
type: viewType,
|
|
207
|
+
scaleType: scaleUnit,
|
|
208
|
+
row: childRow,
|
|
209
|
+
$rowIndex: $xeTable.getRowIndex(childRow),
|
|
210
|
+
rowIndex: $xeTable.getVMRowIndex(childRow),
|
|
211
|
+
_rowIndex: $xeTable.getVTRowIndex(childRow)
|
|
212
|
+
};
|
|
213
|
+
const isChildBarRowStyle = XEUtils.isFunction(subBarStyle);
|
|
214
|
+
const childBarStyObj = XEUtils.assign({}, (barStyle ? isBarRowStyle ? barStyle(childBarParams) : barStyle : {}) || {}, (subBarStyle ? isChildBarRowStyle ? subBarStyle(childBarParams) : subBarStyle : {}) || {});
|
|
215
|
+
const childRound = childBarStyObj.round;
|
|
216
|
+
const childBgColor = childBarStyObj.bgColor;
|
|
217
|
+
const childCompletedBgColor = childBarStyObj.completedBgColor;
|
|
218
|
+
const childBarHtmlStyle = childBarStyObj.style;
|
|
219
|
+
const childRowid = $xeTable.getRowid(childRow);
|
|
220
|
+
let childTitle = getStringValue(XEUtils.get(childRow, titleField));
|
|
221
|
+
const childProgressValue = showProgress ? Math.min(100, Math.max(0, XEUtils.toNumber(XEUtils.get(childRow, progressField)))) : 0;
|
|
222
|
+
const childRenderTaskType = getTaskType(XEUtils.get(childRow, typeField));
|
|
223
|
+
const isChildMilestone = !!(hasEnableConf(taskBarMilestoneConfig, taskBarMilestoneOpts) && hasMilestoneTask(childRenderTaskType));
|
|
224
|
+
const isChildSubview = !!(hasEnableConf(taskBarSubviewConfig, taskBarSubviewOpts) && hasSubviewTask(childRenderTaskType));
|
|
225
|
+
if (isChildSubview) {
|
|
226
|
+
return;
|
|
210
227
|
}
|
|
211
|
-
|
|
212
|
-
|
|
228
|
+
const childVbStyle = {};
|
|
229
|
+
const childVpStyle = {
|
|
230
|
+
width: `${childProgressValue || 0}%`
|
|
231
|
+
};
|
|
232
|
+
if (!isChildMilestone) {
|
|
233
|
+
if (childBgColor) {
|
|
234
|
+
childVbStyle["--vxe-ui-gantt-view-task-bar-background-color"] = childBgColor;
|
|
235
|
+
}
|
|
236
|
+
if (childCompletedBgColor) {
|
|
237
|
+
childVpStyle["--vxe-ui-gantt-view-task-bar-completed-background-color"] = childCompletedBgColor;
|
|
238
|
+
}
|
|
213
239
|
}
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
class: ["vxe-gantt-view--chart-subview-row", `is--${childRenderTaskType}`, {
|
|
232
|
-
"is--progress": showProgress,
|
|
233
|
-
"is--critical": showCriticalPath && criticalPathFlag && criticalRowMaps.has(childRowid),
|
|
234
|
-
"is--round": childRound,
|
|
235
|
-
"is--move": moveable,
|
|
236
|
-
"row--pending": !!pendingRowFlag && !!pendingRowMaps[childRowid]
|
|
237
|
-
}]
|
|
238
|
-
}, [
|
|
239
|
-
h("div", {
|
|
240
|
-
attrs: {
|
|
241
|
-
rowid: childRowid
|
|
242
|
-
},
|
|
243
|
-
class: [taskBarSlot ? "vxe-gantt-view--chart-subview-custom-bar" : "vxe-gantt-view--chart-subview-bar", `is--${childRenderTaskType}`],
|
|
244
|
-
style: childVbStyle,
|
|
245
|
-
on: {
|
|
246
|
-
click(evnt) {
|
|
247
|
-
evnt.stopPropagation();
|
|
248
|
-
$xeGantt.handleTaskBarClickEvent(evnt, childCtParams);
|
|
249
|
-
},
|
|
250
|
-
dblclick(evnt) {
|
|
251
|
-
evnt.stopPropagation();
|
|
252
|
-
$xeGantt.handleTaskBarDblclickEvent(evnt, childCtParams);
|
|
240
|
+
if (childBarStyObj.top) {
|
|
241
|
+
childVbStyle.top = childBarStyObj.top;
|
|
242
|
+
}
|
|
243
|
+
if (childBarHtmlStyle) {
|
|
244
|
+
XEUtils.assign(childVbStyle, childBarHtmlStyle);
|
|
245
|
+
}
|
|
246
|
+
const childCtParams = { ...childBarParams };
|
|
247
|
+
if (contentMethod) {
|
|
248
|
+
childTitle = getStringValue(contentMethod({ row: childRow, title: childTitle, scaleType: scaleUnit }));
|
|
249
|
+
}
|
|
250
|
+
cbcVNs.push(
|
|
251
|
+
h(
|
|
252
|
+
"div",
|
|
253
|
+
{
|
|
254
|
+
key: childRowid,
|
|
255
|
+
attrs: {
|
|
256
|
+
rowid: childRowid
|
|
253
257
|
},
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
+
class: [
|
|
259
|
+
"vxe-gantt-view--chart-subview-row",
|
|
260
|
+
`is--${childRenderTaskType}`,
|
|
261
|
+
{
|
|
262
|
+
"is--progress": showProgress,
|
|
263
|
+
"is--critical": showCriticalPath && criticalPathFlag && criticalRowMaps.has(childRowid),
|
|
264
|
+
"is--round": childRound,
|
|
265
|
+
"is--move": moveable,
|
|
266
|
+
"row--pending": !!pendingRowFlag && !!pendingRowMaps[childRowid]
|
|
258
267
|
}
|
|
259
|
-
|
|
260
|
-
}
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
268
|
+
]
|
|
269
|
+
},
|
|
270
|
+
[
|
|
271
|
+
h(
|
|
272
|
+
"div",
|
|
273
|
+
{
|
|
274
|
+
attrs: {
|
|
275
|
+
rowid: childRowid
|
|
276
|
+
},
|
|
277
|
+
class: [taskBarSlot ? "vxe-gantt-view--chart-subview-custom-bar" : "vxe-gantt-view--chart-subview-bar", `is--${childRenderTaskType}`],
|
|
278
|
+
style: childVbStyle,
|
|
279
|
+
on: {
|
|
280
|
+
click(evnt) {
|
|
281
|
+
evnt.stopPropagation();
|
|
282
|
+
$xeGantt.handleTaskBarClickEvent(evnt, childCtParams);
|
|
283
|
+
},
|
|
284
|
+
dblclick(evnt) {
|
|
285
|
+
evnt.stopPropagation();
|
|
286
|
+
$xeGantt.handleTaskBarDblclickEvent(evnt, childCtParams);
|
|
287
|
+
},
|
|
288
|
+
mousedown(evnt) {
|
|
289
|
+
evnt.stopPropagation();
|
|
290
|
+
if ($xeGantt.handleTaskBarModnEvent) {
|
|
291
|
+
$xeGantt.handleTaskBarModnEvent(evnt, childCtParams);
|
|
292
|
+
}
|
|
293
|
+
}
|
|
294
|
+
}
|
|
295
|
+
},
|
|
296
|
+
[
|
|
297
|
+
taskBarSlot ? h(
|
|
298
|
+
"div",
|
|
299
|
+
{
|
|
300
|
+
key: "cbc",
|
|
301
|
+
class: "vxe-gantt-view--chart-subview-custom-bar-content-wrapper",
|
|
302
|
+
on: ctOns
|
|
303
|
+
},
|
|
304
|
+
$xeGantt.callSlot(taskBarSlot, childCtParams, h)
|
|
305
|
+
) : h(
|
|
306
|
+
"div",
|
|
307
|
+
{
|
|
308
|
+
class: "vxe-gantt-view--chart-subview-bar-content-wrapper",
|
|
309
|
+
on: ctOns
|
|
310
|
+
},
|
|
311
|
+
[
|
|
312
|
+
showProgress ? h("div", {
|
|
313
|
+
class: "vxe-gantt-view--chart-progress",
|
|
314
|
+
style: childVpStyle
|
|
315
|
+
}) : renderEmptyElement($xeGantt),
|
|
316
|
+
showContent ? h(
|
|
317
|
+
"div",
|
|
318
|
+
{
|
|
319
|
+
class: "vxe-gantt-view--chart-content"
|
|
320
|
+
},
|
|
321
|
+
childTitle
|
|
322
|
+
) : renderEmptyElement($xeGantt)
|
|
323
|
+
]
|
|
324
|
+
)
|
|
325
|
+
]
|
|
326
|
+
)
|
|
327
|
+
]
|
|
328
|
+
)
|
|
329
|
+
);
|
|
330
|
+
},
|
|
331
|
+
{ children: childrenField }
|
|
332
|
+
);
|
|
282
333
|
cbVNs.push(
|
|
283
|
-
h(
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
334
|
+
h(
|
|
335
|
+
"div",
|
|
336
|
+
{
|
|
337
|
+
key: "vcsc",
|
|
338
|
+
class: "vxe-gantt-view--chart-subview-wrapper is--inline"
|
|
339
|
+
},
|
|
340
|
+
cbcVNs
|
|
341
|
+
)
|
|
287
342
|
);
|
|
288
343
|
}
|
|
289
344
|
} else {
|
|
290
345
|
if (taskBarSlot) {
|
|
291
346
|
cbVNs.push(
|
|
292
|
-
h(
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
347
|
+
h(
|
|
348
|
+
"div",
|
|
349
|
+
{
|
|
350
|
+
key: "cbc",
|
|
351
|
+
class: "vxe-gantt-view--chart-custom-bar-content-wrapper",
|
|
352
|
+
on: ctOns
|
|
353
|
+
},
|
|
354
|
+
$xeGantt.callSlot(taskBarSlot, barParams, h)
|
|
355
|
+
)
|
|
297
356
|
);
|
|
298
357
|
} else if (isMilestone) {
|
|
299
358
|
const { icon, iconStatus, iconStyle } = taskBarMilestoneOpts;
|
|
300
359
|
const tbmParams = { $gantt: $xeGantt, row };
|
|
301
360
|
cbVNs.push(
|
|
302
|
-
h(
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
361
|
+
h(
|
|
362
|
+
"div",
|
|
363
|
+
{
|
|
364
|
+
key: "vcm",
|
|
365
|
+
class: "vxe-gantt-view--chart-milestone-wrapper",
|
|
366
|
+
on: ctOns
|
|
367
|
+
},
|
|
368
|
+
[
|
|
369
|
+
h(
|
|
370
|
+
"div",
|
|
371
|
+
{
|
|
372
|
+
class: ["vxe-gantt-view--chart-milestone-icon", iconStatus ? `theme--${XEUtils.isFunction(iconStatus) ? iconStatus(tbmParams) : iconStatus}` : ""],
|
|
373
|
+
style: iconStyle ? Object.assign({}, XEUtils.isFunction(iconStyle) ? iconStyle(tbmParams) : iconStyle) : void 0
|
|
374
|
+
},
|
|
375
|
+
[
|
|
376
|
+
h("i", {
|
|
377
|
+
class: (icon ? XEUtils.isFunction(icon) ? icon(tbmParams) : icon : "") || getIcon().GANTT_VIEW_TASK_MILESTONE
|
|
378
|
+
})
|
|
379
|
+
]
|
|
380
|
+
),
|
|
381
|
+
showContent ? h(
|
|
382
|
+
"div",
|
|
383
|
+
{
|
|
384
|
+
class: "vxe-gantt-view--chart-milestone-content"
|
|
385
|
+
},
|
|
386
|
+
title
|
|
387
|
+
) : renderEmptyElement($xeGantt)
|
|
388
|
+
]
|
|
389
|
+
)
|
|
319
390
|
);
|
|
320
391
|
} else {
|
|
321
392
|
cbVNs.push(
|
|
322
|
-
h(
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
393
|
+
h(
|
|
394
|
+
"div",
|
|
395
|
+
{
|
|
396
|
+
key: "vbc",
|
|
397
|
+
class: "vxe-gantt-view--chart-bar-content-wrapper",
|
|
398
|
+
on: ctOns
|
|
399
|
+
},
|
|
400
|
+
[
|
|
401
|
+
showProgress ? h("div", {
|
|
402
|
+
class: "vxe-gantt-view--chart-progress",
|
|
403
|
+
style: vpStyle
|
|
404
|
+
}) : renderEmptyElement($xeGantt),
|
|
405
|
+
showContent ? h(
|
|
406
|
+
"div",
|
|
407
|
+
{
|
|
408
|
+
class: "vxe-gantt-view--chart-content"
|
|
409
|
+
},
|
|
410
|
+
title
|
|
411
|
+
) : renderEmptyElement($xeGantt)
|
|
412
|
+
]
|
|
413
|
+
)
|
|
335
414
|
);
|
|
336
415
|
}
|
|
337
416
|
}
|
|
338
417
|
}
|
|
339
|
-
return h(
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
rowid
|
|
343
|
-
},
|
|
344
|
-
class: ["vxe-gantt-view--chart-row", `is--${renderTaskType}`, {
|
|
345
|
-
"is--progress": showProgress,
|
|
346
|
-
"is--critical": showCriticalPath && criticalPathFlag && criticalRowMaps.has(rowid),
|
|
347
|
-
"row--pending": !!pendingRowFlag && !!pendingRowMaps[rowid],
|
|
348
|
-
"is--round": barRound,
|
|
349
|
-
"is--move": moveable
|
|
350
|
-
}],
|
|
351
|
-
style: {
|
|
352
|
-
height: `${cellHeight}px`
|
|
353
|
-
},
|
|
354
|
-
on: {
|
|
355
|
-
onDragstart(evnt) {
|
|
356
|
-
if (ganttInternalData.dragBarRow) {
|
|
357
|
-
evnt.preventDefault();
|
|
358
|
-
}
|
|
359
|
-
},
|
|
360
|
-
contextmenu(evnt) {
|
|
361
|
-
$xeGantt.handleTaskBarContextmenuEvent(evnt, ctParams);
|
|
362
|
-
}
|
|
363
|
-
}
|
|
364
|
-
}, [
|
|
365
|
-
h("div", {
|
|
366
|
-
class: [taskBarSlot ? "vxe-gantt-view--chart-custom-bar" : "vxe-gantt-view--chart-bar", `is--${renderTaskType}`, {
|
|
367
|
-
"is--active": activeBarRowid === rowid,
|
|
368
|
-
"active--link": activeLink && (rowid === `${activeLink.from}` || rowid === `${activeLink.to}`)
|
|
369
|
-
}],
|
|
370
|
-
style: vbStyle,
|
|
418
|
+
return h(
|
|
419
|
+
"div",
|
|
420
|
+
{
|
|
421
|
+
key: rowid,
|
|
371
422
|
attrs: {
|
|
372
423
|
rowid
|
|
373
424
|
},
|
|
425
|
+
class: [
|
|
426
|
+
"vxe-gantt-view--chart-row",
|
|
427
|
+
`is--${renderTaskType}`,
|
|
428
|
+
{
|
|
429
|
+
"is--progress": showProgress,
|
|
430
|
+
"is--critical": showCriticalPath && criticalPathFlag && criticalRowMaps.has(rowid),
|
|
431
|
+
"row--pending": !!pendingRowFlag && !!pendingRowMaps[rowid],
|
|
432
|
+
"is--round": barRound,
|
|
433
|
+
"is--move": moveable
|
|
434
|
+
}
|
|
435
|
+
],
|
|
436
|
+
style: {
|
|
437
|
+
height: `${cellHeight}px`
|
|
438
|
+
},
|
|
374
439
|
on: {
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
dblclick(evnt) {
|
|
379
|
-
$xeGantt.handleTaskBarDblclickEvent(evnt, barParams);
|
|
380
|
-
},
|
|
381
|
-
mousedown(evnt) {
|
|
382
|
-
if ($xeGantt.handleTaskBarModnEvent) {
|
|
383
|
-
$xeGantt.handleTaskBarModnEvent(evnt, barParams);
|
|
440
|
+
onDragstart(evnt) {
|
|
441
|
+
if (ganttInternalData.dragBarRow) {
|
|
442
|
+
evnt.preventDefault();
|
|
384
443
|
}
|
|
444
|
+
},
|
|
445
|
+
contextmenu(evnt) {
|
|
446
|
+
$xeGantt.handleTaskBarContextmenuEvent(evnt, ctParams);
|
|
385
447
|
}
|
|
386
448
|
}
|
|
387
|
-
},
|
|
388
|
-
|
|
449
|
+
},
|
|
450
|
+
[
|
|
451
|
+
h(
|
|
452
|
+
"div",
|
|
453
|
+
{
|
|
454
|
+
class: [
|
|
455
|
+
taskBarSlot ? "vxe-gantt-view--chart-custom-bar" : "vxe-gantt-view--chart-bar",
|
|
456
|
+
`is--${renderTaskType}`,
|
|
457
|
+
{
|
|
458
|
+
"is--active": activeBarRowid === rowid,
|
|
459
|
+
"active--link": activeLink && (rowid === `${activeLink.from}` || rowid === `${activeLink.to}`)
|
|
460
|
+
}
|
|
461
|
+
],
|
|
462
|
+
style: vbStyle,
|
|
463
|
+
attrs: {
|
|
464
|
+
rowid
|
|
465
|
+
},
|
|
466
|
+
on: {
|
|
467
|
+
click(evnt) {
|
|
468
|
+
$xeGantt.handleTaskBarClickEvent(evnt, barParams);
|
|
469
|
+
},
|
|
470
|
+
dblclick(evnt) {
|
|
471
|
+
$xeGantt.handleTaskBarDblclickEvent(evnt, barParams);
|
|
472
|
+
},
|
|
473
|
+
mousedown(evnt) {
|
|
474
|
+
if ($xeGantt.handleTaskBarModnEvent) {
|
|
475
|
+
$xeGantt.handleTaskBarModnEvent(evnt, barParams);
|
|
476
|
+
}
|
|
477
|
+
}
|
|
478
|
+
}
|
|
479
|
+
},
|
|
480
|
+
cbVNs
|
|
481
|
+
)
|
|
482
|
+
]
|
|
483
|
+
);
|
|
389
484
|
},
|
|
390
485
|
renderTaskRows(h, $xeTable, tableData) {
|
|
391
486
|
const _vm = this;
|
|
@@ -441,38 +536,67 @@ var gantt_chart_default = defineVxeComponent({
|
|
|
441
536
|
const { isCurrent, isHover } = taskLinkOpts;
|
|
442
537
|
const { linkCreatable } = taskBarOpts;
|
|
443
538
|
const taskNowLineSlot = ganttSlots.taskNowLine || ganttSlots["task-now-line"];
|
|
444
|
-
return h(
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
"
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
"
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
539
|
+
return h(
|
|
540
|
+
"div",
|
|
541
|
+
{
|
|
542
|
+
ref: "refElem",
|
|
543
|
+
class: [
|
|
544
|
+
"vxe-gantt-view--chart-wrapper",
|
|
545
|
+
{
|
|
546
|
+
"is--cl-drag": dragLinkFromStore.rowid
|
|
547
|
+
}
|
|
548
|
+
]
|
|
549
|
+
},
|
|
550
|
+
[
|
|
551
|
+
nowLineLeft > 0 ? h(
|
|
552
|
+
"div",
|
|
553
|
+
{
|
|
554
|
+
ref: "refNowLineElem",
|
|
555
|
+
class: "vxe-gantt-view--chart-now-line",
|
|
556
|
+
style: {
|
|
557
|
+
left: nowLineLeft + "px"
|
|
558
|
+
}
|
|
559
|
+
},
|
|
560
|
+
taskNowLineSlot ? taskNowLineSlot({}) : []
|
|
561
|
+
) : renderEmptyElement($xeGantt),
|
|
562
|
+
$xeGantt.renderGanttTaskChartBefores ? h(
|
|
563
|
+
"div",
|
|
564
|
+
{
|
|
565
|
+
ref: "refChartBeforeWrapperElem",
|
|
566
|
+
class: [
|
|
567
|
+
"vxe-gantt-view--chart-before-wrapper",
|
|
568
|
+
{
|
|
569
|
+
"link--current": isCurrent,
|
|
570
|
+
"link--hover": isHover
|
|
571
|
+
}
|
|
572
|
+
]
|
|
573
|
+
},
|
|
574
|
+
$xeTable && isEnableConf(taskLinkOpts) ? $xeGantt.renderGanttTaskChartBefores(h) : []
|
|
575
|
+
) : renderEmptyElement($xeGantt),
|
|
576
|
+
h(
|
|
577
|
+
"div",
|
|
578
|
+
{
|
|
579
|
+
ref: "refTaskWrapperElem",
|
|
580
|
+
class: [
|
|
581
|
+
"vxe-gantt-view--chart-task-wrapper",
|
|
582
|
+
{
|
|
583
|
+
"link--current": isCurrent,
|
|
584
|
+
"link--create": linkCreatable
|
|
585
|
+
}
|
|
586
|
+
]
|
|
587
|
+
},
|
|
588
|
+
$xeTable ? _vm.renderTaskRows(h, $xeTable, tableData) : []
|
|
589
|
+
),
|
|
590
|
+
$xeGantt.renderGanttTaskChartAfters ? h(
|
|
591
|
+
"div",
|
|
592
|
+
{
|
|
593
|
+
ref: "refChartAfterWrapperElem",
|
|
594
|
+
class: "vxe-gantt-view--chart-after-wrapper"
|
|
595
|
+
},
|
|
596
|
+
$xeTable && isEnableConf(taskLinkOpts) ? $xeGantt.renderGanttTaskChartAfters(h) : []
|
|
597
|
+
) : renderEmptyElement($xeGantt)
|
|
598
|
+
]
|
|
599
|
+
);
|
|
476
600
|
}
|
|
477
601
|
},
|
|
478
602
|
mounted() {
|