From b4d7f187d1fe73f9bbb169962e52de3e9d854bd2 Mon Sep 17 00:00:00 2001 From: zhangyu Date: Wed, 16 Feb 2022 10:42:12 +0800 Subject: [PATCH] =?UTF-8?q?NEZ-1492=20fix=EF=BC=9AAsset=20label=EF=BC=8C?= =?UTF-8?q?=E9=80=89=E6=8B=A9Group=E5=90=8E=EF=BC=8C=E8=BF=9B=E8=A1=8C?= =?UTF-8?q?=E6=90=9C=E7=B4=A2=EF=BC=8C=E6=98=BE=E7=A4=BA=E7=BB=93=E6=9E=9C?= =?UTF-8?q?=E4=B8=BA=E5=85=B6=E4=BB=96Group=E5=86=85=E5=AE=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/components/page/config/assetMeta.vue | 36 +++++++++---------- 1 file changed, 16 insertions(+), 20 deletions(-) diff --git a/nezha-fronted/src/components/page/config/assetMeta.vue b/nezha-fronted/src/components/page/config/assetMeta.vue index d7bddedd7..30098f3b1 100644 --- a/nezha-fronted/src/components/page/config/assetMeta.vue +++ b/nezha-fronted/src/components/page/config/assetMeta.vue @@ -131,13 +131,14 @@ export default { type: 'input', label: 'key', disabled: false - }, { - name: this.$t('config.assetLabel.group'), - type: 'group', - label: 'group', - readonly: true, - disabled: false } + // , { + // name: this.$t('config.assetLabel.group'), + // type: 'group', + // label: 'group', + // readonly: true, + // disabled: false + // } ] }, // 创建修改相关 @@ -174,6 +175,9 @@ export default { if (response.code == 200) { this.groupData = [this.groupData[0]] this.groupData = this.groupData.concat(response.data.list) + if (this.$route.query && this.$route.query.groupIds) { + this.showGroup = this.groupData.find(item => item.id == this.$route.query.groupIds) + } this.$forceUpdate() } }) @@ -188,6 +192,9 @@ export default { if (!this.searchLabel.groupIds) { delete this.searchLabel.groupIds } + if (this.showGroup.id && this.showGroup.id !== -1) { + this.searchLabel.groupIds = this.showGroup.id + } const param = { ...this.searchLabel, ...this.searchCheckBox @@ -339,21 +346,10 @@ export default { jsonKey: 'val' }, groupIds: { - target: this.searchLabel, - propertyName: 'groupIds', + target: this.showGroup, + propertyName: 'id', type: 'number', - isSearchInput: true, - defaultJson: { - disabled: false, - label: 'group', - name: 'Group', - readonly: true, - type: 'group', - val: '', - valnum: '', - listStr: 'groupSelect' - }, - jsonKey: 'valnum' + isSearchInput: false } } this.initQueryFromPath(searchKeys)