index.vue 2.48 KB
<template>
	<div class="mainbox">
		<el-tabs v-model="tabName" @tab-click="handleClick" class="menu">
			<el-tab-pane label="宗地" name="zd">
				<fwsxbg-tab queryType="zd"></fwsxbg-tab>
			</el-tab-pane>
			<el-tab-pane label="多幢" name="dz">
				<fwsxbg-tab v-if="dzVisible" queryType="dz"></fwsxbg-tab>
			</el-tab-pane>
			<el-tab-pane label="自然幢" name="zrz">
				<fwsxbg-tab v-if="zrzVisible" queryType="zrz"></fwsxbg-tab>
			</el-tab-pane>
			<el-tab-pane label="构筑物" name="gzw">
				<fwsxbg-tab v-if="gzwVisible" queryType="gzw"></fwsxbg-tab>
			</el-tab-pane>
			<el-tab-pane label="户" name="h">
				<fwsxbg-tab v-if="hVisible" queryType="h"></fwsxbg-tab>
			</el-tab-pane>
		</el-tabs>
	</div>
</template>

<script>
import fwsxbgTab from '@components/fwsxbg/fwsxbgTab'

export default {
	name: "",
	components: { fwsxbgTab},
	inject:[],
	props: {},
	data(){
	  return{
          tabName:'zd',
          dzVisible:false,
          zrzVisible:false,
          gzwVisible:false,
          hVisible:false,
	  }
	},
	methods:{
        handleClick(tab,event){
            console.log(tab,'范围属性变更tab');
			switch (tab.name) {
				case "dz":
				    this.dzVisible=true;
				    break;
				case "zrz":
				    this.zrzVisible=true;
				    break;
				case "gzw":
				    this.gzwVisible=true;
				    break;
				case "h":
				    this.hVisible=true;
				    break;
				default:
				    break;
            }
		}
	}
};
</script>
<style scoped lang="less">
	.mainbox {
		width: 100%;
		height: 100%;
		-webkit-box-sizing: border-box;
		box-sizing: border-box;
		padding: 0;
		.menu {
			height: 100%;
			/deep/ .el-tabs__content {
				position: unset;
				margin-top: 40px;
				overflow: visible;
				/deep/.el-tab-pane{
					height: calc(100% - 0px);
				}
			}
			/deep/ .el-tabs__header {
				position: -webkit-fixed;
				position: fixed;
				top: 114px;
				z-index: 999;
				width: 100%;
				margin-bottom: 0;
				border: 0;
				/deep/ .el-tabs__nav-scroll {
					height: 50px;
					box-sizing: border-box;
					padding-left: 20px;
					.el-tabs__active-bar {
						display: none;
					}
					> .el-tabs__nav {
						border: 0;
						> .el-tabs__item {
							border: 1px solid #DEDEDE;
							height: 36px;
							line-height: 32px;
							padding: 0 20px;
							margin: 9px 10px 9px 0;
							background-color: #ffffff;
						}
						.is-active {
							color: #006CFF;
							border: 1px solid #006CFF;
						}
					}
				}
				/deep/ .el-tabs__nav-wrap::after {
					width: 0;
				}
			}
		}
	}

</style>