From 793e798701560a92e877488982332039c2c79e73 Mon Sep 17 00:00:00 2001 From: wuhao <15392746632@qq.com> Date: Fri, 4 Dec 2020 13:49:30 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=86=E7=B1=BB=E8=AE=A1=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pmcalendar.php | 375 +++++++++++++++++++++++++++++-------------------- 1 file changed, 220 insertions(+), 155 deletions(-) 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; }