Browse Source

Merge pull request #402 in FUI/fineui from ~WINDY/fui:master to master

* commit '1d7fbb684c28347e0e3823b6bc07904040f376c8':
  update
  BI-20119
es6
guy 7 years ago
parent
commit
f85c9b9fff
  1. 2
      demo/js/widget/date/demo.multidate_combo.js
  2. 4
      demo/version.js
  3. 26
      dist/_fineui.min.js
  4. 60
      dist/bundle.js
  5. 28
      dist/bundle.min.js
  6. 4
      dist/config.js
  7. 107
      dist/demo.js
  8. 60
      dist/fineui.js
  9. 26
      dist/fineui.min.js
  10. 56
      dist/widget.js
  11. 4
      public/js/index.js
  12. 5
      src/widget/dynamicdate/dynamicdate.combo.js
  13. 5
      src/widget/dynamicdatetime/dynamicdatetime.combo.js
  14. 4
      src/widget/numberinterval/numberinterval.js
  15. 14
      src/widget/yearmonth/card.static.yearmonth.js
  16. 7
      src/widget/yearmonth/combo.yearmonth.js
  17. 14
      src/widget/yearquarter/card.static.yearquarter.js
  18. 7
      src/widget/yearquarter/combo.yearquarter.js
  19. 4
      ui/js/index.js

2
demo/js/widget/date/demo.multidate_combo.js

