// Excel文件导出
export function downloadFile(data, name, endName = ".xls") {
  const url = window.URL.createObjectURL(new Blob([data]));
  const link = document.createElement("a");
  link.style.display = "none";
  link.href = url;
  const time = dateTimeFormatter(new Date(), "yyyy-MM-dd");
  link.setAttribute("download", name + endName);
  document.body.appendChild(link);
  link.click();
}