Blame view

src/components/queryData/queryData.vue 8.04 KB
1 2
<template>
    <div>
3
        <el-dialog v-dialogDrag :close-on-click-modal="false"
4 5
                title="新增"
                :visible.sync="isVisible"
6
                width="70%"
7
                @close="close"
8
                :modal-append-to-body="false"
9
                >
10
            <div class="search">
11
                <!-- <el-button type="primary" @click="search">查询</el-button>
焦泽平 committed
12
                <el-button type="primary" @click="result" icon="el-icon-refresh">重置</el-button> -->
13

14 15 16 17 18
                <el-row>
                    <el-col :span="24">
                        <el-form :inline="true" class="demo-form-inline">
                            <el-form-item label="宗地编码">
                                <el-input
19 20
                                        v-model="queryData.zddm"
                                        placeholder="输入宗地编码"
21 22 23 24
                                ></el-input>
                            </el-form-item>
                            <el-form-item label="不动产权证号">
                                <el-input
25 26
                                        v-model="queryData.bdcqzh"
                                        placeholder="输入不动产权证号"
27 28 29 30
                                ></el-input>
                            </el-form-item>
                            <el-form-item label="不动产单元号">
                                <el-input
31 32 33
                                        maxlength="28"
                                        v-model="queryData.bdcdyh"
                                        placeholder="输入不动产单元号"
34 35
                                ></el-input>
                            </el-form-item>
焦泽平 committed
36 37
                            <el-button type="primary" style="margin-left:30px" @click="search" icon="el-icon-search">查询</el-button>
                            <el-button type="warning" @click="reset" icon="el-icon-refresh">重置</el-button>
38
                        </el-form>
39 40 41 42 43 44 45
                    </el-col>
                </el-row>
                <el-row>
                    <el-col :span="24">
                        <el-form :inline="true" class="demo-form-inline">
                            <el-form-item label="权利人">
                                <el-input
46 47
                                        v-model="queryData.qlrmc"
                                        placeholder="输入权利人"
48 49 50 51
                                ></el-input>
                            </el-form-item>
                            <el-form-item label="坐落">
                                <el-input
52 53
                                        v-model="queryData.zl"
                                        placeholder="输入坐落"
54 55
                                ></el-input>
                            </el-form-item>
56
                        </el-form>
57 58
                    </el-col>
                </el-row>
59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89
                <div class="table-data">
                    <table border="1">
                        <tr>
                            <td>序号</td>
                            <td>操作</td>
                            <td>宗地代码</td>
                            <td>不动产单元号</td>
                            <td>项目名称</td>
                            <td>不动产权证号</td>
                            <td>权利人</td>
                            <td>坐落</td>
                        </tr>
                        <tr v-if="Data.length==0">
                            <td colspan="8">
                                <span class="noData">暂无数据</span>
                            </td>
                        </tr>
                        <tr v-else v-for="(item,index) in Data" :key="index">
                            <td>{{index+1}}</td>
                            <td @click="addData(item)" class="xz">
                                <span>选择</span>
                            </td>
                            <td>{{item.zddm}}</td>
                            <td>{{item.bdcdyh}}</td>
                            <td>{{item.xmmc}}</td>
                            <td>{{item.bdcqzh}}</td>
                            <td>{{item.qlr}}</td>
                            <td>{{item.zl}}</td>
                        </tr>
                    </table>
                </div>
90
            </div>
91 92 93 94 95 96 97 98 99 100
            <div class="page">
                <el-pagination
                        background
                        layout="prev, pager, next,total"
                        :page-size="queryData.pageSize"
                        :total="total"
                        @current-change="currentChange"
                >
                </el-pagination>
            </div>
101 102 103 104 105 106
        </el-dialog>

    </div>
</template>

<script>
杨威 committed
107
    import {getSearchList} from '@api/search'
108 109 110 111 112

    export default {
        name: "queryData",
        data() {
            return {
113
                total: 1,
114 115 116 117 118
                queryData: {
                    bdcdyh: "",
                    bdcqzh: "",
                    dylxs: ['zd'],
                    qlrmc: "",
119
                    qszt: ["2"],
120 121
                    xmmc: "",
                    zddm: "",
122 123 124
                    zl: "",
                    pageNo: 1,
                    pageSize: 10,
125
                    type:'all',
126 127 128 129 130 131 132 133 134 135 136
                },
                Data: [],
                isVisible: false
            }
        },
        props: {
            centerDialogVisible: {
                type: Boolean,
                default: function () {
                    return false
                }
137 138 139 140 141 142
            },
            dylxs: {
                type: Array,
                default: function () {
                    return ['zd']
                }
143
            },
144 145 146
            isZdClose: {
                type: Boolean,
                default: false
147 148 149 150 151 152 153 154
            }
        },
        mounted() {
            this.getData(this.queryData)
        },
        created() {
        },
        methods: {
杨威 committed
155
            currentChange(val) {
156 157 158
                this.queryData.pageNo = val;
                this.getData(this.queryData);
            },
159
            reset() {
160 161 162 163
                this.queryData = {
                    bdcdyh: "",
                    bdcqzh: "",
                    qlrmc: "",
164
                    qszt: ["2"],
165 166
                    xmmc: "",
                    zddm: "",
167 168
                    zl: "",
                    pageNo: 1,
169 170
                    pageSize: 10,
                    type:'all',
weimo934 committed
171 172
                };
                this.getData(this.queryData)
173
            },
174
            getData(data) {
175
                data['dylxs'] = this.dylxs;
176 177
                getSearchList(data).then(res => {
                    this.Data = res.result.records
178
                    this.total = res.result.total;
179 180
                })
            },
181
            search() {
182 183
                this.getData(this.queryData)
            },
184
            addData(val) {
185
                this.$emit("getData", val)
186 187 188
                if (this.isZdClose) {
                    this.close();
                }
189
            },
190
            close() {
191
                this.$emit('close')
192
                this.reset();
193 194 195 196 197 198 199 200 201 202 203
            }
        },
        watch: {
            centerDialogVisible(val) {
                this.isVisible = val
            }
        }
    }
</script>

<style scoped lang="less">
204

205 206 207 208 209 210
    .main {
        box-sizing: border-box;
        padding: 18px;
        height: auto;
        width: 80%;
    }
211 212

    /deep/ .el-form-item__label {
213 214 215
        width: 96px;
        text-align: right;
    }
216 217 218 219 220 221

    table {
        margin-top: 10px;
        background-color: #fff;
        font-size: 14px;
        width: 100%;
222
        tr:hover {
223 224
            background-color: #F5F7FA;
        }
225 226 227 228 229 230 231 232 233 234 235 236
    }

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

    table:hover {
        cursor: pointer;
    }

weimo934 committed
237 238 239 240
    .inputtitle {
        line-height: 40px;
    }

241 242 243 244 245 246 247 248 249 250 251
    .shop {
        margin-top: 20px;
    }

    .xz {
        color: blue;
    }

    .noData {
        color: #b2b2b2;
    }
252 253 254 255
    .table-data{
        height: 450px;
    }
    .page {
256 257
        margin-top: 20px;
    }
258 259

</style>