@ -20,7 +20,7 @@ Demo.Date = BI.inherit(BI.Widget, {
ref: function () {
self.datecombo = this;
},
width: 300,
width: 300
// value: {
// type: 1,
// value: {

4
demo/version.js

@ -161,5 +161,7 @@ BI.i18n = {
"BI-Font_Family": "字体",
"BI-Basic_Please_Input_Content": "请输入内容",
"BI-Basic_Please_Enter_Number_Between": "请输入{R1}-{R2}的值",
"BI-Word_Align_Center": "文字居中"
"BI-Word_Align_Center": "文字居中",
"BI-More_Than": "大于",
"BI-More_And_Equal": "大于等于"
};

26
dist/_fineui.min.js vendored

File diff suppressed because one or more lines are too long

60
dist/bundle.js vendored

@ -90877,10 +90877,7 @@ BI.extend(BI.DynamicDateCard, {
},
mounted: function () {
var o = this.options;
if(BI.isNotNull(o.value)) {
this._checkDynamicValue(o.value);
}
this._checkDynamicValue(this.storeValue);
},
_checkDynamicValue: function (v) {
@ -91740,10 +91737,7 @@ BI.shortcut("bi.dynamic_date_trigger", BI.DynamicDateTrigger);BI.DynamicDateTime
},
mounted: function () {
var o = this.options;
if(BI.isNotNull(o.value)) {
this._checkDynamicValue(o.value);
}
this._checkDynamicValue(this.storeValue);
},
_checkDynamicValue: function (v) {
@ -101100,11 +101094,11 @@ BI.NumberInterval = BI.inherit(BI.Single, {
cls: "number-interval-small-combo bi-border",
height: o.height - 2,
items: [{
text: "(" + BI.i18nText("BI-Less_Than") + ")",
text: "(" + BI.i18nText("BI-More_Than") + ")",
iconCls: "less-font",
value: 0
}, {
text: "(" + BI.i18nText("BI-Less_And_Equal") + ")",
text: "(" + BI.i18nText("BI-More_And_Equal") + ")",
value: 1,
iconCls: "less-equal-font"
}]
@ -109022,18 +109016,18 @@ BI.shortcut("bi.dynamic_year_month_card", BI.DynamicYearMonthCard);BI.StaticYear
setValue: function (obj) {
var o = this.options;
obj = obj || {};
obj.year = obj.year || 0;
obj.month = obj.month || 0;
if (obj.year === 0 || obj.month === 0 || BI.checkDateVoid(obj.year, obj.month, 1, o.min, o.max)[0]) {
var year = obj.year || BI.getDate().getFullYear();
var newObj = {};
newObj.year = obj.year || 0;
newObj.month = obj.month || 0;
if (newObj.year === 0 || newObj.month === 0 || BI.checkDateVoid(newObj.year, newObj.month, 1, o.min, o.max)[0]) {
var year = newObj.year || BI.getDate().getFullYear();
this.selectedYear = year;
this.selectedMonth = "";
this.yearPicker.setValue(year);
this.month.setValue();
} else {
this.selectedYear = BI.parseInt(obj.year);
this.selectedMonth = BI.parseInt(obj.month);
this.selectedYear = BI.parseInt(newObj.year);
this.selectedMonth = BI.parseInt(newObj.month);
this.yearPicker.setValue(this.selectedYear);
this.month.setValue(this.selectedMonth);
}
@ -109079,9 +109073,10 @@ BI.DynamicYearMonthCombo = BI.inherit(BI.Single, {
self.fireEvent(BI.DynamicYearMonthCombo.EVENT_VALID);
});
this.trigger.on(BI.DynamicYearMonthTrigger.EVENT_CONFIRM, function () {
if (self.combo.isViewVisible()) {
return;
}
// 没看出来干啥的,先去掉
// if (self.combo.isViewVisible()) {
// return;
// }
var dateStore = self.storeTriggerValue;
var dateObj = self.trigger.getKey();
if (BI.isNotEmptyString(dateObj) && !BI.isEqual(dateObj, dateStore)) {
@ -110023,18 +110018,18 @@ BI.shortcut("bi.dynamic_year_quarter_card", BI.DynamicYearQuarterCard);BI.Static
setValue: function (obj) {
var o = this.options;
obj = obj || {};
obj.year = obj.year || 0;
obj.quarter = obj.quarter || 0;
if (obj.quarter === 0 || obj.year === 0 || BI.checkDateVoid(obj.year, obj.quarter, 1, o.min, o.max)[0]) {
var year = obj.year || BI.getDate().getFullYear();
var newObj = {};
newObj.year = obj.year || 0;
newObj.quarter = obj.quarter || 0;
if (newObj.quarter === 0 || newObj.year === 0 || BI.checkDateVoid(newObj.year, newObj.quarter, 1, o.min, o.max)[0]) {
var year = newObj.year || BI.getDate().getFullYear();
this.selectedYear = year;
this.selectedQuarter = "";
this.yearPicker.setValue(year);
this.quarter.setValue();
} else {
this.selectedYear = BI.parseInt(obj.year);
this.selectedQuarter = BI.parseInt(obj.quarter);
this.selectedYear = BI.parseInt(newObj.year);
this.selectedQuarter = BI.parseInt(newObj.quarter);
this.yearPicker.setValue(this.selectedYear);
this.quarter.setValue(this.selectedQuarter);
}
@ -110076,9 +110071,10 @@ BI.DynamicYearQuarterCombo = BI.inherit(BI.Widget, {
self.combo.isViewVisible() && self.combo.hideView();
});
this.trigger.on(BI.DynamicYearQuarterTrigger.EVENT_CONFIRM, function () {
if (self.combo.isViewVisible()) {
return;
}
// 没看出来干啥的,先去掉
// if (self.combo.isViewVisible()) {
// return;
// }
var dateStore = self.storeTriggerValue;
var dateObj = self.trigger.getKey();
if (BI.isNotEmptyString(dateObj) && !BI.isEqual(dateObj, dateStore)) {
@ -112771,5 +112767,7 @@ BI.i18n = {
"BI-Font_Family": "字体",
"BI-Basic_Please_Input_Content": "请输入内容",
"BI-Word_Align_Center": "文字居中",
"BI-Basic_Please_Enter_Number_Between": "请输入{R1}-{R2}的值"
"BI-Basic_Please_Enter_Number_Between": "请输入{R1}-{R2}的值",
"BI-More_Than": "大于",
"BI-More_And_Equal": "大于等于"
};

28
dist/bundle.min.js vendored

File diff suppressed because one or more lines are too long

4
dist/config.js vendored

@ -161,5 +161,7 @@ BI.i18n = {
"BI-Font_Family": "字体",
"BI-Basic_Please_Input_Content": "请输入内容",
"BI-Basic_Please_Enter_Number_Between": "请输入{R1}-{R2}的值",
"BI-Word_Align_Center": "文字居中"
"BI-Word_Align_Center": "文字居中",
"BI-More_Than": "大于",
"BI-More_And_Equal": "大于等于"
};

107
dist/demo.js vendored

@ -11014,6 +11014,111 @@ BI.shortcut("demo.tmp", Demo.Func);
});
BI.shortcut("demo.fix_global_watcher", Demo.Fix);
}());(function () {
var State = BI.inherit(Fix.Model, {
state: function () {
return {
name: "原始属性",
info: {
age: 12,
sex: "male",
birth: {
year: 2018,
month: 9,
day: 11
}
},
career: [{
a: 1,
b: 2,
c: 3
}]
};
},
computed: {
b: function () {
return this.model.name + "-计算属性";
},
birth: function () {
return this.model.info.birth;
}
}
});
Demo.Fix = BI.inherit(BI.Widget, {
_store: function () {
return new State();
},
watch: {
b: function () {
this.button.setText(this.model.b);
},
"birth.**": function () {
console.log(123);
}
},
render: function () {
var self = this;
return {
type: "bi.vertical",
items: [{
el: {
type: "bi.button",
ref: function () {
self.button = this;
},
handler: function () {
self.model.name = "这是改变后的属性";
},
text: this.model.b
}
}, {
el: {
type: "bi.button",
ref: function () {
self.button = this;
},
handler: function () {
self.model.birth.year = 2019;
},
text: "birthYearButton"
}
}, {
el: {
type: "bi.button",
ref: function () {
self.button = this;
},
handler: function () {
self.model.career.push({
year: 2017,
month: 3,
day: 24
});
},
text: "careerAddButton"
}
}, {
el: {
type: "bi.button",
ref: function () {
self.button = this;
},
handler: function () {
self.model.career[0].a = 24;
},
text: "careerChangeButton"
}
}]
};
},
mounted: function () {
}
});
BI.shortcut("demo.fix_immutable", Demo.Fix);
}());/**
* @Author: Young
* @CreationDate 2017-11-06 10:32
@ -12275,7 +12380,7 @@ Demo.Date = BI.inherit(BI.Widget, {
ref: function () {
self.datecombo = this;
},
width: 300,
width: 300
// value: {
// type: 1,
// value: {

60
dist/fineui.js vendored

@ -91120,10 +91120,7 @@ BI.extend(BI.DynamicDateCard, {
},
mounted: function () {
var o = this.options;
if(BI.isNotNull(o.value)) {
this._checkDynamicValue(o.value);
}
this._checkDynamicValue(this.storeValue);
},
_checkDynamicValue: function (v) {
@ -91983,10 +91980,7 @@ BI.shortcut("bi.dynamic_date_trigger", BI.DynamicDateTrigger);BI.DynamicDateTime
},
mounted: function () {
var o = this.options;
if(BI.isNotNull(o.value)) {
this._checkDynamicValue(o.value);
}
this._checkDynamicValue(this.storeValue);
},
_checkDynamicValue: function (v) {
@ -101343,11 +101337,11 @@ BI.NumberInterval = BI.inherit(BI.Single, {
cls: "number-interval-small-combo bi-border",
height: o.height - 2,
items: [{
text: "(" + BI.i18nText("BI-Less_Than") + ")",
text: "(" + BI.i18nText("BI-More_Than") + ")",
iconCls: "less-font",
value: 0
}, {
text: "(" + BI.i18nText("BI-Less_And_Equal") + ")",
text: "(" + BI.i18nText("BI-More_And_Equal") + ")",
value: 1,
iconCls: "less-equal-font"
}]
@ -109265,18 +109259,18 @@ BI.shortcut("bi.dynamic_year_month_card", BI.DynamicYearMonthCard);BI.StaticYear
setValue: function (obj) {
var o = this.options;
obj = obj || {};
obj.year = obj.year || 0;
obj.month = obj.month || 0;
if (obj.year === 0 || obj.month === 0 || BI.checkDateVoid(obj.year, obj.month, 1, o.min, o.max)[0]) {
var year = obj.year || BI.getDate().getFullYear();
var newObj = {};
newObj.year = obj.year || 0;
newObj.month = obj.month || 0;
if (newObj.year === 0 || newObj.month === 0 || BI.checkDateVoid(newObj.year, newObj.month, 1, o.min, o.max)[0]) {
var year = newObj.year || BI.getDate().getFullYear();
this.selectedYear = year;
this.selectedMonth = "";
this.yearPicker.setValue(year);
this.month.setValue();
} else {
this.selectedYear = BI.parseInt(obj.year);
this.selectedMonth = BI.parseInt(obj.month);
this.selectedYear = BI.parseInt(newObj.year);
this.selectedMonth = BI.parseInt(newObj.month);
this.yearPicker.setValue(this.selectedYear);
this.month.setValue(this.selectedMonth);
}
@ -109322,9 +109316,10 @@ BI.DynamicYearMonthCombo = BI.inherit(BI.Single, {
self.fireEvent(BI.DynamicYearMonthCombo.EVENT_VALID);
});
this.trigger.on(BI.DynamicYearMonthTrigger.EVENT_CONFIRM, function () {
if (self.combo.isViewVisible()) {
return;
}
// 没看出来干啥的,先去掉
// if (self.combo.isViewVisible()) {
// return;
// }
var dateStore = self.storeTriggerValue;
var dateObj = self.trigger.getKey();
if (BI.isNotEmptyString(dateObj) && !BI.isEqual(dateObj, dateStore)) {
@ -110266,18 +110261,18 @@ BI.shortcut("bi.dynamic_year_quarter_card", BI.DynamicYearQuarterCard);BI.Static
setValue: function (obj) {
var o = this.options;
obj = obj || {};
obj.year = obj.year || 0;
obj.quarter = obj.quarter || 0;
if (obj.quarter === 0 || obj.year === 0 || BI.checkDateVoid(obj.year, obj.quarter, 1, o.min, o.max)[0]) {
var year = obj.year || BI.getDate().getFullYear();
var newObj = {};
newObj.year = obj.year || 0;
newObj.quarter = obj.quarter || 0;
if (newObj.quarter === 0 || newObj.year === 0 || BI.checkDateVoid(newObj.year, newObj.quarter, 1, o.min, o.max)[0]) {
var year = newObj.year || BI.getDate().getFullYear();
this.selectedYear = year;
this.selectedQuarter = "";
this.yearPicker.setValue(year);
this.quarter.setValue();
} else {
this.selectedYear = BI.parseInt(obj.year);
this.selectedQuarter = BI.parseInt(obj.quarter);
this.selectedYear = BI.parseInt(newObj.year);
this.selectedQuarter = BI.parseInt(newObj.quarter);
this.yearPicker.setValue(this.selectedYear);
this.quarter.setValue(this.selectedQuarter);
}
@ -110319,9 +110314,10 @@ BI.DynamicYearQuarterCombo = BI.inherit(BI.Widget, {
self.combo.isViewVisible() && self.combo.hideView();
});
this.trigger.on(BI.DynamicYearQuarterTrigger.EVENT_CONFIRM, function () {
if (self.combo.isViewVisible()) {
return;
}
// 没看出来干啥的,先去掉
// if (self.combo.isViewVisible()) {
// return;
// }
var dateStore = self.storeTriggerValue;
var dateObj = self.trigger.getKey();
if (BI.isNotEmptyString(dateObj) && !BI.isEqual(dateObj, dateStore)) {
@ -113014,5 +113010,7 @@ BI.i18n = {
"BI-Font_Family": "字体",
"BI-Basic_Please_Input_Content": "请输入内容",
"BI-Word_Align_Center": "文字居中",
"BI-Basic_Please_Enter_Number_Between": "请输入{R1}-{R2}的值"
"BI-Basic_Please_Enter_Number_Between": "请输入{R1}-{R2}的值",
"BI-More_Than": "大于",
"BI-More_And_Equal": "大于等于"
};

26
dist/fineui.min.js vendored

File diff suppressed because one or more lines are too long

56
dist/widget.js vendored

@ -3317,10 +3317,7 @@ BI.extend(BI.DynamicDateCard, {
},
mounted: function () {
var o = this.options;
if(BI.isNotNull(o.value)) {
this._checkDynamicValue(o.value);
}
this._checkDynamicValue(this.storeValue);
},
_checkDynamicValue: function (v) {
@ -4180,10 +4177,7 @@ BI.shortcut("bi.dynamic_date_trigger", BI.DynamicDateTrigger);BI.DynamicDateTime
},
mounted: function () {
var o = this.options;
if(BI.isNotNull(o.value)) {
this._checkDynamicValue(o.value);
}
this._checkDynamicValue(this.storeValue);
},
_checkDynamicValue: function (v) {
@ -13540,11 +13534,11 @@ BI.NumberInterval = BI.inherit(BI.Single, {
cls: "number-interval-small-combo bi-border",
height: o.height - 2,
items: [{
text: "(" + BI.i18nText("BI-Less_Than") + ")",
text: "(" + BI.i18nText("BI-More_Than") + ")",
iconCls: "less-font",
value: 0
}, {
text: "(" + BI.i18nText("BI-Less_And_Equal") + ")",
text: "(" + BI.i18nText("BI-More_And_Equal") + ")",
value: 1,
iconCls: "less-equal-font"
}]
@ -21462,18 +21456,18 @@ BI.shortcut("bi.dynamic_year_month_card", BI.DynamicYearMonthCard);BI.StaticYear
setValue: function (obj) {
var o = this.options;
obj = obj || {};
obj.year = obj.year || 0;
obj.month = obj.month || 0;
if (obj.year === 0 || obj.month === 0 || BI.checkDateVoid(obj.year, obj.month, 1, o.min, o.max)[0]) {
var year = obj.year || BI.getDate().getFullYear();
var newObj = {};
newObj.year = obj.year || 0;
newObj.month = obj.month || 0;
if (newObj.year === 0 || newObj.month === 0 || BI.checkDateVoid(newObj.year, newObj.month, 1, o.min, o.max)[0]) {
var year = newObj.year || BI.getDate().getFullYear();
this.selectedYear = year;
this.selectedMonth = "";
this.yearPicker.setValue(year);
this.month.setValue();
} else {
this.selectedYear = BI.parseInt(obj.year);
this.selectedMonth = BI.parseInt(obj.month);
this.selectedYear = BI.parseInt(newObj.year);
this.selectedMonth = BI.parseInt(newObj.month);
this.yearPicker.setValue(this.selectedYear);
this.month.setValue(this.selectedMonth);
}
@ -21519,9 +21513,10 @@ BI.DynamicYearMonthCombo = BI.inherit(BI.Single, {
self.fireEvent(BI.DynamicYearMonthCombo.EVENT_VALID);
});
this.trigger.on(BI.DynamicYearMonthTrigger.EVENT_CONFIRM, function () {
if (self.combo.isViewVisible()) {
return;
}
// 没看出来干啥的,先去掉
// if (self.combo.isViewVisible()) {
// return;
// }
var dateStore = self.storeTriggerValue;
var dateObj = self.trigger.getKey();
if (BI.isNotEmptyString(dateObj) && !BI.isEqual(dateObj, dateStore)) {
@ -22463,18 +22458,18 @@ BI.shortcut("bi.dynamic_year_quarter_card", BI.DynamicYearQuarterCard);BI.Static
setValue: function (obj) {
var o = this.options;
obj = obj || {};
obj.year = obj.year || 0;
obj.quarter = obj.quarter || 0;
if (obj.quarter === 0 || obj.year === 0 || BI.checkDateVoid(obj.year, obj.quarter, 1, o.min, o.max)[0]) {
var year = obj.year || BI.getDate().getFullYear();
var newObj = {};
newObj.year = obj.year || 0;
newObj.quarter = obj.quarter || 0;
if (newObj.quarter === 0 || newObj.year === 0 || BI.checkDateVoid(newObj.year, newObj.quarter, 1, o.min, o.max)[0]) {
var year = newObj.year || BI.getDate().getFullYear();
this.selectedYear = year;
this.selectedQuarter = "";
this.yearPicker.setValue(year);
this.quarter.setValue();
} else {
this.selectedYear = BI.parseInt(obj.year);
this.selectedQuarter = BI.parseInt(obj.quarter);
this.selectedYear = BI.parseInt(newObj.year);
this.selectedQuarter = BI.parseInt(newObj.quarter);
this.yearPicker.setValue(this.selectedYear);
this.quarter.setValue(this.selectedQuarter);
}
@ -22516,9 +22511,10 @@ BI.DynamicYearQuarterCombo = BI.inherit(BI.Widget, {
self.combo.isViewVisible() && self.combo.hideView();
});
this.trigger.on(BI.DynamicYearQuarterTrigger.EVENT_CONFIRM, function () {
if (self.combo.isViewVisible()) {
return;
}
// 没看出来干啥的,先去掉
// if (self.combo.isViewVisible()) {
// return;
// }
var dateStore = self.storeTriggerValue;
var dateObj = self.trigger.getKey();
if (BI.isNotEmptyString(dateObj) && !BI.isEqual(dateObj, dateStore)) {

4
public/js/index.js

@ -161,5 +161,7 @@ BI.i18n = {
"BI-Font_Family": "字体",
"BI-Basic_Please_Input_Content": "请输入内容",
"BI-Word_Align_Center": "文字居中",
"BI-Basic_Please_Enter_Number_Between": "请输入{R1}-{R2}的值"
"BI-Basic_Please_Enter_Number_Between": "请输入{R1}-{R2}的值",
"BI-More_Than": "大于",
"BI-More_And_Equal": "大于等于"
};

5
src/widget/dynamicdate/dynamicdate.combo.js

@ -211,10 +211,7 @@ BI.DynamicDateCombo = BI.inherit(BI.Single, {
},
mounted: function () {
var o = this.options;
if(BI.isNotNull(o.value)) {
this._checkDynamicValue(o.value);
}
this._checkDynamicValue(this.storeValue);
},
_checkDynamicValue: function (v) {

5
src/widget/dynamicdatetime/dynamicdatetime.combo.js

@ -214,10 +214,7 @@ BI.DynamicDateTimeCombo = BI.inherit(BI.Single, {
},
mounted: function () {
var o = this.options;
if(BI.isNotNull(o.value)) {
this._checkDynamicValue(o.value);
}
this._checkDynamicValue(this.storeValue);
},
_checkDynamicValue: function (v) {

4
src/widget/numberinterval/numberinterval.js

@ -124,11 +124,11 @@ BI.NumberInterval = BI.inherit(BI.Single, {
cls: "number-interval-small-combo bi-border",
height: o.height - 2,
items: [{
text: "(" + BI.i18nText("BI-Less_Than") + ")",
text: "(" + BI.i18nText("BI-More_Than") + ")",
iconCls: "less-font",
value: 0
}, {
text: "(" + BI.i18nText("BI-Less_And_Equal") + ")",
text: "(" + BI.i18nText("BI-More_And_Equal") + ")",
value: 1,
iconCls: "less-equal-font"
}]

14
src/widget/yearmonth/card.static.yearmonth.js

@ -96,18 +96,18 @@ BI.StaticYearMonthCard = BI.inherit(BI.Widget, {
setValue: function (obj) {
var o = this.options;
obj = obj || {};
obj.year = obj.year || 0;
obj.month = obj.month || 0;
if (obj.year === 0 || obj.month === 0 || BI.checkDateVoid(obj.year, obj.month, 1, o.min, o.max)[0]) {
var year = obj.year || BI.getDate().getFullYear();
var newObj = {};
newObj.year = obj.year || 0;
newObj.month = obj.month || 0;
if (newObj.year === 0 || newObj.month === 0 || BI.checkDateVoid(newObj.year, newObj.month, 1, o.min, o.max)[0]) {
var year = newObj.year || BI.getDate().getFullYear();
this.selectedYear = year;
this.selectedMonth = "";
this.yearPicker.setValue(year);
this.month.setValue();
} else {
this.selectedYear = BI.parseInt(obj.year);
this.selectedMonth = BI.parseInt(obj.month);
this.selectedYear = BI.parseInt(newObj.year);
this.selectedMonth = BI.parseInt(newObj.month);
this.yearPicker.setValue(this.selectedYear);
this.month.setValue(this.selectedMonth);
}

7
src/widget/yearmonth/combo.yearmonth.js

@ -36,9 +36,10 @@ BI.DynamicYearMonthCombo = BI.inherit(BI.Single, {
self.fireEvent(BI.DynamicYearMonthCombo.EVENT_VALID);
});
this.trigger.on(BI.DynamicYearMonthTrigger.EVENT_CONFIRM, function () {
if (self.combo.isViewVisible()) {
return;
}
// 没看出来干啥的,先去掉
// if (self.combo.isViewVisible()) {
// return;
// }
var dateStore = self.storeTriggerValue;
var dateObj = self.trigger.getKey();
if (BI.isNotEmptyString(dateObj) && !BI.isEqual(dateObj, dateStore)) {

14
src/widget/yearquarter/card.static.yearquarter.js

@ -88,18 +88,18 @@ BI.StaticYearQuarterCard = BI.inherit(BI.Widget, {
setValue: function (obj) {
var o = this.options;
obj = obj || {};
obj.year = obj.year || 0;
obj.quarter = obj.quarter || 0;
if (obj.quarter === 0 || obj.year === 0 || BI.checkDateVoid(obj.year, obj.quarter, 1, o.min, o.max)[0]) {
var year = obj.year || BI.getDate().getFullYear();
var newObj = {};
newObj.year = obj.year || 0;
newObj.quarter = obj.quarter || 0;
if (newObj.quarter === 0 || newObj.year === 0 || BI.checkDateVoid(newObj.year, newObj.quarter, 1, o.min, o.max)[0]) {
var year = newObj.year || BI.getDate().getFullYear();
this.selectedYear = year;
this.selectedQuarter = "";
this.yearPicker.setValue(year);
this.quarter.setValue();
} else {
this.selectedYear = BI.parseInt(obj.year);
this.selectedQuarter = BI.parseInt(obj.quarter);
this.selectedYear = BI.parseInt(newObj.year);
this.selectedQuarter = BI.parseInt(newObj.quarter);
this.yearPicker.setValue(this.selectedYear);
this.quarter.setValue(this.selectedQuarter);
}

7
src/widget/yearquarter/combo.yearquarter.js

@ -32,9 +32,10 @@ BI.DynamicYearQuarterCombo = BI.inherit(BI.Widget, {
self.combo.isViewVisible() && self.combo.hideView();
});
this.trigger.on(BI.DynamicYearQuarterTrigger.EVENT_CONFIRM, function () {
if (self.combo.isViewVisible()) {
return;
}
// 没看出来干啥的,先去掉
// if (self.combo.isViewVisible()) {
// return;
// }
var dateStore = self.storeTriggerValue;
var dateObj = self.trigger.getKey();
if (BI.isNotEmptyString(dateObj) && !BI.isEqual(dateObj, dateStore)) {

4
ui/js/index.js

@ -161,5 +161,7 @@ BI.i18n = {
"BI-Font_Family": "字体",
"BI-Basic_Please_Input_Content": "请输入内容",
"BI-Word_Align_Center": "文字居中",
"BI-Basic_Please_Enter_Number_Between": "请输入{R1}-{R2}的值"
"BI-Basic_Please_Enter_Number_Between": "请输入{R1}-{R2}的值",
"BI-More_Than": "大于",
"BI-More_And_Equal": "大于等于"
};
Loading…
Cancel
Save