From 04630361731b8efc3b48c29cd9d7877f5a22e575 Mon Sep 17 00:00:00 2001
From: lin <sbla5888@163.com>
Date: Wed, 03 Apr 2024 09:12:16 +0800
Subject: [PATCH] 议事导出

---
 src/views/article/discussionManage.vue          |   14 +++++++-------
 src/views/article/components/deitDiscussion.vue |   21 ++++++---------------
 2 files changed, 13 insertions(+), 22 deletions(-)

diff --git a/src/views/article/components/deitDiscussion.vue b/src/views/article/components/deitDiscussion.vue
index e30c9a1..cfa2392 100644
--- a/src/views/article/components/deitDiscussion.vue
+++ b/src/views/article/components/deitDiscussion.vue
@@ -423,23 +423,14 @@
             ...this.query
           }
           data = Qs.stringify(data)
-          if (this.type == 0 && this.newData.articleType === 4) {
-            exportBlob(
-              `/api/blade-userTopics/userTopics/exportDataIndex?${this.website.tokenHeader}=${getToken()}&` + data
-            ).then(
+          exportBlob(
+              `/api/blade-userTopics/userTopics/exportUser?${this.website.tokenHeader}=${getToken()}&` + data)
+            .then(
               res => {
-                downloadXls(res.data, `投票统计${dateNow()}.xlsx`)
+                downloadXls(res.data, `投票人员${dateNow()}.xlsx`)
                 NProgress.done()
               })
-          } else {
-            exportBlob(
-                `/api/blade-userTopics/userTopics/exportUser?${this.website.tokenHeader}=${getToken()}&` + data)
-              .then(
-                res => {
-                  downloadXls(res.data, `投票人员${dateNow()}.xlsx`)
-                  NProgress.done()
-                })
-          }
+
         })
       },
 
@@ -472,7 +463,7 @@
         done()
       },
 
-      openUser(row, type = 0) {
+      openUser(row, type) {
         this.type = type
         this.popupTableUserShow = true
         this.query = {}
diff --git a/src/views/article/discussionManage.vue b/src/views/article/discussionManage.vue
index c3c1f89..2415cd1 100644
--- a/src/views/article/discussionManage.vue
+++ b/src/views/article/discussionManage.vue
@@ -20,13 +20,13 @@
         </el-button>
 
         <el-button icon="el-icon-user" :size="size" v-if="row.articleType != 4" :type="type"
-          @click.stop="openUserPopup(row, 1)">
+          @click.stop="openUserPopup(row, 0)">
           参与用户
         </el-button>
 
         <el-button icon="el-icon-user" v-if="row.articleType == 4" :size="size" :type="type"
           @click.stop="handleExport(row)">
-          导出用户
+          导出投票结果
         </el-button>
 
         <el-button v-if="row.publish == '1'" icon="el-icon-close" :size="size" :type="type" @click.stop="updateFb(row)">
@@ -510,7 +510,7 @@
     },
     methods: {
       handleExport(row) {
-        this.$confirm("是否导出投票人员数据?", "提示", {
+        this.$confirm("是否导出投票结果数据?", "提示", {
           confirmButtonText: "确定",
           cancelButtonText: "取消",
           type: "warning"
@@ -527,7 +527,7 @@
               `/api/blade-userTopics/userTopics/exportDataIndex?${this.website.tokenHeader}=${getToken()}&` + data)
             .then(
               res => {
-                downloadXls(res.data, `投票人员${dateNow()}.xlsx`)
+                downloadXls(res.data, `投票结果${dateNow()}.xlsx`)
                 NProgress.done()
               })
         })
@@ -557,8 +557,8 @@
         })
       },
 
-      openUserPopup(row) {
-        this.$refs.DeitDiscussion.openUser(row)
+      openUserPopup(row, type) {
+        this.$refs.DeitDiscussion.openUser(row, type)
       },
 
       openDilog(row, type) {
@@ -844,4 +844,4 @@
   .avue-upload__icon {
     line-height: 6;
   }
-</style>
\ No newline at end of file
+</style>

--
Gitblit v1.9.3