planExecuteRecordDetail.vue 8.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340
  1. <!-预案执行记录详情-->
  2. <template>
  3. <div class="addPage">
  4. <div class="addPage_title">
  5. <p>详情</p>
  6. <P></P>
  7. <p class="button-p reset-button-one" @click="backPage">返回</p>
  8. </div>
  9. <div class="addPage_b">
  10. <div class="addPage_b_t">
  11. <div class="addPage_b_t_l">
  12. <div class="small_title">风险概况</div>
  13. <div class="addPage_b_t_l_b" v-if="form">
  14. <li><i>事故原因:</i><i>{{form.riskReason?form.riskReason:''}}</i></li>
  15. <li v-if="form.riskReason==1"><i>风险级别:</i><i>低风险</i></li>
  16. <li v-if="form.riskReason==2"><i>风险级别:</i><i>中风险</i></li>
  17. <li v-if="form.riskReason==3"><i>风险级别:</i><i>较高风险</i></li>
  18. <li v-if="form.riskReason==4"><i>风险级别:</i><i>高风险</i></li>
  19. <li><i>发生时间:</i><i>{{form.startDate?form.startDate:''}} - {{form.endDate?form.endDate:''}}</i></li>
  20. <li><i>持续时间:</i><i>{{form.riskDuration?form.riskDuration:''}}秒</i></li>
  21. <li><i>风险响应人员:</i><i>{{form.handledPerson?form.handledPerson:''}}</i></li>
  22. <li><i>实验室内人员:</i><i>{{form.internalPerson?form.internalPerson:''}}</i></li>
  23. </div>
  24. </div>
  25. <div class="addPage_b_t_c">
  26. <div class="small_title">现场记录<i>(预案发生一个月后将自动清理)</i></div>
  27. <div class="addPage_b_t_c_b" v-if="form">
  28. <!-- <img src="@/assets/images/login-background.jpg">-->
  29. <video class="video" :src="form.recordVideo?form.recordVideo:''" autoplay controls ></video>
  30. </div>
  31. </div>
  32. <div class="addPage_b_t_r">
  33. <div class="small_title">消息推送记录</div>
  34. <div class="addPage_b_t_r_b" v-if="msgsPush.length>0">
  35. <li v-for="(item,index3) in msgsPush" :key="index3">
  36. <i>{{item.createTime}}</i>
  37. <i>{{item.pushType.code==0?'语音播报':'短信推送'}}</i>
  38. <i>{{item.showInfo}}</i></li>
  39. </div>
  40. </div>
  41. </div>
  42. <div class="addPage_b_b">
  43. <div class="small_title">风险轨迹</div>
  44. <div class="addPage_b_b_b">
  45. <div class="time-box">
  46. <ul >
  47. <li class="active" v-for="(item,index2) in planAxis" :key="index2">
  48. <p>发生风险:{{item.riskPlanName}}</p>
  49. <p>甲烷传感器浓度:<i>{{item.sensorJsonValue}}</i></p>
  50. <p>时间:<i>{{item.createTime}}</i></p>
  51. </li>
  52. </ul>
  53. </div>
  54. </div>
  55. </div>
  56. </div>
  57. </div>
  58. </template>
  59. <script>
  60. import {
  61. abnormalLogOrderByList,
  62. riskExeRecordList,
  63. riskPlanAbnormalDesc,
  64. viewWarnMessage
  65. } from '@/api/laboratory/subject'
  66. export default {
  67. name: "addPage",
  68. props:{
  69. pageData:{},
  70. },
  71. data() {
  72. return {
  73. pageType:1,
  74. planAxis:[],
  75. form:{},
  76. msgsPush:[],
  77. };
  78. },
  79. methods: {
  80. //返回
  81. backPage(){
  82. this.$parent.handleClick('','','back');
  83. this.$parent.getList();
  84. },
  85. getInfo(){
  86. let _this=this;
  87. riskPlanAbnormalDesc(_this.pageData.id).then( response => {
  88. let res=response.data;
  89. if(response.code==200){
  90. if(res){
  91. _this.form=res
  92. _this.form.endDate=res.endDate.split(' ')[1]
  93. }
  94. }
  95. });
  96. //风险轨迹
  97. abnormalLogOrderByList(_this.pageData.id).then( response => {
  98. let res=response.data;
  99. if(response.code==200){
  100. _this.planAxis=res;
  101. for(let i=0;i< _this.planAxis.length;i++){
  102. if( _this.planAxis[i].sensorJson){
  103. _this.planAxis[i].sensorJsonValue = JSON.parse(_this.planAxis[i].sensorJson)[0].value;
  104. }
  105. }
  106. console.log( _this.planAxis)
  107. }
  108. });
  109. //消息推送记录
  110. viewWarnMessage(_this.pageData.id).then( response => {
  111. let res=response.data;
  112. if(response.code==200){
  113. let data=response.data;
  114. _this.msgsPush=data
  115. }
  116. });
  117. },
  118. },
  119. mounted() {
  120. console.log(this.pageData)
  121. this.getInfo();
  122. }
  123. };
  124. </script>
  125. <style>
  126. ::-webkit-scrollbar {/*滚动条整体样式*/
  127. width:5px; /*高宽分别对应横竖滚动条的尺寸*/
  128. height:5px;
  129. }
  130. ::-webkit-scrollbar-thumb {/*滚动条里面小方块*/
  131. border-radius:3px;
  132. -webkit-box-shadow: inset 0 0 5px rgba(0,0,0,0.2);
  133. background: none;
  134. }
  135. ::-webkit-scrollbar-track {/*滚动条里面轨道*/
  136. -webkit-box-shadow: inset 0 0 5px rgba(0,0,0,0.2);
  137. border-radius:3px;
  138. background: none;
  139. }
  140. </style>
  141. <style scoped lang="scss">
  142. .addPage {
  143. flex:1;
  144. display: flex!important;
  145. flex-direction: column;
  146. box-shadow: 0 0 8px 2px rgba(0, 0, 0, 0.1);
  147. border-radius:10px;
  148. i{font-style: normal;}
  149. li{list-style-type:none;}
  150. /*顶部*/
  151. .addPage_title{
  152. display: flex;
  153. align-items: center;
  154. border-bottom: 1px solid #E0E0E0;
  155. padding-top:20px;
  156. p:nth-child(1){
  157. line-height:60px;
  158. color: #0045AF;
  159. font-size:16px;
  160. font-weight: 400;
  161. margin:0 12px 0 20px;
  162. }
  163. p:nth-child(2){
  164. font-size: 14px;
  165. font-family: Source Han Sans CN;
  166. font-weight: 400;
  167. color: #999999;
  168. flex: 1;
  169. }
  170. p:nth-child(3){
  171. margin-right:20px;
  172. }
  173. }
  174. .addPage_b{
  175. flex: 1;
  176. display: flex!important;
  177. flex-direction: column;
  178. padding: 34px 80px 0;
  179. box-sizing: border-box;
  180. /*小标题*/
  181. .small_title{
  182. font-size: 16px;
  183. font-family: Source Han Sans CN-Medium, Source Han Sans CN;
  184. font-weight: 500;
  185. color: #333333;
  186. line-height: 24px;
  187. margin-bottom: 24px;
  188. >i{
  189. color: #666;
  190. }
  191. }
  192. .addPage_b_t{
  193. display: flex;
  194. justify-content: space-between;
  195. .addPage_b_t_l{
  196. width: 378px;
  197. .addPage_b_t_l_b{
  198. >li{
  199. margin-bottom: 20px;
  200. >i{
  201. font-size: 14px;
  202. font-family: Source Han Sans CN-Regular, Source Han Sans CN;
  203. font-weight: 400;
  204. color: #333333;
  205. line-height: 14px;
  206. display: inline-block;
  207. vertical-align:top;
  208. }
  209. >i:nth-of-type(1){
  210. color: #333333;
  211. }
  212. >i:nth-of-type(2){
  213. width: 280px;
  214. color: #666666;
  215. line-height: 16px;
  216. }
  217. }
  218. }
  219. }
  220. .addPage_b_t_c{
  221. width: 380px;
  222. .addPage_b_t_c_b{
  223. width: 380px;
  224. height: 222px;
  225. >img{
  226. width: 380px;
  227. height: 222px;
  228. }
  229. .video{
  230. width: 380px;
  231. height: 222px;
  232. }
  233. }
  234. }
  235. .addPage_b_t_r{
  236. .addPage_b_t_r_b{
  237. width: 456px;
  238. >li{
  239. margin-bottom: 20px;
  240. >i{
  241. font-size: 14px;
  242. font-family: Source Han Sans CN-Regular, Source Han Sans CN;
  243. font-weight: 400;
  244. color: #666666;
  245. line-height: 14px;
  246. display: inline-block;
  247. }
  248. >i:nth-of-type(1){
  249. width: 148px;
  250. }
  251. >i:nth-of-type(2){
  252. width: 84px;
  253. }
  254. >i:nth-of-type(3){
  255. width: 224px;
  256. }
  257. }
  258. }
  259. }
  260. }
  261. .addPage_b_b{
  262. margin-top: 84px;
  263. .time-box{
  264. width: 100%;
  265. overflow-y: auto;
  266. >ul{
  267. position: relative;
  268. height:255px;
  269. white-space: nowrap;
  270. display: inline-flex;
  271. >li{
  272. width:242px;
  273. height: 98px;
  274. float: left;
  275. position: relative;
  276. cursor: pointer;
  277. >p{
  278. font-size: 14px;
  279. font-family: Microsoft YaHei;
  280. font-weight: 400;
  281. color: #333333;
  282. line-height: 14px;
  283. margin-bottom: 14px;
  284. }
  285. >p:nth-of-type(1){
  286. }
  287. >p:nth-of-type(2){
  288. color: #666666;
  289. >i{
  290. color: #FF3131;
  291. }
  292. }
  293. >p:nth-of-type(3){
  294. color: #666666;
  295. >i{
  296. color: #333333;
  297. }
  298. }
  299. }
  300. >li:after{
  301. content: "";
  302. width: 56px;
  303. height: 56px;
  304. border-radius: 28px;
  305. background: #0183FA;
  306. position: absolute;
  307. left:50%;margin-left:-64px;
  308. bottom: 0;
  309. bottom:-60px;
  310. z-index: 1;
  311. border: 20px solid #fff;
  312. }
  313. >li:nth-child(2n):after{
  314. bottom: auto;top:-60px;
  315. }
  316. >li:nth-child(2n){
  317. margin-top:160px;
  318. }
  319. }
  320. >ul:after{content: ""; display: block;background: #d2d2d2;height: 1px;width: 100%;position: absolute;left:0;top:50%;}
  321. }
  322. }
  323. }
  324. }
  325. </style>