前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >MeritMS+jQuery.Gantt价值管理系统增加项目进度展示

MeritMS+jQuery.Gantt价值管理系统增加项目进度展示

作者头像
hotqin888
发布2018-09-11 15:00:54
1.1K0
发布2018-09-11 15:00:54
举报
文章被收录于专栏:hotqin888的专栏hotqin888的专栏

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://cloud.tencent.com/developer/article/1334470

https://github.com/taitems/jQuery.Gantt

代码语言:javascript
复制
$(function() {
            "use strict";
            $(".gantt").gantt({
              source:"/projectgant/getprojgants",
                // source: [{
                //     name: "珠三角",
                //     desc: "可研",
                //     id:2,
                //     values: [{
                //         from: "/Date(1492790400000)/",
                //         to: "/Date(1501257600000)/",
                //         desc: '<b>Task #</b>3<br><b>Data</b>: [2011-02-01 15:30:00 - 2011-02-01 16:00:00]',
                //         label: "label是啥",
                //         customClass: "ganttRed",
                //         dataObj: ['ha','ha2']
                //     }]
                //   },
                months: ["一月", "二月", "三月", "四月", "五月", "六月", "七月", "八月", "九月", "十月", "十一月", "十二月"], //月份显示的语言
                dow: ["日", "一", "二", "三", "四", "五", "六"], //星期显示的语言
                navigate: "scroll",
                scale: "days",
                maxScale: "months",
                minScale: "hours",
                itemsPerPage: 20,
                useCookie: true,
                scrollToToday:true,
                markNow:true,
                onItemClick: function(data) {
                    // alert("Item clicked - show some details"+data);
                    $('#modalTable1').modal({
                    show:true,
                    backdrop:'static'
                    });
                },
                onAddClick: function(dt, rowId) {
                    // alert("Empty space clicked - add an item!"+dt+","+rowId);
                    if ({{.role}}!=1){
                      alert("权限不够!");
                      return;
                    }
                    $("label#info").remove();
                    $("#saveproj").removeClass("disabled")
                    $('#modalTable').modal({
                    show:true,
                    backdrop:'static'
                    });
                },
                onRender: function() {
                    if (window.console && typeof console.log === "function") {
                        console.log("chart rendered");
                    }
                }
            });

            // $(".gantt").popover({
            //     selector: ".bar",
            //     title: "I'm a popover",
            //     content: "And I'm the content of said popover.",
            //     trigger: "hover",
            //     placement: "auto right"
            // });

            // prettyPrint();
        });
本文参与 腾讯云自媒体分享计划,分享自作者个人站点/博客。
原始发表:2017年04月23日,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体分享计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档