p-i-video.vue 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232
  1. <template>
  2. <view>
  3. <view class="list_item">
  4. <view v-for="(item,index) in 6" class="item" :class="item_open == index?'item_open':''" @click="change(index)">
  5. <view class="item_title">
  6. <view class="left">
  7. <view class="icon">
  8. <image src="./icon/vhome.png" mode=""></image>
  9. </view>
  10. <view class="name">
  11. 宿舍楼监控
  12. </view>
  13. </view>
  14. <view class="icon">
  15. <uni-icons :type="item_open == index?'arrowup':'arrowdown'"></uni-icons>
  16. </view>
  17. </view>
  18. <view class="item_inner">
  19. <view class="inner_list">
  20. <view class="item" @click="open_drawer()">
  21. <view class="icon">
  22. <image src="./icon/video.png" mode=""></image>
  23. </view>
  24. <view class="name">南煤场区域</view>
  25. </view>
  26. <view class="item">
  27. <view class="icon">
  28. <image src="./icon/video.png" mode=""></image>
  29. </view>
  30. <view class="name">仓下计量区域</view>
  31. </view>
  32. </view>
  33. </view>
  34. </view>
  35. </view>
  36. <uni-drawer ref="drawer" mode="right">
  37. <view class="drawer">
  38. <!-- <view class="top"></view> -->
  39. <view class="title">南煤场区域</view>
  40. <view class="list_item">
  41. <view class="item">
  42. <view class="icon">
  43. <image src="http://jiewei-icon.oss-cn-beijing.aliyuncs.com/default-img.png" mode=""></image>
  44. </view>
  45. <view class="right">
  46. <view class="name">1#公寓楼门厅监控</view>
  47. <view class="btn">查看监控</view>
  48. </view>
  49. </view>
  50. <view class="item">
  51. <view class="icon">
  52. <image src="http://jiewei-icon.oss-cn-beijing.aliyuncs.com/default-img.png" mode=""></image>
  53. </view>
  54. <view class="right">
  55. <view class="name">1#公寓楼</view>
  56. <view class="btn">查看监控</view>
  57. </view>
  58. </view>
  59. </view>
  60. </view>
  61. </uni-drawer>
  62. </view>
  63. </template>
  64. <script>
  65. export default {
  66. data() {
  67. return {
  68. item_open:0,
  69. };
  70. },
  71. methods:{
  72. change(index){
  73. this.item_open = index
  74. },
  75. open_drawer(){
  76. this.$refs.drawer.open();
  77. }
  78. }
  79. }
  80. </script>
  81. <style lang="scss">
  82. .list_item{
  83. box-sizing: border-box;
  84. padding: 20rpx 30rpx;
  85. .item{
  86. box-sizing: border-box;
  87. padding: 0 18rpx;
  88. .item_title{
  89. height: 110rpx;
  90. display: flex;
  91. justify-content: space-between;
  92. align-items: center;
  93. border-bottom: 2rpx solid #f3f3f3;
  94. .left{
  95. display: flex;
  96. align-items: center;
  97. .icon{
  98. image{
  99. width: 83rpx;
  100. height: 83rpx;
  101. }
  102. }
  103. .name{
  104. margin-left: 36rpx;
  105. font-size: 27rpx;
  106. font-family: MicrosoftYaHei;
  107. color: #5A5A5A;
  108. }
  109. }
  110. .icon{
  111. }
  112. }
  113. .item_inner{
  114. display: none;
  115. box-sizing: border-box;
  116. padding: 0 30rpx;
  117. .inner_list{
  118. box-sizing: border-box;
  119. padding: 0 18rpx;
  120. .item{
  121. height: 110rpx;
  122. display: flex;
  123. align-items: center;
  124. border-bottom: 2rpx solid #f3f3f3;
  125. .icon{
  126. image{
  127. width: 83rpx;
  128. height: 83rpx;
  129. }
  130. }
  131. .name{
  132. margin-left: 36rpx;
  133. font-size: 27rpx;
  134. font-family: MicrosoftYaHei;
  135. color: #5A5A5A;
  136. }
  137. }
  138. }
  139. }
  140. }
  141. .item_open{
  142. .item_inner{
  143. display: block;
  144. }
  145. }
  146. }
  147. .drawer{
  148. .top{
  149. height: var(--status-bar-height);
  150. background-color: #009FE8;
  151. }
  152. .title{
  153. box-sizing: border-box;
  154. padding-left: 20rpx;
  155. text-align: left;
  156. border-bottom: 1rpx solid #009FE8;
  157. line-height: 90rpx;
  158. font-size: 29rpx;
  159. font-family: PingFangSC-Regular, PingFang SC;
  160. font-weight: 400;
  161. color: #232627;
  162. }
  163. .list_item{
  164. margin-top: 4rpx;
  165. padding: 0;
  166. .item{
  167. box-sizing: border-box;
  168. padding-top: 33rpx;
  169. padding-bottom: 30rpx;
  170. display: flex;
  171. border-bottom: 2rpx solid #f3f3f3;
  172. .icon{
  173. image{
  174. width: 156rpx;
  175. height: 117rpx;
  176. }
  177. }
  178. .right{
  179. margin-left: 45rpx;
  180. .name{
  181. font-size: 27rpx;
  182. font-family: MicrosoftYaHei;
  183. color: #2C3E50;
  184. line-height: 36rpx;
  185. white-space: nowrap;
  186. overflow: hidden;
  187. text-overflow:ellipsis;
  188. }
  189. .btn{
  190. margin-top: 35rpx;
  191. width: 143rpx;
  192. height: 44rpx;
  193. background: #009FE8;
  194. border-radius: 21rpx;
  195. text-align: center;
  196. line-height: 44rpx;
  197. font-size: 25rpx;
  198. font-family: PingFangSC-Regular, PingFang SC;
  199. font-weight: 400;
  200. color: #FFFFFF;
  201. }
  202. }
  203. }
  204. }
  205. }
  206. </style>