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

feat:添加360报告导出

parent c118e33d
......@@ -26,6 +26,7 @@
"file-saver": "2.0.4",
"fuse.js": "6.4.3",
"js-cookie": "2.2.1",
"js-export-excel": "^1.1.4",
"jsencrypt": "3.0.0-rc.1",
"json-bigint": "^0.3.0",
"jwt-decode": "3.1.2",
......
<template>
<div id="app">
<router-view/>
<div class="loading" v-if="loading">
<div>
<div class="title">{{ title }}。。。</div>
<el-progress :percentage="percentage" color="#1890ff"></el-progress>
</div>
</div>
<router-view />
</div>
</template>
<script>
import Vue from "vue";
export default {
data() {
return {
fontStyle: null,
api: process.env.VUE_APP_API_BASE_URL + "/",
percentage: 0,
loading: false,
title: "报告生成中",
};
},
beforeCreate() {
Vue.prototype.$app = this;
},
created() {},
methods: {},
};
</script>
<style lang="less" scoped>
#app {
.loading {
display: flex;
align-items: center;
justify-content: center;
width: 100%;
height: 100%;
background-color: rgba(0, 0, 0, 0.3);
position: fixed;
top: 0px;
left: 0px;
z-index: 99999;
.title {
color: #fff;
font-size: 12px;
text-align: center;
}
.el-progress {
width: 300px;
/deep/ .el-progress__text {
color: #fff;
}
}
}
}
</style>
// 导出表格数据
import ExportJsonExcel from "js-export-excel";
/**
* 导出excel
* @param {导出的表头名信息} tHeader
* @param {导出的表头字段名,需要导出表格字段名} filterVal
* @param {导出数据} list
* @param {导出文件名称} fileName
*/
export const exportExcel = (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(); //保存
};
......@@ -14,7 +14,9 @@ import VueAMap from "vue-amap";
import * as echarts from "echarts";
import formCreate from "@form-create/element-ui";
import FcDesigner from "@form-create/designer";
// 引入时间处理
import moment from "moment";
Vue.prototype.$moment = moment;
// 将自动注册所有组件为全局组件
import dataV from "@jiaminghi/data-view";
......
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