#
whycq
2022-02-08 7efe5eb4bcd083a695b6bac240988c1308cc3eb8
#
5个文件已修改
118 ■■■■ 已修改文件
src/main/resources/application.yml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/webapp/static/css/style.css 60 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/webapp/static/js/config.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/webapp/static/js/projectShow.js 53 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/webapp/views/index_datashow.html 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/application.yml
@@ -14,7 +14,7 @@
#    password: xltys1995
    # sql-server
    driver-class-name: com.microsoft.sqlserver.jdbc.SQLServerDriver
    url: jdbc:sqlserver://localhost:1433;databasename=zypms
    url: jdbc:sqlserver://192.168.4.99:1433;databasename=zypms
    username: sa
    password: sa@123
  mvc:
src/main/webapp/static/css/style.css
@@ -23,11 +23,7 @@
#logo-bar {
    width: 200px;
    height: 109px;
    position: absolute;
}
#top-tab img {
    width: 200px;
@@ -36,7 +32,6 @@
    top: -15px;
    left: 20px;
    transform: scale(0.6);
}
#top-tab h1{
@@ -146,7 +141,9 @@
    transform: translate(-50% ,-30%);
}
#details {
    position: relative;
}
#details .head {
    width: 100%;
    height: 50px;
@@ -170,14 +167,55 @@
}
/* 甘特图 */
#details-tab {
    background-color: #FFF;
    width: 98%;
/*左侧项目节点时间*/
#details-tab-left {
    display: inline-block;
    position: absolute;
    float: left;
    width: 11%;
    margin-top: 1%;
    margin-left: 1%;
}
/*表头*/
.tab-head {
    background-color: #354352;
    color: #FFFFFF;
    font-size: 6px;
}
.tab-head>th {
    width: 73px;
    height: 35px;
}
.tab-head>th:first-child {
    width: 55px;
}
/*表身*/
.tab-body {
    background-color: #354352;
    color: #FFFFFF;
    font-size: 6px;
}
.tab-body>td {
    width: 73px;
    height: 52px;
    text-align: center;
}
.tab-body>td:first-child {
    width: 55px;
}
/*右侧进度表*/
#details-tab {
    display: inline-block;
    position: absolute;
    clear: both;
    background-color: #FFF;
    width: 86%;
    margin-top: 1%;
    margin-left: 12%;
    overflow: scroll;
    
}
#details-tab,th,td{
#details-tab th td{
    border: 1px solid #d9dce3;
    cursor: default;
