|
|
@ -8,7 +8,7 @@ |
|
|
|
BI.DynamicYearQuarterCard = BI.inherit(BI.Widget, { |
|
|
|
BI.DynamicYearQuarterCard = BI.inherit(BI.Widget, { |
|
|
|
|
|
|
|
|
|
|
|
props: { |
|
|
|
props: { |
|
|
|
baseCls: "bi-year-month-card" |
|
|
|
baseCls: "bi-year-quarter-card" |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
render: function () { |
|
|
|
render: function () { |
|
|
@ -78,7 +78,7 @@ BI.DynamicYearQuarterCard = BI.inherit(BI.Widget, { |
|
|
|
case BI.DynamicDateCard.TYPE.YEAR: |
|
|
|
case BI.DynamicDateCard.TYPE.YEAR: |
|
|
|
valueMap.year = (value.offset === 0 ? -value.value : +value.value); |
|
|
|
valueMap.year = (value.offset === 0 ? -value.value : +value.value); |
|
|
|
break; |
|
|
|
break; |
|
|
|
case BI.DynamicDateCard.TYPE.MONTH: |
|
|
|
case BI.DynamicDateCard.TYPE.QUARTER: |
|
|
|
valueMap.quarter = (value.offset === 0 ? -value.value : +value.value); |
|
|
|
valueMap.quarter = (value.offset === 0 ? -value.value : +value.value); |
|
|
|
break; |
|
|
|
break; |
|
|
|
default: |
|
|
|
default: |
|
|
@ -108,7 +108,7 @@ BI.DynamicYearQuarterCard = BI.inherit(BI.Widget, { |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
setValue: function (v) { |
|
|
|
setValue: function (v) { |
|
|
|
v = v || {year: 0, month: 0}; |
|
|
|
v = v || {year: 0, quarter: 0}; |
|
|
|
this.year.setValue(this._createValue(BI.DynamicDateCard.TYPE.YEAR, v.year)); |
|
|
|
this.year.setValue(this._createValue(BI.DynamicDateCard.TYPE.YEAR, v.year)); |
|
|
|
this.quarter.setValue(this._createValue(BI.DynamicDateCard.TYPE.QUARTER, v.quarter)); |
|
|
|
this.quarter.setValue(this._createValue(BI.DynamicDateCard.TYPE.QUARTER, v.quarter)); |
|
|
|
}, |
|
|
|
}, |
|
|
|