fix: 任务列表无法修改优先级的问题

This commit is contained in:
kuaifan 2022-07-08 18:35:40 +08:00
parent 49a361bf66
commit 7c11e32b71
2 changed files with 22 additions and 2 deletions

View File

@ -75,6 +75,26 @@ export default {
}
}
},
updateTask(updata) {
if (this.loadIng) {
return;
}
//
Object.keys(updata).forEach(key => this.$set(this.task, key, updata[key]));
//
const updateData = Object.assign(updata, {
task_id: this.task.id,
});
this.$store.dispatch("taskUpdate", updateData).then(({data, msg}) => {
$A.messageSuccess(msg);
this.$store.dispatch("saveTaskBrowse", updateData.task_id);
this.$emit("on-update", data)
}).catch(({msg}) => {
$A.modalError(msg);
this.$store.dispatch("getTaskOne", updateData.task_id).catch(() => {})
});
},
},
}
</script>

View File

@ -192,7 +192,7 @@ export default {
//
el[0].updateTask({
column_id: $A.leftDelete(command, 'column::')
}).catch(() => {})
})
return;
}
if ($A.leftExists(command, 'priority::')) {
@ -203,7 +203,7 @@ export default {
p_level: data.priority,
p_name: data.name,
p_color: data.color,
}).catch(() => {})
})
}
}
},