diff --git a/.gitignore b/.gitignore
index eaf2a13..0067b81 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,3 @@
.idea
-uploader/*
\ No newline at end of file
+uploader
\ No newline at end of file
diff --git a/config.json b/config.json
index 245c813..1f7096a 100644
--- a/config.json
+++ b/config.json
@@ -1 +1 @@
-{"games":["\u98ce\u66b4\u5947\u5175","\u6b4c\u624bCOCOS","\u4e2d\u53e4\u6218\u9524","\u5996\u7075\u6218\u59ec","\u751f\u5316\u7eaa\u5143","\u8bd9\u8c10\u4e09\u56fd","\u50cf\u7d20\u9879\u76ee","\u5b64\u5c9b\u5947\u5175","\u90e8\u843d\u6218\u9b42","\u90e8\u843d\u7e41\u4f53\u7248","\u90e8\u843d\u97e9\u6587\u7248","\u90e8\u843d\u8d8a\u5357\u7248","\u90e8\u843d\u82f1\u6587\u7248","\u90e8\u843d\u6cf0\u6587\u7248","\u90e8\u843dH5\u7248","\u66d9\u5149\u4e4b\u5883","\u9b54\u6cd5\u95e8H5","\u6b63\u7248\u9b54\u6cd5\u95e8\u539f\u751f","3D\u963f\u51e1\u8fbe","\u5927\u6218\u56fd","\u5927\u4e09\u56fd","\u5927\u4e09\u56fd\u97e9\u6587","\u5766\u514b\u7a81\u88ad","\u5251\u5723\u6302\u673a","\u7cbe\u7075\u7eaa\u5143","\u9b54\u6cd5\u65e0\u654c","\u4e50\u8c37\u519b\u5e08","X\u7cbe\u7075","\u5730\u4ea7\u5927\u4ea8","\u4e50\u8c37MT","\u8d85\u7ea7\u6536\u85cf\u5bb6","\u4e71\u4e16\u957f\u6b4c","\u6b4c\u624b2019","\u6218\u56fd\u4e89\u9e23","\u6697\u9ed1\u5730\u4e0b\u57ce\u7e41\u4f53","\u5c71\u6d77\u7ecf","3D\u751f\u5316","\u5176\u4ed6"],"roles":[""],"gxvroles":[""],"gxyyeroles":["\u9b4f\u6676","\u67f3\u94b0\u6ce2","\u6c60\u6e90","\u9093\u6770","\u5434\u660a","\u7f57\u677e\u67cf"],"gxcperoles":["\u9093\u5b9a\u946b","\u9976\u677e","\u91d1\u5143\u5143","\u7f57\u68a6\u83f2","\u9676\u4e39","\u5ed6\u5b50\u9f99"],"gxyferoles":["\u8212\u5c55","\u9093\u5b9a\u658c","\u5510\u51ef","\u55bb\u987a\u745e","\u5218\u601d\u654f"],"xfvroles":["\u8212\u5c55","\u9093\u5b9a\u658c","\u5510\u51ef","\u55bb\u987a\u745e","\u5218\u601d\u654f","\u9b4f\u6676","\u67f3\u94b0\u6ce2","\u6c60\u6e90","\u9093\u6770","\u674e\u4fca","\u9ec4\u6653","\u9093\u5b9a\u946b","\u9976\u677e","\u91d1\u5143\u5143","\u7f57\u68a6\u83f2","\u9676\u4e39","\u5ed6\u5b50\u9f99","\u9093\u5b9a\u5764"],"xfyyeroles":["\u67f3\u94b0\u6ce2","\u6c60\u6e90","\u9093\u6770","\u9b4f\u6676","\u5434\u660a","\u7f57\u677e\u67cf"],"dbyyeroles":["\u7f57\u677e\u67cf"],"sxyyeroles":["\u7f57\u677e\u67cf"],"dbvroles":[""],"sxaroles":["\u7f57\u677e\u67cf"]}
\ No newline at end of file
+{"games":["\u98ce\u66b4\u5947\u5175","\u6b4c\u624bCOCOS","\u4e2d\u53e4\u6218\u9524","\u5996\u7075\u6218\u59ec","\u751f\u5316\u7eaa\u5143","\u90e8\u843d\u6218\u9b42","\u8bd9\u8c10\u4e09\u56fd","\u50cf\u7d20\u9879\u76ee","\u5b64\u5c9b\u5947\u5175","\u90e8\u843d\u7e41\u4f53\u7248","\u90e8\u843d\u97e9\u6587\u7248","\u90e8\u843d\u8d8a\u5357\u7248","\u90e8\u843d\u82f1\u6587\u7248","\u90e8\u843d\u6cf0\u6587\u7248","\u90e8\u843dH5\u7248","\u66d9\u5149\u4e4b\u5883","\u9b54\u6cd5\u95e8H5","\u6b63\u7248\u9b54\u6cd5\u95e8\u539f\u751f","3D\u963f\u51e1\u8fbe","\u5927\u6218\u56fd","\u5927\u4e09\u56fd","\u5927\u4e09\u56fd\u97e9\u6587","\u5766\u514b\u7a81\u88ad","\u5251\u5723\u6302\u673a","\u7cbe\u7075\u7eaa\u5143","\u9b54\u6cd5\u65e0\u654c","\u4e50\u8c37\u519b\u5e08","X\u7cbe\u7075","\u5730\u4ea7\u5927\u4ea8","\u4e50\u8c37MT","\u8d85\u7ea7\u6536\u85cf\u5bb6","\u4e71\u4e16\u957f\u6b4c","\u6b4c\u624b2019","\u6218\u56fd\u4e89\u9e23","\u6697\u9ed1\u5730\u4e0b\u57ce\u7e41\u4f53","\u5c71\u6d77\u7ecf","3D\u751f\u5316","\u5176\u4ed6"],"roles":["\u8212\u5c55"],"gxvroles":[""],"gxyyeroles":["\u9b4f\u6676","\u67f3\u94b0\u6ce2","\u6c60\u6e90","\u9093\u6770","\u674e\u4fca","\u9ec4\u6653","\u674e\u5b9c\u6cfd","\u9a6c\u5929\u5e73","\u53f6\u664f\u6587"],"gxcperoles":["\u9093\u5b9a\u946b","\u9976\u677e","\u91d1\u5143\u5143","\u7f57\u68a6\u83f2","\u9676\u4e39","\u5ed6\u5b50\u9f99"],"gxyferoles":["\u8212\u5c55","\u9093\u5b9a\u658c","\u5510\u51ef","\u55bb\u987a\u745e","\u5218\u601d\u654f"],"xfvroles":["\u8212\u5c55","\u9093\u5b9a\u658c","\u5510\u51ef","\u55bb\u987a\u745e","\u5218\u601d\u654f","\u9b4f\u6676","\u67f3\u94b0\u6ce2","\u6c60\u6e90","\u9093\u6770","\u674e\u4fca","\u9ec4\u6653","\u9093\u5b9a\u946b","\u9976\u677e","\u91d1\u5143\u5143","\u7f57\u68a6\u83f2","\u9676\u4e39","\u5ed6\u5b50\u9f99","\u6556\u957f\u521a","\u5218\u601d\u79cb","\u6885\u5bb6\u8d35","\u674e\u5b9c\u6cfd","\u9a6c\u5929\u5e73","\u53f6\u664f\u6587","\u9093\u5b9a\u5764"],"xfyyeroles":["\u67f3\u94b0\u6ce2","\u6c60\u6e90","\u9093\u6770","\u9b4f\u6676","\u674e\u4fca","\u9ec4\u6653","\u674e\u5b9c\u6cfd","\u9a6c\u5929\u5e73","\u53f6\u664f\u6587","\u8212\u5c55"],"dbvroles":[""],"dbyferoles":["\u8212\u5c55","\u9093\u5b9a\u658c","\u5510\u51ef","\u55bb\u987a\u745e","\u5218\u601d\u654f","\u6556\u957f\u521a","\u5218\u601d\u79cb","\u6885\u5bb6\u8d35"],"dbyyeroles":["\u9b4f\u6676","\u67f3\u94b0\u6ce2","\u6c60\u6e90","\u9093\u6770","\u674e\u4fca","\u9ec4\u6653","\u674e\u5b9c\u6cfd","\u9a6c\u5929\u5e73","\u53f6\u664f\u6587"],"dbcperoles":["\u9093\u5b9a\u946b","\u9976\u677e","\u91d1\u5143\u5143","\u7f57\u68a6\u83f2","\u9676\u4e39","\u5ed6\u5b50\u9f99"],"sxyyeroles":["\u67f3\u94b0\u6ce2","\u6c60\u6e90","\u9093\u6770","\u9b4f\u6676","\u674e\u4fca","\u9ec4\u6653","\u674e\u5b9c\u6cfd","\u9a6c\u5929\u5e73","\u53f6\u664f\u6587"],"sxaroles":["\u9b4f\u6676","\u67f3\u94b0\u6ce2","\u6c60\u6e90","\u9093\u6770","\u674e\u4fca","\u9ec4\u6653","\u674e\u5b9c\u6cfd","\u9a6c\u5929\u5e73","\u53f6\u664f\u6587"]}
\ No newline at end of file
diff --git a/ddsender.php b/ddsender.php
new file mode 100644
index 0000000..46e2152
--- /dev/null
+++ b/ddsender.php
@@ -0,0 +1,44 @@
+'actionCard',
+ 'actionCard'=>array(
+ 'title'=>'Event新增了上线节点',
+ "text"=> "**【妖灵战姬】上线:买量测试**\n\n日期:2021-01-13.",
+ 'hideAvatar'=>'0',
+ 'btnOrientation'=>'0',
+ 'btns' => array(
+ array(
+ 'title'=>'查看详情',
+ 'actionURL'=>'http://10.0.0.5/leguevent/',
+ )
+ )
+ ),
+ "at"=>array(
+ "isAtAll"=>true
+ )
+);
+
+$data_string = json_encode($data);
+$result = request_by_curl($webhook, $data_string);
+echo $result;
+?>
\ No newline at end of file
diff --git a/pmcalendar - 副本.php b/pmcalendar - 副本.php
index 2abd2a8..60a4397 100644
--- a/pmcalendar - 副本.php
+++ b/pmcalendar - 副本.php
@@ -1,730 +1,1898 @@
stripslashes(r('content'))
+ );
- $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}'";
- }
+ $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'))
+ );
- $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);
+ $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
+ '总更新&总修复' => array(
+ 'dangerCount' => 0,
+ 'purpleCount' => 0
)
);
- $res = array();
- foreach($rss as $rs){
- if (!$eventCount[$rs['game']]){
+ $res = array();
+ foreach ($rss as $rs) {
+ if (!$eventCount[$rs['game']]) {
$eventCount[$rs['game']] = array(
- 'dangerCount'=>0,
- 'purpleCount'=>0
+ 'dangerCount' => 0,
+ 'purpleCount' => 0
);
- }
- $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;
- }
- }
+ }
+ 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']);
+ $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;
}
- foreach ($eventCharts as $value){
- $eventTable[0][] = $value[0];
+ $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)
+ 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).'%';
+ $eventTable[1][2][] = number_format($eventCount[$value[0]]['purpleCount'] * 100 / $eventCount[$value[0]]['dangerCount'], 2) . '%';
}
- // we(json_encode(array('charts'=>$eventCharts,'table'=>$eventTable)));
-
+ // 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
- we(json_encode($json));
+ $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));
+ }
}
?>
-
- 乐谷游戏管理系统
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+ 乐谷游戏管理系统
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
+
-
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
编辑游戏 } ?>
+
+
+ {$g} ";
+ } ?>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
查看统计
+
+
+
+

+
打包
+
+
+
+
+

+
更新
+
+
+
+
+

+
修复
+
+
+
+
+

+
节点
+
+
+
+

+
上线
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
-
+
+ if("=$isxfvrole?>" != "1" && "=$isxfyyerole?>" != "1" && "=$canEdit?>" != "1" && "=$isgxvrole?>" != "1" && "=$isgxyyerole?>" != "1" && "=$isgxcperole?>" != "1" && "=$isgxyferole?>" != "1" && "=$canEdit?>" != "1")return
+ if (confirm("确定删除该附件?")) {
+ $.ajax({
+ url: './?app=uploader&act=del',
+ dataType: 'json',
+ data: {
+ id: notid,
+ key: id
+ },
+ success: function (res) {
+ console.log(res);
+ alert('删除成功');
+ showEventData(notid);
+ // textdisabled();
+ },
+ error: function () {
+ alert('数据异常,请稍后重试!!!');
+ showEventData(notid);
+ // textdisabled();
+ }
+ });
+ }
+ }
-
-
-
-
-
-
- 筛选:
-
编辑游戏}?>
-
- {$g} ";
- }?>
+ $('#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 data = {};
+ data['name'] = obj.files[i].name
+ data['file'] = "#"
+ arrcp.push(data)
+ }
+ $("#fujianname").empty();
+ tmpltxt = doT.template(document.getElementById("fujian-dot").innerHTML);//生成模板方法
+ document.getElementById("fujianname").innerHTML = tmpltxt(arrcp);//数据渲染
+ // 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 data = {};
+ data['name'] = obj.files[i].name
+ data['file'] = "#"
+ arryy.push(data)
+ }
+ $("#yyfujian").empty();
+ tmpltxt = doT.template(document.getElementById("fujian-dot").innerHTML);//生成模板方法
+ document.getElementById("yyfujian").innerHTML = tmpltxt(arryy);//数据渲染
+ })
-
-
-
+ $("#fujian_yf").change(function () {
+ var wenjianname = $('#fujian_yf').val();
+ var obj = document.getElementById("fujian_yf");
+ var len = obj.files.length;
+ var temp;
+ // var arr = [];
+ for (var i = 0; i < len; i++) {
+ // temp = obj.files[i].name;
+ var data = {};
+ data['name'] = obj.files[i].name
+ data['file'] = "#"
+ arryf.push(data)
+ }
+ $("#yffujian").empty();
+ console.log(arryf);
+ tmpltxt = doT.template(document.getElementById("fujian-dot").innerHTML);//生成模板方法
+ document.getElementById("yffujian").innerHTML = tmpltxt(arryf);//数据渲染
+ })
-
+ //产品提交
+ $('#cptijiao').click(function () {
+ var cptext = $("#cptext").val();
+ var myDate = new Date();
+ var year = myDate.getFullYear(); //获取当前年份(2位)
+ var month = myDate.getMonth()+1;
+ 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);
+ textdisabled();
+ },
+ error: function () {
+ alert('数据异常,请稍后重试!!!');
+ showEventData(notid);
+ textdisabled();
+ }
+ });
+ })
+ //运营
+ $('#yytijiao').click(function () {
+ var yytext = $("#yytext").val();
+ var myDate = new Date();
+ var year = myDate.getFullYear(); //获取当前年份(2位)
+ var month = myDate.getMonth()+1;
+ 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);
+ textdisabled();
+ },
+ error: function () {
+ alert('数据异常,请稍后重试!!!');
+ showEventData(notid);
+ textdisabled();
+ }
+ });
+ })
+
+ //研发
+ $('#yftijiao').click(function () {
+ var yftext = $("#yftext").val();
+ var myDate = new Date();
+ var year = myDate.getFullYear(); //获取当前年份(2位)
+ var month = myDate.getMonth()+1;
+ 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);
+ textdisabled();
+ },
+ error: function () {
+ alert('数据异常,请稍后重试!!!');
+ showEventData(notid);
+ textdisabled();
+ }
+ });
+ })
+
+ function textdisabled(){
+ $('#yytext').attr('disabled', false)
+ $('#yftext').attr('disabled', false)
+ $('#cptext').attr('disabled', false)
+ $("#upfujian_yy").hide();
+ $("#upfujian_cp").hide();
+ $("#upfujian_yf").hide();
+ }
+
+ var i = 0;
+
+ $(document).ready(function() {
+ $('html,body').scrollTop(0)
+ })
+
+ function bianji() {
+ if(bumen == 'label-danger'){
+ 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;
+ }
+ };
+ }else if( bumen == "label-warning" ){
+
+ if ("=$isdbyyerole?>" == "1") {
+ if (i == 0) {
+ $('#yytext').attr('disabled', false)
+ $("#upfujian_yy").show();
+ i = 1;
+ } else {
+ $('#yytext').attr('disabled', true)
+ $("#upfujian_yy").hide();
+ i = 0;
+ }
+ };
+ if ("=$isdbcperole?>" == "1") {
+ if (i == 0) {
+ $('#cptext').attr('disabled', false)
+ $("#upfujian_cp").show();
+ i = 1;
+ } else {
+ $('#cptext').attr('disabled', true)
+ $("#upfujian_cp").hide();
+ i = 0;
+ }
+ };
+ if ("=$isdbyferole?>" == "1") {
+ if (i == 0) {
+ $('#yftext').attr('disabled', false)
+ $("#upfujian_yf").show();
+ i = 1;
+ } else {
+ $('#yftext').attr('disabled', true)
+ $("#upfujian_yf").hide();
+ i = 0;
+ }
+ };
+ } else {
+ 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();
+ $('.xian3').css('background-color','#fff');
+ } else {
+ $('#datarepair').show();
+ $('.xian3').css('background-color','#f5f5f9');
+ }
+ 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: '
',
+ next: '
',
+ 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['节点']+")");
+ $("#shangxainnum").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("
" + _v.end + " " + _v.event + " " + _v.title + "");
+ }
+
+ $('#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) {
+ console.log(start)
+ console.log(end)
+ console.log(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": " 保存",
+ "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": " Close",
+ "className": "btn-sm"
+ }
+ }, 'new');
+ calendar.fullCalendar('unselect');
+ }
+ ,
+ eventClick: function (calEvent, jsEvent, view) {
+ bumen = calEvent.className[0]
+ console.log(calEvent.className[0])
+ notid = calEvent.id;
+ starts = calEvent.start;
+ // if ("=$canEdit?>" != "1") {
+ console.log("=$canEdit?>")
+ 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')
-
-
-
+ tmpltxt = doT.template(document.getElementById("tbody-dot").innerHTML);//生成模板方法
+ document.getElementById("tbody-content").innerHTML = tmpltxt(tbdyArr);//数据渲染
+
+ },
+ error: function () {
+ alert('数据异常,请稍后重试!!!')
+ }
+ });
+
+ } else {
+ $('#data_box').hide();
+ $('#datarepairname').html('查看统计');
+ $("#dataimg").attr("src",'assets/images/tongji.png');
+ $('#calendardiv').show();
+ }
+
+ }
+
+
+ function showEventData(id) {
+ // $("#cptext").val('15346546')
+ $('#popup-bg').show();
+ $('body,html').css('overflow', 'hidden')
+ $.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);
+ arrcp = [];
+ arryy = [];
+ arryf = [];
+ $("#fujianname").empty();
+ $("#yyfujian").empty();
+ $("#yffujian").empty();
+ 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(chanpin_remark.msg.length >= 100){
+ $("#cptext").css('height','150px');
+ }else {
+ $("#cptext").css('height','111px');
+ }
+ }
+ 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(yunying_remark.msg.length >= 100){
+ $("#yytext").css('height','150px');
+ }else {
+ $("#yytext").css('height','111px');
+ }
+ }
+ 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;
+ if(yanfa_remark.msg.length >= 100){
+ $("#yftext").css('height','150px');
+ }else {
+ $("#yftext").css('height','111px');
+ }
+ }
+
+ // if(res.fujian != null){
+ if(res.fujian != ""){
+ var fujian = JSON.parse(res.fujian);
+ for (let i in fujian) {
+ if (fujian[i]['bumen'] == 'chanpin') {
+ arrcp.push(fujian[i])
+ } else if (fujian[i]['bumen'] == 'yunyig') {
+ arryy.push(fujian[i])
+ } else if (fujian[i]['bumen'] == 'yanfa') {
+ arryf.push(fujian[i])
+ }
+ }
+ }
+
+
+ if(arrcp.length != 0){
+ tmpltxt = doT.template(document.getElementById("fujian-dot").innerHTML);//生成模板方法
+ document.getElementById("fujianname").innerHTML = tmpltxt(arrcp);//数据渲染
+ }else {
+ var data = "
未添加附件
";
+ $('#fujianname').html(data);
+ }
+
+ if(arryy.length != 0){
+ tmpltxt = doT.template(document.getElementById("fujian-dot").innerHTML);//生成模板方法
+ document.getElementById("yyfujian").innerHTML = tmpltxt(arryy);//数据渲染
+ }else {
+ var data = "
未添加附件
";
+ $('#yyfujian').html(data);
+ }
+
+ if(arryf.length != 0){
+ tmpltxt = doT.template(document.getElementById("fujian-dot").innerHTML);//生成模板方法
+ document.getElementById("yffujian").innerHTML = tmpltxt(arryf);//数据渲染
+ }else {
+ var data = "
未添加附件
";
+ $('#yffujian').html(data);
+ }
+
+ },
+ error: function () {
+ alert('数据异常,请稍后重试!!!')
+ }
+ });
+ }
+
+ function guanbi(){
+ var showGame = "";
+ starttime, endtime;
+ dstr = ''
+ dict = {};
+ bumen;
+ notid;
+ arrcp = [];
+ arryy = [];
+ arryf = [];
+ i = 0;
+ starts='';
+ $('#yytext').attr('disabled', false)
+ $('#cptext').attr('disabled', false)
+ $('#yftext').attr('disabled', false)
+ $("#upfujian_yy").hide();
+ $("#upfujian_cp").hide();
+ $("#upfujian_yf").hide();
+ $("#popup-bg").hide();
+ $('body,html').css('overflow', 'auto')
+ }
+
+ // $("#yiny").click(function () {
+ // var showGame = "";
+ // starttime, endtime;
+ // dstr = ''
+ // dict = {};
+ // bumen;
+ // notid;
+ // arrcp = [];
+ // arryy = [];
+ // arryf = [];
+ // starts=''
+ // $("#popup-bg").hide();
+ // $('body,html').css('overflow', 'auto')
+ // })
+
+ function Info() {
+ if ("=$canEdit?>" != "1") return;
+ dict = {};
+ $.post('./?app=pmcalendar&act=getEventByid', {id: notid}, function (txt) {
+ var j = JSON.parse(txt);
+ dict.start = j.start;
+ dict.end = j.end;
+ dict.id = notid;
+ $('#game').val(j.game);
+ $('#hour').val(j.shour);
+ $('#min').val(j.smin);
+ $('#event').val(j.event);
+ $('#title').val(j.title);
+ hourChange($('#hour'));
+ });
+
+ showEventInfo(dstr, {
+ "save": {
+ "label": " 保存",
+ "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": " 删除事件",
+ "className": "btn-sm btn-danger",
+ "callback": function () {
+ if (confirm('确认要【删除】这个事件吗?')) {
+ loading.show();
+ $.post('./?app=pmcalendar&act=delevent', {id: notid}, function (txt) {
+ loading.hide();
+ if (txt == '1') {
+ calendar.fullCalendar('refetchEvents');
+ }
+ guanbi();
+ });
+ }
+ }
+ },
+
+ "close": {
+ "label": " 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);
+
+ })
+
+ function showEventInfo(start, btns, stype) {
+ var form = $("");
+ form.append('=gameGameListSelect('game')?> ');
+ form.append(" ");
+
+ 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();
+ }
+ }
+
+
+