import { Http,Util } from '@/utils';
import EntityService from '../entity-service';



/**
 * 功能位置状态服务对象基类
 *
 * @export
 * @class EAMLocationStateServiceBase
 * @extends {EntityServie}
 */
export default class EAMLocationStateServiceBase extends EntityService {

    /**
     * Creates an instance of  EAMLocationStateServiceBase.
     * 
     * @param {*} [opts={}]
     * @memberof  EAMLocationStateServiceBase
     */
    constructor(opts: any = {}) {
        super(opts);
    }

    /**
     * 初始化基础数据
     *
     * @memberof EAMLocationStateServiceBase
     */
    public initBasicData(){
        this.APPLYDEKEY ='eamlocationstate';
        this.APPDEKEY = 'eamlocationstateid';
        this.APPDENAME = 'eamlocationstates';
        this.APPDETEXT = 'eamlocationstatename';
        this.APPNAME = 'assetmanagement';
        this.SYSTEMNAME = 'ibizassetmanagement';
    }

// 实体接口

    /**
     * Select接口方法
     *
     * @param {*} [context={}]
     * @param {*} [data={}]
     * @param {boolean} [isloading]
     * @returns {Promise<any>}
     * @memberof EAMLocationStateServiceBase
     */
    public async Select(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
            return Http.getInstance().get(`/eamlocationstates/${context.eamlocationstate}/select`,isloading);
    }

    /**
     * FetchDefault接口方法
     *
     * @param {*} [context={}]
     * @param {*} [data={}]
     * @param {boolean} [isloading]
     * @returns {Promise<any>}
     * @memberof EAMLocationStateServiceBase
     */
    public async FetchDefault(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
        let tempData:any = JSON.parse(JSON.stringify(data));
        return Http.getInstance().get(`/eamlocationstates/select`,tempData,isloading);
    }
}