优化报错

This commit is contained in:
kuaifan 2022-01-14 16:35:00 +08:00
parent 3602acd187
commit 08704e7f60
15 changed files with 136 additions and 141 deletions

View File

@ -196,7 +196,7 @@
openDialog() { openDialog() {
this.goForward({path: '/manage/messenger'}); this.goForward({path: '/manage/messenger'});
this.$store.dispatch("openDialogUserid", this.userid); this.$store.dispatch("openDialogUserid", this.userid).catch(() => {})
} }
} }
}; };

View File

@ -76,7 +76,7 @@ export default {
this.getDemoAccount(); this.getDemoAccount();
// //
if (this.$Electron) { if (this.$Electron) {
this.chackServerUrl(); this.chackServerUrl().catch(() => {});
} else { } else {
this.clearServerUrl(); this.clearServerUrl();
} }

View File

@ -258,8 +258,8 @@ export default {
$A.messageSuccess("清除成功"); $A.messageSuccess("清除成功");
} }
// //
this.$store.dispatch("getUserInfo"); this.$store.dispatch("getUserInfo").catch(() => {})
this.$store.dispatch("getTaskPriority"); this.$store.dispatch("getTaskPriority").catch(() => {})
// //
this.notificationInit(); this.notificationInit();
this.onVisibilityChange(); this.onVisibilityChange();
@ -613,7 +613,7 @@ export default {
this.notificationClass.replaceTitle(data.name); this.notificationClass.replaceTitle(data.name);
this.notificationClass.userAgreed(); this.notificationClass.userAgreed();
} }
}) }).catch(() => {})
} }
} }
}, },

View File

@ -401,7 +401,7 @@ export default {
} }
} }
}); });
}); }).catch(() => {})
}, },
addDialogMsg() { addDialogMsg() {

View File

@ -219,7 +219,7 @@ export default {
}).then(() => { }).then(() => {
this.loadIng--; this.loadIng--;
this.getLists(); this.getLists();
this.$store.dispatch("getProjectOne", row.id); this.$store.dispatch("getProjectOne", row.id).catch(() => {});
}).catch(({msg}) => { }).catch(({msg}) => {
$A.modalError(msg); $A.modalError(msg);
this.loadIng--; this.loadIng--;

View File

@ -785,7 +785,7 @@ export default {
}).catch(({msg}) => { }).catch(({msg}) => {
$A.modalError(msg); $A.modalError(msg);
this.sortDisabled = false; this.sortDisabled = false;
this.$store.dispatch("getTaskForProject", this.projectId) this.$store.dispatch("getTaskForProject", this.projectId).catch(() => {})
}); });
}, },
@ -881,7 +881,7 @@ export default {
this.$store.dispatch("saveColumn", data); this.$store.dispatch("saveColumn", data);
}).catch(({msg}) => { }).catch(({msg}) => {
this.$set(this.columnLoad, column.id, false); this.$set(this.columnLoad, column.id, false);
this.$store.dispatch("getColumns", this.projectId) this.$store.dispatch("getColumns", this.projectId).catch(() => {})
$A.modalError(msg); $A.modalError(msg);
}); });
}, },
@ -945,8 +945,8 @@ export default {
$A.messageSuccess(msg); $A.messageSuccess(msg);
this.userLoad--; this.userLoad--;
this.userShow = false; this.userShow = false;
this.$store.dispatch("getProjectOne", this.projectId); this.$store.dispatch("getProjectOne", this.projectId).catch(() => {});
this.$store.dispatch("getTaskForProject", this.projectId) this.$store.dispatch("getTaskForProject", this.projectId).catch(() => {})
}).catch(({msg}) => { }).catch(({msg}) => {
$A.modalError(msg); $A.modalError(msg);
this.userLoad--; this.userLoad--;
@ -965,8 +965,8 @@ export default {
$A.messageSuccess(msg); $A.messageSuccess(msg);
this.transferLoad--; this.transferLoad--;
this.transferShow = false; this.transferShow = false;
this.$store.dispatch("getProjectOne", this.projectId); this.$store.dispatch("getProjectOne", this.projectId).catch(() => {});
this.$store.dispatch("getTaskForProject", this.projectId) this.$store.dispatch("getTaskForProject", this.projectId).catch(() => {})
}).catch(({msg}) => { }).catch(({msg}) => {
$A.modalError(msg); $A.modalError(msg);
this.transferLoad--; this.transferLoad--;

View File

@ -321,7 +321,7 @@ export default {
this.addData.project_id = column.project_id; this.addData.project_id = column.project_id;
this.addData.column_id = column.id; this.addData.column_id = column.id;
} }
}); }).catch(() => {});
} }
} }
} }

