<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" @tap="goProcessList()"
				 :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() {
					uni.navigateTo({
						url: '/pages/processList/processList',
						success: res => {},
						fail: () => {},
						complete: () => {}
					});
			},
			

		}
	}
</script>

<style>

</style>
