宗地分割的幢信息删除
Showing
1 changed file
with
16 additions
and
35 deletions
... | @@ -179,10 +179,10 @@ | ... | @@ -179,10 +179,10 @@ |
179 | <div class="fghzxx"> | 179 | <div class="fghzxx"> |
180 | <div class="choosedZxx"> | 180 | <div class="choosedZxx"> |
181 | <span v-for="(dzItem,dzIndex) in item.dz" :key="dzIndex+dzItem.xmmc" class="zxx"> | 181 | <span v-for="(dzItem,dzIndex) in item.dz" :key="dzIndex+dzItem.xmmc" class="zxx"> |
182 | {{dzItem.xmmc}} <i class="fa fa-times"></i> | 182 | {{dzItem.xmmc}} <i class="fa fa-times" @click="delZxx(index,dzIndex,'dz')"></i> |
183 | </span> | 183 | </span> |
184 | <span v-for="(zrzItem,zrzIndex) in item.zrz" :key="zrzIndex+zrzItem.xmmc" class="zxx"> | 184 | <span v-for="(zrzItem,zrzIndex) in item.zrz" :key="zrzIndex+zrzItem.xmmc" class="zxx"> |
185 | {{zrzItem.xmmc}} <i class="fa fa-times"></i> | 185 | {{zrzItem.xmmc}} <i class="fa fa-times" @click="delZxx(index,zrzIndex,'zrz')"></i> |
186 | </span> | 186 | </span> |
187 | </div> | 187 | </div> |
188 | <p class="choose"> | 188 | <p class="choose"> |
... | @@ -596,54 +596,35 @@ | ... | @@ -596,54 +596,35 @@ |
596 | }) | 596 | }) |
597 | }, | 597 | }, |
598 | methods: { | 598 | methods: { |
599 | mouseenter(event, index, dzIndex,type) { | 599 | delZxx(index, chilInd,type) { |
600 | let range = document.createRange(); | ||
601 | range.selectNodeContents(event.target); | ||
602 | let selection = window.getSelection(); | ||
603 | selection.removeAllRanges(); | ||
604 | selection.addRange(range); | ||
605 | var self=this; | ||
606 | document.onkeydown = function (e){ | ||
607 | let key = e || window.event || arguments.callee.caller.arguments[0]; | ||
608 | if (key && (key.keyCode == '8' || key.code == 'Delete')) { | ||
609 | let dz={}; | 600 | let dz={}; |
610 | let len=self.zdFghData.newZdlist[index].fwlist.length-1; | 601 | let len=this.zdFghData.newZdlist[index].fwlist.length-1; |
611 | switch (type) { | 602 | switch (type) { |
612 | case "dz": | 603 | case "dz": |
613 | dz = self.zdFghData.newZdlist[index].dz[dzIndex]; | 604 | dz = this.zdFghData.newZdlist[index].dz[chilInd]; |
614 | // 删除数据 | 605 | // 删除数据 |
615 | self.zdFghData.newZdlist[index].dz.splice(dzIndex, 1); | 606 | this.zdFghData.newZdlist[index].dz.splice(chilInd, 1); |
616 | for (let i=0;i<len;i++){ | 607 | for (let i=0;i<len;i++){ |
617 | let fw=self.zdFghData.newZdlist[index].fwlist[i]; | 608 | let fw=this.zdFghData.newZdlist[index].fwlist[i]; |
618 | if (fw.ztype=='dz'&& fw.zbsm == dz.bsm){ | 609 | if (fw.ztype=='dz'&& fw.zbsm == dz.bsm){ |
619 | self.zdFghData.newZdlist[index].fwlist.splice(i, 1); | 610 | this.zdFghData.newZdlist[index].fwlist.splice(i, 1); |
620 | } | 611 | } |
621 | } | 612 | } |
622 | // 添加数据 | 613 | break; |
623 | self.zdDzList.push(dz) | ||
624 | return; | ||
625 | case "zrz": | 614 | case "zrz": |
626 | dz = self.zdFghData.newZdlist[index].zrz[dzIndex]; | 615 | dz = this.zdFghData.newZdlist[index].zrz[chilInd]; |
627 | // 删除数据 | 616 | // 删除数据 |
628 | self.zdFghData.newZdlist[index].zrz.splice(dzIndex, 1); | 617 | this.zdFghData.newZdlist[index].zrz.splice(chilInd, 1); |
629 | for (let i=0;i<len;i++){ | 618 | for (let i=0;i<len;i++){ |
630 | let fw=self.zdFghData.newZdlist[index].fwlist[i]; | 619 | let fw=this.zdFghData.newZdlist[index].fwlist[i]; |
631 | if (fw.ztype=='zrz' && fw.zbsm == dz.bsm){ | 620 | if (fw.ztype=='zrz' && fw.zbsm == dz.bsm){ |
632 | self.zdFghData.newZdlist[index].fwlist.splice(i, 1); | 621 | this.zdFghData.newZdlist[index].fwlist.splice(i, 1); |
633 | } | 622 | } |
634 | } | 623 | } |
635 | // 添加数据 | 624 | break; |
636 | self.zdZrzList.push(dz) | ||
637 | return; | ||
638 | default: | 625 | default: |
639 | return; | 626 | break; |
640 | } | ||
641 | } | 627 | } |
642 | }; | ||
643 | }, | ||
644 | mouseleave(event) { | ||
645 | let selection = window.getSelection(); | ||
646 | selection.removeAllRanges(); | ||
647 | }, | 628 | }, |
648 | // 重置数据 | 629 | // 重置数据 |
649 | result() { | 630 | result() { |
... | @@ -1240,7 +1221,7 @@ | ... | @@ -1240,7 +1221,7 @@ |
1240 | i{ | 1221 | i{ |
1241 | display: none; | 1222 | display: none; |
1242 | position: absolute; | 1223 | position: absolute; |
1243 | right: 4px; | 1224 | right: 0; |
1244 | top: -6px; | 1225 | top: -6px; |
1245 | } | 1226 | } |
1246 | } | 1227 | } | ... | ... |
-
Please register or sign in to post a comment