Merge pull request #4046 from jumpserver/pr@v4@fix_assets_clone

fixed: Fixed platform error when cloning assets
This commit is contained in:
ZhaoJiSen
2024-06-14 19:48:55 +08:00
committed by GitHub
2 changed files with 11 additions and 3 deletions

View File

@@ -101,8 +101,15 @@ export const assetFieldsMeta = (vm) => {
const pk = event.pk
const url = window.location.href
const newURL = url.replace(/platform=[^&]*/, 'platform=' + pk)
window.location.href = newURL
updatePlatformProtocols(vm, platformType, updateForm, true)
if (url.includes('clone')) {
updatePlatformProtocols(vm, platformType, updateForm, true)
} else {
window.history.replaceState(null, null, newURL)
vm.$nextTick(() => {
updatePlatformProtocols(vm, platformType, updateForm, true)
})
}
},
input: ([event], updateForm) => {
updatePlatformProtocols(vm, platformType, updateForm)

View File

@@ -94,7 +94,8 @@ export default {
return getPageData({ keyword, pageIndex, pageSize })
},
selectedData: [],
showClearBtn: true
showClearBtn: true,
transferOnCheck: true
}
}
},