Commit 168aeeff by panjiangyi

会话详情

parent f3053e19
...@@ -7,11 +7,12 @@ ...@@ -7,11 +7,12 @@
</div> </div>
<div class="chat-panel h-100 pos-rel" v-if="!userMode"> <div class="chat-panel h-100 pos-rel" v-if="!userMode">
<el-tabs class="chat-panel-tabs h-100" v-model="currentTab"> <el-tabs class="chat-panel-tabs h-100" v-model="currentTab">
<el-tab-pane label="数据" name="one" <el-tab-pane label="数据" name="one" class="h-100">
>model的数据,可配置。 <ModelDetail
<div class="detal-btns"> :model_name="currentChat.business_data.model_name"
<el-button @click="goTodetail">查看详情</el-button> :id="currentChat.business_data.obj_id"
</div> :name="currentChat.business_data.detail_name"
/>
</el-tab-pane> </el-tab-pane>
<el-tab-pane <el-tab-pane
:label="`成员${chatMembers.length}人`" :label="`成员${chatMembers.length}人`"
...@@ -23,7 +24,10 @@ ...@@ -23,7 +24,10 @@
>工作流</el-tab-pane >工作流</el-tab-pane
> >
<el-tab-pane label="备注" name="four"> <el-tab-pane label="备注" name="four">
<remarkList :modelName="currentChat.business_data.model_name" :associateId="currentChat.business_data.obj_id" /> <remarkList
:modelName="currentChat.business_data.model_name"
:associateId="currentChat.business_data.obj_id"
/>
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="回复" name="five"> <el-tab-pane label="回复" name="five">
<MsgShortCut <MsgShortCut
...@@ -52,6 +56,7 @@ import ChatMembers from "./components/chat-members.vue"; ...@@ -52,6 +56,7 @@ import ChatMembers from "./components/chat-members.vue";
import ChatRoom from "./components/chat-room.vue"; import ChatRoom from "./components/chat-room.vue";
import ChatTitle from "./components/chat-title.vue"; import ChatTitle from "./components/chat-title.vue";
import MessageList from "./components/message-list.vue"; import MessageList from "./components/message-list.vue";
import ModelDetail from "./components/model-detail.vue";
import MsgShortCut from "./components/msg-shortcut.vue"; import MsgShortCut from "./components/msg-shortcut.vue";
import buttonThrottle from "./utils/button-throttle"; import buttonThrottle from "./utils/button-throttle";
...@@ -67,12 +72,10 @@ import { ChatStore, chatStore } from "@/customer-service/store/model"; ...@@ -67,12 +72,10 @@ import { ChatStore, chatStore } from "@/customer-service/store/model";
ChatMembers, ChatMembers,
remarkList, remarkList,
ChatTitle, ChatTitle,
ModelDetail,
}, },
}) })
export default class Chat extends Vue { export default class Chat extends Vue {
@chatStore.Mutation(ChatStore.MUTATION_HIDE_CHAT)
private readonly hideChat: ChatStore.MUTATION_HIDE_CHAT;
@chatStore.Getter(ChatStore.GETTER_CURRENT_CHAT_PRESENT_MEMBERS) @chatStore.Getter(ChatStore.GETTER_CURRENT_CHAT_PRESENT_MEMBERS)
private readonly chatMembers!: ChatStore.GETTER_CURRENT_CHAT_PRESENT_MEMBERS; private readonly chatMembers!: ChatStore.GETTER_CURRENT_CHAT_PRESENT_MEMBERS;
...@@ -119,14 +122,6 @@ export default class Chat extends Vue { ...@@ -119,14 +122,6 @@ export default class Chat extends Vue {
await this._addMember(users); await this._addMember(users);
done(); done();
} }
private goTodetail() {
const { model_name, obj_id } = this.currentChat.business_data;
this.$router.push(
`/${this.$route.params.project}/${this.$route.params.entrance}/detail/${model_name}/key/${obj_id}`
);
this.hideChat();
}
} }
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
...@@ -177,14 +172,7 @@ export default class Chat extends Vue { ...@@ -177,14 +172,7 @@ export default class Chat extends Vue {
} }
.chat-panel-tabs { .chat-panel-tabs {
/deep/ .el-tabs__content { /deep/ .el-tabs__content {
height:calc(100% - 70px); height: calc(100% - 54px);
} }
} }
.detal-btns {
position: absolute;
bottom:0;
right:0;
left:0;
text-align: center;
}
</style> </style>
...@@ -21,14 +21,14 @@ const sdk = Chat.getSdk; ...@@ -21,14 +21,14 @@ const sdk = Chat.getSdk;
const UniplatChatModelName = "UniplatChat"; const UniplatChatModelName = "UniplatChat";
const model = () => sdk().model(UniplatChatModelName); const model = () => sdk().model(UniplatChatModelName);
const orgId = Chat.getOrgId; const orgId = Chat.getOrgId;
const getMyinfo = (function () { // const getMyinfo = (function () {
let data: Index.getUserInfo; // let data: Index.getUserInfo;
return async () => { // return async () => {
if (data != null) return data; // if (data != null) return data;
data = await sdk().getUserInfo(); // data = await sdk().getUserInfo();
return data; // return data;
}; // };
})(); // })();
function uniqueMessages( function uniqueMessages(
messages: NonNullable<ChatStore.STATE_CHAT_MSG_HISTORY> messages: NonNullable<ChatStore.STATE_CHAT_MSG_HISTORY>
) { ) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment