fix: 任务详情不出现聊天的情况

This commit is contained in:
kuaifan 2022-07-06 23:13:43 +08:00
parent ed937f5f31
commit 2366e4df17
3 changed files with 0 additions and 15 deletions

View File

@ -1424,9 +1424,6 @@ export default {
if (data === 'completedTask') {
this.$store.dispatch("forgetTaskCompleteTemp", true);
} else if (data === 'chat') {
if (!this.cacheDialogs.find(({id}) => id == this.projectData.dialog_id)) {
this.$store.dispatch("getDialogOne", this.projectData.dialog_id).catch(() => {})
}
if (this.windowSmall) {
this.$store.dispatch('openDialog', this.projectData.dialog_id)
return;

View File

@ -597,7 +597,6 @@ export default {
'cacheProjects',
'cacheColumns',
'cacheTasks',
'cacheDialogs',
'taskContents',
'taskFiles',
'taskPriority',
@ -811,11 +810,6 @@ export default {
this.timeValue = this.taskDetail.end_at ? [this.taskDetail.start_at, this.taskDetail.end_at] : [];
}
},
'taskDetail.dialog_id'(dialog_id) {
if (dialog_id > 0 && !this.cacheDialogs.find(({id}) => id == dialog_id)) {
this.$store.dispatch("getDialogOne", dialog_id).catch(() => {})
}
},
},
methods: {

View File

@ -2188,12 +2188,6 @@ export default {
*/
getDialogMsgs({state, dispatch, getters}, data) {
return new Promise((resolve, reject) => {
const dialog = state.cacheDialogs.find(({id}) => id == data.dialog_id);
if (!dialog) {
reject({msg: 'Parameter error'});
return;
}
//
const saveBefore = typeof data.save_before === "function" ? data.save_before : _ => {}
const saveCancel = typeof data.save_cancel === "boolean" ? data.save_cancel : false
if (typeof data.save_before !== "undefined") delete data.save_before