From 8f6dbb720e910cd282b75baa464d13e72354e253 Mon Sep 17 00:00:00 2001 From: zhangyu Date: Wed, 26 May 2021 15:40:42 +0800 Subject: [PATCH] =?UTF-8?q?NEZ-674=20fix=EF=BC=9A=E4=BF=AE=E6=94=B9=20grou?= =?UTF-8?q?p=E4=B8=8D=E6=98=BE=E7=A4=BA=E7=9A=84=E9=97=AE=E9=A2=98=20?= =?UTF-8?q?=E4=BB=A5=E5=8F=8A=20=E5=9B=9E=E6=98=BEparams=E9=94=99=E8=AF=AF?= =?UTF-8?q?=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/components/common/rightBox/assetMetaBox.vue | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/nezha-fronted/src/components/common/rightBox/assetMetaBox.vue b/nezha-fronted/src/components/common/rightBox/assetMetaBox.vue index 1a28d2b5f..7d10dbfec 100644 --- a/nezha-fronted/src/components/common/rightBox/assetMetaBox.vue +++ b/nezha-fronted/src/components/common/rightBox/assetMetaBox.vue @@ -20,7 +20,7 @@ - + @@ -234,11 +234,13 @@ export default { handler (n) { this.editAssetMeta = { ...n, + groupId: n.groupId ? Number(n.groupId) : '', search: `${n.search}`, display: `${n.display}`, - param: n.param && typeof n.param === 'string' ? JSON.parse(n.param) : {}, + param: n.param && ((typeof n.param) === 'string') ? JSON.parse(n.param) : {}, type: n.type.toUpperCase() } + this.selectType(this.editAssetMeta.type, true) } }, 'editAssetMeta.search': { @@ -293,7 +295,7 @@ export default { this.$refs.editAssetMetaForm.validate((valid) => { if (valid) { const param = { ...this.editAssetMeta } - if (param.type === 'radio' || param.type === 'checkbox' || param.type === 'select') { + if (param.type === 'RADIO' || param.type === 'CHECKBOX' || param.type === 'SELECT') { for (let i = 0; i < param.param.items.length; i++) { if (!param.param.items[i].name) { this.$refs['metaNameOption' + i][0].focus() @@ -303,7 +305,7 @@ export default { } } } - if (param.type !== 'radio' && param.type !== 'checkbox' && param.type !== 'select' && param.type !== 'datetime') { + if (param.type !== 'RADIO' && param.type !== 'CHECKBOX' && param.type !== 'SELECT' && param.type !== 'DATETIME') { delete param.param } else { param.param = JSON.stringify(param.param) @@ -402,8 +404,6 @@ export default { } }, inputChange (index, val) { - // console.log(val) - // this.editAssetMeta.param.items[index] = val this.$forceUpdate() }, radioChange (i) {