1
This commit is contained in:
parent
b1d974c991
commit
e683a19e49
@ -235,7 +235,8 @@ if ($act == 'newevent') {
|
|||||||
$yanqi_history=$event['yanqi_history'];
|
$yanqi_history=$event['yanqi_history'];
|
||||||
if (!$yanqi_history) $yanqi_history = '[]';
|
if (!$yanqi_history) $yanqi_history = '[]';
|
||||||
$yanqi_history = json_decode($yanqi_history,true);
|
$yanqi_history = json_decode($yanqi_history,true);
|
||||||
$yanqi_history[] = array('date1'=>$event['start'],'date2'=>$dict['end'],'user'=>$user['name'],'reason'=>$reason);
|
$isYanqi = strtotime($event['start'])<strtotime($dict['end'])?1:2;
|
||||||
|
$yanqi_history[] = array('isYanqi'=>$isYanqi,'date1'=>$event['start'],'date2'=>$dict['end'],'user'=>$user['name'],'reason'=>$reason);
|
||||||
$dict['yanqi_history']=json_encode($yanqi_history,true);
|
$dict['yanqi_history']=json_encode($yanqi_history,true);
|
||||||
|
|
||||||
$sql = DB::update('calendar', $dict, "id='{$id}'");
|
$sql = DB::update('calendar', $dict, "id='{$id}'");
|
||||||
@ -326,13 +327,16 @@ if ($act == 'newevent') {
|
|||||||
|
|
||||||
|
|
||||||
$gameName = $rs['game'];
|
$gameName = $rs['game'];
|
||||||
|
$yanqi_history = json_decode($rs['yanqi_history'],true);
|
||||||
|
$isYanqi = $yanqi_history?end($yanqi_history)['isYanqi']:0;
|
||||||
|
|
||||||
$row = array(
|
$row = array(
|
||||||
'id' => $rs['id'],
|
'id' => $rs['id'],
|
||||||
'title' => '【' . $gameName . '】' . $rs['event'] . ":" . $rs['title'],
|
'title' => '【' . $gameName . '】' . $rs['event'] . ":" . $rs['title'],
|
||||||
'start' => $rs['start'],
|
'start' => $rs['start'],
|
||||||
'end' => $rs['end'],
|
'end' => $rs['end'],
|
||||||
'className' => 'label-' . $class,
|
'className' => 'label-' . $class,
|
||||||
'isYanqi'=>boolval($rs['yanqi_history'])
|
'isYanqi'=> $isYanqi
|
||||||
);
|
);
|
||||||
$row['allDay'] = true;
|
$row['allDay'] = true;
|
||||||
$res[] = $row;
|
$res[] = $row;
|
||||||
@ -1873,10 +1877,12 @@ if ($act == 'newevent') {
|
|||||||
eventRender: function (event, element) {
|
eventRender: function (event, element) {
|
||||||
// console.log(event)
|
// console.log(event)
|
||||||
// console.log(element)
|
// console.log(element)
|
||||||
if(event.isYanqi){
|
if(event.isYanqi == 1){
|
||||||
element.html(event.title + '<img class="yanqi" src="assets/images/yanqi.png"/>');
|
element.html(event.title + '<img class="yanqi" src="assets/images/yanqi.png"/>');
|
||||||
}else {
|
}else if(event.isYanqi == 0) {
|
||||||
element.html(event.title);
|
element.html(event.title);
|
||||||
|
} else {
|
||||||
|
element.html(event.title + '<img class="yanqi" src="assets/images/tiqian.png"/>');
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user