Commit 68139835 authored by “yiyousong”'s avatar “yiyousong”

chore: 暂时注销excel导出库

parent 0a2e3555
...@@ -16,8 +16,8 @@ Vue.use(Antd); ...@@ -16,8 +16,8 @@ Vue.use(Antd);
import GlobalComponents from "./utils/js/globalComponents"; import GlobalComponents from "./utils/js/globalComponents";
Vue.use(GlobalComponents); Vue.use(GlobalComponents);
import common from "./utils/commin"; // import common from "./utils/commin";
Vue.use(common); // Vue.use(common);
// 公共样式 // 公共样式
import "@/assets/css/normalize.css"; import "@/assets/css/normalize.css";
......
// import moment from 'moment';
import moment from 'moment'; // import 'moment/locale/zh-cn'; // 获取中国标准时间,避免出现utc时间
import 'moment/locale/zh-cn'; // 获取中国标准时间,避免出现utc时间 // moment.locale('zh-cn')
moment.locale('zh-cn')
// import * as echarts from 'echarts'
import * as echarts from 'echarts' // import ExportJsonExcel from "js-export-excel";
// import Storage from './js/Storage.js';
import ExportJsonExcel from "js-export-excel";
// import '@/utils/css/animate.min.css'
import Storage from './js/Storage.js'; // import 'font-awesome/css/font-awesome.css'
// import './css/index.less' //css 公共库
import '@/utils/css/animate.min.css'
import 'font-awesome/css/font-awesome.css' // function setLoading(props) {
import './css/index.less' //css 公共库 // if (typeof props === 'boolean') props = {
// spinning: props
// }
function setLoading(props) { // if (Object.prototype.toString.call(props) !== '[object Object]') props = {}
if (typeof props === 'boolean') props = { // this.$app.loadingProps = {
spinning: props // tip: '加载中...',
} // ...props
if (Object.prototype.toString.call(props) !== '[object Object]') props = {} // }
this.$app.loadingProps = { // }
tip: '加载中...',
...props // const common = {
} // install: function (Vue) {
} // Vue.prototype.$echarts = echarts;
// Vue.prototype.$moment = moment;
const common = { // Vue.prototype.$Storage = Storage;
install: function (Vue) { // Vue.prototype.$setLoading = setLoading;
Vue.prototype.$echarts = echarts; // Vue.prototype.$ExportJsonExcel = ExportJsonExcel;
Vue.prototype.$moment = moment;
Vue.prototype.$Storage = Storage; // }
Vue.prototype.$setLoading = setLoading; // }
Vue.prototype.$ExportJsonExcel = ExportJsonExcel;
// export default common
}
}
export default common
\ No newline at end of file
// 导出表格数据 // 导出表格数据
const ExportJsonExcel = require("js-export-excel"); // const ExportJsonExcel = require("js-export-excel");
import { message } from "ant-design-vue";
import Vue from "vue";
/** /**
* 导出excel * 导出excel
* @param {导出的表头名信息} tHeader * @param {导出的表头名信息} tHeader
...@@ -8,18 +10,25 @@ const ExportJsonExcel = require("js-export-excel"); ...@@ -8,18 +10,25 @@ const ExportJsonExcel = require("js-export-excel");
* @param {导出文件名称} fileName * @param {导出文件名称} fileName
*/ */
export const export2Excel = (tHeader, filterVal, list, fileName) => { export const export2Excel = (tHeader, filterVal, list, fileName) => {
let option = { message.warning({
fileName, content: "功能维护中",
datas: [ maxCount: 1,
{ duration: 2,
sheetData: list, });
sheetName: "sheet", Vue.prototype.$app.progressFile.show = false;
sheetFilter: filterVal, Vue.prototype.$app.progressFile.percent = 1;
sheetHeader: tHeader, // let option = {
// columnWidths: columnWidths, // 列宽 // fileName,
}, // datas: [
], // {
}; // sheetData: list,
let toExcel = new ExportJsonExcel(option); // sheetName: "sheet",
toExcel.saveExcel(); //保存 // sheetFilter: filterVal,
// sheetHeader: tHeader,
// // columnWidths: columnWidths, // 列宽
// },
// ],
// };
// let toExcel = new ExportJsonExcel(option);
// toExcel.saveExcel(); //保存
}; };
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment