修复服务、设备新增后不显示新的数据

This commit is contained in:
wu
2022-08-22 14:30:19 +08:00
parent 783b54e101
commit c02125f192
2 changed files with 3 additions and 2 deletions

View File

@@ -491,13 +491,14 @@ export default {
}
},
addDevice () {
const that = this
this.$prompt('输入设备名称', '新加设备', {
confirmButtonText: '确定',
inputPattern: /^[\s\S]*.*[^\s][\s\S]*$/,
inputErrorMessage: '请输入设备名称'
}).then(({ value }) => {
this.$api.ADD_DEVICE({ action: 'add_device', name: value, server_id: this.serverData.id })
this.getDevice()
that.getDevice()
this.$message({
message: '新加设备成功',
type: 'success'