当前位置: 首页 > news >正文

vue2 甘特图 vxe-gantt 一行渲染多个子任务的配置

vue2 甘特图 vxe-gantt 一行渲染多个子任务的配置,但需要在父级任务直接显示所有子任务时,可以通过 task-bar-subview-config 和父级任务设置type= VxeGanttTaskType.Subview 来设置,会自动将所有子任务渲染到父级任务中

https://gantt.vxeui.com

image

设置 task-bar-subview-config.showOverview 设置是否任务总览,当子任务被展开后自动显示任务总览

<template><div><vxe-gantt v-bind="ganttOptions"></vxe-gantt></div>
</template><script>
import { VxeGanttTaskType } from 'vxe-gantt'export default {data() {const ganttOptions = {border: true,treeConfig: {transform: true,rowField: 'id',parentField: 'parentId'},taskConfig: {startField: 'start',endField: 'end',typeField: 'type',progressField: 'progress'},taskBarSubviewConfig: {showOverview: true },taskBarConfig: {showContent: true,barStyle: {round: true}},taskViewConfig: {tableStyle: {width: 280}},columns: [{ field: 'title', title: '任务名称', minWidth: 140, treeNode: true },{ field: 'start', title: '开始时间', width: 100 },{ field: 'end', title: '结束时间', width: 100 },{ field: 'progress', title: '进度(%)', width: 80 }],data: [{ id: 10001, parentId: null, title: '我的项目1', start: '', end: '', progress: 0, type: VxeGanttTaskType.Subview },{ id: 10002, parentId: 10001, title: '我的项目2', start: '2024-03-02', end: '2024-03-05', progress: 70 },{ id: 10003, parentId: null, title: '我的项目3', start: '', end: '', progress: 0, type: VxeGanttTaskType.Subview },{ id: 10004, parentId: 10003, title: '我的项目4', start: '2024-03-03', end: '2024-03-04', progress: 50 },{ id: 10005, parentId: 10003, title: '我的项目5', start: '2024-03-05', end: '2024-03-06', progress: 50 },{ id: 10006, parentId: 10003, title: '我的项目6', start: '2024-03-08', end: '2024-03-11', progress: 60 },{ id: 10008, parentId: null, title: '我的项目7', start: '', end: '', progress: 0, type: VxeGanttTaskType.Subview },{ id: 10009, parentId: 10008, title: '我的项目8', start: '2024-03-07', end: '2024-03-09', progress: 50 },{ id: 10010, parentId: 10008, title: '我的项目9', start: '2024-03-10', end: '2024-03-12', progress: 50 },{ id: 10011, parentId: 10008, title: '我的项目10', start: '2024-03-13', end: '2024-03-15', progress: 50 }]};return {ganttOptions};}
};
</script>

https://gitee.com/x-extends/vxe-gantt

http://www.jsqmd.com/news/321082/

相关文章:

  • AI开发-python-langchain框架(1-8-1 缓存机制——让 AI 应用“记住”高频问题)
  • 携程任我行礼品卡回收(方法、流程、折扣)
  • 好写作AI:教育学研究论文的质性数据AI编码与解读实践
  • 2026最新专精特新企业认定服务推荐!创新型企业资质认定权威指南,专业服务助力常州企业高质量发展
  • 2026年修表店推荐:多场景维修排名,解决名表保养与智能手表修复痛点
  • 运维系列python系列【亲测有效】:AttributeError: ‘str‘ object has no attribute ‘decode‘--django中的mysql问题
  • 2026最新高新技术成果转化认证服务推荐!权威机构助力科技型企业价值提升,合规高效申报解决方案
  • 2026年名表维修推荐:基于多品牌复杂机芯修复实测评价,针对技术可靠性核心痛点精准指南
  • 好写作AI:AI辅助写作的透明度标准——如何标注“人机协作”贡献
  • 2026年修表店推荐:基于长期跟踪实地评价,涵盖应急维修与日常保养多场景
  • 2026年修手表推荐:办公通勤场景深度评测,解决走时不准与进水痛点并附服务排名
  • canvas画饼图教程,手把手教你绘制与添加标签
  • MindSpore 进阶:在 Ascend NPU 上构建高效的自定义训练步 (TrainOneStep)
  • 2026石化设备制造优选,这些厂家实力出众,蒸汽锅炉/锅炉厂家/导热油锅炉,石化设备定制厂家推荐
  • 2026最新研发费用加计扣除服务推荐!江浙沪科技企业专业财税规划机构权威榜单发布,助力企业合规降本增效
  • 基于模态分析的压缩机冷凝管道关键尺寸优化设计(任务书)
  • 2026年钟表维修服务网点推荐与评价:解决真假难辨与高价陷阱痛点,附全国中心站排名
  • 2026最新技术合同服务推荐!江浙沪科技型企业合规合作首选,专业技术合同咨询/认定登记服务机构推荐
  • 2026年名表维修服务网点权威测评报告:基于百家客户匿名反馈的口碑深度解析
  • 【2026-01-29】起床闹剧
  • 2026网络安全行业深度解析:前景、入行路径与系统学习指南
  • STATA 学习
  • ElasticSearch9.2单节点部署
  • 突破规模极限:AI前沿五大颠覆性技术洞察
  • Gitee:本土化技术生态如何重塑中国开发者协作范式
  • 好写作AI:法学论文中案例检索与逻辑链生成的智能辅助
  • 上海靠谱的护肤品费用多少,有性价比高的推荐吗?
  • 网络安全怎么入门?零基础看这一篇就够了!
  • 流量分析进阶(一):RCTF2025-Shadows of Asgard - 教程
  • 售后完善的AI智能办公鼠标价格多少,南方网通费用高吗