Browse Source

Pull request #3007: 无JIAR任务 解决合并冲突

Merge in VISUAL/fineui from ~KITETOP/fineui_view:master to master

* commit '1a04b48a0d093b9a5507d2ae2453b2d904336cfa':
  REPORT-78579 fix: 调整bi.time_combo组件结构,保持结构统一
  REPORT-78514 revert: REPORT-7696组件是否异步获取数据,和组件是否支持搜索分离开
es6
Kitetop 2 years ago
parent
commit
cfb85f5833
  1. 2
      src/widget/multilayerselecttree/multilayerselecttree.combo.js
  2. 2
      src/widget/multilayersingletree/multilayersingletree.combo.js
  3. 196
      src/widget/time/time.combo.js

2
src/widget/multilayerselecttree/multilayerselecttree.combo.js

@ -289,4 +289,4 @@ BI.MultiLayerSelectTreeCombo.EVENT_CHANGE = "EVENT_CHANGE";
BI.MultiLayerSelectTreeCombo.EVENT_STOP = "EVENT_STOP"; BI.MultiLayerSelectTreeCombo.EVENT_STOP = "EVENT_STOP";
BI.MultiLayerSelectTreeCombo.EVENT_BEFORE_POPUPVIEW = "EVENT_BEFORE_POPUPVIEW"; BI.MultiLayerSelectTreeCombo.EVENT_BEFORE_POPUPVIEW = "EVENT_BEFORE_POPUPVIEW";
BI.MultiLayerSelectTreeCombo.EVENT_CLICK_ITEM = "EVENT_CLICK_ITEM"; BI.MultiLayerSelectTreeCombo.EVENT_CLICK_ITEM = "EVENT_CLICK_ITEM";
BI.shortcut("bi.multilayer_select_tree_combo", BI.MultiLayerSelectTreeCombo); BI.shortcut("bi.multilayer_select_tree_combo", BI.MultiLayerSelectTreeCombo);

2
src/widget/multilayersingletree/multilayersingletree.combo.js

@ -263,4 +263,4 @@ BI.MultiLayerSingleTreeCombo.EVENT_FOCUS = "EVENT_FOCUS";
BI.MultiLayerSingleTreeCombo.EVENT_CHANGE = "EVENT_CHANGE"; BI.MultiLayerSingleTreeCombo.EVENT_CHANGE = "EVENT_CHANGE";
BI.MultiLayerSingleTreeCombo.EVENT_STOP = "EVENT_STOP"; BI.MultiLayerSingleTreeCombo.EVENT_STOP = "EVENT_STOP";
BI.MultiLayerSingleTreeCombo.EVENT_BEFORE_POPUPVIEW = "EVENT_BEFORE_POPUPVIEW"; BI.MultiLayerSingleTreeCombo.EVENT_BEFORE_POPUPVIEW = "EVENT_BEFORE_POPUPVIEW";
BI.shortcut("bi.multilayer_single_tree_combo", BI.MultiLayerSingleTreeCombo); BI.shortcut("bi.multilayer_single_tree_combo", BI.MultiLayerSingleTreeCombo);

196
src/widget/time/time.combo.js

