// 系统api
import request from "@/utils/request";
/**
 *  系统参数
 */
// 获取系统参数列表
export const getParamList = (data) => {
  return request({
    url: `/bill/param/list`,
    method: "post",
    data,
  });
};
// 查看系统参数
export const getParamInfo = (params) => {
  return request({
    url: `/bill/param/info`,
    method: "get",
    params,
  });
};
// 保存编辑系统参数
export const saveParam = (data) => {
  return request({
    url: `/bill/param/save`,
    method: "post",
    data,
  });
};
// 删除系统参数
export const delParam = (params) => {
  return request({
    url: `/bill/param/delete`,
    method: "get",
    params,
  });
};

/**
 *  任务信息
 */
// 获取任务信息列表
export const getTaskList = (data) => {
  return request({
    url: `/bill/task/list`,
    method: "post",
    data,
  });
};
// 查看任务信息
export const getTaskInfo = (params) => {
  return request({
    url: `/bill/task/info`,
    method: "get",
    params,
  });
};
// 保存编辑任务信息
export const saveTask = (data) => {
  return request({
    url: `/bill/task/save`,
    method: "post",
    data,
  });
};
// 删除任务信息
export const delTask = (params) => {
  return request({
    url: `/bill/task/delete`,
    method: "get",
    params,
  });
};

/**
 *  操作日志
 */

// 获取操作日志
export const getlogsList = (data) => {
  return request({
    url: `/bill/oper/log/list`,
    method: "post",
    data,
  });
};
// 查看操作日志
export const getlog = (params) => {
  return request({
    url: `/bill/oper/log/info`,
    method: "get",
    params,
  });
};

/**
 *  资源信息
 */

// 获取资源信息列表
export const getResourceList = (data) => {
  return request({
    url: `/bill/resource/list`,
    method: "post",
    data,
  });
};
// 获取资源信息详情
export const getResourceDetail = (params) => {
  return request({
    url: `/bill/resource/info`,
    method: "get",
    params,
  });
};
// 添加资源信息
export const saveResource = (data) => {
  return request({
    url: `/bill/resource/save`,
    method: "post",
    data,
  });
};
// 删除资源信息
export const deleteResource = (params) => {
  return request({
    url: `/bill/resource/delete`,
    method: "get",
    params,
  });
};
// 刷新资源
export const refreshResource = (data) => {
  return request({
    url: `/bill/resource/refreshUrl`,
    method: "post",
    data,
  });
};
/**
 *  区县接入系统
 */

// 获取接入区县列表
export const getAccessList = (data) => {
  return request({
    url: `/bill/access/list`,
    method: "post",
    data,
  });
};
// 查看接入区县
export const getAccessInfo = (params) => {
  return request({
    url: `/bill/access/info`,
    method: "get",
    params,
  });
};
// 保存编辑接入区县
export const saveAccess = (data) => {
  return request({
    url: `/bill/access/save`,
    method: "post",
    data,
  });
};
// 删除接入区县
export const delAccess = (params) => {
  return request({
    url: `/bill/access/delete`,
    method: "get",
    params,
  });
};
