|
@@ -11,7 +11,7 @@
|
|
|
type="primary"
|
|
type="primary"
|
|
|
size="small"
|
|
size="small"
|
|
|
icon="el-icon-download"
|
|
icon="el-icon-download"
|
|
|
- @click="handleDownAll('/api/kd-scientific/archive/center/download')"
|
|
|
|
|
|
|
+ @click="handleDownAll('/api/kd-scientific/archive/center/download', 0)"
|
|
|
>
|
|
>
|
|
|
一键下载
|
|
一键下载
|
|
|
</el-button>
|
|
</el-button>
|
|
@@ -20,7 +20,7 @@
|
|
|
size="small"
|
|
size="small"
|
|
|
plain
|
|
plain
|
|
|
icon="el-icon-download"
|
|
icon="el-icon-download"
|
|
|
- @click="handleDownAll('/api/kd-scientific/archive/center/high-tech/download')"
|
|
|
|
|
|
|
+ @click="handleDownAll('/api/kd-scientific/archive/center/high-tech/download', 1)"
|
|
|
>
|
|
>
|
|
|
一键导出高新备查
|
|
一键导出高新备查
|
|
|
</el-button>
|
|
</el-button>
|
|
@@ -29,7 +29,7 @@
|
|
|
size="small"
|
|
size="small"
|
|
|
plain
|
|
plain
|
|
|
icon="el-icon-download"
|
|
icon="el-icon-download"
|
|
|
- @click="handleDownAll('/api/kd-scientific/archive/center/deduction/download')"
|
|
|
|
|
|
|
+ @click="handleDownAll('/api/kd-scientific/archive/center/deduction/download', 2)"
|
|
|
>
|
|
>
|
|
|
一键导出加计备查
|
|
一键导出加计备查
|
|
|
</el-button>
|
|
</el-button>
|
|
@@ -41,9 +41,9 @@
|
|
|
<year-month-select v-model="params.year" :showMonth="false"></year-month-select>
|
|
<year-month-select v-model="params.year" :showMonth="false"></year-month-select>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
- <template slot="menu" slot-scope="{row}">
|
|
|
|
|
|
|
+ <!-- <template slot="menu" slot-scope="{row}">
|
|
|
<el-button type="text" icon="el-icon-download" size="mini" @click="handleRowDown(row)">下载</el-button>
|
|
<el-button type="text" icon="el-icon-download" size="mini" @click="handleRowDown(row)">下载</el-button>
|
|
|
- </template>
|
|
|
|
|
|
|
+ </template> -->
|
|
|
|
|
|
|
|
<template slot="fileList" slot-scope="{row}">
|
|
<template slot="fileList" slot-scope="{row}">
|
|
|
<el-link
|
|
<el-link
|
|
@@ -68,8 +68,9 @@ import {getToken} from "@/util/auth";
|
|
|
import {downloadXls, downloadFileByUrl} from "@/util/util";
|
|
import {downloadXls, downloadFileByUrl} from "@/util/util";
|
|
|
import moment from "moment";
|
|
import moment from "moment";
|
|
|
import { getDictValueByKey } from '@/api/system/dict';
|
|
import { getDictValueByKey } from '@/api/system/dict';
|
|
|
-import { downAllFile } from "@/api/achiveManage/archiveList"
|
|
|
|
|
|
|
+import { generateTaskId, downAllFile } from "@/api/achiveManage/archiveList"
|
|
|
import { mapGetters } from "vuex";
|
|
import { mapGetters } from "vuex";
|
|
|
|
|
+import {setStore, getStore, removeStore} from '@/util/store'
|
|
|
|
|
|
|
|
|
|
|
|
|
export default window.$crudCommon({
|
|
export default window.$crudCommon({
|
|
@@ -239,14 +240,31 @@ export default window.$crudCommon({
|
|
|
handleDownFile(file) {
|
|
handleDownFile(file) {
|
|
|
downloadFileByUrl(file.value, file.label);
|
|
downloadFileByUrl(file.value, file.label);
|
|
|
},
|
|
},
|
|
|
- handleDownAll(downUrl) {
|
|
|
|
|
- // let downParams = { year: this.params.year };
|
|
|
|
|
- // exportBlob(`${downUrl}?${this.website.tokenHeader}=${getToken()}`, downParams).then(res => {
|
|
|
|
|
- // downloadXls(res.data, `${this.pageTitle}.zip`);
|
|
|
|
|
- // });
|
|
|
|
|
- downAllFile({ year: this.params.year }).then(res => {
|
|
|
|
|
- console.log(res)
|
|
|
|
|
- })
|
|
|
|
|
|
|
+ handleDownAll(downUrl, type) {
|
|
|
|
|
+ let fileNameObj = {
|
|
|
|
|
+ 0: '全部档案资料',
|
|
|
|
|
+ 1: '高新备查资料',
|
|
|
|
|
+ 2: '加计扣除备查资料'
|
|
|
|
|
+ };
|
|
|
|
|
+ if (type) {}
|
|
|
|
|
+ let storeName = `taskType${type}`;
|
|
|
|
|
+ let taskId = getStore({ name: storeName });
|
|
|
|
|
+ if (taskId) {
|
|
|
|
|
+ exportBlob(`${downUrl}?${this.website.tokenHeader}=${getToken()}`, { taskId }).then(res => {
|
|
|
|
|
+ downloadXls(res.data, `${this.params.year}年${fileNameObj[type]}.zip`);
|
|
|
|
|
+ });
|
|
|
|
|
+ } else {
|
|
|
|
|
+ generateTaskId({ yearAndMonth: this.params.year, type: 0 }).then(res => {
|
|
|
|
|
+ if (res.data.code == 200) {
|
|
|
|
|
+ let taskId = res.data.data.id;
|
|
|
|
|
+ setStore({ name: storeName, content: taskId });
|
|
|
|
|
+ exportBlob(`${downUrl}?${this.website.tokenHeader}=${getToken()}`, { taskId }).then(res => {
|
|
|
|
|
+ downloadXls(res.data, `${this.params.year}年${fileNameObj[type]}.zip`);
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ })
|
|
|
|
|
+ }
|
|
|
},
|
|
},
|
|
|
handleRowDown() {
|
|
handleRowDown() {
|
|
|
this.$message.warning("功能建设中...");
|
|
this.$message.warning("功能建设中...");
|