|
@@ -32,6 +32,8 @@ class ControlManage extends Model
|
|
'bw_ids',
|
|
'bw_ids',
|
|
'revoke_time',
|
|
'revoke_time',
|
|
'revoke_res',
|
|
'revoke_res',
|
|
|
|
+ 'is_sent',
|
|
|
|
+ 'sent_limit',
|
|
'phone',
|
|
'phone',
|
|
'remark',
|
|
'remark',
|
|
// 创建人ID
|
|
// 创建人ID
|
|
@@ -51,7 +53,7 @@ class ControlManage extends Model
|
|
$res=$this->dataRange()
|
|
$res=$this->dataRange()
|
|
|
|
|
|
->catchSearch()
|
|
->catchSearch()
|
|
- ->append(['type_text','rfid_type_text','state_text','timeRange','stations','bw_names','creator'])
|
|
|
|
|
|
+ ->append(['type_text','rfid_type_text','state_text','timeRange','stations','bw_names','creator','is_sent_text','sent_limit_text'])
|
|
->order($this->aliasField('id'), 'desc')
|
|
->order($this->aliasField('id'), 'desc')
|
|
->paginate();
|
|
->paginate();
|
|
return $res;
|
|
return $res;
|
|
@@ -61,6 +63,14 @@ class ControlManage extends Model
|
|
{
|
|
{
|
|
return $query->where('name', 'like', '%' . $value . '%');
|
|
return $query->where('name', 'like', '%' . $value . '%');
|
|
}
|
|
}
|
|
|
|
+ public function getIsSentTextAttr($value){
|
|
|
|
+ $val= $this->getData('is_sent');
|
|
|
|
+ return $val?'推送':'不推送';
|
|
|
|
+ }
|
|
|
|
+ public function getSentLimitTextAttr($value){
|
|
|
|
+ $val= $this->getData('sent_limit');
|
|
|
|
+ return (new SysDictData())->getValueByCode('SentLimitOption', $val) ?: '';
|
|
|
|
+ }
|
|
public function getCreatorAttr($value){
|
|
public function getCreatorAttr($value){
|
|
$val= $this->getData('creator_id');
|
|
$val= $this->getData('creator_id');
|
|
return Db::table('users')->where('id',$val)->value('realname');
|
|
return Db::table('users')->where('id',$val)->value('realname');
|