planExecuteRecordDetail.vue 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386
  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.riskLevel==1"><i>风险级别:</i><i>低风险</i></li>
  16. <li v-if="form.riskLevel==2"><i>风险级别:</i><i>中风险</i></li>
  17. <li v-if="form.riskLevel==3"><i>风险级别:</i><i>较高风险</i></li>
  18. <li v-if="form.riskLevel==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="item.riskStatus==1||item.riskStatus==2?'risk_trend':'hardware'" v-for="(item,index2) in planAxis" :key="index2">
  48. <p>发生风险:{{item.riskPlanName}}</p>
  49. <p>{{item.sensorJsonName}}:<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. _this.planAxis[i].sensorJsonName = JSON.parse(_this.planAxis[i].sensorJson)[0].describe;
  105. }
  106. }
  107. console.log( _this.planAxis)
  108. }
  109. });
  110. //消息推送记录
  111. viewWarnMessage(_this.pageData.id).then( response => {
  112. let res=response.data;
  113. if(response.code==200){
  114. let data=response.data;
  115. _this.msgsPush=data
  116. }
  117. });
  118. },
  119. },
  120. mounted() {
  121. console.log(this.pageData)
  122. this.getInfo();
  123. }
  124. };
  125. </script>
  126. <style>
  127. ::-webkit-scrollbar {/*滚动条整体样式*/
  128. width:5px; /*高宽分别对应横竖滚动条的尺寸*/
  129. height:5px;
  130. }
  131. ::-webkit-scrollbar-thumb {/*滚动条里面小方块*/
  132. border-radius:3px;
  133. -webkit-box-shadow: inset 0 0 5px rgba(0,0,0,0.2);
  134. background: none;
  135. }
  136. ::-webkit-scrollbar-track {/*滚动条里面轨道*/
  137. -webkit-box-shadow: inset 0 0 5px rgba(0,0,0,0.2);
  138. border-radius:3px;
  139. background: none;
  140. }
  141. </style>
  142. <style scoped lang="scss">
  143. .addPage {
  144. flex:1;
  145. display: flex!important;
  146. flex-direction: column;
  147. box-shadow: 0 0 8px 2px rgba(0, 0, 0, 0.1);
  148. border-radius:10px;
  149. i{font-style: normal;}
  150. li{list-style-type:none;}
  151. /*顶部*/
  152. .addPage_title{
  153. display: flex;
  154. align-items: center;
  155. border-bottom: 1px solid #E0E0E0;
  156. padding-top:20px;
  157. p:nth-child(1){
  158. line-height:60px;
  159. color: #0045AF;
  160. font-size:16px;
  161. font-weight: 400;
  162. margin:0 12px 0 20px;
  163. }
  164. p:nth-child(2){
  165. font-size: 14px;
  166. font-family: Source Han Sans CN;
  167. font-weight: 400;
  168. color: #999999;
  169. flex: 1;
  170. }
  171. p:nth-child(3){
  172. margin-right:20px;
  173. }
  174. }
  175. .addPage_b{
  176. flex: 1;
  177. display: flex!important;
  178. flex-direction: column;
  179. padding: 34px 80px 0;
  180. box-sizing: border-box;
  181. /*小标题*/
  182. .small_title{
  183. font-size: 16px;
  184. font-family: Source Han Sans CN-Medium, Source Han Sans CN;
  185. font-weight: 500;
  186. color: #333333;
  187. line-height: 24px;
  188. margin-bottom: 24px;
  189. >i{
  190. color: #666;
  191. }
  192. }
  193. .addPage_b_t{
  194. display: flex;
  195. justify-content: space-between;
  196. .addPage_b_t_l{
  197. width: 378px;
  198. .addPage_b_t_l_b{
  199. >li{
  200. margin-bottom: 20px;
  201. >i{
  202. font-size: 14px;
  203. font-family: Source Han Sans CN-Regular, Source Han Sans CN;
  204. font-weight: 400;
  205. color: #333333;
  206. line-height: 14px;
  207. display: inline-block;
  208. vertical-align:top;
  209. }
  210. >i:nth-of-type(1){
  211. color: #333333;
  212. }
  213. >i:nth-of-type(2){
  214. width: 280px;
  215. color: #666666;
  216. line-height: 16px;
  217. }
  218. }
  219. }
  220. }
  221. .addPage_b_t_c{
  222. width: 380px;
  223. .addPage_b_t_c_b{
  224. width: 380px;
  225. height: 222px;
  226. >img{
  227. width: 380px;
  228. height: 222px;
  229. }
  230. .video{
  231. width: 380px;
  232. height: 222px;
  233. }
  234. }
  235. }
  236. .addPage_b_t_r{
  237. .addPage_b_t_r_b{
  238. width: 456px;
  239. >li{
  240. margin-bottom: 20px;
  241. >i{
  242. font-size: 14px;
  243. font-family: Source Han Sans CN-Regular, Source Han Sans CN;
  244. font-weight: 400;
  245. color: #666666;
  246. line-height: 14px;
  247. display: inline-block;
  248. }
  249. >i:nth-of-type(1){
  250. width: 148px;
  251. }
  252. >i:nth-of-type(2){
  253. width: 84px;
  254. }
  255. >i:nth-of-type(3){
  256. width: 224px;
  257. }
  258. }
  259. }
  260. }
  261. }
  262. .addPage_b_b{
  263. margin-top: 84px;
  264. .time-box{
  265. width: 100%;
  266. overflow-y: auto;
  267. >ul{
  268. position: relative;
  269. height:255px;
  270. white-space: nowrap;
  271. display: inline-flex;
  272. >li{
  273. width:242px;
  274. height: 98px;
  275. float: left;
  276. position: relative;
  277. cursor: pointer;
  278. >p{
  279. font-size: 14px;
  280. font-family: Microsoft YaHei;
  281. font-weight: 400;
  282. color: #333333;
  283. line-height: 14px;
  284. margin-bottom: 14px;
  285. }
  286. >p:nth-of-type(1){
  287. }
  288. >p:nth-of-type(2){
  289. color: #666666;
  290. >i{
  291. color: #FF3131;
  292. }
  293. }
  294. >p:nth-of-type(3){
  295. color: #666666;
  296. >i{
  297. color: #333333;
  298. }
  299. }
  300. }
  301. >li:nth-child(2n){
  302. margin-top:160px;
  303. }
  304. >li:before{
  305. content: "";
  306. width: 56px;
  307. height: 56px;
  308. border-radius: 28px;
  309. background: #0183FA;
  310. position: absolute;
  311. left:20%;
  312. margin-left:-64px;
  313. bottom: 0;
  314. bottom:-60px;
  315. z-index: 1;
  316. border: 20px solid #fff;
  317. }
  318. >li:nth-child(2n):before{
  319. bottom: auto;top:-60px;
  320. }
  321. /*风险趋势*/
  322. .risk_trend{
  323. }
  324. /*硬件执行动作*/
  325. .hardware{
  326. margin-top:160px;
  327. }
  328. >li:after{
  329. content: ""; display: block; background: #d2d2d2;height: 1px;width: 100%;position: absolute;left:0;bottom:-32%;;
  330. }
  331. >li:nth-child(2n):after{
  332. top:-32%;
  333. }
  334. >li:last-child:after{
  335. content: ""; display: block; background: none;height: 1px;width: 100%;position: absolute;left:0;bottom:-32%;;
  336. }
  337. >li:first-child:before{
  338. content: "";
  339. width: 26px;
  340. height: 26px;
  341. border: 2px solid #0183FA;
  342. border-radius: 28px;
  343. background: #fff;
  344. position: absolute;
  345. left:20%;
  346. margin-left:-64px;
  347. bottom:-44px;
  348. z-index: 1;
  349. }
  350. >li:last-child:before{
  351. content: "";
  352. width: 26px;
  353. height: 26px;
  354. border: 2px solid #0183FA;
  355. border-radius: 28px;
  356. background: #fff;
  357. position: absolute;
  358. left:20%;
  359. margin-left:-64px;
  360. top:-44px;
  361. z-index: 1;
  362. }
  363. }
  364. }
  365. }
  366. }
  367. }
  368. </style>