import axios from "@/utils/req";

export const base = "/usersvr/v2/external";

export const table = `${base}s`;

// 公司名称
export function manufacturer() {
    // return axios.get(`/app/manufacturer/allManufacturer`)
    return axios.get("appsvr/v2/manufacturer/radio");
    // return axios.get("/usersvr/personal");
}

// 项目列表
export function project(mfrId) {
    return axios.get(`/appsvr/v2/app/manufacturer/${mfrId}`);
}

// 公司负责人
export function companyAdmin(id) {
    return axios.get(`/appsvr/v2/manufacturer/${id}`);
}
// 新增数据
export function saveForm(data) {
    return axios.post(base, data);
}

// 更新数据
export function updateForm(data) {
    return axios.put(`${base}/${data.id}`, data);
}

// 获取编号
export function getNumber() {
    return axios.get(`${base}/number`);
}

// 获取详情
export function detail(id) {
    return axios.get(`${base}/${id}`);
}

// 删除数据
export function del(id) {
    return axios.delete(`${base}/${id}`);
}

// 导出数据
export function exports(params = {}, option) {
    return axios.arraybuffer(`${base}/exports`, params, option);
}
