index.vue 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242
  1. <template>
  2. <view style="background:#f1f1f1;height:1500rpx" class="padding-sm">
  3. <view class="section1 section bg-white padding-xs">
  4. <view class=" static-tabs grid margin-bottom text-center col-3 margin-top-sm margin-bottom-sm">
  5. <view class="padding-sm active">报警信息统计</view>
  6. <view class="padding-sm">数据等级统计</view>
  7. <view class="padding-sm">设备运行转态</view>
  8. </view>
  9. <view class="time text-center">统计时段:2020年09月12日~2020年11月11日
  10. </view>
  11. <view class="echarts padding">
  12. <chart></chart>
  13. </view>
  14. </view>
  15. <!-- 宫格列表 -->
  16. <view class="section2 section bg-white margin-top-sm margin-bottom-sm">
  17. <view class="cu-list grid" :class="['col-' + gridCol,gridBorder?'':'no-border']">
  18. <view class="cu-item" v-for="(item,index) in cuIconList" :key="index" v-if="index<gridCol*2">
  19. <view :class="['cuIcon-' + item.cuIcon,'text-' + item.color]">
  20. <view class="cu-tag badge" v-if="item.badge!=0">
  21. <block v-if="item.badge!=1">{{item.badge>99?'99+':item.badge}}</block>
  22. </view>
  23. </view>
  24. <text>{{item.name}}</text>
  25. </view>
  26. </view>
  27. </view>
  28. <view class="box ">
  29. <view class="cu-bar tabbar bg-white">
  30. <view class="action" @click="NavChange" data-cur="login">
  31. <view class="cuIcon-cu-image">
  32. <span class="icon iconfont">&#xe64e;</span>
  33. </view>
  34. <view class="text-green">主页</view>
  35. </view>
  36. <view class="action">
  37. <view class="cuIcon-cu-image">
  38. <span class="icon iconfont">&#xe606;</span>
  39. </view>
  40. <view class="text-gray">消息</view>
  41. </view>
  42. <view class="action">
  43. <view class="cuIcon-cu-image">
  44. <span class="icon iconfont">&#xe858;</span>
  45. <view class="cu-tag badge">99</view>
  46. </view>
  47. <view class="text-gray">分析</view>
  48. </view>
  49. <view class="action">
  50. <view class="cuIcon-cu-image">
  51. <span class="icon iconfont">&#xe606;</span>
  52. <view class="cu-tag badge"></view>
  53. </view>
  54. <view class="text-gray">设置</view>
  55. </view>
  56. </view>
  57. </view>
  58. </view>
  59. </template>
  60. <script>
  61. import chart from './components/chart/chart.vue';
  62. export default {
  63. components: {
  64. chart
  65. },
  66. data() {
  67. return {
  68. title: 'Hello222',
  69. InputBottom: 0,
  70. // 宫格列表
  71. cuIconList: [{
  72. cuIcon: 'cardboardfill',
  73. color: 'red',
  74. badge: 120,
  75. name: 'VR'
  76. }, {
  77. cuIcon: 'recordfill',
  78. color: 'orange',
  79. badge: 1,
  80. name: '录像'
  81. }, {
  82. cuIcon: 'picfill',
  83. color: 'yellow',
  84. badge: 0,
  85. name: '图像'
  86. }, {
  87. cuIcon: 'noticefill',
  88. color: 'olive',
  89. badge: 22,
  90. name: '通知'
  91. }, {
  92. cuIcon: 'upstagefill',
  93. color: 'cyan',
  94. badge: 0,
  95. name: '排行榜'
  96. }, {
  97. cuIcon: 'clothesfill',
  98. color: 'blue',
  99. badge: 0,
  100. name: '皮肤'
  101. }],
  102. modalName: null,
  103. gridCol: 3,
  104. gridBorder: false,
  105. menuBorder: false,
  106. menuArrow: false,
  107. menuCard: false,
  108. skin: false,
  109. listTouchStart: 0,
  110. listTouchDirection: null,
  111. };
  112. },
  113. onLoad() {},
  114. methods: {
  115. InputFocus(e) {
  116. this.InputBottom = e.detail.height
  117. },
  118. InputBlur(e) {
  119. this.InputBottom = 0
  120. }
  121. }
  122. }
  123. </script>
  124. <style>
  125. body {
  126. background: #f1f1f1 !important;
  127. }
  128. .switch-sex::after {
  129. content: "\e716";
  130. }
  131. .switch-sex::before {
  132. content: "\e7a9";
  133. }
  134. .switch-music::after {
  135. content: "\e66a";
  136. }
  137. .switch-music::before {
  138. content: "\e6db";
  139. }
  140. /*
  141. .section {
  142. width: 100%;
  143. heght: 100rpx;
  144. background: pink
  145. } */
  146. .static-tabs {
  147. border-radius: 50rpx;
  148. border: 1rpx solid #4074E7;
  149. }
  150. .static-tabs>view {
  151. color: #4074E7;
  152. font-size: 30rpx;
  153. }
  154. .static-tabs>view.active {
  155. color: #fff;
  156. background: #4074E7
  157. }
  158. .static-tabs>view:first-child {
  159. border-top-left-radius: 50rpx;
  160. border-bottom-left-radius: 50rpx;
  161. }
  162. .static-tabs>view:nth-child(2) {
  163. border-left: 1px solid #4074E7;
  164. border-right: 1px solid #4074E7
  165. }
  166. .static-tabs>view:last-child {
  167. border-top-right-radius: 50rpx;
  168. border-bottom-right-radius: 50rpx;
  169. }
  170. /* 检测时间 */
  171. .time {
  172. border-radius: 50rpx;
  173. background: #FAFCFF;
  174. border: 1px solid #E8F1FF;
  175. padding: 20rpx;
  176. color: #666666;
  177. font-size: 28rpx;
  178. }
  179. .echarts {
  180. height: 630rpx;
  181. background: pink;
  182. display:inline-block;
  183. width:100%
  184. }
  185. /* 底部 */
  186. .box {
  187. position: fixed;
  188. bottom: 0;
  189. width: 100%;
  190. border-top: 1px solid pink
  191. }
  192. .cuIcon-cu-image .iconfont {
  193. width: 38rpx;
  194. height: 38rpx;
  195. display: inline-block;
  196. margin-bottom: 10rpx;
  197. }
  198. .text-gray {
  199. font-size: 26rpx;
  200. }
  201. </style>