detailsPage.vue 11 KB

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