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) {