告警录像

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

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

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

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

Loading…
Cancel
Save