alarmingList.vue 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  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"
  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. if (this.powerMonitoringCount) {
  53. uni.navigateTo({
  54. url: '/pages/processList/processList?type=1&companyCode=' + this.companyCode + '',
  55. success: res => {},
  56. fail: () => {},
  57. complete: () => {}
  58. });
  59. }
  60. },
  61. goProcessList2() {
  62. if (this.videoMonitoringCount) {
  63. uni.navigateTo({
  64. url: '/pages/processList/processList?type=2&companyCode=' + this.companyCode + '',
  65. success: res => {},
  66. fail: () => {},
  67. complete: () => {}
  68. });
  69. }
  70. },
  71. }
  72. }
  73. </script>
  74. <style>
  75. </style>