成润项目/中建四局-无人机视频播放功能

This commit is contained in:
jxj_yjl 2023-05-16 13:47:36 +08:00
parent 8e12e0fdd4
commit 077c31437e
9 changed files with 94 additions and 31 deletions

View File

@ -42,7 +42,6 @@ if (process.env.NODE_ENV == 'development') {
// axios.defaults.baseURL = 'http://192.168.34.117:6023/' // 杨杰本地 // axios.defaults.baseURL = 'http://192.168.34.117:6023/' // 杨杰本地
// axios.defaults.baseURL = 'http://139.9.66.234:6324/' // 河南春笋 // axios.defaults.baseURL = 'http://139.9.66.234:6324/' // 河南春笋
// axios.defaults.baseURL ='http://124.71.67.160:8088/' //中建四局线上(旧)地址 // axios.defaults.baseURL ='http://124.71.67.160:8088/' //中建四局线上(旧)地址
// axios.defaults.baseURL ='http://182.90.224.147:100/' //演示平台/
// axios.defaults.baseURL = 'http://192.168.34.125:6023/' //杨意本地 http/1.1 // axios.defaults.baseURL = 'http://192.168.34.125:6023/' //杨意本地 http/1.1
// axios.defaults.baseURL ='http://47.97.202.104:6023/' //金林湾线上旧 // axios.defaults.baseURL ='http://47.97.202.104:6023/' //金林湾线上旧
// axios.defaults.baseURL = 'http://192.168.34.231:6023/'; //杨思瑞本地 // axios.defaults.baseURL = 'http://192.168.34.231:6023/'; //杨思瑞本地
@ -87,8 +86,10 @@ if (process.env.NODE_ENV == 'development') {
// axios.defaults.baseURL = 'http://121.196.214.246/api/'//金林湾线上新 // axios.defaults.baseURL = 'http://121.196.214.246/api/'//金林湾线上新
// axios.defaults.baseURL = 'http://42.194.144.62:8088/'//中建四局线上(新)地址 // axios.defaults.baseURL = 'http://42.194.144.62:8088/'//中建四局线上(新)地址
// axios.defaults.baseURL = 'http://101.43.164.214:12350'//中建五局线上 // axios.defaults.baseURL = 'http://101.43.164.214:12350'//中建五局线上
// axios.defaults.baseURL = 'http://182.90.224.147:15551/'//港投(成润)项目线上 // axios.defaults.baseURL = 'http://182.90.224.147:15551/'//港投(成润)项目线上(1)
axios.defaults.baseURL = 'http://182.90.224.147:30262/'//港投(成润)项目线上 axios.defaults.baseURL = 'http://182.90.224.147:30262/'//港投(成润)项目线上(2)
// axios.defaults.baseURL ='http://182.90.224.147:100/' //演示平台/
} else if (process.env.NODE_ENV == 'debug') { } else if (process.env.NODE_ENV == 'debug') {
axios.defaults.baseURL = 'https://www.ceshi.com' axios.defaults.baseURL = 'https://www.ceshi.com'

View File

@ -51,7 +51,7 @@
data() { data() {
return { return {
options: { options: {
target: this.$http.defaults.baseURL+'filetransfer/uploadfile?projectSn='+this.$store.state.projectSn, // URL target: this.$http.defaults.baseURL+'filetransfer/uploadfile', // URL
chunkSize: 1024 * 1024, chunkSize: 1024 * 1024,
fileParameterName: 'file', fileParameterName: 'file',
maxChunkRetries: 3, maxChunkRetries: 3,
@ -90,7 +90,7 @@
mounted() { mounted() {
this.$EventBus.$on('openUploader', query => { this.$EventBus.$on('openUploader', query => {
console.log('openUploader') console.log('openUploader',query)
this.params = query || {}; this.params = query || {};
// this.$refs.uploadBtn.click() // this.$refs.uploadBtn.click()
var e = document.createEvent('MouseEvent'); var e = document.createEvent('MouseEvent');

View File

@ -94,11 +94,9 @@ export default new Vuex.Store({
// UPLOADURL: 'http://101.43.164.214:12345/upload/image',//内蒙古 // UPLOADURL: 'http://101.43.164.214:12345/upload/image',//内蒙古
// FILEURL: 'http://101.43.164.214:12345/image/',//内蒙古 // FILEURL: 'http://101.43.164.214:12345/image/',//内蒙古
// UPLOADURL: 'http://42.194.144.62:8088/upload/image',//中建四 // UPLOADURL: 'http://42.194.144.62:8088/upload/image',//中建四
// FILEURL: 'http://42.194.144.62:8088/image/',//中建四 // FILEURL: 'http://42.194.144.62:8088/image/',//中建四
// UPLOADURL: 'http://42.194.144.62:8088/upload/image',//中建四 UPLOADURL: 'http://182.90.224.147:30262/upload/image',//四川成润
// FILEURL: 'http://42.194.144.62:8088/image/',//中建四 FILEURL: 'http://182.90.224.147:30262/image/',//四川成润
// UPLOADURL: 'http://182.90.224.147:15551/upload/image',//中建四
// FILEURL: 'http://182.90.224.147:15551/image/',//中建四
ACCOUNTTYPE: [ ACCOUNTTYPE: [
"系统管理员", "系统管理员",

View File

@ -21,8 +21,7 @@
<div class="titleText" > <div class="titleText" >
<p><i class="el-icon-circle-close" @click="closeDialog"></i></p> <p><i class="el-icon-circle-close" @click="closeDialog"></i></p>
<p> <span style="float:left;font-size:20px;margin: 35px 0 0 32px;">{{ itemVar.title }}</span> <span style="float:right;margin: 39px -12px 0px 0;">{{itemVar.updateTime }}</span></p> <p> <span style="float:left;font-size:20px;margin: 35px 0 0 32px;">{{ itemVar.title }}</span> <span style="float:right;margin: 39px -12px 0px 0;">{{itemVar.updateTime }}</span></p>
<div class="content" v-html="itemVar.content"> <div class="content ql-editor" style="white-space: pre-line" v-html="itemVar.content">
<!-- {{ itemVar.content}} -->
</div> </div>
</div> </div>

View File

@ -460,7 +460,7 @@ export default {
if (typeof obj.alarmPushWorkerId === "string"&& obj.alarmPushWorkerId != '') { if (typeof obj.alarmPushWorkerId === "string"&& obj.alarmPushWorkerId != '') {
this.addEditForm.alarmPushWorkerId = obj.alarmPushWorkerId this.addEditForm.alarmPushWorkerId = obj.alarmPushWorkerId
.split(",") .split(",")
.map(Number);
} }
this.handle("edit", true); this.handle("edit", true);
}, },

View File

@ -127,14 +127,17 @@ export default {
get() { get() {
let res = { let res = {
filePath: this.filePath, filePath: this.filePath,
isDir: 0 isDir: 0,
projectSn:this.$store.state.projectSn
} }
return res return res
}, },
set() { set() {
return { return {
filePath: '/', filePath: '/',
isDir: 0 isDir: 0,
projectSn:this.$store.state.projectSn
} }
} }
}, },

View File

@ -176,7 +176,7 @@ export default {
[{ align: [] }], // [{ align: [] }], //
['clean'], // ['clean'], //
['image', 'video'] // ['image'] //
] ]
}, },
theme: 'snow' theme: 'snow'

View File

@ -32,7 +32,8 @@
<vue-scroll style="height: 668px"> <vue-scroll style="height: 668px">
<el-table :data="tableData"> <el-table :data="tableData">
<!-- 标段名称 --> <!-- 标段名称 -->
<el-table-column align="center" prop="projectfName" :label="$t('message.projectInfo.sectionName')"></el-table-column> <el-table-column v-if="COMPANY=='sccr'" align="center" prop="crSectionName" :label="$t('message.projectInfo.sectionName')"></el-table-column>
<el-table-column v-else align="center" prop="projectfName" :label="$t('message.projectInfo.sectionName')"></el-table-column>
<!-- 节点编号 --> <!-- 节点编号 -->
<el-table-column align="center" prop="nodeCode" :label="$t('message.projectInfo.nodeNumber')"></el-table-column> <el-table-column align="center" prop="nodeCode" :label="$t('message.projectInfo.nodeNumber')"></el-table-column>
<!-- 节点名称 --> <!-- 节点名称 -->

View File

@ -26,11 +26,15 @@
prop="updateTime" prop="updateTime"
label="更新时间" label="更新时间"
></el-table-column> ></el-table-column>
<el-table-column <el-table-column align="center" prop="videoUrl" label="无人机视频">
align="center" <template slot-scope="scope">
prop="videoUrl" <i
label="视频URL" @click.stop="playerVideo(scope.row.videoUrl)"
></el-table-column> class="el-icon-video-play"
style="font-size: 25px; cursor: pointer"
></i>
</template>
</el-table-column>
<el-table-column width="200"> <el-table-column width="200">
<template slot-scope="scope"> <template slot-scope="scope">
<div class="tableBtns"> <div class="tableBtns">
@ -73,6 +77,7 @@
:title="type" :title="type"
:visible.sync="dialogVisible" :visible.sync="dialogVisible"
width="667px" width="667px"
@close="close"
> >
<div class="dialog_content"> <div class="dialog_content">
<el-form <el-form
@ -86,7 +91,7 @@
label="巡检名称" label="巡检名称"
prop="name" prop="name"
:rules="[ :rules="[
{ required: true, message: '请输入巡检名称', trigger: 'blur' } { required: true, message: '请输入巡检名称', trigger: 'blur' },
]" ]"
> >
<el-input placeholder="请输入" v-model="workerInfo.name"></el-input> <el-input placeholder="请输入" v-model="workerInfo.name"></el-input>
@ -95,7 +100,7 @@
label="拍摄时间" label="拍摄时间"
prop="shootingTime" prop="shootingTime"
:rules="[ :rules="[
{ required: true, message: '请选择拍摄时间', trigger: 'blur' } { required: true, message: '请选择拍摄时间', trigger: 'blur' },
]" ]"
> >
<el-date-picker <el-date-picker
@ -110,7 +115,7 @@
label="巡检视频" label="巡检视频"
prop="videoUrl" prop="videoUrl"
:rules="[ :rules="[
{ required: true, message: '请上传巡检视频', trigger: 'blur' } { required: true, message: '请上传巡检视频', trigger: 'blur' },
]" ]"
> >
<div class="videoUpload"> <div class="videoUpload">
@ -128,7 +133,7 @@
<template> <template>
<div class="videos"> <div class="videos">
<video <video
v-if="workerInfo.videoUrl" v-if="addPlayer||workerInfo.videoUrl"
width="120" width="120"
height="80" height="80"
controls controls
@ -172,6 +177,34 @@
</el-form> </el-form>
</div> </div>
</el-dialog> </el-dialog>
<!-- 视频播放 -->
<div class="video" style="position: absolute; top: 12%; left: 17%">
<video
v-if="isShow || player"
width="100%"
height="600"
controls
autoplay
style="margin-left: 10px"
>
<source :src="player" type="video/mp4" />
<source :src="player" type="video/mp4" />
<source :src="player" type="video/mp4" />
您的浏览器不支持 video 标签
</video>
<i
style="
position: absolute;
top: 1%;
left: 97%;
color: #fff;
font-size: 30px;
cursor: pointer;
"
class="el-icon-circle-close"
@click.stop="closeBtn"
></i>
</div>
</div> </div>
</template> </template>
<script> <script>
@ -198,7 +231,10 @@ export default {
videoUrl: '', // videoUrl: '', //
projectSn: '' //sn projectSn: '' //sn
}, // }, //
fileList: [] fileList: [],
player: '',
isShow: false,
addPlayer:false
} }
}, },
created() { created() {
@ -206,6 +242,21 @@ export default {
this.getWorkerList() this.getWorkerList()
}, },
methods: { methods: {
//
closeBtn(){
this.isShow =false
this.player=''
},
//
playerVideo(item) {
console.log('点击', this.$store.state.FILEURL + item);
this.isShow = false
this.$nextTick(() => {
this.player = this.$store.state.FILEURL + item
this.isShow = true
})
},
// //
// getWorkerList() { // getWorkerList() {
// getUavVideoListApi({ projectSn: this.$store.state.projectSn }).then( // getUavVideoListApi({ projectSn: this.$store.state.projectSn }).then(
@ -241,10 +292,12 @@ export default {
}, },
// //
editBtn(val) { editBtn(val) {
console.log('编辑的数据', val) console.log('val------',val);
this.type = '编辑巡检视频' this.type = '编辑巡检视频'
this.dialogVisible = true this.dialogVisible = true
this.workerInfo = JSON.parse(JSON.stringify(val))
this.workerInfo = JSON.parse(JSON.stringify(val))
}, },
// //
deleteBtn(val) { deleteBtn(val) {
@ -305,7 +358,7 @@ export default {
}, },
handleSuccess(file, fileList) { handleSuccess(file, fileList) {
console.log('成功的file', file) console.log('成功的file', file)
this.workerInfo.videoUrl = file.data[0].filename this.workerInfo.videoUrl = file.data[0].filename
if (file.status == 'SUCCESS') { if (file.status == 'SUCCESS') {
this.$message({ message: '视频上传成功', type: 'success' }) this.$message({ message: '视频上传成功', type: 'success' })
} else { } else {
@ -327,7 +380,15 @@ export default {
this.$message({ message: '只能上传视频', type: 'error' }) this.$message({ message: '只能上传视频', type: 'error' })
} }
return flag return flag
} },
close(){
this.workerInfo = {
name: '', //
shootingTime: '', //
videoUrl: '', //
projectSn: '' //sn
}
},
} }
} }
</script> </script>