{{
+ {{
$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 =
+ '' +
+ '' +
+ '| ' + 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') + ' | ' +
+ '
'
+ 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 +
+ '' +
+ ' | ' +
+ value.syjh +
+ ' | ' +
+ ' ' +
+ ' ' + value.syqy +
+ ' | ' +
+ ' ' +
+ value.dwzs +
+ ' | ' +
+ ' ' +
+ value.lj +
+ ' | ' +
+ ' ' +
+ value.kssyyl +
+ ' | ' +
+ ' ' +
+ value.qyrMc +
+ ' | ' +
+ ' ' +
+ value.createTime +
+ ' | ' +
+ ' ' +
+ value.jssyyl +
+ ' | ' +
+ ' ' +
+ value.jsrMc +
+ ' | ' +
+ '' +
+ value.jssj +
+ ' | ' +
+ '' +
+ zt +
+ ' | ' +
+ '
'
+ })
+ _datastr = _datastr.replaceAll('null', ' ')
+ tabelStr = tabelStr + _datastr + ' '
+ 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)