|
|
@@ -178,7 +178,7 @@
|
|
|
label="视频地址"
|
|
|
min-width="200">
|
|
|
<template slot-scope="{row}">
|
|
|
- <el-button type="text" size="small" @click="play(row.video)">{{row.video}}</el-button>
|
|
|
+ <el-button type="text" size="small" @click="download(row.video)">{{row.video}}</el-button>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
|
|
|
@@ -321,17 +321,12 @@
|
|
|
<el-dialog title="查看图片" :visible.sync="imageDialogVisible" size="small">
|
|
|
<img width="100%" :src="imgSrc" alt="">
|
|
|
</el-dialog>
|
|
|
- <el-dialog title="查看视频" :visible.sync="videoDialogVisible" size="small" :before-close="beforeVideoClose">
|
|
|
- <video class="video-js" ref="video"></video>
|
|
|
- </el-dialog>
|
|
|
</div>
|
|
|
</template>
|
|
|
<script>
|
|
|
import {mapState} from 'vuex'
|
|
|
import {format} from 'date-fns'
|
|
|
import zh from 'date-fns/locale/zh_cn'
|
|
|
- import videojs from 'video.js'
|
|
|
- import 'videojs-flash'
|
|
|
|
|
|
export default {
|
|
|
created() {
|
|
|
@@ -548,9 +543,7 @@
|
|
|
advancedQuerySearchKey: '',
|
|
|
orderByStr: '',
|
|
|
imgSrc: '',
|
|
|
- imageDialogVisible: false,
|
|
|
- videoDialogVisible: false,
|
|
|
- player: null
|
|
|
+ imageDialogVisible: false
|
|
|
}
|
|
|
},
|
|
|
computed: {
|
|
|
@@ -735,30 +728,15 @@
|
|
|
this.imgSrc = img;
|
|
|
this.imageDialogVisible = true;
|
|
|
},
|
|
|
- play(path) {
|
|
|
- this.videoDialogVisible = true;
|
|
|
- this.$nextTick(() => {
|
|
|
- let url = path.replace("/var", "http://49.4.66.233:8080");
|
|
|
- console.log(url);
|
|
|
- this.player = videojs(this.$refs.video, {
|
|
|
- height: '360',
|
|
|
- sources: [{
|
|
|
- type: "video/flv",
|
|
|
- src: url
|
|
|
- }],
|
|
|
- techOrder: ['flash'],
|
|
|
- autoplay: true,
|
|
|
- controls: true
|
|
|
- });
|
|
|
- });
|
|
|
- },
|
|
|
- beforeVideoClose(done) {
|
|
|
- this.player.dispose();
|
|
|
- done();
|
|
|
+ download(path) {
|
|
|
+ let url = path.replace("/var", "http://49.4.66.233:8080");
|
|
|
+ window.open(url);
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
</script>
|
|
|
-<style lang="less" scoped>
|
|
|
-
|
|
|
+<style lang="less">
|
|
|
+ .vjs-tech {
|
|
|
+ object-fit: cover;
|
|
|
+ }
|
|
|
</style>
|