1623 lines
59 KiB
PHP
1623 lines
59 KiB
PHP
<?php
|
||
$user = SESS::get('EVENTUserInfo');
|
||
// if(isn($user))exit();
|
||
$user = json_decode($user, true);
|
||
$user['name'] = "罗松柏";
|
||
$canEdit = in_array($user['name'], $ROLES);
|
||
$isgxvrole = in_array($user['name'], $GXVROLES); //更新信息查看区浏览权限
|
||
$isgxyyerole = in_array($user['name'], $GXYYEROLES);//更新运营中心编辑权限
|
||
$isgxcperole = in_array($user['name'], $GXCPEROLES);//更新产品中心编辑权限
|
||
$isgxyferole = in_array($user['name'], $GXYFEROLES);//更新研发中心编辑权限
|
||
$isxfvrole = in_array($user['name'], $XFVROLES); //修复信息查看区浏览权限
|
||
$isxfyyerole = in_array($user['name'], $XFYYEROLES);//修复运营中心编辑权限
|
||
|
||
function fix2($v)
|
||
{
|
||
$x = '00' . $v;
|
||
return substr($x, -2);
|
||
}
|
||
|
||
$act = r('act');
|
||
$type = r('type');
|
||
if ($act == 'newevent') {
|
||
$keys = array('start', 'end', 'game', 'allday', 'shour', 'smin', 'event', 'title');
|
||
$dict = array();
|
||
foreach ($keys as $k) {
|
||
$dict[$k] = r($k);
|
||
}
|
||
$sql = DB::insert('calendar', $dict);
|
||
DB::exe($sql);
|
||
we('1');
|
||
} else if ($act == 'edityunying') {
|
||
$id = r('id');
|
||
$dict = array(
|
||
'yunying_remark' => stripslashes(r('content'))
|
||
);
|
||
|
||
$sql = DB::update('calendar', $dict, "id='{$id}'");
|
||
DB::exe($sql);
|
||
we('1');
|
||
} else if ($act == 'edityanfa') {
|
||
$id = r('id');
|
||
$dict = array(
|
||
'yanfa_remark' => stripslashes(r('content'))
|
||
);
|
||
|
||
$sql = DB::update('calendar', $dict, "id='{$id}'");
|
||
DB::exe($sql);
|
||
we('1');
|
||
} else if ($act == 'editchanpin') {
|
||
$id = r('id');
|
||
$dict = array(
|
||
'chanpin_remark' => stripslashes(r('content'))
|
||
);
|
||
|
||
$sql = DB::update('calendar', $dict, "id='{$id}'");
|
||
DB::exe($sql);
|
||
we('1');
|
||
} else if ($act == 'modievent') {
|
||
$id = r('id');
|
||
$keys = array('start', 'end', 'game', 'allday', 'shour', 'smin', 'event', 'title');
|
||
$dict = array();
|
||
foreach ($keys as $k) {
|
||
$dict[$k] = r($k);
|
||
}
|
||
$sql = DB::update('calendar', $dict, "id='{$id}'");
|
||
DB::exe($sql);
|
||
we('1');
|
||
} else if ($act == 'movevent') {
|
||
|
||
$id = r('id');
|
||
$keys = array('start', 'end');
|
||
$dict = array();
|
||
foreach ($keys as $k) {
|
||
$dict[$k] = r($k);
|
||
}
|
||
if (isn($dict['end'])) $dict['end'] = $dict['start'];
|
||
$sql = DB::update('calendar', $dict, "id='{$id}'");
|
||
DB::exe($sql);
|
||
we('1');
|
||
} else if ($act == 'delevent') {
|
||
$id = r('id');
|
||
$sql = "delete from calendar where id='{$id}'";
|
||
DB::exe($sql);
|
||
we('1');
|
||
} else if ($act == 'getEventByid') {
|
||
$id = r('id');
|
||
$sql = "select * from calendar where id='{$id}'";
|
||
$rs = DB::getOne($sql);
|
||
we(json_encode($rs));
|
||
} else if ($act == 'getEvents') {
|
||
$start = r('start');
|
||
$end = r('end');
|
||
$game = r('game');
|
||
$where = "";
|
||
|
||
if (!isn($game)) {
|
||
$where .= " and game='{$game}'";
|
||
}
|
||
|
||
$startDate = date('Y-m-d', $start);
|
||
$endDate = date('Y-m-d', $end);
|
||
$month = date('Y-m', ($start + $end) / 2);
|
||
|
||
$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,
|
||
'purpleCount' => 0
|
||
)
|
||
);
|
||
|
||
$res = array();
|
||
foreach ($rss as $rs) {
|
||
if (!$eventCount[$rs['game']]) {
|
||
$eventCount[$rs['game']] = array(
|
||
'dangerCount' => 0,
|
||
'purpleCount' => 0
|
||
);
|
||
}
|
||
if (strstr($rs['end'], $month)) {
|
||
$eventTypeCnt[$rs['event']] += 1;
|
||
}
|
||
$class = "light";
|
||
if ($rs['event'] == '节点') {
|
||
$class = "success";
|
||
} elseif ($rs['event'] == '打包') {
|
||
$class = "warning";
|
||
} elseif ($rs['event'] == '版本更新') {
|
||
$class = "danger";
|
||
if (strstr($rs['end'], $month)) {
|
||
$eventCount[$rs['game']]['dangerCount'] += 1;
|
||
$eventCount['总更新&总修复']['dangerCount'] += 1;
|
||
}
|
||
} elseif ($rs['event'] == '上线') {
|
||
$class = "pink";
|
||
} elseif ($rs['event'] == '修复外网') {
|
||
$class = "purple";
|
||
if (strstr($rs['end'], $month)) {
|
||
$eventCount[$rs['game']]['purpleCount'] += 1;
|
||
$eventCount['总更新&总修复']['purpleCount'] += 1;
|
||
}
|
||
}
|
||
|
||
$gameName = $rs['game'];
|
||
$row = array(
|
||
'id' => $rs['id'],
|
||
'title' => '【' . $gameName . '】' . $rs['event'] . ":" . $rs['title'],
|
||
'start' => $rs['start'],
|
||
'end' => $rs['end'],
|
||
'className' => 'label-' . $class,
|
||
);
|
||
$row['allDay'] = true;
|
||
$res[] = $row;
|
||
}
|
||
$eventCharts = array(array('product', '更新次数', '修复次数'));
|
||
$eventTable = array([], []);
|
||
foreach ($eventCount as $key => $value) {
|
||
if ($eventCount[$key]['purpleCount'] != 0 || $eventCount[$key]['dangerCount'] != 0)
|
||
$eventCharts[] = array($key, $eventCount[$key]['dangerCount'], $eventCount[$key]['purpleCount']);
|
||
}
|
||
foreach ($eventCharts as $value) {
|
||
$eventTable[0][] = $value[0];
|
||
$eventTable[1][0][] = $value[1];
|
||
$eventTable[1][1][] = $value[2];
|
||
if ($eventCount[$value[0]]['dangerCount'] == 0)
|
||
$eventTable[1][2][] = '0.00%';
|
||
else
|
||
$eventTable[1][2][] = number_format($eventCount[$value[0]]['purpleCount'] * 100 / $eventCount[$value[0]]['dangerCount'], 2) . '%';
|
||
}
|
||
|
||
// we(json_encode(array('charts'=>$eventCharts,'table'=>$eventTable)));
|
||
|
||
|
||
$json = array(
|
||
'calendarData' => $res
|
||
);
|
||
|
||
if (!isn($game)) {
|
||
$where = " and game='{$game}'";
|
||
$sql = "select * from calendar where 1=1 {$where} order by end";
|
||
$rss = DB::getArray($sql);
|
||
$res = array();
|
||
foreach ($rss as $rs) {
|
||
$res[] = array(
|
||
"end" => $rs['end'],
|
||
"gamename" => $rs['game'],
|
||
"event" => $rs['event'],
|
||
"title" => $rs['title']
|
||
);
|
||
}
|
||
$json["gameInfo"] = $res;
|
||
}
|
||
if ($type == 'charts')
|
||
// we(json_encode($eventCharts));
|
||
we(json_encode(array('charts' => $eventCharts, 'table' => $eventTable)));
|
||
else{
|
||
$json['count'] = $eventTypeCnt;
|
||
we(json_encode($json));
|
||
}
|
||
}
|
||
?>
|
||
<!DOCTYPE html>
|
||
<html lang="en">
|
||
<head>
|
||
<title>乐谷游戏管理系统</title>
|
||
<meta charset="utf-8"/>
|
||
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
|
||
<!-- basic styles -->
|
||
<link href="assets/css/bootstrap.min.css" rel="stylesheet"/>
|
||
<link rel="stylesheet" href="assets/css/font-awesome.min.css"/>
|
||
<!--[if IE 7]>
|
||
<link rel="stylesheet" href="assets/css/font-awesome-ie7.min.css"/>
|
||
<![endif]-->
|
||
<!--link rel="stylesheet" href="http://fonts.useso.com/css?family=Open+Sans:400,300" /-->
|
||
<!-- ace styles -->
|
||
<link rel="stylesheet" href="assets/css/ace.min.css"/>
|
||
<link rel="stylesheet" href="assets/css/ace-rtl.min.css"/>
|
||
<link rel="stylesheet" href="assets/css/ace-skins.min.css"/>
|
||
<!--[if lte IE 8]>
|
||
<link rel="stylesheet" href="assets/css/ace-ie.min.css"/>
|
||
<![endif]-->
|
||
<script src="assets/js/ace-extra.min.js?_veri=20151101"></script>
|
||
<!--[if lt IE 9]>
|
||
<script src="assets/js/html5shiv.js"></script>
|
||
<script src="assets/js/respond.min.js"></script>
|
||
<![endif]-->
|
||
<script src="assets/tmpl.js"></script>
|
||
<style>html, body, h1 {
|
||
font-family: "微软雅黑" !important
|
||
}</style>
|
||
|
||
|
||
<!--[if !IE]> -->
|
||
<script type="text/javascript">
|
||
window.jQuery || document.write("<script src='assets/js/jquery-2.0.3.min.js'>" + "<" + "script>");
|
||
</script>
|
||
<!-- <![endif]-->
|
||
|
||
<!--[if IE]>
|
||
<script type="text/javascript">
|
||
window.jQuery || document.write("<script src='assets/js/jquery-1.10.2.min.js'>" + "<" + "script>");
|
||
</script>
|
||
<![endif]-->
|
||
|
||
<script type="text/javascript">
|
||
if ("ontouchend" in document) document.write("<script src='assets/js/jquery.mobile.custom.min.js'>" + "<" + "script>");
|
||
</script>
|
||
|
||
<script src="assets/js/bootstrap.min.js"></script>
|
||
<script src="assets/js/typeahead-bs2.min.js"></script>
|
||
|
||
<!-- page specific plugin scripts -->
|
||
|
||
<!--[if lte IE 8]>
|
||
<script src="assets/js/excanvas.min.js"></script>
|
||
<![endif]-->
|
||
<script src="assets/js/jquery-ui-1.10.3.custom.min.js"></script>
|
||
<script src="assets/js/jquery.ui.touch-punch.min.js"></script>
|
||
<script src="assets/js/jquery.slimscroll.min.js"></script>
|
||
<script src="assets/js/jquery.easy-pie-chart.min.js"></script>
|
||
<script src="assets/js/jquery.sparkline.min.js"></script>
|
||
<script src="assets/js/flot/jquery.flot.min.js"></script>
|
||
<script src="assets/js/flot/jquery.flot.pie.min.js"></script>
|
||
<script src="assets/js/flot/jquery.flot.resize.min.js"></script>
|
||
<!-- ace scripts -->
|
||
<script src="assets/js/ace-elements.min.js"></script>
|
||
<script src="assets/js/ace.min.js"></script>
|
||
<script src="assets/jedate.js"></script>
|
||
<script src="assets/doT.js"></script>
|
||
<script src="assets/echarts.min.js"></script>
|
||
<script src="assets/public.js?_=123"></script>
|
||
<!-- inline scripts related to this page -->
|
||
|
||
<link rel="stylesheet" href="assets/css/fullcalendar.css"/>
|
||
</head>
|
||
|
||
<body>
|
||
|
||
<div class="main-container" id="main-container">
|
||
<script type="text/javascript">
|
||
try {
|
||
ace.settings.check('main-container', 'fixed')
|
||
} catch (e) {
|
||
}
|
||
</script>
|
||
|
||
<div class="main-container-inner">
|
||
|
||
<div class="main-content">
|
||
<div class="page-content">
|
||
<div class="page-header">
|
||
<!-- <h1>LeGu Event</h1> -->
|
||
<img src="assets/images/logo.png">
|
||
<div class='xian2'></div>
|
||
</div>
|
||
<div id="gamesbtn" style="padding:0 11px 15px 11px;">
|
||
<!-- 筛选: -->
|
||
<!-- <?php if ($canEdit) { ?><a href="./?app=edit" class='btn btn-minier btn-pink'>编辑游戏</a><? } ?> -->
|
||
<a href="./?app=edit" class='btn btn-minier btn-pink'>编辑游戏</a>
|
||
<button value='' onclick='onlyShowGame(this)' class='btn btn-minier btn-info'>显示全部</button>
|
||
<?php
|
||
foreach ($GAMES as $g) {
|
||
echo "<button value='{$g}' onclick='onlyShowGame(this)' class='btn btn-minier'>{$g}</button> ";
|
||
} ?>
|
||
|
||
<div class="space-6"></div>
|
||
|
||
</div>
|
||
|
||
<style>
|
||
.xian2 {
|
||
width: calc(100% - 200px);
|
||
height: 1px;
|
||
background-color:#f3f3f3;
|
||
}
|
||
.datarepair {
|
||
z-index: 1000;
|
||
width: 100px;
|
||
height: 27px;
|
||
line-height: 27px;
|
||
position: relative;
|
||
top: 60px;
|
||
color: #9f9f9f;
|
||
margin: 0 auto;
|
||
cursor: pointer;
|
||
font-size: 14px;
|
||
display: flex;
|
||
background-color:#f3f3f3;
|
||
border-radius: 8px;
|
||
text-align: center;
|
||
margin-bottom: 15px;
|
||
}
|
||
|
||
.datarepair img {
|
||
width: 16px;
|
||
height: 16px;
|
||
margin-right: 5px;
|
||
margin-left: 10px;
|
||
margin-top: 6px;
|
||
}
|
||
|
||
#gameinfo {
|
||
/* margin: 15px 0; */
|
||
height: 13px;
|
||
background-color:#f5f5f9;
|
||
}
|
||
|
||
#gameinfo li {
|
||
padding: 0px 0 0 20px;
|
||
line-height: 40px;
|
||
background: #50abe4;
|
||
display: inline-block;
|
||
color: #fff;
|
||
position: relative;
|
||
display: inline-block;
|
||
margin: 5px
|
||
|
||
}
|
||
|
||
#gameinfo li:after {
|
||
content: '';
|
||
display: block;
|
||
border-top: 20px solid transparent;
|
||
border-bottom: 20px solid transparent;
|
||
border-left: 20px solid #50abe4;
|
||
position: absolute;
|
||
right: -20px;
|
||
top: 0;
|
||
z-index: 10;
|
||
}
|
||
|
||
#gameinfo li:before {
|
||
content: '';
|
||
display: block;
|
||
border-top: 20px solid transparent;
|
||
border-bottom: 20px solid transparent;
|
||
border-left: 20px solid #fff;
|
||
position: absolute;
|
||
left: 0px;
|
||
top: 0;
|
||
}
|
||
|
||
.fc-header {
|
||
position: relative;
|
||
top: -40px;
|
||
}
|
||
</style>
|
||
|
||
<div id="gameinfo" style="display:block">
|
||
<ul>
|
||
|
||
</ul>
|
||
</div>
|
||
|
||
|
||
<style>
|
||
.fc-event {
|
||
border: none
|
||
}
|
||
|
||
.data_box {
|
||
display: none;
|
||
}
|
||
|
||
.data_tab {
|
||
width: 325px;
|
||
display: flex;
|
||
justify-content: space-between;
|
||
align-items: center;
|
||
position: relative;
|
||
top: 18px;
|
||
right: 11px;
|
||
z-index: 1000;
|
||
float: right;
|
||
}
|
||
|
||
.data-box {
|
||
width: 80px;
|
||
text-align: center;
|
||
display: flex;
|
||
align-items: center;
|
||
}
|
||
|
||
.data-box img {
|
||
width: 24px;
|
||
/* margin: 0 auto; */
|
||
margin-right: 5px
|
||
}
|
||
|
||
.data-box .data-name {
|
||
font-size: 12px;
|
||
color: #8e8e8e;
|
||
text-align: center;
|
||
}
|
||
|
||
.data-box .data-num {
|
||
font-size: 14px;
|
||
color: #a0a0a0;
|
||
text-align: center;
|
||
}
|
||
.formtab {
|
||
padding: 27px 0px !important;
|
||
color:#474747 !important;
|
||
border: 0px !important;
|
||
}
|
||
</style>
|
||
<div class='datarepair' id="datarepair" onclick="datarepair()">
|
||
<img src='assets/images/tongji.png' id="dataimg"/> <span id='datarepairname'>查看统计</span>
|
||
</div>
|
||
<div class='data_tab'>
|
||
<div class='data-box'>
|
||
<img src="assets/images/dabao.png"/>
|
||
<p class="data-name">打包</p>
|
||
<p class="data-num" id="dabaonum"></p>
|
||
</div>
|
||
|
||
<div class='data-box'>
|
||
<img src="assets/images/gengxin.png"/>
|
||
<p class="data-name">更新</p>
|
||
<p class="data-num" id="gengxinnum"></p>
|
||
</div>
|
||
|
||
<div class='data-box'>
|
||
<img src="assets/images/xiufu.png"/>
|
||
<p class="data-name">修复</p>
|
||
<p class="data-num" id="xiufunum"></p>
|
||
</div>
|
||
|
||
<div class='data-box'>
|
||
<img src="assets/images/jeidian.png"/>
|
||
<p class="data-name">节点</p>
|
||
<p class="data-num" id="jeidiannum"></p>
|
||
</div>
|
||
</div>
|
||
<div class='data_box' id='data_box'>
|
||
|
||
<div id="chart" class="chartbox" style="width:100%;height:400px; margin-top:90px;"></div>
|
||
|
||
<div class="card-body">
|
||
<table class="table table-bordered table-striped" style='border:0px !important'>
|
||
<thead id="thead-title" class="thead" ></thead>
|
||
<tbody id="tbody-content"></tbody>
|
||
</table>
|
||
</div>
|
||
|
||
</div>
|
||
|
||
<div class="col-xm-12" id="calendardiv">
|
||
<div id="calendar"></div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
</div>
|
||
|
||
<a href="#" id="btn-scroll-up" class="btn-scroll-up btn btn-sm btn-inverse">
|
||
<i class="icon-double-angle-up icon-only bigger-110"></i>
|
||
</a>
|
||
</div>
|
||
<style>
|
||
/* */
|
||
.popup-bg {
|
||
width: 100%;
|
||
height: 100%;
|
||
min-height: 100%;
|
||
background-color: rgba(000, 000, 000, 0.5);
|
||
position: fixed;
|
||
top: 0;
|
||
z-index: 1000;
|
||
display: flex;
|
||
display: none;
|
||
}
|
||
|
||
.yiny {
|
||
width: calc(100% - 350px);
|
||
height: 100%;
|
||
min-height: 100%;
|
||
position: fixed;
|
||
top: 0;
|
||
z-index: 1000;
|
||
}
|
||
|
||
.popup-box {
|
||
width: 350px;
|
||
height: 100%;
|
||
min-height: 100%;
|
||
background-color: #fff;
|
||
position: fixed;
|
||
right: 0;
|
||
z-index: 1001;
|
||
}
|
||
|
||
.pop-top {
|
||
width: 100%;
|
||
background-color: #ececec;
|
||
display: flex;
|
||
padding: 15px 20px;
|
||
}
|
||
|
||
.bianji {
|
||
width: 20px;
|
||
height: 20px;
|
||
cursor: pointer;
|
||
}
|
||
|
||
.bianji img {
|
||
width: 100%;
|
||
}
|
||
|
||
.pop-title {
|
||
color: #494949;
|
||
font-size: 18px;
|
||
margin: 0 auto;
|
||
cursor: pointer;
|
||
}
|
||
|
||
.list-box {
|
||
margin: 10px 20px 0 20px;
|
||
border: 1px solid #f2f2f2;
|
||
}
|
||
|
||
.list-title {
|
||
display: flex;
|
||
justify-content: space-between;
|
||
align-items: center;
|
||
padding: 10px 0;
|
||
border-bottom: 1px solid #f2f2f2;
|
||
}
|
||
|
||
.tit {
|
||
display: flex;
|
||
align-items: center;
|
||
font-size: 16px;
|
||
color: #686868;
|
||
}
|
||
|
||
.xian {
|
||
width: 7px;
|
||
height: 15px;
|
||
background-color: #5fadff;
|
||
margin-left: 10px;
|
||
margin-right: 5px;
|
||
}
|
||
|
||
.cptime {
|
||
font-size: 12px;
|
||
color: #c1c1c1;
|
||
margin-right: 14px;
|
||
}
|
||
|
||
.cptext-box {
|
||
border-bottom: 1px solid #f2f2f2;
|
||
}
|
||
|
||
.cptext-box textarea {
|
||
width: 100%;
|
||
height: 100px;
|
||
padding: 20px 14px;
|
||
font-size: 12px;
|
||
color: #848484;
|
||
border: 0;
|
||
resize: none;
|
||
line-height: 18px;
|
||
}
|
||
|
||
.fujian {
|
||
display: flex;
|
||
align-items: center;
|
||
font-size: 12px;
|
||
color: #b8b8b8;
|
||
}
|
||
|
||
.fujian img {
|
||
width: 14px;
|
||
height: 12px;
|
||
margin-right: 7px;
|
||
margin-left: 14px;
|
||
}
|
||
|
||
.tianjia {
|
||
width: 15px;
|
||
height: 15px;
|
||
margin-right: 0px;
|
||
position: absolute;
|
||
top: 10px;
|
||
right: 0;
|
||
}
|
||
|
||
.fujian-box {
|
||
/* display: flex;
|
||
justify-content: space-between;
|
||
align-items: center; */
|
||
padding: 10px 0;
|
||
}
|
||
|
||
.tianjiainp {
|
||
display: none !important;
|
||
}
|
||
|
||
.fujian a {
|
||
color: #61adfe;
|
||
}
|
||
|
||
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;
|
||
margin-top: 25px;
|
||
}
|
||
.upfujian {
|
||
width: 100%;
|
||
margin: 0 20px;
|
||
}
|
||
</style>
|
||
<div class='popup-bg' id='popup-bg'>
|
||
<div class="yiny" id='yiny'></div>
|
||
<div class='popup-box'>
|
||
<div class="pop-top">
|
||
<div class='bianji' onclick='bianji()'><img src='assets/images/bianji.png'/></div>
|
||
<div class="pop-title" id='pop-title' onclick='Info()'></div>
|
||
</div>
|
||
<div class="list-box">
|
||
<div class='list-title'>
|
||
<div class='tit'>
|
||
<div class='xian'></div>
|
||
产品中心注释
|
||
</div>
|
||
<div class='cptime' id='cptime'></div>
|
||
</div>
|
||
<div class='cptext-box'>
|
||
<textarea disabled='disabled' id='cptext'></textarea>
|
||
</div>
|
||
<div class='fujian-box'>
|
||
|
||
<!-- 附件 -->
|
||
<div class='fujian' id='fujianname'></div>
|
||
<div class="tijaioanniu">
|
||
<div style=" position: relative; display: none" class="upfujian" id="upfujian_cp">
|
||
<img class='tianjia' src='/assets/images/jiahao.png'/>
|
||
<iframe id="_hideiframe" name="_hideiframe" style="display: none;"></iframe>
|
||
<form method="post" id="uploader" style="display: block; clear: both; margin-top: 10px;;"
|
||
target="_hideiframe" action="" enctype="multipart/form-data">
|
||
<input name="cid" type="hidden" value="<%=DATA.lastShowCardID%>" style='opacity: 0; position: absolute;z-index: 1001;'/>
|
||
<input type="file" id="fujian" name="fujian[]" multiple
|
||
onchange="document.getElementById('uploader').submit()" style='opacity: 0; position: absolute;z-index: 1001;'>
|
||
</form>
|
||
<div class='tijiao' id="cptijiao">提交</div>
|
||
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="list-box">
|
||
<div class='list-title'>
|
||
<div class='tit'>
|
||
<div class='xian'></div>
|
||
运营中心注释
|
||
</div>
|
||
<div class='cptime' id='yytime'></div>
|
||
</div>
|
||
<div class='cptext-box'>
|
||
<textarea disabled='disabled' id='yytext'></textarea>
|
||
</div>
|
||
<div class='fujian-box'>
|
||
|
||
<!-- 附件 -->
|
||
<div class='fujian' disabled='disabled' id='yyfujian'></div>
|
||
|
||
<!-- <div style=" position: relative;display: inline-block;">
|
||
<img class='tianjia' src='/assets/images/jiahao.png'/>
|
||
<input name="customer_file" type="file" id="excelFile2"
|
||
style="position: absolute;top: 0;left: 0;right: 0;bottom: 0;z-index: 1001;opacity: 0;filter:alpha(opacity=0);">
|
||
</div> -->
|
||
<div class="tijaioanniu">
|
||
<div style=" position: relative;display: none;" class="upfujian" id="upfujian_yy">
|
||
<img class='tianjia' src='/assets/images/jiahao.png'/>
|
||
<iframe id="_hideiframe2" name="_hideiframe" style="display: none;"></iframe>
|
||
<form method="post" id="uploader_yy" style="display: block; clear: both; margin-top: 10px;;"
|
||
target="_hideiframe" action="" enctype="multipart/form-data">
|
||
<input name="cid" type="hidden" value="<%=DATA.lastShowCardID%>" style='opacity: 0; position: absolute;z-index: 1001;'/>
|
||
<input type="file" id="fujian_yy" name="fujian[]" multiple
|
||
onchange="document.getElementById('uploader_yy').submit()" style='opacity: 0;position: absolute;z-index: 1001;'>
|
||
</form>
|
||
<div class='tijiao' id="yytijiao">提交</div>
|
||
</div>
|
||
</div>
|
||
|
||
|
||
</div>
|
||
</div>
|
||
|
||
<div class="list-box">
|
||
<div class='list-title'>
|
||
<div class='tit'>
|
||
<div class='xian'></div>
|
||
研发中心注释
|
||
</div>
|
||
<div class='cptime' id='yftime'></div>
|
||
</div>
|
||
<div class='cptext-box'>
|
||
<textarea disabled='disabled' id='yftext'></textarea>
|
||
</div>
|
||
<div class='fujian-box'>
|
||
|
||
<!-- 附件 -->
|
||
<div class='fujian' id='yffujian'></div>
|
||
<div class="tijaioanniu">
|
||
<div style=" position: relative;display: none;" class="upfujian" id="upfujian_yf">
|
||
<img class='tianjia' src='/assets/images/jiahao.png'/>
|
||
<iframe id="_hideiframe3" name="_hideiframe" style="display: none;"></iframe>
|
||
<form method="post" id="uploader_yf" style="display: block; clear: both; margin-top: 10px;;"
|
||
target="_hideiframe" action="" enctype="multipart/form-data">
|
||
<input name="cid" type="hidden" value="<%=DATA.lastShowCardID%>" style='opacity: 0; position: absolute;z-index: 1001;'/>
|
||
<input type="file" id="fujian_yf" name="fujian[]" multiple
|
||
onchange="document.getElementById('uploader_yf').submit()" style='opacity: 0; position: absolute;z-index: 1001;'>
|
||
</form>
|
||
<div class='tijiao' id="yftijiao">提交</div>
|
||
</div>
|
||
</div>
|
||
|
||
</div>
|
||
</div>
|
||
|
||
</div>
|
||
</div>
|
||
|
||
<link rel="stylesheet" href="assets/css/jquery.gritter.css"/>
|
||
<script src="assets/js/jquery.gritter.min.js"></script>
|
||
|
||
<script src="assets/js/bootbox.min.js"></script>
|
||
<script src="assets/js/fullcalendar.min.js"></script>
|
||
|
||
<link rel="stylesheet" href="assets/css/daterangepicker.css"/>
|
||
<script src="assets/js/date-time/moment.min.js"></script>
|
||
<script src="assets/js/date-time/daterangepicker.min.js"></script>
|
||
|
||
<script type="text/x-dot-template" id="thead-dot">
|
||
<tr style="background:#fafafa !important;">
|
||
{{~it:item:index}}
|
||
|
||
<th class='formtab' style="padding: 25px 0px; color:#474747; border: 0px;">{{=item}}</th>
|
||
|
||
{{~}}
|
||
</tr>
|
||
</script>
|
||
|
||
<script type="text/x-dot-template" id="tbody-dot">
|
||
{{ for(var i in it) { }}
|
||
<tr>
|
||
{{ for(var k in it[i]) { }}
|
||
<td>{{= it[i][k]}}</td>
|
||
{{ } }}
|
||
</tr>
|
||
{{ } }}
|
||
</script>
|
||
|
||
<script type="text/x-dot-template" id="fujian-dot">
|
||
{{~it:item:index}}
|
||
{{? item != ''}}
|
||
<img src="/assets/images/xiazai.png"/>
|
||
<div id='cpfuinfo'>
|
||
<a href='http://leguevent.local{{= item.file}}'>{{= item.name}}</a>
|
||
</div>
|
||
{{??}}
|
||
<div class='fujian'>
|
||
<img src="/assets/images/fujian.png"/>
|
||
未添加附件
|
||
</div>
|
||
{{?}}
|
||
{{~}}
|
||
</script>
|
||
|
||
<script>
|
||
var showGame = "";
|
||
var starttime, endtime;
|
||
var dstr = ''
|
||
var dict = {};
|
||
var notid;
|
||
|
||
$('#fujian').change(function () {
|
||
var wenjianname = $('#fujian').val();
|
||
var obj = document.getElementById("fujian");
|
||
var len = obj.files.length;
|
||
var temp;
|
||
for (var i = 0; i < len; i++) {
|
||
temp = obj.files[i].name;
|
||
}
|
||
var arr = [];
|
||
var data = {};
|
||
data['name'] = temp
|
||
data['file'] = "#"
|
||
arr.push(data)
|
||
tmpltxt = doT.template(document.getElementById("fujian-dot").innerHTML);//生成模板方法
|
||
document.getElementById("fujianname").innerHTML = tmpltxt(arr);//数据渲染
|
||
// console.log('arr');
|
||
})
|
||
|
||
$("#fujian_yy").change(function () {
|
||
var wenjianname = $('#fujian_yy').val();
|
||
var obj = document.getElementById("fujian_yy");
|
||
var len = obj.files.length;
|
||
var temp;
|
||
for (var i = 0; i < len; i++) {
|
||
temp = obj.files[i].name;
|
||
}
|
||
var arr = [];
|
||
var data = {};
|
||
data['name'] = temp
|
||
data['file'] = "#"
|
||
arr.push(data)
|
||
tmpltxt = doT.template(document.getElementById("fujian-dot").innerHTML);//生成模板方法
|
||
document.getElementById("yyfujian").innerHTML = tmpltxt(arr);//数据渲染
|
||
})
|
||
|
||
$("#fujian_yf").change(function () {
|
||
var wenjianname = $('#fujian_yf').val();
|
||
var obj = document.getElementById("fujian_yf");
|
||
var len = obj.files.length;
|
||
var temp;
|
||
for (var i = 0; i < len; i++) {
|
||
temp = obj.files[i].name;
|
||
}
|
||
var arr = [];
|
||
var data = {};
|
||
data['name'] = temp
|
||
data['file'] = "#"
|
||
arr.push(data)
|
||
tmpltxt = doT.template(document.getElementById("fujian-dot").innerHTML);//生成模板方法
|
||
document.getElementById("yffujian").innerHTML = tmpltxt(arr);//数据渲染
|
||
})
|
||
|
||
//产品提交
|
||
$('#cptijiao').click(function () {
|
||
var cptext = $("#cptext").val();
|
||
var myDate = new Date();
|
||
var year = myDate.getFullYear(); //获取当前年份(2位)
|
||
var month = myDate.getMonth();
|
||
var day = myDate.getDate();
|
||
var branch = myDate.getHours(); //获取当前小时数(0-23)
|
||
var second = myDate.getMinutes(); //获取当前分钟数(0-59)
|
||
|
||
var arr = {}
|
||
arr['msg'] = cptext,
|
||
arr['date'] = year + '-' + month + '-' + day + ' ' + branch + ':' + second
|
||
arr = JSON.stringify(arr)
|
||
$.ajax({
|
||
url: './?app=pmcalendar&act=editchanpin',
|
||
dataType: 'application/x-www-form-urlencoded',
|
||
type: "post",
|
||
async: "true",
|
||
data: {
|
||
id: notid,
|
||
content: arr
|
||
},
|
||
success: function (res) {
|
||
console.log(res);
|
||
alert('提交成功');
|
||
showEventData(notid);
|
||
},
|
||
error: function () {
|
||
alert('数据异常,请稍后重试!!!');
|
||
showEventData(notid);
|
||
}
|
||
});
|
||
})
|
||
//运营
|
||
$('#yytijiao').click(function () {
|
||
var yytext = $("#yytext").val();
|
||
var myDate = new Date();
|
||
var year = myDate.getFullYear(); //获取当前年份(2位)
|
||
var month = myDate.getMonth();
|
||
var day = myDate.getDate();
|
||
var branch = myDate.getHours(); //获取当前小时数(0-23)
|
||
var second = myDate.getMinutes(); //获取当前分钟数(0-59)
|
||
|
||
var arr = {}
|
||
arr['msg'] = yytext,
|
||
arr['date'] = year + '-' + month + '-' + day + ' ' + branch + ':' + second
|
||
arr = JSON.stringify(arr)
|
||
$.ajax({
|
||
url: './?app=pmcalendar&act=edityunying',
|
||
dataType: 'json',
|
||
data: {
|
||
id: notid,
|
||
content: arr
|
||
},
|
||
success: function (res) {
|
||
console.log(res);
|
||
alert('提交成功');
|
||
showEventData(notid);
|
||
},
|
||
error: function () {
|
||
alert('数据异常,请稍后重试!!!');
|
||
showEventData(notid);
|
||
}
|
||
});
|
||
})
|
||
|
||
//研发
|
||
$('#yftijiao').click(function () {
|
||
var yftext = $("#yftext").val();
|
||
var myDate = new Date();
|
||
var year = myDate.getFullYear(); //获取当前年份(2位)
|
||
var month = myDate.getMonth();
|
||
var day = myDate.getDate();
|
||
var branch = myDate.getHours(); //获取当前小时数(0-23)
|
||
var second = myDate.getMinutes(); //获取当前分钟数(0-59)
|
||
var arr = {}
|
||
arr['msg'] = yftext,
|
||
arr['date'] = year + '-' + month + '-' + day + ' ' + branch + ':' + second
|
||
arr = JSON.stringify(arr)
|
||
$.ajax({
|
||
url: './?app=pmcalendar&act=edityanfa',
|
||
dataType: 'json',
|
||
data: {
|
||
id: notid,
|
||
content: arr
|
||
},
|
||
success: function (res) {
|
||
console.log(res);
|
||
alert('提交成功');
|
||
showEventData(notid);
|
||
},
|
||
error: function () {
|
||
alert('数据异常,请稍后重试!!!');
|
||
showEventData(notid);
|
||
}
|
||
});
|
||
})
|
||
|
||
var i = 0;
|
||
|
||
function bianji() {
|
||
|
||
if ("<?=$isgxyyerole?>" == "1") {
|
||
if (i == 0) {
|
||
$('#yytext').attr('disabled', false)
|
||
$("#upfujian_yy").show();
|
||
i = 1;
|
||
} else {
|
||
$('#yytext').attr('disabled', true)
|
||
$("#upfujian_yy").hide();
|
||
i = 0;
|
||
}
|
||
};
|
||
console.log("<?=$isgxcperole?>")
|
||
if ("<?=$isgxcperole?>" == "1") {
|
||
if (i == 0) {
|
||
$('#cptext').attr('disabled', false)
|
||
$("#upfujian_cp").show();
|
||
i = 1;
|
||
} else {
|
||
$('#cptext').attr('disabled', true)
|
||
$("#upfujian_cp").hide();
|
||
i = 0;
|
||
}
|
||
};
|
||
if ("<?=$isgxyferole?>" == "1") {
|
||
if (i == 0) {
|
||
$('#yftext').attr('disabled', false)
|
||
$("#upfujian_yf").show();
|
||
upfujian_yf
|
||
i = 1;
|
||
} else {
|
||
$('#yftext').attr('disabled', true)
|
||
$("#upfujian_yf").hide();
|
||
i = 0;
|
||
}
|
||
};
|
||
|
||
if ("<?=$isxfyyerole?>" == "1") {
|
||
if (i == 0) {
|
||
$('#yytext').attr('disabled', false)
|
||
$("#upfujian_yy").show();
|
||
i = 1;
|
||
} else {
|
||
$('#yytext').attr('disabled', true)
|
||
$("#upfujian_yy").hide();
|
||
i = 0;
|
||
}
|
||
};
|
||
}
|
||
|
||
function onlyShowGame(o) {
|
||
if (o.value != '') {
|
||
$('#datarepair').hide();
|
||
} else {
|
||
$('#datarepair').show();
|
||
}
|
||
showGame = (o.value);
|
||
calendar.fullCalendar('refetchEvents');
|
||
$('#gamesbtn button').removeClass('btn-purple').removeClass('btn-info');
|
||
$(o).addClass('btn-info');
|
||
}
|
||
|
||
function fix2(v) {
|
||
var v = '00' + v;
|
||
return v.substr(v.length - 2, 2);
|
||
}
|
||
|
||
$(function () {
|
||
/* initialize the calendar
|
||
-----------------------------------------------------------------*/
|
||
|
||
var date = new Date();
|
||
var d = date.getDate();
|
||
var m = date.getMonth();
|
||
var y = date.getFullYear();
|
||
|
||
|
||
var calendar = window.calendar = $('#calendar').fullCalendar({
|
||
buttonText: {
|
||
prev: '<i class="icon-chevron-left"></i>',
|
||
next: '<i class="icon-chevron-right"></i>',
|
||
prevYear: '去年',
|
||
nextYear: '明年',
|
||
today: '',
|
||
month: '月',
|
||
week: '周',
|
||
day: '日'
|
||
},
|
||
timeFormat: 'H:mm',
|
||
monthNames: ["一月", "二月", "三月", "四月", "五月", "六月", "七月", "八月", "九月", "十月", "十一月", "十二月"],
|
||
monthNamesShort: ["一月", "二月", "三月", "四月", "五月", "六月", "七月", "八月", "九月", "十月", "十一月", "十二月"],
|
||
dayNames: ["周日", "周一", "周二", "周三", "周四", "周五", "周六"],
|
||
dayNamesShort: ["周日", "周一", "周二", "周三", "周四", "周五", "周六"],
|
||
|
||
header: {
|
||
left: 'prev,next today',
|
||
center: 'title',
|
||
right: 'month,agendaWeek,agendaDay'
|
||
},
|
||
//events: './?app=calendar&act=getEvents&game='+showGame,
|
||
events: function (start, end, callback) {
|
||
starttime = start;
|
||
endtime = end;
|
||
|
||
|
||
$.ajax({
|
||
url: './?app=pmcalendar&act=getEvents',
|
||
dataType: 'json',
|
||
data: {
|
||
start: Math.round(start.getTime() / 1000),
|
||
end: Math.round(end.getTime() / 1000),
|
||
game: showGame
|
||
},
|
||
success: function (doc) {
|
||
console.log(doc);
|
||
callback(doc.calendarData);
|
||
// console.log(doc);\
|
||
$("#dabaonum").html("("+doc.count['打包']+")");
|
||
$("#gengxinnum").html("("+doc.count['版本更新']+")");
|
||
$("#xiufunum").html("("+doc.count['修复外网']+")");
|
||
$("#jeidiannum").html("("+doc.count['节点']+")");
|
||
console.log(doc.calendarData)
|
||
if (doc.gameInfo && doc.gameInfo.length > 0) {
|
||
var _html = [];
|
||
for (var i = 0; i < doc.gameInfo.length; i++) {
|
||
var _v = doc.gameInfo[i];
|
||
_html.push("<li>" + _v.end + " " + _v.event + " " + _v.title + "</li>");
|
||
}
|
||
|
||
$('#gameinfo ul').html(_html.join(''));
|
||
} else {
|
||
$('#gameinfo ul').html('');
|
||
}
|
||
}
|
||
});
|
||
},
|
||
|
||
eventRender: function (event, element) {
|
||
element.html(event.title);
|
||
},
|
||
|
||
editable: <?=$canEdit ? "true" : "false"?>,
|
||
eventDrop: function (event, dayDelta, minuteDelta, allDay, revertFunc) {
|
||
|
||
dict = {id: event.id};
|
||
dict.start = $.fullCalendar.formatDate(event.start, 'yyyy-MM-dd');
|
||
dict.end = $.fullCalendar.formatDate(event.end, 'yyyy-MM-dd');
|
||
loading.show();
|
||
$.post('./?app=pmcalendar&act=movevent', dict, function (txt) {
|
||
loading.hide();
|
||
if (txt == '1') {
|
||
calendar.fullCalendar('refetchEvents');
|
||
}
|
||
});
|
||
return false;
|
||
}
|
||
,
|
||
selectable: true,
|
||
selectHelper: true,
|
||
select: function (start, end, allDay) {
|
||
if ("<?=$canEdit?>" != "1") return;
|
||
dict = {};
|
||
// console.log('select', start, end, allDay);
|
||
|
||
dict.start = $.fullCalendar.formatDate(start, 'yyyy-MM-dd');
|
||
dict.end = $.fullCalendar.formatDate(end, 'yyyy-MM-dd');
|
||
|
||
showEventInfo(dict.start, {
|
||
"save": {
|
||
"label": "<i class='icon-check'></i> 保存",
|
||
"className": "btn-sm btn-success",
|
||
"callback": function () {
|
||
dict.game = $('#game').val();
|
||
dict.allday = 1;
|
||
|
||
dict.title = $('#title').val();
|
||
dict.event = $('#event').val();
|
||
|
||
if (dict.game == '' || dict.title == '') return;
|
||
|
||
loading.show();
|
||
$.post('./?app=pmcalendar&act=newevent', dict, function (txt) {
|
||
loading.hide();
|
||
if (txt == '1') {
|
||
calendar.fullCalendar('refetchEvents');
|
||
}
|
||
});
|
||
}
|
||
},
|
||
"close": {
|
||
"label": "<i class='icon-remove'></i> Close",
|
||
"className": "btn-sm"
|
||
}
|
||
}, 'new');
|
||
calendar.fullCalendar('unselect');
|
||
}
|
||
,
|
||
eventClick: function (calEvent, jsEvent, view) {
|
||
console.log(calEvent.className[0])
|
||
notid = calEvent.id;
|
||
// if ("<?=$canEdit?>" != "1") {
|
||
|
||
if (calEvent.className[0] == 'label-danger') {
|
||
if ("<?=$isgxvrole?>" != "1" && "<?=$isgxyyerole?>" != "1" && "<?=$isgxcperole?>" != "1" && "<?=$isgxyferole?>" != "1" && "<?=$canEdit?>" != "1") {
|
||
return
|
||
} else {
|
||
$('#uploader').attr('action', './?app=uploader&id=' + calEvent.id + '&bumen=chanpin&act=add');
|
||
$('#uploader_yy').attr('action', './?app=uploader&id=' + calEvent.id + '&bumen=yunyig&act=add')
|
||
$("#uploader_yf").attr('action', './?app=uploader&id=' + calEvent.id + '&bumen=yanfa&act=add')
|
||
|
||
//console.log($('#uploader').attr('action'))
|
||
|
||
dict = {};
|
||
$.post('./?app=pmcalendar&act=getEventByid', {id: calEvent.id}, function (txt) {
|
||
var j = JSON.parse(txt);
|
||
dict.start = j.start;
|
||
dict.end = j.end;
|
||
dict.id = calEvent.id;
|
||
$('#game').val(j.game);
|
||
$('#hour').val(j.shour);
|
||
$('#min').val(j.smin);
|
||
$('#event').val(j.event);
|
||
$('#title').val(j.title);
|
||
hourChange($('#hour'));
|
||
});
|
||
dstr = $.fullCalendar.formatDate(calEvent.start, 'yyyy-MM-dd');
|
||
showEventData(calEvent.id);
|
||
}
|
||
;
|
||
} else if (calEvent.className[0] == 'label-purple') {
|
||
if ("<?=$isxfvrole?>" != "1" && "<?=$isxfyyerole?>" != "1" && "<?=$canEdit?>" != "1") {
|
||
return
|
||
} else {
|
||
$('#uploader').attr('action', './?app=uploader&id=' + calEvent.id + '&bumen=chanpin&act=add');
|
||
$('#uploader_yy').attr('action', './?app=uploader&id=' + calEvent.id + '&bumen=yunyig&act=add')
|
||
$("#uploader_yf").attr('action', './?app=uploader&id=' + calEvent.id + '&bumen=yanfa&act=add')
|
||
|
||
//console.log($('#uploader').attr('action'))
|
||
|
||
dict = {};
|
||
$.post('./?app=pmcalendar&act=getEventByid', {id: calEvent.id}, function (txt) {
|
||
var j = JSON.parse(txt);
|
||
dict.start = j.start;
|
||
dict.end = j.end;
|
||
dict.id = calEvent.id;
|
||
$('#game').val(j.game);
|
||
$('#hour').val(j.shour);
|
||
$('#min').val(j.smin);
|
||
$('#event').val(j.event);
|
||
$('#title').val(j.title);
|
||
hourChange($('#hour'));
|
||
});
|
||
dstr = $.fullCalendar.formatDate(calEvent.start, 'yyyy-MM-dd');
|
||
showEventData(calEvent.id);
|
||
}
|
||
;
|
||
} else {
|
||
return
|
||
}
|
||
// }else {
|
||
// $('#uploader').attr('action', './?app=uploader&id=' + calEvent.id + '&bumen=chanpin&act=add');
|
||
// $('#uploader_yy').attr('action', './?app=uploader&id=' + calEvent.id + '&bumen=yunyig&act=add')
|
||
// $("#uploader_yf").attr('action', './?app=uploader&id=' + calEvent.id + '&bumen=yanfa&act=add')
|
||
|
||
// //console.log($('#uploader').attr('action'))
|
||
|
||
// dict = {};
|
||
// $.post('./?app=pmcalendar&act=getEventByid', {id: calEvent.id}, function (txt) {
|
||
// var j = JSON.parse(txt);
|
||
// dict.start = j.start;
|
||
// dict.end = j.end;
|
||
// dict.id = calEvent.id;
|
||
// $('#game').val(j.game);
|
||
// $('#hour').val(j.shour);
|
||
// $('#min').val(j.smin);
|
||
// $('#event').val(j.event);
|
||
// $('#title').val(j.title);
|
||
// hourChange($('#hour'));
|
||
// });
|
||
// dstr = $.fullCalendar.formatDate(calEvent.start, 'yyyy-MM-dd');
|
||
// showEventData(calEvent.id);
|
||
// }
|
||
|
||
}
|
||
|
||
});
|
||
|
||
});
|
||
|
||
function datarepair() {
|
||
var dis = $("#data_box").css('display');
|
||
if (dis == 'none') {
|
||
$('#data_box').show();
|
||
$('#calendardiv').hide();
|
||
|
||
$('#datarepairname').html('返回Event');
|
||
$("#dataimg").attr("src",'assets/images/fanhui.png');
|
||
var time = (Math.round(starttime.getTime()) + Math.round(endtime.getTime())) / 2;
|
||
time = new Date(time);
|
||
var year = time.getFullYear() + '年';
|
||
var month = time.getMonth() + 1 + '月';
|
||
|
||
$.ajax({
|
||
url: './?app=pmcalendar&act=getEvents',
|
||
dataType: 'json',
|
||
data: {
|
||
start: Math.round(starttime.getTime() / 1000),
|
||
end: Math.round(endtime.getTime() / 1000),
|
||
game: showGame,
|
||
type: 'charts'
|
||
},
|
||
|
||
success: function (res) {
|
||
var myChart = echarts.init(document.getElementById('chart'));
|
||
var chartsdata = res.charts;
|
||
|
||
var option = {
|
||
title: {
|
||
text: [year, month].join(''),
|
||
left: 'center',
|
||
textStyle: {
|
||
fontWeight: 'normal',
|
||
color: '#6fb3e0',
|
||
}
|
||
},
|
||
color: ['#ff7f7f', '#a494f9'],
|
||
toolbox: {
|
||
show: true,
|
||
orient: 'vertical',
|
||
left: 'right',
|
||
top: 'center',
|
||
feature: {
|
||
mark: {show: true},
|
||
dataView: {show: true, readOnly: false},
|
||
magicType: {show: true, type: ['line', 'bar', 'stack', 'tiled']},
|
||
restore: {show: true},
|
||
saveAsImage: {show: true}
|
||
}
|
||
},
|
||
legend: {
|
||
left: 10
|
||
},
|
||
tooltip: {},
|
||
grid: {
|
||
left: '3%',
|
||
right: '3%',
|
||
bottom: '5%',
|
||
// top: '0%',
|
||
containLabel: true
|
||
},
|
||
color: ['#ff7f7f', '#a494f9'],
|
||
dataset: {
|
||
source: chartsdata
|
||
},
|
||
xAxis: {type: 'category'},
|
||
yAxis: {
|
||
"axisLine": { //y轴
|
||
"show": true
|
||
},
|
||
"axisTick": { //y轴刻度线
|
||
"show": true
|
||
},
|
||
"splitLine": { //网格线
|
||
"show": false
|
||
}
|
||
},
|
||
// Declare several bar series, each will be mapped
|
||
// to a column of dataset.source by default.
|
||
series: [
|
||
{
|
||
type: 'bar',
|
||
itemStyle: {
|
||
normal: {
|
||
label: {
|
||
show: true,
|
||
position: 'insideBottom',
|
||
distance: 15,
|
||
align: 'left',
|
||
verticalAlign: 'middle',
|
||
rotate: 90,
|
||
fontSize: 16,
|
||
textStyle: { //数值样式
|
||
color: '#000',
|
||
fontSize: 13
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
{
|
||
type: 'bar',
|
||
itemStyle: {
|
||
normal: {
|
||
label: {
|
||
show: true,
|
||
position: 'insideBottom',
|
||
distance: 15,
|
||
align: 'left',
|
||
verticalAlign: 'middle',
|
||
rotate: 90,
|
||
fontSize: 16,
|
||
textStyle: { //数值样式
|
||
color: '#000',
|
||
fontSize: 13
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
]
|
||
};
|
||
myChart.setOption(option);
|
||
|
||
var titleAdd = res.table[0];
|
||
titleAdd[0] = "";
|
||
var tbdyArr = res.table[1];
|
||
tbdyArr[2][0] = '占比';
|
||
tmpltxt = doT.template(document.getElementById("thead-dot").innerHTML);//生成模板方法
|
||
document.getElementById("thead-title").innerHTML = tmpltxt(titleAdd);//数据渲染
|
||
|
||
tmpltxt = doT.template(document.getElementById("tbody-dot").innerHTML);//生成模板方法
|
||
document.getElementById("tbody-content").innerHTML = tmpltxt(tbdyArr);//数据渲染
|
||
|
||
},
|
||
error: function () {
|
||
alert('数据异常,请稍后重试!!!')
|
||
}
|
||
});
|
||
|
||
} else {
|
||
$('#data_box').hide();
|
||
$('#datarepairname').html('查看统计');
|
||
|
||
// <img src='assets/images/tongji.png' id="dataimg"/>
|
||
$("#dataimg").attr("src",'assets/images/tongji.png');
|
||
|
||
$('#calendardiv').show();
|
||
}
|
||
|
||
}
|
||
|
||
|
||
function showEventData(id) {
|
||
// $("#cptext").val('15346546')
|
||
$('#popup-bg').show();
|
||
$.ajax({
|
||
url: './?app=pmcalendar&act=getEventByid',
|
||
dataType: 'json',
|
||
async: "true",
|
||
data: {
|
||
id: id,
|
||
},
|
||
success: function (res) {
|
||
$('#pop-title').html('【' + res.game + '】' + res.event + ':' + res.title);
|
||
// $("#cptext").val(res.yanfa_remark)
|
||
// res.chanpin_remark = res.chanpin_remark.replace('\\','')
|
||
console.log(res.chanpin_remark)
|
||
if (res.chanpin_remark != "" && res.chanpin_remark != null) {
|
||
var chanpin_remark = JSON.parse(res.chanpin_remark)
|
||
document.getElementById("cptext").innerHTML = chanpin_remark.msg;
|
||
document.getElementById("cptime").innerHTML = chanpin_remark.date;
|
||
}
|
||
if (res.yunying_remark != "" && res.yunying_remark != null) {
|
||
var yunying_remark = JSON.parse(res.yunying_remark);
|
||
document.getElementById("yytext").innerHTML = yunying_remark.msg;
|
||
document.getElementById("yytime").innerHTML = yunying_remark.date;
|
||
}
|
||
if (res.yanfa_remark != "" && res.yanfa_remark != null) {
|
||
var yanfa_remark = JSON.parse(res.yanfa_remark);
|
||
document.getElementById("yftext").innerHTML = yanfa_remark.msg;
|
||
document.getElementById("yftime").innerHTML = yanfa_remark.date;
|
||
}
|
||
|
||
var fujian = JSON.parse(res.fujian);
|
||
console.log(fujian);
|
||
var arrcp = [];
|
||
var arryy = [];
|
||
var arryf = [];
|
||
for (let i in fujian) {
|
||
if (fujian[i]['bumen'] == 'chanpin') {
|
||
arrcp.push(fujian[i])
|
||
console.log(arrcp);
|
||
tmpltxt = doT.template(document.getElementById("fujian-dot").innerHTML);//生成模板方法
|
||
document.getElementById("fujianname").innerHTML = tmpltxt(arrcp);//数据渲染
|
||
} else if (fujian[i]['bumen'] == 'yunyig') {
|
||
arryy.push(fujian[i])
|
||
tmpltxt = doT.template(document.getElementById("fujian-dot").innerHTML);//生成模板方法
|
||
document.getElementById("yyfujian").innerHTML = tmpltxt(arryy);//数据渲染
|
||
} else if (fujian[i]['bumen'] == 'yanfa') {
|
||
arryf.push(fujian[i])
|
||
tmpltxt = doT.template(document.getElementById("fujian-dot").innerHTML);//生成模板方法
|
||
document.getElementById("yffujian").innerHTML = tmpltxt(arryf);//数据渲染
|
||
}
|
||
}
|
||
},
|
||
error: function () {
|
||
alert('数据异常,请稍后重试!!!')
|
||
}
|
||
});
|
||
}
|
||
|
||
$("#yiny").click(function () {
|
||
location.reload();
|
||
$("#popup-bg").hide();
|
||
})
|
||
|
||
function Info() {
|
||
if ("<?=$canEdit?>" != "1") return;
|
||
showEventInfo(dstr, {
|
||
"save": {
|
||
"label": "<i class='icon-check'></i> 保存",
|
||
"className": "btn-sm btn-success",
|
||
"callback": function () {
|
||
|
||
dict.game = $('#game').val();
|
||
dict.allday = 1;
|
||
|
||
dict.event = $('#event').val();
|
||
dict.title = $('#title').val();
|
||
|
||
if (dict.game == '' || dict.event == '') return;
|
||
|
||
loading.show();
|
||
$.post('./?app=pmcalendar&act=modievent', dict, function (txt) {
|
||
loading.hide();
|
||
if (txt == '1') {
|
||
calendar.fullCalendar('refetchEvents');
|
||
}
|
||
});
|
||
}
|
||
},
|
||
"delete": {
|
||
"label": "<i class='icon-trash'></i> 删除事件",
|
||
"className": "btn-sm btn-danger",
|
||
"callback": function () {
|
||
if (confirm('确认要【删除】这个事件吗?')) {
|
||
loading.show();
|
||
$.post('./?app=pmcalendar&act=delevent', {id: calEvent.id}, function (txt) {
|
||
loading.hide();
|
||
if (txt == '1') {
|
||
calendar.fullCalendar('refetchEvents');
|
||
}
|
||
});
|
||
}
|
||
}
|
||
},
|
||
|
||
"close": {
|
||
"label": "<i class='icon-remove'></i> Close",
|
||
"className": "btn-sm"
|
||
}
|
||
}, 'modify');
|
||
}
|
||
|
||
$('#excelFile').change(function (e) {
|
||
// e.target得到的是input标签,e.target.files得到是一串filelist,
|
||
// e.target.files[0]得到的是图片的一些参数,这些参数可以根据自己的需要提取
|
||
var fileName = e.target.files[0].name;
|
||
var arr = [];
|
||
arr.push(fileName)
|
||
tmpltxt = doT.template(document.getElementById("fujian-dot").innerHTML);//生成模板方法
|
||
document.getElementById("fujian").innerHTML = tmpltxt(arr);//数据渲染
|
||
// $(this).prev().find('span').text(fileName);
|
||
|
||
})
|
||
|
||
$('#excelFile2').change(function (e) {
|
||
// e.target得到的是input标签,e.target.files得到是一串filelist,
|
||
// e.target.files[0]得到的是图片的一些参数,这些参数可以根据自己的需要提取
|
||
var fileName = e.target.files[0].name;
|
||
var arr = [];
|
||
arr.push(fileName)
|
||
tmpltxt = doT.template(document.getElementById("fujian-dot").innerHTML);//生成模板方法
|
||
document.getElementById("yyfujian").innerHTML = tmpltxt(arr);//数据渲染
|
||
// $(this).prev().find('span').text(fileName);
|
||
|
||
})
|
||
|
||
$('#excelFile3').change(function (e) {
|
||
// e.target得到的是input标签,e.target.files得到是一串filelist,
|
||
// e.target.files[0]得到的是图片的一些参数,这些参数可以根据自己的需要提取
|
||
var fileName = e.target.files[0].name;
|
||
var arr = [];
|
||
arr.push(fileName)
|
||
tmpltxt = doT.template(document.getElementById("fujian-dot").innerHTML);//生成模板方法
|
||
document.getElementById("yffujian").innerHTML = tmpltxt(arr);//数据渲染
|
||
// $(this).prev().find('span').text(fileName);
|
||
|
||
})
|
||
|
||
function showEventInfo(start, btns, stype) {
|
||
var form = $("<form class=''><label>选择游戏和事件类型 (" + start + ")</label><div class='space-1'></div></form>");
|
||
form.append('<?=gameGameListSelect('game')?> <select id="event"><option value="打包">打包</option><option value="版本更新">版本更新</option><option value="修复外网">修复外网</option><option value="上线">上线</option><option value="节点">节点</option></select>');
|
||
form.append("<div class='space-5'></div><label for='form-field-mask-1'>事件内容</label><input class='form-control' id='title' autocomplete=off type=text value='' /> ");
|
||
|
||
var div = bootbox.dialog({
|
||
message: form,
|
||
buttons: btns
|
||
});
|
||
|
||
|
||
form.on('submit', function () {
|
||
//calEvent.title = form.find("input[type=text]").val();
|
||
//calendar.fullCalendar('updateEvent', calEvent);
|
||
div.modal("hide");
|
||
return false;
|
||
});
|
||
};
|
||
|
||
|
||
function hourChange(o) {
|
||
if ($(o).val() == '-1') {
|
||
$('#min').hide();
|
||
} else {
|
||
$('#min').show();
|
||
}
|
||
}
|
||
|
||
</script>
|
||
</body>
|
||
</html>
|