This commit is contained in:
mkm 2024-01-08 16:02:22 +08:00
parent 6c4baf8e52
commit 00d24c1f29
2 changed files with 7 additions and 5 deletions

View File

@ -98,7 +98,7 @@ class MemberAccount extends CommonModel
public function getAuthorizeArrAttr($value, $data)
{
//支持同时设置多个角色,默认关闭
if ($data['authorize']) {
if (isset($data['authorize'])) {
return explode(',', $data['authorize']);
}
return [];
@ -106,8 +106,10 @@ class MemberAccount extends CommonModel
public function getStatusTextAttr($value, $data)
{
$status = [0 => '禁用', 1 => '使用中'];
return $status[$data['status']];
if(isset($data['status'])){
$status = [0 => '禁用', 1 => '使用中'];
return $status[$data['status']];
}
}
/**

View File

@ -47,12 +47,12 @@ class Task extends CommonModel
$task['copied_info'][]=Member::where(['code'=>$v])->field('name,code,avatar')->find();
}
if($task['department_liaison']){
$task['liasion_info']=Member::where(['code'=>$task['department_liaison']])->field('name,code,avatar')->find();
$task['liasion_info']=MemberAccount::where(['code'=>$task['department_liaison']])->field('name,code,avatar')->find();
}else{
$task['liasion_info']=[];
}
if($task['department']){
$task['department_info']=Department::where(['organization_code'=>$task['department']])->field('name')->find();
$task['department_info']=Department::where(['code'=>$task['department']])->field('name')->find();
}else{
$task['department_info']=[];
}