fix:修复module编辑页面bug & 删除图表后前端保存指针错误的问题 & 优化自动提示输入框
This commit is contained in:
@@ -322,11 +322,28 @@
|
||||
message: this.$t("tip.deleteSuccess")
|
||||
});
|
||||
let chartList=this.$refs.chartList.dataList;
|
||||
let nextChart=null,prevChart=null
|
||||
for (let i =0;i< chartList.length;i++){
|
||||
if(chartList[i].id === data.id){
|
||||
chartList.splice(i,1);
|
||||
break;
|
||||
}
|
||||
if(data.next != -1){
|
||||
if(chartList[i].id === data.next){
|
||||
nextChart = chartList[i]
|
||||
}
|
||||
}
|
||||
if(data.prev != 0){
|
||||
if(chartList[i].id === data.prev){
|
||||
prevChart = chartList[i]
|
||||
}
|
||||
}
|
||||
}
|
||||
if(nextChart&&prevChart){ //删除图表为中间位置
|
||||
prevChart.next = nextChart.id;
|
||||
nextChart.prev = prevChart.id;
|
||||
}else{
|
||||
if(!nextChart) prevChart.next = -1;
|
||||
if(!prevChart) nextChart.prev = 0;
|
||||
}
|
||||
// this.getTableData(); //删除相关图表后,刷新面板数据
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user