From 1b58efe168941c361b2d22f83a140bbe8b4b035f Mon Sep 17 00:00:00 2001 From: xhj Date: Thu, 12 Dec 2024 16:53:49 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/jhzxgl/components/SljhPrint.vue | 2 +- src/views/jhzxgl/sljhD.vue | 29 ++++++++++++++++++----- 2 files changed, 24 insertions(+), 7 deletions(-) diff --git a/src/views/jhzxgl/components/SljhPrint.vue b/src/views/jhzxgl/components/SljhPrint.vue index d77c78c..a7d42ba 100644 --- a/src/views/jhzxgl/components/SljhPrint.vue +++ b/src/views/jhzxgl/components/SljhPrint.vue @@ -93,7 +93,7 @@ export default { }, created() { console.log(this.sljhPrintData) - console.log(sljhPrintData) + // console.log(sljhPrintData) console.log(11111) }, diff --git a/src/views/jhzxgl/sljhD.vue b/src/views/jhzxgl/sljhD.vue index 226a050..2efeb58 100644 --- a/src/views/jhzxgl/sljhD.vue +++ b/src/views/jhzxgl/sljhD.vue @@ -303,11 +303,15 @@ highlight-current-row @current-change="rowClick" :header-cell-style="{'text-align':'center'}" - + show-footer + :footer-method="footerMethod" > + @@ -373,7 +377,7 @@ import { import { mapGetters } from 'vuex' import XEUtils from 'xe-utils' import SljhPrint from "@/views/jhzxgl/components/SljhPrint"; -import {exportByExcel, null2str} from "@/utils/rpkj"; +import {exportByExcel, getSumAddDicByName, null2str} from "@/utils/rpkj"; import { getToken } from '@/utils/auth' import { startLoading, endLoading } from '@/utils' import { Message } from 'element-ui' @@ -783,7 +787,7 @@ export default { title: '车号', width: "70px", field: 'dcTpbh', - + slots: { footer: 'numMx' }, filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }], filterRender: { name: 'FilterCombination' }, }, @@ -1030,8 +1034,8 @@ export default { const pwwz = this.$refs.xGrid.getColumnByField('pwwz') pwwz.editRender.options = this.dictData.pwwz - const slycldw = this.$refs.xGrid1.getColumnByField('slycldw') - slycldw.editRender.options = this.dictData.ycldws + // const slycldw = this.$refs.xGrid1.getColumnByField('slycldw') + // slycldw.editRender.options = this.dictData.ycldws @@ -1300,7 +1304,20 @@ export default { }, - + footerMethod ({ columns, data }) { + return [ + columns.map((column, columnIndex) => { + if (['dcTpbh'].includes(column.property)) { + console.log(1) + return getSumAddDicByName(data, column.property) + } + if (columnIndex === 1) { + return '合计' + } + return null + }) + ] + }, async hd (){ await kcAdnSlBd({ // "data1":this.$refs.xGrid.getTableData().visibleData,