Commit 0a54817f authored by zhanglw's avatar zhanglw

安全帽sip语音通信

parent 33f3923a
......@@ -5,14 +5,14 @@ ENV = 'development'
#VUE_APP_BASE_API = 'http://39.164.225.220:5002'
#VUE_APP_LOCAL_API = 'http://39.164.225.220:5002'
VUE_APP_BASE_API = 'http://192.168.3.23:9092'
VUE_APP_LOCAL_API = 'http://192.168.3.23:9092'
#VUE_APP_BASE_API = 'http://192.168.3.23:9092'
#VUE_APP_LOCAL_API = 'http://192.168.3.23:9092'
#VUE_APP_BASE_API = 'http://192.168.3.216:9092'
#VUE_APP_LOCAL_API = 'http://192.168.3.216:9092'
VUE_APP_BASE_API = 'http://192.168.3.216:9092'
VUE_APP_LOCAL_API = 'http://192.168.3.216:9092'
VUE_APP_LOCAL_API2 = 'http://8.143.203.103:9091/'
VUE_APP_WS_API = 'ws://8.143.203.103:9092/webSocket'
VUE_APP_LOCAL_API2 = 'http://192.168.3.216:9092/'
VUE_APP_WS_API = 'ws://192.168.3.216:9092/webSocket'
# 是否启用 babel-plugin-dynamic-import-node插件
VUE_CLI_BABEL_TRANSPILE_MODULES = true
......@@ -3000,6 +3000,22 @@ var HttpReq = function(){
responseType: 'blob'
})
},
//获取安全帽拨号通话sip相关信息
propleGetSipInfo: function(param){
return request({
url: '/tab/perequipment/getdevicemsg',
method: 'get',
params:param,
})
},
//获取安全帽SOS通话sip相关信息
propleGetSOSSipInfo: function(param){
return request({
url: '/tab/perequipment/getdeviceroomid',
method: 'get',
params:param,
})
},
propleGetHisout: function(param){
return request({
url: '/tab/perhis/hisout',
......@@ -3150,7 +3166,6 @@ var HttpReq = function(){
},
......
<template>
<section class="app-main">
<dial-view ref="dialView" />
<transition name="fade-transform" mode="out-in">
<keep-alive :include="cachedViews">
<router-view :key="key" />
......@@ -18,8 +19,10 @@
</template>
<script>
import dialView from "./dialView";
export default {
name: 'AppMain',
components: { dialView },
computed: {
cachedViews() {
return this.$store.state.tagsView.cachedViews
......@@ -27,7 +30,15 @@ export default {
key() {
return this.$route.path
}
}
},
mounted() {
this.$nextTick(() => {
this.$refs.dialView.init()
// setTimeout(()=>{
// this.$refs.dialView.init('123456')
// },5000)
})
},
}
</script>
......
This diff is collapsed.
This diff is collapsed.
......@@ -41,6 +41,7 @@
<el-table-column prop="phone" label="电话" align="center"></el-table-column>
<el-table-column label="操作" align="center" fixed="right">
<template slot-scope="scope">
<span class="link-cell" @click="openDialView(scope.row)">实时通话</span>
<span class="link-cell" @click="openTrailView(scope.row)">轨迹回放</span>
<span class="link-cell" @click="openPosView(scope.row)">轨迹数据</span>
<span v-show="scope.row.userid" class="link-cell" @click="openvideoView(scope.row)">视频回放</span>
......@@ -104,6 +105,7 @@
</el-dialog>
<!-- 视频 -->
<el-dialog append-to-body :close-on-click-modal="false" :before-close="cancelFormViedoRtc" :visible="videoRtc" title="实况" width="800px">
<el-button style="position:absolute;top:70px;right:30px;z-index:99" @click="screenShot">截屏</el-button>
<video id="remoteVideo" controls style="width:100%;height:440px;"></video>
</el-dialog>
<el-dialog append-to-body :close-on-click-modal="false" :before-close="cancelFormViedo" :visible="videoDia" title="回放" width="800px">
......@@ -153,7 +155,7 @@
<el-button type="primary" @click="nextP()">下一页<i class="el-icon-arrow-right el-icon--right"></i></el-button>
</div>
</el-dialog>
<dial-view ref="dialView" />
</div>
</template>
......@@ -163,15 +165,17 @@ import {JSWebrtc} from '@/assets/js/jswebrtc.js';
import 'video.js/dist/video-js.css'
import videojs from 'video.js'
import 'videojs-contrib-hls'
import html2canvas from 'html2canvas'
import mars3dViewerMap from "../../../components/mars3d/Map5.vue";
import * as mars3d from "mars3d";
import * as Cesium from "mars3d-cesium";
import peopleIcon from "../../../assets/images/point.png";
import dialView from "./dialView";
export default {
name: 'peopleLogData',
components: {
mars3dViewerMap,
mars3dViewerMap, dialView
},
data() {
const basePathUrl = window.basePathUrl || ''
......@@ -244,6 +248,10 @@ export default {
this.map = map;
this.graphicLayer = graphicLayer;
},
openDialView(item) {
this.peoItem = item;
this.$refs.dialView.init(this.peoItem.safetyhatmac)
},
drawTrail() {
let map = this.map;
let graphicLayer = this.graphicLayer;
......@@ -590,6 +598,30 @@ export default {
}
this.trailView = false;
},
// 视频截图
screenShot() {
let video = document.getElementById('remoteVideo')
html2canvas(video, {
allowTaint: true,
useCORS: true
}).then((canvas) => {
const capture = canvas.toDataURL('image/png')
const saveInfo = {
'download': `MAC_${this.peoItem.safetyhatmac}_${this.getNowTime()}.png`,
'href': capture
}
const element = document.createElement('a')
element.style.display = 'none'
for (const key in saveInfo) {
element.setAttribute(key, saveInfo[key])
}
document.body.appendChild(element)
element.click()
setTimeout(() => {
document.body.removeChild(element)
}, 300)
})
},
// 点击搜索
toSearch() {
this.page = 1;
......@@ -626,6 +658,14 @@ export default {
this.pageP += 1;
this.loadDataP()
},
//获取当前时间
getNowTime() {
let date = new Date();
return '' + date.getFullYear() + this.addZero(date.getMonth() + 1) + this.addZero(date.getDate()) + this.addZero(date.getHours()) + this.addZero(date.getMinutes()) + this.addZero(date.getSeconds());
},
addZero(s) {
return s < 10 ? ('0' + s) : s;
},
},
}
</script>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment