<template>
	<view>
		<view class="uni-list">
			 <view class="uni-list-cell" hover-class="uni-list-cell-hover" v-for="(item,index) in list" :key="index">
				  <view class="uni-list-cell-navigate uni-navigate-right" @click="neivate(item.navUrl)">
					   {{item.name}}
				  </view>
			 </view>
		 </view>
		 <view class="goHome" @click='goMain()'>
		 	<img src="../../static/img/gohome.png">
		 </view>
	</view>
</template>

<script>
	export default {  
		data() {
			return {
				deviceId:'',
				list:[
					{
						id:1,
						name:'设备资料',
						navUrl:'equipInfo'
					},
					{
						id:2,
						name:'维修记录',
						navUrl:'eqMaintenanceRecord'
					},
					{
						id:3,
						name:'保养记录',
						navUrl:'eqUnKeep'
					},
					{
						id:4,
						name:'巡检记录',
						navUrl:'eqInspectRecord'
					},
					{
						id:5,
						name:'附属子设备',
						navUrl:'accessorySubeEq'
					},
					{
						id:6,
						name:'关联设备',
						navUrl:'eqSparePart'
					},
					{
						id:7,
						name:'文档资料',
						navUrl:'eqDocument'
					},
					{
						id:8,
						name:'设备产能',
						navUrl:'eqParamter'
					},
					{
						id:9,
						name:'安监管理',
						navUrl:'eqSupervise'
					},
					{
						id:10,
						name:'保险记录',
						navUrl:'eqInsurance'
					},
					{
						id:11,
						name:'巡检标准',
						navUrl:'eqPatrolProject'
					}
				]
			}
		},
		onLoad(options) {
			this.deviceId = options.deviceId;
		},
		methods: {
			neivate(url) {
				if(url){
					uni.navigateTo({
					    url: url+'?deviceId='+this.deviceId
					});
				}	
			}
		},
		onBackPress(options) { //取消默认的返回事件.
			uni.navigateTo({
				url: "eqAccount"
			});
			return true;
		}
	}
</script>

<style>
	.uni-list-cell-navigate.uni-navigate-right:after{
		color: #333;
	}
</style>