diff --git a/nezha-fronted/src/components/common/mixin/routerPathParams.js b/nezha-fronted/src/components/common/mixin/routerPathParams.js index a351e9d55..bc88dcccd 100644 --- a/nezha-fronted/src/components/common/mixin/routerPathParams.js +++ b/nezha-fronted/src/components/common/mixin/routerPathParams.js @@ -9,8 +9,18 @@ export default { if (qv && val.type == 'number') { qv = lodash.toNumber(qv) } + if (qv && val.type == 'array') { + qv = qv.split(',') + } setTimeout(() => { this.setSearchInput(val, qv) + if (qv && val.type2 == 'array') { + const arr = qv.split(',').map(item => Number(item)) + qv && this.$set(val.target2, val.propertyName, arr) + } + if (qv && val.type2 == 'json') { + qv && this.$set(val.target2, val.propertyName, qv) + } }, 200) qv && this.$set(val.target, val.propertyName, qv) }) diff --git a/nezha-fronted/src/components/page/asset/asset.vue b/nezha-fronted/src/components/page/asset/asset.vue index 4b25ab4d0..c8c5b2e0d 100644 --- a/nezha-fronted/src/components/page/asset/asset.vue +++ b/nezha-fronted/src/components/page/asset/asset.vue @@ -840,8 +840,8 @@ export default { }, jsonKey: 'val' }, - dcIds: { target: this.searchCheckBox, propertyName: 'dcIds', type: 'string' }, - fields: { target: this.searchCheckBox, propertyName: 'fields', type: 'json' }, + dcIds: { target: this.searchCheckBox, propertyName: 'dcIds', type: 'string', target2: this.selectValue, type2: 'array' }, + fields: { target: this.searchCheckBox, propertyName: 'fields', type: 'json', target2: this.selectValue, type2: 'json' }, ping: { target: this.searchCheckBox, propertyName: 'ping', type: 'string' }, modelIds: { target: this.searchCheckBox, propertyName: 'modelIds', type: 'string' }, typeIds: { target: this.searchCheckBox, propertyName: 'typeIds', type: 'string' }