From d4a47e106f5e645c678be6acebb5a2947a33ef43 Mon Sep 17 00:00:00 2001 From: HanLong <404402223@qq.com> Date: Tue, 10 Feb 2026 14:09:40 +0800 Subject: [PATCH] =?UTF-8?q?fix:[=E8=AF=95=E9=AA=8C=E7=AE=A1=E7=90=86][?= =?UTF-8?q?=E9=A5=B2=E5=85=BB=E9=97=B4=E7=AE=A1=E7=90=86]=E5=AF=BC?= =?UTF-8?q?=E5=87=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/lang/en/business/study/studyRoom.js | 12 +-- src/views/business/resource/gsp/comps/ffjlList.vue | 11 ++- src/views/business/resource/gsp/comps/gspList.vue | 1 + src/views/business/resource/gsp/comps/rkjlList.vue | 3 +- src/views/business/study/comp/syjList.vue | 106 ++++++++++++++++++++- 5 files changed, 116 insertions(+), 17 deletions(-) diff --git a/src/lang/en/business/study/studyRoom.js b/src/lang/en/business/study/studyRoom.js index 4c39538..12dcc30 100644 --- a/src/lang/en/business/study/studyRoom.js +++ b/src/lang/en/business/study/studyRoom.js @@ -13,13 +13,13 @@ export default { jsr: 'End by', jssj: 'End Date', zt: 'Status', - syz: '使用中', - yjs: '已结束', - ghlj: '更换笼具', - js: '结束', - ljjl: '笼具记录', + syz: 'In use', + yjs: 'Ended', + ghlj: 'Replace the cage', + js: 'End', + ljjl: 'Cage records', ghr: '更换人', - ghsj: '更换时间', + ghsj: 'Change time', ghqlj: '更换前笼具', ghhlj: '更换后笼具', } \ No newline at end of file diff --git a/src/views/business/resource/gsp/comps/ffjlList.vue b/src/views/business/resource/gsp/comps/ffjlList.vue index 138c924..4524ff6 100644 --- a/src/views/business/resource/gsp/comps/ffjlList.vue +++ b/src/views/business/resource/gsp/comps/ffjlList.vue @@ -163,12 +163,12 @@ v-hasPermi="['business:resource:gsp:ffjlgd']">{{ $t('page.business.resource.gsp.guidang') }} - {{ $t('page.business.resource.gsp.jiedang') }} - {{ + {{ $t('page.business.resource.gsp.jieyue') }} @@ -316,7 +316,7 @@ export default { ' ' + value.bh + '' + ' ' + - (value.mdMcs&&value.mdMcs!=''&&value.mdOther&&value.mdOther!=''? (value.mdMcs +","+value.mdOther) :(value.mdMcs +value.mdOther))+ + (value.mdMcs && value.mdMcs != '' && value.mdOther && value.mdOther != '' ? (value.mdMcs + "," + value.mdOther) : (value.mdMcs + value.mdOther)) + '' + ' ' + value.ffzytj + @@ -359,6 +359,7 @@ export default { '' + '' }) + _datastr = _datastr.replaceAll('null', '') tabelStr = tabelStr + _datastr + ' ' // Worksheet名 var worksheet = that.$t('page.business.resource.gsp.ffhsjl') @@ -380,7 +381,7 @@ export default { a.href = uri + window.btoa(unescape(encodeURIComponent(exportTemplate))) a.click() that.$modal.closeLoading() - this.saveSimpleLog({name:'',nameEn:'',jcmc:'供试品发放回收导出',jcmcEn:'Test Item In-and-Out Record Export'}) + this.saveSimpleLog({ name: '', nameEn: '', jcmc: '供试品发放回收导出', jcmcEn: 'Test Item In-and-Out Record Export' }) }).finally(() => { that.$modal.closeLoading() }) diff --git a/src/views/business/resource/gsp/comps/gspList.vue b/src/views/business/resource/gsp/comps/gspList.vue index 1386551..530ff38 100644 --- a/src/views/business/resource/gsp/comps/gspList.vue +++ b/src/views/business/resource/gsp/comps/gspList.vue @@ -385,6 +385,7 @@ export default { '' + '' }) + _datastr = _datastr.replaceAll('null', '') tabelStr = tabelStr + _datastr + '
' // Worksheet名 var worksheet = that.$t('page.business.resource.gsp.gspgl') diff --git a/src/views/business/resource/gsp/comps/rkjlList.vue b/src/views/business/resource/gsp/comps/rkjlList.vue index 23dc093..6044664 100644 --- a/src/views/business/resource/gsp/comps/rkjlList.vue +++ b/src/views/business/resource/gsp/comps/rkjlList.vue @@ -177,7 +177,7 @@ - + @@ -325,6 +325,7 @@ export default { '' + '' }) + _datastr = _datastr.replaceAll('null', '') tabelStr = tabelStr + _datastr + '
' // Worksheet名 var worksheet = that.$t('page.business.resource.gsp.gsprkjl') diff --git a/src/views/business/study/comp/syjList.vue b/src/views/business/study/comp/syjList.vue index 977e514..25f8589 100644 --- a/src/views/business/study/comp/syjList.vue +++ b/src/views/business/study/comp/syjList.vue @@ -100,7 +100,7 @@ - + @@ -114,6 +114,7 @@ import Jl from "./syj/Jl"; import Detail from "./syj/Detail"; import { mapGetters } from 'vuex' import moment from "moment"; +import { deepClone } from "@/utils/index"; export default { name: 'SyjList', props: { @@ -168,7 +169,105 @@ export default { }, created() { }, methods: { - + //导出 + handleExport() { + let that = this + that.$modal.loading() + let params = deepClone(this.searchForm) + params.pageSize = 999999 + studyRoom_list(params).then(response => { + var tabelStr = + '
' + + '' + + '' + + '' + + '' + + '' + + '' + + '' + + '' + + '' + + '' + + '' + + '' + + ' ' + let _datastr = '' + _.forEach(response.rows, function (value) { + let zt = '' + switch (value.zt) { + case 1: + zt = that.$t('page.business.study.studyRoom.syz') + break + case 3: + zt = that.$t('page.business.study.studyRoom.yjs') + break + } + _datastr = + _datastr + + '' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + '' + + '' + + '' + }) + _datastr = _datastr.replaceAll('null', ' ') + tabelStr = tabelStr + _datastr + '
' + this.$t('page.business.study.studyRoom.syjh') + '' + this.$t('page.business.study.studyRoom.syqy') + '' + this.$t('page.business.study.studyRoom.dwzs') + '' + this.$t('page.business.study.studyRoom.longju') + '' + this.$t('page.business.study.studyRoom.kssyyl') + '' + this.$t('page.business.study.studyRoom.qyr') + '' + this.$t('page.business.study.studyRoom.kssj') + '' + this.$t('page.business.study.studyRoom.jssyyl') + '' + this.$t('page.business.study.studyRoom.jsr') + '' + this.$t('page.business.study.studyRoom.jssj') + '' + this.$t('page.business.study.studyRoom.zt') + '
' + + value.syjh + + '' + + ' ' + value.syqy + + '' + + value.dwzs + + '' + + value.lj + + '' + + value.kssyyl + + '' + + value.qyrMc + + '' + + value.createTime + + '' + + value.jssyyl + + '' + + value.jsrMc + + '' + + value.jssj + + '' + + zt + + '
' + console.log(tabelStr) + // Worksheet名 + var worksheet = that.$t('page.business.study.studyEnter.syjsygl') + 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() + this.saveSimpleLog({ name: '', nameEn: '', jcmc: '饲养间使用管理导出', jcmcEn: 'Animal Room Usage Export' }) + }).finally(() => { + that.$modal.closeLoading() + }) + }, search() { this.searchForm.pageNum = 1 this.getList() @@ -215,9 +314,6 @@ export default { // this.$emit('showDetail', this.showDetail) // this.$refs.Xq.show(row) }, - handleExport() { - - }, xqClose() { this.showDetail = false this.$emit('showDetail', this.showDetail)