import { Subject } from 'rxjs';
import { TabExpViewBase } from '@/studio-core';
import EAMAssetService from '@/service/eamasset/eamasset-service';
import EAMAssetAuthService from '@/authservice/eamasset/eamasset-auth-service';
import TabExpViewEngine from '@engine/view/tab-exp-view-engine';
import EAMAssetUIService from '@/uiservice/eamasset/eamasset-ui-service';

/**
 * 资产信息视图基类
 *
 * @export
 * @class EAMAssetInfoViewBase
 * @extends {TabExpViewBase}
 */
export class EAMAssetInfoViewBase extends TabExpViewBase {
    /**
     * 视图对应应用实体名称
     *
     * @protected
     * @type {string}
     * @memberof EAMAssetInfoViewBase
     */
    protected appDeName: string = 'eamasset';

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

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

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

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


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

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

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


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


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

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


}