Issues #175: done.
This commit is contained in:
@@ -132,8 +132,8 @@ export default{
|
|||||||
watch:{
|
watch:{
|
||||||
selectTimeFrame(newValue, oldValue) {
|
selectTimeFrame(newValue, oldValue) {
|
||||||
if(newValue.length === 0) {
|
if(newValue.length === 0) {
|
||||||
this.startTime = new Date(getMoment(this.filterTimeframe.x_axis.min).format());
|
this.startTime = new Date(this.filterTimeframe.x_axis.min);
|
||||||
this.endTime = new Date(getMoment(this.filterTimeframe.x_axis.max).format());
|
this.endTime = new Date(this.filterTimeframe.x_axis.max);
|
||||||
this.selectArea = [0, this.selectRange];
|
this.selectArea = [0, this.selectRange];
|
||||||
this.resizeMask(this.chart);
|
this.resizeMask(this.chart);
|
||||||
}
|
}
|
||||||
@@ -300,10 +300,10 @@ export default{
|
|||||||
// Slider
|
// Slider
|
||||||
this.selectArea = [0, this.selectRange];
|
this.selectArea = [0, this.selectRange];
|
||||||
// Calendar
|
// Calendar
|
||||||
this.startMinDate = new Date(getMoment(this.filterTimeframe.x_axis.min).format());
|
this.startMinDate = new Date(this.filterTimeframe.x_axis.min);
|
||||||
this.startMaxDate = new Date(getMoment(this.filterTimeframe.x_axis.max).format());
|
this.startMaxDate = new Date(this.filterTimeframe.x_axis.max);
|
||||||
this.endMinDate = new Date(getMoment(this.filterTimeframe.x_axis.min).format());
|
this.endMinDate = new Date(this.filterTimeframe.x_axis.min);
|
||||||
this.endMaxDate = new Date(getMoment(this.filterTimeframe.x_axis.max).format());
|
this.endMaxDate = new Date(this.filterTimeframe.x_axis.max);
|
||||||
// 讓日曆的範圍等於時間軸的範圍
|
// 讓日曆的範圍等於時間軸的範圍
|
||||||
this.startTime = this.startMinDate;
|
this.startTime = this.startMinDate;
|
||||||
this.endTime = this.startMaxDate;
|
this.endTime = this.startMaxDate;
|
||||||
|
|||||||
@@ -460,15 +460,18 @@ export default {
|
|||||||
break;
|
break;
|
||||||
case 'int-attr':
|
case 'int-attr':
|
||||||
case 'float-attr':
|
case 'float-attr':
|
||||||
|
label = `${includeStr}, ${e.key}, from ${e.min} to ${e.max}`;
|
||||||
|
type = "Attributes";
|
||||||
|
break;
|
||||||
case 'date-attr':
|
case 'date-attr':
|
||||||
label = `${includeStr}, ${e.key}, start with ${e.min}, end with ${e.max}`;
|
label = `${includeStr}, ${e.key}, from ${getMoment(e.min).format('YYYY-MM-DD HH:mm')} to ${getMoment(e.max).format('YYYY-MM-DD HH:mm')}`;
|
||||||
type = "Attributes";
|
type = "Attributes";
|
||||||
break;
|
break;
|
||||||
case "occurred-in":
|
case "occurred-in":
|
||||||
case "started-in":
|
case "started-in":
|
||||||
case "completed-in":
|
case "completed-in":
|
||||||
case "occurred-around":
|
case "occurred-around":
|
||||||
label = `${containmentMap[e.type]}, ${includeStr}, from ${getMoment(e.start).format("YYYY-MM-DD HH:mm:ss")} to ${getMoment(e.end).format("YYYY-MM-DD HH:mm:ss")} `
|
label = `${containmentMap[e.type]}, ${includeStr}, from ${getMoment(e.start).format("YYYY-MM-DD HH:mm")} to ${getMoment(e.end).format("YYYY-MM-DD HH:mm")} `
|
||||||
type = "Timeframe"
|
type = "Timeframe"
|
||||||
break;
|
break;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -241,21 +241,11 @@ export default defineStore('allMapDataStore', {
|
|||||||
this.allFilterTimeframe = response.data.timeframe;
|
this.allFilterTimeframe = response.data.timeframe;
|
||||||
this.allFilterTrace = response.data.trace;
|
this.allFilterTrace = response.data.trace;
|
||||||
this.allFilterAttrs = response.data.attrs;
|
this.allFilterAttrs = response.data.attrs;
|
||||||
// this.allFilterAttrs.map(att => {
|
|
||||||
// switch (att.type) {
|
let min = this.allFilterTimeframe.x_axis.min;
|
||||||
// case 'date':
|
let max = this.allFilterTimeframe.x_axis.max;
|
||||||
// att.min = att.min !== null ? moment(att.min).format('YYYY/MM/DD HH:mm:ss') : null;
|
this.allFilterTimeframe.x_axis.min = min !== null ? moment(min).format('YYYY/MM/DD HH:mm') : null;
|
||||||
// att.max = att.max !== null ? moment(att.max).format('YYYY/MM/DD HH:mm:ss') : null;
|
this.allFilterTimeframe.x_axis.max = max !== null ? moment(max).format('YYYY/MM/DD HH:mm') : null;
|
||||||
// break;
|
|
||||||
// case 'float':
|
|
||||||
// att.min = att.min !== null ? new Decimal(att.min).toFixed(2) : null;
|
|
||||||
// att.max = att.max !== null ? new Decimal(att.max).toFixed(2) : null;
|
|
||||||
// break
|
|
||||||
// default:
|
|
||||||
// break;
|
|
||||||
// }
|
|
||||||
// return att;
|
|
||||||
// });
|
|
||||||
} catch(error) {
|
} catch(error) {
|
||||||
apiError(error, 'Failed to load the Filter Parameters.');
|
apiError(error, 'Failed to load the Filter Parameters.');
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user