From 2ae418b2ccd80953f017ca72530fd78f2eae9a42 Mon Sep 17 00:00:00 2001
From: DESKTOP-6GG29MI\dell <2847338803@qq.com>
Date: Fri, 29 Aug 2025 08:49:59 +0000
Subject: [PATCH] 项目详情页项目进度导出功能添加

---
 eladmin-web-master/src/views/project/project/index.vue |   34 +++++++++++++++++++++++++++++++++-
 1 files changed, 33 insertions(+), 1 deletions(-)

diff --git a/eladmin-web-master/src/views/project/project/index.vue b/eladmin-web-master/src/views/project/project/index.vue
index dc7af27..f063ab6 100644
--- a/eladmin-web-master/src/views/project/project/index.vue
+++ b/eladmin-web-master/src/views/project/project/index.vue
@@ -122,6 +122,20 @@
         >
           报告生成
         </el-button>
+        <el-button
+          slot="right"
+          v-permission="permission.download"
+          class="filter-item"
+          size="mini"
+          type="primary"
+          icon="el-icon-download"
+          style="margin-left: 4px !important;"
+          v-loading="downloadProgressLoading"
+          :disabled="crud.selections.length === 0"
+          @click="doExportProjectProgress()"
+        >
+          项目进度导出
+        </el-button>
       </crudOperation>
       <!--表单组件-->
       <el-dialog :close-on-click-modal="false" :before-close="crud.cancelCU" :visible.sync="crud.status.cu > 0" :title="crud.status.title" width="690px">
@@ -433,6 +447,7 @@
 import pagination from '@crud/Pagination'
 import { mapGetters } from 'vuex'
 import constant from '@/utils/constant'
+import { downloadFile } from '@/utils/index'
 
 const defaultForm = { id: null, name: null, projectTypeId: null, projectDistinguish: null, companyId: null, requirement: null, unitCurrency: null, performanceObjectives: null, quotationPrice: null, performancePrice: null, contractPrice: null, contractPrePrice: null, projectPrice: null, liableUserId: null, liableUserIdList: [], planStartDate: null, planEndDate: null, projectStatus: null, approveStatus: null, remarks: null, createBy: null, createTime: null, updateBy: null, updateTime: null }
 export default {
@@ -551,7 +566,9 @@
       // 报告生成参数
       generateReportParam: {
         loading: false
-      }
+      },
+      // 加载
+      downloadProgressLoading: false
     }
   },
   computed: {
@@ -816,6 +833,21 @@
       }).catch(() => {
         that.$message({ type: 'info', message: '已取消操作' })
       })
+    },
+    // 执行项目进度导出
+    doExportProjectProgress() {
+      const that = this
+      const projects = that.crud.selections.map(p => p.id)
+      if (projects.length > 0) {
+        that.downloadProgressLoading = true
+        that.crud.crudMethod.downloadProjectProgress({ idInList: projects }).then(result => {
+          downloadFile(result, '项目进度导出数据', 'xlsx')
+        }).catch(e => {
+          that.$message.error(e.message)
+        }).finally(() => {
+          that.downloadProgressLoading = false;
+        })
+      }
     }
   }
 }

--
Gitblit v1.9.3