修复服务、设备新增后不显示新的数据
This commit is contained in:
@@ -491,13 +491,14 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
addDevice () {
|
addDevice () {
|
||||||
|
const that = this
|
||||||
this.$prompt('输入设备名称', '新加设备', {
|
this.$prompt('输入设备名称', '新加设备', {
|
||||||
confirmButtonText: '确定',
|
confirmButtonText: '确定',
|
||||||
inputPattern: /^[\s\S]*.*[^\s][\s\S]*$/,
|
inputPattern: /^[\s\S]*.*[^\s][\s\S]*$/,
|
||||||
inputErrorMessage: '请输入设备名称'
|
inputErrorMessage: '请输入设备名称'
|
||||||
}).then(({ value }) => {
|
}).then(({ value }) => {
|
||||||
this.$api.ADD_DEVICE({ action: 'add_device', name: value, server_id: this.serverData.id })
|
this.$api.ADD_DEVICE({ action: 'add_device', name: value, server_id: this.serverData.id })
|
||||||
this.getDevice()
|
that.getDevice()
|
||||||
this.$message({
|
this.$message({
|
||||||
message: '新加设备成功',
|
message: '新加设备成功',
|
||||||
type: 'success'
|
type: 'success'
|
||||||
|
|||||||
@@ -283,7 +283,7 @@ export default {
|
|||||||
process.env.VUE_APP_HSLSERVER_PASSWORD,
|
process.env.VUE_APP_HSLSERVER_PASSWORD,
|
||||||
{ data: this.serverSettings.Content }
|
{ data: this.serverSettings.Content }
|
||||||
)
|
)
|
||||||
this.$api.ADD_SERVER({
|
await this.$api.ADD_SERVER({
|
||||||
action: 'add_server',
|
action: 'add_server',
|
||||||
name: row.deviceName,
|
name: row.deviceName,
|
||||||
url: row.url,
|
url: row.url,
|
||||||
|
|||||||
Reference in New Issue
Block a user