View File

@ -376,13 +376,14 @@
class="dialog-input" class="dialog-input"
v-model="msgText" v-model="msgText"
type="textarea" type="textarea"
:disabled="sendLoad > 0"
:rows="1" :rows="1"
:autosize="{ minRows: 1, maxRows: 3 }" :autosize="{ minRows: 1, maxRows: 3 }"
:maxlength="255" :maxlength="255"
:placeholder="$L('输入消息...')" :placeholder="$L('输入消息...')"
@on-keydown="msgKeydown"/> @on-keydown="msgKeydown"/>
<div class="no-send" @click="openSend"> <div class="no-send" @click="openSend">
<Loading v-if="sendLoad"/> <Loading v-if="sendLoad > 0"/>
<Icon v-else type="md-send" /> <Icon v-else type="md-send" />
</div> </div>
</div> </div>
@ -458,7 +459,7 @@ export default {
navActive: 'dialog', navActive: 'dialog',
logLoadIng: false, logLoadIng: false,
sendLoad: false, sendLoad: 0,
taskPlugins: [ taskPlugins: [
'advlist autolink lists link image charmap print preview hr anchor pagebreak', 'advlist autolink lists link image charmap print preview hr anchor pagebreak',
@ -828,7 +829,7 @@ export default {
this.ownerLoad--; this.ownerLoad--;
this.ownerShow = false; this.ownerShow = false;
this.receiveShow = false; this.receiveShow = false;
this.$store.dispatch("getTaskOne", this.taskDetail.id); this.$store.dispatch("getTaskOne", this.taskDetail.id).catch(() => {})
}).catch(({msg}) => { }).catch(({msg}) => {
$A.modalError(msg); $A.modalError(msg);
this.ownerLoad--; this.ownerLoad--;
@ -859,7 +860,7 @@ export default {
$A.messageSuccess(msg); $A.messageSuccess(msg);
this.assistLoad--; this.assistLoad--;
this.assistShow = false; this.assistShow = false;
this.$store.dispatch("getTaskOne", this.taskDetail.id); this.$store.dispatch("getTaskOne", this.taskDetail.id).catch(() => {})
}).catch(({msg}) => { }).catch(({msg}) => {
$A.modalError(msg); $A.modalError(msg);
this.assistLoad--; this.assistLoad--;
@ -1007,6 +1008,11 @@ export default {
if (!this.msgText) { if (!this.msgText) {
return; return;
} }
if (this.sendLoad > 0) {
return;
}
this.sendLoad++;
//
this.$store.dispatch("call", { this.$store.dispatch("call", {
url: 'project/task/dialog', url: 'project/task/dialog',
data: { data: {
@ -1014,56 +1020,60 @@ export default {
}, },
}).then(({data}) => { }).then(({data}) => {
this.$store.dispatch("saveTask", data); this.$store.dispatch("saveTask", data);
this.$store.dispatch("getDialogOne", data.dialog_id); this.$store.dispatch("getDialogOne", data.dialog_id).then(() => {
if ($A.isSubElectron) { this.sendLoad--;
this.resizeDialog(); if ($A.isSubElectron) {
return; this.resizeDialog();
}
this.$nextTick(() => {
if (this.$store.state.windowMax768) {
this.goForward({path: '/manage/messenger', query: {sendmsg: this.msgText}});
$A.setStorage("messenger::dialogId", data.dialog_id)
this.$store.state.dialogOpenId = data.dialog_id;
this.$store.dispatch('openTask', 0);
this.msgText = "";
} else { } else {
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.dialog.sendMsg(this.msgText); if (this.$store.state.windowMax768) {
this.goForward({path: '/manage/messenger', query: {sendmsg: this.msgText}});
$A.setStorage("messenger::dialogId", data.dialog_id)
this.$store.state.dialogOpenId = data.dialog_id;
this.$store.dispatch('openTask', 0);
} else {
this.$refs.dialog.sendMsg(this.msgText);
}
this.msgText = ""; this.msgText = "";
}) });
} }
}).catch(({msg}) => {
this.sendLoad--;
$A.modalError(msg);
}); });
}).catch(({msg}) => { }).catch(({msg}) => {
this.sendLoad--;
$A.modalError(msg); $A.modalError(msg);
}); });
}, },
openSend() { openSend() {
if (this.sendLoad) { if (this.sendLoad > 0) {
return; return;
} }
this.sendLoad = true; this.sendLoad++;
//
this.$store.dispatch("call", { this.$store.dispatch("call", {
url: 'project/task/dialog', url: 'project/task/dialog',
data: { data: {
task_id: this.taskDetail.id, task_id: this.taskDetail.id,
}, },
}).then(({data}) => { }).then(({data}) => {
this.sendLoad = false; this.sendLoad--;
this.$store.dispatch("saveTask", data); this.$store.dispatch("saveTask", data);
this.$store.dispatch("getDialogOne", data.dialog_id); this.$store.dispatch("getDialogOne", data.dialog_id).catch(() => {})
if ($A.isSubElectron) { if ($A.isSubElectron) {
this.resizeDialog(); this.resizeDialog();
return; } else {
this.$nextTick(() => {
this.goForward({path: '/manage/messenger', query: {sendmsg: this.msgText}});
$A.setStorage("messenger::dialogId", data.dialog_id)
this.$store.state.dialogOpenId = data.dialog_id;
this.$store.dispatch('openTask', 0);
});
} }
this.$nextTick(() => {
this.goForward({path: '/manage/messenger', query: {sendmsg: this.msgText}});
$A.setStorage("messenger::dialogId", data.dialog_id)
this.$store.state.dialogOpenId = data.dialog_id;
this.$store.dispatch('openTask', 0);
});
}).catch(({msg}) => { }).catch(({msg}) => {
this.sendLoad = false; this.sendLoad--;
$A.modalError(msg); $A.modalError(msg);
}); });
}, },
@ -1128,10 +1138,8 @@ export default {
if (this.$refs.dialog || num > 20) { if (this.$refs.dialog || num > 20) {
clearInterval(interval); clearInterval(interval);
if (this.$refs.dialog) { if (this.$refs.dialog) {
this.$nextTick(() => { this.$refs.dialog.sendMsg(this.msgText);
this.$refs.dialog.sendMsg(this.msgText); this.msgText = "";
this.msgText = "";
})
} }
} }
}, 100); }, 100);

