|
@@ -49,6 +49,7 @@
|
|
import { mapState, createNamespacedHelpers } from 'vuex';
|
|
import { mapState, createNamespacedHelpers } from 'vuex';
|
|
const { mapActions: clientApply } = createNamespacedHelpers('clientApply');
|
|
const { mapActions: clientApply } = createNamespacedHelpers('clientApply');
|
|
const { mapActions: mapChat } = createNamespacedHelpers('chat');
|
|
const { mapActions: mapChat } = createNamespacedHelpers('chat');
|
|
|
|
+const { mapActions: chatRecord } = createNamespacedHelpers('chatRecord');
|
|
export default {
|
|
export default {
|
|
name: 'chat',
|
|
name: 'chat',
|
|
props: {
|
|
props: {
|
|
@@ -73,12 +74,17 @@ export default {
|
|
methods: {
|
|
methods: {
|
|
...clientApply(['query']),
|
|
...clientApply(['query']),
|
|
...mapChat(['create']),
|
|
...mapChat(['create']),
|
|
|
|
+ ...chatRecord({ chatQuery: 'query' }),
|
|
async search() {
|
|
async search() {
|
|
let res = await this.query({ ...this.userInfo });
|
|
let res = await this.query({ ...this.userInfo });
|
|
if (this.$checkRes(res)) {
|
|
if (this.$checkRes(res)) {
|
|
this.$set(this, `customer`, res.data);
|
|
this.$set(this, `customer`, res.data);
|
|
this.channel();
|
|
this.channel();
|
|
}
|
|
}
|
|
|
|
+ let arr = await this.chatQuery({ client_id: this.customer.client_id, customer_id: this.customer.customer_id });
|
|
|
|
+ if (this.$checkRes(arr)) {
|
|
|
|
+ this.$set(this, `list`, arr.data);
|
|
|
|
+ }
|
|
},
|
|
},
|
|
// 区分发言人
|
|
// 区分发言人
|
|
isSender(data) {
|
|
isSender(data) {
|