@ -67,7 +67,10 @@
"vue-quill-editor": "^3.0.6",
"vue-router": "^3.0.7",
"vuex": "^3.1.1",
"xlsx": "^0.17.1"
"xlsx": "^0.17.1",
"exceljs": "^4.2.0",
"FileSaver": "^0.10.0",
"file-saver": "^2.0.5"
},
"devDependencies": {
"@antv/f2": "^3.8.10-beta.1",
@ -98,7 +98,7 @@ export default {
this.showView = true;
this.sheetTotal = true
this.workbookId = val
this.infoObj = {taskTitle:this.list[0].taskTitle}
}
components: { excelView },
@ -31,6 +31,7 @@
@click="handleClickCurrencyEvent('archived')"> 审核存档</el-button>
<el-button type="primary" v-if="pageType === 'filling' && (taskStateName == '处理中' || taskStateName == '已驳回')"
@click="handleClickCurrencyEvent('submit')"> 提交</el-button>
<el-button type="primary" @click="handleClickExportExcel()"> 导出</el-button>
</div>
<div id="luckysheet"></div>
@ -51,7 +52,7 @@ import options from "@/utils/luckysheetConfig.js";
import { mapGetters } from 'vuex'
import { requestPost, requestGet } from "@/js/dai/request";
import nextTick from "dai-js/tools/nextTick";
import {exportSheetExcel} from "@/utils/export";
export default {
data() {
@ -116,6 +117,9 @@ export default {
methods: {
handleClickExportExcel(){
exportSheetExcel(luckysheet.getAllSheets(),this.infoObj.taskTitle)
async getTaskList() {
let parm = {
taskId: this.workbookId,//注:此处实际为任务Id只是没必要再声明另外一个参数了
@ -217,6 +221,7 @@ export default {
options.loadUrl = `${process.env.VUE_APP_API_SERVER}/actual/base/luckySheet/workbook/load?workbookId=${this.currentId}`
options.updateUrl = `${process.env.VUE_APP_SOCKET_SERVER}/actual/base/ws/luckysheet/${this.currentId}/${id}`
options.loadSheetUrl = `${process.env.VUE_APP_API_SERVER}/actual/base/luckySheet/workbook/loadSheets`
options.title = this.infoObj.taskTitle
window.luckysheet.create({
...options,
hook: {