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



/**
 * 流程定义节点服务对象基类
 *
 * @export
 * @class WFProcessNodeServiceBase
 * @extends {EntityServie}
 */
export default class WFProcessNodeServiceBase extends EntityService {

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

    /**
     * 初始化基础数据
     *
     * @memberof WFProcessNodeServiceBase
     */
    public initBasicData(){
        this.APPLYDEKEY ='wfprocessnode';
        this.APPDEKEY = 'usertaskid';
        this.APPDENAME = 'wfprocessnodes';
        this.APPDETEXT = 'usertaskname';
        this.APPNAME = 'web';
        this.SYSTEMNAME = 'ibzwf';
    }

// 实体接口

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

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

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