column('name','value'); return !empty($data['industry']) ? $dict[$data['industry']] : ''; } public function getNatureTextAttr($value,$data){ $dict = DictData::where('type_value','supervision_project_nature')->column('name','value'); return !empty($data['nature']) ? $dict[$data['nature']] : ''; } public function getBuildAreaTextAttr($value,$data){ $dict = DictData::where('type_value','supervision_project_build_area')->column('name','value'); return !empty($data['build_area']) ? $dict[$data['build_area']] : ''; } public function getProjectLevelTextAttr($value,$data){ $dict = DictData::where('type_value','supervision_project_level')->column('name','value'); return !empty($data['project_level']) ? $dict[$data['project_level']] : ''; } public function getEngineeringStatusTextAttr($value,$data){ $dict = DictData::where('type_value','supervision_project_status')->column('name','value'); return !empty($data['engineering_status']) ? $dict[$data['engineering_status']] : ''; } public function getActualStartDateAttr($value): string { return !empty($value) ? date('Y-m-d', $value) : ''; } public function getActualEndDateAttr($value): string { return !empty($value) ? date('Y-m-d', $value) : ''; } public function getPlannedStartDateAttr($value): string { return !empty($value) ? date('Y-m-d', $value) : ''; } public function getPlannedEndDateAttr($value): string { return !empty($value) ? date('Y-m-d', $value) : ''; } public function getAnnexAttr($value) { return !empty($value) ? json_decode($value,true) : ''; } }