<template>
	<view class="list">
		<view class="item" v-for="(item,index) in list" :key="index" @click="go_detail(item.id,item.title)">
			<view class="left">
				<view class="text">{{item.title}}</view>
			</view>
			<view class="right">
				<uni-icons type="eye" size="18"></uni-icons>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				list:[]
			};
		},
		onLoad(option) {
			this.get_worksheet_design_list(option.id)
			
			uni.setNavigationBarTitle({
				title:option.title
			})
		},
		methods:{
			// 获取业务菜单
			get_worksheet_design_list(id){
				// console.log(id)
				uni.showLoading({
					mask:true
				})
				this.$api.worksheet_design_list({
					id:id
				}).then((res)=>{
					uni.hideLoading()
					console.log(res.data.data)
					this.list = res.data.data
					
				})
			},
			// 打开申请详情
			go_detail(id,title){
				uni.navigateTo({
					url:"./apply/apply?id=" + id + "&title=" + title
				})
			}
		}
	}
</script>

<style lang="scss">
	.list{
		box-sizing: border-box;
		padding: 10rpx 25rpx;
		.item{
			height: 110rpx;
			display: flex;
			align-items: center;
			justify-content: space-between;
			
			margin-left: 20rpx;
			border-bottom: 1rpx solid #F3F8F7;
			
			.left{
				display: flex;
				align-items: center;
				.text{
					font-size: 34rpx;
				}
			}
			.right{
				line-height: 110rpx;
				width: 90rpx;
				text-align: center;
			}
		}
	}
</style>
