Merge remote-tracking branch 'origin/master'
Showing
5 changed files
with
107 additions
and
62 deletions
1 | <template> | 1 | <template> |
2 | <div> | 2 | <div class="main"> |
3 | <el-dialog | 3 | <el-dialog |
4 | title="选择宗地" | 4 | title="选择宗地" |
5 | :visible.sync="isVisible" | 5 | :visible.sync="isVisible" |
6 | width="50%" | 6 | width="50%" |
7 | @close="close" | 7 | @close="close" |
8 | :modal-append-to-body="false" | 8 | :modal-append-to-body="false" |
9 | > | 9 | > |
10 | <div class="search"> | 10 | <div class="search"> |
11 | <el-button type="primary" @click="search">查询</el-button> | 11 | <el-button type="primary" @click="search">查询</el-button> |
12 | <el-button type="primary" @click="result">重置</el-button> | 12 | <el-button type="primary" @click="result">重置</el-button> |
... | @@ -74,9 +74,18 @@ | ... | @@ -74,9 +74,18 @@ |
74 | <td>{{item.qlr}}</td> | 74 | <td>{{item.qlr}}</td> |
75 | <td>{{item.zl}}</td> | 75 | <td>{{item.zl}}</td> |
76 | </tr> | 76 | </tr> |
77 | |||
78 | </table> | 77 | </table> |
79 | </div> | 78 | </div> |
79 | <div class="page"> | ||
80 | <el-pagination | ||
81 | background | ||
82 | layout="prev, pager, next,total" | ||
83 | :page-size="queryData.pageSize" | ||
84 | :total="total" | ||
85 | @current-change="currentChange" | ||
86 | > | ||
87 | </el-pagination> | ||
88 | </div> | ||
80 | <div class="footer-button"> | 89 | <div class="footer-button"> |
81 | <el-button type="primary" @click="save">确认</el-button> | 90 | <el-button type="primary" @click="save">确认</el-button> |
82 | <el-button type="primary" @click="close">取消</el-button> | 91 | <el-button type="primary" @click="close">取消</el-button> |
... | @@ -94,6 +103,7 @@ | ... | @@ -94,6 +103,7 @@ |
94 | name: "cxlzQueryData", | 103 | name: "cxlzQueryData", |
95 | data() { | 104 | data() { |
96 | return { | 105 | return { |
106 | total: 1, | ||
97 | queryData: { | 107 | queryData: { |
98 | bdcdyh: "", | 108 | bdcdyh: "", |
99 | bdcqzh: "", | 109 | bdcqzh: "", |
... | @@ -102,11 +112,13 @@ | ... | @@ -102,11 +112,13 @@ |
102 | qszt: "2", | 112 | qszt: "2", |
103 | xmmc: "", | 113 | xmmc: "", |
104 | zddm: "", | 114 | zddm: "", |
105 | zl: "" | 115 | zl: "", |
116 | pageNo: 1, | ||
117 | pageSize: 10, | ||
106 | }, | 118 | }, |
107 | Data: [], | 119 | Data: [], |
108 | isVisible: false, | 120 | isVisible: false, |
109 | zdbsm:'' | 121 | zdbsm: '' |
110 | } | 122 | } |
111 | }, | 123 | }, |
112 | props: { | 124 | props: { |
... | @@ -132,12 +144,14 @@ | ... | @@ -132,12 +144,14 @@ |
132 | created() { | 144 | created() { |
133 | }, | 145 | }, |
134 | methods: { | 146 | methods: { |
147 | currentChange: function (val) { | ||
148 | this.queryData.pageNo = val; | ||
149 | this.getData(this.queryData); | ||
150 | }, | ||
135 | select: function (val) { | 151 | select: function (val) { |
136 | this.zdbsm = val.glbsm | 152 | this.zdbsm = val.glbsm |
137 | }, | 153 | }, |
138 | save: function () { | 154 | save: function () { |
139 | |||
140 | |||
141 | zrzcxlz({ | 155 | zrzcxlz({ |
142 | zdBsm: this.zdbsm, | 156 | zdBsm: this.zdbsm, |
143 | zrzBsm: this.zrzbsm | 157 | zrzBsm: this.zrzbsm |
... | @@ -157,7 +171,9 @@ | ... | @@ -157,7 +171,9 @@ |
157 | qszt: "2", | 171 | qszt: "2", |
158 | xmmc: "", | 172 | xmmc: "", |
159 | zddm: "", | 173 | zddm: "", |
160 | zl: "" | 174 | zl: "", |
175 | pageNo: 1, | ||
176 | pageSize: 10, | ||
161 | }; | 177 | }; |
162 | this.getData(this.queryData) | 178 | this.getData(this.queryData) |
163 | }, | 179 | }, |
... | @@ -165,6 +181,7 @@ | ... | @@ -165,6 +181,7 @@ |
165 | data['dylxs'] = this.dylxs; | 181 | data['dylxs'] = this.dylxs; |
166 | getSearchList(data).then(res => { | 182 | getSearchList(data).then(res => { |
167 | this.Data = res.result.records | 183 | this.Data = res.result.records |
184 | this.total = res.result.total; | ||
168 | }) | 185 | }) |
169 | }, | 186 | }, |
170 | search: function () { | 187 | search: function () { |
... | @@ -187,10 +204,11 @@ | ... | @@ -187,10 +204,11 @@ |
187 | <style scoped lang="less"> | 204 | <style scoped lang="less"> |
188 | 205 | ||
189 | .main { | 206 | .main { |
190 | box-sizing: border-box; | 207 | /*box-sizing: border-box;*/ |
191 | padding: 18px; | 208 | padding: 18px; |
192 | height: auto; | 209 | height: 800px; |
193 | width: 80%; | 210 | width: 80%; |
211 | position: absolute; | ||
194 | } | 212 | } |
195 | 213 | ||
196 | table { | 214 | table { |
... | @@ -226,9 +244,12 @@ | ... | @@ -226,9 +244,12 @@ |
226 | color: #b2b2b2; | 244 | color: #b2b2b2; |
227 | } | 245 | } |
228 | 246 | ||
247 | .search { | ||
248 | height: 650px; | ||
249 | } | ||
250 | |||
229 | .footer-button { | 251 | .footer-button { |
230 | text-align: center; | 252 | text-align: center; |
231 | margin-top: 20px; | 253 | margin-top: 20px; |
232 | } | 254 | } |
233 | |||
234 | </style> | 255 | </style> | ... | ... |
... | @@ -50,47 +50,47 @@ | ... | @@ -50,47 +50,47 @@ |
50 | <td>权利人</td> | 50 | <td>权利人</td> |
51 | <td>坐落</td> | 51 | <td>坐落</td> |
52 | </tr> | 52 | </tr> |
53 | <tr v-if="Data.length==0"> | 53 | <tr v-if="Data.length == 0"> |
54 | <td colspan="8"> | 54 | <td colspan="8"> |
55 | <span class="noData">暂无数据</span> | 55 | <span class="noData">暂无数据</span> |
56 | </td> | 56 | </td> |
57 | </tr> | 57 | </tr> |
58 | <tr v-else v-for="(item,index) in Data" :key="index"> | 58 | <tr v-else v-for="(item, index) in Data" :key="index"> |
59 | <td>{{index+1}}</td> | 59 | <td>{{ index + 1 }}</td> |
60 | <td @click="xzzrz(item)" class="xz"> | 60 | <td @click="xzzrz(item)" class="xz"> |
61 | <span>选择</span> | 61 | <span>选择</span> |
62 | </td> | 62 | </td> |
63 | <td>{{item.zddm}}</td> | 63 | <td>{{ item.zddm }}</td> |
64 | <td>{{item.bdcdyh}}</td> | 64 | <td>{{ item.bdcdyh }}</td> |
65 | <td>{{item.xmmc}}</td> | 65 | <td>{{ item.xmmc }}</td> |
66 | <td>{{item.bdcqzh}}</td> | 66 | <td>{{ item.bdcqzh }}</td> |
67 | <td>{{item.qlr}}</td> | 67 | <td>{{ item.qlr }}</td> |
68 | <td>{{item.zl}}</td> | 68 | <td>{{ item.zl }}</td> |
69 | </tr> | 69 | </tr> |
70 | |||
71 | </table> | 70 | </table> |
72 | </div> | 71 | </div> |
73 | <span slot="footer" class="dialog-footer"> | 72 | <span slot="footer" class="dialog-footer"> </span> |
74 | </span> | 73 | <cxlz-query-data |
75 | <cxlz-query-data :centerDialogVisible="centerDialogVisible" :dylxs="dylxs" @close="close" | 74 | :centerDialogVisible="centerDialogVisible" |
76 | :zrzbsm="zrzbsm"></cxlz-query-data> | 75 | :dylxs="dylxs" |
77 | <div> | 76 | @close="close" |
77 | :zrzbsm="zrzbsm" | ||
78 | ></cxlz-query-data> | ||
79 | <div class="page"> | ||
78 | <el-pagination | 80 | <el-pagination |
79 | background | 81 | background |
80 | @size-change="sizeChange" | 82 | layout="prev, pager, next,total" |
81 | @current-change="currentChange" | ||
82 | :current-page.sync="queryData.pageNo" | ||
83 | :page-size="queryData.pageSize" | 83 | :page-size="queryData.pageSize" |
84 | layout="total, prev, pager, next" | 84 | :total="total" |
85 | :total="total"> | 85 | @current-change="currentChange" |
86 | > | ||
86 | </el-pagination> | 87 | </el-pagination> |
87 | </div> | 88 | </div> |
88 | |||
89 | </div> | 89 | </div> |
90 | </template> | 90 | </template> |
91 | 91 | ||
92 | <script> | 92 | <script> |
93 | import {getSearchList} from './../../../../api/search' | 93 | import {getSearchList} from "./../../../../api/search"; |
94 | import cxlzQueryData from "../../../../components/cxlxQueryData/cxlzQueryData"; | 94 | import cxlzQueryData from "../../../../components/cxlxQueryData/cxlzQueryData"; |
95 | 95 | ||
96 | export default { | 96 | export default { |
... | @@ -105,33 +105,29 @@ | ... | @@ -105,33 +105,29 @@ |
105 | queryData: { | 105 | queryData: { |
106 | bdcdyh: "", | 106 | bdcdyh: "", |
107 | bdcqzh: "", | 107 | bdcqzh: "", |
108 | dylxs: ['zrz'], | 108 | dylxs: ["zrz"], |
109 | qlrmc: "", | 109 | qlrmc: "", |
110 | qszt: "", | 110 | qszt: "", |
111 | xmmc: "", | 111 | xmmc: "", |
112 | zddm: "", | 112 | zddm: "", |
113 | zl: "", | 113 | zl: "", |
114 | pageNo: 1, | 114 | pageNo: 1, |
115 | pageSize: 5 | 115 | pageSize: 12, |
116 | }, | 116 | }, |
117 | Data: [], | 117 | Data: [], |
118 | dylxs: ['zd'] | 118 | dylxs: ["zd"], |
119 | } | 119 | }; |
120 | }, | 120 | }, |
121 | created() { | 121 | created() { |
122 | }, | 122 | }, |
123 | mounted() { | 123 | mounted() { |
124 | this.getData(this.queryData) | 124 | this.getData(this.queryData); |
125 | }, | 125 | }, |
126 | methods: { | 126 | methods: { |
127 | sizeChange: function (val) { | ||
128 | console.log(`每页 ${val} 条`); | ||
129 | this.queryData.pageSize = val | ||
130 | }, | ||
131 | currentChange: function (val) { | 127 | currentChange: function (val) { |
132 | console.log(`当前页: ${val}`); | 128 | console.log(`当前页: ${val}`); |
133 | this.queryData.pageNo = val | 129 | this.queryData.pageNo = val; |
134 | this.getData(this.queryData) | 130 | this.getData(this.queryData); |
135 | }, | 131 | }, |
136 | xzzrz: function (item) { | 132 | xzzrz: function (item) { |
137 | this.centerDialogVisible = true; | 133 | this.centerDialogVisible = true; |
... | @@ -144,30 +140,30 @@ | ... | @@ -144,30 +140,30 @@ |
144 | this.queryData = { | 140 | this.queryData = { |
145 | bdcdyh: "", | 141 | bdcdyh: "", |
146 | bdcqzh: "", | 142 | bdcqzh: "", |
147 | dylxs: ['zrz'], | 143 | dylxs: ["zrz"], |
148 | qlrmc: "", | 144 | qlrmc: "", |
149 | qszt: "", | 145 | qszt: "", |
150 | xmmc: "", | 146 | xmmc: "", |
151 | zddm: "", | 147 | zddm: "", |
152 | zl: "", | 148 | zl: "", |
153 | pageNo: 1, | 149 | pageNo: 1, |
154 | pageSize: 10 | 150 | pageSize: 12, |
155 | }; | 151 | }; |
156 | this.getData(this.queryData) | 152 | this.getData(this.queryData); |
157 | }, | 153 | }, |
158 | getData: function (data) { | 154 | getData: function (data) { |
159 | getSearchList(data).then(res => { | 155 | getSearchList(data).then((res) => { |
160 | this.Data = res.result.records | 156 | this.Data = res.result.records; |
161 | this.total = res.total | 157 | this.total = res.result.total; |
162 | }) | 158 | }); |
163 | }, | 159 | }, |
164 | search: function () { | 160 | search: function () { |
165 | this.getData(this.queryData) | 161 | this.getData(this.queryData); |
166 | }, | 162 | }, |
167 | }, | 163 | }, |
168 | computed: {}, | 164 | computed: {}, |
169 | watch: {}, | 165 | watch: {}, |
170 | } | 166 | }; |
171 | </script> | 167 | </script> |
172 | <style scoped lang="less"> | 168 | <style scoped lang="less"> |
173 | .main { | 169 | .main { |
... | @@ -209,4 +205,11 @@ | ... | @@ -209,4 +205,11 @@ |
209 | .noData { | 205 | .noData { |
210 | color: #b2b2b2; | 206 | color: #b2b2b2; |
211 | } | 207 | } |
208 | |||
209 | .page { | ||
210 | position: fixed; | ||
211 | bottom: 20px; | ||
212 | width: auto; | ||
213 | height: auto; | ||
214 | } | ||
212 | </style> | 215 | </style> | ... | ... |
... | @@ -76,7 +76,7 @@ | ... | @@ -76,7 +76,7 @@ |
76 | <th>套数</th> | 76 | <th>套数</th> |
77 | <th>面积</th> | 77 | <th>面积</th> |
78 | </tr> | 78 | </tr> |
79 | <tr v-for="(item, index) in legendList" :key="index"> | 79 | <tr v-for="(item, index) in legendList" :key="index" class="cp" @click="handleChoosedH"> |
80 | <td> | 80 | <td> |
81 | <i class="el-icon-star-on" :style="{ color: item.color }"></i | 81 | <i class="el-icon-star-on" :style="{ color: item.color }"></i |
82 | >{{ item.name }} | 82 | >{{ item.name }} |
... | @@ -380,7 +380,11 @@ export default { | ... | @@ -380,7 +380,11 @@ export default { |
380 | } | 380 | } |
381 | }) | 381 | }) |
382 | }, | 382 | }, |
383 | 383 | //选中房屋状态 | |
384 | handleChoosedH(){ | ||
385 | //清除选中户 | ||
386 | this.$refs.lpbContent.clearChoosedH() | ||
387 | } | ||
384 | }, | 388 | }, |
385 | computed: { | 389 | computed: { |
386 | }, | 390 | }, | ... | ... |
... | @@ -14,7 +14,7 @@ | ... | @@ -14,7 +14,7 @@ |
14 | <!-- 显示层数 --> | 14 | <!-- 显示层数 --> |
15 | <td class="floor">{{cs.sjc}}层</td> | 15 | <td class="floor">{{cs.sjc}}层</td> |
16 | <!-- 显示户 --> | 16 | <!-- 显示户 --> |
17 | <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> | 17 | <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> |
18 | </tr> | 18 | </tr> |
19 | </table> | 19 | </table> |
20 | <!-- </div> --> | 20 | <!-- </div> --> |
... | @@ -30,7 +30,7 @@ | ... | @@ -30,7 +30,7 @@ |
30 | <!-- 显示层数 --> | 30 | <!-- 显示层数 --> |
31 | <td class="floor">{{cs.sjc}}层</td> | 31 | <td class="floor">{{cs.sjc}}层</td> |
32 | <!-- 显示户 --> | 32 | <!-- 显示户 --> |
33 | <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> | 33 | <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> |
34 | </tr> | 34 | </tr> |
35 | </table> | 35 | </table> |
36 | </div> | 36 | </div> |
... | @@ -55,7 +55,7 @@ | ... | @@ -55,7 +55,7 @@ |
55 | <!-- 显示层数 --> | 55 | <!-- 显示层数 --> |
56 | <td class="floor">{{cs.sjc}}层</td> | 56 | <td class="floor">{{cs.sjc}}层</td> |
57 | <!-- 显示户 --> | 57 | <!-- 显示户 --> |
58 | <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> | 58 | <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> |
59 | </tr> | 59 | </tr> |
60 | </table> | 60 | </table> |
61 | </div> | 61 | </div> |
... | @@ -67,7 +67,7 @@ | ... | @@ -67,7 +67,7 @@ |
67 | <!-- 显示层数 --> | 67 | <!-- 显示层数 --> |
68 | <td class="floor">{{cs.sjc}}层</td> | 68 | <td class="floor">{{cs.sjc}}层</td> |
69 | <!-- 显示户 --> | 69 | <!-- 显示户 --> |
70 | <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> | 70 | <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> |
71 | </tr> | 71 | </tr> |
72 | </table> | 72 | </table> |
73 | </div> | 73 | </div> |
... | @@ -238,6 +238,19 @@ export default { | ... | @@ -238,6 +238,19 @@ export default { |
238 | } | 238 | } |
239 | } | 239 | } |
240 | }, | 240 | }, |
241 | //清除选中户 | ||
242 | clearChoosedH(){ | ||
243 | this.$nextTick(()=>{ | ||
244 | //将每个选中的户的选中状态清除 | ||
245 | this.$refs.hBsm.forEach(item=>{ | ||
246 | if(item.className == 'tdSelect'){ | ||
247 | item.className = ''; | ||
248 | } | ||
249 | }); | ||
250 | // 清空hbsmList | ||
251 | this.hbsmList = []; | ||
252 | }) | ||
253 | } | ||
241 | }, | 254 | }, |
242 | computed: { | 255 | computed: { |
243 | createFlagChange() { | 256 | createFlagChange() { |
... | @@ -260,11 +273,12 @@ export default { | ... | @@ -260,11 +273,12 @@ export default { |
260 | }, | 273 | }, |
261 | //监听有无通过输入框查询选择到的户,如果有,将其bsm放入hbsmList | 274 | //监听有无通过输入框查询选择到的户,如果有,将其bsm放入hbsmList |
262 | searchNum(n){ | 275 | searchNum(n){ |
263 | console.log(this.$refs.hBsm,'this.$refs.hBsm'); | 276 | //清除之前选中户 |
277 | this.clearChoosedH(); | ||
278 | // 渲染查询到的户 | ||
264 | this.$nextTick(()=>{ | 279 | this.$nextTick(()=>{ |
265 | this.$refs.hBsm.forEach(item=>{ | 280 | this.$refs.hBsm.forEach(item=>{ |
266 | console.log(item.dataset,'item'); | 281 | if(item.className == 'tdSelect'){ |
267 | if(item.dataset.bsm != ''){ | ||
268 | console.log(item.dataset.bsm,'item.dataset.bsm'); | 282 | console.log(item.dataset.bsm,'item.dataset.bsm'); |
269 | // 判断hbsmList中是否已经存在 | 283 | // 判断hbsmList中是否已经存在 |
270 | if(this.hbsmList.indexOf(item.dataset.bsm) == -1){ | 284 | if(this.hbsmList.indexOf(item.dataset.bsm) == -1){ | ... | ... |
-
Please register or sign in to post a comment