Browse Source

Pull request #3524: BI-125770 && REPORT-95210

Merge in VISUAL/fineui from ~DAILER/fineui:es6 to es6

* commit '318d5293c4519a92b8b01db39812d1e087f8ad84':
  REPORT-95210 fix: 【BI-地图配置】管理系统-地图配置中的地理信息显示为空白
  BI-125770 fix: 【6.0.10发散】更新任务管理-当前运行情况,展开下拉展开搜索不能展开,前端报错
es6
Dailer-刘荣歆 2 years ago
parent
commit
66e7617a36
  1. 112
      packages/fineui/src/case/button/node/treenode.js
  2. 72
      packages/fineui/src/widget/dynamicdatetime/dynamicdatetime.combo.js
  3. 2
      packages/fineui/src/widget/dynamicdatetime/dynamicdatetime.trigger.js

112
packages/fineui/src/case/button/node/treenode.js

@ -20,7 +20,7 @@ export class BasicTreeNode extends NodeButton {
isLastNode: false, isLastNode: false,
switcherIcon: {}, switcherIcon: {},
selectable: true, selectable: true,
disabled: false, // disabled不会影响展开收起功能 disabled: false // disabled不会影响展开收起功能
}); });
} }
@ -42,7 +42,7 @@ export class BasicTreeNode extends NodeButton {
iconWrapperWidth, iconWrapperWidth,
iconCls, iconCls,
switcherIcon, switcherIcon,
selectable, selectable
} = this.options; } = this.options;
const checkbox = { const checkbox = {
@ -68,9 +68,9 @@ export class BasicTreeNode extends NodeButton {
if (!this.isEnabled() || selectable) { if (!this.isEnabled() || selectable) {
this.isOpened() ? this.triggerCollapse() : this.triggerExpand(); this.isOpened() ? this.triggerCollapse() : this.triggerExpand();
} }
},
} }
], }
]
}; };
// const indent = { // const indent = {
@ -90,8 +90,8 @@ export class BasicTreeNode extends NodeButton {
type: IconLabel.xtype, type: IconLabel.xtype,
// iconWidth, // iconWidth,
// iconHeight, // iconHeight,
cls: iconCls, cls: iconCls
}, }
// width: 24, // width: 24,
} : null; } : null;
@ -102,7 +102,7 @@ export class BasicTreeNode extends NodeButton {
{ {
el: checkbox, el: checkbox,
lgap: layer * SIZE_CONSANTS.LIST_ITEM_HEIGHT / 2, // 偏移公式为每一层的偏移量为节点高度的一半 lgap: layer * SIZE_CONSANTS.LIST_ITEM_HEIGHT / 2, // 偏移公式为每一层的偏移量为节点高度的一半
width: iconWrapperWidth || height, width: iconWrapperWidth || height
}, },
icon, icon,
{ {
@ -121,11 +121,11 @@ export class BasicTreeNode extends NodeButton {
rgap: textRgap, rgap: textRgap,
text, text,
value, value,
keyword, keyword
}, },
width: "fill", width: "fill"
} }
]), ])
}; };
} }
@ -154,6 +154,14 @@ export class BasicTreeNode extends NodeButton {
} }
} }
/**
* 下面的全是兼容,正常开发不要用
*/
/**
* @deprecated
*/
@shortcut() @shortcut()
export class FirstPlusGroupNode extends BasicTreeNode { export class FirstPlusGroupNode extends BasicTreeNode {
static xtype = "bi.first_plus_group_node"; static xtype = "bi.first_plus_group_node";
@ -164,11 +172,14 @@ export class FirstPlusGroupNode extends BasicTreeNode {
return extend(conf, { return extend(conf, {
baseCls: `${conf.baseCls || ""} bi-first-plus-group-node`, baseCls: `${conf.baseCls || ""} bi-first-plus-group-node`,
isFirstNode: true, isFirstNode: true,
isLastNode: false, isLastNode: false
}); });
} }
} }
/**
* @deprecated
*/
@shortcut() @shortcut()
export class MidPlusGroupNode extends BasicTreeNode { export class MidPlusGroupNode extends BasicTreeNode {
static xtype = "bi.mid_plus_group_node"; static xtype = "bi.mid_plus_group_node";
@ -179,11 +190,14 @@ export class MidPlusGroupNode extends BasicTreeNode {
return extend(conf, { return extend(conf, {
baseCls: `${conf.baseCls || ""} bi-mid-plus-group-node`, baseCls: `${conf.baseCls || ""} bi-mid-plus-group-node`,
isFirstNode: false, isFirstNode: false,
isLastNode: false, isLastNode: false
}); });
} }
} }
/**
* @deprecated
*/
@shortcut() @shortcut()
export class LastPlusGroupNode extends BasicTreeNode { export class LastPlusGroupNode extends BasicTreeNode {
static xtype = "bi.last_plus_group_node"; static xtype = "bi.last_plus_group_node";
@ -194,7 +208,79 @@ export class LastPlusGroupNode extends BasicTreeNode {
return extend(conf, { return extend(conf, {
baseCls: `${conf.baseCls || ""} bi-last-plus-group-node`, baseCls: `${conf.baseCls || ""} bi-last-plus-group-node`,
isFirstNode: false, isFirstNode: false,
isLastNode: true, isLastNode: true
});
}
}
/**
* @deprecated
*/
@shortcut()
export class SelectTreeRootPlusGroupNode extends BasicTreeNode {
static xtype = "bi.select_tree_plus_group_node";
_defaultConfig() {
const conf = super._defaultConfig(...arguments);
return extend(conf, {
baseCls: `${conf.baseCls || ""} bi-select-tree-plus-group-node`,
isFirstNode: true,
isLastNode: true
});
}
}
/**
* @deprecated
*/
@shortcut()
export class SelectTreeFirstPlusGroupNode extends BasicTreeNode {
static xtype = "bi.select_tree_first_plus_group_node";
_defaultConfig() {
const conf = super._defaultConfig(...arguments);
return extend(conf, {
baseCls: `${conf.baseCls || ""} bi-select-tree-first-plus-group-node`,
isFirstNode: true,
isLastNode: false
});
}
}
/**
* @deprecated
*/
@shortcut()
export class SelectTreeMidPlusGroupNode extends BasicTreeNode {
static xtype = "bi.select_tree_mid_plus_group_node";
_defaultConfig() {
const conf = super._defaultConfig(...arguments);
return extend(conf, {
baseCls: `${conf.baseCls || ""} bi-select-tree-mid-plus-group-node`,
isFirstNode: false,
isLastNode: false
});
}
}
/**
* @deprecated
*/
@shortcut()
export class SelectTreeLastPlusGroupNode extends BasicTreeNode {
static xtype = "bi.select_tree_last_plus_group_node";
_defaultConfig() {
const conf = super._defaultConfig(...arguments);
return extend(conf, {
baseCls: `${conf.baseCls || ""} bi-select-tree-last-plus-group-node`,
isFirstNode: false,
isLastNode: true
}); });
} }
} }

