detail.vue 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223
  1. <template>
  2. <view class="page" :style="{'min-height':h+'px', 'padding-top':mt+'px'}">
  3. <cus-header title='视频监控'></cus-header>
  4. <div class="video" :style="{'top':mt+'px'}">
  5. <div class="datetime" :style="{'top':mt+'px'}">{{dateTime}}</div>
  6. <div class="btns" :style="{'top':(mt+165)+'px'}">
  7. <div class="onoff">
  8. <image :src="imgBase+'home/video_onoff.png'"></image>
  9. </div>
  10. <div class="voice">
  11. <image :src="imgBase+'home/video_voice.png'"></image>
  12. </div>
  13. <div class="fhd">
  14. <image class="fhd1" :src="imgBase+'home/video_fhd1.png'"></image>
  15. <image class="fhd2" :src="imgBase+'home/video_fhd2.png'"></image>
  16. </div>
  17. <div class="fullscreen">
  18. <image :src="imgBase+'home/video_fullscreen.png'"></image>
  19. </div>
  20. </div>
  21. </div>
  22. <div class="list" v-if="list.length">
  23. <div class="item" v-for="(item,index) in list" :key="index">
  24. <div class="left">
  25. <image :src="imgBase+'home/video_person.png'"></image>
  26. <div class="info">
  27. <text>{{item.title}}</text>
  28. <text class="time">{{item.time}}</text>
  29. </div>
  30. </div>
  31. <div class="right">
  32. <image :src="item.img" v-if="item.img"></image>
  33. </div>
  34. </div>
  35. </div>
  36. </view>
  37. </template>
  38. <script>
  39. var timer = null;
  40. export default {
  41. data(){
  42. return {
  43. dateTime:'',
  44. list:[
  45. {
  46. title:'画面变化',
  47. time:'16:01',
  48. img:''
  49. },
  50. {
  51. title:'画面变化',
  52. time:'15:01',
  53. img:''
  54. },
  55. {
  56. title:'画面变化',
  57. time:'14:01',
  58. img:''
  59. },
  60. {
  61. title:'画面变化',
  62. time:'13:01',
  63. img:''
  64. }
  65. ]
  66. }
  67. },
  68. created() {
  69. this.dateTime = this.getCurrentTime();
  70. },
  71. onLoad() {
  72. timer = setInterval(()=>{
  73. this.dateTime = this.getCurrentTime();
  74. },1000)
  75. },
  76. onUnload() {
  77. clearInterval(timer);
  78. },
  79. methods:{
  80. getCurrentTime(){
  81. let d = new Date();
  82. let t = [d.getMonth()+1,d.getDate(),d.getHours(),d.getMinutes(),d.getSeconds()];
  83. t = t.map(i=>(i+'').padStart(2,0));
  84. return d.getFullYear()+'/'+t[0]+'/'+t[1]+' '+t[2]+':'+t[3]+':'+t[4]
  85. }
  86. }
  87. }
  88. </script>
  89. <style scoped lang="less">
  90. .page{
  91. width: 100%;
  92. background: #F4F8FB;
  93. box-sizing: border-box;
  94. .video{
  95. width: 100%;
  96. height: 423rpx;
  97. background: #1D2129;
  98. position: fixed;
  99. left: 0;
  100. .datetime{
  101. width: 228rpx;
  102. height: 32rpx;
  103. background: #333333;
  104. font-family: AlibabaPuHuiTi_2_55_Regular;
  105. font-size: 18rpx;
  106. color: #FFFFFF;
  107. line-height: 32rpx;
  108. text-align: center;
  109. position: fixed;
  110. left: 0;
  111. }
  112. .btns{
  113. width: 100%;
  114. display: flex;
  115. align-items: center;
  116. position: fixed;
  117. left: 0;
  118. z-index: 3;
  119. &>div{
  120. width: 25%;
  121. height: 44rpx;
  122. display: flex;
  123. align-items: center;
  124. justify-content: center;
  125. }
  126. .onoff{
  127. image{
  128. width: 40rpx;
  129. height: 44rpx;
  130. }
  131. }
  132. .voice{
  133. image{
  134. width: 44rpx;
  135. height: 44rpx;
  136. }
  137. }
  138. .fhd{
  139. position: relative;
  140. &>image{
  141. position: absolute;
  142. }
  143. .fhd1{
  144. width: 48rpx;
  145. height: 36rpx;
  146. z-index: 1;
  147. }
  148. .fhd2{
  149. width: 30rpx;
  150. height: 12rpx;
  151. z-index: 2;
  152. }
  153. }
  154. .fullscreen{
  155. image{
  156. width: 38rpx;
  157. height: 38rpx;
  158. }
  159. }
  160. }
  161. }
  162. .list{
  163. width: 100%;
  164. padding: 0 24rpx;
  165. box-sizing: border-box;
  166. margin-top: 423rpx;
  167. overflow: hidden;
  168. .item{
  169. width: 100%;
  170. padding: 22rpx 23rpx 22rpx 30rpx;
  171. box-sizing: border-box;
  172. background: #FFFFFF;
  173. border-radius: 16rpx;
  174. margin-top: 20rpx;
  175. display: flex;
  176. align-items: center;
  177. justify-content: space-between;
  178. .left{
  179. display: flex;
  180. align-items: center;
  181. &>image{
  182. width: 58rpx;
  183. height: 58rpx;
  184. }
  185. .info{
  186. display: flex;
  187. flex-direction: column;
  188. padding-left: 30rpx;
  189. text{
  190. font-family: PingFang-SC, PingFang-SC;
  191. font-weight: bold;
  192. font-size: 30rpx;
  193. color: #1D2129;
  194. line-height: 30rpx;
  195. text-align: left;
  196. &.time{
  197. font-size: 24rpx;
  198. color: #999999;
  199. line-height: 24rpx;
  200. margin-top: 20rpx;
  201. }
  202. }
  203. }
  204. }
  205. .right{
  206. width: 202rpx;
  207. height: 122rpx;
  208. background: #657588;
  209. border-radius: 16rpx;
  210. image{
  211. width: 100%;
  212. height: 1005px;
  213. border-radius: 16rpx;
  214. }
  215. }
  216. }
  217. }
  218. }
  219. </style>