diff --git a/package.json b/package.json index f3ff8ffe..0fc590f6 100644 --- a/package.json +++ b/package.json @@ -83,6 +83,7 @@ "monaco-editor": "^0.34.1", "mxgraph-js": "^1.0.1", "nprogress": "0.2.0", + "pako": "^2.1.0", "pdf-lib": "^1.17.1", "pdfjs-dist": "^2.5.207", "print-js": "^1.6.0", diff --git a/src/main.js b/src/main.js index 3b087062..4abbf978 100644 --- a/src/main.js +++ b/src/main.js @@ -30,7 +30,14 @@ import './permission' // permission control import { getDicts } from "@/api/system/dict/data"; import { getConfigKey } from "@/api/system/config"; import "default-passive-events"; -import { playAudio,playNoticeTone,parseTime, resetForm, addDateRange,removeDateRange,addQueryParam,addFormParam,insertJsScript, selectDictLabel, selectDictLabels, handleTree,handleOptions,addExportAuditRecord } from "@/utils/custom"; +import { + playAudio,playNoticeTone,parseTime, resetForm, addDateRange,removeDateRange,addQueryParam,addFormParam, + insertJsScript, selectDictLabel, selectDictLabels, handleTree,handleOptions, + addExportAuditRecord +} from "@/utils/custom"; + +import { unzipToJson } from '@/utils/compress.js'; +import { deepClone } from '@/utils/index' // 分页组件 @@ -101,6 +108,9 @@ Vue.prototype.MD5 = md5; Vue.prototype.playAudio = playAudio; Vue.prototype.playNoticeTone = playNoticeTone; +Vue.prototype.unzipToJson = unzipToJson; +Vue.prototype.deepClone = deepClone; + const tanexPrinter = TanexPrinterSdk.getInstance(); Vue.prototype.$tanexPrinter = tanexPrinter; diff --git a/src/views/emis/emisCommissionDtl/index.vue b/src/views/emis/emisCommissionDtl/index.vue index 9b290037..b7c99eaf 100644 --- a/src/views/emis/emisCommissionDtl/index.vue +++ b/src/views/emis/emisCommissionDtl/index.vue @@ -289,7 +289,6 @@ import EmisUserSimplePicker0 from '@/views/emis/EmisBaseTools/EmisUserSimplePick import elDateAdvPicker from '@/components/DatePickerAdv/elDateAdvPicker'; import moment from 'moment' - export default { name: "EmisCommissionDtl", components: { elDateSimplePicker,emisCommissionDtlForm,EmisUserSimplePicker0,EmpNamePicker,elDateAdvPicker }, @@ -357,7 +356,6 @@ export default { remark: null, delFlag: null, params:{ - } }, formBatch:{ @@ -575,6 +573,8 @@ export default { }, handleExport() { + const that=this; + const loadingInstance = this.$loading({ text: '正在导出...' }) @@ -583,16 +583,20 @@ export default { this.exportData(this.selectBillList,loadingInstance); } else{ - let qExportParam={...this.queryParams}; - let qParam=this.addDateRange(qExportParam, this.dateRange,"sendDate"); + let qExportParam=this.deepClone(this.queryParams); + qExportParam=this.addDateRange(qExportParam, this.dateRange,"sendDate"); qExportParam.pageNum=1; qExportParam.pageSize=100000; + qExportParam=this.addQueryParam(qExportParam, "blZExport","T"); + mapDtlList(qExportParam).then(response => { if (response.code === 200) { - this.exportData(response.rows,loadingInstance); + let rows=this.unzipToJson(response.rows[0]); + this.exportData(rows,loadingInstance); } }); + } }, exportData(selData,loadingInstance){ @@ -601,7 +605,11 @@ export default { const exportParam=this.$refs.refTable.getExportParam(); const tHeader = exportParam.header; const filterVal = exportParam.filter; + + console.time('exportData'); const data = this.formatJson(filterVal, curList, selData) + console.timeEnd('exportData'); + excel.export_json_to_excel({ header: tHeader, data, @@ -615,7 +623,7 @@ export default { let index = 0 return jsonData.map(v => filterVal.map(j => { - console.log("===>1111===>",v); + // console.log("===>1111===>",v); if (j === 'index') { return ++index diff --git a/src/views/emis/emisTmsSiteBatchMiss/index.vue b/src/views/emis/emisTmsSiteBatchMiss/index.vue index 5b5cf489..3e0ffeb8 100644 --- a/src/views/emis/emisTmsSiteBatchMiss/index.vue +++ b/src/views/emis/emisTmsSiteBatchMiss/index.vue @@ -381,14 +381,17 @@ export default { } else{ - let qExportParam={...this.queryParams}; + let qExportParam=this.deepClone(this.queryParams); qExportParam=this.addDateRange(qExportParam, this.dateTimeRange,'sendDate') qExportParam.pageNum=1; qExportParam.pageSize=20000; + qExportParam=this.addQueryParam(qExportParam, "blZExport","T"); + listEmisTmsSiteBatchMiss(qExportParam).then(response => { if (response.code === 200) { - this.exportData(response.rows,loadingInstance); + let rows=this.unzipToJson(response.rows[0]); + this.exportData(rows,loadingInstance); } }); } diff --git a/src/views/emis/emisWaybill/sendWaybillList.vue b/src/views/emis/emisWaybill/sendWaybillList.vue index b1592c05..59c84ac5 100644 --- a/src/views/emis/emisWaybill/sendWaybillList.vue +++ b/src/views/emis/emisWaybill/sendWaybillList.vue @@ -1093,13 +1093,16 @@ export default { this.exportData(this.selectionList,loadingInstance); } else{ - let qExportParam=this.initQueryParams(); + let initParam=this.initQueryParams(); + let qExportParam=this.deepClone(initParam); qExportParam.pageNum=1; qExportParam.pageSize=20000; + qExportParam=this.addQueryParam(qExportParam, "blZExport","T"); listEmisWaybill(qExportParam).then(response => { if (response.code === 200) { - this.exportData(response.rows,loadingInstance); + let rows=this.unzipToJson(response.rows[0]); + this.exportData(rows,loadingInstance); } }); }