import request from "@/utils/request";
//获取用户所属区域数据
export function getUserArea(params = {}) {
  return request({
    url: "/mosty-api/mosty-base/other/getGajg",
    method: "post",
    params
  });
}
//获取分值列表数据
export function getSelectPzfz(params = {}) {
  return request({
    url: "/mosty-api/mosty-jcgl/fzpz/selectPzfzByPzrxm",
    method: "get",
    params
  });
}

//新增分值数据
export function addPzfz(data = {}) {
  return request({
    url: "/mosty-api/mosty-jcgl/fzpz/addPzfz",
    method: "post",
    data
  });
}

//修改分值数据
export function updatePzfz(data = {}) {
  return request({
    url: "/mosty-api/mosty-jcgl/fzpz/editEntity",
    method: "put",
    data
  });
}

//删除分值数据
export function deletePzfz(id) {
  return request({
    url: `/mosty-api/mosty-jcgl/fzpz/deleteEntity/${id}`,
    method: "delete"
  });
}

// 文件上传
export function getFileList(params) {
  return request({
    url: "/mosty-api/mosty-base//minio/file/getFileList",
    method: "get",
    params
  });
}
//文件下载 获取文件信息
export function FileListonload(id) {
  return request({
    url: `/mosty-api/mosty-base/minio/file/download/${id}`,
    method: "get",
  });
}

//获取文件地址
//01：内网
//02：外网
export function getFileUrlById(id) {
  return request({
    url: `/mosty-api/mosty-base/minio/image/downloadUrl/${id}`,
    method: "get"
  });
};
