perf: panel性能优化、account增加notification
This commit is contained in:
@@ -222,14 +222,14 @@
|
|||||||
return {
|
return {
|
||||||
data: {}, // 该图表信息,chartItem
|
data: {}, // 该图表信息,chartItem
|
||||||
noData:false,
|
noData:false,
|
||||||
seriesItem: [], // 保存信息
|
/*seriesItem: [], // 保存信息
|
||||||
seriesItemArr:[],// 初次加载的数据
|
seriesItemArr:[],// 初次加载的数据
|
||||||
seriesLength:20,
|
seriesLength:20,
|
||||||
seriesItemScreen:[],
|
seriesItemScreen:[],
|
||||||
seriesItemArrScreen:[],
|
seriesItemArrScreen:[],*/
|
||||||
legendListMore:[],
|
/*legendListMore:[],
|
||||||
screenLegendListMore:[],
|
screenLegendListMore:[],
|
||||||
chartInfo:{},
|
chartInfo:{},*/
|
||||||
images: '',
|
images: '',
|
||||||
isStackArea:false,
|
isStackArea:false,
|
||||||
isError:false,
|
isError:false,
|
||||||
@@ -244,9 +244,9 @@
|
|||||||
chartName: '',
|
chartName: '',
|
||||||
firstLoad: false, // 是否第一次加载
|
firstLoad: false, // 是否第一次加载
|
||||||
divFirstShow:false,
|
divFirstShow:false,
|
||||||
highchartStore: null, // 保存图表数据
|
/*highchartStore: null, // 保存图表数据
|
||||||
echartStore:null,// 保存图表数据
|
echartStore:null,// 保存图表数据
|
||||||
echartModalStore: null, // 全屏查看时数据
|
echartModalStore: null, // 全屏查看时数据*/
|
||||||
chartType: 'line', // 图表类型
|
chartType: 'line', // 图表类型
|
||||||
screenModal: false,
|
screenModal: false,
|
||||||
// 查询数据使用
|
// 查询数据使用
|
||||||
@@ -256,19 +256,19 @@
|
|||||||
from: ""
|
from: ""
|
||||||
},
|
},
|
||||||
stableFilter: {}, // 保存数据使用,初始化起止时间,单图or多图等
|
stableFilter: {}, // 保存数据使用,初始化起止时间,单图or多图等
|
||||||
legend:[],
|
/*legend:[],
|
||||||
legendList:[],
|
legendList:[],
|
||||||
screenLegendList:[],
|
screenLegendList:[],*/
|
||||||
isGrey:[],
|
isGrey:[],
|
||||||
isGreyScreen:[],
|
isGreyScreen:[],
|
||||||
bgColorList: ['#7bbfea', '#b3424a', '#f05b72', '#596032', '#bd6758',
|
/*bgColorList: ['#7bbfea', '#b3424a', '#f05b72', '#596032', '#bd6758',
|
||||||
'#cd9a5b', '#918597', '#70a19f', '#005344', '#FF00FF',
|
'#cd9a5b', '#918597', '#70a19f', '#005344', '#FF00FF',
|
||||||
'#f7acbc', '#5f5d46', '#66ffff', '#ccFF66', '#f47920',
|
'#f7acbc', '#5f5d46', '#66ffff', '#ccFF66', '#f47920',
|
||||||
'#769149', '#1d953f', '#abc88b', '#7f7522', '#9b95c9',
|
'#769149', '#1d953f', '#abc88b', '#7f7522', '#9b95c9',
|
||||||
'#f3715c', '#ea66a6', '#d1c7b7', '#9d9087', '#77787b',
|
'#f3715c', '#ea66a6', '#d1c7b7', '#9d9087', '#77787b',
|
||||||
'#f58220', '#c37e00', '#00ae9d', '#f26522', '#76becc',
|
'#f58220', '#c37e00', '#00ae9d', '#f26522', '#76becc',
|
||||||
'#76624c', '#d71345', '#2468a2', '#ca8687', '#1b315e',
|
'#76624c', '#d71345', '#2468a2', '#ca8687', '#1b315e',
|
||||||
],
|
],*/
|
||||||
stackTotalColor:null,
|
stackTotalColor:null,
|
||||||
firstShow: false, // 默认不显示操作按钮,
|
firstShow: false, // 默认不显示操作按钮,
|
||||||
caretShow:false,
|
caretShow:false,
|
||||||
@@ -278,8 +278,8 @@
|
|||||||
oldSearchTime:[],
|
oldSearchTime:[],
|
||||||
screenTitleHeight:58,
|
screenTitleHeight:58,
|
||||||
hasLegendOptions:false,
|
hasLegendOptions:false,
|
||||||
legendOptions:[],
|
/*legendOptions:[],
|
||||||
screenLegendOptions:[],
|
screenLegendOptions:[],*/
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
watch: {},
|
watch: {},
|
||||||
@@ -1022,6 +1022,7 @@
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
maxValueCopies = null;
|
maxValueCopies = null;
|
||||||
|
setTimeout(() => {option = null}, 1000);
|
||||||
},
|
},
|
||||||
handleLineFeed(str,chartWidth){
|
handleLineFeed(str,chartWidth){
|
||||||
let rlt='';
|
let rlt='';
|
||||||
@@ -1714,6 +1715,34 @@
|
|||||||
getChart(this.chartIndex).resize();
|
getChart(this.chartIndex).resize();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
created() {
|
||||||
|
this.legendListMore = [];
|
||||||
|
this.screenLegendListMore = [];
|
||||||
|
this.chartInfo = {};
|
||||||
|
this.seriesItem = []; // 保存信息
|
||||||
|
this.seriesItemArr = [];// 初次加载的数据
|
||||||
|
this.seriesLength = 20;
|
||||||
|
this.seriesItemScreen = [];
|
||||||
|
this.seriesItemArrScreen = [];
|
||||||
|
this.legend = [];
|
||||||
|
this.legendList = [];
|
||||||
|
this.screenLegendList = [];
|
||||||
|
this.legendOptions = [];
|
||||||
|
this.screenLegendOptions = [];
|
||||||
|
|
||||||
|
this.highchartStore = null, // 保存图表数据
|
||||||
|
this.echartStore = null,// 保存图表数据
|
||||||
|
this.echartModalStore = null, // 全屏查看时数据
|
||||||
|
|
||||||
|
this.bgColorList = ['#7bbfea', '#b3424a', '#f05b72', '#596032', '#bd6758',
|
||||||
|
'#cd9a5b', '#918597', '#70a19f', '#005344', '#FF00FF',
|
||||||
|
'#f7acbc', '#5f5d46', '#66ffff', '#ccFF66', '#f47920',
|
||||||
|
'#769149', '#1d953f', '#abc88b', '#7f7522', '#9b95c9',
|
||||||
|
'#f3715c', '#ea66a6', '#d1c7b7', '#9d9087', '#77787b',
|
||||||
|
'#f58220', '#c37e00', '#00ae9d', '#f26522', '#76becc',
|
||||||
|
'#76624c', '#d71345', '#2468a2', '#ca8687', '#1b315e',
|
||||||
|
];
|
||||||
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.firstLoad = false;
|
this.firstLoad = false;
|
||||||
if(!document.onmousemove){// 添加鼠标移动事件监听
|
if(!document.onmousemove){// 添加鼠标移动事件监听
|
||||||
|
|||||||
@@ -86,7 +86,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
addDisabled() {
|
addDisabled() {
|
||||||
let enabled = this.selectableScripts.filter(item => {return !item.disabled});
|
let enabled = this.selectableScripts.filter(item => {
|
||||||
|
return !item.disabled
|
||||||
|
});
|
||||||
return enabled.length === 0;
|
return enabled.length === 0;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -180,6 +182,8 @@
|
|||||||
},
|
},
|
||||||
|
|
||||||
getSelectableScripts() {
|
getSelectableScripts() {
|
||||||
|
let userNotifications = this.editUser.notifications;
|
||||||
|
if (userNotifications) {
|
||||||
this.selectableScripts = this.scripts.map(item => {
|
this.selectableScripts = this.scripts.map(item => {
|
||||||
let exist = this.editUser.notifications.some(n => {
|
let exist = this.editUser.notifications.some(n => {
|
||||||
return item.id === n.scriptId;
|
return item.id === n.scriptId;
|
||||||
@@ -191,13 +195,24 @@
|
|||||||
}
|
}
|
||||||
return item;
|
return item;
|
||||||
});
|
});
|
||||||
|
} else {
|
||||||
|
this.selectableScripts = this.scripts.map(item => {
|
||||||
|
this.$set(item, "disabled", false);
|
||||||
|
return item;
|
||||||
|
});
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
addNotification() {
|
addNotification() {
|
||||||
let scripts = this.selectableScripts.find(item => {
|
let scripts = this.selectableScripts.find(item => {
|
||||||
return item.disabled === false;
|
return item.disabled === false;
|
||||||
});
|
});
|
||||||
scripts && this.editUser.notifications.push({scriptId: scripts.id, account: ""});
|
if (scripts) {
|
||||||
|
if (!this.editUser.notifications) {
|
||||||
|
this.editUser.notifications = [];
|
||||||
|
}
|
||||||
|
this.editUser.notifications.push({scriptId: scripts.id, account: ""});
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
removeNotification(index) {
|
removeNotification(index) {
|
||||||
@@ -246,9 +261,6 @@
|
|||||||
.el-select {
|
.el-select {
|
||||||
width: 100px;
|
width: 100px;
|
||||||
|
|
||||||
.el-input__inner {
|
|
||||||
vertical-align: top;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -93,7 +93,7 @@
|
|||||||
</el-switch>
|
</el-switch>
|
||||||
</span>
|
</span>
|
||||||
<template v-else-if="item.prop == 'tags'">
|
<template v-else-if="item.prop == 'tags'">
|
||||||
<span>{{filterTags(item.scriptId, scope)}}</span>
|
<span>{{filterTags(item, scope)}}</span>
|
||||||
</template>
|
</template>
|
||||||
<span v-else-if="item.prop == 'createTime'">{{utcTimeToTimezoneStr(scope.row[item.prop])}}</span>
|
<span v-else-if="item.prop == 'createTime'">{{utcTimeToTimezoneStr(scope.row[item.prop])}}</span>
|
||||||
<span v-else>{{scope.row[item.prop]}}</span>
|
<span v-else>{{scope.row[item.prop]}}</span>
|
||||||
@@ -371,7 +371,7 @@
|
|||||||
},
|
},
|
||||||
plmouseleave(el,self){
|
plmouseleave(el,self){
|
||||||
self.tools.tableHover = false;
|
self.tools.tableHover = false;
|
||||||
}
|
},
|
||||||
|
|
||||||
resetTableTitle:function(){
|
resetTableTitle:function(){
|
||||||
let title = this.tools.customTableTitle;
|
let title = this.tools.customTableTitle;
|
||||||
@@ -401,16 +401,15 @@
|
|||||||
{id: 5, name: "DST:X"},
|
{id: 5, name: "DST:X"},
|
||||||
];*/
|
];*/
|
||||||
},
|
},
|
||||||
filterTags(scriptId, scope) {
|
filterTags(head, scope) {
|
||||||
this.$nextTick(() => {
|
if (scope.row.notifications) {
|
||||||
let notification = scope.row.notifications.find(item => {
|
let notification = scope.row.notifications.find(item => {
|
||||||
return scriptId === item.scriptId;
|
return head.scriptId === item.scriptId;
|
||||||
});
|
});
|
||||||
if (notification) {
|
if (notification) {
|
||||||
return notification.account;
|
return notification.account;
|
||||||
}
|
}
|
||||||
})
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
@@ -446,6 +445,7 @@
|
|||||||
: this.tableTitle;
|
: this.tableTitle;
|
||||||
this.tableTitleReset(this.tableTitle,this.tools.customTableTitle);
|
this.tableTitleReset(this.tableTitle,this.tools.customTableTitle);
|
||||||
|
|
||||||
|
this.resetTableTitle();
|
||||||
this.getTableData();
|
this.getTableData();
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
//绑定滚动条事件,控制top按钮
|
//绑定滚动条事件,控制top按钮
|
||||||
|
|||||||
Reference in New Issue
Block a user