alarmingList.vue 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  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" @tap="goProcessList">
  8. <image src="../../static/square-dl.png" style="width:100rpx;height:100rpx"></image>
  9. <view class="cu-tag badge" v-if="powerMonitoringCount!=0">{{powerMonitoringCount>99?'99+':powerMonitoringCount}}
  10. </view>
  11. <text>电力监测</text>
  12. </view>
  13. <view class="cu-item justify-center align-center" @tap="goProcessList2">
  14. <image src="../../static/square-alarm.png" style="width:100rpx;height:100rpx"></image>
  15. <view class="cu-tag badge" v-if="videoMonitoringCount!=0">{{videoMonitoringCount>99?'99+':videoMonitoringCount}}
  16. </view>
  17. <text>视频告警</text>
  18. </view>
  19. </view>
  20. </view>
  21. </view>
  22. </template>
  23. <script>
  24. // import square from '../../components/square/square.vue';
  25. export default {
  26. // components: {
  27. // square
  28. // },
  29. data() {
  30. return {
  31. powerMonitoringCount:'',
  32. videoMonitoringCount:'',
  33. companyCode:'',
  34. count2:'',
  35. // 宫格列表数据
  36. cuIconList: [{
  37. imgUrl:'../../static/square-dl.png',
  38. badge: this.powerMonitoringCount,
  39. name: '电力监测',
  40. redirectUrl:'/pages/processList/processList?type=1'
  41. }, {
  42. imgUrl:'../../static/square-alarm.png',
  43. badge: 20,
  44. name: '视频告警',
  45. redirectUrl:'/pages/processList/processList?type=2'
  46. }],
  47. }
  48. },
  49. onLoad(option) {
  50. uni.setNavigationBarTitle({
  51. title: '站点类型'
  52. });
  53. console.log(option.companyCode)
  54. this.getSiteType(option.companyCode)
  55. },
  56. methods: {
  57. async getSiteType(ming) {
  58. const res= await this.$myRequest({
  59. url:'IntegratedAlarm/getSiteType',
  60. data:{
  61. "companyCode": ming,
  62. }
  63. })
  64. console.log(res.data)
  65. // this.cuIconList=res.data.data videoMonitoringCount
  66. this.powerMonitoringCount= res.data.data[0].powerMonitoringCount
  67. this.videoMonitoringCount= res.data.data[0].videoMonitoringCount
  68. this.companyCode=res.data.companyCode;
  69. },
  70. // 页面跳转
  71. goProcessList() {
  72. uni.navigateTo({
  73. url: '/pages/processList/processList?type=1&companyCode='+this.companyCode+'',
  74. success: res => {},
  75. fail: () => {},
  76. complete: () => {}
  77. });
  78. // if(this.powerMonitoringCount){
  79. // }
  80. },
  81. goProcessList2() {
  82. uni.navigateTo({
  83. url: '/pages/processList/processList?type=2&companyCode='+this.companyCode+'',
  84. success: res => {},
  85. fail: () => {},
  86. complete: () => {}
  87. });
  88. // if(this.videoMonitoringCount){
  89. // }
  90. },
  91. }
  92. }
  93. </script>
  94. <style>
  95. </style>