<template>
	<view>
		<!-- <view style="height:30rpx"></view> -->
	

		<view class=" bg-white plan-sec">
			
			<view class="cu-list menu-avatar">
				<view class="cu-item" v-for="(item,index) in getData" :key="index"
					@tap="goInnerList(item)">
					<view class="content" style="left:0!important;width:80%">
						<view class="title">{{item.plan_name}}</view>
						<view class="pro-des  ">
							<view class="text-cut">
								任务完成率：{{item.completion}}
							</view>
						</view>
					</view>
					<view class="nav-right num">
						<view class="text-grey">
							<!-- <span class="online" v-if="item.data3==2">已执行</span>
							<span class="error" v-if="item.data3==1">未执行</span> -->
							<text class="icon iconfont margin-right-xs ">&#xe629;</text>
						</view>
					</view>
				</view>
			</view>
		</view>
	</view>


</template>

<script>

	import json from '../../../data/json.js';
	export default {
		
		data() {
			return {
				inspectList: json.xunJianPlan,
				getData: {},
				
			};
		},
		onLoad: function(option) {
			this.getPlanList({
				'company_code': uni.getStorageSync('selectedCode')
			})
		},

		methods: {
			// 巡检计划列表数据请求
			async getPlanList(params = {}) {
				const res = await this.$myRequest({
					url: 'Inspection/getInspectionList',
					data: params,
					showLoading: true
				})
				this.getData = res.data.data;
				// this.planList = this.getData.point
			},
			goInnerList(item) {
				uni.navigateTo({
					url: "/pages/xunJian/planInnerList/planInnerList?id=" + item.id ,
				})
			}
		}

	}
</script>

<style lang="scss">

</style>
