column('name','value'); return !empty($data['business_nature']) ? $dict[$data['business_nature']] : ''; } public function getIndustryNatureTextAttr($value,$data){ $dict = DictData::where('type_value','cost_consultation_industry_nature')->column('name','value'); return !empty($data['industry_nature']) ? $dict[$data['industry_nature']] : ''; } public function getFundSourcesTextAttr($value,$data){ $dict = DictData::where('type_value','cost_consultation_fund_sources')->column('name','value'); return !empty($data['fund_sources']) ? $dict[$data['fund_sources']] : ''; } public function getConstAreaTextAttr($value,$data){ $dict = DictData::where('type_value','cost_consultation_const_area')->column('name','value'); return !empty($data['const_area']) ? $dict[$data['const_area']] : ''; } public function getWayTextAttr($value,$data){ $dict = DictData::where('type_value','cost_consultation_way')->column('name','value'); return !empty($data['way']) ? $dict[$data['way']] : ''; } public function getFileTypeTextAttr($value,$data){ $dict = DictData::where('type_value','cost_consultation_file_type')->column('name','value'); return !empty($data['file_type']) ? $dict[$data['file_type']] : ''; } public function getSealNameTextAttr($value,$data){ $dict = DictData::where('type_value','cost_consultation_seal_name')->column('name','value'); return !empty($data['seal_name']) ? $dict[$data['seal_name']] : ''; } public function getLimitTextAttr($value,$data): string { $arr = [0=>'否',1=>'是']; return $arr[$data['limit']]; } public function getPlanceSealTextAttr($value,$data): string { $arr = [0=>'否',1=>'是']; return $arr[$data['plance_seal']]; } public function getStartDateAttr($value): string { return !empty($value) ? date('Y-m-d', $value) : ''; } public function getEndDateAttr($value): string { return !empty($value) ? date('Y-m-d', $value) : ''; } public function getDueTimeAttr($value): string { return !empty($value) ? date('Y-m-d', $value) : ''; } public function getCreateDateAttr($value): string { return !empty($value) ? date('Y-m-d', $value) : ''; } public function getSendDateAttr($value): string { return !empty($value) ? date('Y-m-d', $value) : ''; } public function getAnnexAttr($value) { return !empty($value) ? json_decode($value,true) : ''; } }