<div @click="dowmTable()"> 导出</div>
"xlsx": {
"version": "0.16.9",
"resolved": "https://registry.npmjs.org/xlsx/-/xlsx-0.16.9.tgz",
"integrity": "sha512-gxi1I3EasYvgCX1vN9pGyq920Ron4NO8PNfhuoA3Hpq6Y8f0ECXiy4OLrK4QZBnj1jx3QD+8Fq5YZ/3mPZ5iXw==",
"requires": {
"adler-32": "~1.2.0",
"cfb": "^1.1.4",
"codepage": "~1.14.0",
"commander": "~2.17.1",
"crc-32": "~1.2.0",
"exit-on-epipe": "~1.0.1",
"fflate": "^0.3.8",
"ssf": "~0.11.2",
"wmf": "~1.0.1",
"word": "~0.3.0"
},
import XLSX from "xlsx";
methods: {
dowmTable() {
const data = this.store_info.map(item => ({
总代理: item.agent,
经销商名称: item.secDealerName,
城市: item.city,
地址: item.address,
签约名称: item.contractName,
联系人: item.contactsName,
联系方式: item.contactsTel,
总代理: item.agent,
生效日期: item.effectiveDate,
开始时间: item.effectiveStart,
结束时间: item.effectiveEnd,
授权编号: item.empowerNo,
门店名称: item.storeName,
门店省份: item.storeProvince,
}));
const worksheet = XLSX.utils.json_to_sheet(data);
const workbook = XLSX.utils.book_new();
XLSX.utils.book_append_sheet(workbook, worksheet, 'Sheet1');
// 导出 Excel 文件
XLSX.writeFile(workbook, '门店.xlsx');
},
}
因篇幅问题不能全部显示,请点此查看更多更全内容
Copyright © 2019- bangwoyixia.com 版权所有 湘ICP备2023022004号-2
违法及侵权请联系:TEL:199 1889 7713 E-MAIL:2724546146@qq.com
本站由北京市万商天勤律师事务所王兴未律师提供法律服务