perf: 资产列表批量激活、禁用后刷新列表

This commit is contained in:
“huailei000”
2023-01-31 17:30:09 +08:00
committed by huailei
parent b20386cd18
commit bd1fb83325

View File

@@ -1,6 +1,6 @@
<template> <template>
<div> <div>
<ListTable :table-config="iTableConfig" :header-actions="iHeaderActions" /> <ListTable ref="ListTable" :table-config="iTableConfig" :header-actions="iHeaderActions" />
<PlatformDialog :visible.sync="showPlatform" :category="category" /> <PlatformDialog :visible.sync="showPlatform" :category="category" />
<AssetBulkUpdateDialog <AssetBulkUpdateDialog
:visible.sync="updateSelectedDialogSetting.visible" :visible.sync="updateSelectedDialogSetting.visible"
@@ -188,6 +188,7 @@ export default {
}) })
this.$axios.patch(`/api/v1/assets/assets/`, ids).then(res => { this.$axios.patch(`/api/v1/assets/assets/`, ids).then(res => {
this.$message.success(this.$tc('common.updateSuccessMsg')) this.$message.success(this.$tc('common.updateSuccessMsg'))
this.$refs.ListTable.reloadTable()
}).catch(err => { }).catch(err => {
this.$message.error(this.$tc('common.updateErrorMsg' + ' ' + err)) this.$message.error(this.$tc('common.updateErrorMsg' + ' ' + err))
}) })
@@ -206,6 +207,7 @@ export default {
}) })
this.$axios.patch(`/api/v1/assets/assets/`, ids).then(res => { this.$axios.patch(`/api/v1/assets/assets/`, ids).then(res => {
this.$message.success(this.$tc('common.updateSuccessMsg')) this.$message.success(this.$tc('common.updateSuccessMsg'))
this.$refs.ListTable.reloadTable()
}).catch(err => { }).catch(err => {
this.$message.error(this.$tc('common.updateErrorMsg' + ' ' + err)) this.$message.error(this.$tc('common.updateErrorMsg' + ' ' + err))
}) })