mirror of
https://github.com/kuaifan/dootask.git
synced 2026-01-03 10:21:55 +00:00
fix: 1.修复可见效数据取值,2.修复设置可见效指定人员不成功
This commit is contained in:
parent
67dafae9d6
commit
fdc85bbcbf
@ -288,7 +288,8 @@ class ProjectTask extends AbstractModel
|
||||
->leftJoin('project_task_users', function ($leftJoin) use ($userid) {
|
||||
$leftJoin
|
||||
->on('project_task_users.userid', '=', DB::raw($userid))
|
||||
->on('project_tasks.id', '=', 'project_task_users.task_id');
|
||||
->on('project_tasks.id', '=', 'project_task_users.task_id')
|
||||
->where('project_task_users.owner', '<', 2);
|
||||
});
|
||||
return $query;
|
||||
}
|
||||
@ -309,7 +310,11 @@ class ProjectTask extends AbstractModel
|
||||
'project_task_users.owner'
|
||||
])
|
||||
->selectRaw("1 AS assist")
|
||||
->join('project_task_users', 'project_tasks.id', '=', 'project_task_users.task_id')
|
||||
->join('project_task_users', function ($leftJoin) {
|
||||
$leftJoin
|
||||
->on('project_tasks.id', '=', 'project_task_users.task_id')
|
||||
->where('project_task_users.owner', '<', 2);
|
||||
})
|
||||
->where('project_task_users.userid', $userid);
|
||||
if ($owner !== null) {
|
||||
$query->where('project_task_users.owner', $owner);
|
||||
|
||||
@ -914,7 +914,7 @@ export default {
|
||||
},
|
||||
"taskDetail.visibility_appointor": {
|
||||
handler(arr) {
|
||||
if(arr?.length > 0 && arr[0]) {
|
||||
if (arr?.filter(id=>id).length > 0) {
|
||||
this.taskDetail.visibility = 3
|
||||
this.updateVisible()
|
||||
}
|
||||
@ -1696,10 +1696,10 @@ export default {
|
||||
},
|
||||
|
||||
visibleUserSelectShowChange(isShow){
|
||||
if(!isShow && (this.taskDetail.visibility_appointor.length == 0 || !this.taskDetail.visibility_appointor[0])){
|
||||
if (!isShow && this.taskDetail.visibility_appointor.filter(id => id).length == 0) {
|
||||
let old = this.taskDetail.old_visibility;
|
||||
this.taskDetail.visibility = old > 2 ? 1 : (old || 1);
|
||||
if(this.taskDetail.visibility < 3 ){
|
||||
if (this.taskDetail.visibility < 3) {
|
||||
this.updateVisible();
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user