threeLineDrawer.vue 3.6 KB

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