import { request } from '@/utils/request.js';
// import { getFileMD5 } from '@/utils/crypto.js';
//上传附件接口
export const uploadFiles = (formData, md5) => {
  return request({
    url: '/api/admin/common/file/upload',
    method: 'post',
    data: formData,
    headers: {
      md5,
      'Content-Type': 'multipart/form-data',
    },
  });
};

export const downloadImportTemplate = (type) => {
  return request({
    url: '/api/admin/common/download_import_template',
    params: { type },
    download: true,
  });
};

export const enumListByType = (enumList) => {
  // https://doc.qmth.com.cn/pages/viewpage.action?pageId=47550217#id-质控平台SOP系统_系统接口文档-查询枚举接口
  return request({
    url: '/api/admin/common/query_enum',
    params: { enumList },
  });
};

export const intelligenceLink = () => {
  return request({
    url: '/api/sso/rtzf/login',
    loading: true,
  });
};
