import axios from 'axios';
import { getToken } from '@/utils';
import requestUrl from '@/core/http/requestUrl.js';
export default class ModelEstimate {
  static list (sender, params, axiosOption, httpOption) {
    return sender.doUrl('/admin/app/modelEstimate/list', 'post', params, axiosOption, httpOption);
  }
    
  static view (sender, params, axiosOption, httpOption) {
    return sender.doUrl('/admin/app/modelEstimate/view', 'get', params, axiosOption, httpOption);
  }
    
  static export (sender, params, fileName) {
    return sender.download('/admin/app/modelEstimate/export', params, fileName);
  }
    
  static add (sender, params, axiosOption, httpOption) {
    return sender.doUrl('/admin/app/modelEstimate/add', 'post', params, axiosOption, httpOption);
  }
    
  static update (sender, params, axiosOption, httpOption) {
    return sender.doUrl('/admin/app/modelEstimate/update', 'post', params, axiosOption, httpOption);
  }
    
  static delete (sender, params, axiosOption, httpOption) {
    return sender.doUrl('/admin/app/modelEstimate/delete', 'post', params, axiosOption, httpOption);
  }

  static getLog (sender, params, options) {
    let token = getToken();
    var config = {
      method: 'get',
      url: requestUrl('/admin/app/modelEstimate/getLog'),
      params: params,
      headers: {
        'Authorization': token
      }
    };
    return axios(config)
  }
  static getPreviewCommand (sender, params, axiosOption, httpOption) {
    return sender.doUrl('/admin/app/modelEstimate/getPreviewCommand', 'get', params, axiosOption, httpOption);
  }
  static getStatus (sender, params, axiosOption, httpOption) {
    return sender.doUrl('/admin/app/modelEstimate/getStatus', 'get', params, axiosOption, httpOption);
  }
  static getStatusDetail (sender, params, axiosOption, httpOption) {
    return sender.doUrl('/admin/app/modelEstimate/getStatusDetail', 'post', params, axiosOption, httpOption);
  }
  static updateById (sender, params, axiosOption, httpOption) {
    return sender.doUrl('/admin/app/modelEstimate/updateById', 'post', params, axiosOption, httpOption);
  }
}
