|
@@ -41,7 +41,7 @@ class ControlAlarm extends Model
|
|
|
{
|
|
|
$res=$this->dataRange()
|
|
|
->catchSearch()
|
|
|
-
|
|
|
+ ->append(['state_text'])
|
|
|
->order($this->aliasField('id'), 'desc')
|
|
|
->paginate();
|
|
|
return $res;
|
|
@@ -53,9 +53,9 @@ class ControlAlarm extends Model
|
|
|
// }
|
|
|
|
|
|
|
|
|
- public function getStateAttr($value){
|
|
|
- // $state = $this->getData('state');
|
|
|
- return (new SysDictData())->getValueByCode('AlarmHandleState', $value) ?: '';
|
|
|
+ public function getStateTextAttr($value){
|
|
|
+ $state = $this->getData('state');
|
|
|
+ return (new SysDictData())->getValueByCode('AlarmHandleState', $state) ?: '';
|
|
|
}
|
|
|
public function getAlarmTypeAttr($value){
|
|
|
|