<template>
	<list-test :bindData="siteListData" :bindUrl="linkUrl" :bindIcon="linkIcon" :bindNum="num" :bindType="type"
	 :bindSiteName="siteName" :bindDetailUrl="detailUrl" :bindSiteListRes="siteListRes">
	</list-test>

</template>

<script>
	import json from '../../data/json.js';

	export default {

		data() {
			return {
				siteListRes: 0,
				type: 1,
				linkUrl: '/pages/alarmingList/alarmingList',
				linkIcon: '../../static/site-icon-alarm.png',
				siteListData: [],
				num: ' 共3个未处理告警',
				detailUrl: '/pages/siteDetail/siteDetail',
				siteName: ''
			};
		},


		onPullDownRefresh() {
			console.log('refresh');
			setTimeout(function() {
				uni.stopPullDownRefresh();
			}, 1000);
		},
		computed: {

		},

		mounted() {

		},

		onLoad() {
			this.getDataList({})
		},

		methods: {
			async getDataList(params = {}) {
				const res = await this.$myRequest({
					url: 'IntegratedAlarm/getSiteList',
					showLoading: true,
					data: params
				})
				console.log(res.data.data)
				this.siteListData = res.data.data
				this.siteListRes = 1;
			}
		}

	}
</script>

<style>

</style>
