py项目增加上下且或判断

master
e 3 years ago
parent 3537333baa
commit e09cd40788
  1. 4
      src/views/Program.vue
  2. 12
      src/views/Transaction.vue

@ -409,15 +409,11 @@ export default {
type: "warning",
center: true,
}).then(() => {
// this.tableData.splice(index, 1);
console.log(index)
console.log(this.tableData.length)
if (index+1 == this.tableData.length){
this.tableData.splice(index - 1, 2)
}else{
this.tableData.splice(index,2);
}
this.itemkey = Math.random()
this.isAddRule = false;
}).catch(() => {})

@ -894,7 +894,12 @@ export default {
this.$refs[`tree-${index}`].setCheckedKeys([this.tableData[index].operationIds]);
}
} else {
this.tableData.splice(index-1, 2);
if (index+1 == this.tableData.length){
this.tableData.splice(index - 1, 2)
}else{
this.tableData.splice(index,2);
}
// this.tableData.splice(index-1, 2);
// index ? this.tableData.splice(index - 1, 1) : this.tableData.splice(0, 1);
this.isAddRule = false;
}
@ -909,8 +914,11 @@ export default {
// if(index+1 == this.tableData.length){
// index = index-1
// }
if (index+1 == this.tableData.length){
this.tableData.splice(index - 1, 2)
}else{
this.tableData.splice(index,2);
index ? this.tableData.splice(index - 1, 1) : this.tableData.splice(0, 1);
}
this.itemkey = Math.random()
this.tableData.forEach(async (item, index) => {
//

Loading…
Cancel
Save