fix: BUG修改

This commit is contained in:
kun 2024-05-18 18:04:01 +08:00
parent a61fe32713
commit 2838de13cc
9 changed files with 74 additions and 129 deletions

View File

@ -2,9 +2,11 @@
<template> <template>
<view class="tree-content-compontent"> <view class="tree-content-compontent">
<view class="content-box" @click="expandFn"> <view class="content-box" @click="expandFn">
<u-icon name="arrow-right" color="#D5D5D5" size="44" v-if="!expanded && item.children && item.children.length" style="margin-right: 10rpx;"></u-icon>
<u-icon name="arrow-down" color="#D5D5D5" size="44" v-if="expanded && item.children && item.children.length" style="margin-right: 10rpx;"></u-icon>
<text class="box-text" @click.stop="toggleNodes(item)">{{ item.groupName }}</text> <text class="box-text" @click.stop="toggleNodes(item)">{{ item.groupName }}</text>
<u-icon name="arrow-right" color="#D5D5D5" size="44" v-if="!expanded && item.children && item.children.length"></u-icon> <image v-if="(!item.children || !item.children.length)" style="width:60rpx;height:60rpx;" src="../../static/videoControlIcon/videoIcon.png" mode="">
<u-icon name="arrow-down" color="#D5D5D5" size="44" v-if="expanded && item.children && item.children.length"></u-icon> </image>
<!-- <image style="width:80rpx;height:80rpx;float:left" src="../../static/icon-down-black.png" mode=""> <!-- <image style="width:80rpx;height:80rpx;float:left" src="../../static/icon-down-black.png" mode="">
</image> --> </image> -->
</view> </view>
@ -44,7 +46,7 @@ export default {
<style lang="scss" scoped> <style lang="scss" scoped>
.tree-content-compontent{ .tree-content-compontent{
background: #FFFFFF; background: #F5F5F5;
.content-box{ .content-box{
display: flex; display: flex;
align-items: center; align-items: center;
@ -65,8 +67,14 @@ export default {
text-overflow: ellipsis; text-overflow: ellipsis;
} }
} }
.sub-component{
background: #FFFFFF;
.tree-content-compontent{
background: #FFFFFF;
}
}
.expandedStyle{ .expandedStyle{
margin-left: 40rpx; margin-left: 60rpx;
} }
} }
</style> </style>

View File

