/* 集团认领 年级班级*/
<template>
    <div>
        <div class="fontBox">已认领</div>
        <div class="card">
            <div class="cardItem" v-for="(v,i) in schoolList" :key="i">
                <div>2021级01班</div>
                <div class="cardItem_grey" @click="switchSchool">取消认领</div>
            </div>
        </div>
        <div class="fontBox">未认领</div>
        <div class="treeCard">
            <van-collapse v-model="activeNames" v-for="(v,i) in treeList" :key='i'>
                <van-collapse-item title="标题1" :name="i">内容</van-collapse-item>
            </van-collapse>
        </div>

        <van-popup style="background: transparent;" get-container="body" v-model="showSchool">
            <!-- <school-add></school-add> -->
            <group-penson></group-penson>
        </van-popup>
    </div>
</template>

<script>
import schoolAdd from '@/views/Travel/component/schoolAdd'
import groupPenson from '@/views/Travel/component/groupPenson'
export default {
    components: { schoolAdd , groupPenson},
    data() {
        return {
            schoolList: [
                {},
                {},
                {},
            ],
            showSchool: false,
            //
            treeList: [
                {
                    children: [
                        {},
                        {},
                    ]
                },
                {},
                {},
            ],
            isShow: false,
            activeNames: ['1'],
        }
    },
    methods: {
        //切换学校
        switchSchool() {
            // this.showSchool = true
        },
        //
        childrenClick() {
            if(this.isShow) {this.isShow = false}
            else {
                this.isShow = true
            }
        },
        //
        getClass() {
            let phone = '18267566730'
            let dataList = '绍兴市鲁迅小学'
            // this.yxAxios.post(`${this.proxyUrl}/prod/user/info/claimSchool?loginMobile=${phone}&schoolNames=${dataList}`).then((res) => {
            //     this.$toast.clear()
            //     console.log(res.data)
            //     if (res.data.code == 200) {
            //         this.$toast.success('认证成功')
            //         this.$emit('closeJT')
            //     } else {
            //         this.$toast.fail(res.data?.message)
            //     }
            // })
        }
    }
}
</script>

<style lang="scss" scoped>
.fontBox {
    width: 100vw;
    height: 8vw;
    display: flex;
    align-items: center;
    padding: 0 4vw;
    box-sizing: border-box;
    background-color: #F5F6FA;
    font-size: 3.7vw;
    font-weight: bold;
    color: #0F1826;
}
.card {
    padding: 7vw 5vw 0; 
    box-sizing: border-box;

    .cardItem {
        display: flex;
        justify-content: space-between;
        margin-bottom: 9vw;
        font-size: 3.8vw;

        .cardItem_blue {
            color:#4092FF
        }
        .cardItem_grey {
            color:#999999
        }
    }

    .treeIem {
        margin-bottom: 9vw;
        font-size: 3.8vw;
    }
}
.treeCard {
     padding: 2vw 1vw 0; 
    box-sizing: border-box;
}
</style>