From 9ff7d57765b1eb3704b9425819cdb9c5708e0ab1 Mon Sep 17 00:00:00 2001
From: yangys <y_ys79@sina.com>
Date: 星期四, 14 八月 2025 22:53:32 +0800
Subject: [PATCH] 错误捕获
---
src/views/flowmgr/programexport.vue | 20 ++++++++++++++------
1 files changed, 14 insertions(+), 6 deletions(-)
diff --git a/src/views/flowmgr/programexport.vue b/src/views/flowmgr/programexport.vue
index 0a20af5..2fe94b4 100644
--- a/src/views/flowmgr/programexport.vue
+++ b/src/views/flowmgr/programexport.vue
@@ -1,7 +1,7 @@
<!--
* @Date: 2025-06-20 20:48:17
* @LastEditors: 鏉庡枂(寮�鍙戠粍) lzhe@yxqiche.com
- * @LastEditTime: 2025-08-11 14:55:07
+ * @LastEditTime: 2025-08-11 16:34:15
* @FilePath: /mdmweb/src/views/flowmgr/programexport.vue
-->
<template>
@@ -125,8 +125,6 @@
},
methods: {
tabsClick(tab,event) {
- console.log(this.activeName,'activeName')
- console.log(tab,event);
this.onLoad(this.page, this.query);
},
selectionChange(list) {
@@ -211,10 +209,20 @@
{},
{ids: this.selection.map(item => item.id)},
).then(res => {
- let name = res.headers['content-disposition'].split('filename=')[1]
- console.log(res.headers['content-disposition'].split('filename=')[1]);
- downloadFile(res.data, `${name}`);
+ //console.log('status='+res.status)
+ if(res.status == 200){
+ //console.log(res.data);
+
+ let name = res.headers['content-disposition'].split('filename=')[1]
+ //console.log(res.headers['content-disposition'].split('filename=')[1]);
+ downloadFile(res.data, `${name}`);
+
+ }else{
+ this.$message.error('瀵煎嚭閿欒');
+ console.log(res);
+ }
NProgress.done();
+ this.onLoad(this.page, this.query);
});
});
},
--
Gitblit v1.9.3