From acc1e2a94a51e767f81b981be550cfcec9607af2 Mon Sep 17 00:00:00 2001 From: chenjinsong <523037378@qq.com> Date: Mon, 7 Jun 2021 17:31:17 +0800 Subject: [PATCH] =?UTF-8?q?NEZ-727=20fix:=20=E9=83=A8=E5=88=86=E4=BA=8C?= =?UTF-8?q?=E7=BA=A7=E5=88=97=E8=A1=A8=E6=90=9C=E7=B4=A2=E5=BC=82=E5=B8=B8?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/assets/css/common/tableCommon.scss | 8 ++--- .../src/components/charts/chart-table.vue | 2 +- .../common/bottomBox/nzBottomDataList.vue | 2 +- .../bottomBox/tabs/alertMessageTabNew.vue | 8 +++-- .../common/bottomBox/tabs/assetTab.vue | 31 ++++++------------- .../common/bottomBox/tabs/endpointTabNew.vue | 1 + .../src/components/common/searchInput.vue | 3 +- 7 files changed, 25 insertions(+), 30 deletions(-) diff --git a/nezha-fronted/src/assets/css/common/tableCommon.scss b/nezha-fronted/src/assets/css/common/tableCommon.scss index 4ae22e3a4..155981909 100644 --- a/nezha-fronted/src/assets/css/common/tableCommon.scss +++ b/nezha-fronted/src/assets/css/common/tableCommon.scss @@ -193,7 +193,7 @@ flex: auto; height: calc(100% - 58px); - .el-table { + .el-table:not(.chart-table) { position: absolute; width: calc(100% - 40px); border: 1px solid $--right-box-border-color; @@ -313,10 +313,10 @@ border-right: none !important; } /* 最后一列用box-shadow模拟边框 */ - .el-table:not(.no-operation).el-table--border .el-table__body-wrapper td:nth-last-child(2) { + .el-table:not(.no-operation):not(.chart-table).el-table--border .el-table__body-wrapper td:nth-last-child(2) { box-shadow: 1px 0 $--right-box-border-color; } - .el-table:not(.no-operation).el-table--border .el-table__header-wrapper th:nth-last-child(3) { + .el-table:not(.no-operation):not(.chart-table).el-table--border .el-table__header-wrapper th:nth-last-child(3) { border-right: none !important; box-shadow: 1px 0 $--right-box-border-color; } @@ -333,7 +333,7 @@ border-right: none !important; } } - .el-table--border::after, .el-table--group::after { + .el-table--border:not(.chart-table)::after, .el-table--group:not(.chart-table)::after { width: 0; } } diff --git a/nezha-fronted/src/components/charts/chart-table.vue b/nezha-fronted/src/components/charts/chart-table.vue index baaec13de..c0fb98fbf 100644 --- a/nezha-fronted/src/components/charts/chart-table.vue +++ b/nezha-fronted/src/components/charts/chart-table.vue @@ -53,7 +53,7 @@
-
-
+
diff --git a/nezha-fronted/src/components/common/bottomBox/tabs/alertMessageTabNew.vue b/nezha-fronted/src/components/common/bottomBox/tabs/alertMessageTabNew.vue index 1fa23aa89..f3571383e 100644 --- a/nezha-fronted/src/components/common/bottomBox/tabs/alertMessageTabNew.vue +++ b/nezha-fronted/src/components/common/bottomBox/tabs/alertMessageTabNew.vue @@ -8,6 +8,7 @@ :tabs="tabs" :targetTab="targetTab" @changeTab="changeTab" + @search="search" class="full-width-height" v-loading="tools.loading" > @@ -309,6 +310,7 @@ export default { } this.$set(this.searchLabel, 'pageNo', this.pageObj.pageNo) this.$set(this.searchLabel, 'pageSize', this.pageObj.pageSize) + this.$set(this.searchLabel, 'state', this.state) if (this.searchTime && this.searchTime.length > 1) { this.$set(this.searchLabel, 'startAt', this.timezoneToUtcTimeStr(this.searchTime[0])) this.$set(this.searchLabel, 'endAt', this.timezoneToUtcTimeStr(this.searchTime[1])) @@ -332,7 +334,7 @@ export default { } else if (this.from === fromRoute.dc) { this.searchLabel.dcIds = this.obj.id } - this.$get(this.url + '?state=' + this.state, this.searchLabel).then(response => { + this.$get(this.url, this.searchLabel).then(response => { this.tools.loading = false if (response.code === 200) { this.nowTime = this.utcTimeToTimezoneStr(response.time) @@ -576,7 +578,9 @@ export default { if (orderBy) { this.$set(this.searchLabel, 'orderBy', orderBy) } - this.$refs.alertMessageTable.$refs.alertListTable.bodyWrapper.scrollTop = 0 + if (this.$refs.dataTable) { + this.$refs.dataTable.$refs.dataTable.bodyWrapper.scrollTop = 0 + } this.getTableData() }, fillProject (module) { diff --git a/nezha-fronted/src/components/common/bottomBox/tabs/assetTab.vue b/nezha-fronted/src/components/common/bottomBox/tabs/assetTab.vue index 1c15380f2..f61b3be97 100644 --- a/nezha-fronted/src/components/common/bottomBox/tabs/assetTab.vue +++ b/nezha-fronted/src/components/common/bottomBox/tabs/assetTab.vue @@ -69,40 +69,29 @@ export default { searchMsg: { // 给搜索框子组件传递的信息 zheze_none: true, searchLabelList: [{ - id: 1, name: 'ID', type: 'input', - label: 'id', + label: 'ids', + disabled: false + }, { + name: this.$t('overall.name'), + type: 'input', + label: 'name', disabled: false }, { - id: 20, name: 'SN', type: 'input', label: 'sn', disabled: false }, { - id: 21, - name: 'Host', + name: 'IP', type: 'input', - label: 'host', + label: 'manageIp', disabled: false }, { - id: 22, name: this.$t('asset.state'), - type: 'select', - label: 'assetState', - disabled: false - }, { - id: 23, - name: 'pingStatus', - type: 'select', - label: 'pingStatus', - disabled: false - }, { - id: 23, - name: this.$t('asset.cabinet'), - type: 'input', - label: 'cabinetName', + type: 'assetState', + label: 'stateIds', disabled: false }] }, diff --git a/nezha-fronted/src/components/common/bottomBox/tabs/endpointTabNew.vue b/nezha-fronted/src/components/common/bottomBox/tabs/endpointTabNew.vue index 141e76f12..a61d9c859 100644 --- a/nezha-fronted/src/components/common/bottomBox/tabs/endpointTabNew.vue +++ b/nezha-fronted/src/components/common/bottomBox/tabs/endpointTabNew.vue @@ -7,6 +7,7 @@ :search-msg="searchMsg" :tabs="tabs" :targetTab="targetTab" + @search="search" @changeTab="changeTab" class="full-width-height" > diff --git a/nezha-fronted/src/components/common/searchInput.vue b/nezha-fronted/src/components/common/searchInput.vue index 6894c2a07..76687398c 100644 --- a/nezha-fronted/src/components/common/searchInput.vue +++ b/nezha-fronted/src/components/common/searchInput.vue @@ -745,7 +745,8 @@ export default { select () { const objectInfo = {} this.change_sreach_show = true - this.name = '', this.id = '' + this.name = '' + this.id = '' if (this.input_sreach != '') { this.select_list[this.sreach_num].val = this.input_sreach this.input_sreach = ''