perf: 重复添加任务列表的情况

This commit is contained in:
kuaifan 2024-11-22 23:31:02 +08:00
parent bfb2db8a3f
commit 65b8e2270e

View File

@ -518,6 +518,7 @@ export default {
searchText: '',
addColumnShow: false,
addColumnLoad: false,
addColumnName: '',
sortData: [],
@ -1047,21 +1048,25 @@ export default {
addColumnSubmit() {
let name = this.addColumnName.trim();
if (name === '') {
if (name === '' || this.addColumnLoad) {
return;
}
this.addColumnLoad = true
this.$store.dispatch("call", {
url: 'project/column/add',
data: {
project_id: this.projectId,
name: name,
},
spinner: 600,
}).then(({data, msg}) => {
$A.messageSuccess(msg);
this.addColumnName = '';
this.$store.dispatch("saveColumn", data);
}).catch(({msg}) => {
$A.modalError(msg);
}).finally(() => {
this.addColumnLoad = false;
});
},