Merge pull request #3022 from jumpserver/pr@dev@perf_asset_platform

perf: 修改 platform 更新
This commit is contained in:
feng626
2023-04-17 17:51:36 +08:00
committed by GitHub

View File

@@ -6,7 +6,7 @@
import GenericCreateUpdatePage from '@/layout/components/GenericCreateUpdatePage'
import { assetFieldsMeta } from '@/views/assets/const'
import { encryptPassword } from '@/utils/crypto'
import { setUrlParam, getUpdateObjURL } from '@/utils/common'
import { getUpdateObjURL, setUrlParam } from '@/utils/common'
export default {
components: { GenericCreateUpdatePage },
@@ -87,7 +87,8 @@ export default {
iConfig() {
const { addFields, addFieldsMeta, defaultConfig } = this
let url = this.url
if (this.$route.query.platform) {
const { id = '' } = this.$route.params
if (this.$route.query.platform && !id) {
url = setUrlParam(url, 'platform', this.$route.query.platform)
}
// 过滤类型为null, undefined 的元素