earlyWarningDetail.vue 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582
  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}}</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}}</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+infoData.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. }
  166. },
  167. onLoad(option) {
  168. let self = this;
  169. if(option.id){
  170. this.warningId=option.id;
  171. }else{
  172. if(option.q){
  173. let text = decodeURIComponent(option.q)
  174. if(!uni.getStorageSync('token')){
  175. uni.setStorageSync('warningId',text.split("?")[1]);
  176. uni.redirectTo({
  177. url: '/pages/login',
  178. });
  179. }
  180. }else{
  181. this.warningId = uni.getStorageSync('warningId');
  182. uni.removeStorageSync('warningId');
  183. }
  184. }
  185. },
  186. onShow() {
  187. },
  188. mounted(){
  189. this.getInfo();
  190. },
  191. methods: {
  192. //滚动事件
  193. scrollGet(){
  194. let self=this;
  195. },
  196. //查看图片
  197. lockImg(list){
  198. console.log(list)
  199. if(!list[0]){
  200. return
  201. }
  202. let urlList=[];
  203. for(let i=0;i<list.length;i++){
  204. urlList.push(this.baseUrl+list[i].fileUrl)
  205. }
  206. wx.previewImage({
  207. urls: urlList, //需要预览的图片http链接列表,多张的时候,url直接写在后面就行了
  208. current: '', // 当前显示图片的http链接,默认是第一个
  209. success: function(res) {},
  210. fail: function(res) {},
  211. complete: function(res) {},
  212. })
  213. },
  214. //视频全屏播放
  215. lockVideo(){
  216. this.videoContext = uni.createVideoContext("myvideo", this);
  217. this.videoContext.requestFullScreen({ direction: 90 });
  218. this.videoContext.play();
  219. },
  220. //获取详情
  221. async getInfo(){
  222. let _this = this;
  223. console.log(_this.warningId)
  224. const {data} = await warningNoticeLogDetail({id:_this.warningId})
  225. if(data.code==200){
  226. let res=data.data
  227. this.form=res;
  228. if(res.warningType==1){
  229. uni.setNavigationBarTitle({
  230. title:'算法识别预警信息'
  231. })
  232. }else if(res.warningType==2){
  233. uni.setNavigationBarTitle({
  234. title:'化学品预警信息'
  235. })
  236. }else if(res.warningType==3){
  237. uni.setNavigationBarTitle({
  238. title:'气瓶预警信息'
  239. })
  240. }else if(res.warningType==4){
  241. uni.setNavigationBarTitle({
  242. title:'预案报警信息'
  243. })
  244. }
  245. }
  246. },
  247. handleClick(row,doType){
  248. let self=this;
  249. if( doType=='monitor'){//监控
  250. uni.navigateTo({
  251. url: '/pages/earlyWarningManage/videoMonitoring?subId='+this.form.subId+'&floorId='+this.form.floorId//我的实验室
  252. });
  253. }
  254. },
  255. }
  256. }
  257. </script>
  258. <style lang="stylus" scoped>
  259. .earlyWarning{
  260. height:100%;
  261. display flex;
  262. padding-bottom: 30rpx;
  263. box-sizing: border-box;
  264. .red_color{
  265. color: #D40000;
  266. border: 1rpx solid #D40000;
  267. }
  268. .orange_color{
  269. color: #FF4800;
  270. border: 1rpx solid #FF4800;
  271. }
  272. .yellow_color{
  273. color: #FFA34E;
  274. border: 1rpx solid #FFA34E;
  275. }
  276. .info-max-box{
  277. flex: 1;
  278. overflow: scroll;
  279. }
  280. .header{
  281. width: 750rpx;
  282. height: 80rpx;
  283. font-size: 28rpx;
  284. font-family: PingFang SC-Medium, PingFang SC;
  285. font-weight: 400;
  286. color: #D40000;
  287. line-height: 80rpx;
  288. text-align: center;
  289. background: rgba(212,0,0,0.2);
  290. }
  291. .header_tow{
  292. width: 750rpx;
  293. height: 80rpx;
  294. font-size: 28rpx;
  295. font-family: PingFang SC-Medium, PingFang SC;
  296. font-weight: 400;
  297. color: #FF4800;
  298. line-height: 80rpx;
  299. text-align: center;
  300. background: rgba(255,72,0,0.2);
  301. }
  302. .header_three{
  303. width: 750rpx;
  304. height: 80rpx;
  305. font-size: 28rpx;
  306. font-family: PingFang SC-Medium, PingFang SC;
  307. font-weight: 400;
  308. color: #FF4800;
  309. line-height: 80rpx;
  310. text-align: center;
  311. background: rgba(255,72,0,0.2);
  312. }
  313. .header_four{
  314. width: 750rpx;
  315. height: 80rpx;
  316. font-size: 28rpx;
  317. font-family: PingFang SC-Medium, PingFang SC;
  318. font-weight: 400;
  319. color: #FFA34E;
  320. line-height: 80rpx;
  321. text-align: center;
  322. background: rgba(255,163,78,0.2);
  323. }
  324. .site{
  325. width: 690rpx;
  326. height: 80rpx;
  327. background: #FFFFFF;
  328. display: flex;
  329. justify-content: flex-start;
  330. align-items: center;
  331. border-radius: 20rpx 20rpx 20rpx 20rpx;
  332. margin:20rpx 30rpx;
  333. >img{
  334. width: 30rpx;
  335. height: 30rpx;
  336. margin-right: 22rpx;
  337. margin-left: 30rpx;
  338. }
  339. >text:nth-of-type(1){
  340. font-size: 28rpx;
  341. font-family: PingFang SC-Medium, PingFang SC;
  342. font-weight: 400;
  343. color: #333333;
  344. line-height: 28rpx;
  345. }
  346. >text:nth-of-type(2){
  347. display: inline-block;
  348. width: 2rpx;
  349. height: 20rpx;
  350. background: #E0E0E0;
  351. margin: 0 24rpx 0 28rpx;
  352. }
  353. >text:nth-of-type(3){
  354. font-size: 28rpx;
  355. font-family: PingFang SC-Medium, PingFang SC;
  356. font-weight: 400;
  357. color: #333333;
  358. line-height: 28rpx;
  359. }
  360. }
  361. .site_tow{
  362. width: 690rpx;
  363. height: 170rpx;
  364. background: #FFFFFF;
  365. border-radius: 20rpx 20rpx 20rpx 20rpx;
  366. margin:20rpx 30rpx;
  367. overflow: hidden;
  368. .site_tow_t{
  369. height: 40rpx;
  370. display: flex;
  371. justify-content: flex-start;
  372. align-items: center;
  373. margin-top: 32rpx;
  374. >img{
  375. width: 30rpx;
  376. height: 30rpx;
  377. margin-right: 22rpx;
  378. margin-left: 30rpx;
  379. }
  380. >text:nth-of-type(1){
  381. font-size: 28rpx;
  382. font-family: PingFang SC-Medium, PingFang SC;
  383. font-weight: 400;
  384. color: #333333;
  385. line-height: 28rpx;
  386. }
  387. }
  388. .site_tow_b{
  389. height: 40rpx;
  390. display: flex;
  391. justify-content: flex-start;
  392. align-items: center;
  393. margin-top: 20rpx;
  394. >img{
  395. width: 30rpx;
  396. height: 30rpx;
  397. margin-right: 22rpx;
  398. margin-left: 30rpx;
  399. }
  400. >text:nth-of-type(1){
  401. font-size: 28rpx;
  402. font-family: PingFang SC-Medium, PingFang SC;
  403. font-weight: 400;
  404. color: #333333;
  405. line-height: 28rpx;
  406. }
  407. >text:nth-of-type(2){
  408. display: inline-block;
  409. width: 2rpx;
  410. height: 20rpx;
  411. background: #E0E0E0;
  412. margin: 0 24rpx 0 28rpx;
  413. }
  414. >text:nth-of-type(3){
  415. font-size: 28rpx;
  416. font-family: PingFang SC-Medium, PingFang SC;
  417. font-weight: 400;
  418. color: #333333;
  419. line-height: 28rpx;
  420. }
  421. }
  422. }
  423. .small_title{
  424. height: 90rpx;
  425. display: flex;
  426. justify-content: flex-start;
  427. align-items: center;
  428. border-bottom: 1rpx solid #E0E0E0;
  429. >text:nth-of-type(1){
  430. display: inline-block;
  431. width: 4rpx;
  432. height: 30rpx;
  433. background: #0183FA;
  434. margin: 0 22rpx 0 28rpx;
  435. }
  436. >text:nth-of-type(1){
  437. font-size: 30rpx;
  438. font-family: PingFang SC-Medium, PingFang SC;
  439. font-weight: 400;
  440. color: #333333;
  441. line-height: 30rpx;
  442. }
  443. }
  444. .basics{
  445. margin-left: 30rpx;
  446. width: 690rpx;
  447. height: auto;
  448. background: #FFFFFF;
  449. border-radius: 20rpx 20rpx 20rpx 20rpx;
  450. padding-bottom: 16rpx;
  451. box-sizing: border-box;
  452. .basics_li{
  453. display: flex;
  454. justify-content: space-between;
  455. margin: 0 30rpx;
  456. >text:nth-of-type(1){
  457. font-size: 28rpx;
  458. font-family: PingFang SC-Medium, PingFang SC;
  459. font-weight: 400;
  460. color: #333333;
  461. line-height: 60rpx;
  462. }
  463. >text:nth-of-type(2){
  464. font-size: 28rpx;
  465. font-family: PingFang SC-Medium, PingFang SC;
  466. font-weight: 400;
  467. color: #333333;
  468. line-height: 60rpx;
  469. flex: 1;
  470. text-align: right;
  471. }
  472. }
  473. }
  474. .note{
  475. margin-left: 30rpx;
  476. margin-top: 20rpx;
  477. width: 690rpx;
  478. height: auto;
  479. background: #FFFFFF;
  480. border-radius: 20rpx 20rpx 20rpx 20rpx;
  481. padding-bottom: 16rpx;
  482. box-sizing: border-box;
  483. .note_li{
  484. display: flex;
  485. justify-content: space-between;
  486. margin: 0 30rpx;
  487. >text:nth-of-type(1){
  488. font-size: 28rpx;
  489. font-family: PingFang SC-Medium, PingFang SC;
  490. font-weight: 400;
  491. color: #333333;
  492. line-height: 60rpx;
  493. }
  494. .note_li_r{
  495. display: flex;
  496. justify-content: flex-start;
  497. align-items: center;
  498. >img{
  499. width: 28rpx;
  500. height: 28rpx;
  501. margin-right: 10rpx;
  502. }
  503. font-size: 28rpx;
  504. font-family: PingFang SC-Medium, PingFang SC;
  505. font-weight: 400;
  506. color: #0183FA;
  507. line-height: 60rpx;
  508. }
  509. }
  510. }
  511. .picture{
  512. margin-left: 30rpx;
  513. width: 690rpx;
  514. height: auto;
  515. background: #FFFFFF;
  516. border-radius: 20rpx 20rpx 20rpx 20rpx;
  517. margin-top: 20rpx;
  518. .picture_b{
  519. display: flex;
  520. justify-content: flex-start;
  521. flex-wrap: wrap;
  522. padding: 40rpx 30rpx 10rpx;
  523. box-sizing: border-box;
  524. .video{
  525. position: relative;
  526. width: 150rpx;
  527. height: 150rpx;
  528. border-radius: 10rpx 10rpx 10rpx 10rpx;
  529. margin-right: 38rpx;
  530. margin-bottom: 10rpx;
  531. .video_t{
  532. width: 150rpx;
  533. height: 150rpx;
  534. border-radius: 10rpx 10rpx 10rpx 10rpx;
  535. position: absolute;
  536. }
  537. .video_b{
  538. width: 40rpx;
  539. height: 40rpx;
  540. position: absolute;
  541. left: 55rpx;
  542. top: 55rpx;
  543. }
  544. }
  545. }
  546. }
  547. .bottom_btn{
  548. width: 690rpx;
  549. height: 90rpx;
  550. border-radius: 10rpx 10rpx 10rpx 10rpx;
  551. opacity: 1;
  552. border: 1rpx solid #0183FA;
  553. font-size: 30rpx;
  554. font-family: PingFang SC-Medium, PingFang SC;
  555. font-weight: 400;
  556. color: #0183FA;
  557. line-height: 90rpx;
  558. text-align: center;
  559. background: #F5F5F5;
  560. margin: 90rpx 30rpx 30rpx;
  561. }
  562. }
  563. </style>