72
packages/fineui/src/widget/dynamicdatetime/dynamicdatetime.combo.js

@ -28,10 +28,12 @@ export class DynamicDateTimeCombo extends Single {
popupWidth: 270, popupWidth: 270,
comboAdjustHeight: 1, comboAdjustHeight: 1,
border: 1, border: 1,
iconWidth: 24, iconWidth: 24
}; };
props = { props = () => {
const date = getDate();
return {
baseCls: "bi-dynamic-date--time-combo", baseCls: "bi-dynamic-date--time-combo",
height: 24, height: 24,
minDate: "1900-01-01", minDate: "1900-01-01",
@ -40,10 +42,18 @@ export class DynamicDateTimeCombo extends Single {
allowEdit: true, allowEdit: true,
supportDynamic: true, supportDynamic: true,
attributes: { attributes: {
tabIndex: -1, tabIndex: -1
}, },
isNeedAdjustHeight: false, isNeedAdjustHeight: false,
isNeedAdjustWidth: false, isNeedAdjustWidth: false,
value: {
type: DynamicDateTimeCombo.Static,
value: {
year: date.getFullYear(),
month: date.getMonth() + 1
}
}
};
}; };
static EVENT_KEY_DOWN = "EVENT_KEY_DOWN"; static EVENT_KEY_DOWN = "EVENT_KEY_DOWN";
@ -95,8 +105,8 @@ export class DynamicDateTimeCombo extends Single {
height: toPix(opts.height, border), height: toPix(opts.height, border),
ref: _ref => { ref: _ref => {
this.changeIcon = _ref; this.changeIcon = _ref;
}, }
}, }
}, },
{ {
type: DynamicDateTimeTrigger.xtype, type: DynamicDateTimeTrigger.xtype,
@ -120,7 +130,7 @@ export class DynamicDateTimeCombo extends Single {
this.combo.hideView(); this.combo.hideView();
} }
this.fireEvent(DynamicDateTimeCombo.EVENT_KEY_DOWN, ...args); this.fireEvent(DynamicDateTimeCombo.EVENT_KEY_DOWN, ...args);
}, }
}, },
{ {
eventName: DynamicDateTimeTrigger.EVENT_STOP, eventName: DynamicDateTimeTrigger.EVENT_STOP,
@ -128,13 +138,13 @@ export class DynamicDateTimeCombo extends Single {
if (!this.combo.isViewVisible()) { if (!this.combo.isViewVisible()) {
this.combo.showView(); this.combo.showView();
} }
}, }
}, },
{ {
eventName: DynamicDateTimeTrigger.EVENT_TRIGGER_CLICK, eventName: DynamicDateTimeTrigger.EVENT_TRIGGER_CLICK,
action: () => { action: () => {
this.combo.toggle(); this.combo.toggle();
}, }
}, },
{ {
eventName: DynamicDateTimeTrigger.EVENT_FOCUS, eventName: DynamicDateTimeTrigger.EVENT_FOCUS,
@ -144,13 +154,13 @@ export class DynamicDateTimeCombo extends Single {
this.combo.showView(); this.combo.showView();
} }
this.fireEvent(DynamicDateTimeCombo.EVENT_FOCUS); this.fireEvent(DynamicDateTimeCombo.EVENT_FOCUS);
}, }
}, },
{ {
eventName: DynamicDateTimeTrigger.EVENT_BLUR, eventName: DynamicDateTimeTrigger.EVENT_BLUR,
action: () => { action: () => {
this.fireEvent(DynamicDateTimeCombo.EVENT_BLUR); this.fireEvent(DynamicDateTimeCombo.EVENT_BLUR);
}, }
}, },
{ {
eventName: DynamicDateTimeTrigger.EVENT_ERROR, eventName: DynamicDateTimeTrigger.EVENT_ERROR,
@ -159,12 +169,12 @@ export class DynamicDateTimeCombo extends Single {
type: DynamicDateTimeCombo.Static, type: DynamicDateTimeCombo.Static,
value: { value: {
year: date.getFullYear(), year: date.getFullYear(),
month: date.getMonth() + 1, month: date.getMonth() + 1
}, }
}; };
this.combo.element.addClass("error"); this.combo.element.addClass("error");
this.fireEvent(DynamicDateTimeCombo.EVENT_ERROR); this.fireEvent(DynamicDateTimeCombo.EVENT_ERROR);
}, }
}, },
{ {
eventName: DynamicDateTimeTrigger.EVENT_VALID, eventName: DynamicDateTimeTrigger.EVENT_VALID,
@ -172,13 +182,13 @@ export class DynamicDateTimeCombo extends Single {
this.storeValue = this.trigger.getValue(); this.storeValue = this.trigger.getValue();
this.combo.element.removeClass("error"); this.combo.element.removeClass("error");
this.fireEvent(DynamicDateTimeCombo.EVENT_VALID); this.fireEvent(DynamicDateTimeCombo.EVENT_VALID);
}, }
}, },
{ {
eventName: DynamicDateTimeTrigger.EVENT_CHANGE, eventName: DynamicDateTimeTrigger.EVENT_CHANGE,
action: () => { action: () => {
this.fireEvent(DynamicDateTimeCombo.EVENT_CHANGE); this.fireEvent(DynamicDateTimeCombo.EVENT_CHANGE);
}, }
}, },
{ {
eventName: DynamicDateTimeTrigger.EVENT_CONFIRM, eventName: DynamicDateTimeTrigger.EVENT_CONFIRM,
@ -197,11 +207,11 @@ export class DynamicDateTimeCombo extends Single {
} }
this._checkDynamicValue(this.storeValue); this._checkDynamicValue(this.storeValue);
this.fireEvent(DynamicDateTimeCombo.EVENT_CONFIRM); this.fireEvent(DynamicDateTimeCombo.EVENT_CONFIRM);
},
} }
],
} }
], ]
}
]
}, },
adjustLength: this.constants.comboAdjustHeight, adjustLength: this.constants.comboAdjustHeight,
popup: { popup: {
@ -222,7 +232,7 @@ export class DynamicDateTimeCombo extends Single {
this.setValue(); this.setValue();
this.combo.hideView(); this.combo.hideView();
this.fireEvent(DynamicDateTimeCombo.EVENT_CONFIRM); this.fireEvent(DynamicDateTimeCombo.EVENT_CONFIRM);
}, }
}, },
{ {
eventName: DynamicDateTimePopup.BUTTON_lABEL_EVENT_CHANGE, eventName: DynamicDateTimePopup.BUTTON_lABEL_EVENT_CHANGE,
@ -236,12 +246,12 @@ export class DynamicDateTimeCombo extends Single {
day: date.getDate(), day: date.getDate(),
hour: 0, hour: 0,
minute: 0, minute: 0,
second: 0, second: 0
}, }
}); });
this.combo.hideView(); this.combo.hideView();
this.fireEvent(DynamicDateTimeCombo.EVENT_CONFIRM); this.fireEvent(DynamicDateTimeCombo.EVENT_CONFIRM);
}, }
}, },
{ {
eventName: DynamicDateTimePopup.BUTTON_OK_EVENT_CHANGE, eventName: DynamicDateTimePopup.BUTTON_OK_EVENT_CHANGE,
@ -252,7 +262,7 @@ export class DynamicDateTimeCombo extends Single {
} }
this.combo.hideView(); this.combo.hideView();
this.fireEvent(DynamicDateTimeCombo.EVENT_CONFIRM); this.fireEvent(DynamicDateTimeCombo.EVENT_CONFIRM);
}, }
}, },
{ {
eventName: DynamicDateTimePopup.EVENT_CHANGE, eventName: DynamicDateTimePopup.EVENT_CHANGE,
@ -260,16 +270,16 @@ export class DynamicDateTimeCombo extends Single {
this.setValue(this.popup.getValue()); this.setValue(this.popup.getValue());
this.combo.hideView(); this.combo.hideView();
this.fireEvent(DynamicDateTimeCombo.EVENT_CONFIRM); this.fireEvent(DynamicDateTimeCombo.EVENT_CONFIRM);
}, }
}, },
{ {
eventName: DynamicDateTimePopup.EVENT_BEFORE_YEAR_MONTH_POPUPVIEW, eventName: DynamicDateTimePopup.EVENT_BEFORE_YEAR_MONTH_POPUPVIEW,
action: () => { action: () => {
this.fireEvent(DynamicDateTimeCombo.EVENT_BEFORE_YEAR_MONTH_POPUPVIEW); this.fireEvent(DynamicDateTimeCombo.EVENT_BEFORE_YEAR_MONTH_POPUPVIEW);
},
} }
], }
}, ]
}
}, },
listeners: [ listeners: [
{ {
@ -279,9 +289,9 @@ export class DynamicDateTimeCombo extends Single {
this.popup.setMaxDate(opts.maxDate); this.popup.setMaxDate(opts.maxDate);
this.popup.setValue(this.storeValue); this.popup.setValue(this.storeValue);
this.fireEvent(DynamicDateTimeCombo.EVENT_BEFORE_POPUPVIEW); this.fireEvent(DynamicDateTimeCombo.EVENT_BEFORE_POPUPVIEW);
},
} }
], }
]
// // DEC-4250 和复选下拉一样,点击不收起 // // DEC-4250 和复选下拉一样,点击不收起
// hideChecker: function (e) { // hideChecker: function (e) {
// return self.triggerBtn.element.find(e.target).length === 0; // return self.triggerBtn.element.find(e.target).length === 0;
@ -290,9 +300,9 @@ export class DynamicDateTimeCombo extends Single {
top: 0, top: 0,
left: 0, left: 0,
right: 0, right: 0,
bottom: 0, bottom: 0
} }
], ]
}; };
} }

2
packages/fineui/src/widget/dynamicdatetime/dynamicdatetime.trigger.js

@ -455,10 +455,10 @@ export class DynamicDateTimeTrigger extends Trigger {
type = v.type || DynamicDateCombo.Static; type = v.type || DynamicDateCombo.Static;
value = v.value || v; value = v.value || v;
} }
const text = this._getText(value);
switch (type) { switch (type) {
case DynamicDateCombo.Dynamic: case DynamicDateCombo.Dynamic:
const text = this._getText(value);
date = DynamicDateHelper.getCalculation(value); date = DynamicDateHelper.getCalculation(value);
this._setInnerValue(date, text); this._setInnerValue(date, text);
break; break;

Loading…
Cancel
Save