12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091 |
- <template>
- <view>
- <!-- 宫格列表 -->
- <!-- <square :cuIconList="cuIconList"></square> -->
- <view class="section2 section bg-white margin-top-sm margin-bottom-sm">
- <view class="cu-list grid col-3 no-border">
- <view class="cu-item justify-center align-center" v-for="(item,index) in alarmingSquareList"
- :key="index">
- <image :src="item.imgUrl" style="width:100rpx;height:100rpx"></image>
- <view class="cu-tag badge" v-if="item.badge!=0">
- <block v-if="item.badge!=1">{{item.badge>99?'99+':item.badge}}</block>
- </view>
- <text>{{item.name}}</text>
- </view>
- </view>
- </view>
- </view>
- </template>
- <script>
- import json from '../../data/json.js';
- export default {
- data() {
- return {
- powerMonitoringCount: '',
- videoMonitoringCount: '',
- companyCode: '',
- count2: '',
- // 宫格列表数据
- alarmingSquareList: json.alarmingSquareList
- }
- },
- onLoad(option) {
- // console.log(option.companyCode)
- // this.getSiteType(option.companyCode)
- },
- methods: {
- async getSiteType(ming) {
- const res = await this.$myRequest({
- url: 'IntegratedAlarm/getSiteType',
- data: {
- "companyCode": ming,
- }
- })
- console.log(res.data)
- // this.cuIconList=res.data.data videoMonitoringCount
- this.powerMonitoringCount = res.data.data[0].powerMonitoringCount
- this.videoMonitoringCount = res.data.data[0].videoMonitoringCount
- this.companyCode = res.data.companyCode;
- },
- // 页面跳转
- goProcessList() {
- if (this.powerMonitoringCount) {
- uni.navigateTo({
- url: '/pages/processList/processList?type=1&companyCode=' + this.companyCode + '',
- success: res => {},
- fail: () => {},
- complete: () => {}
- });
- }
- },
- goProcessList2() {
- if (this.videoMonitoringCount) {
- uni.navigateTo({
- url: '/pages/processList/processList?type=2&companyCode=' + this.companyCode + '',
- success: res => {},
- fail: () => {},
- complete: () => {}
- });
- }
- },
- }
- }
- </script>
- <style>
- </style>
|