diff --git a/nezha-fronted/src/assets/stylus/main.scss b/nezha-fronted/src/assets/stylus/main.scss index b7a612811..0cfbddff4 100644 --- a/nezha-fronted/src/assets/stylus/main.scss +++ b/nezha-fronted/src/assets/stylus/main.scss @@ -562,7 +562,7 @@ li{ align-items : center; position: relative; flex-direction: row-reverse; - z-index: 10; + z-index: 1; } .top-tools>div { margin-top: 2px; diff --git a/nezha-fronted/src/components/common/alert/alertMessageTable.vue b/nezha-fronted/src/components/common/alert/alertMessageTable.vue new file mode 100644 index 000000000..2277d2168 --- /dev/null +++ b/nezha-fronted/src/components/common/alert/alertMessageTable.vue @@ -0,0 +1,944 @@ + + + + + + diff --git a/nezha-fronted/src/components/common/bottomBox/tabs/alertMessageTab.vue b/nezha-fronted/src/components/common/bottomBox/tabs/alertMessageTab.vue index b9c0c0297..5bc6a45ab 100644 --- a/nezha-fronted/src/components/common/bottomBox/tabs/alertMessageTab.vue +++ b/nezha-fronted/src/components/common/bottomBox/tabs/alertMessageTab.vue @@ -25,116 +25,124 @@ - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -202,11 +210,13 @@ import nzAlertTag from '../../../page/alert/nzAlertTag'; import chart from '../../../page/dashboard/overview/chart' import bus from '../../../../libs/bus' + import alertMessageTable from '@/components/common/alert/alertMessageTable.vue' export default { name: "alertMessageTab", components: { 'nz-alert-tag': nzAlertTag, - 'chart': chart + 'chart': chart, + 'alertMessageTable':alertMessageTable, }, props: { from: String, //来自哪个主页面,有:"asset"、"alertRule" @@ -445,11 +455,10 @@ toDeleteMessage() { this.deleteBox.show = true; }, - deleteMessage() { - this.$put("alert/message", this.deleteBox).then(res => { + deleteMessage(deleteBox) { + this.$put("alert/message", deleteBox).then(res => { if (res.code === 200) { this.$message({duration: 2000, type: 'success', message: this.$t("tip.deleteSuccess")}); - this.deleteBox.show = false; this.getAlertList(); } else { this.$message.error(res.msg); @@ -657,6 +666,7 @@ }, 1000); }, promQueryParamConvert(obj) { + console.log(obj) return "(" + obj.alertRule.expr + ") and (" + function(){ let q = "{"; for (let k in obj.labels) { @@ -825,25 +835,6 @@ if (pageSize) { this.pageObj.pageSize = pageSize } - this.$nextTick(() => { - //绑定滚动条事件,控制top按钮 - let el = this.$refs.alertMessageSubList.$el.querySelector(".el-table__body-wrapper"); - if (el._ps_) { - el.addEventListener("ps-scroll-y", () => { - if (el._ps_.scrollbarYTop > 50) { - this.showTopBtn = true; - } else { - this.showTopBtn = false; - } - }); - el.addEventListener("mouseenter", () => { - this.tableHover = true; - }); - el.addEventListener("mouseleave", () => { - this.tableHover = false; - }); - } - }); this.tablelable = localStorage.getItem("nz-tableTitle-" + localStorage.getItem("nz-username") + "-/alertList") ? JSON.parse(localStorage.getItem("nz-tableTitle-" + localStorage.getItem("nz-username") + "-/alertList")) : this.tableTitle; diff --git a/nezha-fronted/src/components/common/searchInput.vue b/nezha-fronted/src/components/common/searchInput.vue index 755cd8898..95f4b222a 100644 --- a/nezha-fronted/src/components/common/searchInput.vue +++ b/nezha-fronted/src/components/common/searchInput.vue @@ -1517,6 +1517,7 @@ .localStorage_list_box .list_box_title i{ position: absolute; right: 10px; + top: 5px; } .localStorage_list_box .list_box_content{ text-align: left; diff --git a/nezha-fronted/src/components/page/alert/list.vue b/nezha-fronted/src/components/page/alert/list.vue index 598bb3e68..41102a979 100644 --- a/nezha-fronted/src/components/page/alert/list.vue +++ b/nezha-fronted/src/components/page/alert/list.vue @@ -9,6 +9,9 @@ span.el-tooltip { display: inline-block; } + /deep/.top-tools{ + z-index: 1; + }