From 87666996975805785496c4175e5d93c6971a41e4 Mon Sep 17 00:00:00 2001 From: HanLong <404402223@qq.com> Date: Wed, 21 Jan 2026 14:41:51 +0800 Subject: [PATCH] =?UTF-8?q?feat:[=E8=B5=84=E6=BA=90=E5=BA=93=E7=AE=A1?= =?UTF-8?q?=E7=90=86][=E4=BE=9B=E8=AF=95=E5=93=81=E7=AE=A1=E7=90=86]?= =?UTF-8?q?=E5=AF=BC=E5=87=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/business/resource/gsp/comps/ffjlList.vue | 163 +++++++++++++++++++-- src/views/business/resource/gsp/comps/gspList.vue | 125 +++++++++++++++- src/views/business/resource/gsp/comps/rkjlList.vue | 154 ++++++++++++++++--- 3 files changed, 403 insertions(+), 39 deletions(-) diff --git a/src/views/business/resource/gsp/comps/ffjlList.vue b/src/views/business/resource/gsp/comps/ffjlList.vue index fcd735f..13ddffe 100644 --- a/src/views/business/resource/gsp/comps/ffjlList.vue +++ b/src/views/business/resource/gsp/comps/ffjlList.vue @@ -41,7 +41,7 @@ - + - {{ $t('form.export') }} @@ -95,7 +95,7 @@ @@ -138,32 +138,32 @@ class-name="small-padding fixed-width" width="250px"> @@ -198,7 +198,7 @@ import Gd from "./ffjl/Gd"; import Jd from "./ffjl/Jd"; import Xq from "./ffjl/Xq"; import Jq from "./ffjl/Jq"; - +import { deepClone } from "@/utils/index"; export default { name: "FfjlList", components: { Sd, Js, Gd, Jd, Jy, Xq, Jq }, @@ -235,8 +235,143 @@ export default { }, methods: { //导出 - handleDc() { - + exportExcel() { + let that = this + that.$modal.loading() + let params = deepClone(this.queryParams) + params.pageSize = 999999 + list(params).then(response => { + var tabelStr = + '' + + '' + + '' + + '' + + '' + + '' + + '' + + '' + + '' + + '' + + '' + + '' + + '' + + '' + + '' + + '' + + '' + + '' + + ' ' + let _datastr = '' + _.forEach(response.rows, function (value) { + let jlzt = '' + switch (value.jlzt) { + case 1: + jlzt = that.$t('page.business.resource.resource.jlzt.wsd') + break + case 3: + jlzt = that.$t('page.business.resource.resource.jlzt.ysd') + break + case 5: + jlzt = that.$t('page.business.resource.resource.jlzt.dgd') + break + case 7: + jlzt = that.$t('page.business.resource.resource.jlzt.gd') + break + case 9: + jlzt = that.$t('page.business.resource.resource.jlzt.djd') + break + default: jlzt = '' + } + let jyzt = '' + switch (value.jyzt) { + case 1: + jyzt = that.$t('page.business.resource.resource.jyzt.wjy') + break + case 3: + jyzt = that.$t('page.business.resource.resource.jyzt.djy') + break + case 5: + jyzt = that.$t('page.business.resource.resource.jyzt.jyz') + break + default: jyzt = '' + } + _datastr = + _datastr + + '' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + '' + }) + tabelStr = tabelStr + _datastr + '
' + this.$t('page.business.resource.gsp.mc') + '' + this.$t('page.business.resource.gsp.bh') + '' + this.$t('page.business.resource.gsp.md') + '' + this.$t('page.business.resource.gsp.zytj') + '' + this.$t('page.business.resource.gsp.cksj') + '' + this.$t('page.business.resource.gsp.rksj') + '' + this.$t('page.business.resource.gsp.ckl') + '' + this.$t('page.business.resource.gsp.rkl') + '' + this.$t('page.business.resource.gsp.syl') + '' + this.$t('page.business.resource.gsp.lqr1') + '' + this.$t('page.business.resource.gsp.lqr2') + '' + this.$t('page.business.resource.gsp.kgy1') + '' + this.$t('page.business.resource.gsp.kgy2') + '' + this.$t('page.business.resource.gsp.zcg') + '' + this.$t('page.business.resource.gsp.jlzt') + '' + this.$t('page.business.resource.gsp.jyzt') + '
' + + value.mc + + '' + + ' ' + value.bh + + '' + + value.mdMc + + '' + + value.ffzytj + + '' + + value.ffrq + + '' + + value.ghrq + + '' + + value.ckl + value.ckldw + + '' + + value.rkl + value.rkldw + + '' + + value.syl + value.syldw + + '' + + value.lqr1Mc + + '' + + value.lqr2Mc + + '' + + value.jsr1Mc + + '' + + value.jsr2Mc + + '' + + value.zcgMc + + '' + + jlzt + + '' + + jyzt + + '
' + // Worksheet名 + var worksheet = that.$t('page.business.resource.gsp.ffhsjl') + var uri = 'data:application/vnd.ms-excel;base64,' + // 真正要导出(下载)的HTML模板 + var exportTemplate = ` + + + + ${tabelStr} + + ` + var a = document.createElement('a') + a.download = worksheet + '.xls' + a.href = uri + window.btoa(unescape(encodeURIComponent(exportTemplate))) + a.click() + that.$modal.closeLoading() + }).finally(() => { + that.$modal.closeLoading() + }) }, //加签 handleJq(row) { diff --git a/src/views/business/resource/gsp/comps/gspList.vue b/src/views/business/resource/gsp/comps/gspList.vue index ca6c416..bc0fb5c 100644 --- a/src/views/business/resource/gsp/comps/gspList.vue +++ b/src/views/business/resource/gsp/comps/gspList.vue @@ -90,7 +90,7 @@ - {{ + {{ $t('form.export') }} @@ -115,7 +115,7 @@ - + - +