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