index.vue 2.4 KB
<template>
	<!-- <div ref="lpb" class="content_box"> -->
		<el-tabs v-model="activeName" class="tabs" @tab-click="handleClick" >
			<el-tab-pane label="自然幢信息" name="zrzxx"><zrzxx></zrzxx></el-tab-pane>
			<el-tab-pane label="业主共有" name="yzgy"><yzgy v-if="yzgyLoad" :is-disabled="isDisabled"></yzgy></el-tab-pane>
			<el-tab-pane label="登记簿" name="djb"><djb></djb></el-tab-pane>
			<el-tab-pane label="楼盘表" name="lpb"><lpb v-if="lpbLoad"></lpb></el-tab-pane>
			<el-tab-pane label="历史回溯" name="lshs"><lshs v-if="lshsVisible" :type="type" :bsm="$route.query.bsm"></lshs></el-tab-pane>
			<el-tab-pane label="附件材料" name="fjcl"><fjcl ref="fjcl" :is-disabled="isDisabled"></fjcl></el-tab-pane>
			<el-tab-pane label="流程跟踪" name="lcgz"  v-if="$store.state.isWorkFlow || $store.state.lcgzShow" lazy>
				<lcgz  ref="lcgz" ></lcgz>
			</el-tab-pane>
		</el-tabs>
	<!-- </div> -->
</template>

<script>
import zrzxx from "./zrzxx";
import yzgy from "./yzgy";
import djb from "./djb";
import lpb from "./lpb";
import lshs from "./lshs";
import fjcl from "./../zd/fjcl/fjcl";
import Lcgz from "../zd/lcgz"
import {queryStatus} from "@api/search"
export default {
	name: "",
	components: {
        zrzxx,yzgy,djb,lpb,lshs,fjcl,Lcgz
    },
	props: {},
	data() {
		return {
            isDisabled:false,
			activeName: "zrzxx",
			lpbLoad:false, //默认不加载楼盘表组件
			yzgyLoad:false,
			lshsVisible:false,
			type:'zrz',
		};
	},
	methods: {
        loadingStatus() {
            let bsm=this.$store.state.zrzbsm;
            queryStatus(bsm).then(res => {
                if (res.success) {
                    if (res.result) {
                        let qszt = res.result.qszt;

                        this.isDisabled = +qszt !== 0;
                    }
                }
            })
        },
		handleClick(tab, event) {
            this.loadingStatus()
			if(!this.lpbLoad){
				this.lpbLoad = tab.name == 'lpb' ? true : false
			}
			if(!this.yzgyLoad){
				this.yzgyLoad = tab.name == 'yzgy' ? true : false
			}
			if(tab.name === 'lshs'){
				this.lshsVisible = true;
			}
		},
	},
	created() {},
	mounted() {
		// this.$nextTick(()=>{
			this.$store.state.contentWidth = (document.documentElement.clientWidth || document.body.clientWidth) - 340;
		// })
	},
	computed: {},
	watch: {},
};
</script>
<style scoped lang="less">
.el-tab-pane{
	overflow-y: scroll;
	height: 100%;
}
</style>