index.vue 12.6 KB
<template>
    <div class="hb" ref="hbBox">
        <el-tabs v-model="tabName" class="menu" @tab-click="handleClick">
            <el-tab-pane label="宗地合并" name="zd">
                <div class="hb-tabs">

                    <el-button type="primary" class="addBtn" @click="newAdd">新增</el-button>
                    <div class="header">
                        <span>合并后项目名称</span>
                        <el-input></el-input>
                    </div>

                    <div class="table">
                        <table border="1">
                            <tr>
                                <td class="xh">序号</td>
                                <td class="zddm">宗地代码</td>
                                <td class="bdcdyh">不动产单元号</td>
                                <td class="xmmc">项目名称</td>
                                <td class="bdcqzh">不动产权证号</td>
                                <td class="qlr">权利人</td>
                                <td class="zl">坐落</td>
                            </tr>
                            <tr v-if="bgqData.length==0">
                                <td colspan="7">
                                    <span class="noData">暂无数据</span>
                                </td>
                            </tr>
                            <tr v-else v-for="(item,index) in bgqData" :key="index">
                                <td class="xh">{{index+1}}</td>
                                <td class="zddm"><input type="text" class="formInput" v-model="item.zddm" readonly="readonly"/></td>
                                <td class="bdcdyh"><input type="text" class="formInput" v-model="item.bdcdyh" readonly="readonly"/></td>
                                <td class="xmmc"><input type="text" class="formInput" v-model="item.xmmc" readonly="readonly"/></td>
                                <td class="bdcqzh"><input type="text" class="formInput" v-model="item.bdcqzh" readonly="readonly"/></td>
                                <td class="qlr"><input type="text" class="formInput" v-model="item.qlr" readonly="readonly"/></td>
                                <td class="zl"><input type="text" class="formInput" v-model="item.zl" readonly="readonly"/></td>
                            </tr>
                        </table>
                    </div>
                    <query-data @getData="getData" :centerDialogVisible.sync="centerDialogVisible"
                                @close="close"></query-data>

                    <div class="header-button" :style="{width:fgBoxWidth+'px'}">
                        <el-button type="primary" class="saveBtn">保存</el-button>
                    </div>
                </div>
            </el-tab-pane>
            <el-tab-pane label="多幢合并" name="dz">
                <div class="hb-tabs">
                    <el-button type="primary" class="addBtn" @click="newAdd">新增</el-button>
                    <div class="header">
                        <span>合并后项目名称</span>
                        <el-input></el-input>
                    </div>
                    <div class="table">
                        <table border="1">
                            <tr>
                                <td class="xh">序号</td>
                                <td class="zddm">宗地代码</td>
                                <td class="bdcdyh">不动产单元号</td>
                                <td class="xmmc">项目名称</td>
                                <td class="bdcqzh">不动产权证号</td>
                                <td class="qlr">权利人</td>
                                <td class="zl">坐落</td>
                            </tr>
                            <tr v-if="bgqData.length==0">
                                <td colspan="7">
                                    <span class="noData">暂无数据</span>
                                </td>
                            </tr>
                            <tr v-else v-for="(item,index) in bgqData" :key="index">
                                <td class="xh">{{index+1}}</td>
                                <td class="zddm"><input type="text" class="formInput" v-model="item.zddm" readonly="readonly"/></td>
                                <td class="bdcdyh"><input type="text" class="formInput" v-model="item.bdcdyh" readonly="readonly"/></td>
                                <td class="xmmc"><input type="text" class="formInput" v-model="item.xmmc" readonly="readonly"/></td>
                                <td class="bdcqzh"><input type="text" class="formInput" v-model="item.bdcqzh" readonly="readonly"/></td>
                                <td class="qlr"><input type="text" class="formInput" v-model="item.qlr" readonly="readonly"/></td>
                                <td class="zl"><input type="text" class="formInput" v-model="item.zl" readonly="readonly"/></td>
                            </tr>
                        </table>
                    </div>
                    <query-data @getData="getData" :centerDialogVisible.sync="centerDialogVisible" :dylxs="['dz']"
                                @close="close"></query-data>
                    <div class="header-button" :style="{width:fgBoxWidth+'px'}">
                        <el-button type="primary" class="saveBtn">保存</el-button>
                    </div>
                </div>
            </el-tab-pane>
            <el-tab-pane label="户合并" name="h">
                <div class="hb-tabs">
                    <el-button type="primary" class="addBtn" @click="newAdd">新增</el-button>
                    <div class="header">
                        <span>合并后项目名称</span>
                        <el-input></el-input>
                    </div>
                    <div class="table">
                        <table border="1">
                            <tr>
                                <td class="xh">序号</td>
                                <td class="zddm">宗地代码</td>
                                <td class="bdcdyh">不动产单元号</td>
                                <td class="xmmc">项目名称</td>
                                <td class="bdcqzh">不动产权证号</td>
                                <td class="qlr">权利人</td>
                                <td class="zl">坐落</td>
                            </tr>
                            <tr v-if="bgqData.length==0">
                                <td colspan="7">
                                    <span class="noData">暂无数据</span>
                                </td>
                            </tr>
                            <tr v-else v-for="(item,index) in bgqData" :key="index">
                                <td class="xh">{{index+1}}</td>
                                <td class="zddm"><input type="text" class="formInput" v-model="item.zddm" readonly="readonly"/></td>
                                <td class="bdcdyh"><input type="text" class="formInput" v-model="item.bdcdyh" readonly="readonly"/></td>
                                <td class="xmmc"><input type="text" class="formInput" v-model="item.xmmc" readonly="readonly"/></td>
                                <td class="bdcqzh"><input type="text" class="formInput" v-model="item.bdcqzh" readonly="readonly"/></td>
                                <td class="qlr"><input type="text" class="formInput" v-model="item.qlr" readonly="readonly"/></td>
                                <td class="zl"><input type="text" class="formInput" v-model="item.zl" readonly="readonly"/></td>
                            </tr>
                        </table>
                    </div>
                    <query-data @getData="getData" :centerDialogVisible.sync="centerDialogVisible" :dylxs="['h']"
                                @close="close"></query-data>
                    <div class="header-button" :style="{width:fgBoxWidth+'px'}">
                        <el-button type="primary" class="saveBtn">保存</el-button>
                    </div>
                </div>
            </el-tab-pane>
        </el-tabs>
    </div>
