<template>
	<view class="content">
	  <view class="item">
		<text class="title">项目名称</text>
		<text class="val">{{ objs.xmmc || '' }}</text>
	  </view>
	  <view class="item">
		<text class="title">审批面积(亩)</text>
		<text class="val">{{ ((objs.spmj || 0) * 0.0015).toFixed(2)}}</text>
	  </view>
	  <view class="item">
		<text class="title">建设单位</text>
		<text class="val">{{ objs.jsdw || ''}}</text>
	  </view>
	  <view class="item">
		<text class="title">建设地址</text>
		<text class="val">{{ objs.jsdz || ''}}</text>
	  </view>
	  <view class="item">
		<text class="title">联系人</text>
		<text class="val">{{ objs.lxr || '' }}</text>
	  </view>
	  <view class="item">
		<text class="title">联系方式</text>
		<text class="val">{{ objs.lxfs || '' }}</text>
	  </view>
	  <view class="item">
		<text class="title">发证时间</text>
		<text class="val">{{ (objs.fzsj || '') | formatDate }}</text>
	  </view>
	  <view class="item">
		<text class="title">到期时间</text>
		<text class="val">{{ (objs.dqsj || '') | 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>
