mirror of
https://github.com/jumpserver/lina.git
synced 2025-09-23 20:17:54 +00:00
fix: Fixed the issue that the data was not refrefied when jumping back to the page after clicking delete on the cloud synchronization detail page
This commit is contained in:
@@ -195,6 +195,7 @@ export default {
|
||||
this.$log.debug('Start perform delete: ', url)
|
||||
return this.$axios.delete(url)
|
||||
}
|
||||
|
||||
this.$alert(msg, title, {
|
||||
type: 'warning',
|
||||
confirmButtonClass: 'el-button--danger',
|
||||
|
@@ -122,6 +122,9 @@ export default {
|
||||
}
|
||||
}
|
||||
},
|
||||
activated() {
|
||||
this.$refs.accountTable.reloadTable()
|
||||
},
|
||||
methods: {
|
||||
valid(status) {
|
||||
if (status !== 200) {
|
||||
|
@@ -106,11 +106,12 @@ export default {
|
||||
el: {
|
||||
provider: this.provider,
|
||||
regions: this.object.task?.regions || [],
|
||||
getAuthInfo: () => {
|
||||
getAuthInfo: async() => {
|
||||
if (this.object?.id) {
|
||||
return this.object.id
|
||||
}
|
||||
const form = this.$refs.form.$refs.form.dataForm
|
||||
await form.submitForm('form', true)
|
||||
return form.getFormValue()['attrs']
|
||||
}
|
||||
}
|
||||
|
@@ -91,21 +91,27 @@ export default {
|
||||
this.content = `${this.$t('Modify')} [${count}]`
|
||||
},
|
||||
handlerLinkClick() {
|
||||
this.content = this.$t('Loading')
|
||||
const authInfo = this.getAuthInfo()
|
||||
let method = 'get'
|
||||
let data = {}
|
||||
let url = `/api/v1/xpack/cloud/regions/?account_id=${authInfo}`
|
||||
|
||||
if (typeof authInfo === 'object') {
|
||||
const attrs = JSON.parse(JSON.stringify(authInfo))
|
||||
|
||||
method = 'post'
|
||||
url = `/api/v1/xpack/cloud/regions/?provider=${this.provider}`
|
||||
data = { 'attrs': encryptAttrsField(attrs) }
|
||||
}
|
||||
this.content = this.$t('Loading')
|
||||
|
||||
this.$axios[method](url, data).then(resp => {
|
||||
this.allRegions = resp?.regions
|
||||
console.log(Object.getOwnPropertyNames(data.attrs).length)
|
||||
if (this.allRegions.length && Object.getOwnPropertyNames(data.attrs).length > 0) {
|
||||
this.regionVisible = true
|
||||
this.updateCheckedStatus()
|
||||
}
|
||||
}).catch(error => {
|
||||
this.$message.error(this.$tc('CloudRegionTip' + ' ' + error))
|
||||
}).finally(() => {
|
||||
|
Reference in New Issue
Block a user