no message
This commit is contained in:
parent
6db6528be1
commit
3aa90f7006
@ -162,24 +162,19 @@ export default {
|
||||
},
|
||||
|
||||
dialogId: {
|
||||
handler() {
|
||||
this.autoBottom = true;
|
||||
this.msgNew = 0;
|
||||
this.topId = -1;
|
||||
this.getMsg();
|
||||
handler(id) {
|
||||
if (id) {
|
||||
this.autoBottom = true;
|
||||
this.msgNew = 0;
|
||||
this.topId = -1;
|
||||
this.$store.dispatch("getDialogMsgs", id);
|
||||
}
|
||||
},
|
||||
immediate: true
|
||||
}
|
||||
},
|
||||
|
||||
methods: {
|
||||
getMsg() {
|
||||
if (!this.dialogId) {
|
||||
return;
|
||||
}
|
||||
this.$store.dispatch("getDialogMsgs", this.dialogId);
|
||||
},
|
||||
|
||||
sendMsg(text) {
|
||||
if (typeof text === "string" && text) {
|
||||
this.msgText = text;
|
||||
|
@ -345,7 +345,7 @@
|
||||
</div>
|
||||
<div class="task-dialog" :style="dialogStyle">
|
||||
<template v-if="taskDetail.dialog_id > 0">
|
||||
<DialogWrapper ref="dialog" :dialog-id="taskDetail.dialog_id">
|
||||
<DialogWrapper v-if="taskId > 0" ref="dialog" :dialog-id="taskDetail.dialog_id">
|
||||
<div slot="head" class="head">
|
||||
<Icon class="icon" type="ios-chatbubbles-outline" />
|
||||
<div class="nav">
|
||||
@ -1083,6 +1083,7 @@ export default {
|
||||
},
|
||||
}).then(({data}) => {
|
||||
this.$store.dispatch("saveTask", data);
|
||||
this.$store.dispatch("getDialogOne", data.dialog_id);
|
||||
this.$nextTick(() => {
|
||||
this.$refs.dialog.sendMsg(this.msgText);
|
||||
this.msgText = "";
|
||||
|
3
resources/assets/js/store/actions.js
vendored
3
resources/assets/js/store/actions.js
vendored
@ -1454,8 +1454,11 @@ export default {
|
||||
dispatch("addTaskSuccess", data)
|
||||
break;
|
||||
case 'update':
|
||||
dispatch("saveTask", data)
|
||||
break;
|
||||
case 'dialog':
|
||||
dispatch("saveTask", data)
|
||||
dispatch("getDialogOne", data.dialog_id)
|
||||
break;
|
||||
case 'upload':
|
||||
dispatch("getTaskFiles", data.task_id)
|
||||
|
Loading…
x
Reference in New Issue
Block a user