earlyWarningDetail.vue 14 KB

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