import request from '@/router/axios';

// 导出Excel文件
export const exportClientInfoExcel = (flag) => {
  return request({
    method: 'post',
    url: '/api/cyzh-community/common/excel/exportExcelTemplet',
    params: {
      flag: flag
    },
    responseType: 'blob',
    headers: {
    }
  });
}
// 导入Excel文件
export const importExcel = (file, flag) => {
  let content = file.raw;
  let data = new FormData();
  data.append("file", content)
  data.append("flag", flag)

  return request({
    method: 'post',
    url: '/api/cyzh-community/common/excel/importExcel',
    data: data,

    headers: {
      'Content-Type': 'multipart/form-data'
    }
  });
}
