fix: 修复alertmsg图表单位切换无效的问题
This commit is contained in:
@@ -184,10 +184,10 @@
|
|||||||
<div slot="title">
|
<div slot="title">
|
||||||
{{$t("project.endpoint.dialogTitle")}}
|
{{$t("project.endpoint.dialogTitle")}}
|
||||||
<div class="float-right panel-calendar dialog-tool" style="display: flex">
|
<div class="float-right panel-calendar dialog-tool" style="display: flex">
|
||||||
<pick-time :refresh-data-func="queryChartDate" :use-refresh="false" v-model="searchTime" style="height: 28px;"></pick-time>
|
<pick-time :refresh-data-func="queryChartDate" :use-refresh="false" v-model="searchTime" style="height: 28px;" @unitChange="chartUnitChange"></pick-time>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<chart ref="messageChart" ></chart>
|
<chart ref="messageChart" :unit="chartUnit"></chart>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</span>
|
</span>
|
||||||
</template>
|
</template>
|
||||||
@@ -216,6 +216,7 @@
|
|||||||
sameLabels: ['instance','module','project','asset','endpoint','datacenter'],
|
sameLabels: ['instance','module','project','asset','endpoint','datacenter'],
|
||||||
searchTime: [new Date().setHours(new Date().getHours() - 1), new Date()],
|
searchTime: [new Date().setHours(new Date().getHours() - 1), new Date()],
|
||||||
currentMsg: {},
|
currentMsg: {},
|
||||||
|
chartUnit: 5,
|
||||||
|
|
||||||
defaultSearchValue: this.obj.alertNum ? 1 : 0,
|
defaultSearchValue: this.obj.alertNum ? 1 : 0,
|
||||||
showElementSet: false,
|
showElementSet: false,
|
||||||
@@ -561,6 +562,13 @@
|
|||||||
this.queryChartDate();
|
this.queryChartDate();
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
chartUnitChange:function(unit){
|
||||||
|
this.chartUnit=unit;
|
||||||
|
this.$nextTick(()=>{
|
||||||
|
this.queryChartDate()
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
dialogClose() {
|
dialogClose() {
|
||||||
this.graphShow = false;
|
this.graphShow = false;
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -208,10 +208,10 @@
|
|||||||
<div slot="title">
|
<div slot="title">
|
||||||
{{$t("project.endpoint.dialogTitle")}}
|
{{$t("project.endpoint.dialogTitle")}}
|
||||||
<div class="float-right panel-calendar dialog-tool" style="display: flex">
|
<div class="float-right panel-calendar dialog-tool" style="display: flex">
|
||||||
<pick-time :refresh-data-func="queryChartDate" :use-refresh="false" v-model="searchTime" style="height: 28px;"></pick-time>
|
<pick-time :refresh-data-func="queryChartDate" :use-refresh="false" v-model="searchTime" style="height: 28px;" @unitChange="chartUnitChange"></pick-time>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<chart ref="messageChart" name="alertMessageChart"></chart>
|
<chart ref="messageChart" name="alertMessageChart" :unit="chartUnit"></chart>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -258,6 +258,7 @@
|
|||||||
legend: [],
|
legend: [],
|
||||||
searchTime: [new Date().setHours(new Date().getHours() - 1), new Date()],
|
searchTime: [new Date().setHours(new Date().getHours() - 1), new Date()],
|
||||||
currentMsg: {},
|
currentMsg: {},
|
||||||
|
chartUnit: 5,
|
||||||
|
|
||||||
tableId: 'alertListTable', //需要分页的table的id,用于记录每页数量
|
tableId: 'alertListTable', //需要分页的table的id,用于记录每页数量
|
||||||
showTopBtn: false,
|
showTopBtn: false,
|
||||||
@@ -471,6 +472,12 @@
|
|||||||
this.$store.commit('setHeaderTable', data);
|
this.$store.commit('setHeaderTable', data);
|
||||||
this.tablelable = data;
|
this.tablelable = data;
|
||||||
},
|
},
|
||||||
|
chartUnitChange:function(unit){
|
||||||
|
this.chartUnit=unit;
|
||||||
|
this.$nextTick(()=>{
|
||||||
|
this.queryChartDate()
|
||||||
|
})
|
||||||
|
},
|
||||||
queryChartDate() {
|
queryChartDate() {
|
||||||
let start = this.searchTime[0]?this.searchTime[0]:this.getTime(-1, 'h');
|
let start = this.searchTime[0]?this.searchTime[0]:this.getTime(-1, 'h');
|
||||||
let end = this.searchTime[1]?this.searchTime[1]:this.getTime(0, 'h')
|
let end = this.searchTime[1]?this.searchTime[1]:this.getTime(0, 'h')
|
||||||
|
|||||||
Reference in New Issue
Block a user