de/extensions/dataease-extensions-view/view-3dpie/view-3dpie-frontend/src/utils/compare.js
2023-08-24 17:34:35 +08:00

30 lines
739 B
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

export const compareItem = {
type: 'none', // year-yoy/month-yoy等
resultData: 'percent', // 对比差sub百分比percent等
field: '',
custom: {
field: '',
calcType: '0', // 0-增长值1-增长率
timeType: '0', // 0-固定日期1-日期区间
currentTime: '',
compareTime: '',
currentTimeRange: [],
compareTimeRange: []
}
}
export const compareYearList = [
{ name: 'year_mom', value: 'year_mom' }
]
export const compareMonthList = [
{ name: 'month_mom', value: 'month_mom' },
{ name: 'year_yoy', value: 'year_yoy' }
]
export const compareDayList = [
{ name: 'day_mom', value: 'day_mom' },
{ name: 'month_yoy', value: 'month_yoy' },
{ name: 'year_yoy', value: 'year_yoy' }
]