<template>
	<view class="content">
		<view class="content-header" v-if="levelName">
			<view class="concent-title">
				<text class="concent-text">{{levelName}}</text>
			</view>
		</view>
		<view v-if="dataShowType ==1" 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" style="text-align: left;">
					<text v-if="dataShowType ==1">成员</text>
					<text v-if="dataShowType == 2">育成团队</text>
				</view>
				<view class="d-td" style="text-align: center;">
					<text>职级</text>
				</view>
				<view class="d-td"  style="text-align:center;">
					<text v-if="dataShowType ==1">关系</text>
					<text v-if="dataShowType == 2">数量</text>
				</view>
			</view>
			<lazy-tree v-if="dataList" :datatitleList="datatitleList" :dataList="dataList" type="2" :dataShowType="dataShowType"></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: Number
			},
			dataShowType: {
				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
		}
	}
</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%;
		display: flex;
		justify-content: center;
		.concent-text{
			font-size: 36rpx;
			font-weight: 500;
			color: #FFFFFF;
			align-items: center;
			margin-top: 14rpx;
			// line-height: 40px;
		}
	}
}

	.d-box {
		display: flex;
		justify-content: space-between;
		font-size: 32rpx;
		font-weight: 600;
		// .d-header {
		// 	text-align: center;
		// 	font-size: 26rpx;
		// }

		// .d-td {
		// 	align-items: center;
		// 	padding: 5rpx 10rpx;
		// }
		.d-td {
			flex: 1;
			align-items: center;
			padding: 5rpx 10rpx;
		}
			
	}
.table-content{
	margin: 10px 20px;
	display: flex;
	justify-content: space-between;
}
</style>
