# jQueryGantt **Repository Path**: kingdee/j-query-gantt ## Basic Information - **Project Name**: jQueryGantt - **Description**: 金蝶云·苍穹自定义控件之甘特图控件 - **Primary Language**: JavaScript - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2023-09-06 - **Last Updated**: 2023-09-06 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # jQueryGantt #### 介绍 金蝶云·苍穹平台自定义控件集成甘特图jquerygantt的开源项目。 JQuery.Gantt是一个开源的基于JQuery库的用于实现甘特图效果的可扩展功能的JS组件库。 #### 软件架构 金蝶云·苍穹平台自定义控件集成甘特图jquerygantt的开源项目 #### 安装教程 1. 应用中导入元数据gttexample_meta.zip 2. 自定义控件上传的控件方案资源为jQueryGantt 3. 苍穹后台插件文件夹复制到本地 #### 使用说明 1、打开页面时,初始化甘特图数据 甘特图控件初始化事件var ge = new GanttMaster(); ge.init($(“#workSpace”)); 甘特图前端存储项目ge.saveProject() 甘特图前端加载项目ge.loadProject( [yourJsonProject] ) (1)后台插件发送数据kdec.ProjectManageGttPlugin#afterCreateNewData (2)前端js接收并初始化数据var updateHtml = function(model,data) model.dom.ge.loadProject(project); project的数据结构如下 { "canWriteOnParent": true, "roles": [ { "name": "软件开发", "id": 123321 } ], "canAdd": true, "resources": { "name": "资源测试", "id": "123" }, "canWrite": true, "canDelete": true, "selectedRow": 2, "tasks": [ { "code": "", "assigs": [ ], "level": 0, "depends": "", "collapsed": false, "start": 1396994400000, "description": "", "canWrite": true, "type": "plan", "progressByWorklog": false, "relevance": 0, "duration": 20, "1693474514008": false, "endIsMilestone": false, "hasChild": true, "name": "Gantt editor", "progress": 1, "typeId": "plan", "end": 0, "id": -1, "status": "STATUS_ACTIVE" }, { "code": "", "assigs": [ ], "level": 1, "depends": "", "collapsed": false, "start": 1693474514008, "description": "", "canWrite": true, "type": "", "progressByWorklog": false, "relevance": 0, "duration": 1000, "endIsMilestone": false, "hasChild": true, "name": "coding", "progress": 0, "typeId": "", "end": 1713474514008, "id": -2, "startIsMilestone": false, "status": "STATUS_ACTIVE" } ], "deletedTaskIds": [ ] } 2、前后端交互 (1)前端点击保存、新增需求、新增任务、关联工作项时,分别触发jQueryGantt\js\init.js里面的 saveGanttOnServer、addPlanRequire、addPlanTask、bindWorkItem等方法,这些js里面会给后端发送invoke指令 (2)苍穹后端插件接收前端请求并处理相关业务kdec.ProjectManageGttPlugin#customEvent #### 版本支持 COSMICV5.0.011 #### 参考资料 开源组件库jQuery Gantt编辑器由Roberto Bicchierai和Silvia Chelazzi编写,源开发文档: https://roberto.twproject.com/2012/08/24/jquery-gantt-editor/