Browse Source

导出提示

zhangdan 4 years ago
parent
commit
8fa7aa768c
2 changed files with 30 additions and 10 deletions
  1. 17 5
      src/views/market/winingRecord.vue
  2. 13 5
      src/views/userInfo/userManageList.vue

+ 17 - 5
src/views/market/winingRecord.vue

@@ -276,11 +276,23 @@ export default {
       if (moment(params.endDate).diff(moment(params.beginDate), 'months', true) > 3) {
         this.$message.error('单次最多只能导出3个月的数据,请缩小查询区间后再进行导出!')
       }
-      this.loading = true
-      exportLuckyDrawWin(params).then(res => {
-        this.loading = false
-        this.download(res)
+      this.$confirm({
+        title: '提示',
+        content: '导出过程可能需要一段时间,且导出期间不可进行其他操作,确认要导出吗?',
+        onOk: () => {
+          this.loading = true
+          exportLuckyDrawWin(params).then(res => {
+            this.loading = false
+            this.download(res)
+          })
+        },
+        onCancel () {}
       })
+      // this.loading = true
+      // exportLuckyDrawWin(params).then(res => {
+      //   this.loading = false
+      //   this.download(res)
+      // })
     },
     download (data) {
       if (!data) {
@@ -292,7 +304,7 @@ export default {
       link.href = url
       // const a = moment().format('YYYY-MM-DD')
       const a = moment(this.queryParam.beginDate).format('LL') + '-' + moment(this.queryParam.endDate).format('LL')
-	  console.log(a)
+      console.log(a)
       const fname = a + '中奖记录表'
       link.setAttribute('download', fname + '.xlsx')
       document.body.appendChild(link)

+ 13 - 5
src/views/userInfo/userManageList.vue

@@ -398,11 +398,19 @@ export default {
         this.$message.error('请先选择需要导出的注册时间区间或最后投递时间区间再进行导出(3个月以内)!')
         return
       }
-      this.loading = true
-      customeExport(params).then(res => {
-        this.loading = false
-        this.download(res)
-      })
+	  this.$confirm({
+	    title: '提示',
+	    content: '导出过程可能需要一段时间,且导出期间不可进行其他操作,确认要导出吗?',
+	    onOk: () => {
+	  		this.loading = true
+	  		customeExport(params).then(res => {
+	  		  this.loading = false
+	  		  this.download(res)
+	  		})
+	    },
+	    onCancel () {
+        }
+	  })
     },
     download (data) {
       if (!data) {