/*
 * @Descripttion:
 * @version:
 * @Author: JC9527
 * @Date: 2023-09-11 15:38:21
 * @LastEditors: JC9527
 * @LastEditTime: 2023-09-30 00:52:32
 */
import request from "@/utils/request";

export default {
  // 行政区划
  tree(params) {
    return request({
      url: "/pharmaceuticals/division/tree",
      method: "get",
      params,
    });
  },
  // 导入excel
  importExcel(data) {
    return request({
      url: "/pharmaceuticals/bKeyEnterprise/common/importExcel",
      method: "post",
      data,
    });
  },
  // 企业基本信息
  basicList(params) {
    return request({
      url: "/pharmaceuticals/info/list",
      method: "get",
      params,
    });
  },
  // 查看，新增，修改，删除计划管理表   get\delete 传参是params  put\post  传参是data
  bPlanManage(method, data = null, params = null, id) {
    return request({
      url: `/pharmaceuticals/bPlanManage${id ? `/${id}` : ""}`,
      method,
      data,
      params,
    });
  },
  bPlanManageTwo(id) {
    return request({
      url: `/pharmaceuticals/bPlanEnterprise/${id}`,
      method: "get",
    });
  },
  dictdata(params) {
    return request({
      url: `/pharmaceuticals/dictdata`,
      method: "get",
      params,
    });
  },
  bPlanEnterprise(method, data = null, params = null, id) {
    return request({
      url: `/pharmaceuticals/bPlanEnterprise${id ? `/${id}` : ""}`,
      method,
      data,
      params,
    });
  },
  // 查看计划明细
  planmx(params) {
    return request({
      url: `/pharmaceuticals/bPlanEnterprise/planmx`,
      method: "post",
      params,
    });
  },
  // 查询计划企业列表
  bPlanEnterpriseList() {
    return request({
      url: `/pharmaceuticals/bPlanEnterprise/list`,
      method: "get",
    });
  },
  // 根据行政区划查询重点企业数量
  getBydistrict(params) {
    return request({
      url: `/pharmaceuticals/bKeyEnterprise/getBydistrict`,
      method: "get",
      params,
    });
  },
};
