Commit e567fc6f by panjiangyi

udpate ui

parent 8fba672b
Showing with 13 additions and 28 deletions
...@@ -122,6 +122,9 @@ export default class ChatList extends Vue { ...@@ -122,6 +122,9 @@ export default class ChatList extends Vue {
@chatStore.Mutation(ChatStore.MUTATION_SAVE_CHAT_TITLE) @chatStore.Mutation(ChatStore.MUTATION_SAVE_CHAT_TITLE)
private readonly saveChatTitle!: ChatStore.MUTATION_SAVE_CHAT_TITLE; private readonly saveChatTitle!: ChatStore.MUTATION_SAVE_CHAT_TITLE;
@chatStore.Mutation(ChatStore.MUTATION_SHOW_CHAT)
private readonly showChat: ChatStore.MUTATION_SHOW_CHAT
@Prop({ type: String, default: "-1" }) @Prop({ type: String, default: "-1" })
private selected!: string; private selected!: string;
...@@ -191,6 +194,9 @@ export default class ChatList extends Vue { ...@@ -191,6 +194,9 @@ export default class ChatList extends Vue {
uniplatId: data.uniplatId, uniplatId: data.uniplatId,
}).finally(this.raiseChatIdChanged); }).finally(this.raiseChatIdChanged);
this.showChat();
this.$emit("close");
this.saveChatTitle(data.uniplatId); this.saveChatTitle(data.uniplatId);
} }
...@@ -296,7 +302,7 @@ export default class ChatList extends Vue { ...@@ -296,7 +302,7 @@ export default class ChatList extends Vue {
.chat-msg { .chat-msg {
color: #888; color: #888;
text-align: start; text-align: start;
height: 16px; font-size: 13px;
margin-top: -3px; margin-top: -3px;
} }
} }
......
<template> <template>
<!-- <el-dialog <div class="chat-con h-100">
class="chat-dialog-con"
:close-on-click-modal="false"
:visible="visible"
@close="hide"
> -->
<div class="chat-con">
<div class="h-100 chat-list">
<chat-list />
</div>
<div v-if="chatId != null" class="h-100 chat-area"> <div v-if="chatId != null" class="h-100 chat-area">
<chat-room :close="hide" /> <chat-room :close="hide" />
</div> </div>
...@@ -29,12 +20,10 @@ ...@@ -29,12 +20,10 @@
@hide="hideAddMember" @hide="hideAddMember"
/> />
</div> </div>
<!-- </el-dialog> -->
</template> </template>
<script lang="ts"> <script lang="ts">
import { Component, Vue } from "vue-property-decorator"; import { Component, Vue } from "vue-property-decorator";
import ChatList from "./chat-list.vue";
import ChatRoom from "./chat-room.vue"; import ChatRoom from "./chat-room.vue";
import MessageList from "./message-list.vue"; import MessageList from "./message-list.vue";
import buttonThrottle from "./utils/button-throttle"; import buttonThrottle from "./utils/button-throttle";
...@@ -42,7 +31,7 @@ import buttonThrottle from "./utils/button-throttle"; ...@@ -42,7 +31,7 @@ import buttonThrottle from "./utils/button-throttle";
import ChatCreator from "@/customer-service/create-chat.vue"; import ChatCreator from "@/customer-service/create-chat.vue";
import { ChatStore, chatStore } from "@/customer-service/store/model"; import { ChatStore, chatStore } from "@/customer-service/store/model";
@Component({ components: { MessageList, ChatRoom, ChatList, ChatCreator } }) @Component({ components: { MessageList, ChatRoom, ChatCreator } })
export default class Chat extends Vue { export default class Chat extends Vue {
@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;
...@@ -85,28 +74,18 @@ export default class Chat extends Vue { ...@@ -85,28 +74,18 @@ export default class Chat extends Vue {
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
.chat-con { .chat-con {
--chat-list-width: 200px;
--chat-panel-width: 350px; --chat-panel-width: 350px;
position: fixed; font-size: 13px;
left: 0; color:black;
right: 0;
bottom: 0;
top: 64px;
z-index: 99999;
background: #fff;
} }
.chat-list,
.chat-area, .chat-area,
.chat-panel { .chat-panel {
display: inline-block; display: inline-block;
vertical-align: top; vertical-align: top;
} }
.chat-list {
width: var(--chat-list-width);
border-right: 1px solid #e1e1e1;
}
.chat-area { .chat-area {
width: calc(100% - var(--chat-list-width) - var(--chat-panel-width) - 2px); width: calc(100% - var(--chat-panel-width) - 2px);
} }
.chat-panel { .chat-panel {
position: relative; position: relative;
......
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