<Card class="clearfix"><p slot="title"><Icon type="ios-list"></Icon>收入信息</p><!-- 导出1 --><div class="daochu1"><!-- 导出按钮 --><div class="search"><Buttontype="warning"icon="ios-download-outline"@click="exportExcel1"class="searchButton">导出</Button></div><!-- 详细列表 --><Tableref="table"border:row-class-name="rowClassName":columns="queryColumns1":data="queryinfoList1"style="width: 100%; top: 10px"@on-sort-change="sortTime"></Table></div><!-- 分页 --><div style="margin-top: 20px; overflow: hidden"><div style="float: right"><Page:total="count"show-elevator@on-change="onchangePage"></Page></div></div></Card>
// 导出列表头 1queryColumns11: [{title: "项目名称",key: "projectName",align: "center",width: 200,},{title: "收入类型",key: "revenueType",align: "center",width: 150,},{title: "年度",key: "year",align: "center",width: 150,},{title: "1月",key: "monthAmount1",align: "center",width: 150,},{title: "2月",key: "monthAmount2",align: "center",width: 150,},{title: "3月",key: "monthAmount3",align: "center",width: 150,},{title: "4月",key: "monthAmount4",align: "center",width: 150,},{title: "5月",key: "monthAmount5",align: "center",width: 150,},{title: "6月",key: "monthAmount6",align: "center",width: 150,},{title: "7月",key: "monthAmount7",align: "center",width: 150,},{title: "8月",key: "monthAmount8",align: "center",width: 150,},{title: "9月",key: "monthAmount9",align: "center",width: 150,},{title: "10月",key: "monthAmount10",align: "center",width: 150,},{title: "11月",key: "monthAmount11",align: "center",width: 150,},{title: "12月",key: "monthAmount12",align: "center",width: 150,},{title: "年度累计",key: "monthAmount13",align: "center",width: 200,},{title: "更新时间",key: "updateTime",align: "center",width: 200,},],
 //导出收入信息exportExcel1() {this.$Spin.show({render: (h) => {return h("div", [h("Icon", {class: "demo-spin-icon-load",props: {type: "load-c",size: 50,},}),h("div", "努力记载中...."),]);},});this.excell = [];new Promise((resolve, reject) => {ApiDrug.exportincomeExport({}).then((response) => {let res = response.result;res.forEach((item, index) => {item.monthAmount1 = item.monthAmount["1"];item.monthAmount2 = item.monthAmount["2"];item.monthAmount3 = item.monthAmount["3"];item.monthAmount4 = item.monthAmount["4"];item.monthAmount5 = item.monthAmount["5"];item.monthAmount6 = item.monthAmount["6"];item.monthAmount7 = item.monthAmount["7"];item.monthAmount8 = item.monthAmount["8"];item.monthAmount9 = item.monthAmount["9"];item.monthAmount10 = item.monthAmount["10"];item.monthAmount11 = item.monthAmount["11"];item.monthAmount12 = item.monthAmount["12"];item.monthAmount13 = 0;if (item.revenueType == "2") {item.revenueType = "药品服务费收入";}if (item.revenueType == "3") {item.revenueType = "特药服务费收入";}if (item.revenueType == "4") {item.revenueType = "直保经纪费";}if (item.revenueType == "5") {item.revenueType = "再保经纪费";}if (item.revenueType == "6") {item.revenueType = "广告费";}for (const key in item.monthAmount) {item.monthAmount13 += item.monthAmount[key];}});this.excel = response.result;this.excell = this.excel;//   导出方法   利用Vue 的 ref 获取所需的dom节点进行方法设置this.$refs.table.exportCsv({//导出文件标题filename: "收入信息",//导出文件集合(内容)columns: this.queryColumns11.filter((col, index) => index < 100000),data: this.excel.filter((data, index) => index < 100000),});this.$Spin.hide();resolve();}).catch((error) => {this.$Spin.hide();reject(error);});});},

