update
This commit is contained in:
parent
df8c8976a5
commit
90c9a1fcd8
@ -107,5 +107,10 @@ class OaFlowTypeController extends BaseAdminController
|
|||||||
return $this->data($result);
|
return $this->data($result);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function all(){
|
||||||
|
$result = OaFlowTypeLogic::all();
|
||||||
|
return $this->data($result);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
@ -41,7 +41,7 @@ class OaFlowLists extends BaseAdminDataLists implements ListsSearchInterface
|
|||||||
public function setSearch(): array
|
public function setSearch(): array
|
||||||
{
|
{
|
||||||
return [
|
return [
|
||||||
'=' => ['check_type', 'type'],
|
'=' => ['check_type', 'type','flow_cate'],
|
||||||
'%like%' => ['name'],
|
'%like%' => ['name'],
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
@ -16,6 +16,7 @@ namespace app\adminapi\logic\works\bgsp;
|
|||||||
|
|
||||||
|
|
||||||
use app\common\model\dept\Dept;
|
use app\common\model\dept\Dept;
|
||||||
|
use app\common\model\dict\DictData;
|
||||||
use app\common\model\works\bgsp\OaFlow;
|
use app\common\model\works\bgsp\OaFlow;
|
||||||
use app\common\model\works\bgsp\OaFlowType;
|
use app\common\model\works\bgsp\OaFlowType;
|
||||||
use app\common\logic\BaseLogic;
|
use app\common\logic\BaseLogic;
|
||||||
@ -137,4 +138,14 @@ class OaFlowTypeLogic extends BaseLogic
|
|||||||
$data['data'] = !empty($data['data']) ? json_decode($data['data'],true) : [];
|
$data['data'] = !empty($data['data']) ? json_decode($data['data'],true) : [];
|
||||||
return $data->toArray();
|
return $data->toArray();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
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();
|
||||||
|
})->toArray();
|
||||||
|
return $data;
|
||||||
|
}
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user