vxe-gantt 4.9.2 → 4.9.4
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/dist/all.esm.js +1398 -881
- package/es/components.js +1 -3
- package/es/gantt/src/gantt-body.js +100 -76
- package/es/gantt/src/gantt-chart.js +363 -239
- package/es/gantt/src/gantt-footer.js +16 -12
- package/es/gantt/src/gantt-header.js +135 -104
- package/es/gantt/src/gantt-view.js +235 -201
- package/es/gantt/src/gantt.js +545 -229
- package/es/gantt/src/grid-emits.js +1 -15
- package/es/style.css +982 -0
- package/es/style.mini.css +1 -0
- package/es/ui/index.js +1 -1
- package/es/ui/src/log.js +1 -1
- package/es/ui/src/utils.d.ts +1 -1
- package/lib/components.js +1 -3
- package/lib/gantt/src/gantt-body.js +100 -76
- package/lib/gantt/src/gantt-chart.js +363 -239
- package/lib/gantt/src/gantt-footer.js +16 -12
- package/lib/gantt/src/gantt-header.js +135 -104
- package/lib/gantt/src/gantt-view.js +235 -201
- package/lib/gantt/src/gantt.js +545 -229
- package/lib/gantt/src/grid-emits.js +1 -15
- package/lib/index.umd.js +1398 -881
- package/lib/index.umd.min.js +1 -1
- package/lib/ui/index.js +1 -1
- package/lib/ui/src/log.js +1 -1
- package/package.json +11 -4
- package/packages/components.ts +20 -22
- package/packages/gantt/index.ts +21 -21
- package/packages/gantt/src/emits.ts +25 -25
- package/packages/gantt/src/gantt-body.ts +317 -293
- package/packages/gantt/src/gantt-chart.ts +655 -531
- package/packages/gantt/src/gantt-footer.ts +55 -51
- package/packages/gantt/src/gantt-header.ts +193 -162
- package/packages/gantt/src/gantt-view.ts +2695 -2663
- package/packages/gantt/src/gantt.ts +3317 -2982
- package/packages/gantt/src/grid-emits.ts +5 -19
- package/packages/gantt/src/static.ts +35 -35
- package/packages/gantt/src/table-emits.ts +134 -134
- package/packages/gantt/src/util.ts +45 -45
- package/packages/index.ts +4 -4
- package/packages/ui/index.ts +133 -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 +80 -80
- package/packages/ui/src/vn.ts +9 -9
- package/types/all.d.ts +33 -33
- package/types/index.d.ts +4 -4
|
@@ -123,242 +123,337 @@ var gantt_chart_default = defineVxeComponent({
|
|
|
123
123
|
if (isExpandTree) {
|
|
124
124
|
if (showOverview) {
|
|
125
125
|
cbVNs.push(
|
|
126
|
-
h(
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
"
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
},
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
126
|
+
h(
|
|
127
|
+
"div",
|
|
128
|
+
{
|
|
129
|
+
key: "vcso",
|
|
130
|
+
class: "vxe-gantt-view--chart-subview-wrapper is--overview"
|
|
131
|
+
},
|
|
132
|
+
[
|
|
133
|
+
h(
|
|
134
|
+
"div",
|
|
135
|
+
{
|
|
136
|
+
key: rowid,
|
|
137
|
+
rowid,
|
|
138
|
+
class: [
|
|
139
|
+
"vxe-gantt-view--chart-subview-row",
|
|
140
|
+
{
|
|
141
|
+
"is--progress": showProgress,
|
|
142
|
+
"is--round": barRound,
|
|
143
|
+
"is--move": moveable
|
|
144
|
+
}
|
|
145
|
+
]
|
|
146
|
+
},
|
|
147
|
+
[
|
|
148
|
+
h(
|
|
149
|
+
"div",
|
|
150
|
+
{
|
|
151
|
+
rowid,
|
|
152
|
+
class: [taskBarOverviewSlot ? "vxe-gantt-view--chart-subview-custom-bar" : "vxe-gantt-view--chart-subview-bar", `is--${renderTaskType}`]
|
|
153
|
+
},
|
|
154
|
+
[
|
|
155
|
+
taskBarOverviewSlot ? h(
|
|
156
|
+
"div",
|
|
157
|
+
{
|
|
158
|
+
key: "cbc",
|
|
159
|
+
class: "vxe-gantt-view--chart-subview-custom-bar-content-wrapper"
|
|
160
|
+
},
|
|
161
|
+
$xeGantt.callSlot(taskBarOverviewSlot, barParams)
|
|
162
|
+
) : h(
|
|
163
|
+
"div",
|
|
164
|
+
{
|
|
165
|
+
class: "vxe-gantt-view--chart-subview-bar-content-wrapper"
|
|
166
|
+
},
|
|
167
|
+
[
|
|
168
|
+
showContent ? h(
|
|
169
|
+
"div",
|
|
170
|
+
{
|
|
171
|
+
class: "vxe-gantt-view--chart-content"
|
|
172
|
+
},
|
|
173
|
+
title
|
|
174
|
+
) : renderEmptyElement($xeGantt)
|
|
175
|
+
]
|
|
176
|
+
)
|
|
177
|
+
]
|
|
178
|
+
)
|
|
179
|
+
]
|
|
180
|
+
)
|
|
181
|
+
]
|
|
182
|
+
)
|
|
156
183
|
);
|
|
157
184
|
}
|
|
158
185
|
} else {
|
|
159
186
|
const cbcVNs = [];
|
|
160
|
-
XEUtils.eachTree(
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
(barStyle ? isBarRowStyle ? barStyle(childBarParams) : barStyle : {}) || {},
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
if (isChildSubview) {
|
|
188
|
-
return;
|
|
189
|
-
}
|
|
190
|
-
const childVbStyle = {};
|
|
191
|
-
const childVpStyle = {
|
|
192
|
-
width: `${childProgressValue || 0}%`
|
|
193
|
-
};
|
|
194
|
-
if (!isChildMilestone) {
|
|
195
|
-
if (childBgColor) {
|
|
196
|
-
childVbStyle["--vxe-ui-gantt-view-task-bar-background-color"] = childBgColor;
|
|
187
|
+
XEUtils.eachTree(
|
|
188
|
+
rowChildren,
|
|
189
|
+
(childRow) => {
|
|
190
|
+
const childBarParams = {
|
|
191
|
+
$gantt: $xeGantt,
|
|
192
|
+
source: sourceType,
|
|
193
|
+
type: viewType,
|
|
194
|
+
scaleType: scaleUnit,
|
|
195
|
+
row: childRow,
|
|
196
|
+
$rowIndex: $xeTable.getRowIndex(childRow),
|
|
197
|
+
rowIndex: $xeTable.getVMRowIndex(childRow),
|
|
198
|
+
_rowIndex: $xeTable.getVTRowIndex(childRow)
|
|
199
|
+
};
|
|
200
|
+
const isChildBarRowStyle = XEUtils.isFunction(subBarStyle);
|
|
201
|
+
const childBarStyObj = XEUtils.assign({}, (barStyle ? isBarRowStyle ? barStyle(childBarParams) : barStyle : {}) || {}, (subBarStyle ? isChildBarRowStyle ? subBarStyle(childBarParams) : subBarStyle : {}) || {});
|
|
202
|
+
const childRound = childBarStyObj.round;
|
|
203
|
+
const childBgColor = childBarStyObj.bgColor;
|
|
204
|
+
const childCompletedBgColor = childBarStyObj.completedBgColor;
|
|
205
|
+
const childBarHtmlStyle = childBarStyObj.style;
|
|
206
|
+
const childRowid = $xeTable.getRowid(childRow);
|
|
207
|
+
let childTitle = getStringValue(XEUtils.get(childRow, titleField));
|
|
208
|
+
const childProgressValue = showProgress ? Math.min(100, Math.max(0, XEUtils.toNumber(XEUtils.get(childRow, progressField)))) : 0;
|
|
209
|
+
const childRenderTaskType = getTaskType(XEUtils.get(childRow, typeField));
|
|
210
|
+
const isChildMilestone = !!(hasEnableConf(taskBarMilestoneConfig, taskBarMilestoneOpts) && hasMilestoneTask(childRenderTaskType));
|
|
211
|
+
const isChildSubview = !!(hasEnableConf(taskBarSubviewConfig, taskBarSubviewOpts) && hasSubviewTask(childRenderTaskType));
|
|
212
|
+
if (isChildSubview) {
|
|
213
|
+
return;
|
|
197
214
|
}
|
|
198
|
-
|
|
199
|
-
|
|
215
|
+
const childVbStyle = {};
|
|
216
|
+
const childVpStyle = {
|
|
217
|
+
width: `${childProgressValue || 0}%`
|
|
218
|
+
};
|
|
219
|
+
if (!isChildMilestone) {
|
|
220
|
+
if (childBgColor) {
|
|
221
|
+
childVbStyle["--vxe-ui-gantt-view-task-bar-background-color"] = childBgColor;
|
|
222
|
+
}
|
|
223
|
+
if (childCompletedBgColor) {
|
|
224
|
+
childVpStyle["--vxe-ui-gantt-view-task-bar-completed-background-color"] = childCompletedBgColor;
|
|
225
|
+
}
|
|
200
226
|
}
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
onClick(evnt) {
|
|
229
|
-
evnt.stopPropagation();
|
|
230
|
-
$xeGantt.handleTaskBarClickEvent(evnt, childCtParams);
|
|
231
|
-
},
|
|
232
|
-
onDblclick(evnt) {
|
|
233
|
-
evnt.stopPropagation();
|
|
234
|
-
$xeGantt.handleTaskBarDblclickEvent(evnt, childCtParams);
|
|
227
|
+
if (childBarStyObj.top) {
|
|
228
|
+
childVbStyle.top = childBarStyObj.top;
|
|
229
|
+
}
|
|
230
|
+
if (childBarHtmlStyle) {
|
|
231
|
+
XEUtils.assign(childVbStyle, childBarHtmlStyle);
|
|
232
|
+
}
|
|
233
|
+
const childCtParams = { ...childBarParams };
|
|
234
|
+
if (contentMethod) {
|
|
235
|
+
childTitle = getStringValue(contentMethod({ row: childRow, title: childTitle, scaleType: scaleUnit }));
|
|
236
|
+
}
|
|
237
|
+
cbcVNs.push(
|
|
238
|
+
h(
|
|
239
|
+
"div",
|
|
240
|
+
{
|
|
241
|
+
key: childRowid,
|
|
242
|
+
rowid: childRowid,
|
|
243
|
+
class: [
|
|
244
|
+
"vxe-gantt-view--chart-subview-row",
|
|
245
|
+
`is--${childRenderTaskType}`,
|
|
246
|
+
{
|
|
247
|
+
"is--progress": showProgress,
|
|
248
|
+
"is--critical": showCriticalPath && criticalPathFlag && criticalRowMaps.has(childRowid),
|
|
249
|
+
"is--round": childRound,
|
|
250
|
+
"is--move": moveable,
|
|
251
|
+
"row--pending": !!pendingRowFlag && !!pendingRowMaps[childRowid]
|
|
252
|
+
}
|
|
253
|
+
]
|
|
235
254
|
},
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
255
|
+
[
|
|
256
|
+
h(
|
|
257
|
+
"div",
|
|
258
|
+
{
|
|
259
|
+
rowid: childRowid,
|
|
260
|
+
class: [taskBarSlot ? "vxe-gantt-view--chart-subview-custom-bar" : "vxe-gantt-view--chart-subview-bar", `is--${childRenderTaskType}`],
|
|
261
|
+
style: childVbStyle,
|
|
262
|
+
onClick(evnt) {
|
|
263
|
+
evnt.stopPropagation();
|
|
264
|
+
$xeGantt.handleTaskBarClickEvent(evnt, childCtParams);
|
|
265
|
+
},
|
|
266
|
+
onDblclick(evnt) {
|
|
267
|
+
evnt.stopPropagation();
|
|
268
|
+
$xeGantt.handleTaskBarDblclickEvent(evnt, childCtParams);
|
|
269
|
+
},
|
|
270
|
+
onMousedown(evnt) {
|
|
271
|
+
evnt.stopPropagation();
|
|
272
|
+
if ($xeGantt.handleTaskBarModnEvent) {
|
|
273
|
+
$xeGantt.handleTaskBarModnEvent(evnt, childCtParams);
|
|
274
|
+
}
|
|
275
|
+
}
|
|
276
|
+
},
|
|
277
|
+
[
|
|
278
|
+
taskBarSlot ? h(
|
|
279
|
+
"div",
|
|
280
|
+
{
|
|
281
|
+
key: "cbc",
|
|
282
|
+
class: "vxe-gantt-view--chart-subview-custom-bar-content-wrapper",
|
|
283
|
+
...ctOns
|
|
284
|
+
},
|
|
285
|
+
$xeGantt.callSlot(taskBarSlot, childCtParams)
|
|
286
|
+
) : h(
|
|
287
|
+
"div",
|
|
288
|
+
{
|
|
289
|
+
class: "vxe-gantt-view--chart-subview-bar-content-wrapper",
|
|
290
|
+
...ctOns
|
|
291
|
+
},
|
|
292
|
+
[
|
|
293
|
+
showProgress ? h("div", {
|
|
294
|
+
class: "vxe-gantt-view--chart-progress",
|
|
295
|
+
style: childVpStyle
|
|
296
|
+
}) : renderEmptyElement($xeGantt),
|
|
297
|
+
showContent ? h(
|
|
298
|
+
"div",
|
|
299
|
+
{
|
|
300
|
+
class: "vxe-gantt-view--chart-content"
|
|
301
|
+
},
|
|
302
|
+
childTitle
|
|
303
|
+
) : renderEmptyElement($xeGantt)
|
|
304
|
+
]
|
|
305
|
+
)
|
|
306
|
+
]
|
|
307
|
+
)
|
|
308
|
+
]
|
|
309
|
+
)
|
|
310
|
+
);
|
|
311
|
+
},
|
|
312
|
+
{ children: childrenField }
|
|
313
|
+
);
|
|
263
314
|
cbVNs.push(
|
|
264
|
-
h(
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
315
|
+
h(
|
|
316
|
+
"div",
|
|
317
|
+
{
|
|
318
|
+
key: "vcsc",
|
|
319
|
+
class: "vxe-gantt-view--chart-subview-wrapper is--inline"
|
|
320
|
+
},
|
|
321
|
+
cbcVNs
|
|
322
|
+
)
|
|
268
323
|
);
|
|
269
324
|
}
|
|
270
325
|
} else {
|
|
271
326
|
if (taskBarSlot) {
|
|
272
327
|
cbVNs.push(
|
|
273
|
-
h(
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
328
|
+
h(
|
|
329
|
+
"div",
|
|
330
|
+
{
|
|
331
|
+
key: "cbc",
|
|
332
|
+
class: "vxe-gantt-view--chart-custom-bar-content-wrapper",
|
|
333
|
+
...ctOns
|
|
334
|
+
},
|
|
335
|
+
$xeGantt.callSlot(taskBarSlot, barParams)
|
|
336
|
+
)
|
|
278
337
|
);
|
|
279
338
|
} else if (isMilestone) {
|
|
280
339
|
const { icon, iconStatus, iconStyle } = taskBarMilestoneOpts;
|
|
281
340
|
const tbmParams = { $gantt: $xeGantt, row };
|
|
282
341
|
cbVNs.push(
|
|
283
|
-
h(
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
342
|
+
h(
|
|
343
|
+
"div",
|
|
344
|
+
{
|
|
345
|
+
key: "vcm",
|
|
346
|
+
class: "vxe-gantt-view--chart-milestone-wrapper",
|
|
347
|
+
...ctOns
|
|
348
|
+
},
|
|
349
|
+
[
|
|
350
|
+
h(
|
|
351
|
+
"div",
|
|
352
|
+
{
|
|
353
|
+
class: ["vxe-gantt-view--chart-milestone-icon", iconStatus ? `theme--${XEUtils.isFunction(iconStatus) ? iconStatus(tbmParams) : iconStatus}` : ""],
|
|
354
|
+
style: iconStyle ? Object.assign({}, XEUtils.isFunction(iconStyle) ? iconStyle(tbmParams) : iconStyle) : void 0
|
|
355
|
+
},
|
|
356
|
+
[
|
|
357
|
+
h("i", {
|
|
358
|
+
class: (icon ? XEUtils.isFunction(icon) ? icon(tbmParams) : icon : "") || getIcon().GANTT_VIEW_TASK_MILESTONE
|
|
359
|
+
})
|
|
360
|
+
]
|
|
361
|
+
),
|
|
362
|
+
showContent ? h(
|
|
363
|
+
"div",
|
|
364
|
+
{
|
|
365
|
+
class: "vxe-gantt-view--chart-milestone-content"
|
|
366
|
+
},
|
|
367
|
+
title
|
|
368
|
+
) : renderEmptyElement($xeGantt)
|
|
369
|
+
]
|
|
370
|
+
)
|
|
300
371
|
);
|
|
301
372
|
} else {
|
|
302
373
|
cbVNs.push(
|
|
303
|
-
h(
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
374
|
+
h(
|
|
375
|
+
"div",
|
|
376
|
+
{
|
|
377
|
+
key: "vbc",
|
|
378
|
+
class: "vxe-gantt-view--chart-bar-content-wrapper",
|
|
379
|
+
...ctOns
|
|
380
|
+
},
|
|
381
|
+
[
|
|
382
|
+
showProgress ? h("div", {
|
|
383
|
+
class: "vxe-gantt-view--chart-progress",
|
|
384
|
+
style: vpStyle
|
|
385
|
+
}) : renderEmptyElement($xeGantt),
|
|
386
|
+
showContent ? h(
|
|
387
|
+
"div",
|
|
388
|
+
{
|
|
389
|
+
class: "vxe-gantt-view--chart-content"
|
|
390
|
+
},
|
|
391
|
+
title
|
|
392
|
+
) : renderEmptyElement($xeGantt)
|
|
393
|
+
]
|
|
394
|
+
)
|
|
316
395
|
);
|
|
317
396
|
}
|
|
318
397
|
}
|
|
319
398
|
}
|
|
320
|
-
return h(
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
"is--progress": showProgress,
|
|
325
|
-
"is--critical": showCriticalPath && criticalPathFlag && criticalRowMaps.has(rowid),
|
|
326
|
-
"row--pending": !!pendingRowFlag && !!pendingRowMaps[rowid],
|
|
327
|
-
"is--round": barRound,
|
|
328
|
-
"is--move": moveable
|
|
329
|
-
}],
|
|
330
|
-
style: {
|
|
331
|
-
height: `${cellHeight}px`
|
|
332
|
-
},
|
|
333
|
-
onDragstart(evnt) {
|
|
334
|
-
if (ganttInternalData.dragBarRow) {
|
|
335
|
-
evnt.preventDefault();
|
|
336
|
-
}
|
|
337
|
-
},
|
|
338
|
-
onContextmenu(evnt) {
|
|
339
|
-
$xeGantt.handleTaskBarContextmenuEvent(evnt, ctParams);
|
|
340
|
-
}
|
|
341
|
-
}, [
|
|
342
|
-
h("div", {
|
|
343
|
-
class: [taskBarSlot ? "vxe-gantt-view--chart-custom-bar" : "vxe-gantt-view--chart-bar", `is--${renderTaskType}`, {
|
|
344
|
-
"is--active": activeBarRowid === rowid,
|
|
345
|
-
"active--link": activeLink && (rowid === `${activeLink.from}` || rowid === `${activeLink.to}`)
|
|
346
|
-
}],
|
|
347
|
-
style: vbStyle,
|
|
399
|
+
return h(
|
|
400
|
+
"div",
|
|
401
|
+
{
|
|
402
|
+
key: rowid,
|
|
348
403
|
rowid,
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
404
|
+
class: [
|
|
405
|
+
"vxe-gantt-view--chart-row",
|
|
406
|
+
`is--${renderTaskType}`,
|
|
407
|
+
{
|
|
408
|
+
"is--progress": showProgress,
|
|
409
|
+
"is--critical": showCriticalPath && criticalPathFlag && criticalRowMaps.has(rowid),
|
|
410
|
+
"row--pending": !!pendingRowFlag && !!pendingRowMaps[rowid],
|
|
411
|
+
"is--round": barRound,
|
|
412
|
+
"is--move": moveable
|
|
413
|
+
}
|
|
414
|
+
],
|
|
415
|
+
style: {
|
|
416
|
+
height: `${cellHeight}px`
|
|
354
417
|
},
|
|
355
|
-
|
|
356
|
-
if (
|
|
357
|
-
|
|
418
|
+
onDragstart(evnt) {
|
|
419
|
+
if (ganttInternalData.dragBarRow) {
|
|
420
|
+
evnt.preventDefault();
|
|
358
421
|
}
|
|
422
|
+
},
|
|
423
|
+
onContextmenu(evnt) {
|
|
424
|
+
$xeGantt.handleTaskBarContextmenuEvent(evnt, ctParams);
|
|
359
425
|
}
|
|
360
|
-
},
|
|
361
|
-
|
|
426
|
+
},
|
|
427
|
+
[
|
|
428
|
+
h(
|
|
429
|
+
"div",
|
|
430
|
+
{
|
|
431
|
+
class: [
|
|
432
|
+
taskBarSlot ? "vxe-gantt-view--chart-custom-bar" : "vxe-gantt-view--chart-bar",
|
|
433
|
+
`is--${renderTaskType}`,
|
|
434
|
+
{
|
|
435
|
+
"is--active": activeBarRowid === rowid,
|
|
436
|
+
"active--link": activeLink && (rowid === `${activeLink.from}` || rowid === `${activeLink.to}`)
|
|
437
|
+
}
|
|
438
|
+
],
|
|
439
|
+
style: vbStyle,
|
|
440
|
+
rowid,
|
|
441
|
+
onClick(evnt) {
|
|
442
|
+
$xeGantt.handleTaskBarClickEvent(evnt, barParams);
|
|
443
|
+
},
|
|
444
|
+
onDblclick(evnt) {
|
|
445
|
+
$xeGantt.handleTaskBarDblclickEvent(evnt, barParams);
|
|
446
|
+
},
|
|
447
|
+
onMousedown(evnt) {
|
|
448
|
+
if ($xeGantt.handleTaskBarModnEvent) {
|
|
449
|
+
$xeGantt.handleTaskBarModnEvent(evnt, barParams);
|
|
450
|
+
}
|
|
451
|
+
}
|
|
452
|
+
},
|
|
453
|
+
cbVNs
|
|
454
|
+
)
|
|
455
|
+
]
|
|
456
|
+
);
|
|
362
457
|
};
|
|
363
458
|
const renderTaskRows = ($xeTable, tableData) => {
|
|
364
459
|
const tableProps = $xeTable.props;
|
|
@@ -406,38 +501,67 @@ var gantt_chart_default = defineVxeComponent({
|
|
|
406
501
|
const { isCurrent, isHover } = taskLinkOpts;
|
|
407
502
|
const { linkCreatable } = taskBarOpts;
|
|
408
503
|
const taskNowLineSlot = ganttSlots.taskNowLine || ganttSlots["task-now-line"];
|
|
409
|
-
return h(
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
"
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
504
|
+
return h(
|
|
505
|
+
"div",
|
|
506
|
+
{
|
|
507
|
+
ref: refElem,
|
|
508
|
+
class: [
|
|
509
|
+
"vxe-gantt-view--chart-wrapper",
|
|
510
|
+
{
|
|
511
|
+
"is--cl-drag": dragLinkFromStore.rowid
|
|
512
|
+
}
|
|
513
|
+
]
|
|
514
|
+
},
|
|
515
|
+
[
|
|
516
|
+
nowLineLeft > 0 ? h(
|
|
517
|
+
"div",
|
|
518
|
+
{
|
|
519
|
+
ref: refNowLineElem,
|
|
520
|
+
class: "vxe-gantt-view--chart-now-line",
|
|
521
|
+
style: {
|
|
522
|
+
left: nowLineLeft + "px"
|
|
523
|
+
}
|
|
524
|
+
},
|
|
525
|
+
taskNowLineSlot ? taskNowLineSlot({}) : []
|
|
526
|
+
) : renderEmptyElement($xeGantt),
|
|
527
|
+
$xeGantt.renderGanttTaskChartBefores ? h(
|
|
528
|
+
"div",
|
|
529
|
+
{
|
|
530
|
+
ref: refChartBeforeWrapperElem,
|
|
531
|
+
class: [
|
|
532
|
+
"vxe-gantt-view--chart-before-wrapper",
|
|
533
|
+
{
|
|
534
|
+
"link--current": isCurrent,
|
|
535
|
+
"link--hover": isHover
|
|
536
|
+
}
|
|
537
|
+
]
|
|
538
|
+
},
|
|
539
|
+
$xeTable && isEnableConf(taskLinkOpts) ? $xeGantt.renderGanttTaskChartBefores() : []
|
|
540
|
+
) : renderEmptyElement($xeGantt),
|
|
541
|
+
h(
|
|
542
|
+
"div",
|
|
543
|
+
{
|
|
544
|
+
ref: refTaskWrapperElem,
|
|
545
|
+
class: [
|
|
546
|
+
"vxe-gantt-view--chart-task-wrapper",
|
|
547
|
+
{
|
|
548
|
+
"link--current": isCurrent,
|
|
549
|
+
"link--create": linkCreatable
|
|
550
|
+
}
|
|
551
|
+
]
|
|
552
|
+
},
|
|
553
|
+
$xeTable ? renderTaskRows($xeTable, tableData) : []
|
|
554
|
+
),
|
|
555
|
+
$xeGantt.renderGanttTaskChartAfters ? h(
|
|
556
|
+
"div",
|
|
557
|
+
{
|
|
558
|
+
ref: refChartAfterWrapperElem,
|
|
559
|
+
class: "vxe-gantt-view--chart-after-wrapper"
|
|
560
|
+
},
|
|
561
|
+
$xeTable && isEnableConf(taskLinkOpts) ? $xeGantt.renderGanttTaskChartAfters() : []
|
|
562
|
+
) : renderEmptyElement($xeGantt)
|
|
563
|
+
]
|
|
564
|
+
);
|
|
441
565
|
};
|
|
442
566
|
onMounted(() => {
|
|
443
567
|
const { elemStore } = ganttViewInternalData;
|