|
@@ -58,7 +58,7 @@
|
|
|
import pf from '@/layout/mixin/publicFunc'
|
|
|
import { getToken } from '@/utils/auth'
|
|
|
import { getAuthData, formatOrder } from '@/utils/validate'
|
|
|
-import { exportToExcel } from '@/utils/table'
|
|
|
+import { throttledExportToExcel } from '@/utils/table'
|
|
|
import tableColsMixin from '../mix/tableCols'
|
|
|
import Dialog from '@/layout/components/Dialog/index.vue'
|
|
|
import TableHeaderCell from '@/components/TableHeaderCell/index.vue'
|
|
@@ -133,6 +133,7 @@ export default {
|
|
|
tableOptions: {}, // 弹框-下来数据缓存
|
|
|
showSummary: false, // 是否显示统计
|
|
|
tableDataSortRules: {},
|
|
|
+ tableCath: []
|
|
|
}
|
|
|
},
|
|
|
computed: {
|
|
@@ -222,6 +223,7 @@ export default {
|
|
|
this.showSummary = true
|
|
|
}
|
|
|
const msgDatasShows = formatOrder(msgDatas)
|
|
|
+ this.tableCath = msgDatasShows
|
|
|
if (this.istableChild) {
|
|
|
const datas = _.cloneDeep(msgDatasShows)
|
|
|
const cache = {}
|
|
@@ -268,7 +270,7 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
setTableCols () {
|
|
|
- this.tableCols.forEach(({ columnName, needFilters, needSort }) => {
|
|
|
+ this.tableCath.forEach(({ columnName, needFilters, needSort }) => {
|
|
|
if (needFilters) {
|
|
|
this.$set(this.tableDataFilters, columnName, [])
|
|
|
this.$set(this.filterValues, columnName, [])
|
|
@@ -488,7 +490,7 @@ export default {
|
|
|
if (index === 0) {
|
|
|
sums[index] = '合计:' + this.tableData.length
|
|
|
}
|
|
|
- this.tableColsCopy.forEach(p => {
|
|
|
+ this.tableCath.forEach(p => {
|
|
|
if (column.property == p.columnName && p.needCount) {
|
|
|
const values = data.map(item => Number(item[column.property]))
|
|
|
if (!values.every(value => isNaN(value))) {
|
|
@@ -562,7 +564,7 @@ export default {
|
|
|
exportHandler () {
|
|
|
const table = this.$refs['table'].$el.cloneNode(true)
|
|
|
const fileName = `${this.downName || this.AqueryParams.auth_name}.xlsx`
|
|
|
- exportToExcel(table, `${this.downName || this.AqueryParams.auth_name}`, fileName)
|
|
|
+ throttledExportToExcel(table, `${this.downName || this.AqueryParams.auth_name}`, fileName)
|
|
|
},
|
|
|
formatter (row, column, cellValue, index) {
|
|
|
const sameColumn = this.tableCols.find(
|