fix:修改asset删除的逻辑
This commit is contained in:
@@ -785,6 +785,10 @@
|
|||||||
tableDataSort(item){
|
tableDataSort(item){
|
||||||
this.$emit('tableDataSort',item);
|
this.$emit('tableDataSort',item);
|
||||||
},
|
},
|
||||||
|
pageNo(val) {
|
||||||
|
this.pageObj.pageNo = val;
|
||||||
|
this.getTableData();
|
||||||
|
},
|
||||||
// label tooltip是否显示
|
// label tooltip是否显示
|
||||||
labelToolTipDis(labelType){
|
labelToolTipDis(labelType){
|
||||||
switch(labelType){
|
switch(labelType){
|
||||||
@@ -844,6 +848,14 @@
|
|||||||
},
|
},
|
||||||
immediate: true,
|
immediate: true,
|
||||||
deep:true,
|
deep:true,
|
||||||
|
},
|
||||||
|
tableData: {
|
||||||
|
deep: true,
|
||||||
|
handler(n) {
|
||||||
|
if (n.length === 0 && this.pageObj.pageNo > 1) {
|
||||||
|
this.pageNo(this.pageObj.pageNo-1);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
|
|||||||
@@ -21,7 +21,7 @@
|
|||||||
<button :title="$t('overall.batchEdit')" @click.stop="batchEdit" class="nz-btn nz-btn-size-normal nz-btn-style-light" id="asset-batch-asset" style="margin-left: 15px" v-has="'asset_toBatchEdit'">
|
<button :title="$t('overall.batchEdit')" @click.stop="batchEdit" class="nz-btn nz-btn-size-normal nz-btn-style-light" id="asset-batch-asset" style="margin-left: 15px" v-has="'asset_toBatchEdit'">
|
||||||
<i class="nz-icon nz-icon-batch-edit"></i>
|
<i class="nz-icon nz-icon-batch-edit"></i>
|
||||||
</button>
|
</button>
|
||||||
<delete-button :delete-objs="batchDeleteObjs" @after="afterTableListChange" api="asset" v-has="'asset_delete'"></delete-button>
|
<delete-button :delete-objs="batchDeleteObjs" @after="getTableData" api="asset" v-has="'asset_delete'"></delete-button>
|
||||||
</div>
|
</div>
|
||||||
<div class="pagination-top pagination-top-hide display-none"></div>
|
<div class="pagination-top pagination-top-hide display-none"></div>
|
||||||
</div>
|
</div>
|
||||||
@@ -426,6 +426,16 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
tableData: {
|
||||||
|
deep: true,
|
||||||
|
handler(n) {
|
||||||
|
if (n.length === 0 && this.pageObj.pageNo > 1) {
|
||||||
|
this.pageNo(this.pageObj.pageNo-1);
|
||||||
|
}else if(n.length === 0 && this.pageObj.pageNo === 1){
|
||||||
|
this.afterTableListChange();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
fullScreen() {
|
fullScreen() {
|
||||||
@@ -545,7 +555,7 @@
|
|||||||
this.$delete("asset?ids=" + asset.id).then(response => {
|
this.$delete("asset?ids=" + asset.id).then(response => {
|
||||||
if (response.code === 200) {
|
if (response.code === 200) {
|
||||||
this.$message({duration: 2000, type: 'success', message: this.$t("tip.deleteSuccess")});
|
this.$message({duration: 2000, type: 'success', message: this.$t("tip.deleteSuccess")});
|
||||||
this.afterTableListChange()
|
this.getTableData()
|
||||||
} else {
|
} else {
|
||||||
this.$message.error(response.msg);
|
this.$message.error(response.msg);
|
||||||
}
|
}
|
||||||
@@ -583,7 +593,7 @@
|
|||||||
this.rightBox.show = false;
|
this.rightBox.show = false;
|
||||||
this.rightBox.batchShow = false;
|
this.rightBox.batchShow = false;
|
||||||
if (refresh) {
|
if (refresh) {
|
||||||
this.afterTableListChange()
|
this.getTableData()
|
||||||
this.loadKeys();
|
this.loadKeys();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user