feat:全屏图表添加手动刷新按钮

This commit is contained in:
zhangyu
2020-12-01 10:55:39 +08:00
parent e18da8390d
commit 6d72516a44
9 changed files with 172 additions and 34 deletions

View File

@@ -259,13 +259,19 @@ export default {
this.$set(this.searchTime, 0, timeGroup[0]);
this.$set(this.searchTime, 1, timeGroup[1]);
this.$set(this.showTime, 'id', 0);
this.$set(this.showTime, 'text', this.searchTime[0]+" "+this.$t("dashboard.panel.to")+" "+this.searchTime[1]);
this.nowTimeType={
id:4,
text:this.$t("dashboard.panel.lastOneHour"),
type:'hour',
value:1,
};
this.$set(this.showTime, 'id', this.nowTimeType.id);
this.$set(this.showTime, 'text', this.nowTimeType.text);
}
},
//left(){},
//right(){},
timeChange(val) {
timeChange(val,from) {
this.nowTimeType=val;
this.$set(this.showTime, 'id', val.id);
this.$set(this.showTime, 'text', val.text);
@@ -286,8 +292,13 @@ export default {
let id = val.id;
if(id===0){//custom
this.isCustom = true;
this.$refs.calendar.focus();
if(from==='chart'){
this.isCustom = false;
this.$emit('change', this.searchTime);
} else{
this.isCustom = true;
this.$refs.calendar.focus();
}
}else {
this.isCustom = false;
if(this.showEmpty&& id === 12){