detailsPage.vue 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379
  1. <template>
  2. <div class="infoPage">
  3. <div class="title-box">
  4. <p>详情</p>
  5. <p class="inquire-button-one">处理</p>
  6. <p class="reset-button-one" @click="backPage">返回</p>
  7. </div>
  8. <div class="bottom-max-bug-box scrollbar-box">
  9. <div class="left-max-big-box scrollbar-box">
  10. <div class="text-box">
  11. <p>报警时间:</p>
  12. <p>内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容</p>
  13. </div>
  14. <div class="text-box">
  15. <p>报警内容:</p>
  16. <p></p>
  17. </div>
  18. <div class="text-box">
  19. <p>学院:</p>
  20. <p></p>
  21. </div>
  22. <div class="text-box">
  23. <p>位置:</p>
  24. <p></p>
  25. </div>
  26. <div class="text-box">
  27. <p>气瓶规格:</p>
  28. <p></p>
  29. </div>
  30. <div class="text-box">
  31. <p>气体余量:</p>
  32. <p></p>
  33. </div>
  34. <div class="text-box">
  35. <p>当前使用人:</p>
  36. <p></p>
  37. </div>
  38. <div class="text-box">
  39. <p>气瓶所有人:</p>
  40. <p></p>
  41. </div>
  42. <div class="img-max-box">
  43. <img v-for="(url,index) in imgList" :key="index"
  44. :src="url" @click="lockImg(url)">
  45. </div>
  46. </div>
  47. <div class="right-max-big-box">
  48. <div class="right-top-max-big-box">
  49. <p class="right-title-p">查看监控</p>
  50. <div class="right-top-button-box scrollbar-x-box">
  51. <p :class="topButtonIndex == index?'buttonColorA':'buttonColorB'"
  52. @click="topButtonClick(index)"
  53. v-for="(item,index) in topButton" :key="index">{{item.name}}</p>
  54. </div>
  55. <video class="video-box" id="alarmRecordDetailsPageVideo" ref="videoRef" autoplay controls muted width="454px" height="252px" :poster="videoCover"></video>
  56. </div>
  57. <div class="right-bottom-max-big-box">
  58. <p class="right-title-p">语音广播</p>
  59. <div class="right-bottom-button-max-box">
  60. <p class="right-bottom-button-title-p">选择播放喇叭</p>
  61. <div class="right-bottom-button-box scrollbar-x-box">
  62. <p :class="item.type?'buttonColorA':'buttonColorB'"
  63. @click="bottomButtonClick(item)"
  64. v-for="(item,index) in bottomButton" :key="index">{{item.name}}</p>
  65. </div>
  66. </div>
  67. <div class="right-bottom-input-box">
  68. <p>播报内容</p>
  69. <el-input
  70. type="textarea"
  71. resize="none"
  72. :rows="4"
  73. style="width:668px;height:100px;"
  74. v-model="text"
  75. placeholder="请输入播报内容"
  76. maxLength="50"
  77. clearable/>
  78. </div>
  79. <p class="inquire-button-one right-bottom-button" @click="releaseButton">发布</p>
  80. </div>
  81. </div>
  82. </div>
  83. <!--查看图片-->
  84. <el-dialog title="抓拍照片" :visible.sync="imgOpen" width="1200px" append-to-body>
  85. <div class="scrollbar-box" style="width:1160px;margin:0 auto;max-height:700px;overflow-y: scroll">
  86. <img :src="imgUrl" style="display:block;max-width:1156px;margin:0 auto;">
  87. </div>
  88. </el-dialog>
  89. </div>
  90. </template>
  91. <script>
  92. import { handle } from "@/api/medicUniversity-3_1/index";
  93. export default {
  94. name: "infoPage",
  95. props:{
  96. propsInfoData:{},
  97. },
  98. data() {
  99. return {
  100. imgList:[
  101. 'https://img2.baidu.com/it/u=3596352791,3086982929&fm=253&fmt=auto&app=120&f=JPEG?w=1280&h=800',
  102. 'https://img2.baidu.com/it/u=3596352791,3086982929&fm=253&fmt=auto&app=120&f=JPEG?w=1280&h=800',
  103. 'https://img2.baidu.com/it/u=3596352791,3086982929&fm=253&fmt=auto&app=120&f=JPEG?w=1280&h=800',
  104. 'https://img2.baidu.com/it/u=3596352791,3086982929&fm=253&fmt=auto&app=120&f=JPEG?w=1280&h=800',
  105. ],
  106. videoCover:window.location.href.split('://')[0]+'://' + this.judgmentNetworkReturnAddress() + "/admin/" + localStorage.getItem('videoCover'),
  107. topButtonIndex:0,
  108. topButton:[
  109. {id:'1',name:'走廊摄像头1'},{id:'2',name:'走廊摄像头2'},{id:'3',name:'走廊摄像头3'},
  110. {id:'1',name:'走廊摄像头1'},{id:'2',name:'走廊摄像头2'},{id:'3',name:'走廊摄像头3'},
  111. {id:'1',name:'走廊摄像头1'},{id:'2',name:'走廊摄像头2'},{id:'3',name:'走廊摄像头3'},
  112. ],
  113. bottomButtonIndex:0,
  114. bottomButton:[
  115. {id:'1',name:'喇叭1',type:false},{id:'2',name:'喇叭1',type:false},
  116. {id:'3',name:'喇叭1',type:false},{id:'4',name:'喇叭1',type:false},
  117. {id:'5',name:'喇叭1',type:false},{id:'6',name:'喇叭1',type:false},
  118. {id:'7',name:'喇叭1',type:false},{id:'8',name:'喇叭1',type:false},
  119. {id:'9',name:'喇叭1',type:false},{id:'10',name:'喇叭1',type:false},
  120. ],
  121. text:"",
  122. //查看图片
  123. imgOpen:false,
  124. imgUrl:"",
  125. }
  126. },
  127. created() {
  128. },
  129. mounted(){
  130. },
  131. methods:{
  132. //发布按钮
  133. releaseButton(){
  134. let self = this;
  135. let num = 0;
  136. for(let i=0;i<self.bottomButton.length;i++){
  137. if(self.bottomButton[i].type){
  138. num++
  139. }
  140. }
  141. if(num == 0){
  142. this.msgError('请选择喇叭')
  143. return
  144. }
  145. if(!this.text){
  146. this.msgError('请输入播报内容')
  147. return
  148. }
  149. },
  150. //查看图片
  151. lockImg(url){
  152. console.log("url",url);
  153. this.imgUrl = url;
  154. this.imgOpen = true;
  155. },
  156. // 监控选择
  157. topButtonClick(type){
  158. if(this.topButtonIndex != type){
  159. this.topButtonIndex = type;
  160. }
  161. },
  162. //喇叭选择
  163. bottomButtonClick(item){
  164. item.type = !item.type
  165. },
  166. //处理报警记录
  167. handle(){
  168. let self = this;
  169. if(self.propsInfoData.buttonType != 1){
  170. self.msgError('只有该实验室负责人可以处理')
  171. return
  172. }
  173. this.$confirm('确定要处理吗?', "警告", {
  174. confirmButtonText: "确定",
  175. cancelButtonText: "取消",
  176. type: "warning"
  177. }).then(function() {
  178. handle({id:self.propsInfoData.id}).then(response => {
  179. self.msgSuccess(response.msg);
  180. self.$set(self.propsInfoData,'handlingStatus',2);
  181. self.$set(self.propsInfoData,'operate','已处理');
  182. })
  183. }).then(() => {
  184. }).catch(() => {});
  185. },
  186. backPage(){
  187. this.$parent.pageToggle(1);
  188. },
  189. }
  190. }
  191. </script>
  192. <style scoped lang="scss">
  193. .infoPage{
  194. flex:1;
  195. display: flex;
  196. flex-direction: column;
  197. overflow: hidden;
  198. border:1px solid #dedede;
  199. p{
  200. margin:0;
  201. padding:0;
  202. }
  203. .title-box{
  204. display: flex;
  205. height:90px;
  206. border-bottom: 1px solid #D8D8D8;
  207. p:nth-child(1){
  208. flex:1;
  209. font-size:16px;
  210. line-height:90px;
  211. margin-left:18px;
  212. color:#0045AF;
  213. }
  214. p:nth-child(2),p:nth-child(3){
  215. margin:25px 25px 0 0;
  216. }
  217. }
  218. .bottom-max-bug-box{
  219. font-weight: 500;
  220. flex:1;
  221. padding:20px 79px;
  222. .left-max-big-box{
  223. width:559px;
  224. height:750px;
  225. display: inline-block;
  226. margin-right:22px;
  227. border-radius:10px;
  228. box-shadow: 0 0 8px 1px rgba(0, 0, 0, 0.1) !important;
  229. padding:28px 28px 0 28px;
  230. .text-box{
  231. display: flex;
  232. font-size:14px;
  233. line-height:20px;
  234. margin-bottom:28px;
  235. p:nth-child(1){
  236. width:100px;
  237. text-align: right;
  238. color:#333;
  239. }
  240. p:nth-child(2){
  241. flex: 1;
  242. color:#666;
  243. margin-left:6px;
  244. }
  245. }
  246. .img-max-box{
  247. img{
  248. cursor: pointer;
  249. display: inline-block;
  250. width:240px;
  251. height:160px;
  252. margin-bottom:14px;
  253. }
  254. img:nth-child(odd){
  255. margin-right:18px;
  256. }
  257. }
  258. }
  259. .right-max-big-box{
  260. width:839px;
  261. display: inline-block;
  262. .right-top-max-big-box{
  263. height:414px;
  264. overflow: hidden;
  265. border-radius:10px;
  266. box-shadow: 0 0 8px 1px rgba(0, 0, 0, 0.1) !important;
  267. .right-title-p{
  268. font-size:16px;
  269. color:#333;
  270. line-height:24px;
  271. margin:18px 0 12px 24px;
  272. }
  273. .right-top-button-box{
  274. margin:0 25px;
  275. width:788px;
  276. height: 42px;
  277. p:nth-child(1){
  278. margin:0;
  279. }
  280. p{
  281. display: inline-block;
  282. margin:0 0 0 18px;
  283. padding:0 18px;
  284. line-height:30px;
  285. border-radius:6px;
  286. font-size:14px;
  287. cursor: pointer;
  288. }
  289. .buttonColorA{
  290. border:1px solid #0183FA;
  291. background:#0183FA;
  292. color:#fff;
  293. }
  294. .buttonColorB{
  295. border:1px solid #E0E0E0;
  296. color:#333;
  297. }
  298. }
  299. .video-box{
  300. height:252px;
  301. width:454px;
  302. margin:34px 192px;
  303. }
  304. }
  305. .right-bottom-max-big-box{
  306. margin-top:20px;
  307. height:316px;
  308. overflow: hidden;
  309. border-radius:10px;
  310. box-shadow: 0 0 8px 1px rgba(0, 0, 0, 0.1) !important;
  311. .right-title-p{
  312. font-size:16px;
  313. color:#333;
  314. line-height:24px;
  315. margin:18px 0 12px 24px;
  316. }
  317. .right-bottom-button-max-box{
  318. margin-top:25px;
  319. display: flex;
  320. .right-bottom-button-title-p{
  321. line-height:32px;
  322. margin-left:25px;
  323. font-size:16px;
  324. margin-right:25px;
  325. }
  326. .right-bottom-button-box{
  327. width:668px;
  328. height: 42px;
  329. p:nth-child(1){
  330. margin:0;
  331. }
  332. p{
  333. display: inline-block;
  334. margin-left:18px;
  335. padding:0 30px;
  336. line-height:30px;
  337. border-radius:6px;
  338. font-size:14px;
  339. cursor: pointer;
  340. }
  341. .buttonColorA{
  342. border:1px solid #0183FA;
  343. background:#0183FA;
  344. color:#fff;
  345. }
  346. .buttonColorB{
  347. border:1px solid #E0E0E0;
  348. color:#333;
  349. }
  350. }
  351. }
  352. .right-bottom-input-box{
  353. margin-top:30px;
  354. display: flex;
  355. p{
  356. line-height:32px;
  357. margin-left:25px;
  358. font-size:16px;
  359. text-align: right;
  360. width:98px;
  361. margin-right:24px;
  362. }
  363. }
  364. .right-bottom-button{
  365. width:100px;
  366. line-height:40px;
  367. text-align: center;
  368. margin:15px 370px;
  369. }
  370. }
  371. }
  372. }
  373. }
  374. </style>