/**
 * 配置
 * 表格列
 */
export const columns = [
	{
		title: "楼栋名称",
		dataIndex: "name",
		width: "20%",
	},
	{
		title: "房屋总数",
		dataIndex: "estateTotals",
		width: "20%",
	},
	{
		title: "租赁房屋数",
		dataIndex: "leaseEstateNums",
		width: "20%"
	},
	{
		title: "租赁率",
		dataIndex: "leaseRate",
		width: "20%",
		customRender:function(leaseRate){
			return leaseRate+'%'
		}
	},
	{
		title: "入住率",
		dataIndex: "occupancyRate",
		width: "20%",
		customRender:function(occupancyRate){
			return occupancyRate+'%'
		}
	},
	{
		title: "操作",
		dataIndex: "action",
		key: "action",
		width: "180",
		fixed: "right",
		scopedSlots: { customRender: "action" },
	},
]
// 搜索项
export const searchForm = {
	name: "",
}
// 分页
export const pagination = {
	current: 1,
	total: 0,
	pageSize: 10,
}
export const ActionsList = [
	{
		label: "批量删除",
		value: 1,
	},
]
export const form = {
	id:undefined,
	name: '',
	buildingInfoImgUrls:[]
}
export const rules = {
	name:[{required:true,message:'请输入楼栋',trigger:'blur'}],
}

export const unitColumns = [
	{
		title: "单元名称",
		dataIndex: "name",
		width: "15%",
	},
	{
		title: "楼层数",
		dataIndex: "floor",
		width: "15%",
	},
	{
		title: "公共楼层数",
		dataIndex: "publicFloor",
		width: "18%",
	},
	{
		title: "是否有电梯",
		dataIndex: "elevator",
		width: "18%",
		customRender:function( elevator ){
			switch (elevator) {
			case 1:
				return  '有'
			case 0:
				return  '无'
			default:
				break;
			}
		}
	},
	{
		title: "操作",
		dataIndex: "action",
		key: "action",
		width: "180",
		fixed: "right",
		scopedSlots: { customRender: "action" },
	},
]
import store from "@/store";
export const uploadHeaders = {
	"manage-login-token": store.getters.getToken,
}