@@ -187,7 +225,7 @@
    width: 55px;
}
#details-tab td {
    height: 28px;
    height: 27px;
    text-align: center;
    position: relative;
}
src/main/webapp/static/js/config.js
@@ -1 +1 @@
var baseurl = 'http://192.168.4.57:8080';
var baseurl = 'http://47.97.1.152:58080';
src/main/webapp/static/js/projectShow.js
@@ -26,14 +26,17 @@
            }else if(show==false){
                $("#tips").attr("style","display:block")
            }
            // 项目名称
            $("#details h2").html(project.id)
            // 预计节点时间
            var tab = ''
            var tabLeft3 = ''
            var day = 86400000
            var allDay = (endTime - startTime + day ) / day
            // 预计节点的天数,实际节点天数,占多少格子;预计/实际 节点与项目开始时间的时间间隔(从哪个格子开始渲染)
            console.log(allDay)
            var bigDays = []
            for(var i = 0;i<node.length;i++){
                var nodeName = node[i].name // 节点名称
                
@@ -41,13 +44,13 @@
                var nodeEndTime = new Date(node[i].endTime$.substring(0,10)) // 预计结束时间
                var nodeRealStartTime =new Date(node[i].realStartTime$.substring(0,10)) // 实际开始时间
                var nodeRealEndTime =new Date(node[i].realEndTime$.substring(0,10)) // 实际结束时间
                var tab2 =
                        '<tr id="td-node'+i+'-gz">'
                            +'<td rowspan="2" class="loadBox">'+nodeName+'</td>'
                            +'<td rowspan="2" class="loadBox">'+node[i].startTime.substring(0,10)+'</td>'
                            +'<td rowspan="2" class="loadBox">'+node[i].endTime$.substring(0,10)+'</td>'
                            +'<tr id="td-node'+i+'-gz-2">'+'</tr>'
                tab = tab +tab2
                var tab2 ='<tr id="td-node'+i+'-gz">'+'<tr id="td-node'+i+'-gz-2">'+'</tr>'
                tab = tab +tab2
                var tabLeft2 = '<tr class="tab-body">'
                                    +'<td>'+nodeName+'</td>'
                                    +'<td>'+node[i].startTime.substring(0,10)+'</td>'
                                    +'<td>'+node[i].endTime$.substring(0,10)+'</td>'
                tabLeft3 = tabLeft3 + tabLeft2
                var overtime = endTime-nodeRealEndTime
                if(overtime<0){
                    bigDays.push(nodeRealEndTime)
@@ -59,20 +62,30 @@
            }
            var tab1 =
                '<thead>'
                +'<tr id="th-gz">'
                +'<th class="loadBox">'+'任务名称'+'</th>'
                +'<th class="loadBox">'+'开始时间'+'</th>'
                +'<th class="loadBox">'+'结束时间'+'</th>'
                + '</tr>'
                    +'<tr id="th-gz">' + '</tr>'
                +'</thead>'
                +'<tbody>'
                +'<tr id="tot">'
                +'<td rowspan="2" class="loadBox">'+'任务总时间'+'</td>'
                +'<td  rowspan="2" class="loadBox">'+project.startDay.substring(0,10)+'</td>'
                +'<td  rowspan="2" class="loadBox">'+project.endDay.substring(0,10)+'</td>'
                +'</tr>'
                +'<tr id="tot-2">'+'</tr>'
                    +'<tr id="tot">' +'</tr>'
                    +'<tr id="tot-2">'+'</tr>'
            var tab3 = tab1+tab+'</tbody>'
            /* 节点时间表 */
            var tabLeft =     '<thead>' // 表头
                                +'<tr class="tab-head">'
                                    +'<th>'+'项目名称'+'</th>'
                                    +'<th>'+'开始时间'+'</th>'
                                    +'<th>'+'结束时间'+'</th>'
                                +'</tr>'
                            +'</thead>'
                            +'<tbody>' // 表身 (项目节点始末)
                                +'<tr class="tab-body">'
                                    +'<td style="height: 54px">'+'项目总时长'+'</td>'
                                    +'<td style="height: 54px">'+project.startDay.substring(0,10)+'</td>'
                                    +'<td style="height: 54px">'+project.endDay.substring(0,10)+'</td>'
                                +'</tr>'
            var tabLeft4 = tabLeft + tabLeft3 +'</tbody>'
            $("#details-tab-left").empty()
            $("#details-tab-left").append(tabLeft4)
            $("#details-tab").empty()
            $("#details-tab").append(tab3);
            // 填充单元格
@@ -447,7 +460,7 @@
                var intRunDay = nodeRealEndTime-(nodeRealEndTime-(nodeEndTime-nodeStartTime))/day
                // 与当前时间的时间差
                for(var j=0;j<nodeDay;j++){
                    $(nodeId2[i]).find('td').eq(3+intDay+j).attr("style","background:#3597D6")
                    $(nodeId2[i]).find('td').eq(intDay+j).attr("style","background:#3597D6")
                }
                    // 实际开始时间与结束时间都填写  按实际时间进渲染
                if(nodeRealStartTime != "Invalid Date" && nodeRealEndTime !="Invalid Date"){ 
src/main/webapp/views/index_datashow.html
@@ -39,6 +39,7 @@
            <h2></h2>
            <button id="close" type="button" style="float: right;">关 闭</button>
        </div>
        <table id="details-tab-left" cellspacing="0" cellpadding="0"></table>
        <table id="details-tab" cellspacing="0" cellpadding="0">
            <thead>
            </thead>