@ -60,96 +60,117 @@
} }
}; };
return { return {
type: "bi.horizontal_fill", type: "bi.absolute",
cls: "bi-border bi-border-radius",
columnSize: ["fill", this.constants.iconWidth],
height: opts.height - 2,
width: opts.width - 2,
items: [{ items: [{
el: { el: {
type: "bi.combo", type: "bi.combo",
cls: "bi-border bi-border-radius",
container: opts.container, container: opts.container,
toggle: false, toggle: false,
isNeedAdjustHeight: opts.isNeedAdjustHeight, isNeedAdjustHeight: opts.isNeedAdjustHeight,
isNeedAdjustWidth: opts.isNeedAdjustWidth, isNeedAdjustWidth: opts.isNeedAdjustWidth,
el: { el: {
type: "bi.time_trigger", type: "bi.horizontal_fill",
columnSize: ["fill", this.constants.iconWidth],
height: opts.height - 2, height: opts.height - 2,
allowEdit: opts.allowEdit, items: [{
watermark: opts.watermark, type: "bi.time_trigger",
format: opts.format, height: opts.height - 2,
value: opts.value, allowEdit: opts.allowEdit,
ref: function (_ref) { watermark: opts.watermark,
self.trigger = _ref; format: opts.format,
}, value: opts.value,
listeners: [{ ref: function (_ref) {
eventName: "EVENT_KEY_DOWN", self.trigger = _ref;
action: function () { },
if (self.combo.isViewVisible()) { listeners: [{
self.combo.hideView(); eventName: "EVENT_KEY_DOWN",
action: function () {
if (self.combo.isViewVisible()) {
self.combo.hideView();
}
self.fireEvent(BI.TimeCombo.EVENT_KEY_DOWN, arguments);
} }
self.fireEvent(BI.TimeCombo.EVENT_KEY_DOWN, arguments); }, {
} eventName: "EVENT_STOP",
}, { action: function () {
eventName: "EVENT_STOP", if (!self.combo.isViewVisible()) {
action: function () { self.combo.showView();
if (!self.combo.isViewVisible()) { }
self.combo.showView();
} }
} }, {
}, { eventName: "EVENT_FOCUS",
eventName: "EVENT_FOCUS", action: function () {
action: function () { self.storeTriggerValue = self.trigger.getKey();
self.storeTriggerValue = self.trigger.getKey(); if (!self.combo.isViewVisible()) {
if (!self.combo.isViewVisible()) { self.combo.showView();
self.combo.showView(); }
self.fireEvent("EVENT_FOCUS");
} }
self.fireEvent("EVENT_FOCUS"); }, {
} eventName: "EVENT_BLUR",
}, { action: function () {
eventName: "EVENT_BLUR", self.fireEvent("EVENT_BLUR");
action: function () { }
self.fireEvent("EVENT_BLUR"); }, {
} eventName: "EVENT_ERROR",
}, { action: function () {
eventName: "EVENT_ERROR", var date = BI.getDate();
action: function () { self.storeValue = {
var date = BI.getDate(); hour: date.getHours(),
self.storeValue = { minute: date.getMinutes(),
hour: date.getHours(), second: date.getSeconds()
minute: date.getMinutes(), };
second: date.getSeconds() self.fireEvent("EVENT_ERROR");
}; }
self.fireEvent("EVENT_ERROR"); }, {
} eventName: "EVENT_VALID",
}, { action: function () {
eventName: "EVENT_VALID", self.fireEvent("EVENT_VALID");
action: function () {
self.fireEvent("EVENT_VALID");
}
}, {
eventName: "EVENT_CHANGE",
action: function () {
self.fireEvent("EVENT_CHANGE");
}
}, {
eventName: "EVENT_CONFIRM",
action: function () {
if (self.combo.isViewVisible()) {
return;
} }
var dateStore = self.storeTriggerValue; }, {
var dateObj = self.trigger.getKey(); eventName: "EVENT_CHANGE",
if (BI.isNotEmptyString(dateObj) && !BI.isEqual(dateObj, dateStore)) { action: function () {
self.storeValue = self.trigger.getValue(); self.fireEvent("EVENT_CHANGE");
self.setValue(self.trigger.getValue());
} else if (BI.isEmptyString(dateObj)) {
self.storeValue = null;
self.trigger.setValue();
} }
self.fireEvent("EVENT_CONFIRM"); }, {
} eventName: "EVENT_CONFIRM",
}] action: function () {
if (self.combo.isViewVisible()) {
return;
}
var dateStore = self.storeTriggerValue;
var dateObj = self.trigger.getKey();
if (BI.isNotEmptyString(dateObj) && !BI.isEqual(dateObj, dateStore)) {
self.storeValue = self.trigger.getValue();
self.setValue(self.trigger.getValue());
} else if (BI.isEmptyString(dateObj)) {
self.storeValue = null;
self.trigger.setValue();
}
self.fireEvent("EVENT_CONFIRM");
}
}]
}, {
el: {
type: "bi.icon_button",
cls: "bi-trigger-icon-button time-font",
width: this.constants.iconWidth,
listeners: [{
eventName: BI.IconButton.EVENT_CHANGE,
action: function () {
if (self.combo.isViewVisible()) {
// self.combo.hideView();
} else {
self.combo.showView();
}
}
}],
ref: function (_ref) {
self.triggerBtn = _ref;
}
},
}],
}, },
adjustLength: this.constants.comboAdjustHeight, adjustLength: this.constants.comboAdjustHeight,
popup: { popup: {
@ -171,25 +192,10 @@
self.combo = _ref; self.combo = _ref;
} }
}, },
}, { top: 0,
el: { left: 0,
type: "bi.icon_button", right: 0,
cls: "bi-trigger-icon-button time-font", bottom: 0
width: this.constants.iconWidth,
listeners: [{
eventName: BI.IconButton.EVENT_CHANGE,
action: function () {
if (self.combo.isViewVisible()) {
// self.combo.hideView();
} else {
self.combo.showView();
}
}
}],
ref: function (_ref) {
self.triggerBtn = _ref;
}
},
}] }]
}; };
}, },

Loading…
Cancel
Save