915e3d02 by 杨威

宗地分割的幢信息删除

1 parent 7d247661
......@@ -179,10 +179,10 @@
<div class="fghzxx">
<div class="choosedZxx">
<span v-for="(dzItem,dzIndex) in item.dz" :key="dzIndex+dzItem.xmmc" class="zxx">
{{dzItem.xmmc}} <i class="fa fa-times"></i>
{{dzItem.xmmc}} <i class="fa fa-times" @click="delZxx(index,dzIndex,'dz')"></i>
</span>
<span v-for="(zrzItem,zrzIndex) in item.zrz" :key="zrzIndex+zrzItem.xmmc" class="zxx">
{{zrzItem.xmmc}} <i class="fa fa-times"></i>
{{zrzItem.xmmc}} <i class="fa fa-times" @click="delZxx(index,zrzIndex,'zrz')"></i>
</span>
</div>
<p class="choose">
......@@ -596,54 +596,35 @@
})
},
methods: {
mouseenter(event, index, dzIndex,type) {
let range = document.createRange();
range.selectNodeContents(event.target);
let selection = window.getSelection();
selection.removeAllRanges();
selection.addRange(range);
var self=this;
document.onkeydown = function (e){
let key = e || window.event || arguments.callee.caller.arguments[0];
if (key && (key.keyCode == '8' || key.code == 'Delete')) {
delZxx(index, chilInd,type) {
let dz={};
let len=self.zdFghData.newZdlist[index].fwlist.length-1;
let len=this.zdFghData.newZdlist[index].fwlist.length-1;
switch (type) {
case "dz":
dz = self.zdFghData.newZdlist[index].dz[dzIndex];
dz = this.zdFghData.newZdlist[index].dz[chilInd];
// 删除数据
self.zdFghData.newZdlist[index].dz.splice(dzIndex, 1);
this.zdFghData.newZdlist[index].dz.splice(chilInd, 1);
for (let i=0;i<len;i++){
let fw=self.zdFghData.newZdlist[index].fwlist[i];
let fw=this.zdFghData.newZdlist[index].fwlist[i];
if (fw.ztype=='dz'&& fw.zbsm == dz.bsm){
self.zdFghData.newZdlist[index].fwlist.splice(i, 1);
this.zdFghData.newZdlist[index].fwlist.splice(i, 1);
}
}
// 添加数据
self.zdDzList.push(dz)
return;
break;
case "zrz":
dz = self.zdFghData.newZdlist[index].zrz[dzIndex];
dz = this.zdFghData.newZdlist[index].zrz[chilInd];
// 删除数据
self.zdFghData.newZdlist[index].zrz.splice(dzIndex, 1);
this.zdFghData.newZdlist[index].zrz.splice(chilInd, 1);
for (let i=0;i<len;i++){
let fw=self.zdFghData.newZdlist[index].fwlist[i];
let fw=this.zdFghData.newZdlist[index].fwlist[i];
if (fw.ztype=='zrz' && fw.zbsm == dz.bsm){
self.zdFghData.newZdlist[index].fwlist.splice(i, 1);
this.zdFghData.newZdlist[index].fwlist.splice(i, 1);
}
}
// 添加数据
self.zdZrzList.push(dz)
return;
break;
default:
return;
}
break;
}
};
},
mouseleave(event) {
let selection = window.getSelection();
selection.removeAllRanges();
},
// 重置数据
result() {
......@@ -1240,7 +1221,7 @@
i{
display: none;
position: absolute;
right: 4px;
right: 0;
top: -6px;
}
}
......