Browse Source

完成 导出excel 请求

keyman1995 6 years ago
parent
commit
5e7f838570
2 changed files with 8 additions and 0 deletions
  1. 4
    0
      src/pages/system/cardAndCouponManager/vipManager/index.vue
  2. 4
    0
      src/util/api.js

+ 4
- 0
src/pages/system/cardAndCouponManager/vipManager/index.vue View File

@@ -53,6 +53,7 @@
53 53
         <div class="flex-item flex-h" style="margin-top: 20px;">
54 54
           <el-button size="mini" type="success" @click='addVIP'>新增VIP</el-button>
55 55
           <el-button size="mini" type="success" @click='activateVip'>激活VIP</el-button>
56
+          <el-button size="mini" type="warning" @click='exportExcel'>导出Excel</el-button>
56 57
         </div>
57 58
       </div>
58 59
     </div>
@@ -178,6 +179,9 @@ export default {
178 179
     activateVip () {
179 180
       this.$router.push({ name: 'activateVip' })
180 181
     },
182
+    exportExcel () {
183
+      window.open(`${this.toolClass.ReplaceOrg(this.$api.cardManager.vipcardExcel.url)}?token=${localStorage.getItem('JWT')}&cardNo=${this.$data.postData.cardNo}&sellerName=${this.$data.postData.sellerName}&userName=${this.$data.postData.userName}&caseid=${this.CaseId === 'all' ? '' : this.CaseId}`, '_blank')
184
+    }
181 185
   }
182 186
 }
183 187
 </script>

+ 4
- 0
src/util/api.js View File

@@ -649,6 +649,10 @@ const $api = {
649 649
       method: 'post',
650 650
       url: `${baseUrl}${common}/card/:id/to/:users`
651 651
     },
652
+    vipcardExcel: {
653
+      method: 'get',
654
+      url: `${baseUrl}${common}/vipcard/excel`
655
+    },
652 656
   },
653 657
   couponManager: {
654 658
     couponList: {