
DHTMLX Gantt
你在说啥-Lynn
出发,永远是最有意义的事情,去做就是啦!
展开
-
15、Gantt 修改样式部分
指定任务栏中的文本和灯箱的标题https://docs.dhtmlx.com/gantt/api__gantt_task_text_template.html// timeLine 文字gantt.templates.task_text = function (start, end, task) { return task.taskSpecification + 'dsfsdihf';};指定任务栏已完成部分的文本https://docs.dhtmlx.com/gantt/api_.原创 2022-05-11 16:19:11 · 4011 阅读 · 0 评论 -
14、Gantt Link
添加一个新的依赖链接https://docs.dhtmlx.com/gantt/api__gantt_addlink.htmlvar linkId = gantt.addLink({ id:1, source:1, target:2, type:gantt.config.links.finish_to_start});// 在将新链接添加到甘特图之前触发gantt.attachEvent('onBeforeLinkAdd', function (id, link.原创 2022-05-11 16:11:43 · 404 阅读 · 0 评论 -
13、Gantt 甘特图元素的工具提示
gantt.plugins({ tooltip: true}); // tooltip 自定义gantt.templates.tooltip_text = function (start, end, task) { const equipmentCodes = (task.equipmentList || []).map((v) => v.equipmentCode).join(','); const inChargeName = task.inChargeName ? task.原创 2022-05-11 16:08:24 · 1723 阅读 · 2 评论 -
12、Gantt 动态改变时间 Scale
<Select v-model:value="scaleConfigValue" style="width: 100px; margin-right: 10px" @select="setScaleConfigFuc"> <Option value="day">按天</Option> <Option value="week">按周</Option> <Option value="month">按月</Op原创 2022-05-11 16:00:09 · 998 阅读 · 0 评论 -
11、Gantt 动态改变布局 layout
<Select v-model:value="layoutConfigValue" style="width: 100px; margin-right: 10px" @select="setLayoutConfigFuc"> <Option value="gridAndTimeLine">全部</Option> <Option value="grid">仅工单列表</Option> <Option value="ti原创 2022-05-11 15:57:04 · 722 阅读 · 0 评论 -
10、Gantt 休息日部分 calendar
在甘特图中添加日历https://docs.dhtmlx.com/gantt/api__gantt_addcalendar.htmltask.calendar_id = 'default';// adding a previously created calendarvar calendarId = gantt.addCalendar(calendar); // adding a calendar with a new configvar calendarId = gantt.addCal.原创 2022-05-11 15:47:47 · 588 阅读 · 0 评论 -
9、Gantt 全屏&取消全屏操作
const ganttData = reactive<{ // 全屏开启状态 fullScreenStatus: boolean;}>({ fullScreenStatus: false,});function collapseExpandFullFuc() { ganttData.fullScreenStatus = gantt.getState().fullscreen;}/** * 开启关闭 & 关闭全屏 */function handleFul原创 2022-05-09 13:56:14 · 533 阅读 · 0 评论 -
8、Gantt 拖拽操作部分 drag
激活“分支”模式,允许在同一树级别内垂直重新排序任务。https://docs.dhtmlx.com/gantt/api__gantt_order_branch_config.html此选项允许重新排序任务,同时保存它们的树级别位置。例如,子任务永远不会成为父任务。gantt.config.order_branch = true;如果您的甘特图包含大量任务,则分支重新排序的默认模式可能会降低性能。为了加快速度,您可以使用“标记”模式。gantt.config.order_branch = ".原创 2022-05-09 10:32:35 · 2148 阅读 · 1 评论 -
7、Gantt 标记标签部分 marker
向时间线区域添加标记https://docs.dhtmlx.com/gantt/api__gantt_addmarker.htmlvar todayMarker = gantt.addMarker({ start_date: new Date(), css: "today", title:date_to_str( new Date())});setInterval(function(){ var today = gantt.getMarker(todayMarke.原创 2022-05-09 10:23:26 · 1376 阅读 · 6 评论 -
6、Gantt 消息弹窗部分 lightbox
双击task时,弹出lightbox弹出框https://docs.dhtmlx.com/gantt/api__gantt_details_on_dblclick_config.htmlgantt.config.details_on_dblclick = true;// task双击 当用户双击任务时触发 该事件是可阻止的。返回 false 将取消默认处理程序gantt.attachEvent('onTaskDblClick', function (id, e) { console.log(.原创 2022-05-09 10:08:09 · 1171 阅读 · 0 评论 -
5、Gantt 界面相关部分
返回任务的可见高度https://docs.dhtmlx.com/gantt/api__gantt_gettaskheight.htmlvar height = gantt.getTaskHeight(); // -> 30计算任务的DOM元素在时间轴区域的位置和大小https://docs.dhtmlx.com/gantt/api__gantt_gettaskposition.html// adding baseline displaygantt.addTaskLayer(fu.原创 2022-05-09 10:03:25 · 643 阅读 · 0 评论 -
4、Gantt 任务节点部分
获取任务节点https://docs.dhtmlx.com/gantt/api__gantt_gettask.htmlgantt.addTask({ id:7, text:"Task #5", start_date:"02-09-2013", duration:28}, "pr_2"); gantt.getTask(7);//->{id:7, text:"Task #5", start_date:"02-09-2013", duration:28, /.原创 2022-05-07 18:35:36 · 834 阅读 · 0 评论 -
3、Gantt 相关配置 链接
配置文档地址(网友整理翻译过的)https://blog.youkuaiyun.com/qq_24472595/article/details/81630117?utm_source=blogxgwz1vue——dhtmlxGantt甘特图API精华总结https://blog.youkuaiyun.com/qq_24641385/article/details/112464817dhtmlxGantt使用教程:如何重新排序任务https://blog.youkuaiyun.com/RoffeyYang/article/detai.原创 2022-05-07 17:39:13 · 396 阅读 · 0 评论 -
2、Gantt 入门 (vue3 + ts)
首先把 gantt 官网下载的相关文件放入 resource 文件中。下载地址:https://dhtmlx.com/docs/products/dhtmlxGantt/download.shtml在html文件中引入创建一个gantt components,此框架是vue3 + ts + ant design。<template> <div ref="ganttRef"></div></template><script>.原创 2022-05-07 17:34:38 · 2587 阅读 · 0 评论 -
1、Export to PDF and PNG
官网链接https://docs.dhtmlx.com/gantt/desktop__export.html#customstylefortheoutputfile导出参数列表 参数名 参数类型及注释 name 输出文件的文件名称 skin (‘terrace’, ‘skyblue’, ‘meadow’, ‘broadway’) 导出甘特图的皮肤选项 start 置将在输出甘特图中显示的数.原创 2022-05-07 17:28:24 · 382 阅读 · 0 评论