aa763fa0 by weimo934

Merge remote-tracking branch 'origin/master'

2 parents b674603f ce37300c
...@@ -2,6 +2,7 @@ import store from '../../store/index' ...@@ -2,6 +2,7 @@ import store from '../../store/index'
2 import axios from 'axios' 2 import axios from 'axios'
3 import router from '../../router' 3 import router from '../../router'
4 import {Message, MessageBox} from 'element-ui' 4 import {Message, MessageBox} from 'element-ui'
5 import { Loading } from 'element-ui';
5 import {httpStatus} from '@/api/config' 6 import {httpStatus} from '@/api/config'
6 7
7 // 创建一个 axios 实例 8 // 创建一个 axios 实例
...@@ -16,11 +17,17 @@ const service = axios.create({ ...@@ -16,11 +17,17 @@ const service = axios.create({
16 }) 17 })
17 18
18 function errorLog() { 19 function errorLog() {
20 //请求完成关闭loading
21 // this.$nextTick(() => { // 以服务的方式调用的 Loading 需要异步关闭
22 loadingInstance.close();
23 // });
19 MessageBox.alert('报错了请联系管理员', '消息提示', { 24 MessageBox.alert('报错了请联系管理员', '消息提示', {
20 confirmButtonText: '确定', 25 confirmButtonText: '确定',
21 type: 'warning' 26 type: 'warning'
22 }) 27 })
23 } 28 }
29 //定义loading
30 let loadingInstance = null
24 31
25 // 请求拦截器 32 // 请求拦截器
26 service.interceptors.request.use( 33 service.interceptors.request.use(
...@@ -29,6 +36,13 @@ service.interceptors.request.use( ...@@ -29,6 +36,13 @@ service.interceptors.request.use(
29 // const token = util.cookies.get('token') 36 // const token = util.cookies.get('token')
30 // 让每个请求携带token-- ['X-Token']为自定义key 请根据实际情况自行修改 37 // 让每个请求携带token-- ['X-Token']为自定义key 请根据实际情况自行修改
31 // config.headers['authkey'] = token 38 // config.headers['authkey'] = token
39 //请求发送成功显示loading
40 loadingInstance = Loading.service({
41 lock: true,
42 text: 'Loading',
43 spinner: 'el-icon-loading',
44 background: 'rgba(0, 0, 0, 0.5)'
45 });
32 return config 46 return config
33 }, 47 },
34 error => { 48 error => {
...@@ -43,6 +57,10 @@ service.interceptors.response.use( ...@@ -43,6 +57,10 @@ service.interceptors.response.use(
43 // dataAxios 是 axios 返回数据中的 data 57 // dataAxios 是 axios 返回数据中的 data
44 const dataAxios = response.data 58 const dataAxios = response.data
45 const {code} = dataAxios 59 const {code} = dataAxios
60 //请求完成关闭loading
61 // this.$nextTick(() => { // 以服务的方式调用的 Loading 需要异步关闭
62 loadingInstance.close();
63 // });
46 // 根据 code 进行判断 64 // 根据 code 进行判断
47 if (code === undefined) { 65 if (code === undefined) {
48 // 如果没有 code 代表这不是项目后端开发的接口 比如可能是 D2Admin 请求最新版本 66 // 如果没有 code 代表这不是项目后端开发的接口 比如可能是 D2Admin 请求最新版本
......
...@@ -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: {},
......
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
22 <!-- todo 此处暂时存放的是不动产单元号标识码,而不是不动产单元号--> 22 <!-- todo 此处暂时存放的是不动产单元号标识码,而不是不动产单元号-->
23 <td colspan="4" > 23 <td colspan="4" >
24 <el-input v-model="form.bdcdyh" style="width: 70%" disabled></el-input> 24 <el-input v-model="form.bdcdyh" style="width: 70%" disabled></el-input>
25 <el-button @click.prevent="" size="mini" type="primary" style="width:25%;margin-left:3%">生成</el-button> 25 <el-button @click.prevent="generatorCode" size="mini" type="primary" style="width:25%;margin-left:3%">生成</el-button>
26 </td> 26 </td>
27 <td colspan="2" align="center" >原不动产单元</td> 27 <td colspan="2" align="center" >原不动产单元</td>
28 <td colspan="4" > 28 <td colspan="4" >
...@@ -376,7 +376,8 @@ ...@@ -376,7 +376,8 @@
376 <script> 376 <script>
377 import Qlr from "./../../../../../components/formMenu/qlr"; 377 import Qlr from "./../../../../../components/formMenu/qlr";
378 import Qlxz from "./../../../../../components/formMenu/qlxz_simple"; 378 import Qlxz from "./../../../../../components/formMenu/qlxz_simple";
379 import {getQjHDetailByBsm,updateQjH} from "./../../../../../api/h" 379 import {getQjHDetailByBsm,updateQjH} from "./../../../../../api/h";
380 import {getBdcdyh} from "./../../../../../api/zrz"
380 export default { 381 export default {
381 name:'zrz', 382 name:'zrz',
382 components:{ 383 components:{
...@@ -519,32 +520,35 @@ ...@@ -519,32 +520,35 @@
519 if(res.code===200){ 520 if(res.code===200){
520 this.form = res.result; 521 this.form = res.result;
521 if(this.form.scyclx==='0'){ 522 if(this.form.scyclx==='0'){
522 this.form.ycjzmj = this.form.jzmj; 523 this.$set(this.form,"ycjzmj", this.form.jzmj)
523 this.form.yctnjzmj=this.form.tnjzmj; 524 this.$set(this.form,"yctnjzmj", this.form.tnjzmj)
524 this.form.ycftjzmj=this.form.ftjzmj; 525 this.$set(this.form,"ycftjzmj", this.form.ftjzmj)
525 this.form.ycdxbfjzmj=this.form.dxbfjzmj; 526 this.$set(this.form,"ycdxbfjzmj", this.form.dxbfjzmj)
526 this.form.ycqtjzmj=this.form.qtjzmj; 527 this.$set(this.form,"ycqtjzmj", this.form.qtjzmj)
527 this.form.ycftxs=this.form.ftxs; 528 this.$set(this.form,"ycftxs", this.form.ftxs)
528 this.form.scjzmj = this.form.gljzmj; 529 this.$set(this.form,"scjzmj", this.form.gljzmj)
529 this.form.sctnjzmj=this.form.gltnjzmj; 530 this.$set(this.form,"sctnjzmj", this.form.gltnjzmj)
530 this.form.scftjzmj=this.form.glftjzmj; 531 this.$set(this.form,"scftjzmj", this.form.glftjzmj)
531 this.form.scdxbfjzmj=this.form.gldxbfjzmj; 532 this.$set(this.form,"scdxbfjzmj", this.form.gldxbfjzmj)
532 this.form.scqtjzmj=this.form.glqtjzmj; 533 this.$set(this.form,"scqtjzmj", this.form.gltjzmj)
533 this.form.scftxs=this.form.glftxs; 534 this.$set(this.form,"scftxs", this.form.glftxs)
534 }else if(this.form.scyclx==='1'){ 535 }else if(this.form.scyclx==='1'){
535 this.form.scjzmj = this.form.jzmj; 536 this.$set(this.form,"scjzmj", this.form.jzmj)
536 this.form.sctnjzmj=this.form.tnjzmj; 537 this.$set(this.form,"sctnjzmj", this.form.tnjzmj)
537 this.form.scftjzmj=this.form.ftjzmj; 538 this.$set(this.form,"scftjzmj", this.form.ftjzmj)
538 this.form.scdxbfjzmj=this.form.dxbfjzmj; 539 this.$set(this.form,"scdxbfjzmj", this.form.dxbfjzmj)
539 this.form.scqtjzmj=this.form.qtjzmj; 540 this.$set(this.form,"scqtjzmj", this.form.qtjzmj)
540 this.form.scftxs=this.form.ftxs; 541 this.$set(this.form,"scftxs", this.form.ftxs)
541 this.form.ycjzmj = this.form.gljzmj; 542 this.$set(this.form,"ycjzmj", this.form.gljzmj)
542 this.form.yctnjzmj=this.form.gltnjzmj; 543 this.$set(this.form,"yctnjzmj", this.form.gltnjzmj)
543 this.form.ycftjzmj=this.form.glftjzmj; 544 this.$set(this.form,"ycftjzmj", this.form.glftjzmj)
544 this.form.ycdxbfjzmj=this.form.gldxbfjzmj; 545 this.$set(this.form,"ycdxbfjzmj", this.form.gldxbfjzmj)
545 this.form.ycqtjzmj=this.form.glqtjzmj; 546 this.$set(this.form,"ycqtjzmj", this.form.gltjzmj)
546 this.form.ycftxs=this.form.glftxs; 547 this.$set(this.form,"ycftxs", this.form.glftxs)
548
547 } 549 }
550 console.log("=============")
551 console.log(this.form)
548 if(res.result.fwytList.length===0){ 552 if(res.result.fwytList.length===0){
549 this.form.fwytList.push({ 553 this.form.fwytList.push({
550 glbsm:'', //关联标识码 554 glbsm:'', //关联标识码
...@@ -649,6 +653,13 @@ ...@@ -649,6 +653,13 @@
649 onReset(){ 653 onReset(){
650 654
651 }, 655 },
656 generatorCode(){
657 getBdcdyh(this.form.zrzh,"h")
658 .then((res)=>{
659 this.form.zrzh=res.result.substring(0,24);
660 this.form.bdcdyh=res.result;
661 })
662 },
652 } 663 }
653 } 664 }
654 </script> 665 </script>
......
...@@ -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;
......