index.vue 2.04 KB
<template>
    <div class="content_box">
        <el-tabs v-model="activeName" class="tabs" @tab-click="handleClick"  type="border-card" >
            <el-tab-pane label="多幢基本信息" name="dzxx"><dzxx v-if="dzJbxxVisble"></dzxx></el-tab-pane>
            <el-tab-pane label="附件材料" name="fjcl">
                <fjcl v-if="fjclVisible" ref="fjcl"></fjcl></el-tab-pane>
        </el-tabs>
    </div>
</template>

<script>
    import dzxx from "./dzxx";
    import fjcl from "./../zd/fjcl/fjcl"
    import {queryStatus} from "@api/search"
    export default {
        name: "",
        components: {
            dzxx,fjcl
        },
        props: {},
        data() {
            return {
                isDisabled:false,
                activeName: "dzxx",
                dzJbxxVisble:true,
                fjclVisible:false
            };
        },
        methods: {
            loadingStatus() {
                let bsm=this.$store.state.dzbsm;
                queryStatus(bsm).then(res => {
                    if (res.success) {
                        let qszt = res.result.qszt;
                        this.isDisabled = +qszt !== 0;
                    }
                })
            },
            handleClick(tab, event) {
                this.loadingStatus();
                switch (tab.name) {
                    case 'dzxx':
                        this.dzJbxxVisble = true;
                        break
                    case 'fjcl':
                        this.fjclVisible = true;
                        break;
                    default:
                        break;
                }
            },
        },
        created() {},
        mounted() {},
        computed: {},
        watch: {},
    };
</script>
<style scoped lang="less">
	.el-tabs{
		height: calc(100% - 50px);
		/deep/.el-tabs__content{
			//height: 100%;
			 /deep/.el-tab-pane{
			 	height: 100%;
			 }
			background: #eaedf5;
			padding: 0;
		}
		/deep/ .el-tabs__item {
			height: 48px;
		}
		/deep/ .el-tabs__header{
			background-color: #ffffff;
		}
	}
</style>