This commit is contained in:
weiz 2024-05-25 17:32:12 +08:00
parent 90c9a1fcd8
commit 1519295afb

View File

@ -142,9 +142,7 @@ class OaFlowTypeLogic extends BaseLogic
public static function all(): array
{
$data = DictData::field('name,value')->where('type_value', 'oa_approve_cate')->select()->each(function($data){
$data['children'] = OaFlowType::field('id,title,data')->where('type',$data['value'])->select()->each(function($item){
$item['data'] = !empty($item['data']) ? json_decode($item['data'],true) : [];
})->toArray();
$data['children'] = OaFlowType::field('id,title')->where('type',$data['value'])->select()->toArray();
})->toArray();
return $data;
}