<template>
    <div class="main_container">
        <headerBar v-model:type="currentTabType" :tabs="tabs"></headerBar>
        <div class="main_layout">
            <sideBar></sideBar>
            <main class="main">
                <ZfControlPlatform v-show="currentTabType == 0"></ZfControlPlatform>
                <iframe v-show="currentTabType == 1" src="https://117.78.20.62/#/login"></iframe>
                <iframe v-show="currentTabType == 2" src="https://smartcity.zhifei.tech:9090/#/"></iframe>
            </main>
        </div>
    </div>
</template>

<script setup lang="ts">
import { ref } from 'vue'
import headerBar from '@/components/main/headerBar.vue';
import sideBar from '@/components/main/sideBar.vue';
import ZfControlPlatform from "@/components/zfControlPlatform/index.vue"

const tabs = [
    {
        type: 0,
        label: "智飞云飞控平台"
    },
    {
        type: 1,
        label: "调度处置"
    },
    {
        type: 2,
        label: "飞行控制"
    },
]
const currentTabType = ref(0)
function changeType(type: number) {
    currentTabType.value = type
}
</script>

<style lang="less" scoped>
.main_container {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    background-color: #020e26;

    .main_layout {
        display: flex;
        flex: 1;
        height: 0;

        .main {
            width: 100%;
            height: 100%;

            iframe {
                width: 100%;
                height: 100%;
                border: none;
            }
        }
    }
}
</style>
