<template>
	<view class="content">
		<view class="item">
		  <text class="title">地块名称</text>
		  <text class="val">
			{{ objs.dkmc }}
		  </text>
		</view>
		<view class="item">
		  <text class="title">权利人名称</text>
		  <text class="val">
			{{ objs.tdqlr }}
		  </text>
		</view>
		<view class="item">
		  <text class="title">投资项目名称</text>
		  <text class="val">
			{{ objs.tzxmmc }}
		  </text>
		</view>
		<view class="item">
		  <text class="title">面积</text>
		  <text class="val">
			{{ objs.txmj && (objs.txmj * 0.0015).toFixed(2) }} 亩
		  </text>
		</view>
		<view class="item">
		  <text class="title">批准文号</text>
		  <text class="val">
			{{ objs.pzwh }}
		  </text>
		</view>
		<view class="item">
		  <text class="title">电子监管号</text>
		  <text class="val">
			{{ objs.dzjgh }}
		  </text>
		</view>
		<view class="item">
		  <text class="title">受让人地址</text>
		  <text class="val">
			{{ objs.ssrdz }}
		  </text>
		</view>
		<view class="item">
		  <text class="title">坐落</text>
		  <text class="val">
			{{ objs.tdzl }}
		  </text>
		</view>
		<view class="item">
		  <text class="title">签订日期</text>
		  <text class="val">
			{{ (objs.qdrq || '') | formatDate }}
		  </text>
		</view>
		<view class="item">
		  <text class="title">批准日期</text>
		  <text class="val">
			{{ (objs.pzrq || '') | formatDate }}
		  </text>
		</view>
	</view>
</template>

<script>
export default {
	props: {
		objs: {
			type: Object,
			default(){
				return {}
			}
		}
	},
    filters: {
	    formatDate(dateStr){
			if(!dateStr) return;
			const date = new Date(dateStr);
			const year = date.getFullYear();
			const month = date.getMonth()+1;
			const day = date.getDate();
			const monthStr = month < 10 ? `0${month}` : month;
			const dayStr = day < 10 ? `0${day}` : day;
			return `${year}-${monthStr}-${dayStr}`;
	    }
    },
	data() {
		return {
			
		}
	},
	methods: {
		
	}
}
</script>

<style lang="scss" scoped>
@import '../common.scss';
</style>
