antdesign+egg 导出(2) antdesign生成Excel文件

1.配置tableColumns数据​datapacket.js​// 导出数据配置 // 设置数据显示格式 type/* string number 1.00 保留两位小数 date 2020-04-29 datetime 2020-04-29 14:31:02 key: "concat('https://jitong.kaopu.tech/assetDetal?id=',id)"*/const customerExprotExce.
摘要由CSDN通过智能技术生成
1.配置tableColumns数据
​datapacket.js
​
// 导出数据配置 
// 设置数据显示格式  type
/*
    string
    number   1.00 保留两位小数
    date     2020-04-29
    datetime 2020-04-29 14:31:02
    key: "concat('https://jitong.kaopu.tech/assetDetal?id=',id)"
*/
const customerExprotExcel = [
    { header: "客户编码", key: "code", type: "string" },
    { header: "客户简称", key: "customerName", type: "string" },
    { header: "发票名称", key: "formalName", type: "string" },
    { header: "行业分类", key: "industryCategory", type: "string" },
    { header: "社会统一信用代码", key: "customerCode", type: "string" },
    { header: "开户行", key: "customerBank", type: "string" },
    { header: "开户行账号", key: "BankAccount", type: "string" },
    { header: "注册地址", key: "regAddress", type: "string" },
    { header: "联系电话", key: "telephone", type: "string" },
    { header: "客户分类", key: "customerType", type: "string" },
    { header: "现有车辆情况", key: "remark", type: "string" },
    { header: "省", key: "province", type: "string" },
    { header: "市", key: "city", type: "string" },
    { header: "区县", key: "county", type: "string" },
    { header: "详细地址", key: "detailAddress", type: "string" },
    { header: "客户等级", key: "customerGrade", type: "string" },
    { header: "创建时间 ", key: "creatTime", type: "datetime" },
    { header: "填报人 ", key: "creator", type: "string" }

]

​

​
2.组件 src\components\exportExcel.vue
<template>
<!-- 导出 -->
  <span>
    <a-button @click="exportExcel">
      <a-icon :type="downLoading =
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值