feat(lpb):批量层添加提示
Showing
2 changed files
with
37 additions
and
8 deletions
| ... | @@ -41,7 +41,7 @@ | ... | @@ -41,7 +41,7 @@ |
| 41 | class="radioBtn" | 41 | class="radioBtn" |
| 42 | label="4" | 42 | label="4" |
| 43 | border | 43 | border |
| 44 | @click="plcVisible" | 44 | @click="openPlC" |
| 45 | >批量层</el-button | 45 | >批量层</el-button |
| 46 | > | 46 | > |
| 47 | <el-button | 47 | <el-button |
| ... | @@ -238,7 +238,7 @@ | ... | @@ -238,7 +238,7 @@ |
| 238 | <!-- 批量操作弹出框 --> | 238 | <!-- 批量操作弹出框 --> |
| 239 | <pl-h :plh-visible="plhVisible" :bsms="bsms" @close="plhClose" @lodding="lodding"></pl-h> | 239 | <pl-h :plh-visible="plhVisible" :bsms="bsms" @close="plhClose" @lodding="lodding"></pl-h> |
| 240 | <pl-zl :pl-zl-visible="plzlVisible" :bsms="bsms" @close="plZlClose" @lodding="lodding"></pl-zl> | 240 | <pl-zl :pl-zl-visible="plzlVisible" :bsms="bsms" @close="plZlClose" @lodding="lodding"></pl-zl> |
| 241 | <pl-c :plc-visible="plcVisible" :bsms="bsms" @close="plcClose" @lodding="lodding"></pl-c> | 241 | <pl-c :plc-visible="plcVisible" :bsms="cbsmList" @close="plcClose" @lodding="lodding"></pl-c> |
| 242 | <pl-sh :plShVisible="plShVisible" :bsms="bsms" @close="plshClose" @lodding="lodding"></pl-sh> | 242 | <pl-sh :plShVisible="plShVisible" :bsms="bsms" @close="plshClose" @lodding="lodding"></pl-sh> |
| 243 | <h-cxlz | 243 | <h-cxlz |
| 244 | :h-cxlz-visble="hcxlzVisible" | 244 | :h-cxlz-visble="hcxlzVisible" |
| ... | @@ -373,6 +373,7 @@ export default { | ... | @@ -373,6 +373,7 @@ export default { |
| 373 | lpbContentwidth: "", | 373 | lpbContentwidth: "", |
| 374 | time: "", | 374 | time: "", |
| 375 | dyztBsmList: {}, //单元状态bsmList | 375 | dyztBsmList: {}, //单元状态bsmList |
| 376 | cbsmList:[], // 层bsmlist | ||
| 376 | }; | 377 | }; |
| 377 | }, | 378 | }, |
| 378 | created() { | 379 | created() { |
| ... | @@ -392,6 +393,13 @@ export default { | ... | @@ -392,6 +393,13 @@ export default { |
| 392 | }, 100); | 393 | }, 100); |
| 393 | }, | 394 | }, |
| 394 | methods: { | 395 | methods: { |
| 396 | openPlC(){ | ||
| 397 | if (this.cbsmList.length <= 0) { | ||
| 398 | Message.warning("请选择层") | ||
| 399 | return | ||
| 400 | } | ||
| 401 | this.plcVisible=true | ||
| 402 | }, | ||
| 395 | openPl(val){ | 403 | openPl(val){ |
| 396 | if (this.bsms.length <= 0) { | 404 | if (this.bsms.length <= 0) { |
| 397 | Message.warning("请选择操作户") | 405 | Message.warning("请选择操作户") |
| ... | @@ -412,8 +420,7 @@ export default { | ... | @@ -412,8 +420,7 @@ export default { |
| 412 | } | 420 | } |
| 413 | }, | 421 | }, |
| 414 | lodding(){ | 422 | lodding(){ |
| 415 | let zrzbsm=this.$store.state.zrzbsm; | 423 | this.$refs.lpbContent; |
| 416 | this.$refs.lpbContent.getLpb(zrzbsm); | ||
| 417 | }, | 424 | }, |
| 418 | hcxlzClose() { | 425 | hcxlzClose() { |
| 419 | this.hcxlzVisible = false; | 426 | this.hcxlzVisible = false; |
| ... | @@ -508,6 +515,11 @@ export default { | ... | @@ -508,6 +515,11 @@ export default { |
| 508 | } | 515 | } |
| 509 | console.log(this.bsms); | 516 | console.log(this.bsms); |
| 510 | }, | 517 | }, |
| 518 | //获取选中层bsmlist | ||
| 519 | getCbsm(data){ | ||
| 520 | this.cbsmList = data; | ||
| 521 | console.log(this.cbsmList); | ||
| 522 | }, | ||
| 511 | //不动产单元号输入框事件 | 523 | //不动产单元号输入框事件 |
| 512 | inputFocus() { | 524 | inputFocus() { |
| 513 | this.inputWidth = 200; | 525 | this.inputWidth = 200; | ... | ... |
| ... | @@ -12,7 +12,7 @@ | ... | @@ -12,7 +12,7 @@ |
| 12 | <table class="chTable" border="1" cellspacing="0" cellpadding="0" v-show="zdys.cs.length>0"> | 12 | <table class="chTable" border="1" cellspacing="0" cellpadding="0" v-show="zdys.cs.length>0"> |
| 13 | <tr v-for="(cs,csIndex) in zdys.cs" :key="csIndex"> | 13 | <tr v-for="(cs,csIndex) in zdys.cs" :key="csIndex"> |
| 14 | <!-- 显示层数 --> | 14 | <!-- 显示层数 --> |
| 15 | <td class="floor" @contextmenu.prevent="openMenu($event, cs,'c')">{{cs.sjc}}层</td> | 15 | <td class="floor" @contextmenu.prevent="openMenu($event, cs,'c')" @click="handleClickC($event,cs)">{{cs.sjc}}层</td> |
| 16 | <!-- 显示户 --> | 16 | <!-- 显示户 --> |
| 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)" @contextmenu.prevent="openMenu($event, hs,'h')">{{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)" @contextmenu.prevent="openMenu($event, hs,'h')">{{hs.shbw}}</td> |
| 18 | </tr> | 18 | </tr> |
| ... | @@ -28,7 +28,7 @@ | ... | @@ -28,7 +28,7 @@ |
| 28 | <table class="chTable" border="1" cellspacing="0" cellpadding="0"> | 28 | <table class="chTable" border="1" cellspacing="0" cellpadding="0"> |
| 29 | <tr v-for="(cs) in ljzs.cs" :key="cs.bsm"> | 29 | <tr v-for="(cs) in ljzs.cs" :key="cs.bsm"> |
| 30 | <!-- 显示层数 --> | 30 | <!-- 显示层数 --> |
| 31 | <td class="floor" @contextmenu.prevent="openMenu($event, cs,'c')">{{cs.sjc}}层</td> | 31 | <td class="floor" @contextmenu.prevent="openMenu($event, cs,'c')" @click="handleClickC($event,cs)">{{cs.sjc}}层</td> |
| 32 | <!-- 显示户 --> | 32 | <!-- 显示户 --> |
| 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)" @contextmenu.prevent="openMenu($event, hs,'h')">{{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)" @contextmenu.prevent="openMenu($event, hs,'h')">{{hs.shbw}}</td> |
| 34 | </tr> | 34 | </tr> |
| ... | @@ -53,7 +53,7 @@ | ... | @@ -53,7 +53,7 @@ |
| 53 | <table class="chTable" border="1" cellspacing="0" cellpadding="0" v-show="zdys.cs.length>0"> | 53 | <table class="chTable" border="1" cellspacing="0" cellpadding="0" v-show="zdys.cs.length>0"> |
| 54 | <tr v-for="(cs,csIndex) in zdys.cs" :key="csIndex"> | 54 | <tr v-for="(cs,csIndex) in zdys.cs" :key="csIndex"> |
| 55 | <!-- 显示层数 --> | 55 | <!-- 显示层数 --> |
| 56 | <td class="floor" @contextmenu.prevent="openMenu($event, cs,'c')">{{cs.sjc}}层</td> | 56 | <td class="floor" @contextmenu.prevent="openMenu($event, cs,'c')" @click="handleClickC($event,cs)">{{cs.sjc}}层</td> |
| 57 | <!-- 显示户 --> | 57 | <!-- 显示户 --> |
| 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)" @contextmenu.prevent="openMenu($event, hs,'h')">{{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)" @contextmenu.prevent="openMenu($event, hs,'h')">{{hs.shbw}}</td> |
| 59 | </tr> | 59 | </tr> |
| ... | @@ -65,7 +65,7 @@ | ... | @@ -65,7 +65,7 @@ |
| 65 | <table class="chTable" ref="ch" border="1" cellspacing="0" cellpadding="0" v-show="lpbData.cs != null && lpbData.cs.length>0" > | 65 | <table class="chTable" ref="ch" border="1" cellspacing="0" cellpadding="0" v-show="lpbData.cs != null && lpbData.cs.length>0" > |
| 66 | <tr v-for="(cs,csIndex) in lpbData.cs" :key="csIndex"> | 66 | <tr v-for="(cs,csIndex) in lpbData.cs" :key="csIndex"> |
| 67 | <!-- 显示层数 --> | 67 | <!-- 显示层数 --> |
| 68 | <td class="floor" @contextmenu.prevent="openMenu($event, cs,'c')">{{cs.sjc}}层</td> | 68 | <td class="floor" @contextmenu.prevent="openMenu($event, cs,'c')" @click="handleClickC($event,cs)">{{cs.sjc}}层</td> |
| 69 | <!-- 显示户 --> | 69 | <!-- 显示户 --> |
| 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)" @contextmenu.prevent="openMenu($event, hs,'h')">{{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)" @contextmenu.prevent="openMenu($event, hs,'h')">{{hs.shbw}}</td> |
| 71 | </tr> | 71 | </tr> |
| ... | @@ -117,6 +117,7 @@ export default { | ... | @@ -117,6 +117,7 @@ export default { |
| 117 | ljzzdyHeight: 0, //逻辑幢下幢单元的div高度 | 117 | ljzzdyHeight: 0, //逻辑幢下幢单元的div高度 |
| 118 | loading: true, | 118 | loading: true, |
| 119 | hbsmList: [], | 119 | hbsmList: [], |
| 120 | cbsmList:[], | ||
| 120 | time: null, //区分单双击事件的定时器 | 121 | time: null, //区分单双击事件的定时器 |
| 121 | searchNum: Math.random(), | 122 | searchNum: Math.random(), |
| 122 | //接收父组件传入的根据单元状态/房屋性质/房屋用途筛选的户bsmList | 123 | //接收父组件传入的根据单元状态/房屋性质/房屋用途筛选的户bsmList |
| ... | @@ -278,6 +279,7 @@ export default { | ... | @@ -278,6 +279,7 @@ export default { |
| 278 | }, | 279 | }, |
| 279 | //户右键点击事件 | 280 | //户右键点击事件 |
| 280 | openMenu(e,item,type){ | 281 | openMenu(e,item,type){ |
| 282 | debugger | ||
| 281 | console.log(e,'e'); | 283 | console.log(e,'e'); |
| 282 | this.lpbChLeft = e.pageX; | 284 | this.lpbChLeft = e.pageX; |
| 283 | this.lpbChTop = e.pageY; | 285 | this.lpbChTop = e.pageY; |
| ... | @@ -285,6 +287,20 @@ export default { | ... | @@ -285,6 +287,20 @@ export default { |
| 285 | this.rightClickFlag = type; | 287 | this.rightClickFlag = type; |
| 286 | this.lpbChVisible = true; | 288 | this.lpbChVisible = true; |
| 287 | }, | 289 | }, |
| 290 | // 层选中事件 | ||
| 291 | handleClickC(e,item){ | ||
| 292 | //判断点击的层是否选中 | ||
| 293 | if (e.target.className.indexOf("tdSelect") == -1) { | ||
| 294 | //未选中→选中 | ||
| 295 | e.target.className += " tdSelect"; //加边框 | ||
| 296 | this.cbsmList.push(item.bsm); // 将户bsm放进hbsmList | ||
| 297 | } else { | ||
| 298 | //选中→未选中 | ||
| 299 | e.target.className = "floor"; | ||
| 300 | this.deleteArrOption(this.cbsmList,item.bsm); | ||
| 301 | } | ||
| 302 | this.$parent.getCbsm(this.cbsmList); | ||
| 303 | }, | ||
| 288 | //关闭右键菜单 | 304 | //关闭右键菜单 |
| 289 | closeMenu(){ | 305 | closeMenu(){ |
| 290 | this.lpbChVisible = false | 306 | this.lpbChVisible = false |
| ... | @@ -485,6 +501,7 @@ export default { | ... | @@ -485,6 +501,7 @@ export default { |
| 485 | background-image: url("../../../../../assets/tdSelect.png"); | 501 | background-image: url("../../../../../assets/tdSelect.png"); |
| 486 | background-repeat: no-repeat; | 502 | background-repeat: no-repeat; |
| 487 | background-position: right top; | 503 | background-position: right top; |
| 504 | background-size: 30px; | ||
| 488 | } | 505 | } |
| 489 | } | 506 | } |
| 490 | } | 507 | } | ... | ... |
-
Please register or sign in to post a comment