View File

@ -57,7 +57,7 @@
</div> </div>
</EDropdownItem> </EDropdownItem>
<template v-if="colorShow"> <template v-if="colorShow">
<EDropdownItem v-for="(c, k) in taskColorList" :key="k" :divided="k==0" :command="c"> <EDropdownItem v-for="(c, k) in taskColorList" :key="'c_' + k" :divided="k==0" :command="c">
<div class="item"> <div class="item">
<i class="taskfont" :style="{color:c.color||'#f9f9f9'}" v-html="c.color == task.color ? '&#xe61d;' : '&#xe61c;'"></i>{{$L(c.name)}} <i class="taskfont" :style="{color:c.color||'#f9f9f9'}" v-html="c.color == task.color ? '&#xe61d;' : '&#xe61c;'"></i>{{$L(c.name)}}
</div> </div>
@ -162,7 +162,7 @@ export default {
// //
this.updateTask({ this.updateTask({
color: command.color color: command.color
}) }).catch(() => {})
} }
return; return;
} }
@ -172,7 +172,7 @@ export default {
if (flow_item_id == this.task.flow_item_id) return; if (flow_item_id == this.task.flow_item_id) return;
this.updateTask({ this.updateTask({
flow_item_id flow_item_id
}) }).catch(() => {})
return; return;
} }
const cacheTask = this.task; const cacheTask = this.task;
@ -218,7 +218,7 @@ export default {
visibleChange(visible) { visibleChange(visible) {
if (visible) { if (visible) {
this.$store.dispatch("getTaskFlow", this.task.id); this.$store.dispatch("getTaskFlow", this.task.id).catch(() => {})
} }
}, },
@ -239,7 +239,7 @@ export default {
this.$emit("on-update", data) this.$emit("on-update", data)
}).catch(({msg}) => { }).catch(({msg}) => {
$A.modalError(msg); $A.modalError(msg);
this.$store.dispatch("getTaskOne", this.task.id); this.$store.dispatch("getTaskOne", this.task.id).catch(() => {})
reject() reject()
}); });
}) })

View File

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

View File

