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

View File

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

View File

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

View File

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