import { defHttp } from '/@/utils/http/axios';

enum Api {
    list = '/mxjs/cslist', // 参数列表
    wrdk = '/mxjs/wrdk', // 参数列表
    mxJs = '/mxjs/js', //模型计算
    mxJsTj = '/mxjs/tj', //模型计算-提交
    wrList = '/mxjs/wrwlist', //污染物列表
    getJsWrwlist = '/mxjs/getJsWrwList', //计算结果-污染物列表
    JsCsjg = '/mxjs/csjgList',//计算结果-参数信息
    Jsjg = '/mxjs/list',//计算结果-计算信息
    searDkbm = '/qdml/likeWrdkbm2',
}

export const list = (params) => defHttp.get({ url: Api.list, params }); 

export const searDkbm = (params) => defHttp.get({ url: Api.searDkbm, params });

export const mxJs = (params) => defHttp.post({ url: Api.mxJs, params });

export const mxJsTj = (params) => defHttp.post({ url: Api.mxJsTj, params });

export const wrList = (params) => defHttp.get({ url: Api.wrList, params });

export const getJsWrwlist = (params) => defHttp.get({ url: Api.getJsWrwlist, params });

export const JsCsjg = (params) => {
    if (!params.wrdkid) {
        return []
    }
    return defHttp.get({ url: params.mode=='1'?Api.JsCsjg:Api.Jsjg, params })
} 

export const Jsjg = (params) => {
    if (!params.wrdkid) {
        return []
    }
    return defHttp.get({ url: Api.Jsjg, params });
}
