|
@@ -1,5 +1,5 @@
|
|
|
<template>
|
|
|
- <section class="app-main">
|
|
|
+ <section class="app-main draggable-box">
|
|
|
<!-- -->
|
|
|
<transition name="fade-transform" mode="out-in">
|
|
|
<div>
|
|
@@ -56,13 +56,16 @@
|
|
|
</div>
|
|
|
</el-dialog>
|
|
|
</div>
|
|
|
- <div
|
|
|
+ <div class="draggable-item" v-draggable ref="draggableItem">
|
|
|
+ <div
|
|
|
class="optionBtn"
|
|
|
v-if="!outOptionvisible && isShowBtn"
|
|
|
- @click="openOptionMual"
|
|
|
+ @click.stop.prevent="openOptionMual"
|
|
|
>
|
|
|
操作手册
|
|
|
</div>
|
|
|
+ </div>
|
|
|
+
|
|
|
|
|
|
<!-- <div class="chart-join">
|
|
|
<el-badge :is-dot="noReadNum > 0 ? true : false" class="item">
|
|
@@ -88,6 +91,7 @@
|
|
|
<el-drawer
|
|
|
title="操作手册"
|
|
|
:visible.sync="outOptionvisible"
|
|
|
+
|
|
|
size="410px"
|
|
|
:append-to-body="true"
|
|
|
>
|
|
@@ -182,6 +186,7 @@ import "quill/dist/quill.bubble.css";
|
|
|
import { core, CoreEvent } from "./imkit";
|
|
|
import * as RongIMLib from "@rongcloud/imlib-next";
|
|
|
import { custom_service } from "./modal/chat.js";
|
|
|
+import draggable from '@/utils/draggable'
|
|
|
// 接入时需要将 '请更换您应用的 appkey' 替换为您的应用的 appkey
|
|
|
// let libOption = { appkey: "c9kqb3rdc451j" };
|
|
|
let libOption = {
|
|
@@ -215,6 +220,9 @@ export default {
|
|
|
};
|
|
|
},
|
|
|
components: { serviceRemind, chatModel },
|
|
|
+ directives:{
|
|
|
+ draggable
|
|
|
+ },
|
|
|
computed: {
|
|
|
key() {
|
|
|
return this.$route.path;
|
|
@@ -253,10 +261,8 @@ export default {
|
|
|
} catch (e) {}
|
|
|
|
|
|
this.init();
|
|
|
-
|
|
|
// 获取未读数
|
|
|
this.$bus.$on("getNoReadNum", obj => {
|
|
|
- console.log(obj, "getNoReadNum");
|
|
|
this.getNoReadMessage(obj);
|
|
|
});
|
|
|
|
|
@@ -275,7 +281,6 @@ export default {
|
|
|
init() {
|
|
|
core.connect(this.$store.state.user.imToken).then(res => {
|
|
|
if (res.code === RongIMLib.ErrorCode.SUCCESS) {
|
|
|
- console.log("链接成功, 链接用户 id 为: ", res.data.userId);
|
|
|
// this.isConnect = true;
|
|
|
this.getNoReadMessage(true);
|
|
|
} else {
|
|
@@ -289,8 +294,8 @@ export default {
|
|
|
// console.log("121212", message);
|
|
|
// });
|
|
|
},
|
|
|
+
|
|
|
handleMessages(newMessage) {
|
|
|
- console.log(newMessage, "newMessage");
|
|
|
this.getNoReadMessage(true);
|
|
|
},
|
|
|
onOpenChatRoom() {
|
|
@@ -302,12 +307,12 @@ export default {
|
|
|
if (status || this.chatVisible) {
|
|
|
RongIMLib.getTotalUnreadCount().then(res => {
|
|
|
if (res.code === 0) {
|
|
|
- console.log(res.code, res);
|
|
|
+
|
|
|
this.noReadNum = res.data || 0;
|
|
|
|
|
|
this.$bus.$emit("getShowNums", this.noReadNum);
|
|
|
} else {
|
|
|
- console.log(res.code, res.msg, res);
|
|
|
+
|
|
|
}
|
|
|
});
|
|
|
}
|
|
@@ -328,6 +333,11 @@ export default {
|
|
|
},
|
|
|
async openOptionMual() {
|
|
|
// this.outOptionvisible = true;
|
|
|
+ let flag = this.$refs.draggableItem.getAttribute('data-flag')
|
|
|
+ if(flag == 'true'){
|
|
|
+ return
|
|
|
+ }
|
|
|
+
|
|
|
await this.getMUal();
|
|
|
this.outOptionvisible = true;
|
|
|
},
|
|
@@ -342,7 +352,6 @@ export default {
|
|
|
});
|
|
|
this.optionList = res.data.rows;
|
|
|
|
|
|
- console.log(this.$route);
|
|
|
} catch (e) {
|
|
|
console.log(e);
|
|
|
}
|
|
@@ -424,9 +433,7 @@ export default {
|
|
|
width: 35px;
|
|
|
background-color: var(--color-primary);
|
|
|
color: #fff;
|
|
|
- position: fixed;
|
|
|
- right: 0;
|
|
|
- top: 250px;
|
|
|
+
|
|
|
padding: 10px;
|
|
|
border-radius: 8px;
|
|
|
cursor: pointer;
|
|
@@ -544,6 +551,16 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+.draggable-box{
|
|
|
+ position: relative;
|
|
|
+ .draggable-item{
|
|
|
+ right: 0;
|
|
|
+ top: 250px;
|
|
|
+ position: absolute;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+
|
|
|
/*设置字体的大小*/
|
|
|
</style>
|
|
|
<style scoped>
|