<template>
	<view class="site-wrapper">
		
		<view style="height: calc(100vh - 200rpx);overflow:scroll">
			<view class="cu-list menu-avatar">
				<view class="cu-item"  :class="modalName=='move-box-'+ index?'move-cur':''" v-for="(item,index) in controlReport"
				 :key="index" :data-target="'move-box-' + index" @tap="goDeviceDetail(item)">
					<view class="cu-avatar round lg" style="background-image:url(../../../static/controlReportIcon.png)"></view>
					<view class="content" >
						<view class="pro-title">
							<view class="cut">{{item.supervision_title}}</view>
						</view>
						<view class="pro-date ">{{item.create_time}}</view>
					</view>
					<view class="nav-right num">
						<view class="text-grey">
							<text class="icon iconfont margin-right-sm margin-left-lg">&#xe629;</text>
						</view>
					</view>
				</view>
			</view>
		</view>
		
		<!-- 新增按钮start -->
		<view class="plus">
			<image src="../../../static/plus.png" style="width:125rpx;height:125rpx" @tap="goAddPage()"></image>
		</view>
		<!-- 新增按钮end -->
	</view>

	
</template>

<script>
	export default {
		data() {
			return {
				controlReport: [],
				modalName: null,
			};
		},
		
		onLoad:function(option){
			this.getDataList()
			
		},
	
		methods: {
		
			// 页面跳转
			goAddPage(item) {
				uni.navigateTo({
					url: '/pages/eleControl/controlReport/controlReportAdd/controlReportAdd',
				});
			},
			//数据请求
			async getDataList(params = {}) {
				const res = await this.$myRequest({
					url: 'MonitoringReporting/getMonitoringReportingList',
					showLoading: true,
					data: params
				})
				console.log('res.data.data')
				console.log(res.data.data)
				this.controlReport = res.data.data
			}
		}

	}
</script>

<style lang="scss">
	.cu-item{
		height:160rpx!important
	}
</style>
