增加昵称和部门的匹配
This commit is contained in:
@@ -14,7 +14,7 @@
|
||||
@scrolltolower="scrolltolower"
|
||||
>
|
||||
<conversation-item
|
||||
v-for="item in storeConversationList"
|
||||
v-for="item in conversationListWithDeptName"
|
||||
:key="item.conversationID"
|
||||
:source="item"
|
||||
ref="conversationItem"
|
||||
@@ -33,6 +33,8 @@
|
||||
import { mapGetters } from "vuex";
|
||||
import ChatHeader from "./components/ChatHeader.vue";
|
||||
import ConversationItem from "./components/ConversationItem.vue";
|
||||
import { getDeptNameByNickName } from "@/api/oa/binding";
|
||||
import { withDeptName } from '@/util/withDeptName';
|
||||
|
||||
export default {
|
||||
components: {
|
||||
@@ -48,11 +50,19 @@ export default {
|
||||
doubleClick: 0,
|
||||
triggered: false,
|
||||
refreshing: false,
|
||||
conversationListWithDeptName: [], // 新增
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters(["storeConversationList", "storeIsSyncing", "storeProgress"]),
|
||||
},
|
||||
watch: {
|
||||
storeConversationList: {
|
||||
handler: 'updateConversationListWithDeptName',
|
||||
immediate: true,
|
||||
deep: true
|
||||
}
|
||||
},
|
||||
onReady() {
|
||||
this.$nextTick(() => plus.navigator.closeSplashscreen());
|
||||
},
|
||||
@@ -87,6 +97,10 @@ export default {
|
||||
closeAllSwipe() {
|
||||
this.$refs.swipeWrapperRef.closeAll();
|
||||
},
|
||||
// 新增:异步获取部门名和颜色
|
||||
async updateConversationListWithDeptName() {
|
||||
this.conversationListWithDeptName = await withDeptName(this.storeConversationList);
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user