Bladeren bron

fix:分析报告下载弹窗确认框样式不正确,改为回调处理

zhangsiya 1 jaar geleden
bovenliggende
commit
2fc7241e6b

+ 1 - 12
apps/bigmember_pc/src/views/analysisReport/components/ReportDownloadDialog.vue

@@ -160,18 +160,7 @@ export default {
       })
     },
     showConfirmDialog () {
-      const _this = this
-      this.$confirm('报告将于10分钟内发送至您的邮箱内,您也可前往“资产-报告下载记录”查看详情。', '报告下载成功', {
-        confirmButtonText: '返回',
-        cancelButtonText: '查看下载记录',
-        center: true,
-        showClose: false,
-        customClass: 'download-message-tip btn-reverse',
-      }).then(() => {
-        _this.options.visible = false
-      }).catch(() => {
-        _this.$router.push('/report/download_record?active=record')
-      })
+      this.$emit('successConfirm')
     },
     // 查看更多
     viewMore () {

+ 27 - 1
apps/bigmember_pc/src/views/analysisReport/index.vue

@@ -49,6 +49,7 @@
     <report-download-dialog
       v-if="downloadDialogConfig.visible"
       :options.sync="downloadDialogConfig"
+      @successConfirm="downloadReportSuccess"
     ></report-download-dialog>
   </div>
 </template>
@@ -98,7 +99,8 @@ export default {
       downloadDialogConfig: {
         visible: false,
         totalList: [],
-        sid: ''
+        sid: '',
+        tab: ''
       }
     }
   },
@@ -299,6 +301,30 @@ export default {
     downloadReport (options) {
       Object.assign(this.downloadDialogConfig, options)
       this.downloadDialogConfig.visible = true
+    },
+    downloadReportSuccess () {
+      const _this = this
+      this.dialogConfig = Object.assign(
+        {},
+        {
+          title: '报告下载成功',
+          messageInfo:
+            '<p>报告将于10分钟内发送至您的邮箱内,您也可前往“资产-报告下载记录”查看详情。</p>',
+          confirmButtonText: '返回',
+          cancelButtonText: '查看下载记录',
+          showCancelButton: true,
+          btnMiddle: false,
+          confirmCallBack: () => {
+            _this.downloadDialogConfig.visible = false
+          },
+          cancelCallBack: () => {
+            _this.downloadDialogConfig.visible = false
+            _this.$router.push('/report/download_record')
+
+          }
+        }
+      )
+      this.showConfirm = true
     }
   }
 }