|
|
|
@ -1,154 +1,158 @@ |
|
|
|
<template> |
|
|
|
<div style="height: 100%;"> |
|
|
|
<el-scrollbar ref="scrollbar" style="height: 400px;"> |
|
|
|
<div> |
|
|
|
<div class="friend-header"> |
|
|
|
<el-container class="is-vertical"> |
|
|
|
<el-main class="no-padding"> |
|
|
|
<div style="height: 100%;"> |
|
|
|
<el-scrollbar ref="scrollbar" style="height: 400px;"> |
|
|
|
<div> |
|
|
|
<img src="@/assets/img/h73565320p0.jpg" style="width: 100%;height: 16rem;" /> |
|
|
|
</div> |
|
|
|
<div style="position: absolute;bottom: 40px;right: 20px;"> |
|
|
|
<span style="color: #fff;" class="mr-5">{{userInfo.displayName}}</span> |
|
|
|
<img style="width:60px;height:60px;border-radius: 10px;" :src="userInfo.avatar" /> |
|
|
|
</div> |
|
|
|
<div class="message1"> |
|
|
|
<img class="imge mr-5" src="@/assets/img/message.png" @click.stop="onmessage" /> |
|
|
|
<img class="imge" src="@/assets/img/mouse-rotate.png" @click.stop="Refresh" /> |
|
|
|
<div class="message_icon" v-if="countNotice>0">{{countNotice}}</div> |
|
|
|
<div class="message_div" v-show="messagebool"> |
|
|
|
<el-scrollbar ref="scrollbar1" style="height: 200px;"> |
|
|
|
<div style="padding: 10px 0px;text-align: center;">消息</div> |
|
|
|
<div v-for="(item,index) in NoticeList" :key="item.id"> |
|
|
|
<div slot="reference" class="message_scrollbar_div" @click="clickshow(item.posts_id,item.posts_user_id)"> |
|
|
|
<div style="padding: 12px 12px 12px 10px;"> |
|
|
|
<img :src="item.option_user.avatar" style="width: 40px;border-radius: 5px;" /> |
|
|
|
</div> |
|
|
|
<div class="message_scrollbar_div1"> |
|
|
|
<div> |
|
|
|
<div style="color: #576b95;font-size: 16px;margin-bottom: 5px;">{{item.option_user.nickname}}</div> |
|
|
|
<div v-if="item.content"> |
|
|
|
<div class="chat-list-text" v-html="item.content" style="word-break: break-word;"></div> |
|
|
|
<div class="friend-header"> |
|
|
|
<div> |
|
|
|
<img src="@/assets/img/h73565320p0.jpg" style="width: 100%;height: 16rem;" /> |
|
|
|
</div> |
|
|
|
<div style="position: absolute;bottom: 40px;right: 20px;"> |
|
|
|
<span style="color: #fff;" class="mr-5">{{userInfo.displayName}}</span> |
|
|
|
<img style="width:60px;height:60px;border-radius: 10px;" :src="userInfo.avatar" /> |
|
|
|
</div> |
|
|
|
<div class="message1"> |
|
|
|
<img class="imge mr-5" src="@/assets/img/message.png" @click.stop="onmessage" /> |
|
|
|
<img class="imge" src="@/assets/img/mouse-rotate.png" @click.stop="Refresh" /> |
|
|
|
<div class="message_icon" v-if="countNotice>0">{{countNotice}}</div> |
|
|
|
<div class="message_div" v-show="messagebool"> |
|
|
|
<el-scrollbar ref="scrollbar1" style="height: 200px;"> |
|
|
|
<div style="padding: 10px 0px;text-align: center;">消息</div> |
|
|
|
<div v-for="(item,index) in NoticeList" :key="item.id"> |
|
|
|
<div slot="reference" class="message_scrollbar_div" @click="clickshow(item.posts_id,item.posts_user_id)"> |
|
|
|
<div style="padding: 12px 12px 12px 10px;"> |
|
|
|
<img :src="item.option_user.avatar" style="width: 40px;border-radius: 5px;" /> |
|
|
|
</div> |
|
|
|
<div v-if="item.type==1"> |
|
|
|
<img src="@/assets/img/Like.png" style="width: 20px;" class="mr-10"/> |
|
|
|
<div class="message_scrollbar_div1"> |
|
|
|
<div> |
|
|
|
<div style="color: #576b95;font-size: 16px;margin-bottom: 5px;">{{item.option_user.nickname}}</div> |
|
|
|
<div v-if="item.content"> |
|
|
|
<div class="chat-list-text" v-html="item.content.replace(/\n/g, '<br>')" style="word-break: break-word;"></div> |
|
|
|
</div> |
|
|
|
<div v-if="item.type==1"> |
|
|
|
<img src="@/assets/img/Like.png" style="width: 20px;" class="mr-10"/> |
|
|
|
</div> |
|
|
|
<div style="font-size: 10px;margin-top: 5px;">{{item.create_time}}</div> |
|
|
|
</div> |
|
|
|
<div v-if="item.file.src" style="margin-left: 10px;"> |
|
|
|
<img :src="'http://192.168.66.16:8007'+item.file.src" style="width: 40px;border-radius: 5px;" /> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div style="font-size: 10px;margin-top: 5px;">{{item.create_time}}</div> |
|
|
|
</div> |
|
|
|
<div v-if="item.file.src" style="margin-left: 10px;"> |
|
|
|
<img :src="'http://192.168.66.16:8007'+item.file.src" style="width: 40px;border-radius: 5px;" /> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</el-scrollbar> |
|
|
|
</div> |
|
|
|
</el-scrollbar> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div v-for="(item,index) in list" :key="item.id"> |
|
|
|
<div style="padding: 20px;"> |
|
|
|
<div style="display: flex;"> |
|
|
|
<div> |
|
|
|
<el-avatar class="mr-5" :src="item.user.avatar"></el-avatar> |
|
|
|
</div> |
|
|
|
<div> |
|
|
|
<div>{{item.user.nickname}}</div> |
|
|
|
<div style="color: #aaaaaa;font-size: 12px;">{{item.create_time}}</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
<div class="text-content" style="cursor: pointer;" v-if="contenthtml(item.content)" @click="handleLink(item.content)">{{item.content}}</div> |
|
|
|
<div class="chat-list-text" v-html="item.content" v-else></div> |
|
|
|
|
|
|
|
<div style="display: flex;flex-wrap: wrap;width: 350px;margin-top: 10px;"> |
|
|
|
<div v-for="(itemfil,indexfil) in item.files" :key="itemfil.file_id" style="margin-right: 10px;margin-bottom: 10px;"> |
|
|
|
<div v-if="itemfil.type==1" @click="$preview('http://192.168.66.16:8007/view.html?src=http://192.168.66.16:8007'+itemfil.src);"> |
|
|
|
<img :src="'http://192.168.66.16:8007'+itemfil.src" style="width: 100px;height: 100px;" /> |
|
|
|
</div> |
|
|
|
<div v-if="itemfil.type==2"> |
|
|
|
<video style="max-width: 150px;" :src="'http://192.168.66.16:8007'+itemfil.src" controls></video> |
|
|
|
<div v-for="(item,index) in list" :key="item.id"> |
|
|
|
<div style="padding: 20px;"> |
|
|
|
<div style="display: flex;"> |
|
|
|
<div> |
|
|
|
<el-avatar class="mr-5" :src="item.user.avatar"></el-avatar> |
|
|
|
</div> |
|
|
|
<div> |
|
|
|
<div>{{item.user.nickname}}</div> |
|
|
|
<div style="color: #aaaaaa;font-size: 12px;">{{item.create_time}}</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
<!-- 定位 --> |
|
|
|
<div v-if="item.location" @click="openAmap(item.location,item.location_address)" style="cursor: pointer;display: flex;margin-top: 10px;"> |
|
|
|
<i class="el-icon-location-outline" style="font-size: 20px;"></i> |
|
|
|
<div>{{item.location_address}}</div> |
|
|
|
</div> |
|
|
|
<div class="text-content" style="cursor: pointer;white-space: pre-wrap;line-break: anywhere;" v-if="contenthtml(item.content)" @click="handleLink(item.content)">{{item.content}}</div> |
|
|
|
<div class="chat-list-text" style="white-space: pre-wrap;line-break: anywhere;" v-html="item.content.replace(/\n/g, '<br>')" v-else></div> |
|
|
|
|
|
|
|
<div style="display: flex;justify-content: space-between;"> |
|
|
|
<div></div> |
|
|
|
<div style="display: flex;"> |
|
|
|
<div @click="onLike(item.id)"> |
|
|
|
<img src="@/assets/img/Like1.png" v-if="item.is_like === 1" class="mr-10 Like"/> |
|
|
|
<img src="@/assets/img/Like.png" v-else class="mr-10 Like"/> |
|
|
|
<div style="display: flex;flex-wrap: wrap;width: 350px;margin-top: 10px;"> |
|
|
|
<div v-for="(itemfil,indexfil) in item.files" :key="itemfil.file_id" style="margin-right: 10px;margin-bottom: 10px;"> |
|
|
|
<div v-if="itemfil.type==1" @click="$preview('http://192.168.66.16:8007/view.html?src=http://192.168.66.16:8007'+itemfil.src);"> |
|
|
|
<img :src="'http://192.168.66.16:8007'+itemfil.src" style="width: 100px;height: 100px;" /> |
|
|
|
</div> |
|
|
|
<div v-if="itemfil.type==2"> |
|
|
|
<video style="max-width: 150px;" :src="'http://192.168.66.16:8007'+itemfil.src" controls></video> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div @click="onchat(index)"> |
|
|
|
<img src="@/assets/img/chat.png" class="Like mr-10"/> |
|
|
|
|
|
|
|
<!-- 定位 --> |
|
|
|
<div v-if="item.location" @click="openAmap(item.location,item.location_address)" style="cursor: pointer;display: flex;margin-top: 10px;"> |
|
|
|
<i class="el-icon-location-outline" style="font-size: 20px;"></i> |
|
|
|
<div>{{item.location_address}}</div> |
|
|
|
</div> |
|
|
|
<div v-if="item.user_id == userInfo.user_id"> |
|
|
|
<el-popconfirm title="是否要删除该内容" @confirm="Delete(item.id)"> |
|
|
|
<el-button slot="reference" type="text" icon="el-icon-delete" circle style="font-size: 20px;color: #c7c7c7;padding: 0px;"></el-button> |
|
|
|
</el-popconfirm> |
|
|
|
|
|
|
|
<div style="display: flex;justify-content: space-between;"> |
|
|
|
<div></div> |
|
|
|
<div style="display: flex;"> |
|
|
|
<div @click="onLike(item.id)"> |
|
|
|
<img src="@/assets/img/Like1.png" v-if="item.is_like === 1" class="mr-10 Like"/> |
|
|
|
<img src="@/assets/img/Like.png" v-else class="mr-10 Like"/> |
|
|
|
</div> |
|
|
|
<div @click="onchat(index)"> |
|
|
|
<img src="@/assets/img/chat.png" class="Like mr-10"/> |
|
|
|
</div> |
|
|
|
<div v-if="item.user_id == userInfo.user_id"> |
|
|
|
<el-popconfirm title="是否要删除该内容" @confirm="Delete(item.id)"> |
|
|
|
<el-button slot="reference" type="text" icon="el-icon-delete" circle style="font-size: 20px;color: #c7c7c7;padding: 0px;"></el-button> |
|
|
|
</el-popconfirm> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="flex Likeview" v-if="item.likes.length!=0"> |
|
|
|
<div v-for="(itemws,indexws) in item.likes" :key="indexws" style="margin-right: 13px;display: flex;flex-wrap: wrap;"> |
|
|
|
<img src="@/assets/img/Like1.png" class="Like"/> |
|
|
|
<div style="margin-left: 2px;">{{itemws.nickname}}</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div v-show="numindex === index&&boll"> |
|
|
|
<div style="display: flex;justify-content: right;"> |
|
|
|
<div style="position: relative;margin-top: 10px;margin-bottom: 10px;border: 1px solid #ccc;width: 800px;"> |
|
|
|
<div :style="{'padding-bottom': '45px'}"> |
|
|
|
<!-- ,'width': isFulls ? '1150px' : '895px' --> |
|
|
|
<quill-editor :key="`editor-${item.id}-${index}`" ref="quillEditor" :options="editorOptions" @change="(e) => onEditorChange(e, index)"></quill-editor> |
|
|
|
<div class="flex Likeview" v-if="item.likes.length!=0"> |
|
|
|
<div v-for="(itemws,indexws) in item.likes" :key="indexws" style="margin-right: 13px;display: flex;flex-wrap: wrap;"> |
|
|
|
<img src="@/assets/img/Like1.png" class="Like"/> |
|
|
|
<div style="margin-left: 2px;">{{itemws.nickname}}</div> |
|
|
|
</div> |
|
|
|
<div class="emoji"> |
|
|
|
<div class="mr-10"> |
|
|
|
<img src="@/assets/img/expression.png" width="28" @click="showAppBox" style="cursor: pointer;" /> |
|
|
|
<el-scrollbar class="icon" v-if="isFocus"> |
|
|
|
<div style="display: flex;flex-wrap: wrap;"> |
|
|
|
<div v-for="(iteme,indexe) in emoji" class="im-emoji-item" :key="indexe"> |
|
|
|
<img :src="iteme.src" style="width:20px;;height:20px;cursor: pointer;" @click="chooseEmoji(iteme)" /> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div v-show="numindex === index&&boll"> |
|
|
|
<div style="display: flex;justify-content: right;"> |
|
|
|
<div style="position: relative;margin-top: 10px;margin-bottom: 10px;border: 1px solid #ccc;width: 800px;"> |
|
|
|
<div :style="{'padding-bottom': '45px'}"> |
|
|
|
<!-- ,'width': isFulls ? '1150px' : '895px' --> |
|
|
|
<quill-editor :key="`editor-${item.id}-${index}`" ref="quillEditor" :options="editorOptions" @change="(e) => onEditorChange(e, index)"></quill-editor> |
|
|
|
</div> |
|
|
|
<div class="emoji"> |
|
|
|
<div class="mr-10"> |
|
|
|
<img src="@/assets/img/expression.png" width="28" @click="showAppBox" style="cursor: pointer;" /> |
|
|
|
<el-scrollbar class="icon" v-if="isFocus"> |
|
|
|
<div style="display: flex;flex-wrap: wrap;"> |
|
|
|
<div v-for="(iteme,indexe) in emoji" class="im-emoji-item" :key="indexe"> |
|
|
|
<img :src="iteme.src" style="width:20px;height:20px;cursor: pointer;" @click="chooseEmoji(iteme)" /> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</el-scrollbar> |
|
|
|
</div> |
|
|
|
</el-scrollbar> |
|
|
|
<div><el-button type="primary" @click="sendTextMsg(item.id,index)">发送</el-button></div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div><el-button type="primary" @click="sendTextMsg(item.id,index)">发送</el-button></div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
<div v-for="(iteme,indexw) in item.comment" :key="indexw"> |
|
|
|
<div class="comment_view"> |
|
|
|
<div> |
|
|
|
<div class="comment_view1" @click.stop="onchat(index,iteme.id)"> |
|
|
|
<div v-for="(iteme,indexw) in item.comment" :key="indexw"> |
|
|
|
<div class="comment_view"> |
|
|
|
<div> |
|
|
|
<div style="display: flex;" v-if="iteme.reply_user_name!==''"> |
|
|
|
<div>{{iteme.nickname}} <span style="color: #000;margin-right: 5px;">回复</span></div> |
|
|
|
<div> {{iteme.reply_user_name}}:</div> |
|
|
|
<div class="comment_view1" @click.stop="onchat(index,iteme.id)"> |
|
|
|
<div> |
|
|
|
<div style="display: flex;" v-if="iteme.reply_user_name!==''"> |
|
|
|
<div>{{iteme.nickname}} <span style="color: #000;margin-right: 5px;">回复</span></div> |
|
|
|
<div> {{iteme.reply_user_name}}:</div> |
|
|
|
</div> |
|
|
|
<div v-else>{{iteme.nickname}}:</div> |
|
|
|
</div> |
|
|
|
<div style="flex: 1; min-width: 0; word-break: break-word;"> |
|
|
|
<!-- <div class="chat-list-text" v-html="iteme.content"></div> --> |
|
|
|
<div class="chat-list-text" style="cursor: pointer;" v-if="contenthtml(iteme.content)" @click="handleLink(iteme.content)" v-html="iteme.content"></div> |
|
|
|
<div class="chat-list-text" v-html="iteme.content.replace(/\n/g, '<br>')" v-else></div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div v-else>{{iteme.nickname}}:</div> |
|
|
|
</div> |
|
|
|
<div style="flex: 1; min-width: 0; word-break: break-word;"> |
|
|
|
<!-- <div class="chat-list-text" v-html="iteme.content"></div> --> |
|
|
|
<div class="chat-list-text" style="cursor: pointer;" v-if="contenthtml(iteme.content)" @click="handleLink(iteme.content)" v-html="iteme.content"></div> |
|
|
|
<div class="chat-list-text" v-html="iteme.content" v-else></div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</el-scrollbar> |
|
|
|
</el-scrollbar> |
|
|
|
|
|
|
|
<fndialog v-if="dialogVisible" :details="details" :dialogVisible="dialogVisible" @dialog="dialogVisible = $event"></fndialog> |
|
|
|
</div> |
|
|
|
<fndialog v-if="dialogVisible" :details="details" :dialogVisible="dialogVisible" @dialog="dialogVisible = $event"></fndialog> |
|
|
|
</div> |
|
|
|
</el-main> |
|
|
|
</el-container> |
|
|
|
</template> |
|
|
|
|
|
|
|
<script> |
|
|
|
@ -347,6 +351,7 @@ |
|
|
|
this.details.posts_id = id; |
|
|
|
this.details.friend_user_id = this.userInfo.user_id==id1?'':id1; |
|
|
|
this.dialogVisible = true |
|
|
|
console.log(this.dialogVisible); |
|
|
|
}, |
|
|
|
onEditorChange({ quill, html, text }, index){ |
|
|
|
this.list[index].commentContent = html; |
|
|
|
|