<template>
	<view>
		<view class="card" v-for="(item,index) in list" :key="index">
			<view class="card-left">
				<view class="card-up-list">
					<view class="card-up-list-list">
						<view>线路名称:</view><text>{{item.title}}</text>
					</view>
				</view>
			</view>
			<view class="card-opreation">
					<view>操作:</view>
					<view class="byj-btn"  @tap="deciceList(item.id,1)">
						<image src="../../static/byj.png"></image>
						<text>半月检</text>
					</view>
					<view class="yj-btn"  @tap="deciceList(item.id,2)">
						<image src="../../static/yj.png"></image>
						<text>月检</text>
					</view>
					<view class="bnj-btn"  @tap="deciceList(item.id,3)">
						<image src="../../static/bnj.png"></image>
						<text>半年检</text>
					</view>
				
		
			</view>
		</view>
	</view>
</template>

<script>
	import {lineList} from"../../api/user.js"
	export default {
		data() {
			return {
				list:[]
			};
		},onLoad() {
			this.getData()
		},
		methods:{
			getData(){
				lineList().then(res=>{
					this.list=res
					console.log("设备",this.list)
				})
			},
			deciceList(id,type){
				uni.navigateTo({
					url: `../deviceList/deviceList?id=${id}&type=${type}`,
					success: res => {},
					fail: () => {},
					complete: () => {}
				});
			}
		}
	}
</script>

<style lang="scss">
@import "./index.scss"
</style>
