<template>
    <div class="dailyCheckResultDetail">
        <el-tabs type="border-card" v-model="detailData.activeName">
            <el-tab-pane label="企业基础信息" name="qyjcxx">
                <qyjcxx @changeActiveName="changeActiveName" :formQuery="formQuery"/>
            </el-tab-pane>
            <el-tab-pane label="历史变更记录" name="lsbgjl">
                <lsbgjl :formQuery="formQuery"/>
            </el-tab-pane>
            <el-tab-pane label="仓房基本信息" name="cfjbxx">
                <cfjbxx :formQuery="formQuery"/>
            </el-tab-pane>
            <el-tab-pane label="检查信息" name="jcxx">
                <jcxx :formQuery="formQuery"/>
            </el-tab-pane>
<!--            <el-tab-pane label="行政处罚" name="xzcf">-->
<!--                <xzcf/>-->
<!--            </el-tab-pane>-->
        </el-tabs>
    </div>
</template>

<script>
    import qyjcxx from './detailsComponents/qyjcxx'
    import lsbgjl from './detailsComponents/lsbgjl'
    import cfjbxx from './detailsComponents/cfjbxx'
    import jcxx from './detailsComponents/jcxx'
    import xzcf from './detailsComponents/xzcf'
    import {
        getDetail
    } from "@/api/enterpriseInformationBase/index";
    export default {
        name:"dailyCheckResultDetail",
        components:{
            qyjcxx,
            lsbgjl,
            cfjbxx,
            jcxx,
            xzcf
        },
        data() {
            return {
                formQuery: {},
                detailData: {
                    activeName: 'qyjcxx',
                },
            };
        },
        methods:{
            changeActiveName(obj){
                this.detailData.activeName = obj.name;
            },
            getInfo(){
                let params = {
                    tyshxydm: this.$route.query.code
                };
                getDetail(params).then(res => {
                    if (res.infoCode == 200) {
                        this.formQuery = res.data;
                    } else {
                        this.$message({
                            type: "error",
                            message: "获取失败!"
                        });
                    }
                });
            },
        },
        created() {
            this.getInfo()
        },
    }
</script>

<style scoped>
    .dailyCheckResultDetail{
        overflow-y: auto;
        margin: 10px;
        border: 1px solid #f4f5f8;
        padding: 10px;
    }
</style>
