alarmingList.vue 1.8 KB

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