Parcourir la source

修改导出功能

silent il y a 4 ans
Parent
commit
22bacb3aa7
1 fichiers modifiés avec 12 ajouts et 1 suppressions
  1. 12 1
      src/views/sing_active/activeproductrecord.vue

+ 12 - 1
src/views/sing_active/activeproductrecord.vue

@@ -70,7 +70,8 @@
           <el-button type="primary" :size="size" icon="el-icon-search" slot="append"
                      @click="searchStateChange"></el-button>
         </el-input>
-        <el-button type="primary" :size="size" icon="el-icon-top" @click="generateListAndDownload">生成列表</el-button>
+        <el-button type="primary" :size="size" icon="el-icon-top" @click="generateListAndDownload">生成列表[后端]</el-button>
+        <el-button type="primary" :size="size" icon="el-icon-top" @click="generateListAndDownloadOfWeb">生成列表[前端]</el-button>
         <!--        <el-button type="primary" :size="size">导出已生成列表</el-button>-->
       </template>
       <template slot="menuLeft">
@@ -634,6 +635,16 @@ export default {
         this.loading = false;
       });
     },
+    generateListAndDownloadOfWeb() {
+      const filterArray = ["数据统计"];
+      this.$Export.excel({
+        title: `活动作品数据导出-${moment().format("yyyy-MM-DD HH:mm:ss")}`,
+        columns: this.option.column.filter(ele=>{
+          return filterArray.indexOf(ele.label)===-1;
+        }),
+        data: this.selectionList.length!==0?this.selectionList:this.data
+      });
+    }
   }
 };
 </script>