</template>

<script>
    import QueryData from './../../../../components/queryData/queryData'

    export default {
        name: "",
        components: {QueryData},
        props: {},
        data() {
            return {
                tabName: 'zd',
                centerDialogVisible: false,
                bgqData: [],
                fgBoxWidth:0
            }
        },
        created() {
        },
        mounted() {
            this.$nextTick(()=>{
                this.fgBoxWidth = this.$refs.hbBox.clientWidth;
            })
        },
        methods: {
            handleClick(tab, event) {
                console.log(tab, event);
            },
            close: function () {
                this.centerDialogVisible = false;
            },
            newAdd: function () {
                this.centerDialogVisible = true;
            },
            addData: function (val) {
                this.centerDialogVisible = false;
                this.bgqData.push(val)
            },
            getData: function (data) {
                this.bgqData.push(data)
            },
        },
        computed: {},
        watch: {},
    }
</script>
<style scoped lang="less">

.hb{
    .menu{
        /deep/.el-tabs__content{
            position: unset;
            margin-top: 62px;
            overflow: visible;
        }
         /deep/.el-tabs__header{
            position: -webkit-fixed;
            position: fixed;
            top: 120px;
            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: 36px;
                        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;
            }
        }
    }
}
    .hb-tabs {
        height: auto;
        width: 100%;
        position: relative;

        .addBtn{
            position: absolute;
            right: 30px;
            top: -46px;
            z-index: 999;
        }
        .header {
            box-sizing: border-box;
            padding: 18px 18px 0 18px;
            display: flex;
            justify-items: left;
            span {
                width: 130px;
                line-height: 40px;
                color: #9B9B9B;
            }
            .el-input {
                width: 200px;
                margin-right: 20px;
            }
        }

        .header-button {
            height: 50px;
            position: fixed;
            bottom: 0;
            text-align: center;
            background-color: #ffffff;
        }
        .table{
            box-sizing: border-box;
            padding: 0 18px;
        }
        table {
            margin-top: 10px;
            background-color: #fff;
            font-size: 14px;
            width: 100%;
            tr:nth-of-type(odd){
                background: #FAFAFA;
                th{
                    height: 36px;
                }
            }
            .formInput {
                margin: 0;
                height: 36px;
                outline: none;
                border: none;
                color: #606764;
                overflow: visible;
                text-align: center;
                cursor: text;
            }
            tr:hover{
                background-color: #F5F7FA;
            }

        }

        td {
            text-align: center;
            height: 36px;
            min-width: 50px;
        }

        table:hover {
            cursor: pointer;
        }

        .noData {
            color: #b2b2b2;
        }
        .saveBtn{
            background-color: #00CACD;
            border-color: #00CACD;
            padding: 10px 30px;
            margin-top: 8px;
        }
        .saveBtn:hover{
            background-color: rgba(0, 202, 205, .8);
            border-color:  rgba(0, 202, 205, .8);
        }
        .xh{
            width: 100px;
        }
    }
</style>