index.vue 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190
  1. <template>
  2. <view style="background:#f1f1f1;height:1450rpx" 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 ',Inv==0?'active':'']" @click="Inv=0">报警信息统计</view>
  6. <view :class="['padding-sm ',Inv==1?'active':'']" @click="Inv=1">数据等级统计</view>
  7. <view :class="['padding-sm ',Inv==2?'active':'']" @click="Inv=2">设备运行状态</view>
  8. </view>
  9. <view class="time text-center">统计时段:2020年09月12日~2020年11月11日
  10. </view>
  11. <view>
  12. <view v-if="Inv == 0">
  13. <!-- <chart></chart> -->
  14. <chart4></chart4>
  15. </view>
  16. <view v-if="Inv == 1">
  17. <chart2></chart2>
  18. </view>
  19. <view v-if="Inv == 2" class="chart3-box">
  20. <ul class="chart3-icon">
  21. <li><image src="../../static/chart3-1.png" style="width:64rpx;height:64rpx"></image></li>
  22. <li><image src="../../static/chart3-2.png" style="width:64rpx;height:64rpx"></image></li>
  23. <li><image src="../../static/chart3-3.png" style="width:64rpx;height:64rpx"></image></li>
  24. <li><image src="../../static/chart3-4.png" style="width:64rpx;height:64rpx"></image></li>
  25. <li><image src="../../static/chart3-5.png" style="width:64rpx;height:64rpx"></image></li>
  26. </ul>
  27. <chart3>
  28. </chart3>
  29. </view>
  30. </view>
  31. </view>
  32. <!-- 宫格列表 -->
  33. <square :cuIconList="cuIconList"></square>
  34. <!-- <view class="section2 section bg-white margin-top-sm margin-bottom-sm">
  35. <view class="cu-list grid col-3 no-border">
  36. <view class="cu-item justify-center align-center" @tap="goSiteList" v-for="(item,index) in cuIconList" :key="index">
  37. <image :src="`${item.imgUrl}`" style="width:100rpx;height:100rpx"></image>
  38. <view class="cu-tag badge" v-if="item.badge!=0">
  39. <block v-if="item.badge!=1">{{item.badge>99?'99+':item.badge}}</block>
  40. </view>
  41. <text>{{item.name}}</text>
  42. </view>
  43. </view>
  44. </view> -->
  45. </view>
  46. </template>
  47. <script>
  48. import chart from './components/chart/chart.vue';
  49. import chart2 from './components/chart2/chart2.vue';
  50. import chart3 from './components/chart3/chart3.vue';
  51. import chart4 from './components/chart4/chart4.vue';
  52. // import square from '../../components/square/square.vue';
  53. export default {
  54. components: {
  55. chart,
  56. chart2,
  57. chart3,
  58. chart4
  59. // square
  60. },
  61. data() {
  62. return {
  63. // 宫格列表数据
  64. cuIconList: [{
  65. imgUrl:'../../static/square1.png',
  66. badge: 120,
  67. name: '综合报警',
  68. redirectUrl:'/pages/siteList/siteList?type=1'
  69. }, {
  70. imgUrl:'../../static/square2.png',
  71. badge: 0,
  72. name: '运行监测',
  73. redirectUrl:'/pages/siteList/siteList?type=2'
  74. }, {
  75. imgUrl:'../../static/square-wb.png',
  76. badge: 0,
  77. name: '维保',
  78. redirectUrl:''
  79. }, {
  80. imgUrl:'../../static/square-bx.png',
  81. badge: 22,
  82. name: '报修',
  83. redirectUrl:''
  84. }, {
  85. imgUrl:'../../static/square-rl.png',
  86. badge: 0,
  87. name: '人脸识别',
  88. redirectUrl:''
  89. }, {
  90. imgUrl:'../../static/square-xj.png',
  91. badge: 0,
  92. badge: 0,
  93. name: '巡检',
  94. redirectUrl:''
  95. }, {
  96. imgUrl:'../../static/square-bz.png',
  97. badge: 0,
  98. badge: 0,
  99. name: '风险保障',
  100. redirectUrl:''
  101. }],
  102. Inv: 0,
  103. };
  104. },
  105. onLoad() {},
  106. methods: {
  107. changeTab(Inv) {
  108. that.navIdx = Inv;
  109. },
  110. }
  111. }
  112. </script>
  113. <style>
  114. body {
  115. background: #f1f1f1 !important;
  116. }
  117. .static-tabs {
  118. border-radius: 50rpx;
  119. border: 1rpx solid #4074E7;
  120. }
  121. .static-tabs>view {
  122. color: #4074E7;
  123. font-size: 30rpx;
  124. }
  125. .static-tabs>view.active {
  126. color: #fff;
  127. background: #4074E7
  128. }
  129. .static-tabs>view:first-child {
  130. border-top-left-radius: 50rpx;
  131. border-bottom-left-radius: 50rpx;
  132. }
  133. .static-tabs>view:nth-child(2) {
  134. border-left: 1px solid #4074E7;
  135. border-right: 1px solid #4074E7
  136. }
  137. .static-tabs>view:last-child {
  138. border-top-right-radius: 50rpx;
  139. border-bottom-right-radius: 50rpx;
  140. }
  141. /* 检测时间 */
  142. .time {
  143. border-radius: 50rpx;
  144. background: #FAFCFF;
  145. border: 1px solid #E8F1FF;
  146. padding: 20rpx;
  147. color: #666666;
  148. font-size: 28rpx;
  149. }
  150. .chart3-box{
  151. position:relative
  152. }
  153. .chart3-icon{
  154. position:absolute;
  155. top:60rpx;
  156. left:30rpx
  157. }
  158. .chart3-icon li{
  159. padding-top:25rpx
  160. }
  161. ul,li{ padding:0;margin:0;list-style:none}
  162. </style>