diff --git a/nezha-fronted/src/components/chart/chartList.vue b/nezha-fronted/src/components/chart/chartList.vue index 3c0a2e3da..56e24c5d0 100644 --- a/nezha-fronted/src/components/chart/chartList.vue +++ b/nezha-fronted/src/components/chart/chartList.vue @@ -602,7 +602,7 @@ export default { for (let index = 0; index < arr.length; index++) { // 遍历找出所有需要 repeat的group 按照 name进行多次的分组 const item = arr[index] const repeatVariable = this.$loadsh.get(item.param.repeat, 'variable') - if (item.type === 'group' && repeatVariable) { + if (item.type === 'group' && repeatVariable && this.$loadsh.get(this.showHidden[item.id], 'visibility') !== 'hidden') { const itemPrev = arr[index - 1] const repeatPrevVariable = this.$loadsh.get(itemPrev.param.repeat, 'variable') if (itemPrev && itemPrev.type === 'group' && repeatPrevVariable === repeatVariable) { diff --git a/nezha-fronted/src/components/common/mixin/detailViewMixin.js b/nezha-fronted/src/components/common/mixin/detailViewMixin.js index dc1cd14a9..5c7dc554d 100644 --- a/nezha-fronted/src/components/common/mixin/detailViewMixin.js +++ b/nezha-fronted/src/components/common/mixin/detailViewMixin.js @@ -33,7 +33,9 @@ export default { changeDetailType (flag) { setTimeout(() => { const query = { ...this.$route.query, detailType: flag } - query.bottomBox = this.detailType !== 'view' + if (this.detailType == 'view') { + delete query.bottomBox + } this.$router.replace({ query: query }).catch(err => {}) }, 100) if (this.detailType === flag) { diff --git a/nezha-fronted/src/components/common/mixin/routerPathParams.js b/nezha-fronted/src/components/common/mixin/routerPathParams.js index 73a196c60..a66d33354 100644 --- a/nezha-fronted/src/components/common/mixin/routerPathParams.js +++ b/nezha-fronted/src/components/common/mixin/routerPathParams.js @@ -62,6 +62,7 @@ export default { params.targetTab = this.$route.query.targetTab } if (!params.targetTab) delete params.targetTab + if (!params.bottomBox) delete params.bottomBox if (this.detailType === 'list' && this.$refs[detailType]) { const obj = { id: this.$refs[detailType].bottomBox.object.id, @@ -119,29 +120,35 @@ export default { } else if (from === 'nzDatalist' && this.bottomBox) { params.bottomBox = this.bottomBox.showSubList params.targetTab = this.bottomBox.targetTab - const obj = { - id: this.bottomBox.object.id, - name: this.bottomBox.object.name, - childrenNum: this.bottomBox.object.childrenNum || '', - clientState: this.bottomBox.object.clientState || '', - protocol: this.bottomBox.object.protocol || '', - uuid: this.bottomBox.object.uuid || '', - startTime: this.bottomBox.object.startTime || '', - model: { - tsgAppliance: this.bottomBox.object.model ? this.bottomBox.object.model.tsgAppliance : '' + if (!params.targetTab) delete params.targetTab + if (!params.bottomBox) delete params.bottomBox + if (this.bottomBox.showSubList) { // 关闭bottomBox打开还是关闭 + const obj = { + id: this.bottomBox.object.id, + name: this.bottomBox.object.name, + childrenNum: this.bottomBox.object.childrenNum || '', + clientState: this.bottomBox.object.clientState || '', + protocol: this.bottomBox.object.protocol || '', + uuid: this.bottomBox.object.uuid || '', + startTime: this.bottomBox.object.startTime || '', + model: { + tsgAppliance: this.bottomBox.object.model ? this.bottomBox.object.model.tsgAppliance : '' + } } - } - if (this.bottomBox.object.configs) { - // 判断是JSON字符串还是对象 - if (typeof (this.bottomBox.object.configs) == 'string') { - obj.configs = JSON.parse(this.bottomBox.object.configs).map(item => { return { type: item.type, enable: item.enable } }) - } else { - obj.configs = this.bottomBox.object.configs.map(item => { return { type: item.type, enable: item.enable } }) + if (this.bottomBox.object.configs) { + // 判断是JSON字符串还是对象 + if (typeof (this.bottomBox.object.configs) == 'string') { + obj.configs = JSON.parse(this.bottomBox.object.configs).map(item => { return { type: item.type, enable: item.enable } }) + } else { + obj.configs = this.bottomBox.object.configs.map(item => { return { type: item.type, enable: item.enable } }) + } } - } - this.removeEmpty(obj) - if (JSON.stringify(obj) != '{}') { - params.selectObj = JSON.stringify(obj) + this.removeEmpty(obj) + if (JSON.stringify(obj) != '{}') { + params.selectObj = JSON.stringify(obj) + } + } else { + delete params.selectObj } this.$router.replace({ path: path, query: params }).catch(err => {}) } else if (from === 'nzDetailList' && this.detailViewRightObj) {