|
|
@ -79,7 +79,7 @@ |
|
|
</el-col> |
|
|
</el-col> |
|
|
<el-col :span="1.5"> |
|
|
<el-col :span="1.5"> |
|
|
<!-- 导出 --> |
|
|
<!-- 导出 --> |
|
|
<el-button type="primary" :disabled="multiple" @click="handleDc" |
|
|
|
|
|
|
|
|
<el-button type="primary" @click="exportExcel" |
|
|
v-hasPermi="['business:resource:mjy:ffjldc']">{{ |
|
|
v-hasPermi="['business:resource:mjy:ffjldc']">{{ |
|
|
$t('form.export') }}</el-button> |
|
|
$t('form.export') }}</el-button> |
|
|
</el-col> |
|
|
</el-col> |
|
|
@ -93,8 +93,8 @@ |
|
|
:show-overflow-tooltip="true" /> |
|
|
:show-overflow-tooltip="true" /> |
|
|
<el-table-column :label="$t('page.business.resource.gyzj.md')" align="center" width="150px"> |
|
|
<el-table-column :label="$t('page.business.resource.gyzj.md')" align="center" width="150px"> |
|
|
<template slot-scope="scope"> |
|
|
<template slot-scope="scope"> |
|
|
<span v-if="scope.row.mdOther && scope.row.mdOther != ''&&scope.row.mdMcs && scope.row.mdMcs != ''">{{ scope.row.mdMcs }}{{ scope.row.mdOther }}</span> |
|
|
|
|
|
<span v-else>{{ scope.row.mdMcs }},{{ scope.row.mdOther }}</span> |
|
|
|
|
|
|
|
|
<span v-if="scope.row.mdOther && scope.row.mdOther != ''&&scope.row.mdMcs && scope.row.mdMcs != ''">{{ scope.row.mdMcs }},{{ scope.row.mdOther }}</span> |
|
|
|
|
|
<span v-else>{{ scope.row.mdMcs }}{{ scope.row.mdOther }}</span> |
|
|
</template> |
|
|
</template> |
|
|
</el-table-column> |
|
|
</el-table-column> |
|
|
<el-table-column :label="$t('page.business.resource.mjy.zytj')" align="center" prop="ffzytj" |
|
|
<el-table-column :label="$t('page.business.resource.mjy.zytj')" align="center" prop="ffzytj" |
|
|
@ -207,6 +207,7 @@ import Jd from "./ffjl/Jd"; |
|
|
import Xq from "./ffjl/Xq"; |
|
|
import Xq from "./ffjl/Xq"; |
|
|
import Jq from "./ffjl/Jq"; |
|
|
import Jq from "./ffjl/Jq"; |
|
|
import moment from "moment"; |
|
|
import moment from "moment"; |
|
|
|
|
|
import { deepClone } from "@/utils/index"; |
|
|
|
|
|
|
|
|
export default { |
|
|
export default { |
|
|
name: "FfjlList", |
|
|
name: "FfjlList", |
|
|
@ -243,9 +244,143 @@ export default { |
|
|
this.getList() |
|
|
this.getList() |
|
|
}, |
|
|
}, |
|
|
methods: { |
|
|
methods: { |
|
|
//导出 |
|
|
|
|
|
handleDc() { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
exportExcel() { |
|
|
|
|
|
let that = this |
|
|
|
|
|
that.$modal.loading() |
|
|
|
|
|
let params = deepClone(this.queryParams) |
|
|
|
|
|
params.pageSize = 999999 |
|
|
|
|
|
list(params).then(response => { |
|
|
|
|
|
var tabelStr = |
|
|
|
|
|
'<table border="1" class="html-tabel">' + |
|
|
|
|
|
'<tr style="background:#eee;">' + |
|
|
|
|
|
'<th style="text-align: center;">' + this.$t('page.business.resource.mjy.mc') + '</th>' + |
|
|
|
|
|
'<th style="text-align: center;">' + this.$t('page.business.resource.mjy.bh') + '</th>' + |
|
|
|
|
|
'<th style="text-align: center;">' + this.$t('page.business.resource.mjy.md') + '</th>' + |
|
|
|
|
|
'<th style="text-align: center;">' + this.$t('page.business.resource.mjy.zytj') + '</th>' + |
|
|
|
|
|
'<th style="text-align: center;">' + this.$t('page.business.resource.mjy.cksj') + '</th>' + |
|
|
|
|
|
'<th style="text-align: center;">' + this.$t('page.business.resource.mjy.rksj') + '</th>' + |
|
|
|
|
|
'<th style="text-align: center;">' + this.$t('page.business.resource.mjy.ckmz') + '</th>' + |
|
|
|
|
|
'<th style="text-align: center;">' + this.$t('page.business.resource.mjy.rkmz') + '</th>' + |
|
|
|
|
|
'<th style="text-align: center;">' + this.$t('page.business.resource.mjy.syl') + '</th>' + |
|
|
|
|
|
'<th style="text-align: center;">' + this.$t('page.business.resource.mjy.lqr1') + '</th>' + |
|
|
|
|
|
'<th style="text-align: center;">' + this.$t('page.business.resource.mjy.lqr2') + '</th>' + |
|
|
|
|
|
'<th style="text-align: center;">' + this.$t('page.business.resource.mjy.kgy1') + '</th>' + |
|
|
|
|
|
'<th style="text-align: center;">' + this.$t('page.business.resource.mjy.kgy2') + '</th>' + |
|
|
|
|
|
'<th style="text-align: center;">' + this.$t('page.business.resource.mjy.zcg') + '</th>' + |
|
|
|
|
|
'<th style="text-align: center;">' + this.$t('page.business.resource.mjy.jlzt') + '</th>' + |
|
|
|
|
|
'<th style="text-align: center;">' + this.$t('page.business.resource.mjy.jyzt') + '</th>' + |
|
|
|
|
|
' </tr>' |
|
|
|
|
|
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: zjzt = '' |
|
|
|
|
|
} |
|
|
|
|
|
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 + |
|
|
|
|
|
'<tr style="text-align: center;">' + |
|
|
|
|
|
' <td>' + |
|
|
|
|
|
value.mc + |
|
|
|
|
|
'</td>' + |
|
|
|
|
|
' <td>' + |
|
|
|
|
|
' '+value.bh + |
|
|
|
|
|
'</td>' + |
|
|
|
|
|
' <td>' + |
|
|
|
|
|
(value.mdMcs&&value.mdMcs!=''&&value.mdOther&&value.mdOther!=''? (value.mdMcs +","+value.mdOther) :(value.mdMcs +value.mdOther))+ |
|
|
|
|
|
'</td>' + |
|
|
|
|
|
' <td>' + |
|
|
|
|
|
value.ffzytj + |
|
|
|
|
|
'</td>' + |
|
|
|
|
|
' <td>' + |
|
|
|
|
|
value.ffrq + |
|
|
|
|
|
'</td>' + |
|
|
|
|
|
' <td>' + |
|
|
|
|
|
value.ghrq + |
|
|
|
|
|
'</td>' + |
|
|
|
|
|
' <td>' + |
|
|
|
|
|
value.ckmz +value.ckmzdw+ |
|
|
|
|
|
'</td>' + |
|
|
|
|
|
' <td>' + |
|
|
|
|
|
value.rkmz+value.rkmzdw + |
|
|
|
|
|
'</td>' + |
|
|
|
|
|
' <td>' + |
|
|
|
|
|
value.syl+value.syldw + |
|
|
|
|
|
'</td>' + |
|
|
|
|
|
' <td>' + |
|
|
|
|
|
value.lqr1Mc + |
|
|
|
|
|
'</td>' + |
|
|
|
|
|
' <td>' + |
|
|
|
|
|
value.lqr2Mc + |
|
|
|
|
|
'</td>' + |
|
|
|
|
|
' <td>' + |
|
|
|
|
|
value.jsr1Mc + |
|
|
|
|
|
'</td>' + |
|
|
|
|
|
' <td>' + |
|
|
|
|
|
value.jsr2Mc + |
|
|
|
|
|
'</td>' + |
|
|
|
|
|
' <td>' + |
|
|
|
|
|
value.zcgMc + |
|
|
|
|
|
'</td>' + |
|
|
|
|
|
' <td>' + |
|
|
|
|
|
jlzt + |
|
|
|
|
|
'</td>' + |
|
|
|
|
|
' <td>' + |
|
|
|
|
|
jyzt + |
|
|
|
|
|
'</td>' + |
|
|
|
|
|
'</tr>' |
|
|
|
|
|
}) |
|
|
|
|
|
tabelStr = tabelStr + _datastr + ' <table>' |
|
|
|
|
|
// Worksheet名 |
|
|
|
|
|
var worksheet = that.$t('page.business.resource.mjy.ffhsjl') |
|
|
|
|
|
var uri = 'data:application/vnd.ms-excel;base64,' |
|
|
|
|
|
// 真正要导出(下载)的HTML模板 |
|
|
|
|
|
var exportTemplate = `<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:x="urn:schemas-microsoft-com:office:excel" |
|
|
|
|
|
xmlns="http://www.w3.org/TR/REC-html40"> |
|
|
|
|
|
<head><!--[if gte mso 9]><xml><x:ExcelWorkbook><x:ExcelWorksheets><x:ExcelWorksheet> |
|
|
|
|
|
<x:Name>${worksheet}</x:Name> |
|
|
|
|
|
<x:WorksheetOptions><x:DisplayGridlines/></x:WorksheetOptions></x:ExcelWorksheet> |
|
|
|
|
|
</x:ExcelWorksheets></x:ExcelWorkbook></xml><![endif]--> |
|
|
|
|
|
</head> |
|
|
|
|
|
<body> |
|
|
|
|
|
${tabelStr} |
|
|
|
|
|
</body> |
|
|
|
|
|
</html>` |
|
|
|
|
|
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) { |
|
|
handleJq(row) { |
|
|
|