<template>
	<view>
		<uni-popup ref="popup" type="dialog">
			<view
				style="background-color: #fff;height: 70vh;width: 70vw;border-radius: 15rpx;padding: 50rpx;display: flex;flex-direction: column;">
				<view style="flex: 1;overflow: hidden;display: flex;">
					<scroll-view scroll-y="true" style="flex: 1;border-radius: 15rpx;border: 1rpx solid #babbbd;padding: 20rpx;">
						<my-mosowe-tree-list v-model="data" :treeData="treeList" text="text" nodeKey="_id"
							defaultShowChildren accordion multiple>
						</my-mosowe-tree-list>
					</scroll-view>
					<view style="margin: 20rpx;display: flex;flex-direction: column;align-items: center;justify-content: center;">
						<button type="primary" style="padding: 0;height:100rpx;line-height: 100rpx;color: #babbbd;">
							<uni-icons style="color: #fff;" type="left" size="30"></uni-icons>
						</button>
						<button type="primary"
							style="padding: 0;height:100rpx;line-height: 100rpx;color: #babbbd;margin-top: 30rpx;">
							<uni-icons style="color: #fff;" type="right" size="30"></uni-icons>
						</button>
					</view>
					<view style="flex: 1;border-radius: 15rpx;border: 1rpx solid #babbbd;padding: 20rpx;">

					</view>
				</view>
				<view style="height: 150rpx;border: 1rpx solid #babbbd;border-radius: 15rpx;margin-top: 20rpx;">

				</view>
				<view style="margin-top: 20rpx;">
					<u-button type="primary"
						style="height: 70rpx;line-height:70rpx;width: 300rpx; display: inline-block;">提交</u-button>
					<u-button
						style="height: 70rpx;line-height:70rpx;width: 300rpx; display: inline-block;margin-left: 20rpx;">关闭</u-button>
				</view>

			</view>
		</uni-popup>
	</view>
</template>

<script>
	import myMosoweTreeList from '../../components/myMosoweTreeList/myMosoweTreeList.vue'
	export default {
		components: {
			myMosoweTreeList
		},
		data() {
			return {
				data: [],
				treeList: [{
						_id: '64589cd409e29891989bc316',
						enable: false,
						text: '用户管理',
						childrens: [{
								_id: '64589cd409e29891989bc317',
								enable: true,
								text: '查看',
							},
							{
								_id: '64589cd409e29891989bc318',
								enable: true,
								text: '新增',
							},
							{
								_id: '64589cd409e29891989bc319',
								enable: true,
								text: '编辑',
							},
							{
								_id: '64589cd409e29891989bc31a',
								enable: true,
								text: '删除',
							},
							{
								_id: '64589cd409e29891989bc31b',
								enable: true,
								text: '重置密码',
							},
							{
								_id: '64589cd409e29891989bc31c',
								enable: true,
								text: '用户状态设置',
							}
						],
					},
					{
						_id: '64589cd409e29891989bc31d',
						enable: true,
						text: '菜单管理',
						childrens: [{
								_id: '64589cd409e29891989bc31e',
								enable: true,
								text: '查看',
							},
							{
								_id: '64589cd409e29891989bc31f',
								enable: true,
								text: '新增',
							},
							{
								_id: '64589cd409e29891989bc320',
								enable: true,
								text: '编辑',
							},
							{
								_id: '64589cd409e29891989bc321',
								enable: true,
								text: '删除',
							}
						],
					},
					{
						_id: '64589cd409e29891989bc322',
						enable: true,
						text: '角色管理',
						childrens: [{
								_id: '64589cd409e29891989bc323',
								enable: true,
								text: '查看',
							},
							{
								_id: '64589cd409e29891989bc324',
								enable: true,
								text: '新增',
							},
							{
								_id: '64589cd409e29891989bc325',
								enable: true,
								text: '编辑',
							},
							{
								_id: '64589cd409e29891989bc326',
								enable: true,
								text: '删除',
							}
						]
					}
				],

			}
		},
		methods: {
			open() {
				this.$refs.popup.open()
			}
		}
	}
</script>

<style>
</style>