|
@@ -30,7 +30,7 @@
|
|
|
<template slot-scope="scope">
|
|
|
<el-button type="text" size="small" @click="toEditDesc(scope.row,scope.$index)">修改</el-button>
|
|
|
<span style="margin:0 3px;">|</span>
|
|
|
- <el-button type="text" size="small" class="delete" @click="showDelDialog(scope.row.id)">删除</el-button>
|
|
|
+ <el-button type="text" size="small" class="delete" @click="showDelDialog(scope.row,scope.row.id)">删除</el-button>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
@@ -298,7 +298,7 @@
|
|
|
resolve();
|
|
|
}).catch(() => {});
|
|
|
},
|
|
|
- showDelDialog(id){
|
|
|
+ showDelDialog(item,id){
|
|
|
this.showConfirmDialog('是否删除该版本说明?',()=>{
|
|
|
if(!this.isCopy){
|
|
|
api.delVersionInfo({id}).then((res)=>{
|
|
@@ -320,7 +320,9 @@
|
|
|
}else{
|
|
|
let newList = JSON.parse(JSON.stringify(this.list));
|
|
|
for(let i in newList){
|
|
|
- if(newList[i].id==id){
|
|
|
+ if(id && newList[i].id==id){
|
|
|
+ this.list.splice(i,1);
|
|
|
+ }else if(newList[i].title == item.title && newList[i].description == item.description){//新增的没有id
|
|
|
this.list.splice(i,1);
|
|
|
}
|
|
|
}
|