Browse Source

贡献值导出

xialei 1 year ago
parent
commit
51b1f766bd
1 changed files with 8 additions and 9 deletions
  1. 8 9
      src/views/accounts/caiwutongji/contribute/index.vue

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

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