import { Subject } from 'rxjs';
import { TabExpViewBase } from '@/studio-core';
import HRCertificateService from '@/service/hrcertificate/hrcertificate-service';
import HRCertificateAuthService from '@/authservice/hrcertificate/hrcertificate-auth-service';
import TabExpViewEngine from '@engine/view/tab-exp-view-engine';
import HRCertificateUIService from '@/uiservice/hrcertificate/hrcertificate-ui-service';

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

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

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

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

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


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

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

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


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


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

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


}