告警录像

merge-requests/1/head
qiushui 4 years ago
parent 5e41794e6f
commit 55e8441222

@ -65,26 +65,18 @@
{{ text.status == null ? ' ' : text.status == 0 ? '正常' : '告警' }}
</span>
</span>
<span slot="videoPath1" slot-scope="row">
<a-button type="link" v-if="row.videoPath1" @click="showModel(row.videoPath1, row.cmd1)">
<span slot="videoPath1" slot-scope="text">
<a-button type="link" @click="showModel(text)">
查看视频
</a-button>
<span v-else>
--
</span>
</span>
<span slot="videoPath2" slot-scope="row">
<a-button type="link" v-if="row.videoPath2" @click="showModel(row.videoPath2, row.cmd2)">
查看视频
</a-button>
<span v-else>
--
</span>
</span>
</a-table>
<Model
:visible.sync="visible"
:vid.sync="vid"
:vid1.sync="vid1"
:vid2.sync="vid2"
@close="closeModel"
/>
</div>
@ -148,22 +140,18 @@ export default {
},
// TODO
{
title: "视频时长",
title: "告警时长",
dataIndex: "timeLength",
},
{
title: "球机1",
title: "录像视频",
// dataIndex: "videoPath1",
scopedSlots: {customRender: 'videoPath1'}
},
{
title: "球机2",
// dataIndex: "videoPath2",
scopedSlots: {customRender: 'videoPath2'}
}
],
visible: false,
vid: '',
vid1: '',
vid2: '',
streetList:[]
}
},
@ -249,23 +237,16 @@ export default {
this.time = []
this.handleGetalarmLog()
},
showModel(path, cmd) {
// 使
if(cmd) {
let params = {
openCmd: cmd
};
this.$api.httpNodeApi.viewVideoAPI({params}).then(res=> {
console.log(res);
})
}else {
this.visible = true
this.vid = videoUrl + path;
}
showModel(text) {
this.visible = true
this.vid1 = videoUrl + text.videoPath1;
this.vid2 = videoUrl + text.videoPath2;
console.log(this.vid1)
},
closeModel(visible, data) {
this.visible = visible
this.vid = data
this.vid1 = data
},
},
components: {

@ -31,25 +31,16 @@
@change="handleGetalarmList"
>
<span slot="videoPath1" slot-scope="text">
<a-button type="link" v-if="text.videoPath1" @click="showModel(text.videoPath1)">
<a-button type="link" @click="showModel(text)">
查看视频
</a-button>
<span v-else>
--
</span>
</span>
<span slot="videoPath2" slot-scope="text">
<a-button type="link" v-if="text.videoPath2" @click="showModel(text.videoPath2)">
查看视频
</a-button>
<span v-else>
--
</span>
</span>
</span>
</a-table>
<Model
:visible.sync="visible"
:vid.sync="vid"
:vid1.sync="vid1"
:vid2.sync="vid2"
@close="closeModel"
/>
</div>
@ -96,22 +87,18 @@ export default {
dataIndex: "streetName",
},
{
title: "视频时长",
title: "告警时长",
dataIndex: "timeLength",
},
{
title: "球机1",
title: "视频录像",
// dataIndex: "videoPath1",
scopedSlots: {customRender: 'videoPath1'}
},
{
title: "球机2",
// dataIndex: "videoPath2",
scopedSlots: {customRender: 'videoPath2'}
},
}
],
visible: false,
vid: ''
vid1: '',
vid2:'',
};
},
mounted() {
@ -167,13 +154,14 @@ export default {
this.queryParam.startTime = ""
this.queryParam.endTime = ""
},
showModel(data) {
showModel(text) {
this.visible = true
this.vid = videoUrl + data
this.vid1 = videoUrl + text.videoPath1
this.vid2 = videoUrl + text.videoPath2
},
closeModel(visible, data) {
this.visible = visible
this.vid = data
this.vid1 = data
},
reset() {
this.queryParam.startTime = moment().subtract(1, "days").format('YYYY-MM-DD HH:mm:ss')

@ -16,13 +16,23 @@
</div>
<div class="test_two_box">
<video
id="myVideo"
class="video-js"
:autoplay="true"
controls
>
<source
:src="video"
:src="video1"
type="video/mp4"
>
</video>
<video
class="video-js"
:autoplay="true"
controls
>
<source
:src="video2"
type="video/mp4"
>
</video>
@ -64,17 +74,26 @@
</style>
<script>
export default {
props: ['visible', 'vid'],
props: ['visible', 'vid1', 'vid2'],
watch: {
//visibleisShowprops
visible: function (newVal) {
this.isShow = newVal; //newValvisible
// newVal && this.showConfirm(); //newValshowConfirm
},
vid: function (newVal) {
console.log(newVal)
console.log(1111111)
this.video = newVal
vid1: function (newVal) {
this.video1 = newVal
console.log(this.video1)
this.$nextTick(() => { //this.$nextTick
})
},
vid2: function (newVal) {
this.video2 = newVal
console.log(this.video2)
this.$nextTick(() => { //this.$nextTick
})
@ -85,11 +104,12 @@ export default {
return {
isShow: false,
confirmLoading: false,
video: '',
video1: '',
video2: '',
};
},
mounted() {
console.log('mounted执行了')
},
methods: {
handleCancel() {

Loading…
Cancel
Save