|
@@ -198,15 +198,20 @@
|
|
|
</view>
|
|
|
</view>
|
|
|
<!-- 报警抓拍 -->
|
|
|
- <view v-if="(form.warnType==1&&form.chemicalWarnType==1&&form.recordPhoto[0]) || (form.warnType!=1&&form.recordPhoto[0])"
|
|
|
+ <view v-if="(form.warnType==1&&form.chemicalWarnType==1&&videoType) || (form.warnType!=1&&videoType)"
|
|
|
class="picture">
|
|
|
- <view class="small_title"><text></text><text>报警抓拍</text></view>
|
|
|
- <view class="picture_b">
|
|
|
+ <view class="small_title" style="border-bottom: none !important;">
|
|
|
+ <text></text>
|
|
|
+ <text style="flex:1;">报警抓拍</text>
|
|
|
+ <text style="width:100rpx;color:#0183fa;" @click="goVideoPage()">查看</text>
|
|
|
+ </view>
|
|
|
+ <!-- <web-view style="width:200rpx;height:200rpx;" :src="webViewUrl" v-if="videoType"></web-view> -->
|
|
|
+ <!-- <view class="picture_b">
|
|
|
<view class="img">
|
|
|
<img v-for="(item,index) in form.recordPhoto" @click="lockImg(form.recordPhoto)" :key="index"
|
|
|
:src="item" />
|
|
|
</view>
|
|
|
- </view>
|
|
|
+ </view> -->
|
|
|
</view>
|
|
|
<!-- 查看监控 -->
|
|
|
<view class="bottom_btn"
|
|
@@ -247,12 +252,14 @@
|
|
|
form: {},
|
|
|
currentTime: '',
|
|
|
timeStatus: false,
|
|
|
+ //报警预案视频相关
|
|
|
+ webViewUrl:'',
|
|
|
videoType: false,
|
|
|
|
|
|
}
|
|
|
},
|
|
|
onLoad(option) {
|
|
|
- console.log('短信',option)
|
|
|
+ // console.log('短信',option)
|
|
|
let self = this;
|
|
|
if (!uni.getStorageSync('token')) {
|
|
|
if (option.noticeId) {
|
|
@@ -287,7 +294,7 @@
|
|
|
}
|
|
|
},
|
|
|
onShow() {
|
|
|
- this.$set(this, 'videoType', false);
|
|
|
+
|
|
|
},
|
|
|
mounted() {
|
|
|
this.getInfo();
|
|
@@ -305,7 +312,6 @@
|
|
|
let videoImg = canvas.toDataURL('image/jpeg'); //转换为base64
|
|
|
},
|
|
|
onLoadedMetadata(e) {
|
|
|
- console.log(1111)
|
|
|
const duration = e.duration;
|
|
|
const width = e.videoWidth;
|
|
|
const heigth = e.videoHeight;
|
|
@@ -324,7 +330,6 @@
|
|
|
canvasId: 'myCanvas',
|
|
|
success: function(res) {
|
|
|
const imagePath = res.tempFilePath;
|
|
|
- console.log(imagePath)
|
|
|
}
|
|
|
})
|
|
|
}, 1000)
|
|
@@ -340,10 +345,10 @@
|
|
|
let currentTime = new Date().getTime() //获取当前时间
|
|
|
let endTime = new Date(gettime).getTime() //预警时间
|
|
|
if (currentTime - endTime > timeOut) {
|
|
|
- console.log('预警时间超过30分钟')
|
|
|
+ // console.log('预警时间超过30分钟')
|
|
|
this.timeStatus = false;
|
|
|
} else {
|
|
|
- console.log('预警没超过30分钟')
|
|
|
+ // console.log('预警没超过30分钟')
|
|
|
this.timeStatus = true;
|
|
|
}
|
|
|
|
|
@@ -425,6 +430,15 @@
|
|
|
})
|
|
|
data.data.userLogVoList = list;
|
|
|
this.$set(this, 'form', data.data);
|
|
|
+ if(data.data.recordVideo){
|
|
|
+ let newData = JSON.parse(data.data.recordVideo);
|
|
|
+ let url = uni.getStorageSync('cameraExtranetAgent')+'?cameraIndexCode='+newData.cameraIndexCode+'&startTime='+newData.startTime+'&endTime='+newData.endTime
|
|
|
+ this.$set(this,'webViewUrl',url);
|
|
|
+ this.$set(this,'videoType',true);
|
|
|
+ }else{
|
|
|
+ this.$set(this,'webViewUrl','');
|
|
|
+ this.$set(this,'videoType',false);
|
|
|
+ }
|
|
|
}
|
|
|
},
|
|
|
//获取详情
|
|
@@ -458,8 +472,22 @@
|
|
|
})
|
|
|
data.data.userLogVoList = list;
|
|
|
this.$set(this, 'form', data.data);
|
|
|
+ if(data.data.recordVideo){
|
|
|
+ let newData = JSON.parse(data.data.recordVideo);
|
|
|
+ let url = uni.getStorageSync('cameraExtranetAgent')+'?cameraIndexCode='+newData.cameraIndexCode+'&startTime='+newData.startTime+'&endTime='+newData.endTime
|
|
|
+ this.$set(this,'webViewUrl',url);
|
|
|
+ this.$set(this,'videoType',true);
|
|
|
+ }else{
|
|
|
+ this.$set(this,'webViewUrl','');
|
|
|
+ this.$set(this,'videoType',false);
|
|
|
+ }
|
|
|
}
|
|
|
},
|
|
|
+ goVideoPage(){
|
|
|
+ uni.navigateTo({
|
|
|
+ url: '/pages_basics/views/earlyWarningManage/warningVideo?item='+encodeURIComponent(JSON.stringify(this.webViewUrl))
|
|
|
+ });
|
|
|
+ },
|
|
|
handleClick(row, doType) {
|
|
|
let self = this;
|
|
|
if (doType == 'monitor') { //监控
|