提交 8933dfcb 编写于 作者: 张磊's avatar 张磊

add rtc im

上级 325fbe36
...@@ -15,17 +15,20 @@ ...@@ -15,17 +15,20 @@
<v-footer></v-footer> <v-footer></v-footer>
</div> </div>
</el-container> </el-container>
<chat :showChat="showChat" :currentUser="{}"></chat>
</div> </div>
</template> </template>
<script> <script>
import VHeader from "./views/layout/header.vue"; import VHeader from "./views/layout/header.vue";
import VSlidebar from "./views/layout/slidebar.vue"; import VSlidebar from "./views/layout/slidebar.vue";
import VFooter from "./views/layout/footer.vue"; import VFooter from "./views/layout/footer.vue";
import chat from './components/IM/chat'
import { import {
base64decode, base64decode,
isNotEmptyUtils, isNotEmptyUtils,
getUrlParamsMap, getUrlParamsMap,
ssoLogin ssoLogin,
bindDragHeader
} from "./utils/utils.js"; } from "./utils/utils.js";
import { mapActions, mapGetters } from "vuex"; import { mapActions, mapGetters } from "vuex";
import { getLoginUrl, getInnerLoginUrl } from "./utils/index.js"; import { getLoginUrl, getInnerLoginUrl } from "./utils/index.js";
...@@ -34,7 +37,8 @@ export default { ...@@ -34,7 +37,8 @@ export default {
components: { components: {
VHeader, VHeader,
VSlidebar, VSlidebar,
VFooter VFooter,
chat
}, },
data() { data() {
return { return {
...@@ -42,6 +46,7 @@ export default { ...@@ -42,6 +46,7 @@ export default {
userName: "", userName: "",
authList: [], authList: [],
systemType: 0, systemType: 0,
showChat:false
}; };
}, },
computed: { computed: {
...@@ -51,7 +56,11 @@ export default { ...@@ -51,7 +56,11 @@ export default {
vm = this; vm = this;
vm.getToken(); vm.getToken();
}, },
mounted() {}, mounted() {
setTimeout( function () {
bindDragHeader('.c-header', '.chat-wrap');
}, 1000)
},
methods: { methods: {
// 解密token // 解密token
getToken() { getToken() {
......
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
...@@ -5,7 +5,7 @@ export const containObject = function(...obj1) { ...@@ -5,7 +5,7 @@ export const containObject = function(...obj1) {
return obj return obj
} }
// 获取页面自适应高度 // 获取页面自适应高度
export function resizeHeight(cMinusHeight = 152, iMinuxHeight = 210, refHeightId = 'slidebar-container', export function resizeHeight(cMinusHeight = 152, iMinuxHeight = 210, refHeightId = 'slidebar-container',
containerHeightId = 'screenSet'){ containerHeightId = 'screenSet'){
// let containerHeight = p_getElm(refHeightId).getBoundingClientRect().height - 15; // let containerHeight = p_getElm(refHeightId).getBoundingClientRect().height - 15;
let containerHeight = document.body.clientHeight - 80; let containerHeight = document.body.clientHeight - 80;
...@@ -800,7 +800,7 @@ export const betaHandle = (limit) => { ...@@ -800,7 +800,7 @@ export const betaHandle = (limit) => {
} }
//转换年月日方法 //转换年月日方法
export const timeHandle = (str) => { export const timeHandle = (str) => {
let date = new Date(str * 1); let date = new Date(str * 1);
let Y = date.getFullYear() + '-'; let Y = date.getFullYear() + '-';
let M = (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1) + '-'; let M = (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1) + '-';
...@@ -809,10 +809,48 @@ export const timeHandle = (str) => { ...@@ -809,10 +809,48 @@ export const timeHandle = (str) => {
let m = change(date.getMinutes()); let m = change(date.getMinutes());
return Y + M + D + h + m return Y + M + D + h + m
} }
//补0操作 //补0操作
const change = (num) => { const change = (num) => {
if(parseInt(num) < 10){ if(parseInt(num) < 10){
num = '0'+ num; num = '0'+ num;
} }
return num; return num;
} }
\ No newline at end of file
export const bindDragHeader = (classname,content) =>{
const dragDom = document.querySelector(classname);
const con = document.querySelector(content);
let translate,contranslate;
dragDom.onmousedown = (e) => {
const disX = e.clientX;
const disY = e.clientY;
translate = dragDom.style.transform.replace(/[^0-9\-,]/g,'').split(',');
contranslate = con.style.transform.replace(/[^0-9\-,]/g,'').split(',');
con.style.transition = "transform 100ms liner";
document.onmousemove = function (e) {
const l = e.clientX - disX;
const t = e.clientY - disY;
let x, y, tran;
if(contranslate.length> 1){
x= (l+ Number(contranslate[0])) + 'px';
y = (t + Number(contranslate[1])) + 'px';
}else{
x= (l) + 'px';
y = (t ) + 'px';
}
tran = `translate(${x},${y})`;
con.style.transform = tran;
};
document.onmouseup = function (e) {
document.onmousemove = null;
document.onmouseup = null;
};
}
}
...@@ -99,7 +99,6 @@ ...@@ -99,7 +99,6 @@
</div> </div>
</template> </template>
<script> <script>
import RtcClient from "@/utils/live/rtc-client.js";
import { import {
getLiveTimeText, getLiveTimeText,
countDown, countDown,
...@@ -107,6 +106,7 @@ import { ...@@ -107,6 +106,7 @@ import {
laseTime, laseTime,
lastm, lastm,
} from "@/utils/live"; } from "@/utils/live";
import RtcClient from "../../../utils/live/RtcClient.js";
import { openLoading, closeLoading } from "@/utils/utils"; import { openLoading, closeLoading } from "@/utils/utils";
import alert from "@/components/common/alert.vue"; import alert from "@/components/common/alert.vue";
import timeLeft from "@/components/timeLeft"; import timeLeft from "@/components/timeLeft";
...@@ -390,7 +390,6 @@ export default { ...@@ -390,7 +390,6 @@ export default {
}, },
// 显示文案 // 显示文案
showText(status, role, item) { showText(status, role, item) {
console.log("status", status);
// 1 呼叫中 2 接入 3离线 // 1 呼叫中 2 接入 3离线
if (item.status == 2) { if (item.status == 2) {
item.timeleft = 0; item.timeleft = 0;
...@@ -555,19 +554,19 @@ export default { ...@@ -555,19 +554,19 @@ export default {
// 获取信息失败 // 获取信息失败
getErr() { getErr() {
closeLoading(this); closeLoading(this);
this.$nextTick(() => { // this.$nextTick(() => {
this.$refs.alert // this.$refs.alert
.init({ // .init({
confirmTxt: "我知道了", // confirmTxt: "我知道了",
title: `获取信息失败,请稍后重试`, // title: `获取信息失败,请稍后重试`,
}) // })
.then(() => { // .then(() => {
this.$router.go(-1); // // this.$router.go(-1);
}) // })
.catch((err) => { // .catch((err) => {
this.$router.go(-1); // // this.$router.go(-1);
}); // });
}); // });
}, },
reloadfn(msg) { reloadfn(msg) {
this.$nextTick(() => { this.$nextTick(() => {
......
<template> <template>
<div class="diagnosis-list-content"> <div class="diagnosis-list-content">
<div class="select-content screenSet"> <div class="select-content screenSet">
<div class="title">我的工作台</div> <div class="title">我的工作台</div>
</div> </div>
<div class="select-content screenSet"> <div class="select-content screenSet">
<!-- 时间 --> <!-- 时间 -->
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
<el-radio-button label="Cancelled">已取消(0)</el-radio-button> <el-radio-button label="Cancelled">已取消(0)</el-radio-button>
</el-radio-group> </el-radio-group>
</div> </div>
<div class="lfet" v-else > <div class="lfet" v-else >
<el-row :gutter="20"> <el-row :gutter="20">
<el-col :span="6"><div class="grid-content bg-purple"> <el-col :span="6"><div class="grid-content bg-purple">
...@@ -70,19 +70,23 @@ ...@@ -70,19 +70,23 @@
</el-pagination> </el-pagination>
</el-row> </el-row>
</div> </div>
</div> </div>
</template> </template>
<script> <script>
export default { export default {
components: {
},
data(){ data(){
return { return {
tabPosition:"all", tabPosition:"all",
value1:Date.now(), value1:Date.now(),
currentPage4:0, currentPage4:0,
// 判断是否是管理员 // 判断是否是管理员
isdon:'1', isdon:'1',
name:'' showChat: true
} }
}, },
methods:{ methods:{
...@@ -134,7 +138,7 @@ export default { ...@@ -134,7 +138,7 @@ export default {
} }
} }
} }
.el-row { .el-row {
margin-bottom: 20px; margin-bottom: 20px;
&:last-child { &:last-child {
...@@ -165,6 +169,6 @@ export default { ...@@ -165,6 +169,6 @@ export default {
padding: 10px 0; padding: 10px 0;
background-color: #f9fafc; background-color: #f9fafc;
} }
</style>node
\ No newline at end of file </style>
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册