范围属性变更业务逻辑修改
Showing
4 changed files
with
108 additions
and
64 deletions
This diff is collapsed.
Click to expand it.
... | @@ -84,7 +84,7 @@ | ... | @@ -84,7 +84,7 @@ |
84 | <div class="lpb-content" ref="lpbContentWrap" :style="{ height: lpbContentHeight + 'px' }"> | 84 | <div class="lpb-content" ref="lpbContentWrap" :style="{ height: lpbContentHeight + 'px' }"> |
85 | <!-- 楼盘表主体 --> | 85 | <!-- 楼盘表主体 --> |
86 | <div class="lp-overview" :style="{ width: lpbContentwidth + 'px' }"> | 86 | <div class="lp-overview" :style="{ width: lpbContentwidth + 'px' }"> |
87 | <lpbContent ref="lpbContent" :zrzbsm='zrzbsm' :isHbfg = true :isHb="isHb"></lpbContent> | 87 | <lpbContent ref="lpbContent" :zrzbsm='zrzbsm' lpbParent = 'isHbfg' :isHb="isHb"></lpbContent> |
88 | </div> | 88 | </div> |
89 | <!-- 右侧图例 --> | 89 | <!-- 右侧图例 --> |
90 | <div class="lp-legend"> | 90 | <div class="lp-legend"> |
... | @@ -538,8 +538,11 @@ export default { | ... | @@ -538,8 +538,11 @@ export default { |
538 | .lp-overview { | 538 | .lp-overview { |
539 | transition: 0.5s; | 539 | transition: 0.5s; |
540 | flex: 1; | 540 | flex: 1; |
541 | padding-right: 20px; | 541 | margin-right: 20px; |
542 | box-sizing: border-box; | 542 | box-sizing: border-box; |
543 | border: 1px solid #ececec; | ||
544 | border-top: 0; | ||
545 | border-bottom: 0; | ||
543 | } | 546 | } |
544 | .lp-legend { | 547 | .lp-legend { |
545 | transition: 0.5s; | 548 | transition: 0.5s; | ... | ... |
... | @@ -257,10 +257,6 @@ | ... | @@ -257,10 +257,6 @@ |
257 | :bsms="bsms" | 257 | :bsms="bsms" |
258 | @close="hcxlzClose" | 258 | @close="hcxlzClose" |
259 | ></h-cxlz> | 259 | ></h-cxlz> |
260 | <!-- 双击户的弹出框 --> | ||
261 | <el-dialog v-dialogDrag :close-on-click-modal="false" title="户编辑" class="hbjDialog" :visible.sync="hbjVisible" width="70%" > | ||
262 | <hbj ref="hbj" :bsm="hbsm" :scyclx="scyclx"></hbj> | ||
263 | </el-dialog> | ||
264 | </div> | 260 | </div> |
265 | </template> | 261 | </template> |
266 | 262 | ||
... | @@ -275,7 +271,6 @@ import LineTree from "@components/lineTree/lineTree"; | ... | @@ -275,7 +271,6 @@ import LineTree from "@components/lineTree/lineTree"; |
275 | import addLjz from "./ljz/index"; | 271 | import addLjz from "./ljz/index"; |
276 | import addZdy from "./zdy/index"; | 272 | import addZdy from "./zdy/index"; |
277 | import addCh from "./ch/index"; | 273 | import addCh from "./ch/index"; |
278 | import hbj from "./hbj/index"; | ||
279 | import lpbContent from "./lpbContent/index"; | 274 | import lpbContent from "./lpbContent/index"; |
280 | import { getLpbMenuTree, batchScYcChange, getLpbTj,batchGeneratorBdcdyh,getLpbFwytAndQlxz ,batchCommit} from "@api/lpb"; | 275 | import { getLpbMenuTree, batchScYcChange, getLpbTj,batchGeneratorBdcdyh,getLpbFwytAndQlxz ,batchCommit} from "@api/lpb"; |
281 | 276 | ||
... | @@ -291,14 +286,12 @@ export default { | ... | @@ -291,14 +286,12 @@ export default { |
291 | PlSh, | 286 | PlSh, |
292 | PlH, | 287 | PlH, |
293 | PlZl, | 288 | PlZl, |
294 | hbj, | ||
295 | HCxlz, | 289 | HCxlz, |
296 | }, | 290 | }, |
297 | props: {}, | 291 | props: {}, |
298 | data() { | 292 | data() { |
299 | return { | 293 | return { |
300 | bsms: [], | 294 | bsms: [], |
301 | hbsm: "", | ||
302 | dialogVisible: false, | 295 | dialogVisible: false, |
303 | plcVisible: false, | 296 | plcVisible: false, |
304 | plhVisible: false, | 297 | plhVisible: false, |
... | @@ -565,12 +558,7 @@ export default { | ... | @@ -565,12 +558,7 @@ export default { |
565 | getHbsm(data, type) { | 558 | getHbsm(data, type) { |
566 | if (type) { | 559 | if (type) { |
567 | // 双击 | 560 | // 双击 |
568 | this.hbsm = data; | 561 | |
569 | this.$store.state.hbsm=this.data; | ||
570 | this.hbjVisible = true; | ||
571 | this.$nextTick(function() { | ||
572 | this.$refs.hbj.getHInfo(this.hbsm); | ||
573 | }); | ||
574 | } else { | 562 | } else { |
575 | //单击 TO DO | 563 | //单击 TO DO |
576 | this.bsms = data; | 564 | this.bsms = data; | ... | ... |
... | @@ -302,7 +302,9 @@ | ... | @@ -302,7 +302,9 @@ |
302 | <li v-show="rightClickFlag == 'hb'" :class="canHb!='sxhb'? 'cantHb':''" @click="handleHb('sxhb')">上下合并</li> | 302 | <li v-show="rightClickFlag == 'hb'" :class="canHb!='sxhb'? 'cantHb':''" @click="handleHb('sxhb')">上下合并</li> |
303 | <!-- 分割 --> | 303 | <!-- 分割 --> |
304 | <li v-show="rightClickFlag == 'fg'" @click="handleFg">户分割</li> | 304 | <li v-show="rightClickFlag == 'fg'" @click="handleFg">户分割</li> |
305 | <!-- <li v-show="rightClickFlag == 'fg'" :class="canHb!='sxhb'? 'cantHb':''" @click="handleHb('sxhb')">上下合并</li> --> | 305 | <!-- 范围属性变更 --> |
306 | <li v-show="rightClickFlag == 'fwsxbg'" @click="handleFwsxbg">变更信息</li> | ||
307 | |||
306 | 308 | ||
307 | </ul> | 309 | </ul> |
308 | <!-- 层操作弹框 --> | 310 | <!-- 层操作弹框 --> |
... | @@ -362,6 +364,10 @@ | ... | @@ -362,6 +364,10 @@ |
362 | :type="scyclx" | 364 | :type="scyclx" |
363 | @loading="loadingData($store.state.zrzbsm,$parent.scyclx)" | 365 | @loading="loadingData($store.state.zrzbsm,$parent.scyclx)" |
364 | ></move-h> | 366 | ></move-h> |
367 | <!-- 双击户的弹出框 --> | ||
368 | <el-dialog v-dialogDrag :close-on-click-modal="false" title="户编辑" class="hbjDialog" :visible.sync="hbjVisible" width="80%" > | ||
369 | <hbj ref="hbj" :bsm="hbsm" :scyclx="scyclx"></hbj> | ||
370 | </el-dialog> | ||
365 | </div> | 371 | </div> |
366 | </template> | 372 | </template> |
367 | <script> | 373 | <script> |
... | @@ -369,22 +375,24 @@ import moveH from "@components/moveH/moveH"; | ... | @@ -369,22 +375,24 @@ import moveH from "@components/moveH/moveH"; |
369 | import { getLpb, insertUpDownC, deleteCByBsm } from "@api/lpb"; | 375 | import { getLpb, insertUpDownC, deleteCByBsm } from "@api/lpb"; |
370 | import { hhb,hfg } from "@api/h"; | 376 | import { hhb,hfg } from "@api/h"; |
371 | import { Message } from 'element-ui'; | 377 | import { Message } from 'element-ui'; |
378 | import { fwsxbgbl } from "@api/common"; | ||
379 | import hbj from "../hbj/index"; | ||
372 | export default { | 380 | export default { |
373 | name: "", | 381 | name: "", |
374 | components: { moveH }, | 382 | components: { moveH,hbj }, |
375 | props: { | 383 | props: { |
376 | isHbfg:{ | ||
377 | type:Boolean, | ||
378 | default:false | ||
379 | }, | ||
380 | zrzbsm:{ | 384 | zrzbsm:{ |
381 | type:String, | 385 | type:String, |
382 | default:'' | 386 | default:'' |
383 | }, | 387 | }, |
388 | lpbParent:{ | ||
389 | type:String, | ||
390 | default:'isLpb' | ||
391 | }, | ||
384 | isHb:{ | 392 | isHb:{ |
385 | type:Boolean, | 393 | type:Boolean, |
386 | default:true | 394 | default:true |
387 | } | 395 | }, |
388 | }, | 396 | }, |
389 | data() { | 397 | data() { |
390 | return { | 398 | return { |
... | @@ -394,6 +402,7 @@ export default { | ... | @@ -394,6 +402,7 @@ export default { |
394 | cs: [], | 402 | cs: [], |
395 | zdys: [], | 403 | zdys: [], |
396 | }, | 404 | }, |
405 | hbjVisible:false, | ||
397 | lpbContentWidth: "", | 406 | lpbContentWidth: "", |
398 | ljzWidth: 10000, | 407 | ljzWidth: 10000, |
399 | zdyWidth: 1000, | 408 | zdyWidth: 1000, |
... | @@ -402,6 +411,7 @@ export default { | ... | @@ -402,6 +411,7 @@ export default { |
402 | ljzcHeight: 0, //逻辑幢下层户的div高度 | 411 | ljzcHeight: 0, //逻辑幢下层户的div高度 |
403 | ljzzdyHeight: 0, //逻辑幢下幢单元的div高度 | 412 | ljzzdyHeight: 0, //逻辑幢下幢单元的div高度 |
404 | loading: true, | 413 | loading: true, |
414 | hbsm:'', | ||
405 | hbsmList: [], | 415 | hbsmList: [], |
406 | cbsmList: [], | 416 | cbsmList: [], |
407 | time: null, //区分单双击事件的定时器 | 417 | time: null, //区分单双击事件的定时器 |
... | @@ -614,11 +624,17 @@ export default { | ... | @@ -614,11 +624,17 @@ export default { |
614 | //户双击事件 | 624 | //户双击事件 |
615 | dbclick(bsm) { | 625 | dbclick(bsm) { |
616 | clearTimeout(this.time); | 626 | clearTimeout(this.time); |
627 | this.hbsm = bsm; | ||
628 | this.$store.state.hbsm=this.data; | ||
629 | this.hbjVisible = true; | ||
630 | this.$nextTick(function() { | ||
631 | this.$refs.hbj.getHInfo(this.hbsm); | ||
632 | }); | ||
617 | // if (this.isHbfg) { | 633 | // if (this.isHbfg) { |
618 | 634 | ||
619 | // }else{ | 635 | // }else{ |
620 | // this.hbsmList.push(bsm); // 将户bsm放进hbsmList | 636 | // this.hbsmList.push(bsm); // 将户bsm放进hbsmList |
621 | this.$parent.getHbsm(bsm, true); | 637 | // this.$parent.getHbsm(bsm, true); |
622 | // } | 638 | // } |
623 | }, | 639 | }, |
624 | //删除多重数组中的某一项 | 640 | //删除多重数组中的某一项 |
... | @@ -646,49 +662,59 @@ export default { | ... | @@ -646,49 +662,59 @@ export default { |
646 | openMenu(e, item, type) { | 662 | openMenu(e, item, type) { |
647 | this.lpbChLeft = e.pageX; | 663 | this.lpbChLeft = e.pageX; |
648 | this.lpbChTop = e.pageY; | 664 | this.lpbChTop = e.pageY; |
649 | if (this.isHbfg) { | 665 | this.chData = item; |
650 | this.rightClickFlag = this.isHb ? 'hb':'fg'; | 666 | switch (this.lpbParent) { |
651 | if (this.fghbChoosedList.length>1) { | 667 | case 'isHbfg': |
652 | //合并 | 668 | this.rightClickFlag = this.isHb ? 'hb':'fg'; |
653 | this.lpbChVisible = true; | 669 | if (this.fghbChoosedList.length>1) { |
654 | //判断选中户可以执行的合并类型 | 670 | //合并 |
655 | let chIsSame = this.fghbChoosedList.every((item)=> { | 671 | this.lpbChVisible = true; |
656 | return item.ch == this.fghbChoosedList[0].ch; | 672 | //判断选中户可以执行的合并类型 |
657 | }); | 673 | let chIsSame = this.fghbChoosedList.every((item)=> { |
658 | let hhIsSame = this.fghbChoosedList.every((item)=> { | 674 | return item.ch == this.fghbChoosedList[0].ch; |
659 | return item.hh == this.fghbChoosedList[0].hh; | 675 | }); |
660 | }); | 676 | let hhIsSame = this.fghbChoosedList.every((item)=> { |
661 | this.$nextTick(()=>{ | 677 | return item.hh == this.fghbChoosedList[0].hh; |
662 | if(chIsSame){ | 678 | }); |
663 | this.canHb = 'zyhb' | 679 | this.$nextTick(()=>{ |
664 | }else if(hhIsSame){ | 680 | if(chIsSame){ |
665 | this.canHb = 'sxhb' | 681 | this.canHb = 'zyhb' |
682 | }else if(hhIsSame){ | ||
683 | this.canHb = 'sxhb' | ||
684 | }else{ | ||
685 | this.canHb = '' | ||
686 | } | ||
687 | }) | ||
688 | }else{ | ||
689 | //分割 | ||
690 | this.lpbChVisible = true; | ||
691 | this.fgData.oldbsm = item.bsm; | ||
692 | console.log(item,'item'); | ||
693 | //判断户的实际sjcs为1,只能水平分割 | ||
694 | this.fgData.fgfx = item.sjcs == 1 ? 0 : 1; | ||
695 | if(item.sjcs == 1){ | ||
696 | //判断户的实际sjcs为1,只能水平分割 | ||
697 | this.fgData.fgfx = 0; | ||
698 | this.fgData.fghs = ''; | ||
666 | }else{ | 699 | }else{ |
667 | this.canHb = '' | 700 | this.fgData.fgfx = 1; |
701 | //判断户的实际sjhs不为1,分割户数为sjhs的值 | ||
702 | this.fgData.fghs = item.sjcs; | ||
668 | } | 703 | } |
669 | }) | ||
670 | }else{ | ||
671 | //分割 | ||
672 | this.lpbChVisible = true; | ||
673 | this.fgData.oldbsm = item.bsm; | ||
674 | console.log(item,'item'); | ||
675 | //判断户的实际sjcs为1,只能水平分割 | ||
676 | this.fgData.fgfx = item.sjcs == 1 ? 0 : 1; | ||
677 | if(item.sjcs == 1){ | ||
678 | //判断户的实际sjcs为1,只能水平分割 | ||
679 | this.fgData.fgfx = 0; | ||
680 | this.fgData.fghs = ''; | ||
681 | }else{ | ||
682 | this.fgData.fgfx = 1; | ||
683 | //判断户的实际sjhs不为1,分割户数为sjhs的值 | ||
684 | this.fgData.fghs = item.sjcs; | ||
685 | } | 704 | } |
686 | } | 705 | break; |
687 | }else{ | 706 | case 'isFwsxbg': |
688 | console.log(e, "e"); | 707 | console.log(item,'item'); |
689 | this.chData = item; | 708 | this.rightClickFlag = 'fwsxbg'; |
690 | this.rightClickFlag = type; | 709 | this.lpbChVisible = true; |
691 | this.lpbChVisible = true; | 710 | break; |
711 | case 'isLpb': | ||
712 | this.rightClickFlag = type; | ||
713 | this.lpbChVisible = true; | ||
714 | break; | ||
715 | |||
716 | default: | ||
717 | break; | ||
692 | } | 718 | } |
693 | }, | 719 | }, |
694 | // 户单元状态点击事件 | 720 | // 户单元状态点击事件 |
... | @@ -851,6 +877,33 @@ export default { | ... | @@ -851,6 +877,33 @@ export default { |
851 | } | 877 | } |
852 | }) | 878 | }) |
853 | .catch(() => {}); | 879 | .catch(() => {}); |
880 | }, | ||
881 | //范围属性变更 | ||
882 | handleFwsxbg(){ | ||
883 | let params = { bsm: this.chData.bsm, type: 'h'}; | ||
884 | this.$confirm('是否确定范围属性变更?', '提示', { | ||
885 | confirmButtonText: '确定', | ||
886 | cancelButtonText: '取消', | ||
887 | type: 'warning' | ||
888 | }).then(() => { | ||
889 | fwsxbgbl(params) | ||
890 | .then((res) => { | ||
891 | if (res.code == 200) { | ||
892 | console.log('成功'); | ||
893 | this.getLpb(this.zrzbsm,this.scyclx); | ||
894 | this.dbclick(this.chData.bsm); | ||
895 | } else { | ||
896 | this.$message({ | ||
897 | message: res.message, | ||
898 | type: "warning", | ||
899 | }); | ||
900 | } | ||
901 | }).catch((error) => { | ||
902 | |||
903 | }); | ||
904 | }).catch(() => { | ||
905 | |||
906 | }); | ||
854 | } | 907 | } |
855 | }, | 908 | }, |
856 | computed: { | 909 | computed: { | ... | ... |
-
Please register or sign in to post a comment