|
|
@ -26161,7 +26161,7 @@ BI.ShowAction = BI.inherit(BI.Action, { |
|
|
|
cv = new Date(cv); |
|
|
|
cv = new Date(cv); |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
// 字符串类型,如yyyyMMdd、MMddyyyy等这样无分隔符的结构
|
|
|
|
// 字符串类型,如yyyyMMdd、MMddyyyy等这样无分隔符的结构
|
|
|
|
cv = Date.parseDate(cv + "", Date.patterns.ISO8601Long); |
|
|
|
cv = Date.parseDateTime(cv + "", Date.patterns.ISO8601Long); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
if (!BI.isNull(cv)) { |
|
|
|
if (!BI.isNull(cv)) { |
|
|
@ -94144,7 +94144,6 @@ BI.IntervalSlider = BI.inherit(BI.Single, { |
|
|
|
type: "bi.sign_text_editor", |
|
|
|
type: "bi.sign_text_editor", |
|
|
|
cls: "slider-editor-button", |
|
|
|
cls: "slider-editor-button", |
|
|
|
text: this.options.unit, |
|
|
|
text: this.options.unit, |
|
|
|
textAlign: "left", |
|
|
|
|
|
|
|
allowBlank: false, |
|
|
|
allowBlank: false, |
|
|
|
width: c.EDITOR_WIDTH, |
|
|
|
width: c.EDITOR_WIDTH, |
|
|
|
validationChecker: function (v) { |
|
|
|
validationChecker: function (v) { |
|
|
@ -94157,13 +94156,14 @@ BI.IntervalSlider = BI.inherit(BI.Single, { |
|
|
|
self.labelOne.element.removeClass("bi-border"); |
|
|
|
self.labelOne.element.removeClass("bi-border"); |
|
|
|
}); |
|
|
|
}); |
|
|
|
this.labelOne.on(BI.Editor.EVENT_CONFIRM, function () { |
|
|
|
this.labelOne.on(BI.Editor.EVENT_CONFIRM, function () { |
|
|
|
|
|
|
|
var oldValueOne = self.valueOne; |
|
|
|
var v = BI.parseFloat(this.getValue()); |
|
|
|
var v = BI.parseFloat(this.getValue()); |
|
|
|
self.valueOne = v; |
|
|
|
self.valueOne = v; |
|
|
|
var percent = self._getPercentByValue(v); |
|
|
|
var percent = self._getPercentByValue(v); |
|
|
|
var significantPercent = BI.parseFloat(percent.toFixed(1));// 分成1000份
|
|
|
|
var significantPercent = BI.parseFloat(percent.toFixed(1));// 分成1000份
|
|
|
|
self._setLabelOnePosition(significantPercent); |
|
|
|
|
|
|
|
self._setSliderOnePosition(significantPercent); |
|
|
|
self._setSliderOnePosition(significantPercent); |
|
|
|
self._setBlueTrack(); |
|
|
|
self._setBlueTrack(); |
|
|
|
|
|
|
|
self._checkLabelPosition(oldValueOne, self.valueTwo, self.valueOne, self.valueTwo); |
|
|
|
self.fireEvent(BI.IntervalSlider.EVENT_CHANGE); |
|
|
|
self.fireEvent(BI.IntervalSlider.EVENT_CHANGE); |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
@ -94173,7 +94173,6 @@ BI.IntervalSlider = BI.inherit(BI.Single, { |
|
|
|
text: this.options.unit, |
|
|
|
text: this.options.unit, |
|
|
|
allowBlank: false, |
|
|
|
allowBlank: false, |
|
|
|
width: c.EDITOR_WIDTH, |
|
|
|
width: c.EDITOR_WIDTH, |
|
|
|
textAlign: "right", |
|
|
|
|
|
|
|
validationChecker: function (v) { |
|
|
|
validationChecker: function (v) { |
|
|
|
return self._checkValidation(v); |
|
|
|
return self._checkValidation(v); |
|
|
|
} |
|
|
|
} |
|
|
@ -94184,13 +94183,14 @@ BI.IntervalSlider = BI.inherit(BI.Single, { |
|
|
|
self.labelTwo.element.removeClass("bi-border"); |
|
|
|
self.labelTwo.element.removeClass("bi-border"); |
|
|
|
}); |
|
|
|
}); |
|
|
|
this.labelTwo.on(BI.Editor.EVENT_CONFIRM, function () { |
|
|
|
this.labelTwo.on(BI.Editor.EVENT_CONFIRM, function () { |
|
|
|
|
|
|
|
var oldValueTwo = self.valueTwo; |
|
|
|
var v = BI.parseFloat(this.getValue()); |
|
|
|
var v = BI.parseFloat(this.getValue()); |
|
|
|
self.valueTwo = v; |
|
|
|
self.valueTwo = v; |
|
|
|
var percent = self._getPercentByValue(v); |
|
|
|
var percent = self._getPercentByValue(v); |
|
|
|
var significantPercent = BI.parseFloat(percent.toFixed(1)); |
|
|
|
var significantPercent = BI.parseFloat(percent.toFixed(1)); |
|
|
|
self._setLabelTwoPosition(significantPercent); |
|
|
|
|
|
|
|
self._setSliderTwoPosition(significantPercent); |
|
|
|
self._setSliderTwoPosition(significantPercent); |
|
|
|
self._setBlueTrack(); |
|
|
|
self._setBlueTrack(); |
|
|
|
|
|
|
|
self._checkLabelPosition(self.valueOne, oldValueTwo, self.valueOne, self.valueTwo); |
|
|
|
self.fireEvent(BI.IntervalSlider.EVENT_CHANGE); |
|
|
|
self.fireEvent(BI.IntervalSlider.EVENT_CHANGE); |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
@ -94238,16 +94238,17 @@ BI.IntervalSlider = BI.inherit(BI.Single, { |
|
|
|
var v = this._getValueByPercent(significantPercent); |
|
|
|
var v = this._getValueByPercent(significantPercent); |
|
|
|
v = this._assertValue(v); |
|
|
|
v = this._assertValue(v); |
|
|
|
v = o.digit === false ? v : v.toFixed(o.digit); |
|
|
|
v = o.digit === false ? v : v.toFixed(o.digit); |
|
|
|
|
|
|
|
var oldValueOne = this.valueOne, oldValueTwo = this.valueTwo; |
|
|
|
if(isLeft) { |
|
|
|
if(isLeft) { |
|
|
|
this._setLabelOnePosition(significantPercent); |
|
|
|
|
|
|
|
this._setSliderOnePosition(significantPercent); |
|
|
|
this._setSliderOnePosition(significantPercent); |
|
|
|
this.labelOne.setValue(v); |
|
|
|
this.labelOne.setValue(v); |
|
|
|
this.valueOne = v; |
|
|
|
this.valueOne = v; |
|
|
|
|
|
|
|
this._checkLabelPosition(oldValueOne, oldValueTwo, v, this.valueTwo); |
|
|
|
}else{ |
|
|
|
}else{ |
|
|
|
this._setLabelTwoPosition(significantPercent); |
|
|
|
|
|
|
|
this._setSliderTwoPosition(significantPercent); |
|
|
|
this._setSliderTwoPosition(significantPercent); |
|
|
|
this.labelTwo.setValue(v); |
|
|
|
this.labelTwo.setValue(v); |
|
|
|
this.valueTwo = v; |
|
|
|
this.valueTwo = v; |
|
|
|
|
|
|
|
this._checkLabelPosition(oldValueOne, oldValueTwo, this.valueOne, v); |
|
|
|
} |
|
|
|
} |
|
|
|
this._setBlueTrack(); |
|
|
|
this._setBlueTrack(); |
|
|
|
}, |
|
|
|
}, |
|
|
@ -94422,14 +94423,16 @@ BI.IntervalSlider = BI.inherit(BI.Single, { |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
_setLabelOnePosition: function (percent) { |
|
|
|
_checkLabelPosition: function (oldValueOne, oldValueTwo, valueOne, valueTwo, isLeft) { |
|
|
|
// this.labelOne.element.css({left: percent + "%"});
|
|
|
|
oldValueOne = BI.parseFloat(oldValueOne); |
|
|
|
// this._checkOverlap();
|
|
|
|
oldValueTwo = BI.parseFloat(oldValueTwo); |
|
|
|
}, |
|
|
|
valueOne = BI.parseFloat(valueOne); |
|
|
|
|
|
|
|
valueTwo = BI.parseFloat(valueTwo); |
|
|
|
_setLabelTwoPosition: function (percent) { |
|
|
|
if((oldValueOne <= oldValueTwo && valueOne > valueTwo) || (oldValueOne >= oldValueTwo && valueOne < valueTwo)) { |
|
|
|
// this.labelTwo.element.css({left: percent + "%"});
|
|
|
|
var isSliderOneLeft = BI.parseFloat(this.sliderOne.element[0].style.left) < BI.parseFloat(this.sliderTwo.element[0].style.left); |
|
|
|
// this._checkOverlap();
|
|
|
|
this.labelOne.element.css({left: isSliderOneLeft ? "0%" : "100%"}); |
|
|
|
|
|
|
|
this.labelTwo.element.css({left: isSliderOneLeft ? "100%" : "0%"}); |
|
|
|
|
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
_setSliderOnePosition: function (percent) { |
|
|
|
_setSliderOnePosition: function (percent) { |
|
|
@ -94462,9 +94465,7 @@ BI.IntervalSlider = BI.inherit(BI.Single, { |
|
|
|
|
|
|
|
|
|
|
|
_setAllPosition: function (one, two) { |
|
|
|
_setAllPosition: function (one, two) { |
|
|
|
this._setSliderOnePosition(one); |
|
|
|
this._setSliderOnePosition(one); |
|
|
|
this._setLabelOnePosition(one); |
|
|
|
|
|
|
|
this._setSliderTwoPosition(two); |
|
|
|
this._setSliderTwoPosition(two); |
|
|
|
this._setLabelTwoPosition(two); |
|
|
|
|
|
|
|
this._setBlueTrack(); |
|
|
|
this._setBlueTrack(); |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|