Table 表格导出功能相关推荐

  1. java导出表功能_表格导出功能实践

    表格导出分为静态导出与动态导出. 静态导出是将当前已经渲染的表格项导出为指定的格式,可为.xls或.cvs.这种导出无需后端支撑,完全由前端实现. 动态导出是通过将参数传与后端接口,该接口负责生成Bl ...

  2. Jxls表格导出功能帮助文档

    Jxls表格导出功能帮助文档 业务介绍 功能实现 业务介绍 做一个时刻表的导出功能,数据模型都已经写好了.原型图大概是这样的一个意思.先看图: 大概设计是这个样子. 然后最后导出的成品是这个样子: 大 ...

  3. js table表格导出Excel 设置文件名称

    一.table表格导出 <!DOCTYPE html> <html> <head lang="en"> <meta charset=&qu ...

  4. 把table表格导出为excel文件

    <script type="text/javascript">/* 把html table表格导出为excle文件使用方法:<a href="javaS ...

  5. linux脚本的数据输出到excel,使用shell实现Excel表格导出功能 | 剑花烟雨江南

    在Web项目中,我们经常会遇到Excel表格导出的功能,对于一些数据实时性要求不高的.逻辑相对简单的导出,是否可用通过shell脚本的方式来进行导出,从而降低开发成本呢? 我们都知道,CSV格式可以用 ...

  6. vue中table表格导出为图片格式

    vue中table表格点击下载为图片格式 实现思路:给页面中需要导出为图片的内容添加id名,调用封好的方法即可直接导出.以下是具体的实现方法 1.安装依赖 npm install --save htm ...

  7. 将页面的table表格导出为excel或者word

    <script>/*第一个参数为:表格的id名 第二个参数为:a标签的id名*/function exportTable(tableId, aid,fileName) {// 使用oute ...

  8. elementui中有导出组件吗_Element-ui组件库Table表格导出Excel表格

    安装 npm install --save xlsx file-saver 两个插件的详细地址在下面 https://github.com/SheetJS/js-xlsx https://github ...

  9. 利用poi实现table表格导出excel

    思路:把table转成json数据传到后台(需要用到jquery.tabletojson.min.js),json转成list<list<String>>类型.利用poi导出e ...

最新文章

  1. php实现 统计输入中各种字符的个数
  2. Linux 内核存缺陷:66% 安卓设备面临受攻击风险
  3. linuv创建文件的命令_ECS实践案例丨逻辑卷的创建和扩容操作指导
  4. html分为哪两种,css伪类分为哪几种
  5. 互联网晚报 | 9月16日 星期四 | 网易云音乐发布“村民证”;阿里社区电商品牌升级为“淘菜菜”;高德打车上线“实景上车点”...
  6. Java工作笔记-JPA查询达梦7数据库(Spring Boot + ORM)
  7. linux查看网卡吞吐量和网卡流量用自带命令,iptraf查看。
  8. 阿里架构师的日志:带你快速理解微服务架构;理解微服务架构的核心
  9. 分布式事务解决方案之最大努力通知
  10. 使用计算机粘贴板的步骤,教你查看win7电脑的剪切板使用技巧和位置查看的方法...
  11. 计算机科学与技术U盘,速度竟差9倍!6款32GB USB3.0优盘横评
  12. mysql中secure_file_priv=不生效的问题
  13. 三 机器人仿真软件Gazebo介绍
  14. QUIC传输协议设计
  15. linux装回win10系统无法开机,ghost win10系统安装后无法启动怎么办
  16. 《Flask Web开发:基于Python的Web应用开发实战》笔记(原创)
  17. 2021-09-15小记西数3T蓝盘翻车
  18. 报错FileSystemException: /datas/nodes/0/indices/gtTXk-hnTgKhAcm-8n60Jw/1/index/.es_temp_file:结构需要清理
  19. 【人脸识别考勤门禁】管理系统功能解析
  20. EXCEPT、INTERSECT和UNION

热门文章

  1. 深度学习与计算机视觉(二)线性SVM与Softmax分类器
  2. TensorFlow(七)tf.nn库
  3. 轨迹预测演变(第1/2部分)
  4. R统计工具:正态性检验
  5. 迅雷第四季度净亏损3240万美元 环比亏损幅度扩大
  6. 顺丰负债300亿就压力山大,而万达曾经负债4000亿却稳如泰山
  7. 信用卡逾期三个月以上不还?小心坐牢!
  8. 2018年对PHP的新认知
  9. 因为征信原因,买房的2万定金没了
  10. Deep Belief Networks