import { Subject } from 'rxjs';
import { TabExpViewBase } from '@/studio-core';
import HRTechnicalTitleService from '@/service/hrtechnical-title/hrtechnical-title-service';
import HRTechnicalTitleAuthService from '@/authservice/hrtechnical-title/hrtechnical-title-auth-service';
import TabExpViewEngine from '@engine/view/tab-exp-view-engine';
import HRTechnicalTitleUIService from '@/uiservice/hrtechnical-title/hrtechnical-title-ui-service';

/**
 * 职称视图基类
 *
 * @export
 * @class HRTechnicalTitleTabExpViewBase
 * @extends {TabExpViewBase}
 */
export class HRTechnicalTitleTabExpViewBase extends TabExpViewBase {
    /**
     * 视图对应应用实体名称
     *
     * @protected
     * @type {string}
     * @memberof HRTechnicalTitleTabExpViewBase
     */
    protected appDeName: string = 'hrtechnicaltitle';

    /**
     * 应用实体主键
     *
     * @protected
     * @type {string}
     * @memberof HRTechnicalTitleTabExpViewBase
     */
    protected appDeKey: string = 'hrtechnicaltitleid';

    /**
     * 应用实体主信息
     *
     * @protected
     * @type {string}
     * @memberof HRTechnicalTitleTabExpViewBase
     */
    protected appDeMajor: string = 'hrtechnicaltitlename';

    /**
     * 实体服务对象
     *
     * @type {HRTechnicalTitleService}
     * @memberof HRTechnicalTitleTabExpViewBase
     */
    protected appEntityService: HRTechnicalTitleService = new HRTechnicalTitleService;

    /**
     * 实体权限服务对象
     *
     * @type HRTechnicalTitleUIService
     * @memberof HRTechnicalTitleTabExpViewBase
     */
    public appUIService: HRTechnicalTitleUIService = new HRTechnicalTitleUIService(this.$store);


    /**
     * 计数器服务对象集合
     *
     * @protected
     * @type {Array<*>}
     * @memberof HRTechnicalTitleTabExpViewBase
     */    
    protected counterServiceArray: Array<any> = [];

    /**
     * 视图模型数据
     *
     * @protected
     * @type {*}
     * @memberof HRTechnicalTitleTabExpViewBase
     */
    protected model: any = {
        srfCaption: 'entities.hrtechnicaltitle.views.tabexpview.caption',
        srfTitle: 'entities.hrtechnicaltitle.views.tabexpview.title',
        srfSubTitle: 'entities.hrtechnicaltitle.views.tabexpview.subtitle',
        dataInfo: ''
    }

    /**
     * 容器模型
     *
     * @protected
     * @type {*}
     * @memberof HRTechnicalTitleTabExpViewBase
     */
    protected containerModel: any = {
        view_tabexppanel: { name: 'tabexppanel', type: 'TABEXPPANEL' },
    };


	/**
     * 视图唯一标识
     *
     * @protected
     * @type {string}
     * @memberof ViewBase
     */
	protected viewtag: string = '8edb721608ec0094af042929943e498e';


    /**
     * 视图引擎
     *
     * @public
     * @type {Engine}
     * @memberof HRTechnicalTitleTabExpViewBase
     */
    public engine: TabExpViewEngine = new TabExpViewEngine();

    /**
     * 引擎初始化
     *
     * @public
     * @memberof HRTechnicalTitleTabExpViewBase
     */
    public engineInit(): void {
        this.engine.init({
            view: this,
            keyPSDEField: 'hrtechnicaltitle',
            majorPSDEField: 'hrtechnicaltitlename',
            isLoadDefault: true,
        });
    }


}