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

chore: 暂时注销excel导出库

parent 0a2e3555
......@@ -16,8 +16,8 @@ Vue.use(Antd);
import GlobalComponents from "./utils/js/globalComponents";
Vue.use(GlobalComponents);
import common from "./utils/commin";
Vue.use(common);
// import common from "./utils/commin";
// Vue.use(common);
// 公共样式
import "@/assets/css/normalize.css";
......
import moment from 'moment';
import 'moment/locale/zh-cn'; // 获取中国标准时间,避免出现utc时间
moment.locale('zh-cn')
import * as echarts from 'echarts'
import ExportJsonExcel from "js-export-excel";
import Storage from './js/Storage.js';
import '@/utils/css/animate.min.css'
import 'font-awesome/css/font-awesome.css'
import './css/index.less' //css 公共库
function setLoading(props) {
if (typeof props === 'boolean') props = {
spinning: 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;
Vue.prototype.$Storage = Storage;
Vue.prototype.$setLoading = setLoading;
Vue.prototype.$ExportJsonExcel = ExportJsonExcel;
}
}
export default common
\ No newline at end of file
// import moment from 'moment';
// import 'moment/locale/zh-cn'; // 获取中国标准时间,避免出现utc时间
// moment.locale('zh-cn')
// import * as echarts from 'echarts'
// import ExportJsonExcel from "js-export-excel";
// import Storage from './js/Storage.js';
// import '@/utils/css/animate.min.css'
// import 'font-awesome/css/font-awesome.css'
// import './css/index.less' //css 公共库
// function setLoading(props) {
// if (typeof props === 'boolean') props = {
// spinning: 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;
// Vue.prototype.$Storage = Storage;
// Vue.prototype.$setLoading = setLoading;
// Vue.prototype.$ExportJsonExcel = ExportJsonExcel;
// }
// }
// export default common
// 导出表格数据
const ExportJsonExcel = require("js-export-excel");
// const ExportJsonExcel = require("js-export-excel");
import { message } from "ant-design-vue";
import Vue from "vue";
/**
* 导出excel
* @param {导出的表头名信息} tHeader
......@@ -8,18 +10,25 @@ const ExportJsonExcel = require("js-export-excel");
* @param {导出文件名称} fileName
*/
export const export2Excel = (tHeader, filterVal, list, fileName) => {
let option = {
fileName,
datas: [
{
sheetData: list,
sheetName: "sheet",
sheetFilter: filterVal,
sheetHeader: tHeader,
// columnWidths: columnWidths, // 列宽
},
],
};
let toExcel = new ExportJsonExcel(option);
toExcel.saveExcel(); //保存
message.warning({
content: "功能维护中",
maxCount: 1,
duration: 2,
});
Vue.prototype.$app.progressFile.show = false;
Vue.prototype.$app.progressFile.percent = 1;
// let option = {
// fileName,
// datas: [
// {
// sheetData: list,
// sheetName: "sheet",
// 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