/**
 * Created by lk on 17/6/4.
 */
import axios from "../../utils/axios";

// 获取列表
export function systemParamConfigList(query) {
    return axios({
        url: "/system/param/config/list",
        method: "get",
        params: query
    });
}

// 保存
export function systemParamConfigSave(data, formName, method = "post") {
    let url =
        formName === "add" ? "/system/param/config/save" : "/system/param/config/update";
    return axios({
        url: url,
        method: method,
        data: data
    });
}

//获取配置
export function selectSysParamByKey(query) {
    return axios({
        url: "/udiwms/sys/config/selectByKey",
        method: "get",
        params: query
    });
}

export function selectIp(query) {
    return axios({
        url: "/udiwms/basic/thirdsys/selectIp",
        method: "get",
        params: query
    });
}

//查询可添加自定义参数
export function getCustomizeParams(query) {
    return axios({
        url: "/udiwms/sys/config/getCustomizeParams",
        method: "get",
        params: query
    });
}

//添加自定义参数
export function addCustomizeParam(data) {
    return axios({
        url: "/udiwms/sys/config/addCustomizeParam",
        method: "post",
        data: data
    });
}

//删除参数
export function deleteParam(query) {
    return axios({
        url: "/udiwms/sys/config/deleteParam",
        method: "get",
        params: query
    });
}
