Просмотр исходного кода

外部质量评价计划组件导出bug修复

shenqilong 4 месяцев назад
Родитель
Сommit
4059d56f5b
1 измененных файлов с 9 добавлено и 7 удалено
  1. 9 7
      src/views/component/sjzlpjjhx/sjzlpjjhx.vue

+ 9 - 7
src/views/component/sjzlpjjhx/sjzlpjjhx.vue

@@ -390,6 +390,7 @@ export default {
           this.$confirm('选择导出类型', '提示', {
             confirmButtonText: '导出全部数据',
             cancelButtonText: '导出模板',
+            distinguishCancelAndClose: true,
             type: 'success'
           })
             .then(() => {
@@ -406,7 +407,6 @@ export default {
                     userNames.push(result?.userName)
                   }
                   i.canYuRenYuan = userNames.join(',')
-                  console.log(i.canYuRenYuan, 'qqqqqqqqq')
                 }
               }
 
@@ -416,12 +416,14 @@ export default {
                 '参加外部质量评价活动计划项目详情'
               )
             })
-            .catch(() => {
-              this.handleExport(
-                this.getColumns(),
-                [],
-                '参加外部质量评价活动计划项目详情(模板)'
-              )
+            .catch((action) => {
+              if (action === 'cancel') {
+                this.handleExport(
+                  this.getColumns(),
+                  [],
+                  '参加外部质量评价活动计划项目详情(模板)'
+                )
+              }
             })
 
           break