@ -321,21 +321,20 @@ export default {
}, },
operationUser(data) { operationUser(data) {
let that = this; return new Promise((resolve) => {
return new Promise(function (resolve) { this.loadIng++;
that.loadIng++; this.$store.dispatch("call", {
that.$store.dispatch("call", {
url: 'users/operation', url: 'users/operation',
data, data,
}).then(({msg}) => { }).then(({msg}) => {
$A.messageSuccess(msg); $A.messageSuccess(msg);
that.loadIng--; this.loadIng--;
that.getLists(); this.getLists();
resolve() resolve()
}).catch(({msg}) => { }).catch(({msg}) => {
$A.modalError(msg, 301); $A.modalError(msg, 301);
that.loadIng--; this.loadIng--;
that.getLists(); this.getLists();
resolve() resolve()
}) })
}) })

View File

@ -57,8 +57,8 @@ export default {
setTimeout(() => { setTimeout(() => {
this.$store.state.projectId = $A.runNum(id); this.$store.state.projectId = $A.runNum(id);
this.$store.dispatch("getProjectOne", id).then(() => { this.$store.dispatch("getProjectOne", id).then(() => {
this.$store.dispatch("getColumns", id); this.$store.dispatch("getColumns", id).catch(() => {});
this.$store.dispatch("getTaskForProject", id); this.$store.dispatch("getTaskForProject", id).catch(() => {})
}).catch(({msg}) => { }).catch(({msg}) => {
$A.modalWarning({ $A.modalWarning({
content: msg, content: msg,

View File

@ -82,7 +82,7 @@ export default {
}).then(() => { }).then(() => {
$A.messageSuccess('修改成功'); $A.messageSuccess('修改成功');
this.loadIng--; this.loadIng--;
this.$store.dispatch('getUserInfo'); this.$store.dispatch('getUserInfo').catch(() => {});
}).catch(({msg}) => { }).catch(({msg}) => {
$A.modalError(msg); $A.modalError(msg);
this.loadIng--; this.loadIng--;

View File

@ -70,7 +70,7 @@ export default {
this.taskInfo = data; this.taskInfo = data;
this.$store.dispatch("getTaskContent", task_id); this.$store.dispatch("getTaskContent", task_id);
this.$store.dispatch("getTaskFiles", task_id); this.$store.dispatch("getTaskFiles", task_id);
this.$store.dispatch("getTaskForParent", task_id); this.$store.dispatch("getTaskForParent", task_id).catch(() => {})
}).catch(({msg}) => { }).catch(({msg}) => {
this.loadIng--; this.loadIng--;
$A.modalError({ $A.modalError({

View File

@ -171,7 +171,7 @@ export default {
* @param dispatch * @param dispatch
*/ */
getBasicData({dispatch}) { getBasicData({dispatch}) {
dispatch("getProjects"); dispatch("getProjects").catch(() => {});
dispatch("getDialogs"); dispatch("getDialogs");
dispatch("getTaskForDashboard"); dispatch("getTaskForDashboard");
}, },
@ -383,7 +383,7 @@ export default {
* @returns {Promise<unknown>} * @returns {Promise<unknown>}
*/ */
handleClearCache({state, dispatch}, userInfo) { handleClearCache({state, dispatch}, userInfo) {
return new Promise(function (resolve, reject) { return new Promise(function (resolve) {
try { try {
const cacheLoginEmail = $A.getStorageString("cacheLoginEmail"); const cacheLoginEmail = $A.getStorageString("cacheLoginEmail");
// //
@ -402,7 +402,7 @@ export default {
// //
resolve() resolve()
} catch (e) { } catch (e) {
reject(e) resolve()
} }
}); });
}, },
@ -651,7 +651,7 @@ export default {
resolve(result) resolve(result)
}).catch(e => { }).catch(e => {
console.warn(e); console.warn(e);
dispatch("getProjectOne", project_id); dispatch("getProjectOne", project_id).catch(() => {})
reject(e) reject(e)
}); });
}); });
@ -679,7 +679,7 @@ export default {
resolve(result) resolve(result)
}).catch(e => { }).catch(e => {
console.warn(e); console.warn(e);
dispatch("getProjectOne", project_id); dispatch("getProjectOne", project_id).catch(() => {})
reject(e) reject(e)
}); });
}); });
@ -707,7 +707,7 @@ export default {
resolve(result) resolve(result)
}).catch(e => { }).catch(e => {
console.warn(e); console.warn(e);
dispatch("getProjectOne", project_id); dispatch("getProjectOne", project_id).catch(() => {})
reject(e) reject(e)
}); });
}); });
@ -758,11 +758,11 @@ export default {
let index = state.cacheColumns.findIndex(column => column.id == id); let index = state.cacheColumns.findIndex(column => column.id == id);
if (index > -1) { if (index > -1) {
project_ids.push(state.cacheColumns[index].project_id) project_ids.push(state.cacheColumns[index].project_id)
dispatch('getProjectOne', state.cacheColumns[index].project_id) dispatch('getProjectOne', state.cacheColumns[index].project_id).catch(() => {})
state.cacheColumns.splice(index, 1); state.cacheColumns.splice(index, 1);
} }
}) })
Array.from(new Set(project_ids)).some(id => dispatch("getProjectOne", id)) Array.from(new Set(project_ids)).some(id => dispatch("getProjectOne", id).catch(() => {}))
// //
setTimeout(() => { setTimeout(() => {
$A.setStorage("cacheColumns", state.cacheColumns); $A.setStorage("cacheColumns", state.cacheColumns);
@ -882,16 +882,16 @@ export default {
} }
// //
if (updateMarking.is_update_maintask === true || (data.parent_id > 0 && state.cacheTasks.findIndex(({id}) => id == data.parent_id) === -1)) { if (updateMarking.is_update_maintask === true || (data.parent_id > 0 && state.cacheTasks.findIndex(({id}) => id == data.parent_id) === -1)) {
dispatch("getTaskOne", data.parent_id); dispatch("getTaskOne", data.parent_id).catch(() => {})
} }
if (updateMarking.is_update_project === true) { if (updateMarking.is_update_project === true) {
dispatch("getProjectOne", data.project_id); dispatch("getProjectOne", data.project_id).catch(() => {})
} }
if (updateMarking.is_update_content === true) { if (updateMarking.is_update_content === true) {
dispatch("getTaskContent", data.id); dispatch("getTaskContent", data.id);
} }
if (updateMarking.is_update_subtask === true) { if (updateMarking.is_update_subtask === true) {
dispatch("getTaskForParent", data.id); dispatch("getTaskForParent", data.id).catch(() => {})
} }
// //
setTimeout(() => { setTimeout(() => {
@ -922,8 +922,8 @@ export default {
state.cacheTasks.splice(index, 1); state.cacheTasks.splice(index, 1);
} }
}) })
Array.from(new Set(parent_ids)).some(id => dispatch("getTaskOne", id)) Array.from(new Set(parent_ids)).some(id => dispatch("getTaskOne", id).catch(() => {}))
Array.from(new Set(project_ids)).some(id => dispatch("getProjectOne", id)) Array.from(new Set(project_ids)).some(id => dispatch("getProjectOne", id).catch(() => {}))
// //
if (ids.includes(state.taskId)) { if (ids.includes(state.taskId)) {
state.taskId = 0; state.taskId = 0;
@ -1158,7 +1158,7 @@ export default {
resolve(result) resolve(result)
}).catch(e => { }).catch(e => {
console.warn(e); console.warn(e);
dispatch("getTaskOne", task_id); dispatch("getTaskOne", task_id).catch(() => {})
dispatch("taskLoadEnd", task_id) dispatch("taskLoadEnd", task_id)
reject(e) reject(e)
}); });
@ -1190,7 +1190,7 @@ export default {
resolve(result) resolve(result)
}).catch(e => { }).catch(e => {
console.warn(e); console.warn(e);
dispatch("getTaskOne", task_id) dispatch("getTaskOne", task_id).catch(() => {})
dispatch("taskLoadEnd", task_id) dispatch("taskLoadEnd", task_id)
reject(e) reject(e)
}); });
@ -1202,31 +1202,25 @@ export default {
* @param state * @param state
* @param dispatch * @param dispatch
* @param task_id * @param task_id
* @returns {Promise<unknown>}
*/ */
getTaskContent({state, dispatch}, task_id) { getTaskContent({state, dispatch}, task_id) {
return new Promise(function (resolve, reject) { if ($A.runNum(task_id) === 0) {
if ($A.runNum(task_id) === 0) { return;
reject({msg: 'Parameter error'}); }
return; dispatch("call", {
url: 'project/task/content',
data: {
task_id,
},
}).then(result => {
let index = state.taskContents.findIndex(({id}) => id == result.data.id)
if (index > -1) {
state.taskContents.splice(index, 1, result.data)
} else {
state.taskContents.push(result.data)
} }
dispatch("call", { }).catch(e => {
url: 'project/task/content', console.warn(e);
data: {
task_id,
},
}).then(result => {
let index = state.taskContents.findIndex(({id}) => id == result.data.id)
if (index > -1) {
state.taskContents.splice(index, 1, result.data)
} else {
state.taskContents.push(result.data)
}
resolve(result)
}).catch(e => {
console.warn(e);
reject(e);
});
}); });
}, },
@ -1235,37 +1229,31 @@ export default {
* @param state * @param state
* @param dispatch * @param dispatch
* @param task_id * @param task_id
* @returns {Promise<unknown>}
*/ */
getTaskFiles({state, dispatch}, task_id) { getTaskFiles({state, dispatch}, task_id) {
return new Promise(function (resolve, reject) { if ($A.runNum(task_id) === 0) {
if ($A.runNum(task_id) === 0) { return;
reject({msg: 'Parameter error'}); }
return; dispatch("call", {
} url: 'project/task/files',
dispatch("call", { data: {
url: 'project/task/files', task_id,
data: { },
task_id, }).then(result => {
}, result.data.forEach((data) => {
}).then(result => { let index = state.taskFiles.findIndex(({id}) => id == data.id)
result.data.forEach((data) => { if (index > -1) {
let index = state.taskFiles.findIndex(({id}) => id == data.id) state.taskFiles.splice(index, 1, data)
if (index > -1) { } else {
state.taskFiles.splice(index, 1, data) state.taskFiles.push(data)
} else { }
state.taskFiles.push(data) })
} dispatch("saveTask", {
}) id: task_id,
dispatch("saveTask", { file_num: result.data.length
id: task_id,
file_num: result.data.length
});
resolve(result)
}).catch(e => {
console.warn(e);
reject(e);
}); });
}).catch(e => {
console.warn(e);
}); });
}, },
@ -1305,7 +1293,7 @@ export default {
dispatch("getTaskOne", task_id).then(() => { dispatch("getTaskOne", task_id).then(() => {
dispatch("getTaskContent", task_id); dispatch("getTaskContent", task_id);
dispatch("getTaskFiles", task_id); dispatch("getTaskFiles", task_id);
dispatch("getTaskForParent", task_id); dispatch("getTaskForParent", task_id).catch(() => {})
}).catch(({msg}) => { }).catch(({msg}) => {
$A.modalWarning({ $A.modalWarning({
content: msg, content: msg,
@ -1375,7 +1363,7 @@ export default {
delete task.new_column delete task.new_column
} }
dispatch("saveTask", task) dispatch("saveTask", task)
dispatch("getProjectOne", task.project_id); dispatch("getProjectOne", task.project_id).catch(() => {})
}, },
/** /**
@ -1400,7 +1388,7 @@ export default {
}).catch(e => { }).catch(e => {
console.warn(e); console.warn(e);
dispatch("taskLoadEnd", post.task_id) dispatch("taskLoadEnd", post.task_id)
dispatch("getTaskOne", post.task_id); dispatch("getTaskOne", post.task_id).catch(() => {})
reject(e) reject(e)
}); });
}).catch(reject) }).catch(reject)
@ -1679,7 +1667,7 @@ export default {
last_at: $A.formatDate("Y-m-d H:i:s") last_at: $A.formatDate("Y-m-d H:i:s")
}); });
} else { } else {
dispatch("getDialogOne", data.dialog_id); dispatch("getDialogOne", data.dialog_id).catch(() => {})
} }
}, },
@ -2060,15 +2048,15 @@ export default {
dispatch("saveProject", data) dispatch("saveProject", data)
break; break;
case 'detail': case 'detail':
dispatch("getProjectOne", data.id); dispatch("getProjectOne", data.id).catch(() => {})
dispatch("getTaskForProject", data.id) dispatch("getTaskForProject", data.id).catch(() => {})
break; break;
case 'archived': case 'archived':
case 'delete': case 'delete':
dispatch("forgetProject", data.id); dispatch("forgetProject", data.id);
break; break;
case 'sort': case 'sort':
dispatch("getTaskForProject", data.id) dispatch("getTaskForProject", data.id).catch(() => {})
break; break;
} }
})(msgDetail); })(msgDetail);
@ -2107,7 +2095,7 @@ export default {
break; break;
case 'dialog': case 'dialog':
dispatch("saveTask", data) dispatch("saveTask", data)
dispatch("getDialogOne", data.dialog_id) dispatch("getDialogOne", data.dialog_id).catch(() => {})
break; break;
case 'upload': case 'upload':
dispatch("getTaskFiles", data.task_id) dispatch("getTaskFiles", data.task_id)