<template>
	<view class="box">
		<view class="mainBox">
			
			<view class="workBox2" v-for="(item,index) in itemList" :key="index">
					
					<view class="titleBox">分组1</view>
					<view class="comtent2">
						<view class="left2">标题</view>
						<view class="right2"></view>
					</view>
					<view class="comtent2">
						<view class="left2">零件编号</view>
						<view class="right2">{{mesData.partsnum}}</view>
					</view>
					
					<view class="comtent2">
						<view class="left2">名称</view>
						<view class="right2">{{mesData.caption}}</view>
					</view>
					<view class="comtent2">
						<view class="left2">位置</view>
						<view class="right2">{{weizhi}}</view>
					</view>
					
					<view class="comtent2">
						<view class="left2">用量</view>
						<view class="right2">{{yongliang}}</view>
					</view>
					
								
				
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				epc_id: '',
				partsnum: '',
				weizhi: '',
				yongliang: '',
				model_id:'',
				mesData:{}
			}
		},
		onLoad(opt) {
			console.log('opt+',opt);
			this.epc_id = opt.epc_id;
			this.partsnum = opt.partsnum;
			this.weizhi = opt.weizhi;
			this.yongliang = opt.yongliang;
			this.model_id = opt.model_id;
			this.getItemData();
		},
		methods: {
			
			// 配件信息
			getItemData() {
				uni.showLoading({
					title: '加载中'
				});
				this.$http('advancedEpc/findApplicableModels', {
					model_id: this.model_id,
					
			
				}, 'GET').then(res => {
					uni.hideLoading();
			
					this.mesData = res.data.result;
			
			
			
				});
			},
		}
	}
</script>

<style>
	.box {
		min-height: 100vh;
		background: #F4F5F7;
		padding-top: 20rpx;
		padding-bottom: constant(safe-area-inset-bottom);
		padding-bottom: env(safe-area-inset-bottom);
	}
	.mainBox {
		background: #FFFFFF;
		
	}
	.titleBox{
		font-size: 30rpx;
		color: #333333;
		font-weight: bold;
		padding-bottom: 20rpx;
	}
	
	.comtent2 {
		display: flex;
		align-items: baseline;
		font-size: 26rpx;
		padding-bottom: 20rpx;
	}
	.workBox2{
		
		background: #FFFFFF;
		border-bottom: 1rpx solid #EEEEEE;
		padding: 20rpx 24rpx 0rpx;
		
	}
	
	.left2 {
		width: 40%;
		color: #999999;
		white-space: nowrap;
	}
	
	.right2 {
		width: 60%;
		color: #333333;
	}
</style>
