研发图纸文件管理系统-前端项目
he wei
2023-06-25 b06ce1fd9da4791a9481d64198ec1fade1a73203
src/pages/resourceManage/sopFile/apis.js
@@ -0,0 +1,71 @@
import axios from "@/assets/axios";
/**
 * sop 文件解析
 * @param {*} data {multipartFile}
 * @returns
 */
export const fileParse = (data) => {
  return axios({
    method: "POST",
    url: "sop/excelParse",
    headers: {
      "Content-Type": "multipart/form-data"
    },
    data
  })
}
/**
 * sop 上传提交
 * @param {*} data
 * @returns
 */
export const addSop = (data) => {
  return axios({
    method: "POST",
    url: "sop/confirm",
    data
  })
}
/**
 * 列表查询
 * @param {*} params {code, model}
 * @param {*} data [{chileType: ['通用', '基础'], parentType: '组装'}]
 * @returns
 */
export const getList = (params, data) => {
  return axios({
    method: "POST",
    url: "sop/getSopInfo",
    params,
    data
  })
}
/**
 * 查询所有的type1
 * @returns
 */
export const getSopType1 = () => {
  return axios({
    method: "GET",
    url: "sopFileType/type1"
  })
}
/**
 * 查询type1下的所有的type2
 * 参数 type1
 * @returns
 */
export const getSopType2 = (type1) => {
  return axios({
    method: "GET",
    url: "sopFileType/type2",
    params: {
      type1
    }
  })
}