mirror of
https://github.com/jumpserver/lina.git
synced 2025-09-25 14:25:23 +00:00
perf: Domain detail add asset
This commit is contained in:
@@ -45,12 +45,16 @@ export default {
|
|||||||
formConfig: {
|
formConfig: {
|
||||||
url: `/api/v1/assets/assets/?domain=${this.$route.params.id}&exclude_platform=Gateway`,
|
url: `/api/v1/assets/assets/?domain=${this.$route.params.id}&exclude_platform=Gateway`,
|
||||||
getUrl: () => {
|
getUrl: () => {
|
||||||
return `/api/v1/assets/domains/${this.$route.params.id}/`
|
return `/api/v1/assets/assets/`
|
||||||
},
|
},
|
||||||
submitMethod: () => 'patch',
|
submitMethod: () => 'patch',
|
||||||
hasReset: false,
|
hasReset: false,
|
||||||
hasSaveContinue: false,
|
hasSaveContinue: false,
|
||||||
createSuccessMsg: this.$t('common.AddSuccessMsg'),
|
createSuccessMsg: this.$t('common.AddSuccessMsg'),
|
||||||
|
updateSuccessNextRoute: {
|
||||||
|
name: 'DomainDetail',
|
||||||
|
params: { id: this.$route.params.id }
|
||||||
|
},
|
||||||
fields: ['assets'],
|
fields: ['assets'],
|
||||||
fieldsMeta: {
|
fieldsMeta: {
|
||||||
assets: {
|
assets: {
|
||||||
@@ -68,6 +72,14 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
cleanFormValue(values) {
|
||||||
|
const data = []
|
||||||
|
values.assets.forEach(item => {
|
||||||
|
const d = { id: item, domain: this.$route.params.id }
|
||||||
|
data.push(d)
|
||||||
|
})
|
||||||
|
return data
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user