Commit 491b1261 by xinla

会话存档布局优化

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