|
@@ -35,11 +35,11 @@
|
|
|
<view class="small_title"><text></text><text>风险概况</text></view>
|
|
|
<view class="basics_li" style="margin-top:20rpx;">
|
|
|
<text>发生时间:</text>
|
|
|
- <text>{{form.startTime}}至{{form.endTime}}</text>
|
|
|
+ <text>{{form.startTime}}至{{form.endTime?form.endTime:'-'}}</text>
|
|
|
</view>
|
|
|
<view class="basics_li">
|
|
|
<text>持续时间:</text>
|
|
|
- <text>{{form.riskDuration}}</text>
|
|
|
+ <text>{{form.riskDuration}}秒</text>
|
|
|
</view>
|
|
|
<view class="basics_li">
|
|
|
<text>风险响应人员:</text>
|
|
@@ -47,7 +47,7 @@
|
|
|
</view>
|
|
|
<view class="basics_li">
|
|
|
<text>实验室内人员:</text>
|
|
|
- <text>{{form.indoorUser}}</text>
|
|
|
+ <text>{{form.indoorUser?form.indoorUser:'-'}}</text>
|
|
|
</view>
|
|
|
</view>
|
|
|
<!-- 化学品 -->
|
|
@@ -135,7 +135,7 @@
|
|
|
<view class="small_title"><text></text><text>报警抓拍</text></view>
|
|
|
<view class="picture_b" >
|
|
|
<view class="video">
|
|
|
- <video id="myvideo" class="video_t" :src="configUrl+infoData.recordVideo"></video>
|
|
|
+ <video id="myvideo" class="video_t" :src="configUrl+form.recordVideo"></video>
|
|
|
<img class="video_b" @click="lockVideo()" src="@/images/icon_bjzp_spbof.png"/>
|
|
|
</view>
|
|
|
</view>
|
|
@@ -165,34 +165,37 @@ export default {
|
|
|
total:0,
|
|
|
warningId:'',
|
|
|
form:{},
|
|
|
+ currentTime:'',
|
|
|
|
|
|
}
|
|
|
},
|
|
|
onLoad(option) {
|
|
|
let self = this;
|
|
|
- if(option.id){
|
|
|
- this.warningId=option.id;
|
|
|
+ //先判断是否是通过点击列表进入
|
|
|
+ if(option.warningId){
|
|
|
+ this.warningId=option.warningId;
|
|
|
}else{
|
|
|
- if(option.q){
|
|
|
- let text = decodeURIComponent(option.q)
|
|
|
- if(!uni.getStorageSync('token')){
|
|
|
- uni.setStorageSync('warningId',text.split("?")[1]);
|
|
|
- uni.redirectTo({
|
|
|
- url: '/pages/login',
|
|
|
- });
|
|
|
- }
|
|
|
- }else{
|
|
|
- this.warningId = uni.getStorageSync('warningId');
|
|
|
- uni.removeStorageSync('warningId');
|
|
|
- }
|
|
|
+ //通过短信外链跳转进来
|
|
|
+ if(option.id){
|
|
|
+ if(!uni.getStorageSync('token')){
|
|
|
+ uni.setStorageSync('warningId',option.id);
|
|
|
+ uni.redirectTo({
|
|
|
+ url: '/pages/login',
|
|
|
+ });
|
|
|
+ }
|
|
|
+ }else{
|
|
|
+ this.warningId = uni.getStorageSync('warningId');
|
|
|
+ uni.removeStorageSync('warningId');
|
|
|
+ }
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
},
|
|
|
onShow() {
|
|
|
|
|
|
},
|
|
|
mounted(){
|
|
|
this.getInfo();
|
|
|
+
|
|
|
},
|
|
|
methods: {
|
|
|
|
|
@@ -201,6 +204,20 @@ export default {
|
|
|
let self=this;
|
|
|
|
|
|
},
|
|
|
+ //判断预警时间是否超过30分钟
|
|
|
+ compareTime (gettime){
|
|
|
+ let timeOut = 30 * 60 * 1000;
|
|
|
+ let currentTime = new Date().getTime() //获取当前时间
|
|
|
+ let endTime = new Date(gettime).getTime() //预警时间
|
|
|
+ if(currentTime-endTime>timeOut){
|
|
|
+ console.log('预警时间超过30分钟')
|
|
|
+ this.timeStatus=true;
|
|
|
+ }else{
|
|
|
+ console.log('预警没超过30分钟')
|
|
|
+ this.timeStatus=false;
|
|
|
+ }
|
|
|
+
|
|
|
+ },
|
|
|
//查看图片
|
|
|
lockImg(list){
|
|
|
console.log(list)
|
|
@@ -251,6 +268,7 @@ export default {
|
|
|
title:'预案报警信息'
|
|
|
})
|
|
|
}
|
|
|
+ this.compareTime(res.warningTime);
|
|
|
}
|
|
|
},
|
|
|
handleClick(row,doType){
|