|
@@ -31,7 +31,10 @@
|
|
|
|
|
|
<script>
|
|
|
import uniDateformat from '@/components/common/uniDateformat'
|
|
|
- import chatBox from './chatBox.vue';
|
|
|
+ import chatBox from './chatBox.vue';
|
|
|
+ import {
|
|
|
+ mapGetters
|
|
|
+ } from 'vuex';
|
|
|
export default {
|
|
|
data() {
|
|
|
return {
|
|
@@ -40,10 +43,13 @@
|
|
|
}
|
|
|
},
|
|
|
created() {
|
|
|
- this.chatData = this.$store.getters.chatList;
|
|
|
- if (this.chatData.length > 0) this.nowChat = this.chatData[0];
|
|
|
+ this.init();
|
|
|
},
|
|
|
methods: {
|
|
|
+ init() {
|
|
|
+ this.chatData = this.$store.getters.chatList.filter(node => node.conversationId !== 'system');
|
|
|
+ if (this.chatData.length > 0) this.nowChat = this.chatData[0];
|
|
|
+ },
|
|
|
linkTo(item) {
|
|
|
this.nowChat = item;
|
|
|
}
|
|
@@ -51,7 +57,15 @@
|
|
|
components: {
|
|
|
uniDateformat,
|
|
|
chatBox
|
|
|
- }
|
|
|
+ },
|
|
|
+ computed: {
|
|
|
+ ...mapGetters(['chatList'])
|
|
|
+ },
|
|
|
+ watch: {
|
|
|
+ chatList() {
|
|
|
+ this.chatData = this.$store.getters.chatList.filter(node => node.conversationId !== 'system');
|
|
|
+ }
|
|
|
+ },
|
|
|
}
|
|
|
</script>
|
|
|
|