no message

This commit is contained in:
kuaifan 2021-06-19 00:06:36 +08:00
parent 437cd7d944
commit 61cc02c403
5 changed files with 17 additions and 17 deletions

View File

@ -595,10 +595,14 @@ export default {
immediate: true, immediate: true,
deep: true deep: true
}, },
'openTask.dialog_id' (dialog_id) {
if (dialog_id) {
this.$store.dispatch("getDialogMsgList", dialog_id)
}
},
'openTask._show' (show) { 'openTask._show' (show) {
if (show) { if (show) {
this.$nextTick(() => { this.$nextTick(() => {
this.$store.dispatch("getDialogMsgList", this.taskDetail.dialog_id)
this.$refs.input.focus() this.$refs.input.focus()
}); });
} else { } else {
@ -996,7 +1000,7 @@ export default {
task_id: this.taskDetail.id, task_id: this.taskDetail.id,
}, },
}).then(({data}) => { }).then(({data}) => {
this.$store.commit("taskDialogSuccess", data); this.$store.dispatch("saveTask", data);
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.dialog.sendMsg(this.msgText); this.$refs.dialog.sendMsg(this.msgText);
this.msgText = ""; this.msgText = "";

View File

@ -83,6 +83,7 @@ export default {
dialogLoad: 0, dialogLoad: 0,
dialogKey: '', dialogKey: '',
dialogType: '', dialogType: '',
dialogMounted: false,
contactsLoad: 0, contactsLoad: 0,
contactsLists: null, contactsLists: null,
@ -93,16 +94,20 @@ export default {
this.dialogLoad++; this.dialogLoad++;
this.$store.dispatch("getDialogList").then(() => { this.$store.dispatch("getDialogList").then(() => {
this.dialogLoad--; this.dialogLoad--;
this.dialogMounted = true;
this.openDialogStorage(); this.openDialogStorage();
}).catch(() => { }).catch(() => {
this.dialogLoad--; this.dialogLoad--;
this.dialogMounted = true;
this.openDialogStorage(); this.openDialogStorage();
}); });
}, },
activated() { activated() {
this.$store.dispatch("getDialogList"); if (this.dialogMounted) {
this.openDialogStorage(); this.$store.dispatch("getDialogList");
this.openDialogStorage();
}
}, },
computed: { computed: {

View File

@ -1208,13 +1208,13 @@ export default {
case 'upload': case 'upload':
commit("taskUploadSuccess", data) commit("taskUploadSuccess", data)
break; break;
case 'dialog':
commit("taskDialogSuccess", data)
break;
case 'archived': case 'archived':
case 'delete': case 'delete':
commit("taskDeleteSuccess", data) commit("taskDeleteSuccess", data)
break; break;
case 'dialog':
dispatch("saveTask", data)
break;
} }
})(msgDetail); })(msgDetail);
break; break;

View File

@ -141,16 +141,6 @@ export default {
}); });
}, },
/**
* 任务打开聊天
* @param state
* @param data
*/
taskDialogSuccess(state, data) {
this.dispatch("saveTask", data);
this.dispatch("getDialogMsgList", data.dialog_id);
},
/** /**
* 删除任务 * 删除任务
* @param state * @param state

View File

@ -430,6 +430,7 @@
top: 0; top: 0;
left: 0; left: 0;
bottom: 0; bottom: 0;
z-index: 1;
width: 1px; width: 1px;
background-color: #f4f5f5; background-color: #f4f5f5;
} }