threeLineDrawer.vue 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170
  1. <template>
  2. <view class="container">
  3. <!-- 抽屜 -->
  4. <uni-drawer :visible="drawerIsShow" :width="width" @close="closeDrawer" style="z-index: 99999;">
  5. <view style="padding:0rpx; background-color:#1A1A1A;">
  6. <view class="picture">
  7. <view class="sisGroup">监视功能分组
  8. <view class="iconImgage">
  9. </view>
  10. </view>
  11. <view v-for="(item,index) in drawerList" :class="[changeGary==index?'statusMonitoring':'item']" :key="index" @click="clickChangeColor(index)">
  12. <div v-if="(index==0)" @tap="goToIndex()">
  13. {{item.name}}
  14. </div>
  15. <div v-if="(index==1)" @tap="common.navTo('/components/monitor/StatusMonitor')">
  16. {{item.name}}
  17. </div>
  18. <div v-if="(index==2)" @tap="common.navTo('/components/monitor/MatrixMonitor')">
  19. {{item.name}}
  20. </div>
  21. <div v-if="(index==3)" @tap="common.navTo('/components/monitor/WindMonitor')">
  22. {{item.name}}
  23. </div>
  24. <div v-if="(index==4)" @tap="common.navTo('/components/monitor/PersonalMonitor')">
  25. {{item.name}}
  26. </div>
  27. </view>
  28. </view>
  29. <view class="cu-bar tabbar bg-black">
  30. <view class="action">
  31. <view class="icon cuIcon-repair text-black">
  32. </view>
  33. <view class="text-black">设置</view>
  34. </view>
  35. <view class="action" style="margin-left: 30px;">
  36. <view class="icon cuIcon-command text-black">
  37. </view>
  38. <view class="text-black">修改密码</view>
  39. </view>
  40. </view>
  41. </view>
  42. </uni-drawer>
  43. </view>
  44. </template>
  45. <script>
  46. import uniDrawer from "@/uni-drawer/uni-drawer.vue"
  47. import uniList from '@/uni-list/uni-list.vue'
  48. import uniListItem from '@/uni-list-item/uni-list-item.vue'
  49. import uniIcons from '@/uni-icons/uni-icons.vue'
  50. export default {
  51. components: {
  52. uniDrawer,
  53. uniList,
  54. uniListItem,
  55. uniIcons
  56. },
  57. data: function() {
  58. return {
  59. drawerIsShow: false,
  60. drawerList: [],
  61. width: 250,
  62. inconList: [],
  63. changeGary: -1,
  64. }
  65. },
  66. methods: {
  67. openDrawer: function(width, drawerList, inconList) {
  68. this.drawerIsShow = true;
  69. this.drawerList = drawerList;
  70. this.width = width;
  71. this.inconList = inconList;
  72. },
  73. closeDrawer: function() {
  74. this.drawerIsShow = false;
  75. },
  76. clickChangeColor: function(index) {
  77. this.changeGary = index;
  78. },
  79. goToIndex:function(){
  80. uni.switchTab({
  81. url: '/pages/index/Index'
  82. });
  83. }
  84. }
  85. }
  86. </script>
  87. <style>
  88. .container{
  89. }
  90. .sisGroup {
  91. width: 90%;
  92. height: 65px;
  93. color: silver;
  94. font-size: 13px;
  95. padding-top: 40px;
  96. margin-left: 5%;
  97. font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", STHeiti, "Microsoft Yahei", Tahoma, Simsun, sans-serif;
  98. }
  99. .statusMonitoring {
  100. background-color: #393939;
  101. width: 90%;
  102. margin-left: 5%;
  103. height: 40px;
  104. margin-top: 10px;
  105. /* text-align: center; */
  106. color: silver;
  107. font-size: 14px;
  108. padding-top: 10px;
  109. padding-left: 10px;
  110. font-family: Helvetica Neue, Helvetica, sans-serif;
  111. }
  112. .picture {
  113. width: 300px;
  114. height: 700px;
  115. background-color: #1A1A1A;
  116. }
  117. .cu-bar {
  118. position: fixed;
  119. top: calc(100% - 50px);
  120. width: 100%;
  121. background-color: #1A1A1A;
  122. }
  123. .icon {
  124. float: left;
  125. }
  126. .text-black {
  127. float: left;
  128. line-height: 28px;
  129. font-size: 15px;
  130. background-color: #1A1A1A;
  131. color: silver;
  132. }
  133. .iconImgage{
  134. width: 29px;
  135. height: 35px;
  136. background-color: red;
  137. margin-left: 82px;
  138. margin-top: -25px;
  139. background-image: url(../../static/picture/i.jpg);
  140. }
  141. .item {
  142. width: 90%;
  143. height: 40px;
  144. margin-top: 10px;
  145. margin-left: 5%;
  146. /* float: right; */
  147. /* margin-right: 10px; */
  148. background-color: #272727;
  149. /* text-align: center; */
  150. color: silver;
  151. font-size: 14px;
  152. padding-top: 10px;
  153. padding-left: 10px;
  154. font-family: Helvetica Neue, Helvetica, sans-serif;
  155. }
  156. </style>