|
@@ -454,16 +454,43 @@
|
|
|
downloadFirstAuditTpl () {
|
|
|
// this.$utils.downloadExcel('/sys/project/import/template')
|
|
|
this.loading = true
|
|
|
- this.programProjectListInfoService.downloadFirstAuditTpl(this.inputForm.programProjectListInfo.id, this.inputForm.id).then((res) => {
|
|
|
- // 将二进制流文件写入excel表,以下为重要步骤
|
|
|
- this.$utils.downloadWord(res.data, this.tabName)
|
|
|
- this.loading = false
|
|
|
- }).catch(function (err) {
|
|
|
- this.loading = false
|
|
|
- if (err.response) {
|
|
|
- console.log(err.response)
|
|
|
- }
|
|
|
- })
|
|
|
+ if (this.tabName === '一级校审') {
|
|
|
+ this.programProjectListInfoService.downloadFirstAuditTpl(this.inputForm.programProjectListInfo.id, this.inputForm.id).then((res) => {
|
|
|
+ // 将二进制流文件写入excel表,以下为重要步骤
|
|
|
+ this.$utils.downloadWord(res.data, this.tabName)
|
|
|
+ this.loading = false
|
|
|
+ }).catch(function (err) {
|
|
|
+ this.loading = false
|
|
|
+ if (err.response) {
|
|
|
+ console.log(err.response)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ if (this.tabName === '二级校审') {
|
|
|
+ this.programProjectListInfoService.downloadSecondAuditTpl(this.inputForm.programProjectListInfo.id, this.inputForm.id).then((res) => {
|
|
|
+ // 将二进制流文件写入excel表,以下为重要步骤
|
|
|
+ this.$utils.downloadWord(res.data, this.tabName)
|
|
|
+ this.loading = false
|
|
|
+ }).catch(function (err) {
|
|
|
+ this.loading = false
|
|
|
+ if (err.response) {
|
|
|
+ console.log(err.response)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ if (this.tabName === '三级校审') {
|
|
|
+ this.programProjectListInfoService.downloadThirdlyAuditTpl(this.inputForm.programProjectListInfo.id, this.inputForm.id).then((res) => {
|
|
|
+ // 将二进制流文件写入excel表,以下为重要步骤
|
|
|
+ this.$utils.downloadWord(res.data, this.tabName)
|
|
|
+ this.loading = false
|
|
|
+ }).catch(function (err) {
|
|
|
+ this.loading = false
|
|
|
+ if (err.response) {
|
|
|
+ console.log(err.response)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
}
|
|
|
}
|