<template>
	<view>
		<view class="margin bg-white plan-sec text-center">
			<view class="plan-tit padding-top-lg">任务名称：ui测试</view>
			<chart></chart>
		</view>
		
		<view class="margin bg-white plan-sec">
			<view class="info-tit margin-left-xs">
				<text class="cuIcon-titles margin-right-xs"></text>
				维保详情
			</view>
			<view class="cu-list menu-avatar">
				<view class="cu-item deviceTypeItem" v-for="(item,index) in inspectList" :key="index" @tap="goDetailPage(item)">
					<view class="content" style="left:0!important;width:80%">
						<view class="title">{{item.title}}</view>
					</view>
					<view class="nav-right num">
						<view class="text-grey">
							<span class="online" v-if="item.status==0">已执行</span>
							<span class="error" v-if="item.status==1">未执行</span>
							<text class="icon iconfont margin-right-xs ">&#xe629;</text>
						</view>
					</view>
				</view>
			</view>
		</view>
	</view>
	
	
</template>

<script>
	import chart from './components/chart.vue';
	import json from '../../../data/json.js';
	export default {
		components: {
			chart
		},
		data() {
			return {
			inspectList: json.weiBaoPlan,

			};
		},
		onLoad:function(option){

		},
		
		methods: {
			goDetailPage(item){
				if(item.status){
					uni.navigateTo({
						url:  "/pages/weiBao/planDetail/planDetail"
					})
				}else{
					uni.navigateTo({
						url:  "/pages/weiBao/planDetailDone/planDetailDone"
					})
				}
				
			}

		}

	}
</script>

<style lang="scss">
	page{
		background-color:#F4F5F7;
	}
	
	
</style>
