Discover: sidebarFilter - fix Timeframes Clear button.
This commit is contained in:
@@ -69,9 +69,9 @@ export default{
|
||||
timeFrameStartEnd: function() {
|
||||
let start = getMoment(this.startTime).format('YYYY-MM-DDTHH:mm:ss');
|
||||
let end = getMoment(this.endTime).format('YYYY-MM-DDTHH:mm:ss');
|
||||
this.selectTimeFrame = [start ,end]; // 傳給後端的資料
|
||||
this.selectTimeFrame = [start, end]; // 傳給後端的資料
|
||||
|
||||
return [start ,end];
|
||||
return [start, end];
|
||||
},
|
||||
// 找出 slidrData,時間格式:毫秒時間戳
|
||||
sliderData: function() {
|
||||
@@ -129,6 +129,17 @@ export default{
|
||||
return data;
|
||||
},
|
||||
},
|
||||
watch:{
|
||||
selectTimeFrame(newValue, oldValue) {
|
||||
console.log(newValue); // []
|
||||
if(newValue.length === 0) {
|
||||
this.startTime = new Date(getMoment(this.filterTimeframe.x_axis.min).format());
|
||||
this.endTime = new Date(getMoment(this.filterTimeframe.x_axis.max).format());
|
||||
this.selectArea = [0, this.selectRange];
|
||||
this.resizeMask(this.chart);
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
resizeMask(chart) {
|
||||
let from = (this.selectArea[0] * 0.01) / (this.selectRange * 0.01);
|
||||
|
||||
@@ -383,7 +383,7 @@ export default {
|
||||
this.isEndSelected = null;
|
||||
this.isActAllTask = true;
|
||||
// Timeframes
|
||||
this.timeFrameStartEnd = null;
|
||||
this.selectTimeFrame = [];
|
||||
// Trace
|
||||
if (this.$refs.filterTraceView) {
|
||||
this.$refs.filterTraceView.showTraceId = null;
|
||||
|
||||
Reference in New Issue
Block a user