@ -44,8 +44,8 @@ if (process.env.NODE_ENV === 'development') {
// Vue.prototype.url_config = 'http://192.168.34.155:19111/' //彭洁本地 // Vue.prototype.url_config = 'http://192.168.34.155:19111/' //彭洁本地
// Vue.prototype.work_url = 'http://47.93.215.234:19997' // 工作流线上地址(弃用) // Vue.prototype.work_url = 'http://47.93.215.234:19997' // 工作流线上地址(弃用)
// Vue.prototype.work_url = 'http://42.180.188.17:19997' // 工作流线上地址 // Vue.prototype.work_url = 'http://42.180.188.17:19997' // 工作流线上地址
Vue.prototype.work_url = 'http://42.180.188.17:19097' // 工作流测试地址 // Vue.prototype.work_url = 'http://42.180.188.17:19097' // 工作流测试地址
// Vue.prototype.work_url = 'http://192.168.34.138:5173' // 工作流地址 Vue.prototype.work_url = 'http://192.168.34.138:5173' // 工作流地址
// Vue.prototype.work_url = 'http://139.9.66.234:5173' // 工作流地址 // Vue.prototype.work_url = 'http://139.9.66.234:5173' // 工作流地址
// Vue.prototype.work_url = 'http://192.168.34.126:5173' // 工作流地址 // Vue.prototype.work_url = 'http://192.168.34.126:5173' // 工作流地址
// Vue.prototype.url_config = 'http://8.142.139.165:7080/' // 湖里 // Vue.prototype.url_config = 'http://8.142.139.165:7080/' // 湖里

View File

@ -13,7 +13,7 @@
<span class="ukashList-look">查看明细</span> <span class="ukashList-look">查看明细</span>
</view> </view>
<view class="ukashList-time">企业: {{item.enterpriseName}}</view> <view class="ukashList-time">企业: {{item.enterpriseName}}</view>
<view class="ukashList-time">入场时间: {{item.entryTime}}</view> <view class="ukashList-time">出场有效时间: {{item.entryBeginTime}}{{item.entryEndTime}}</view>
</view> </view>
</view> </view>
<view class="no-data" v-else> <view class="no-data" v-else>
@ -97,7 +97,10 @@
let data = { let data = {
pageNo: this.pageNo, pageNo: this.pageNo,
pageSize: this.pageSize, pageSize: this.pageSize,
name: e.detail.value ? e.detail.value : null type: 2
}
if(e.detail.value){
data.name = e.detail.value;
} }
let _this = this let _this = this
this.sendRequest({ this.sendRequest({
@ -108,7 +111,7 @@
console.log(res); console.log(res);
// this.dataList = this.dataList.concat(res.result.records) // this.dataList = this.dataList.concat(res.result.records)
this.dataList = [...this.dataList, ...res.result.records] this.dataList = res.result.records
// console.log(this.dataList , res.result.total); // console.log(this.dataList , res.result.total);
// this.dataList = res.result.records // this.dataList = res.result.records
if (res.result.records.length < this.pageSize) { if (res.result.records.length < this.pageSize) {
@ -143,7 +146,7 @@
} }
.ukashList { .ukashList {
height: 90px; min-height: 90px;
background-color: #fff; background-color: #fff;
margin: 10px 10px; margin: 10px 10px;
border-radius: 15px; border-radius: 15px;

View File

@ -13,7 +13,7 @@
<span class="ukashList-look">查看明细</span> <span class="ukashList-look">查看明细</span>
</view> </view>
<view class="ukashList-time">企业: {{item.enterpriseName}}</view> <view class="ukashList-time">企业: {{item.enterpriseName}}</view>
<view class="ukashList-time">入场时间: {{item.entryTime}}</view> <view class="ukashList-time">入场有效时间: {{item.entryBeginTime}}{{item.entryEndTime}}</view>
</view> </view>
</view> </view>
<view class="no-data" v-else> <view class="no-data" v-else>
@ -97,7 +97,10 @@
let data = { let data = {
pageNo: this.pageNo, pageNo: this.pageNo,
pageSize: this.pageSize, pageSize: this.pageSize,
name: e.detail.value ? e.detail.value : null type: 1
}
if(e.detail.value){
data.name = e.detail.value;
} }
let _this = this let _this = this
this.sendRequest({ this.sendRequest({
@ -108,7 +111,7 @@
console.log(res); console.log(res);
// this.dataList = this.dataList.concat(res.result.records) // this.dataList = this.dataList.concat(res.result.records)
this.dataList = [...this.dataList, ...res.result.records] this.dataList = res.result.records
// console.log(this.dataList , res.result.total); // console.log(this.dataList , res.result.total);
// this.dataList = res.result.records // this.dataList = res.result.records
if (res.result.records.length < this.pageSize) { if (res.result.records.length < this.pageSize) {
@ -143,7 +146,7 @@
} }
.ukashList { .ukashList {
height: 90px; min-height: 90px;
background-color: #fff; background-color: #fff;
margin: 10px 10px; margin: 10px 10px;
border-radius: 15px; border-radius: 15px;

View File

@ -16,9 +16,9 @@
<image src="/static/no_poster.png" class="no_poster"></image> <image src="/static/no_poster.png" class="no_poster"></image>
</view> </view>
<view class="back-time"> <view class="back-time">
<text class="date-time">2024-05-11 00:00:00</text> <text class="date-time">{{item.beginTime}}</text>
<text class="divider-text"></text> <text class="divider-text"></text>
<text class="date-time">2024-05-11 00:00:00</text> <text class="date-time">{{item.endTime}}</text>
</view> </view>
</view> </view>
</view> </view>
@ -32,6 +32,9 @@
</template> </template>
<script> <script>
import {
dateformat
} from "@/utils/tool.js"
export default { export default {
data() { data() {
return { return {
@ -75,8 +78,13 @@
this.loadData(); this.loadData();
}, },
playVideoFn(item) { playVideoFn(item) {
let passData = {
...item,
videoName: this.pageSupportData.videoName,
...this.pageSupportData
}
uni.navigateTo({ uni.navigateTo({
url: './playBackVideo' url: './playBackVideo?obj='+JSON.stringify(passData)
}) })
}, },
// //
@ -97,7 +105,11 @@
method: "POST", method: "POST",
success(res) { success(res) {
console.log('找封面', res) console.log('找封面', res)
that.videoList = res.result.videoList that.videoList = res.result.list
that.videoList.map(item => {
item.beginTime = dateformat(item.beginTime);
item.endTime = dateformat(item.endTime);
})
} }
}) })
}, },

View File

@ -7,10 +7,12 @@
</headers> </headers>
<!-- <video class="videoBox" id="myVideo" :custom-cache="false" :src="url" controls autoplay></video> --> <!-- <video class="videoBox" id="myVideo" :custom-cache="false" :src="url" controls autoplay></video> -->
<!-- 外网IP地址访问视频监控 --> <!-- 外网IP地址访问视频监控 -->
<video class="videoBox" id="myVideo" :custom-cache="false" :src="'rtsp://42.180.188.17:'+url.substring(20)" controls autoplay></video> <!-- <video class="videoBox" id="myVideo" :custom-cache="false" :src="'rtsp://42.180.188.17:'+url.substring(20)" controls autoplay></video> -->
<video class="videoBox" id="myVideo" :custom-cache="false" :src="url" controls autoplay></video>
<view class="videoName"> <view class="videoName">
<text>南山科技创新中心--标段总承包1#吊塔</text> <text>{{passData.videoName}}</text>
<text>2024-05-11 00:00:00</text> <text>{{passData.beginTime}}<br /><br />{{passData.endTime}}</text>
</view> </view>
</view> </view>
</template> </template>
@ -22,124 +24,41 @@
data() { data() {
return { return {
url:'',//rtsp://admin:jxj12345@192.168.0.64:554/h264/ch1/main/av_stream url:'',//rtsp://admin:jxj12345@192.168.0.64:554/h264/ch1/main/av_stream
videoInfo:{videoName:'',videoType:null},
streamType: 1, //1 2 streamType: 1, //1 2
passData: {}
}; };
}, },
onLoad(options) { onLoad(options) {
//videoType 123ISC456 //videoType 123ISC456
// this.url = options.url // this.url = options.url
this.videoInfo=uni.getStorageSync('videoInfo') if(options.obj){
if(this.videoInfo.videoType==2){ this.passData = JSON.parse(options.obj)
this.url= this.videoInfo.liveRadioUrl
}else{
this.getPlayUrl()
} }
console.log(this.passData,777888)
this.loadData()
}, },
methods:{ methods:{
// //
toBackList(){ loadData() {
uni.navigateTo({
url: './playBackList'
})
},
getPlayUrl(){
var that = this var that = this
var json ={itemId:this.videoInfo.itemId} let requestData = {
if(this.videoInfo.videoType==3){ projectSn: that.passData.projectSn,
json.streamType=this.streamType serialNumber: that.passData.serialNumber
json.type='rtsp' //rtsphls
} }
this.sendRequest({ if(that.passData.beginTime && that.passData.endTime){
url: "xmgl/videoItem/getVideoItemInfo", requestData.beginTime = that.passData.beginTime
data: json, requestData.endTime = that.passData.endTime
method: "post",
success(res){
switch (that.videoInfo.videoType){
case 1:
that.url=res.result.videoInfo.hdFlvAddress
break;
default:
that.url=res.result.videoInfo.url
break;
} }
that.sendRequest({
url: "xmgl/videoItem/callPostPlaybackURLsV2",
data: requestData,
method: "POST",
success(res) {
console.log('找封面', res)
that.url = res.result.url
} }
}) })
}, },
controlVideoFn(pan, tilt, zoom,opType){
if(this.videoInfo.deviceType!=2){
uni.showToast({
title:'该设备不是球机,不支持此操作',
icon:'none'
})
return false
}
switch (this.videoInfo.videoType){
case 3:
this.controlVideoFn_isc(opType)
break;
case 4:
this.controlVideoFn_dh(pan, tilt, zoom)
break;
default:
uni.showToast({
title:'暂不支持',
icon:'none'
})
break;
}
},
controlVideoFn_isc(opType){
let json = {
// cameraId: this.videoInfo.deviceSerial,
itemId:this.videoInfo.itemId,
opType: opType,
opSize: 20,
opCode: 1
};
var that = this
this.sendRequest({
url: "xmgl/videoItem/getHikPtzControl",
data: json,
method: "post",
success(res){
uni.showToast({
title:'控制成功',
icon:'none'
})
}
})
},
controlVideoFn_dh(pan, tilt, zoom){
var code = '';
var jsonStr = {
pan: pan,
tilt: tilt,
zoom: zoom,
duration: 100
};
let json = {
ip: this.videoInfo.ip,
port: this.videoInfo.port,
username: this.videoInfo.username,
password: this.videoInfo.password,
chnnelcode: this.videoInfo.chnnelcode,
jsonStr: JSON.stringify(jsonStr),
data: new Date()
};
var that = this
this.sendRequest({
url: "xmgl/video/putPTZ",
data: json,
method: "get",
success(res){
uni.showToast({
title:'控制成功',
icon:'none'
})
}
})
}
} }
} }
</script> </script>

View File

@ -26,9 +26,9 @@
<view class="zoom zoomout" @click="controlVideoFn(0,0,-0.2,'ZOOM_OUT')"></view> <view class="zoom zoomout" @click="controlVideoFn(0,0,-0.2,'ZOOM_OUT')"></view>
</view> </view>
</view> </view>
<!-- <view class="video-playback" @click="toBackList"> <view class="video-playback" @click="toBackList">
视频回放 视频回放
</view> --> </view>
</view> </view>
</template> </template>
@ -63,7 +63,7 @@
// //
toBackList(){ toBackList(){
uni.navigateTo({ uni.navigateTo({
url: './playBackList?obj=' + JSON.stringify(this.videoResponseInfo) url: './playBackList?obj=' + JSON.stringify({...this.videoResponseInfo,...this.videoInfo})
}) })
}, },
changeStreamFn(){ changeStreamFn(){

View File

@ -24,7 +24,7 @@
</view> </view>
</view> </view>
</scroll-view> </scroll-view>
<footers v-if="pageType=='company'" :activeTab="'videoManage'"></footers> <!-- <footers v-if="pageType=='company'" :activeTab="'videoManage'"></footers> -->
</view> </view>
</template> </template>

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.4 KiB