|
|
@@ -1,6 +1,7 @@
|
|
|
<template>
|
|
|
<div>
|
|
|
<div v-if="operateType === 'edit'" class="tool-btn" style="width: 800px; margin: 0 auto; text-align: right;">
|
|
|
+ <el-button size="small" type="primary" plain @click="handleExportWord">导出word</el-button>
|
|
|
<el-button size="small" type="primary" icon="el-icon-printer" v-print="printConfig" @click="isPrintPage = true">打印</el-button>
|
|
|
</div>
|
|
|
<div id="applyDoc" class="apply-form" v-loading="loading">
|
|
|
@@ -256,6 +257,9 @@ import Decimal from "decimal.js";
|
|
|
import { mapGetters } from "vuex";
|
|
|
import { getDetail as getTenantDetail } from '@/api/system/tenant';
|
|
|
import { downloadFileByUrl } from "@/util/util";
|
|
|
+import { exportBlob } from "@/api/common";
|
|
|
+import { getToken } from "@/util/auth";
|
|
|
+import { downloadXls } from "@/util/util";
|
|
|
|
|
|
export default {
|
|
|
components: {
|
|
|
@@ -648,7 +652,20 @@ export default {
|
|
|
}).catch(err => {
|
|
|
this.loading = false;
|
|
|
});
|
|
|
- }
|
|
|
+ },
|
|
|
+ handleExportWord() {
|
|
|
+ exportBlob(
|
|
|
+ `/api/kd-scientific/xm/approval/export?${
|
|
|
+ this.website.tokenHeader
|
|
|
+ }=${getToken()}`,
|
|
|
+ { xmId: this.projectId }
|
|
|
+ ).then((res) => {
|
|
|
+ downloadXls(
|
|
|
+ res.data,
|
|
|
+ `${this.formData.xmmc}项目立项表.doc`
|
|
|
+ );
|
|
|
+ });
|
|
|
+ },
|
|
|
},
|
|
|
};
|
|
|
</script>
|