import { Subject } from 'rxjs';
import { TabExpViewBase } from '@/studio-core';
import HRContractService from '@/service/hrcontract/hrcontract-service';
import HRContractAuthService from '@/authservice/hrcontract/hrcontract-auth-service';
import TabExpViewEngine from '@engine/view/tab-exp-view-engine';
import HRContractUIService from '@/uiservice/hrcontract/hrcontract-ui-service';

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

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

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

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

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


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

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

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


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


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

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


}