import { Subject } from 'rxjs';
import { TabExpViewBase } from '@/studio-core';
import HREmployeeService from '@/service/hremployee/hremployee-service';
import HREmployeeAuthService from '@/authservice/hremployee/hremployee-auth-service';
import TabExpViewEngine from '@engine/view/tab-exp-view-engine';
import HREmployeeUIService from '@/uiservice/hremployee/hremployee-ui-service';

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

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

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

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

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


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

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

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


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


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

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


}