<template>
	<view class="content">
		<view class="content-header" v-if="levelName">
			<view class="concent-title">
				<text class="concent-text">{{levelName}}</text>
			</view>
		</view>
		<view  style="text-align: right;margin: 20px;">
			总合计：{{count}}
		</view>

		<view class="">
			<view class="d-box">
			<!-- 	<view class="d-td" v-for="item in datatitleList">
					<span class="">{{item}}</span>
				</view> -->
				<view class="d-td">
					<text>辖下组织/成员</text>
				</view>
				<view class="d-td">
					<text>职级</text>
				</view>
				<view class="d-td">
					<text>成员数量</text>
				</view>
			</view>
			<lazy-tree v-if="dataList" :datatitleList="datatitleList" :dataList="dataList" type="2"></lazy-tree>
			<!-- <myteam-table :datatitleList="datatitleList" :dataList="dataList" type="1"></myteam-table> -->
		</view>
	</view>
</template>

<script>
		 // import MyteamTable from '@/components/myteam/myteam-table.vue';
		 import lazyTree from '@/components/myteam/lazy-tree.vue';
	export default {
		props: {
			directList: {
				type: Array
			},
			levelName: {
				type: String
			},
			count: {
				type: String
			}
		},
		components:{
			lazyTree
		},
		data() {
			return {
				datatitleList:['辖下组织/成员','职级','成员数量'],
				dataList: null
			}
		},
		mounted(){
			// this.dataList = this.directList.map((x,index) => ({
			// 	areaCenterName:x.areaCenterName,
			// 	levelName:x.levelName,
			// 	count: x.count,
			// 	parentId: x.parentId? x.parentId : '0'
			// }))
			this.dataList = this.directList
			console.log(this.dataList, 74852)
		}
	}
</script>

<style lang="scss">
.content{
	height: 100%;
	width: 100vw;
	margin-top: 20px;
}
.content-header{
	display: flex;
	justify-content: center;
}
.concent-title{
	width: 446rpx;
	height: 80rpx;
	background: url('../../../static/Group 1623.png');
	background-size: auto 100%;
}
	.d-box {
		display: flex;
		justify-content: space-between;
		// padding: 0 20rpx;
		font-size: 32rpx;
		font-weight: 600;

		.d-header {
			text-align: center;
			font-size: 26rpx;
		}

		.d-td {
			align-items: center;
			padding: 5rpx 10rpx;
		}
	}
.concent-text{
	font-size: 18px;
	font-weight: 500;
	color: #FFFFFF;
	line-height: 40px;
}
.table-content{
	margin: 10px 20px;
	display: flex;
	justify-content: space-between;
}
</style>
