Ver código fonte

贡献值导出

xialei 1 ano atrás
pai
commit
51b1f766bd

+ 8 - 9
src/views/accounts/caiwutongji/contribute/index.vue

@@ -44,9 +44,8 @@
44 44
 
45 45
                 <div class="bottom-button">
46 46
                   <el-button size="small" @click="reset" style="width: 100px; margin-top: 20px; border: 1px solid; " >重置</el-button>
47
-                  <!-- <el-button type="primary" size="small" @click="exportSearchResult" style="width: 100px; margin-top: 20px;">导出</el-button> -->
48
-
49 47
                   <el-button type="primary" size="small" @click="getList(1)" style="width: 100px; margin-top: 20px;">查询</el-button>
48
+                  <el-button type="primary" size="small" @click="exportSearchResult" style="width: 100px; margin-top: 20px;">导出</el-button>
50 49
                 </div>
51 50
             </div>
52 51
 
@@ -232,23 +231,23 @@ export default {
232 231
             page: 1,
233 232
             limit: 20,
234 233
             type: "",
235
-            pm: ""
234
+            pm: "",
235
+            is_excel: 0,
236 236
           }
237 237
         this.getList();
238 238
       },
239 239
       exportSearchResult() {
240
-        RewardExcelApi(this.paramsData).then(res => {
240
+        this.tableFrom.is_excel = 1;
241
+        getContributeCountApi(this.tableFrom).then(res => {
241 242
           console.log( res.data)
242 243
           console.log( res.data.path)
244
+          this.tableFrom.is_excel = 0;
245
+          this.$message.success('导出成功')
243 246
           window.open( res.data.path)
244
-          // window.open(SettingMer.https + `/excel/download/0?token=` + getToken()+`&path=` + res.data.path)
245 247
         }).catch((res) => {
246
-
248
+          this.$message.error('导出失败');
247 249
         })
248 250
       },
249
-
250
-
251
-
252 251
         // 表格某一行添加特定的样式
253 252
         addTdClass(val) {
254 253
             if (val.row.status > 0 && val.row.paid == 1) {