dataRange() ->catchSearch() ->append(['classification','equ_type_name', 'list']) ->order($this->aliasField('id'), 'desc') ->paginate(); return $res; } public function getClassificationAttr() { $id = $this->getData('equipment_type'); $eq = new EquipmentType(); $name = $eq->getParentNamebyChildId($id); return $name; } public function getEquTypeNameAttr() { $id = $this->getData('equipment_type'); $name = EquipmentType::where('id',$id)->value('name'); return $name; } public function getCheckStatusAttr() { $id = $this->getData('check_status'); $Dict = new SysDictData(); $value = $Dict->getValueByCode('Check',$id); return $value; } public function getStatusAttr() { $id = $this->getData('status'); $Dict = new SysDictData(); $value = $Dict->getValueByCode('ToolStatus',$id); return $value; } public function getCheckLastTimeAttr() { $time = $this->getData('check_last_time'); return date('Y-m-d',$time); } public function getCheckNextTimeAttr() { $time = $this->getData('check_next_time'); return date('Y-m-d',$time); } }