import request from "@/utils/request";

// 查询方案优化列表页面列表
export function listFayh (query) {
  return request({
    url: "/jt/JtDjjc/list",
    method: "get",
    params: query,
  });
}

// 查询部门下拉树结构
export function deptTreeSelect (params) {
  return request({
    url: "/system/dept/deptTreeLev",
    method: "get",
    params: params, // 将参数作为查询字符串的一部分发送到后端
  });
}

//盆地下拉框
export function getBasinSelect () {
  return request({
    url: "/jtdz/jtdzPd/pdlist",
    method: "get",
  });
}
//区块下拉框
export function getBlockByPdid (pdid) {
  return request({
    url: "/jtdz/jtdzQkxx/qklist",
    method: "get",
    params: {
      pdid: pdid,
    },
  });
}
//井删除接口
export function deleteJtDjjc (jhdms) {
  return request({
    url: "/jt/JtDjjc/" + jhdms,
    method: "delete",
  });
}

//锁定
export function LockJtDjjc (jhdm) {
  return request({
    url: "/jt/JtDjjc/sd",
    method: "post",
    params: {
      jhdm: jhdm,
    },
  });
}


//新增保存接口
export function addJtDjjc (data) {
  return request({
    url: "/jt/JtDjjc",
    method: "post",
    data: data,
  });
}
//编辑页面的单条查询
export function getJtDjjc (jhdm) {
  return request({
    url: "/jt/JtDjjc/" + jhdm,
    method: "get",
  });
}
//编辑页面的保存
export function updateJtDjjc (data) {
  return request({
    url: "/jt/JtDjjc",
    method: "put",
    data: data,
  });
}
//目的层接口
export function getMdcByQkid (query) {
  return request({
    url: "/jtdz/jtdzDc/mdcList",
    method: "get",
    params: query,
  });
}
