Browse Source

KERNEL-14108 refactor:处理文件引入后TODO项

es6
Joker.Wang-王顺 2 years ago
parent
commit
787d762f4a
  1. 5
      src/case/pager/pager.all.count.js
  2. 7
      src/widget/yearquarter/combo.yearquarter.js
  3. 5
      src/widget/yearquarter/popup.yearquarter.js
  4. 5
      src/widget/yearquarter/trigger.yearquarter.js

5
src/case/pager/pager.all.count.js

@ -12,7 +12,7 @@ import {
HorizontalAlign, HorizontalAlign,
isNotEmptyObject isNotEmptyObject
} from "@/core"; } from "@/core";
import { SmallTextEditor } from "@/widget/editor/editor.text.small"; import { SmallTextEditor, TextEditor } from "@/widget";
/** /**
* 有总页数和总行数的分页控件 * 有总页数和总行数的分页控件
@ -100,8 +100,7 @@ export class AllCountPager extends Widget {
invisible: pages <= 1, invisible: pages <= 1,
}); });
// TODO:需等到TextEditor 完成es6化后才可替换BI.TextEditor this.editor.on(TextEditor.EVENT_CONFIRM, () => {
this.editor.on(BI.TextEditor.EVENT_CONFIRM, () => {
this.pager.setValue(parseInt(this.editor.getValue())); this.pager.setValue(parseInt(this.editor.getValue()));
this.fireEvent(AllCountPager.EVENT_CHANGE); this.fireEvent(AllCountPager.EVENT_CHANGE);
}); });

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

@ -14,8 +14,7 @@ import {
getQuarter getQuarter
} from "@/core"; } from "@/core";
import { DynamicYearQuarterTrigger } from "./trigger.yearquarter"; import { DynamicYearQuarterTrigger } from "./trigger.yearquarter";
// TODO:需要等待yearmonth完成才能将BI.DynamicYearMonthTrigger替换 import { DynamicYearMonthCombo } from "../yearmonth/combo.yearmonth";
// import { DynamicYearMonthCombo } from "../yearmonth/combo.yearmonth";
import { DynamicYearQuarterPopup } from "./popup.yearquarter"; import { DynamicYearQuarterPopup } from "./popup.yearquarter";
import { DynamicDateCombo } from "../dynamicdate"; import { DynamicDateCombo } from "../dynamicdate";
import { Combo, IconButton } from "@/base"; import { Combo, IconButton } from "@/base";
@ -75,7 +74,7 @@ export class DynamicYearQuarterCombo extends Widget {
}); });
this.trigger.on(DynamicYearQuarterTrigger.EVENT_VALID, () => { this.trigger.on(DynamicYearQuarterTrigger.EVENT_VALID, () => {
this.comboWrapper.element.removeClass("error"); this.comboWrapper.element.removeClass("error");
this.fireEvent(BI.DynamicYearMonthCombo.EVENT_VALID); this.fireEvent(DynamicYearMonthCombo.EVENT_VALID);
}); });
this.trigger.on(DynamicYearQuarterTrigger.EVENT_CONFIRM, () => { this.trigger.on(DynamicYearQuarterTrigger.EVENT_CONFIRM, () => {
const dateStore = this.storeTriggerValue; const dateStore = this.storeTriggerValue;
@ -142,7 +141,7 @@ export class DynamicYearQuarterCombo extends Widget {
action: () => { action: () => {
const date = getDate(); const date = getDate();
this.setValue({ this.setValue({
type: BI.DynamicYearMonthCombo.Static, type: DynamicYearMonthCombo.Static,
value: { value: {
year: date.getFullYear(), year: date.getFullYear(),
quarter: getQuarter(date), quarter: getQuarter(date),

5
src/widget/yearquarter/popup.yearquarter.js

@ -14,8 +14,7 @@ import {
import { DynamicYearQuarterCombo } from "./combo.yearquarter"; import { DynamicYearQuarterCombo } from "./combo.yearquarter";
import { TextButton, Tab } from "@/base"; import { TextButton, Tab } from "@/base";
import { DynamicDateCombo, DynamicDatePopup, DynamicDateHelper } from "../dynamicdate"; import { DynamicDateCombo, DynamicDatePopup, DynamicDateHelper } from "../dynamicdate";
// TODO:需要等待year完成才能将BI.DynamicYearCard替换 import { DynamicYearCard } from "../year/card.dynamic.year";
// import { DynamicYearCard } from "../year/card.dynamic.year";
import { LinearSegment } from "@/case"; import { LinearSegment } from "@/case";
import { DynamicYearQuarterCard } from "./card.dynamic.yearquarter"; import { DynamicYearQuarterCard } from "./card.dynamic.yearquarter";
import { StaticYearQuarterCard } from "./card.static.yearquarter"; import { StaticYearQuarterCard } from "./card.static.yearquarter";
@ -228,7 +227,7 @@ export class DynamicYearQuarterPopup extends Widget {
max: this.options.max, max: this.options.max,
listeners: [ listeners: [
{ {
eventName: BI.DynamicYearCard.EVENT_CHANGE, eventName: DynamicYearCard.EVENT_CHANGE,
action: () => { action: () => {
this.fireEvent( this.fireEvent(
DynamicYearQuarterPopup.EVENT_CHANGE DynamicYearQuarterPopup.EVENT_CHANGE

5
src/widget/yearquarter/trigger.yearquarter.js

@ -21,8 +21,7 @@ import {
import { Trigger, TextButton } from "@/base"; import { Trigger, TextButton } from "@/base";
import { TriggerIconButton, SignEditor } from "@/case"; import { TriggerIconButton, SignEditor } from "@/case";
import { DynamicDateHelper } from "../dynamicdate"; import { DynamicDateHelper } from "../dynamicdate";
// TODO:需要等待yearmonth完成才能将BI.DynamicYearMonthTrigger替换 import { DynamicYearMonthTrigger } from "../yearmonth/trigger.yearmonth";
// import { DynamicYearMonthTrigger } from "../yearmonth/trigger.yearmonth";
import { DynamicYearQuarterCombo } from "./combo.yearquarter"; import { DynamicYearQuarterCombo } from "./combo.yearquarter";
@shortcut() @shortcut()
@ -221,7 +220,7 @@ export class DynamicYearQuarterTrigger extends Trigger {
o.max o.max
)[0] )[0]
) { ) {
this.fireEvent(BI.DynamicYearMonthTrigger.EVENT_VALID); this.fireEvent(DynamicYearMonthTrigger.EVENT_VALID);
} }
} }
}); });

Loading…
Cancel
Save