视频监控

This commit is contained in:
yanran200730
2022-03-23 13:52:14 +08:00
parent 3ca0ba0f11
commit cbdc4a8b65

View File

@@ -3,19 +3,23 @@
<device-slider :show.sync="slider" :ins="instance" :dict="dict" @select="handleSelectMonitor" <device-slider :show.sync="slider" :ins="instance" :dict="dict" @select="handleSelectMonitor"
:render-item="renderTreeItem" ref="DeviceSlider"/> :render-item="renderTreeItem" ref="DeviceSlider"/>
<div class="monitorPane"> <div class="monitorPane">
<div class="headerBar"> <div class="headerBar" v-if="false">
<el-select default-first-option size="small" v-model="splitScreen"> <el-select default-first-option size="small" v-model="splitScreen">
<i slot="prefix" class="iconfont iconjdq_led_Led1"/> <i slot="prefix" class="iconfont iconjdq_led_Led1"/>
<el-option v-for="(op,i) in splitOps" :key="i" v-bind="op"/> <el-option v-for="(op,i) in splitOps" :key="i" v-bind="op"/>
</el-select> </el-select>
<!-- <el-button icon="el-icon-full-screen" @click="handleFullscreen">全屏</el-button>--> <!-- <el-button icon="el-icon-full-screen" @click="handleFullscreen">全屏</el-button>-->
</div> </div>
<div class="videoList"> <AiMonitor class="AppMonitorManage-video videoList" :src="videoUrl" type="slw"></AiMonitor>
<!-- <div class="videoList">
<AiMonitor :src="m.url" type="slwVideo"></AiMonitor>
<div class="videoBox" v-for="(m,i) in monitors" :key="i" :style="currentSplitStyle"> <div class="videoBox" v-for="(m,i) in monitors" :key="i" :style="currentSplitStyle">
<AiMonitor :src="m.url" type="slwVideo"></AiMonitor>
<iframe v-if="isShow" :id="id" style="width: 100%; height: 100%;" :src="`https://cdn.cunwuyun.cn/jssdk/slw/index.html?url=${src}`"></iframe>
<iframe :src="m.url" allow="autoplay *; microphone *; fullscreen *" allowfullscreen allowtransparency <iframe :src="m.url" allow="autoplay *; microphone *; fullscreen *" allowfullscreen allowtransparency
allowusermedia frameBorder="no"/> allowusermedia frameBorder="no"/>
</div> </div>
</div> </div> -->
</div> </div>
<ai-dialog title="修改名称" :visible.sync="dialog" width="500px" @onConfirm="handleSubmit(selected)" <ai-dialog title="修改名称" :visible.sync="dialog" width="500px" @onConfirm="handleSubmit(selected)"
@closed="selected={}"> @closed="selected={}">
@@ -71,6 +75,7 @@
selected: { selected: {
areaId: '' areaId: ''
}, },
videoUrl: '',
latlng: null, latlng: null,
disabledLevel: 0, disabledLevel: 0,
rules: { rules: {
@@ -110,14 +115,15 @@
params: {deviceId} params: {deviceId}
}).then(res => { }).then(res => {
if (res?.data) { if (res?.data) {
let data = JSON.parse(res.data) this.videoUrl = res.data
if (refresh) { // let data = JSON.parse(res.data)
monitor.url = data.url // if (refresh) {
} else if (this.splitScreen == 1) { // monitor.url = data.url
this.monitors = [{...monitor, ...data}] // } else if (this.splitScreen == 1) {
} else { // this.monitors = [{...monitor, ...data}]
this.monitors.push({...monitor, ...data}) // } else {
} // this.monitors.push({...monitor, ...data})
// }
} }
}) })
}, },