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



/**
 * 应用视图数据信息服务对象基类
 *
 * @export
 * @class IBIZAPPVIEWServiceBase
 * @extends {EntityServie}
 */
export default class IBIZAPPVIEWServiceBase extends EntityService {

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

    /**
     * 初始化基础数据
     *
     * @memberof IBIZAPPVIEWServiceBase
     */
    public initBasicData(){
        this.APPLYDEKEY ='ibizappview';
        this.APPDEKEY = 'ibizappviewid';
        this.APPDENAME = 'ibizappviews';
        this.APPDETEXT = 'ibizappviewname';
        this.APPNAME = 'web';
        this.SYSTEMNAME = 'demosys';
    }

// 实体接口

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

    /**
     * FetchDefault接口方法
     *
     * @param {*} [context={}]
     * @param {*} [data={}]
     * @param {boolean} [isloading]
     * @returns {Promise<any>}
     * @memberof IBIZAPPVIEWServiceBase
     */
    public async FetchDefault(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
    }

    /**
     * searchDefault接口方法
     *
     * @param {*} [context={}]
     * @param {*} [data={}]
     * @param {boolean} [isloading]
     * @returns {Promise<any>}
     * @memberof IBIZAPPVIEWServiceBase
     */
    public async searchDefault(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
        let tempData:any = JSON.parse(JSON.stringify(data));
        return await Http.getInstance().post(`/ibizappviews/searchdefault`,tempData,isloading);
    }
}