alarmingList.vue 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. <template>
  2. <view>
  3. <!-- 宫格列表 -->
  4. <view class="section2 section bg-white margin-top-sm margin-bottom-sm">
  5. <view class="cu-list grid col-3 no-border">
  6. <view class="cu-item justify-center align-center" v-for="(item,index) in alarmingSquareList" @tap="goProcessList()"
  7. :key="index">
  8. <image :src="item.imgUrl" style="width:100rpx;height:100rpx"></image>
  9. <view class="cu-tag badge" v-if="item.badge!=0">
  10. <block v-if="item.badge!=1">{{item.badge>99?'99+':item.badge}}</block>
  11. </view>
  12. <text>{{item.name}}</text>
  13. </view>
  14. </view>
  15. </view>
  16. </view>
  17. </template>
  18. <script>
  19. import json from '../../data/json.js';
  20. export default {
  21. data() {
  22. return {
  23. powerMonitoringCount: '',
  24. videoMonitoringCount: '',
  25. companyCode: '',
  26. count2: '',
  27. // 宫格列表数据
  28. alarmingSquareList: json.alarmingSquareList
  29. }
  30. },
  31. onLoad(option) {
  32. // console.log(option.companyCode)
  33. // this.getSiteType(option.companyCode)
  34. },
  35. methods: {
  36. async getSiteType(ming) {
  37. const res = await this.$myRequest({
  38. url: 'IntegratedAlarm/getSiteType',
  39. data: {
  40. "companyCode": ming,
  41. }
  42. })
  43. console.log(res.data)
  44. // this.cuIconList=res.data.data videoMonitoringCount
  45. this.powerMonitoringCount = res.data.data[0].powerMonitoringCount
  46. this.videoMonitoringCount = res.data.data[0].videoMonitoringCount
  47. this.companyCode = res.data.companyCode;
  48. },
  49. // 页面跳转
  50. goProcessList() {
  51. uni.navigateTo({
  52. url: '/pages/processList/processList',
  53. success: res => {},
  54. fail: () => {},
  55. complete: () => {}
  56. });
  57. },
  58. }
  59. }
  60. </script>
  61. <style>
  62. </style>