Commit 491b1261 by xinla

会话存档布局优化

1 parent a9d5bf8f
...@@ -8,15 +8,11 @@ ...@@ -8,15 +8,11 @@
@click="liClick(item)" @click="liClick(item)"
> >
<el-row style="padding:10px"> <el-row style="padding:10px">
<el-col :span="3" <el-col :span="3"><img :src="item.avatar"/></el-col>
><img :src="item.avatar"
/></el-col>
<el-col :span="21"> <el-col :span="21">
<p> <p>
{{ item.name }} {{ item.name }}
<span class="fr gray">{{ <span class="fr gray">{{ item.msgTime }}</span>
item.msgTime
}}</span>
</p> </p>
<p class="gray padt10" v-if="item.contact"> <p class="gray padt10" v-if="item.contact">
{{ JSON.parse(item.contact).content }} {{ JSON.parse(item.contact).content }}
...@@ -58,7 +54,7 @@ export default { ...@@ -58,7 +54,7 @@ export default {
<style lang="scss" scoped> <style lang="scss" scoped>
.list { .list {
overflow-y: scroll; overflow-y: scroll;
height: 651px; height: calc(100vh - 328px);
::-webkit-scrollbar { ::-webkit-scrollbar {
display: none; display: none;
} }
......
<template> <template>
<div class="list" v-loading="loading"> <div class="list" v-loading="loading">
<div v-if="personList"> <div v-if="personList.length">
<ul> <ul>
<li <li
v-for="(item, index) in personList" v-for="(item, index) in personList"
:key="index" :key="index"
@click="liClick(item)" @click="liClick(item)"
> >
<el-row style="padding:10px" v-if="item.msgType == 'text'"> <el-row type="flex" v-if="item.msgType == 'text'">
<span class="fl"> <div class="ninebox">
<div class="ninebox"> <ul v-if="item.avatar">
<ul v-if="item.avatar"> <li v-for="(a, i) in item.avatar.split(',')" :key="i">
<li <img :src="a" />
v-for="(a, i) in item.avatar.split(',')" </li>
:key="i" </ul>
> </div>
<img :src="a" /> <div class="fl" style="margin-left:8px;line-height:60px">
</li>
</ul>
</div>
</span>
<span class="fl" style="margin-left:8px;line-height:60px">
<p> <p>
{{ item.name }} {{ item.name }}
<span class="fr gray">{{ <!-- <span class="fr gray">{{ item.msgTime }}</span> -->
item.msgTime
}}</span>
</p> </p>
<p class="gray" v-if="item"> <!-- <p class="gray" v-if="item">
{{ item.name }}:{{ {{ item.name }}:
item.content {{ item.content }}
}} </p> -->
</p> </div>
</span>
</el-row> </el-row>
<!-- <el-row style="padding:10px" v-if="item.finalChatContext.msgtype=='file'"> <!-- <el-row style="padding:10px" v-if="item.finalChatContext.msgtype=='file'">
<el-col :span="3">&nbsp;</el-col> <el-col :span="3">&nbsp;</el-col>
...@@ -46,7 +38,9 @@ ...@@ -46,7 +38,9 @@
</li> </li>
</ul> </ul>
</div> </div>
<div v-else></div> <div class="ac" v-else>
暂无数据
</div>
</div> </div>
</template> </template>
<script> <script>
...@@ -77,6 +71,7 @@ export default { ...@@ -77,6 +71,7 @@ export default {
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.ninebox { .ninebox {
flex: none;
width: 54px; width: 54px;
height: 52px; height: 52px;
border: 1px solid #199ed8; border: 1px solid #199ed8;
...@@ -90,6 +85,7 @@ export default { ...@@ -90,6 +85,7 @@ export default {
} }
.list { .list {
overflow-y: scroll; overflow-y: scroll;
height: calc(100vh - 328px);
::-webkit-scrollbar { ::-webkit-scrollbar {
display: none; display: none;
......
<template> <template>
<div class="list" v-loading="loading"> <div class="list" v-loading="loading">
<div v-if="personList.length >= 1"> <div v-if="personList.length">
<ul> <ul>
<li <li
v-for="(item, index) in personList" v-for="(item, index) in personList"
...@@ -8,9 +8,7 @@ ...@@ -8,9 +8,7 @@
@click="liClick(item)" @click="liClick(item)"
> >
<el-row style="padding:10px"> <el-row style="padding:10px">
<span class="fl"> <span class="fl"> <img :src="item.avatar"/></span>
<img :src="item.avatar"
/></span>
<span class="fl" style="margin-left:8px"> <span class="fl" style="margin-left:8px">
<p>{{ item.name }}</p> <p>{{ item.name }}</p>
</span> </span>
...@@ -18,7 +16,9 @@ ...@@ -18,7 +16,9 @@
</li> </li>
</ul> </ul>
</div> </div>
<div v-else></div> <div class="ac" v-else>
暂无数据
</div>
</div> </div>
</template> </template>
<script> <script>
...@@ -51,7 +51,8 @@ export default { ...@@ -51,7 +51,8 @@ export default {
<style lang="scss" scoped> <style lang="scss" scoped>
.list { .list {
overflow-y: scroll; overflow-y: scroll;
height: 708px; height: calc(100vh - 328px);
::-webkit-scrollbar { ::-webkit-scrollbar {
display: none; display: none;
} }
......
<template> <template>
<div class="list" v-loading="loading"> <div class="list" v-loading="loading">
<div v-if="personList.length >= 1"> <div v-if="personList.length">
<ul> <ul>
<li <li
v-for="(item, index) in personList" v-for="(item, index) in personList"
:key="index" :key="index"
@click="liClick(item)" @click="liClick(item)"
> >
<el-row style="padding:10px"> <el-row>
<span class="fl"> <img :src="item.avatar"/></span> <span class="fl"> <img :src="item.avatar"/></span>
<span class="fl" style="margin-left:8px"> <span class="fl" style="margin-left:8px">
<p>{{ item.name }}</p> <p>{{ item.name }}</p>
</span> </span>
<span class="fl"> <!-- <span class="fl">
<p>{{ item.contact }}</p> <p>{{ item.contact }}</p>
</span> </span> -->
</el-row> </el-row>
</li> </li>
</ul> </ul>
</div> </div>
<div v-else></div> <div class="ac" v-else>
暂无数据
</div>
</div> </div>
</template> </template>
<script> <script>
...@@ -45,8 +47,8 @@ export default { ...@@ -45,8 +47,8 @@ export default {
console.log(e, 'liClick') console.log(e, 'liClick')
this.$emit('chatFn', e) this.$emit('chatFn', e)
}, },
msgContentType(type,msg){ msgContentType(type, msg) {
console.log(type,msg, 'msgContentType') console.log(type, msg, 'msgContentType')
//消息获取 //消息获取
/*case msg = JSON.parse(msg); /*case msg = JSON.parse(msg);
switch (type){ switch (type){
...@@ -59,7 +61,7 @@ export default { ...@@ -59,7 +61,7 @@ export default {
<style lang="scss" scoped> <style lang="scss" scoped>
.list { .list {
overflow-y: scroll; overflow-y: scroll;
height: 708px; height: calc(100vh - 328px);
::-webkit-scrollbar { ::-webkit-scrollbar {
display: none; display: none;
} }
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
</el-input> </el-input>
</div> </div>
</div> </div>
<div class="ct_box ct_boxFirst"> <div class="ct_box ct_boxFirst" style="height: calc(100vh - 288px)">
<ul> <ul>
<li <li
v-for="(i, t) in CList" v-for="(i, t) in CList"
...@@ -289,7 +289,7 @@ export default { ...@@ -289,7 +289,7 @@ export default {
methods: { methods: {
chatFn(data) { chatFn(data) {
this.chatData = data this.chatData = data
console.log(data,"<><><><>><") console.log(data, '<><><><>><')
this.activeNameThreeClick() this.activeNameThreeClick()
}, },
groupFn(data) { groupFn(data) {
...@@ -317,7 +317,7 @@ export default { ...@@ -317,7 +317,7 @@ export default {
this.loading = true this.loading = true
} }
this.personList = [] this.personList = []
if(this.activeName == '0'){ if (this.activeName == '0') {
content content
.selectAloneChatList({ .selectAloneChatList({
fromId: this.fromId, fromId: this.fromId,
...@@ -330,7 +330,7 @@ export default { ...@@ -330,7 +330,7 @@ export default {
.catch((err) => { .catch((err) => {
this.loading = false this.loading = false
}) })
}else { } else {
content content
.getGroupChatList({ .getGroupChatList({
fromId: this.fromId fromId: this.fromId
...@@ -417,7 +417,7 @@ export default { ...@@ -417,7 +417,7 @@ export default {
}) })
}, },
chatMsgList() { chatMsgList() {
this.getChatList(); this.getChatList()
} }
}, },
mounted() { mounted() {
...@@ -440,7 +440,6 @@ export default { ...@@ -440,7 +440,6 @@ export default {
.employ { .employ {
background: #f6f6f9; background: #f6f6f9;
min-height: 800px;
.hd_tabs { .hd_tabs {
background: #fff; background: #fff;
...@@ -460,7 +459,6 @@ export default { ...@@ -460,7 +459,6 @@ export default {
.hd_tabs_content { .hd_tabs_content {
width: 100%; width: 100%;
min-height: 653px;
border-bottom: 1px solid #efefef; border-bottom: 1px solid #efefef;
} }
...@@ -472,13 +470,11 @@ export default { ...@@ -472,13 +470,11 @@ export default {
} }
.ct_boxFirst { .ct_boxFirst {
height: 700px;
} }
.ct_box { .ct_box {
background: white; background: white;
border-bottom: 1px solid #efefef; border-bottom: 1px solid #efefef;
min-height: 709px;
padding: 10px; padding: 10px;
overflow-y: scroll; overflow-y: scroll;
color: #999; color: #999;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!