提交 1bdbc89a 编写于 作者: 张磊's avatar 张磊

Merge branch 'feat/zl' into 'develop'

add rtc im

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