@@ -147,25 +134,25 @@
-
-
-
+
+
+
-
+
-
+ >-->
@@ -244,16 +231,25 @@
/*二级列表相关*/
tabList: [], //二级列表的标签
tabDetailList: [], //多个详情
- targetTab: '', //展示二级列表中的哪个页签
- inTransform: false, //搜索框相关,搜索条件下拉框是否在transform里
- mainResizeShow: true, //dom高度改变时部分内容是否展示
- subResizeShow: true,
- isFullScreen: false,
- showSubList: false, //是否展示二级列表
- mainTableHeight: this.$tableHeight.normal, //主列表table高度
-
- toTopBtnTop: this.$tableHeight.toTopBtnTop, //to-top按钮的top属性
- tableHover: false, //控制滚动条和top按钮同时出现
+ bottomBox: {
+ tabList: [], //二级列表的标签
+ tabDetailList: [], //多个详情
+ mainResizeShow: true, //dom高度改变时是否展示|隐藏
+ subResizeShow: true,
+ isFullScreen: false, //全屏状态
+ showSubList: false, //是否显示二级列表
+ targetTab: '', //显示二级列表中的哪个页签
+ inTransform: false, //搜索框相关,搜索条件下拉框是否在transform里
+ },
+ /*工具参数*/
+ tools: {
+ loading: false, //是否显示table加载动画
+ toTopBtnTop: this.$tableHeight.toTopBtnTop, //to-top按钮的top属性
+ tableHover: false, //控制滚动条和top按钮同时出现
+ showTopBtn: false, //显示To top按钮
+ showCustomTableTitle: false, //自定义列弹框是否显示
+ customTableTitle: [], //自定义列工具的数据
+ },
//导出相关
importBox: {show: false, title:this.$t('overall.exportExcel')},
@@ -267,7 +263,6 @@
searchTime: [new Date().setHours(new Date().getHours() - 1), new Date()],
currentMsg: {},
chartUnit: 5,
- showTopBtn: false,
pageObj: {
pageNo: 1,
pageSize: 50,
@@ -329,8 +324,6 @@
width: 90
}
],
- tablelable: [],
- dropCol: [],
viewRuleData: {
id: '',
alertName: '',
@@ -390,36 +383,6 @@
})
return result;
},
- elementsetShow(s, e) {
- var eventfixed = {
- shezhi: 0,
- screen: 0
- };
- eventfixed[s] = 1;
- e.preventDefault();
- this.$store.commit('setHeaderTable', this.tablelable);
- this.$store.commit('setEventfixed', eventfixed);
- const h = document.documentElement.clientHeight;
- const w = document.documentElement.clientWidth;
- const dw = this.$refs.elementset.$el.offsetWidth;
- const dh = this.$refs.elementset.$el.offsetHeight;
- let positionx =
- e.clientX + dw <= w - 10 ? e.clientX + 14 : e.clientX + 14 - dw;
- let positiony =
- e.clientY + dh <= h - 10
- ? e.clientY + 20
- : e.clientY + 20 - (e.clientY + dh - h);
- this.$store.commit('setPosition', {positionx, positiony});
- },
- elementsetHide() {
- //悬浮点击空白隐藏
- this.$refs.elementset.elementsetHide();
- },
- tablelabelEmit(data) {
- //获取子组件传过来的参数
- this.$store.commit('setHeaderTable', data);
- this.tablelable = data;
- },
chartUnitChange:function(unit){
this.chartUnit=unit;
this.$nextTick(()=>{
@@ -435,7 +398,7 @@
}
},
queryChartDate() {
- let $temp=this;
+ let $temp = this;
let start = this.searchTime[0]?this.searchTime[0]:this.getTime(-1, 'h');
let end = this.searchTime[1]?this.searchTime[1]:this.getTime(0, 'h');
this.searchTime = [start, end];
@@ -618,7 +581,7 @@
},
deleteMessage() {
this.$emit('deleteMessage',this.deleteBox);
- console.log(this.deleteBox);
+ //console.log(this.deleteBox);
this.deleteBox.show = false;
this.deleteBox.ids=[];
},
@@ -695,14 +658,17 @@
},
// 全屏
fullScreen() {
+ let vm = this;
this.$bottomBoxWindow.fullScreen(vm);
},
// 退出全屏
exitFullScreen() {
+ let vm = this;
this.$bottomBoxWindow.exitFullScreen(vm);
},
// 鼠标拖动二级列表
listResize(e) {
+ let vm = this;
this.$bottomBoxWindow.listResize(vm, e);
},
showTagDetail(data, key) {
@@ -719,10 +685,8 @@
detailList.push(data[item]);
}
}
- this.showSubList = true;
+ this.bottomBox.showSubList = true;
this.tabList = labelList;
- /*this.tabDetailList = detailList;
- this.targetTab = key;*/
}
},
labelsClassName(row) {
@@ -732,18 +696,7 @@
return "";
}
},
- jumpTo(data, id) {
- bus.$emit("menu-change", data);
- this.$store.state.assetData.moduleData = data
- this.$store.state.assetData.selectedData = id
- this.$router.push({
- path: "/" + data,
- query: {
- t: +new Date()
- }
- });
- },
- viewRule: function (id) {
+ viewRule(id) {
this.closeViews();
this.$get('alert/rule', {"id": id}).then(response => {
if (response.code == 200) {
@@ -817,16 +770,6 @@
},
// 数据排序
tableDataSort(item){
- // let orderBy='';
- // if(item.order==='ascending'){
- // orderBy=item.prop;
- // }
- // if(item.order==='descending'){
- // orderBy='-'+item.prop;
- // }
- // this.pageObj.orderBy=orderBy;
- // this.$set(this.searchLabel, "orderBy", orderBy);
- // this.getAlertList();
this.$emit('tableDataSort',item);
},
// label tooltip是否显示
@@ -866,6 +809,10 @@
},
},
mounted() {
+ //初始化表头
+ this.tools.customTableTitle = localStorage.getItem("nz-tableTitle-" + localStorage.getItem("nz-username") + "-" + this.$route.path)
+ ? JSON.parse(localStorage.getItem("nz-tableTitle-" + localStorage.getItem("nz-username") + "-" + this.$route.path))
+ : this.tableTitle;
//是否存在分页缓存
let pageSize = localStorage.getItem('nz-pageSize-' + localStorage.getItem('nz-username') + '-' + this.tableId);
if (pageSize != 'undefined' && pageSize != null) {
@@ -879,20 +826,20 @@
if (el._ps_) {
el.addEventListener("ps-scroll-y", () => {
if (el._ps_.scrollbarYTop > 50) {
- this.showTopBtn = true;
+ this.tools.showTopBtn = true;
} else {
- this.showTopBtn = false;
+ this.tools.showTopBtn = false;
}
});
el.addEventListener("mouseenter", () => {
- this.tableHover = true;
+ this.tools.tableHover = true;
});
el.addEventListener("mouseleave", () => {
- this.tableHover = false;
+ this.tools.tableHover = false;
});
}
});
- if(this.from=='alertMessage'){
+ /*if(this.from=='alertMessage'){
this.tablelable = localStorage.getItem("nz-tableTitle-" + localStorage.getItem("nz-username") + "-" + this.$route.path)
? JSON.parse(localStorage.getItem("nz-tableTitle-" + localStorage.getItem("nz-username") + "-" + this.$route.path))
: this.tableTitle;
@@ -910,7 +857,7 @@
: this.tableTitle;
console.log(2);
}
- console.log( this.tableTitle,this.fromPath,this.form,this.tablelable);
+ console.log( this.tableTitle,this.fromPath,this.form,this.tablelable);*/
}
}
diff --git a/nezha-fronted/src/components/common/bottomBox/tabs/endpointTab.vue b/nezha-fronted/src/components/common/bottomBox/tabs/endpointTab.vue
index 69fb6b458..ab84cdd23 100644
--- a/nezha-fronted/src/components/common/bottomBox/tabs/endpointTab.vue
+++ b/nezha-fronted/src/components/common/bottomBox/tabs/endpointTab.vue
@@ -27,10 +27,20 @@