d572297f by zhaoqian

Merge remote-tracking branch 'origin/master'

2 parents 68a0125d 0bee2c7d
......@@ -22,6 +22,9 @@
.dn{
display: none;
}
.cp{
cursor: pointer;
}
.fl{
float: left;
}
......
<template>
<div>
<div class="main">
<el-dialog
title="选择宗地"
:visible.sync="isVisible"
width="50%"
@close="close"
:modal-append-to-body="false"
>
>
<div class="search">
<el-button type="primary" @click="search">查询</el-button>
<el-button type="primary" @click="result">重置</el-button>
......@@ -74,9 +74,18 @@
<td>{{item.qlr}}</td>
<td>{{item.zl}}</td>
</tr>
</table>
</div>
<div class="page">
<el-pagination
background
layout="prev, pager, next,total"
:page-size="queryData.pageSize"
:total="total"
@current-change="currentChange"
>
</el-pagination>
</div>
<div class="footer-button">
<el-button type="primary" @click="save">确认</el-button>
<el-button type="primary" @click="close">取消</el-button>
......@@ -94,6 +103,7 @@
name: "cxlzQueryData",
data() {
return {
total: 1,
queryData: {
bdcdyh: "",
bdcqzh: "",
......@@ -102,11 +112,13 @@
qszt: "2",
xmmc: "",
zddm: "",
zl: ""
zl: "",
pageNo: 1,
pageSize: 10,
},
Data: [],
isVisible: false,
zdbsm:''
zdbsm: ''
}
},
props: {
......@@ -132,12 +144,14 @@
created() {
},
methods: {
currentChange: function (val) {
this.queryData.pageNo = val;
this.getData(this.queryData);
},
select: function (val) {
this.zdbsm = val.glbsm
},
save: function () {
zrzcxlz({
zdBsm: this.zdbsm,
zrzBsm: this.zrzbsm
......@@ -157,7 +171,9 @@
qszt: "2",
xmmc: "",
zddm: "",
zl: ""
zl: "",
pageNo: 1,
pageSize: 10,
};
this.getData(this.queryData)
},
......@@ -165,6 +181,7 @@
data['dylxs'] = this.dylxs;
getSearchList(data).then(res => {
this.Data = res.result.records
this.total = res.result.total;
})
},
search: function () {
......@@ -187,10 +204,11 @@
<style scoped lang="less">
.main {
box-sizing: border-box;
/*box-sizing: border-box;*/
padding: 18px;
height: auto;
height: 800px;
width: 80%;
position: absolute;
}
table {
......@@ -226,9 +244,12 @@
color: #b2b2b2;
}
.search {
height: 650px;
}
.footer-button {
text-align: center;
margin-top: 20px;
}
</style>
......
......@@ -50,47 +50,47 @@
<td>权利人</td>
<td>坐落</td>
</tr>
<tr v-if="Data.length==0">
<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>
<tr v-else v-for="(item, index) in Data" :key="index">
<td>{{ index + 1 }}</td>
<td @click="xzzrz(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>
<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>
<span slot="footer" class="dialog-footer">
</span>
<cxlz-query-data :centerDialogVisible="centerDialogVisible" :dylxs="dylxs" @close="close"
:zrzbsm="zrzbsm"></cxlz-query-data>
<div>
<span slot="footer" class="dialog-footer"> </span>
<cxlz-query-data
:centerDialogVisible="centerDialogVisible"
:dylxs="dylxs"
@close="close"
:zrzbsm="zrzbsm"
></cxlz-query-data>
<div class="page">
<el-pagination
background
@size-change="sizeChange"
@current-change="currentChange"
:current-page.sync="queryData.pageNo"
layout="prev, pager, next,total"
:page-size="queryData.pageSize"
layout="total, prev, pager, next"
:total="total">
:total="total"
@current-change="currentChange"
>
</el-pagination>
</div>
</div>
</template>
<script>
import {getSearchList} from './../../../../api/search'
import {getSearchList} from "./../../../../api/search";
import cxlzQueryData from "../../../../components/cxlxQueryData/cxlzQueryData";
export default {
......@@ -105,33 +105,29 @@
queryData: {
bdcdyh: "",
bdcqzh: "",
dylxs: ['zrz'],
dylxs: ["zrz"],
qlrmc: "",
qszt: "",
xmmc: "",
zddm: "",
zl: "",
pageNo: 1,
pageSize: 5
pageSize: 12,
},
Data: [],
dylxs: ['zd']
}
dylxs: ["zd"],
};
},
created() {
},
mounted() {
this.getData(this.queryData)
this.getData(this.queryData);
},
methods: {
sizeChange: function (val) {
console.log(`每页 ${val} 条`);
this.queryData.pageSize = val
},
currentChange: function (val) {
console.log(`当前页: ${val}`);
this.queryData.pageNo = val
this.getData(this.queryData)
this.queryData.pageNo = val;
this.getData(this.queryData);
},
xzzrz: function (item) {
this.centerDialogVisible = true;
......@@ -144,30 +140,30 @@
this.queryData = {
bdcdyh: "",
bdcqzh: "",
dylxs: ['zrz'],
dylxs: ["zrz"],
qlrmc: "",
qszt: "",
xmmc: "",
zddm: "",
zl: "",
pageNo: 1,
pageSize: 10
pageSize: 12,
};
this.getData(this.queryData)
this.getData(this.queryData);
},
getData: function (data) {
getSearchList(data).then(res => {
this.Data = res.result.records
this.total = res.total
})
getSearchList(data).then((res) => {
this.Data = res.result.records;
this.total = res.result.total;
});
},
search: function () {
this.getData(this.queryData)
this.getData(this.queryData);
},
},
computed: {},
watch: {},
}
};
</script>
<style scoped lang="less">
.main {
......@@ -209,4 +205,11 @@
.noData {
color: #b2b2b2;
}
.page {
position: fixed;
bottom: 20px;
width: auto;
height: auto;
}
</style>
......
......@@ -76,7 +76,7 @@
<th>套数</th>
<th>面积</th>
</tr>
<tr v-for="(item, index) in legendList" :key="index">
<tr v-for="(item, index) in legendList" :key="index" class="cp" @click="handleChoosedH">
<td>
<i class="el-icon-star-on" :style="{ color: item.color }"></i
>{{ item.name }}
......@@ -380,7 +380,11 @@ export default {
}
})
},
//选中房屋状态
handleChoosedH(){
//清除选中户
this.$refs.lpbContent.clearChoosedH()
}
},
computed: {
},
......
......@@ -14,7 +14,7 @@
<!-- 显示层数 -->
<td class="floor">{{cs.sjc}}</td>
<!-- 显示户 -->
<td v-for="(hs,hsIndex) in cs.hs" :data-bsm="(searchNum == hs.shbw || searchNum == hs.bdcdyh) ? hs.bsm : ''" ref="hBsm" :key="hsIndex" :class="(searchNum == hs.shbw || searchNum == hs.bdcdyh) ? 'tdSelect':''" @click="handleTdClick($event,hs.bsm)" @dblclick="dbclick(hs.bsm)">{{hs.shbw}}</td>
<td v-for="(hs,hsIndex) in cs.hs" :data-bsm="hs.bsm" ref="hBsm" :key="hsIndex" :class="(searchNum == hs.shbw || searchNum == hs.bdcdyh) ? 'tdSelect':''" @click="handleTdClick($event,hs.bsm)" @dblclick="dbclick(hs.bsm)">{{hs.shbw}}</td>
</tr>
</table>
<!-- </div> -->
......@@ -30,7 +30,7 @@
<!-- 显示层数 -->
<td class="floor">{{cs.sjc}}</td>
<!-- 显示户 -->
<td v-for="(hs,hsIndex) in cs.hs" :data-bsm="(searchNum == hs.shbw || searchNum == hs.bdcdyh) ? hs.bsm : ''" ref="hBsm" :key="hsIndex" :class="(searchNum == hs.shbw || searchNum == hs.bdcdyh) ? 'tdSelect':''" @click="handleTdClick($event,hs.bsm)" @dblclick="dbclick(hs.bsm)">{{hs.shbw}}</td>
<td v-for="(hs,hsIndex) in cs.hs" :data-bsm="hs.bsm" ref="hBsm" :key="hsIndex" :class="(searchNum == hs.shbw || searchNum == hs.bdcdyh) ? 'tdSelect':''" @click="handleTdClick($event,hs.bsm)" @dblclick="dbclick(hs.bsm)">{{hs.shbw}}</td>
</tr>
</table>
</div>
......@@ -55,7 +55,7 @@
<!-- 显示层数 -->
<td class="floor">{{cs.sjc}}</td>
<!-- 显示户 -->
<td v-for="(hs,hsIndex) in cs.hs" :data-bsm="(searchNum == hs.shbw || searchNum == hs.bdcdyh) ? hs.bsm : ''" ref="hBsm" :key="hsIndex" :class="(searchNum == hs.shbw || searchNum == hs.bdcdyh) ? 'tdSelect':''" @click="handleTdClick($event,hs.bsm)" @dblclick="dbclick(hs.bsm)">{{hs.shbw}}</td>
<td v-for="(hs,hsIndex) in cs.hs" :data-bsm="hs.bsm" ref="hBsm" :key="hsIndex" :class="(searchNum == hs.shbw || searchNum == hs.bdcdyh) ? 'tdSelect':''" @click="handleTdClick($event,hs.bsm)" @dblclick="dbclick(hs.bsm)">{{hs.shbw}}</td>
</tr>
</table>
</div>
......@@ -67,7 +67,7 @@
<!-- 显示层数 -->
<td class="floor">{{cs.sjc}}</td>
<!-- 显示户 -->
<td v-for="(hs,hsIndex) in cs.hs" :data-bsm="(searchNum == hs.shbw || searchNum == hs.bdcdyh) ? hs.bsm : ''" ref="hBsm" :key="hsIndex" :class="(searchNum == hs.shbw || searchNum == hs.bdcdyh) ? 'tdSelect':''" @click="handleTdClick($event,hs.bsm)" @dblclick="dbclick(hs.bsm)">{{hs.shbw}}</td>
<td v-for="(hs,hsIndex) in cs.hs" :data-bsm="hs.bsm" ref="hBsm" :key="hsIndex" :class="(searchNum == hs.shbw || searchNum == hs.bdcdyh) ? 'tdSelect':''" @click="handleTdClick($event,hs.bsm)" @dblclick="dbclick(hs.bsm)">{{hs.shbw}}</td>
</tr>
</table>
</div>
......@@ -238,6 +238,19 @@ export default {
}
}
},
//清除选中户
clearChoosedH(){
this.$nextTick(()=>{
//将每个选中的户的选中状态清除
this.$refs.hBsm.forEach(item=>{
if(item.className == 'tdSelect'){
item.className = '';
}
});
// 清空hbsmList
this.hbsmList = [];
})
}
},
computed: {
createFlagChange() {
......@@ -260,11 +273,12 @@ export default {
},
//监听有无通过输入框查询选择到的户,如果有,将其bsm放入hbsmList
searchNum(n){
console.log(this.$refs.hBsm,'this.$refs.hBsm');
//清除之前选中户
this.clearChoosedH();
// 渲染查询到的户
this.$nextTick(()=>{
this.$refs.hBsm.forEach(item=>{
console.log(item.dataset,'item');
if(item.dataset.bsm != ''){
if(item.className == 'tdSelect'){
console.log(item.dataset.bsm,'item.dataset.bsm');
// 判断hbsmList中是否已经存在
if(this.hbsmList.indexOf(item.dataset.bsm) == -1){
......