mirror of
https://github.com/kuaifan/dootask.git
synced 2026-01-05 20:10:26 +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('project_task_users', function ($leftJoin) use ($userid) {
|
||||||
$leftJoin
|
$leftJoin
|
||||||
->on('project_task_users.userid', '=', DB::raw($userid))
|
->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;
|
return $query;
|
||||||
}
|
}
|
||||||
@ -309,7 +310,11 @@ class ProjectTask extends AbstractModel
|
|||||||
'project_task_users.owner'
|
'project_task_users.owner'
|
||||||
])
|
])
|
||||||
->selectRaw("1 AS assist")
|
->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);
|
->where('project_task_users.userid', $userid);
|
||||||
if ($owner !== null) {
|
if ($owner !== null) {
|
||||||
$query->where('project_task_users.owner', $owner);
|
$query->where('project_task_users.owner', $owner);
|
||||||
|
|||||||
@ -914,7 +914,7 @@ export default {
|
|||||||
},
|
},
|
||||||
"taskDetail.visibility_appointor": {
|
"taskDetail.visibility_appointor": {
|
||||||
handler(arr) {
|
handler(arr) {
|
||||||
if(arr?.length > 0 && arr[0]) {
|
if (arr?.filter(id=>id).length > 0) {
|
||||||
this.taskDetail.visibility = 3
|
this.taskDetail.visibility = 3
|
||||||
this.updateVisible()
|
this.updateVisible()
|
||||||
}
|
}
|
||||||
@ -1696,10 +1696,10 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
visibleUserSelectShowChange(isShow){
|
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;
|
let old = this.taskDetail.old_visibility;
|
||||||
this.taskDetail.visibility = old > 2 ? 1 : (old || 1);
|
this.taskDetail.visibility = old > 2 ? 1 : (old || 1);
|
||||||
if(this.taskDetail.visibility < 3 ){
|
if (this.taskDetail.visibility < 3) {
|
||||||
this.updateVisible();
|
this.updateVisible();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user