ae9c15e6 by zhaoqian

Merge remote-tracking branch 'origin/master'

2 parents 287cb903 da73539c
...@@ -37,7 +37,7 @@ export default { ...@@ -37,7 +37,7 @@ export default {
37 }, 37 },
38 created() {}, 38 created() {},
39 mounted() { 39 mounted() {
40 this.$store.state.contentWidth = this.$refs.lpb.offsetWidth - 40; 40 this.$store.state.contentWidth = this.$refs.lpb.offsetWidth - 37;
41 }, 41 },
42 computed: {}, 42 computed: {},
43 watch: {}, 43 watch: {},
......
...@@ -4,26 +4,28 @@ ...@@ -4,26 +4,28 @@
4 <div :class="(lpbData.cs.length == 0 && lpbData.zdys.length == 0) ? 'bottom40 ljz-wrap':'ljz-wrap'" :style="{'width':ljzWidth+'px'}" v-show="lpbData.ljzs.length>0"> 4 <div :class="(lpbData.cs.length == 0 && lpbData.zdys.length == 0) ? 'bottom40 ljz-wrap':'ljz-wrap'" :style="{'width':ljzWidth+'px'}" v-show="lpbData.ljzs.length>0">
5 <!-- 循环逻辑幢数据 --> 5 <!-- 循环逻辑幢数据 -->
6 <div class="ljz" ref="ljz" v-for="(ljzs,ljzIndex) in lpbData.ljzs" :key="ljzIndex"> 6 <div class="ljz" ref="ljz" v-for="(ljzs,ljzIndex) in lpbData.ljzs" :key="ljzIndex">
7 <div class="ljz-zdy-wrap" > 7 <div class="ljz-zdy-wrap" :style="{'min-height':ljzzdyHeight+40+'px'}">
8 <!-- 循环逻辑幢下的幢单元 --> 8 <!-- 循环逻辑幢下的幢单元 -->
9 <div class="ljz-zdy" v-show="ljzs.zdys.length>0" v-for="(zdys,zdyIndex) in ljzs.zdys" :key="zdyIndex"> 9 <div class="ljz-zdy" :style="{'min-height':ljzzdyHeight+40+'px'}" ref="ljzzdy" v-show="ljzs.zdys.length>0" v-for="(zdys,zdyIndex) in ljzs.zdys" :key="zdyIndex" >
10 <!-- 循环幢单元下的层户 --> 10 <!-- 循环幢单元下的层户 -->
11 <table class="chTable" border="1" cellspacing="0" cellpadding="0" v-show="zdys.cs.length>0"> 11 <!-- <div class="chTable-wrap"> -->
12 <tr v-for="(cs,csIndex) in zdys.cs" :key="csIndex"> 12 <table class="chTable" :style="{'top':(ljzzdyHeight-1-zdys.cs.length*65)+'px'}" border="1" cellspacing="0" cellpadding="0" v-show="zdys.cs.length>0">
13 <!-- 显示层数 --> 13 <tr v-for="(cs,csIndex) in zdys.cs" :key="csIndex">
14 <td class="floor">{{cs.sjc}}</td> 14 <!-- 显示层数 -->
15 <!-- 显示户 --> 15 <td class="floor">{{cs.sjc}}</td>
16 <td v-for="(hs,hsIndex) in cs.hs" :key="hsIndex" @click="handleTdClick($event,hs.bsm)" @dblclick="dbclick(hs.bsm)">{{hs.hh}}</td> 16 <!-- 显示户 -->
17 </tr> 17 <td v-for="(hs,hsIndex) in cs.hs" :key="hsIndex" @click="handleTdClick($event,hs.bsm)" @dblclick="dbclick(hs.bsm)">{{hs.hh}}</td>
18 </table> 18 </tr>
19 </table>
20 <!-- </div> -->
19 <!-- 幢单元名称 --> 21 <!-- 幢单元名称 -->
20 <div class="zdy-name name"> 22 <div class="zdy-name name">
21 {{zdys.zdymc}} 23 {{zdys.zdymc}}
22 </div> 24 </div>
23 </div> 25 </div>
24 <!-- 循环逻辑幢下的层户 --> 26 <!-- 循环逻辑幢下的层户 -->
25 <div class="ljz-ch" v-if="ljzs.cs.length>0"> 27 <div class="ljz-ch" :style="{'min-height':ljzzdyHeight+40+'px'}" v-if="ljzs.cs.length>0">
26 <table class="chTable" border="1" cellspacing="0" cellpadding="0"> 28 <table class="chTable" :style="{'top':(ljzzdyHeight+40-1-ljzs.cs.length*65)+'px'}" border="1" cellspacing="0" cellpadding="0">
27 <tr v-for="(cs) in ljzs.cs" :key="cs.bsm"> 29 <tr v-for="(cs) in ljzs.cs" :key="cs.bsm">
28 <!-- 显示层数 --> 30 <!-- 显示层数 -->
29 <td class="floor">{{cs.sjc}}</td> 31 <td class="floor">{{cs.sjc}}</td>
...@@ -98,8 +100,10 @@ export default { ...@@ -98,8 +100,10 @@ export default {
98 lpbContentWidth: "", 100 lpbContentWidth: "",
99 ljzWidth:10000, 101 ljzWidth:10000,
100 zdyWidth:1000, 102 zdyWidth:1000,
101 cHeight:0, 103 cHeight:0, //独立层户的div高度
102 zdyHeight:0, 104 zdyHeight:0, //独立幢单元的div高度
105 ljzcHeight:0, //逻辑幢下层户的div高度
106 ljzzdyHeight:0, //逻辑幢下幢单元的div高度
103 loading:true, 107 loading:true,
104 hbsmList:[], 108 hbsmList:[],
105 time:null, //区分单双击事件的定时器 109 time:null, //区分单双击事件的定时器
...@@ -108,13 +112,13 @@ export default { ...@@ -108,13 +112,13 @@ export default {
108 created() { 112 created() {
109 }, 113 },
110 mounted() { 114 mounted() {
115 this.getLpb(this.$store.state.zrzbsm);
111 setTimeout(() => { 116 setTimeout(() => {
112 //lp-overview宽度 - 右侧图例宽度 - lp-overview滚动条宽度 - lpbContent的pandingRight 117 //tab-content宽度 - 右侧图例宽度 - lp-overview滚动条宽度 - lpbContent的pandingRight
113 this.lpbContentWidth = this.$store.state.contentWidth - 34 - 1 - 20; 118 this.lpbContentWidth = this.$store.state.contentWidth - 34 - 20;
114 //让滚动条滚动至最下面 -6是横向滚动条的高度 119 //让滚动条滚动至最下面 -6是横向滚动条的高度
115 this.$refs.lpbContent.scrollTop = this.$refs.lpbContent.scrollHeight - this.$refs.lpbContent.clientHeight -6; 120 this.$refs.lpbContent.scrollTop = this.$refs.lpbContent.scrollHeight - this.$refs.lpbContent.clientHeight - 6;
116 }, 100); 121 }, 200);
117 this.getLpb(this.$store.state.zrzbsm);
118 }, 122 },
119 methods: { 123 methods: {
120 //获取楼盘表数据 124 //获取楼盘表数据
...@@ -167,12 +171,33 @@ export default { ...@@ -167,12 +171,33 @@ export default {
167 this.zdyHeight = higher ? highest : this.$refs.ch.offsetHeight 171 this.zdyHeight = higher ? highest : this.$refs.ch.offsetHeight
168 this.zdyWidth += this.$refs.ch.offsetWidth; 172 this.zdyWidth += this.$refs.ch.offsetWidth;
169 }else{ 173 }else{
170 higher = highest;
171 this.zdyHeight = highest; 174 this.zdyHeight = highest;
172 } 175 }
173 }else{ 176 }else{
174 // this.zdyWidth = 124; 177 // this.zdyWidth = 124;
175 } 178 }
179
180 //计算逻辑幢下的幢单元和层户的高度
181 if(this.$refs.ljzzdy != undefined && this.$refs.ljzzdy.length > 0){
182 //判断自然幢下有没有比层户高的幢单元
183 let higher = true;
184 //记录最高的幢单元高度 默认为第一个幢单元高度
185 let highest = this.$refs.ljzzdy[0].offsetHeight;
186 this.$refs.ljzzdy.forEach(item=>{
187 this.ljzcHeight = item.offsetHeight > this.ljzcHeight ? item.offsetHeight : this.ljzcHeight;
188 highest = highest > item.offsetHeight ? highest:item.offsetHeight;
189 })
190 //判断有无独立层户
191 if(this.$refs.ljzch != undefined){
192 //计算自然幢下的幢单元高度,如果有比层户高的幢单元,则幢单元高度设为最高的幢单元高度,如果没有,则设为层户高度
193 higher = highest > this.$refs.ljzch.offsetHeight ? true:false;
194 this.ljzzdyHeight = higher ? highest : this.$refs.ljzch.offsetHeight
195 }else{
196 this.ljzzdyHeight = highest;
197 }
198 }else{
199 // this.zdyWidth = 124;
200 }
176 }, 201 },
177 //户单击事件 202 //户单击事件
178 handleTdClick(e,bsm){ 203 handleTdClick(e,bsm){
...@@ -258,18 +283,30 @@ export default { ...@@ -258,18 +283,30 @@ export default {
258 .ljz-zdy{ 283 .ljz-zdy{
259 height: auto; 284 height: auto;
260 margin-right: 20px; 285 margin-right: 20px;
261 display: inline-table; 286 float: left;
287 position: relative;
262 .zdy-name{ 288 .zdy-name{
289 width: 100%;
290 bottom: 0;
291 position: absolute;
263 height: 40px; 292 height: 40px;
264 background-color: rosybrown; 293 background-color: rosybrown;
265 } 294 }
295 // .chTable-wrap{
296 // position: absolute;
297 // bottom: 40px;
298 // }
266 } 299 }
267 .ljz-ch{ 300 .ljz-ch{
268 display: inline-table; 301 float: left;
269 } 302 }
270 .ljz-zdy:last-child{ 303 .ljz-zdy:last-child{
271 margin-right: 0; 304 margin-right: 0;
272 } 305 }
306 .column-reverse{
307 display:flex;
308 flex-direction: column-reverse;
309 }
273 } 310 }
274 .ljz-name{ 311 .ljz-name{
275 width: 100%; 312 width: 100%;
...@@ -299,7 +336,7 @@ export default { ...@@ -299,7 +336,7 @@ export default {
299 margin-right: 20px; 336 margin-right: 20px;
300 display: inline-table; 337 display: inline-table;
301 .zdy-name{ 338 .zdy-name{
302 height: 40px; 339 bottom: 0;
303 background-color: blanchedalmond; 340 background-color: blanchedalmond;
304 } 341 }
305 } 342 }
...@@ -318,15 +355,10 @@ export default { ...@@ -318,15 +355,10 @@ export default {
318 flex-direction: column-reverse; 355 flex-direction: column-reverse;
319 } 356 }
320 } 357 }
321 // .ch-wrap {
322 // width: 800px;
323 // height: 200px;
324 // margin-bottom: 60px;
325 // background-color: rgb(165, 136, 62);
326 // }
327 358
328 // 公共部分样式 start 359 // 公共部分样式 start
329 .chTable{ 360 .chTable{
361 position: relative;
330 tr{ 362 tr{
331 .floor{ 363 .floor{
332 background-color: blanchedalmond; 364 background-color: blanchedalmond;
...@@ -337,7 +369,6 @@ export default { ...@@ -337,7 +369,6 @@ export default {
337 line-height: 64px; 369 line-height: 64px;
338 text-align: center; 370 text-align: center;
339 cursor: pointer; 371 cursor: pointer;
340
341 } 372 }
342 .tdSelect{ 373 .tdSelect{
343 border: 1px solid #0091FF!important; 374 border: 1px solid #0091FF!important;
......