<template>
	<uni-list >
		<uni-list-item title="网格名称" :rightText="target.gridTitle"></uni-list-item>
		<uni-list-item v-if="target.gridLevel" title="等级" :rightText="target.gridLevel | gridLevelFilter"></uni-list-item>
		<uni-list-item title="责任部门" :rightText="target.groupName"></uni-list-item>	
		<uni-list-item title="责任岗位" :rightText="target.positionName"></uni-list-item>
		<uni-list-item title="责任人" :rightText="target.accountName"></uni-list-item>	
		<uni-list-item title="说明" :note="target.gridDesc"></uni-list-item>	
	</uni-list>	
</template>

<script>
	export default {
		name:"targetListGrid",
		props:{
			target:{
				type:Object,
				default:()=>{
					return{
						gridTitle: "",
						gridLevel: "",
						groupName: "",
						positionName: "",
						accountName: "",
						gridDesc: ""					
					}
				}
			}
		},	
		filters: {
			gridLevelFilter(gridLevel) {
			if(!gridLevel) return '未设定';
			  const gridLevelMap = ['未设定', '重大', '较大', '一般', '较小']
			  return gridLevelMap[gridLevel]
			}
		},			
		data() {
			return {
				
			};
		},
	}
</script>

<style>

</style>