369d41b4 by weimo934

feat(lpb):选择幢删除幢

1 parent 8bfb8760
......@@ -567,26 +567,38 @@
var self=this;
document.onkeydown = function (e){
let key = e || window.event || arguments.callee.caller.arguments[0];
console.log(key.code, 'keycode')
if (key && (key.keyCode == '8' || key.code == 'Delete')) {
let dz={};
let len=self.zdFghData.newZdlist[index].fwlist.length-1;
switch (type) {
case "dz":
dz = self.zdFghData.newZdlist[index].dz[dzIndex];
// 删除数据
self.zdFghData.newZdlist[index].dz.splice(dzIndex, 1);
for (let i=0;i<len;i++){
let fw=self.zdFghData.newZdlist[index].fwlist[i];
if (fw.ztype=='dz'&& fw.zbsm == dz.bsm){
self.zdFghData.newZdlist[index].fwlist.splice(i, 1);
}
}
// 添加数据
self.zdDzList.push(dz)
break;
return;
case "zrz":
dz = self.zdFghData.newZdlist[index].zrz[dzIndex];
// 删除数据
self.zdFghData.newZdlist[index].zrz.splice(dzIndex, 1);
for (let i=0;i<len;i++){
let fw=self.zdFghData.newZdlist[index].fwlist[i];
if (fw.ztype=='zrz' && fw.zbsm == dz.bsm){
self.zdFghData.newZdlist[index].fwlist.splice(i, 1);
}
}
// 添加数据
self.zdZrzList.push(dz)
break;
return;
default:
break;
return;
}
}
};
......