瀏覽代碼

完成 导出excel 请求

keyman1995 6 年之前
父節點
當前提交
5e7f838570
共有 2 個文件被更改,包括 8 次插入0 次删除
  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 查看文件

53
         <div class="flex-item flex-h" style="margin-top: 20px;">
53
         <div class="flex-item flex-h" style="margin-top: 20px;">
54
           <el-button size="mini" type="success" @click='addVIP'>新增VIP</el-button>
54
           <el-button size="mini" type="success" @click='addVIP'>新增VIP</el-button>
55
           <el-button size="mini" type="success" @click='activateVip'>激活VIP</el-button>
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
         </div>
57
         </div>
57
       </div>
58
       </div>
58
     </div>
59
     </div>
178
     activateVip () {
179
     activateVip () {
179
       this.$router.push({ name: 'activateVip' })
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
 </script>
187
 </script>

+ 4
- 0
src/util/api.js 查看文件

649
       method: 'post',
649
       method: 'post',
650
       url: `${baseUrl}${common}/card/:id/to/:users`
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
   couponManager: {
657
   couponManager: {
654
     couponList: {
658
     couponList: {