更新
This commit is contained in:
@@ -47,7 +47,22 @@ class Roster extends BaseModel
|
||||
*/
|
||||
public function getPeriodDescAttr($value, $data)
|
||||
{
|
||||
return $data['period'] == 'morning' ? '上午' : '下午';
|
||||
$st = $data['start_time'] ?? '';
|
||||
$et = $data['end_time'] ?? '';
|
||||
if ($st !== '' && $et !== '') {
|
||||
return $st . '-' . $et;
|
||||
}
|
||||
if (($data['period'] ?? '') === 'morning') {
|
||||
return '上午';
|
||||
}
|
||||
if (($data['period'] ?? '') === 'afternoon') {
|
||||
return '下午';
|
||||
}
|
||||
if (($data['period'] ?? '') === 'night') {
|
||||
return '夜班';
|
||||
}
|
||||
|
||||
return '时段';
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user