diff --git a/pmcalendar.php b/pmcalendar.php index 0426cff..b9b34a1 100644 --- a/pmcalendar.php +++ b/pmcalendar.php @@ -103,6 +103,15 @@ if ($act == 'newevent') { $sql = "select * from calendar where ((start>='{$startDate}' and start<='{$endDate}') or (end>='{$startDate}' and end<='{$endDate}')) {$where}"; $rss = DB::getArray($sql); + $eventTypeCnt = array( + '节点' => 0, + '打包' => 0, + '版本更新' => 0, + '上线' => 0, + '修复外网' => 0 + + + ); $eventCount = array( '总更新&总修复' => array( 'dangerCount' => 0, @@ -118,6 +127,9 @@ if ($act == 'newevent') { 'purpleCount' => 0 ); } + if (strstr($rs['end'], $month)) { + $eventTypeCnt[$rs['event']] += 1; + } $class = "light"; if ($rs['event'] == '节点') { $class = "success"; @@ -191,6 +203,10 @@ if ($act == 'newevent') { if ($type == 'charts') // we(json_encode($eventCharts)); we(json_encode(array('charts' => $eventCharts, 'table' => $eventTable))); + elseif ($type == 'count') + { + we(json_encode($eventTypeCnt)); + } else we(json_encode($json)); } @@ -382,20 +398,40 @@ if ($act == 'newevent') { .data_box { display: none; } - .data_tab { + + .data_tab { width: 240px; - display: flex; + display: flex; justify-content: space-between; align-items: center; position: relative; top: 40px; - z-index:1000; - float:right; + z-index: 1000; + float: right; + } + + .data-box { + width: 50px; + text-align: center; + } + + .data-box img { + width: 28px; + height: 28px; + margin: 0 auto; + } + + .data-box .data-name { + font-size: 15px; + color: #5fadff; + text-align: center; + } + + .data-box .data-num { + font-size: 14px; + color: #a0a0a0; + text-align: center; } - .data-box { width: 50px; text-align:center; } - .data-box img { width:28px; height: 28px; margin: 0 auto; } - .data-box .data-name { font-size: 15px; color:#5fadff; text-align:center; } - .data-box .data-num { font-size: 14px; color:#a0a0a0; text-align:center; }
修复数据 @@ -590,20 +626,36 @@ if ($act == 'newevent') { .fujian a { color: #61adfe; } - input[type="file"] { padding: 0 14px; } - .tijaioanniu { + + input[type="file"] { + padding: 0 14px; + } + + .tijaioanniu { display: flex; justify-content: space-between; align-items: center; /* padding: 10px 0; */ } - .tijiao { width: 60px; height: 25px; background-color:#5fadff; font-size: 14px; text-align: center; line-height: 25px; color:#fff; border-radius: 4px; float: right; cursor:pointer;} + + .tijiao { + width: 60px; + height: 25px; + background-color: #5fadff; + font-size: 14px; + text-align: center; + line-height: 25px; + color: #fff; + border-radius: 4px; + float: right; + cursor: pointer; + }