|
@@ -262,18 +262,24 @@
|
|
|
let waringTxt = (item.isDeleted === 'N'?'是否删除该标准术语?':'是否重新启用该条数据?')
|
|
|
this.showConfirmDialog(waringTxt,()=>{
|
|
|
api.deletMedicalName(param).then((res)=>{
|
|
|
- if(res.data.code=='0'){
|
|
|
- if(!this.searched){
|
|
|
+ if(res.data.code=='0') {
|
|
|
+ if (!this.searched) {
|
|
|
//未点确认时清空搜索条件
|
|
|
- this.filter={
|
|
|
+ this.filter = {
|
|
|
term:'',
|
|
|
type:'',
|
|
|
- libName:''
|
|
|
+ libName:'',
|
|
|
+ isState:'',
|
|
|
};
|
|
|
}
|
|
|
- if(item.isDeleted !== 'N'){ //恢复成功后跳转到筛选条件的首页
|
|
|
+ if (item.isDeleted !== 'N') { //恢复成功后跳转到筛选条件的首页
|
|
|
this.currentPage = 1;
|
|
|
- }
|
|
|
+ } else {
|
|
|
+ if (this.filter.isState!==''&&this.list.length === 1){
|
|
|
+ //有启用状态筛选条件且当前页只有最后一条数据删除时,删除成功后跳转到前一页
|
|
|
+ this.currentPage = this.currentPage===1?1:this.currentPage-1;
|
|
|
+ }
|
|
|
+ }
|
|
|
this.warning(res.data.msg||'操作成功','success');
|
|
|
this.getDataList();
|
|
|
}else{
|