earlyWarningDetail.vue 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600
  1. <!-- 预案报警信息 -->
  2. <template>
  3. <view class="earlyWarning">
  4. <scroll-view scroll-y @scrolltolower="scrollGet" class="info-max-box">
  5. <!-- 预案报警 -->
  6. <view class="header" v-if="form.warningType==4">{{form.warningContent}}</view>
  7. <!-- 化学品 -->
  8. <view class="header_tow" v-if="form.warningType==2">{{form.warningContent}}</view>
  9. <!-- 气瓶 -->
  10. <view class="header_three" v-if="form.warningType==3">{{form.warningContent}}</view>
  11. <!-- 算法识别 -->
  12. <view class="header_four" v-if="form.warningType==1">{{form.warningContent}}</view>
  13. <!-- 预案报警 -->
  14. <view class="site" v-if="form.warningType==4">
  15. <img src="@/images/Version2.2/icon_wtzg_xx.png"/>
  16. <text>{{form.subName}}</text>
  17. <text></text>
  18. <text>{{form.buildName}}{{form.floorName}}{{form.roomNum}}</text>
  19. </view>
  20. <!-- 化学品 -->
  21. <view class="site_tow" v-if="form.warningType==2 || form.warningType==3 || form.warningType==1">
  22. <view class="site_tow_t">
  23. <img src="@/images/Version2.2/icon_wtzg_xx.png"/>
  24. <text>{{form.warningTime}}</text>
  25. </view>
  26. <view class="site_tow_b">
  27. <img src="@/images/Version2.2/icon_wtzg_xx.png"/>
  28. <text>{{form.subName}}</text>
  29. <text></text>
  30. <text>{{form.buildName}}{{form.floorName}}{{form.roomNum}}</text>
  31. </view>
  32. </view>
  33. <!-- 预案报警 -->
  34. <view class="basics" v-if="form.warningType==4">
  35. <view class="small_title"><text></text><text>风险概况</text></view>
  36. <view class="basics_li" style="margin-top:20rpx;">
  37. <text>发生时间:</text>
  38. <text>{{form.startTime}}至{{form.endTime?form.endTime:'-'}}</text>
  39. </view>
  40. <view class="basics_li">
  41. <text>持续时间:</text>
  42. <text>{{form.riskDuration}}秒</text>
  43. </view>
  44. <view class="basics_li">
  45. <text>风险响应人员:</text>
  46. <text>{{form.responder}}</text>
  47. </view>
  48. <view class="basics_li">
  49. <text>实验室内人员:</text>
  50. <text>{{form.indoorUser?form.indoorUser:'-'}}</text>
  51. </view>
  52. </view>
  53. <!-- 化学品 -->
  54. <view class="basics" v-if="form.warningType==2">
  55. <view class="small_title"><text></text><text>化学品信息</text></view>
  56. <view class="basics_li" style="margin-top:20rpx;">
  57. <text>{{form.name}}</text>
  58. <text></text>
  59. </view>
  60. <view class="basics_li">
  61. <text>存放位置:</text>
  62. <text>{{form.deposit}}</text>
  63. </view>
  64. <view class="basics_li">
  65. <text>化学品余量:</text>
  66. <text>{{form.margin}}</text>
  67. </view>
  68. <view class="basics_li" v-if="form.warningSubType==2">
  69. <text>申领人:</text>
  70. <text>{{form.apply}}</text>
  71. </view>
  72. <view class="basics_li" v-if="form.warningSubType==2">
  73. <text>申领时间:</text>
  74. <text>{{form.applyTime}}</text>
  75. </view>
  76. <view class="basics_li" v-if="form.warningSubType==3||form.warningSubType==4">
  77. <text>过期时间:</text>
  78. <text>{{form.expirationTime}}</text>
  79. </view>
  80. </view>
  81. <!-- 气瓶 -->
  82. <view class="basics" v-if="form.warningType==3">
  83. <view class="small_title"><text></text><text>气瓶信息</text></view>
  84. <view class="basics_li" style="margin-top:20rpx;">
  85. <text>{{form.name}}</text>
  86. <text></text>
  87. </view>
  88. <view class="basics_li">
  89. <text>气体余量:</text>
  90. <text>{{form.margin}}</text>
  91. </view>
  92. <view class="basics_li">
  93. <text>气瓶规格:</text>
  94. <text>{{form.specification}}</text>
  95. </view>
  96. <view class="basics_li">
  97. <text>所有人:</text>
  98. <text>{{form.holder}}</text>
  99. </view>
  100. <view class="basics_li">
  101. <text>入库时间:</text>
  102. <text>{{form.entryTime}}</text>
  103. </view>
  104. <view class="basics_li" v-if="form.warningSubType==2">
  105. <text>申领人:</text>
  106. <text>{{form.apply}}</text>
  107. </view>
  108. <view class="basics_li" v-if="form.warningSubType==2">
  109. <text>申领时间:</text>
  110. <text>{{form.applyTime}}</text>
  111. </view>
  112. </view>
  113. <view class="note" v-if="form.warningType==4 || form.warningType==1">
  114. <view class="small_title"><text></text><text>通知短信</text></view>
  115. <view class="note_li" style="margin-top:20rpx;" v-for="(item,index) in form.messageVOList">
  116. <text>{{item.name}}</text>
  117. <view class="note_li_r" v-if="item.isSuccess==1"><img src="@/images/icon_yjxx_ytz.png"/><text>已通知</text></view>
  118. </view>
  119. </view>
  120. <view class="note" v-if="(form.warningType==2 || form.warningType==3) && form.warningSubType==1">
  121. <view class="small_title"><text></text><text>预警通知</text></view>
  122. <view class="note_li" style="margin-top:20rpx;" >
  123. <text>声光报警通知</text>
  124. <view class="note_li_r" v-if="form.voiceBroadcast==1"><img src="@/images/icon_yjxx_ytz.png"/><text>已通知</text></view>
  125. </view>
  126. </view>
  127. <view class="note" v-if="(form.warningType==1 || form.warningType==4) && form.warningSubType==1">
  128. <view class="small_title"><text></text><text>预警通知</text></view>
  129. <view class="note_li" style="margin-top:20rpx;" >
  130. <text>语音播报</text>
  131. <view class="note_li_r" v-if="form.voiceBroadcast==1"><img src="@/images/icon_yjxx_ytz.png"/><text>已通知</text></view>
  132. </view>
  133. </view>
  134. <view class="picture">
  135. <view class="small_title"><text></text><text>报警抓拍</text></view>
  136. <view class="picture_b" >
  137. <view class="video">
  138. <video id="myvideo" class="video_t" :src="configUrl+form.recordVideo"></video>
  139. <img class="video_b" @click="lockVideo()" src="@/images/icon_bjzp_spbof.png"/>
  140. </view>
  141. </view>
  142. </view>
  143. <view class="bottom_btn" @click="handleClick('','monitor')">查看监控</view>
  144. </scroll-view>
  145. </view>
  146. </template>
  147. <script>
  148. import { config } from '@/api/request/config.js'
  149. import {checkManageList,conditionCollegeInfo,warningNoticeLogDetail} from '@/api/index.js'
  150. export default {
  151. name: "rectifyList",
  152. components: {
  153. },
  154. data() {
  155. return {
  156. configUrl:config.base_url,
  157. //列表请求参数
  158. getData:{
  159. pageNum:1,
  160. pageSize:20,
  161. },
  162. total:0,
  163. warningId:'',
  164. form:{},
  165. currentTime:'',
  166. }
  167. },
  168. onLoad(option) {
  169. let self = this;
  170. //先判断是否是通过点击列表进入
  171. if(option.warningId){
  172. this.warningId=option.warningId;
  173. }else{
  174. //通过短信外链跳转进来
  175. if(option.id){
  176. if(!uni.getStorageSync('token')){
  177. uni.setStorageSync('warningId',option.id);
  178. uni.redirectTo({
  179. url: '/pages/login',
  180. });
  181. }
  182. }else{
  183. this.warningId = uni.getStorageSync('warningId');
  184. uni.removeStorageSync('warningId');
  185. }
  186. }
  187. },
  188. onShow() {
  189. },
  190. mounted(){
  191. this.getInfo();
  192. },
  193. methods: {
  194. //滚动事件
  195. scrollGet(){
  196. let self=this;
  197. },
  198. //判断预警时间是否超过30分钟
  199. compareTime (gettime){
  200. let timeOut = 30 * 60 * 1000;
  201. let currentTime = new Date().getTime() //获取当前时间
  202. let endTime = new Date(gettime).getTime() //预警时间
  203. if(currentTime-endTime>timeOut){
  204. console.log('预警时间超过30分钟')
  205. this.timeStatus=true;
  206. }else{
  207. console.log('预警没超过30分钟')
  208. this.timeStatus=false;
  209. }
  210. },
  211. //查看图片
  212. lockImg(list){
  213. console.log(list)
  214. if(!list[0]){
  215. return
  216. }
  217. let urlList=[];
  218. for(let i=0;i<list.length;i++){
  219. urlList.push(this.baseUrl+list[i].fileUrl)
  220. }
  221. wx.previewImage({
  222. urls: urlList, //需要预览的图片http链接列表,多张的时候,url直接写在后面就行了
  223. current: '', // 当前显示图片的http链接,默认是第一个
  224. success: function(res) {},
  225. fail: function(res) {},
  226. complete: function(res) {},
  227. })
  228. },
  229. //视频全屏播放
  230. lockVideo(){
  231. this.videoContext = uni.createVideoContext("myvideo", this);
  232. this.videoContext.requestFullScreen({ direction: 90 });
  233. this.videoContext.play();
  234. },
  235. //获取详情
  236. async getInfo(){
  237. let _this = this;
  238. console.log(_this.warningId)
  239. const {data} = await warningNoticeLogDetail({id:_this.warningId})
  240. if(data.code==200){
  241. let res=data.data
  242. this.form=res;
  243. if(res.warningType==1){
  244. uni.setNavigationBarTitle({
  245. title:'算法识别预警信息'
  246. })
  247. }else if(res.warningType==2){
  248. uni.setNavigationBarTitle({
  249. title:'化学品预警信息'
  250. })
  251. }else if(res.warningType==3){
  252. uni.setNavigationBarTitle({
  253. title:'气瓶预警信息'
  254. })
  255. }else if(res.warningType==4){
  256. uni.setNavigationBarTitle({
  257. title:'预案报警信息'
  258. })
  259. }
  260. this.compareTime(res.warningTime);
  261. }
  262. },
  263. handleClick(row,doType){
  264. let self=this;
  265. if( doType=='monitor'){//监控
  266. uni.navigateTo({
  267. url: '/pages/earlyWarningManage/videoMonitoring?subId='+this.form.subId+'&floorId='+this.form.floorId//我的实验室
  268. });
  269. }
  270. },
  271. }
  272. }
  273. </script>
  274. <style lang="stylus" scoped>
  275. .earlyWarning{
  276. height:100%;
  277. display flex;
  278. padding-bottom: 30rpx;
  279. box-sizing: border-box;
  280. .red_color{
  281. color: #D40000;
  282. border: 1rpx solid #D40000;
  283. }
  284. .orange_color{
  285. color: #FF4800;
  286. border: 1rpx solid #FF4800;
  287. }
  288. .yellow_color{
  289. color: #FFA34E;
  290. border: 1rpx solid #FFA34E;
  291. }
  292. .info-max-box{
  293. flex: 1;
  294. overflow: scroll;
  295. }
  296. .header{
  297. width: 750rpx;
  298. height: 80rpx;
  299. font-size: 28rpx;
  300. font-family: PingFang SC-Medium, PingFang SC;
  301. font-weight: 400;
  302. color: #D40000;
  303. line-height: 80rpx;
  304. text-align: center;
  305. background: rgba(212,0,0,0.2);
  306. }
  307. .header_tow{
  308. width: 750rpx;
  309. height: 80rpx;
  310. font-size: 28rpx;
  311. font-family: PingFang SC-Medium, PingFang SC;
  312. font-weight: 400;
  313. color: #FF4800;
  314. line-height: 80rpx;
  315. text-align: center;
  316. background: rgba(255,72,0,0.2);
  317. }
  318. .header_three{
  319. width: 750rpx;
  320. height: 80rpx;
  321. font-size: 28rpx;
  322. font-family: PingFang SC-Medium, PingFang SC;
  323. font-weight: 400;
  324. color: #FF4800;
  325. line-height: 80rpx;
  326. text-align: center;
  327. background: rgba(255,72,0,0.2);
  328. }
  329. .header_four{
  330. width: 750rpx;
  331. height: 80rpx;
  332. font-size: 28rpx;
  333. font-family: PingFang SC-Medium, PingFang SC;
  334. font-weight: 400;
  335. color: #FFA34E;
  336. line-height: 80rpx;
  337. text-align: center;
  338. background: rgba(255,163,78,0.2);
  339. }
  340. .site{
  341. width: 690rpx;
  342. height: 80rpx;
  343. background: #FFFFFF;
  344. display: flex;
  345. justify-content: flex-start;
  346. align-items: center;
  347. border-radius: 20rpx 20rpx 20rpx 20rpx;
  348. margin:20rpx 30rpx;
  349. >img{
  350. width: 30rpx;
  351. height: 30rpx;
  352. margin-right: 22rpx;
  353. margin-left: 30rpx;
  354. }
  355. >text:nth-of-type(1){
  356. font-size: 28rpx;
  357. font-family: PingFang SC-Medium, PingFang SC;
  358. font-weight: 400;
  359. color: #333333;
  360. line-height: 28rpx;
  361. }
  362. >text:nth-of-type(2){
  363. display: inline-block;
  364. width: 2rpx;
  365. height: 20rpx;
  366. background: #E0E0E0;
  367. margin: 0 24rpx 0 28rpx;
  368. }
  369. >text:nth-of-type(3){
  370. font-size: 28rpx;
  371. font-family: PingFang SC-Medium, PingFang SC;
  372. font-weight: 400;
  373. color: #333333;
  374. line-height: 28rpx;
  375. }
  376. }
  377. .site_tow{
  378. width: 690rpx;
  379. height: 170rpx;
  380. background: #FFFFFF;
  381. border-radius: 20rpx 20rpx 20rpx 20rpx;
  382. margin:20rpx 30rpx;
  383. overflow: hidden;
  384. .site_tow_t{
  385. height: 40rpx;
  386. display: flex;
  387. justify-content: flex-start;
  388. align-items: center;
  389. margin-top: 32rpx;
  390. >img{
  391. width: 30rpx;
  392. height: 30rpx;
  393. margin-right: 22rpx;
  394. margin-left: 30rpx;
  395. }
  396. >text:nth-of-type(1){
  397. font-size: 28rpx;
  398. font-family: PingFang SC-Medium, PingFang SC;
  399. font-weight: 400;
  400. color: #333333;
  401. line-height: 28rpx;
  402. }
  403. }
  404. .site_tow_b{
  405. height: 40rpx;
  406. display: flex;
  407. justify-content: flex-start;
  408. align-items: center;
  409. margin-top: 20rpx;
  410. >img{
  411. width: 30rpx;
  412. height: 30rpx;
  413. margin-right: 22rpx;
  414. margin-left: 30rpx;
  415. }
  416. >text:nth-of-type(1){
  417. font-size: 28rpx;
  418. font-family: PingFang SC-Medium, PingFang SC;
  419. font-weight: 400;
  420. color: #333333;
  421. line-height: 28rpx;
  422. }
  423. >text:nth-of-type(2){
  424. display: inline-block;
  425. width: 2rpx;
  426. height: 20rpx;
  427. background: #E0E0E0;
  428. margin: 0 24rpx 0 28rpx;
  429. }
  430. >text:nth-of-type(3){
  431. font-size: 28rpx;
  432. font-family: PingFang SC-Medium, PingFang SC;
  433. font-weight: 400;
  434. color: #333333;
  435. line-height: 28rpx;
  436. }
  437. }
  438. }
  439. .small_title{
  440. height: 90rpx;
  441. display: flex;
  442. justify-content: flex-start;
  443. align-items: center;
  444. border-bottom: 1rpx solid #E0E0E0;
  445. >text:nth-of-type(1){
  446. display: inline-block;
  447. width: 4rpx;
  448. height: 30rpx;
  449. background: #0183FA;
  450. margin: 0 22rpx 0 28rpx;
  451. }
  452. >text:nth-of-type(1){
  453. font-size: 30rpx;
  454. font-family: PingFang SC-Medium, PingFang SC;
  455. font-weight: 400;
  456. color: #333333;
  457. line-height: 30rpx;
  458. }
  459. }
  460. .basics{
  461. margin-left: 30rpx;
  462. width: 690rpx;
  463. height: auto;
  464. background: #FFFFFF;
  465. border-radius: 20rpx 20rpx 20rpx 20rpx;
  466. padding-bottom: 16rpx;
  467. box-sizing: border-box;
  468. .basics_li{
  469. display: flex;
  470. justify-content: space-between;
  471. margin: 0 30rpx;
  472. >text:nth-of-type(1){
  473. font-size: 28rpx;
  474. font-family: PingFang SC-Medium, PingFang SC;
  475. font-weight: 400;
  476. color: #333333;
  477. line-height: 60rpx;
  478. }
  479. >text:nth-of-type(2){
  480. font-size: 28rpx;
  481. font-family: PingFang SC-Medium, PingFang SC;
  482. font-weight: 400;
  483. color: #333333;
  484. line-height: 60rpx;
  485. flex: 1;
  486. text-align: right;
  487. }
  488. }
  489. }
  490. .note{
  491. margin-left: 30rpx;
  492. margin-top: 20rpx;
  493. width: 690rpx;
  494. height: auto;
  495. background: #FFFFFF;
  496. border-radius: 20rpx 20rpx 20rpx 20rpx;
  497. padding-bottom: 16rpx;
  498. box-sizing: border-box;
  499. .note_li{
  500. display: flex;
  501. justify-content: space-between;
  502. margin: 0 30rpx;
  503. >text:nth-of-type(1){
  504. font-size: 28rpx;
  505. font-family: PingFang SC-Medium, PingFang SC;
  506. font-weight: 400;
  507. color: #333333;
  508. line-height: 60rpx;
  509. }
  510. .note_li_r{
  511. display: flex;
  512. justify-content: flex-start;
  513. align-items: center;
  514. >img{
  515. width: 28rpx;
  516. height: 28rpx;
  517. margin-right: 10rpx;
  518. }
  519. font-size: 28rpx;
  520. font-family: PingFang SC-Medium, PingFang SC;
  521. font-weight: 400;
  522. color: #0183FA;
  523. line-height: 60rpx;
  524. }
  525. }
  526. }
  527. .picture{
  528. margin-left: 30rpx;
  529. width: 690rpx;
  530. height: auto;
  531. background: #FFFFFF;
  532. border-radius: 20rpx 20rpx 20rpx 20rpx;
  533. margin-top: 20rpx;
  534. .picture_b{
  535. display: flex;
  536. justify-content: flex-start;
  537. flex-wrap: wrap;
  538. padding: 40rpx 30rpx 10rpx;
  539. box-sizing: border-box;
  540. .video{
  541. position: relative;
  542. width: 150rpx;
  543. height: 150rpx;
  544. border-radius: 10rpx 10rpx 10rpx 10rpx;
  545. margin-right: 38rpx;
  546. margin-bottom: 10rpx;
  547. .video_t{
  548. width: 150rpx;
  549. height: 150rpx;
  550. border-radius: 10rpx 10rpx 10rpx 10rpx;
  551. position: absolute;
  552. }
  553. .video_b{
  554. width: 40rpx;
  555. height: 40rpx;
  556. position: absolute;
  557. left: 55rpx;
  558. top: 55rpx;
  559. }
  560. }
  561. }
  562. }
  563. .bottom_btn{
  564. width: 690rpx;
  565. height: 90rpx;
  566. border-radius: 10rpx 10rpx 10rpx 10rpx;
  567. opacity: 1;
  568. border: 1rpx solid #0183FA;
  569. font-size: 30rpx;
  570. font-family: PingFang SC-Medium, PingFang SC;
  571. font-weight: 400;
  572. color: #0183FA;
  573. line-height: 90rpx;
  574. text-align: center;
  575. background: #F5F5F5;
  576. margin: 90rpx 30rpx 30rpx;
  577. }
  578. }
  579. </style>