修复服务、设备新增后不显示新的数据
This commit is contained in:
@@ -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'
|
||||
|
||||
@@ -283,7 +283,7 @@ export default {
|
||||
process.env.VUE_APP_HSLSERVER_PASSWORD,
|
||||
{ data: this.serverSettings.Content }
|
||||
)
|
||||
this.$api.ADD_SERVER({
|
||||
await this.$api.ADD_SERVER({
|
||||
action: 'add_server',
|
||||
name: row.deviceName,
|
||||
url: row.url,
|
||||
|
||||
Reference in New Issue
Block a user