import { AppReportPanelService } from '../ctrl-service/app-reportpanel-service';
import { MDControlBase } from './md-control-base';
export class ReportPanelControlBase extends MDControlBase {
    /**
     * 初始化报表面板模型
     *
     * @type {*}
     * @memberof ReportPanelControlBase
     */
    async ctrlModelInit() {
        await super.ctrlModelInit();
        if (!(this.Environment && this.Environment.isPreviewMode)) {
            this.service = new AppReportPanelService(this.controlInstance, this.context);
        }
    }
    /**
     * 报表面板部件初始化
     *
     * @memberof ReportPanelControlBase
     */
    ctrlInit() {
        super.ctrlInit();
    }
    viewStateAction(tag, action, data) {
        if (!Object.is(tag, this.name)) {
            return;
        }
        super.viewStateAction(tag, action, data);
        if (action == 'load') {
            this.load(data);
        }
    }
    load(data) {
        console.log("报表部件加载数据");
    }
}
