import { Prop, Provide, Emit, Model } from 'vue-property-decorator';
import { Subject, Subscription } from 'rxjs';
import { Watch, PanelControlBase } from '@/studio-core';
import EAMLocationStateService from '@/service/eamlocation-state/eamlocation-state-service';
import ListExpPanelService from './list-exp-panel-panel-service';
import EAMLocationStateUIService from '@/uiservice/eamlocation-state/eamlocation-state-ui-service';
import { FormItemModel } from '@/model/form-detail';
import ListExpPanelModel from './list-exp-panel-panel-model';
import CodeListService from "@service/app/codelist-service";


/**
 * listexpbar_list_itempanel部件基类
 *
 * @export
 * @class PanelControlBase
 * @extends {ListExpPanelPanelBase}
 */
export class ListExpPanelPanelBase extends PanelControlBase {

    /**
     * 获取部件类型
     *
     * @protected
     * @type {string}
     * @memberof ListExpPanelPanelBase
     */
    protected controlType: string = 'PANEL';

    /**
     * 建构部件服务对象
     *
     * @type {ListExpPanelService}
     * @memberof ListExpPanelPanelBase
     */
    public service: ListExpPanelService = new ListExpPanelService({ $store: this.$store });

    /**
     * 实体服务对象
     *
     * @type {EAMLocationStateService}
     * @memberof ListExpPanelPanelBase
     */
    public appEntityService: EAMLocationStateService = new EAMLocationStateService({ $store: this.$store });

    /**
     * 应用实体名称
     *
     * @protected
     * @type {string}
     * @memberof ListExpPanelPanelBase
     */
    protected appDeName: string = 'eamlocationstate';

    /**
     * 详情模型集合
     *
     * @type {*}
     * @memberof ListExpPanel
     */
    public detailsModel: any = {
        eamlocationstateid: new FormItemModel({ visible: true, disabled: false, enableCond: 3 }), 
        eamlocationstatename: new FormItemModel({ visible: true, disabled: false, enableCond: 3 }), 
    };

    /**
     * 面板逻辑
     *
     * @public
     * @param {{ name: string, newVal: any, oldVal: any }} { name, newVal, oldVal }
     * @memberof ListExpPanel
     */
    public panelLogic({ name, newVal, oldVal }: { name: string, newVal: any, oldVal: any }): void {
                


    }

    /**
     * 数据模型对象
     *
     * @type {ListExpPanelModel}
     * @memberof ListExpPanel
     */
    public dataModel: ListExpPanelModel = new ListExpPanelModel();

    /**
     * 界面行为
     *
     * @param {*} row
     * @param {*} tag
     * @param {*} $event
     * @memberof ListExpPanel
     */
    public async uiAction(row: any, tag: any, $event: any) {
        await this.computePanelData();
    }
}