mirror of
https://github.com/kuaifan/dootask.git
synced 2025-12-11 18:42:54 +00:00
perf: 添加任务默认选中自己,如果不选则添加无负责人任务
This commit is contained in:
parent
5afed4b85e
commit
4ff32511b9
@ -799,7 +799,7 @@ export default {
|
||||
onAddTask(data) {
|
||||
this.$refs.addTask.defaultPriority();
|
||||
this.$refs.addTask.setData($A.isJson(data) ? data : {
|
||||
'owner': this.userId,
|
||||
'owner': [this.userId],
|
||||
'column_id': data,
|
||||
});
|
||||
this.addTaskShow = true;
|
||||
|
||||
@ -328,7 +328,7 @@ export default {
|
||||
}
|
||||
Store.set('addTask', {
|
||||
times: [start, end],
|
||||
owner: this.userId,
|
||||
owner: [this.userId],
|
||||
beforeClose: () => {
|
||||
guide.clearGuideElement();
|
||||
}
|
||||
|
||||
@ -176,7 +176,7 @@ export default {
|
||||
cascader: [],
|
||||
name: "",
|
||||
content: "",
|
||||
owner: 0,
|
||||
owner: [],
|
||||
add_assist: 1,
|
||||
project_id: 0,
|
||||
column_id: 0,
|
||||
@ -247,11 +247,7 @@ export default {
|
||||
},
|
||||
|
||||
showAddAssist() {
|
||||
const {owner} = this.addData;
|
||||
if ($A.isArray(owner) && owner.includes(this.userId)) {
|
||||
return false;
|
||||
}
|
||||
return owner != this.userId;
|
||||
return !this.addData.owner.includes(this.userId);
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
@ -376,8 +372,8 @@ export default {
|
||||
if (this.subName.trim() !== '') {
|
||||
this.addData.subtasks.push({
|
||||
name: this.subName.trim(),
|
||||
owner: [this.userId],
|
||||
times: [],
|
||||
owner: this.userId
|
||||
});
|
||||
this.subName = '';
|
||||
}
|
||||
@ -489,7 +485,7 @@ export default {
|
||||
cascader: [],
|
||||
name: "",
|
||||
content: "",
|
||||
owner: 0,
|
||||
owner: [],
|
||||
add_assist: 1,
|
||||
column_id: 0,
|
||||
times: [],
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user