import { Http,Util,Errorlog } from '@/utils';
import ControlService from '@/widgets/control-service';
import PIMModel from './pim-appmenu-model';


/**
 * PIM 部件服务对象
 *
 * @export
 * @class PIMService
 */
export default class PIMService extends ControlService {

    /**
     * 设置从数据模式
     *
     * @type {boolean}
     * @memberof PIMService
     */
    public setTempMode(){
        this.isTempMode = false;
    }

    /**
     * Creates an instance of PIMService.
     * 
     * @param {*} [opts={}]
     * @memberof PIMService
     */
    constructor(opts: any = {}) {
        super(opts);
        this.model = new PIMModel();
    }

    /**
     * 获取数据
     *
     * @returns {Promise<any>}
     * @memberof PIM
     */
    @Errorlog
    public get(params: any = {}): Promise<any> {
        return Http.getInstance().get('v7/pimappmenu', params);
    }

}