|
|
@@ -4,7 +4,7 @@
|
|
|
<el-button type="primary" icon="el-icon-edit" @click="handleSaveBtn">保存</el-button>
|
|
|
</div>
|
|
|
<div class="doc-page">
|
|
|
- <h3 class="page-title" style="margin: 24px 0 16px">A107041高新技术企业优惠情况及明细表</h3>
|
|
|
+ <h3 class="page-title" style="margin: 24px 0 16px">{{ pageTitle }}</h3>
|
|
|
<div style="display: flex; justify-content: space-between; margin: 12px 0;">
|
|
|
<year-month-select v-model="year" :showMonth="false" style="margin: 0;"></year-month-select>
|
|
|
<el-button
|
|
|
@@ -12,6 +12,7 @@
|
|
|
size="small"
|
|
|
plain
|
|
|
icon="el-icon-download"
|
|
|
+ @click="handleExport"
|
|
|
>
|
|
|
导出
|
|
|
</el-button>
|
|
|
@@ -302,6 +303,10 @@ import { getList, update } from "@/api/externalReports/highCompDiscountDetails";
|
|
|
import moment from "moment";
|
|
|
import yearMonthSelect from "@/components/year-month-select";
|
|
|
import { HIGH_TECH_FIELDS } from "@/config/dict";
|
|
|
+import { exportBlob } from "@/api/common";
|
|
|
+import { getToken } from "@/util/auth";
|
|
|
+import { downloadXls } from "@/util/util";
|
|
|
+import { mapGetters } from "vuex";
|
|
|
|
|
|
export default {
|
|
|
components: {
|
|
|
@@ -319,6 +324,13 @@ export default {
|
|
|
this.getData();
|
|
|
},
|
|
|
},
|
|
|
+ computed: {
|
|
|
+ ...mapGetters(['tag']),
|
|
|
+ pageTitle() {
|
|
|
+ let yearCN = this.year ? moment(this.year).format('yyyy年') : '';
|
|
|
+ return `${yearCN}${this.tag.label}`
|
|
|
+ }
|
|
|
+ },
|
|
|
methods: {
|
|
|
// 转译高新领域
|
|
|
formatHighTechField(id) {
|
|
|
@@ -375,7 +387,20 @@ export default {
|
|
|
this.getData();
|
|
|
}
|
|
|
});
|
|
|
- }
|
|
|
+ },
|
|
|
+ handleExport() {
|
|
|
+ exportBlob(
|
|
|
+ `/api/kd-scientific/gxjsqyyhqkjmxb/export?${
|
|
|
+ this.website.tokenHeader
|
|
|
+ }=${getToken()}`,
|
|
|
+ { year: this.year }
|
|
|
+ ).then((res) => {
|
|
|
+ downloadXls(
|
|
|
+ res.data,
|
|
|
+ `${this.pageTitle}.xlsx`
|
|
|
+ );
|
|
|
+ });
|
|
|
+ },
|
|
|
},
|
|
|
};
|
|
|
</script>
|