index.vue 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197
  1. <template>
  2. <view class="page" :style="{'min-height':h+'px', 'padding-top':mt+'px'}">
  3. <cus-header title='视频监控'></cus-header>
  4. <div class="nums">
  5. <div class="pre">摄像机:<span class="mr">{{8}}</span></div>
  6. <div class="pre">正常:<span class="zc">{{20}}</span></div>
  7. <div class="pre">离线:<span class="lx">{{1}}</span></div>
  8. </div>
  9. <div class="boxs" v-if="list.length">
  10. <div class="box" v-for="(item,index) in list" :key="index" @tap="toDetail(item)">
  11. <div class="image">
  12. <div class="online" :style="{'background-image':'url('+imgBase+'home/video_example.png)'}" v-if="item.status==1">
  13. <image :src="imgBase+'home/video_play.png'"></image>
  14. </div>
  15. <div class="unline" v-else-if="item.status==2">
  16. <image :src="imgBase+'home/video_unline.png'"></image>
  17. <text>设备离线</text>
  18. </div>
  19. </div>
  20. <div class="info">
  21. <div class="text">{{item.title}}</div>
  22. <div class="tip">设备序列号:{{item.no}}</div>
  23. </div>
  24. </div>
  25. </div>
  26. <template v-else>
  27. <page-empty :height="'calc(100vh - '+(mt+65)+'px)'" marginTop="65px"></page-empty>
  28. </template>
  29. </view>
  30. </template>
  31. <script>
  32. export default {
  33. data(){
  34. return {
  35. list:[
  36. {
  37. title:'研发大厅',
  38. no:'E49771728',
  39. status:1
  40. },
  41. {
  42. title:'前台',
  43. no:'E49771728',
  44. status:2
  45. },
  46. {
  47. title:'室外大门',
  48. no:'E49771728',
  49. status:1
  50. },
  51. {
  52. title:'研发大厅',
  53. no:'E49771728',
  54. status:1
  55. },
  56. {
  57. title:'研发大厅',
  58. no:'E49771728',
  59. status:1
  60. },
  61. {
  62. title:'室外仓库',
  63. no:'E49771728',
  64. status:1
  65. }
  66. ]
  67. }
  68. },
  69. methods:{
  70. toDetail(item){
  71. uni.navigateTo({
  72. url:'/pagesHome/video/detail'
  73. })
  74. }
  75. }
  76. }
  77. </script>
  78. <style scoped lang="less">
  79. .page{
  80. width: 100%;
  81. padding: 0 24rpx 20rpx;
  82. box-sizing: border-box;
  83. background: #F4F8FB;
  84. .nums{
  85. width: 100%;
  86. background: #FFFFFF;
  87. border-radius: 16rpx;
  88. padding: 37rpx 24rpx;
  89. box-sizing: border-box;
  90. display: flex;
  91. margin-top: 20rpx;
  92. .pre{
  93. width: calc(100% / 3);
  94. font-family: PingFangSC, PingFang SC;
  95. font-weight: 400;
  96. font-size: 30rpx;
  97. color: #4E5969;
  98. line-height: 36rpx;
  99. text-align: left;
  100. span{
  101. font-family: PingFang-SC, PingFang-SC;
  102. font-weight: bold;
  103. font-size: 32rpx;
  104. line-height: 36rpx;
  105. text-align: left;
  106. &.mr{
  107. color: #1D2129;
  108. }
  109. &.zc{
  110. color: #14CC8C;
  111. }
  112. &.lx{
  113. color: #F95050;
  114. }
  115. }
  116. }
  117. }
  118. .boxs{
  119. width: 100%;
  120. display: flex;
  121. flex-wrap: wrap;
  122. justify-content: space-between;
  123. .box{
  124. width: calc(50% - 11rpx);
  125. margin-top: 20rpx;
  126. .image{
  127. width: 100%;
  128. height: 230rpx;
  129. border-radius: 16rpx 16rpx 0rpx 0rpx;
  130. &>div{
  131. width: 100%;
  132. height: 100%;
  133. display: flex;
  134. align-items: center;
  135. justify-content: center;
  136. border-radius: 16rpx 16rpx 0rpx 0rpx;
  137. }
  138. .online{
  139. background-size: 100% 100%;
  140. background-repeat: no-repeat;
  141. image{
  142. width: 64rpx;
  143. height: 64rpx;
  144. }
  145. }
  146. .unline{
  147. display: flex;
  148. flex-direction: column;
  149. background: #657588;
  150. image{
  151. width: 48rpx;
  152. height: 48rpx;
  153. }
  154. text{
  155. font-family: PingFangSC, PingFang SC;
  156. font-weight: 400;
  157. font-size: 24rpx;
  158. color: #FFFFFF;
  159. line-height: 36rpx;
  160. margin-top: 20rpx;
  161. }
  162. }
  163. }
  164. .info{
  165. width: 100%;
  166. padding: 24rpx 20rpx;
  167. box-sizing: border-box;
  168. background: #FFFFFF;
  169. .text{
  170. font-family: PingFang-SC, PingFang-SC;
  171. font-weight: bold;
  172. font-size: 30rpx;
  173. color: #1D2129;
  174. line-height: 30rpx;
  175. text-align: left;
  176. overflow: hidden;
  177. text-overflow: ellipsis;
  178. white-space: nowrap;
  179. }
  180. .tip{
  181. font-family: PingFangSC, PingFang SC;
  182. font-weight: 400;
  183. font-size: 24rpx;
  184. color: #999999;
  185. line-height: 24rpx;
  186. text-align: left;
  187. margin-top: 20rpx;
  188. }
  189. }
  190. }
  191. }
  192. }
  193. </style>