From 33b16eb0c1d789475edecdc021538bf7b0b242a0 Mon Sep 17 00:00:00 2001
From: wangting <wangting@vci-tech.com>
Date: 星期三, 25 十二月 2024 16:30:46 +0800
Subject: [PATCH] 修改session过期时的提示,去掉请求时catch里message信息提示,统一处理有提示

---
 Source/plt-web/plt-web-ui/src/router/axios.js                                            |   13 ++++++
 Source/plt-web/plt-web-ui/src/views/modelingMenu/ui/formDefine/index.vue                 |    2 -
 Source/plt-web/plt-web-ui/src/views/wel/workIndex.vue                                    |   11 ++++-
 Source/plt-web/plt-web-ui/src/views/system/department/index.vue                          |    4 -
 Source/plt-web/plt-web-ui/src/views/systemModel/businessModel/index.vue                  |    4 -
 Source/plt-web/plt-web-ui/src/views/modelingMenu/ui/uiDefine/index.vue                   |    2 -
 Source/plt-web/plt-web-ui/src/views/modelingMenu/modeling/linkType/index.vue             |    4 -
 Source/plt-web/plt-web-ui/src/views/modelingMenu/ui/Aciton/index.vue                     |    4 -
 Source/plt-web/plt-web-ui/src/views/wel/adminIndex.vue                                   |    1 
 Source/plt-web/plt-web-ui/src/views/systemModel/mangeModel/index.vue                     |    2 -
 Source/plt-web/plt-web-ui/src/components/actions/base/AddEditDialog.vue                  |    2 -
 Source/plt-web/plt-web-ui/src/components/actions/base/startWorkFlow.vue                  |    3 -
 Source/plt-web/plt-web-ui/src/views/systemModel/systemConfig/index.vue                   |    4 -
 Source/plt-web/plt-web-ui/src/config/iconList.js                                         |    3 -
 Source/plt-web/plt-web-ui/src/views/system/user/index.vue                                |   20 ++-------
 Source/plt-web/plt-web-ui/src/views/modelingMenu/ui/formDefine/components/formDialog.vue |    2 -
 Source/plt-web/plt-web-ui/src/views/modelingMenu/modeling/enumType/index.vue             |    3 -
 17 files changed, 32 insertions(+), 52 deletions(-)

diff --git a/Source/plt-web/plt-web-ui/src/components/actions/base/AddEditDialog.vue b/Source/plt-web/plt-web-ui/src/components/actions/base/AddEditDialog.vue
index 7e62c19..4f1b46f 100644
--- a/Source/plt-web/plt-web-ui/src/components/actions/base/AddEditDialog.vue
+++ b/Source/plt-web/plt-web-ui/src/components/actions/base/AddEditDialog.vue
@@ -161,13 +161,11 @@
               this.form = res.data.obj.data;
               this.loading = false;
             }).catch(error => {
-              this.$message.error(error);
               this.loading = false;
             })
           }
           this.loading = false;
         }).catch(error => {
-          this.$message.error(error);
           this.loading = false;
         });
 
diff --git a/Source/plt-web/plt-web-ui/src/components/actions/base/startWorkFlow.vue b/Source/plt-web/plt-web-ui/src/components/actions/base/startWorkFlow.vue
index f6fe790..60966f7 100644
--- a/Source/plt-web/plt-web-ui/src/components/actions/base/startWorkFlow.vue
+++ b/Source/plt-web/plt-web-ui/src/components/actions/base/startWorkFlow.vue
@@ -184,7 +184,6 @@
 
         this.getProcessNode(data[0].attributes.oid); // 棣栨杩涘叆璋冪敤绗竴涓ā鏉跨殑鎵�鏈夎妭鐐�
       }).catch(err => {
-        this.$message.error(err);
       })
     },
 
@@ -208,7 +207,6 @@
         })
         this.nodeLoading = false;
       }).catch(err => {
-        this.$message.error(err);
       })
     },
 
@@ -245,7 +243,6 @@
           this.$message.error(res.data.obj.error);
         }
       }).catch(err => {
-        this.$message.error(err);
       })
     },
 
diff --git a/Source/plt-web/plt-web-ui/src/config/iconList.js b/Source/plt-web/plt-web-ui/src/config/iconList.js
index 366df8e..1aa4194 100644
--- a/Source/plt-web/plt-web-ui/src/config/iconList.js
+++ b/Source/plt-web/plt-web-ui/src/config/iconList.js
@@ -149,6 +149,5 @@
       "iconfont icon-iframe",
       "iconfont icon-huanyingye",
     ]
-  },
-  ...fontIconList
+  }
 ]
diff --git a/Source/plt-web/plt-web-ui/src/router/axios.js b/Source/plt-web/plt-web-ui/src/router/axios.js
index 7029b39..37a5615 100644
--- a/Source/plt-web/plt-web-ui/src/router/axios.js
+++ b/Source/plt-web/plt-web-ui/src/router/axios.js
@@ -66,7 +66,18 @@
   //濡傛灉鍦ㄧ櫧鍚嶅崟閲屽垯鑷catch閫昏緫澶勭悊
   if (statusWhiteList.includes(status)) return Promise.reject(res);
   //濡傛灉鏄�401鍒欒烦杞埌鐧诲綍椤甸潰
-  if (status === 401) store.dispatch('FedLogOut').then(() => router.push({path: '/login'}));
+  if (status === 401) {
+    store.dispatch('FedLogOut').then(() => router.push({path: '/login'}));
+    if(router.history.current.path!='/login'){
+      Message({
+        message: '浼氳瘽杩囨湡锛岃閲嶆柊鐧诲綍',
+        type: 'error'
+      });
+      return Promise.reject(new Error(message))
+    }else {
+      return Promise.reject()
+    }
+  }
   // 濡傛灉璇锋眰涓洪潪200鍚﹁�呴粯璁ょ粺涓�澶勭悊
   if (status !== 200) {
     Message({
diff --git a/Source/plt-web/plt-web-ui/src/views/modelingMenu/modeling/enumType/index.vue b/Source/plt-web/plt-web-ui/src/views/modelingMenu/modeling/enumType/index.vue
index c841d14..2d5521f 100644
--- a/Source/plt-web/plt-web-ui/src/views/modelingMenu/modeling/enumType/index.vue
+++ b/Source/plt-web/plt-web-ui/src/views/modelingMenu/modeling/enumType/index.vue
@@ -378,7 +378,6 @@
         this.tableData = data;
         this.tableLoading = false;
       }).catch(err => {
-        this.$message.error(err)
       });
     },
 
@@ -694,7 +693,6 @@
         func.downloadFileByBlobHandler(res);
         this.$message.success('瀵煎嚭鎴愬姛');
       }).catch(err => {
-        this.$message.error(err);
       })
     },
 
@@ -704,7 +702,6 @@
         func.downloadFileByBlobHandler(res);
         this.$message.success('涓嬭浇鎴愬姛');
       }).catch(err => {
-        this.$message.error(err);
       })
     },
 
diff --git a/Source/plt-web/plt-web-ui/src/views/modelingMenu/modeling/linkType/index.vue b/Source/plt-web/plt-web-ui/src/views/modelingMenu/modeling/linkType/index.vue
index f775a45..0796999 100644
--- a/Source/plt-web/plt-web-ui/src/views/modelingMenu/modeling/linkType/index.vue
+++ b/Source/plt-web/plt-web-ui/src/views/modelingMenu/modeling/linkType/index.vue
@@ -672,9 +672,7 @@
         const data = res.data.data;
         this.treeData = data;
         this.tableLoading = false;
-      }).catch(err => {
-        this.$message.error(err);
-      });
+      })
     },
 
     // 瀵煎叆
diff --git a/Source/plt-web/plt-web-ui/src/views/modelingMenu/ui/Aciton/index.vue b/Source/plt-web/plt-web-ui/src/views/modelingMenu/ui/Aciton/index.vue
index 2199e65..26189cb 100644
--- a/Source/plt-web/plt-web-ui/src/views/modelingMenu/ui/Aciton/index.vue
+++ b/Source/plt-web/plt-web-ui/src/views/modelingMenu/ui/Aciton/index.vue
@@ -565,9 +565,7 @@
       exportAction(params).then(res => {
         func.downloadFileByBlobHandler(res);
         this.$message.success('瀵煎嚭鎴愬姛');
-      }).catch(err => {
-        this.$message.error(err);
-      })
+      });
     },
 
     // action鍒楄〃琛屽垹闄�
diff --git a/Source/plt-web/plt-web-ui/src/views/modelingMenu/ui/formDefine/components/formDialog.vue b/Source/plt-web/plt-web-ui/src/views/modelingMenu/ui/formDefine/components/formDialog.vue
index eeeb527..0f567a7 100644
--- a/Source/plt-web/plt-web-ui/src/views/modelingMenu/ui/formDefine/components/formDialog.vue
+++ b/Source/plt-web/plt-web-ui/src/views/modelingMenu/ui/formDefine/components/formDialog.vue
@@ -1414,8 +1414,6 @@
         const data = res.data.data;
         this.customAttrData = data;
         this.customAttrLoading = false;
-      }).catch(err => {
-        this.$message.error(err)
       });
     },
 
diff --git a/Source/plt-web/plt-web-ui/src/views/modelingMenu/ui/formDefine/index.vue b/Source/plt-web/plt-web-ui/src/views/modelingMenu/ui/formDefine/index.vue
index bfc38c8..ee25b06 100644
--- a/Source/plt-web/plt-web-ui/src/views/modelingMenu/ui/formDefine/index.vue
+++ b/Source/plt-web/plt-web-ui/src/views/modelingMenu/ui/formDefine/index.vue
@@ -493,8 +493,6 @@
       exportExcel(params).then(res => {
         func.downloadFileByBlobHandler(res);
         this.$message.success('瀵煎嚭鎴愬姛');
-      }).catch(err => {
-        this.$message.error(err);
       });
     },
 
diff --git a/Source/plt-web/plt-web-ui/src/views/modelingMenu/ui/uiDefine/index.vue b/Source/plt-web/plt-web-ui/src/views/modelingMenu/ui/uiDefine/index.vue
index 897c452..112fc0a 100644
--- a/Source/plt-web/plt-web-ui/src/views/modelingMenu/ui/uiDefine/index.vue
+++ b/Source/plt-web/plt-web-ui/src/views/modelingMenu/ui/uiDefine/index.vue
@@ -607,8 +607,6 @@
         func.downloadFileByBlobHandler(res);
         this.$message.success('瀵煎嚭鎴愬姛');
         this.expDialogVisible = false;
-      }).catch(err => {
-        this.$message.error(err);
       });
     },
 
diff --git a/Source/plt-web/plt-web-ui/src/views/system/department/index.vue b/Source/plt-web/plt-web-ui/src/views/system/department/index.vue
index 6f712df..f87b389 100644
--- a/Source/plt-web/plt-web-ui/src/views/system/department/index.vue
+++ b/Source/plt-web/plt-web-ui/src/views/system/department/index.vue
@@ -381,9 +381,7 @@
       download().then(res => {
         func.downloadFileByBlobHandler(res);
         this.$message.success('涓嬭浇鎴愬姛')
-      }).catch(err => {
-        this.$message.error(err);
-      })
+      });
     },
 
     // 瀵煎叆閮ㄩ棬
diff --git a/Source/plt-web/plt-web-ui/src/views/system/user/index.vue b/Source/plt-web/plt-web-ui/src/views/system/user/index.vue
index b856de2..619be75 100644
--- a/Source/plt-web/plt-web-ui/src/views/system/user/index.vue
+++ b/Source/plt-web/plt-web-ui/src/views/system/user/index.vue
@@ -297,9 +297,7 @@
       stopUser(params).then(res => {
         this.$message.success(res.data.obj);
         this.getTableList();
-      }).catch(err => {
-        this.$message.error(err)
-      })
+      });
     },
 
     // 閫夋嫨妗�
@@ -341,9 +339,7 @@
         listRoleByUserOid(userOid).then(res => {
           this.rightRoleData = res.data.data.map(item => item.oid);
         })
-      }).catch(err => {
-        this.$message.error(err)
-      })
+      });
       this.$refs.transfer.visible = true;
     },
 
@@ -356,9 +352,7 @@
       saveRights(params).then(res => {
         this.$message.success(res.data.obj);
         this.getTableList();
-      }).catch(err => {
-        this.$message.error(err)
-      })
+      });
     },
 
     // 璁剧疆瀵嗙爜绛栫暐
@@ -390,9 +384,7 @@
       saveUserPasswordStrateg(params).then(res => {
         this.pwdVisible = false;
         this.$message.success(res.data.obj)
-      }).catch(err => {
-        this.$message.error(err)
-      })
+      });
     },
 
     // 鏂板
@@ -523,9 +515,7 @@
           children: this.departData
         }]
         this.option.column[7].defaultExpandedKeys = ['ALLDept'];
-      }).catch(err => {
-        this.$message.error(err);
-      })
+      });
     },
 
     // 鍒嗛厤閮ㄩ棬鏁版嵁杞崲
diff --git a/Source/plt-web/plt-web-ui/src/views/systemModel/businessModel/index.vue b/Source/plt-web/plt-web-ui/src/views/systemModel/businessModel/index.vue
index 3de7e58..d98046b 100644
--- a/Source/plt-web/plt-web-ui/src/views/systemModel/businessModel/index.vue
+++ b/Source/plt-web/plt-web-ui/src/views/systemModel/businessModel/index.vue
@@ -524,9 +524,7 @@
         func.downloadFileByBlobHandler(res);
         this.createdLoading = false
         this.$message.success('瀵煎嚭鎴愬姛');
-      }).catch(err => {
-        this.$message.error(err);
-      })
+      });
     },
 
     // 瀵煎叆
diff --git a/Source/plt-web/plt-web-ui/src/views/systemModel/mangeModel/index.vue b/Source/plt-web/plt-web-ui/src/views/systemModel/mangeModel/index.vue
index f96e1aa..4625e1c 100644
--- a/Source/plt-web/plt-web-ui/src/views/systemModel/mangeModel/index.vue
+++ b/Source/plt-web/plt-web-ui/src/views/systemModel/mangeModel/index.vue
@@ -418,8 +418,6 @@
       exportFunctionSql({isFunction: true}).then(res => {
         func.downloadFileByBlobHandler(res);
         this.$message.success('瀵煎嚭鎴愬姛');
-      }).catch(err => {
-        this.$message.error(err);
       });
     },
 
diff --git a/Source/plt-web/plt-web-ui/src/views/systemModel/systemConfig/index.vue b/Source/plt-web/plt-web-ui/src/views/systemModel/systemConfig/index.vue
index fdf5ef9..afc4d51 100644
--- a/Source/plt-web/plt-web-ui/src/views/systemModel/systemConfig/index.vue
+++ b/Source/plt-web/plt-web-ui/src/views/systemModel/systemConfig/index.vue
@@ -448,9 +448,7 @@
       exportSysConf(params).then(res => {
         func.downloadFileByBlobHandler(res);
         this.$message.success('瀵煎嚭鎴愬姛');
-      }).catch(err => {
-        this.$message.error(err);
-      })
+      });
     }
   }
 }
diff --git a/Source/plt-web/plt-web-ui/src/views/wel/adminIndex.vue b/Source/plt-web/plt-web-ui/src/views/wel/adminIndex.vue
index 810ee60..b27d105 100644
--- a/Source/plt-web/plt-web-ui/src/views/wel/adminIndex.vue
+++ b/Source/plt-web/plt-web-ui/src/views/wel/adminIndex.vue
@@ -208,7 +208,6 @@
 
         this.loading = false;
       }).catch(error => {
-        this.$message.error(error);
         this.loading = false;
       });
     }
diff --git a/Source/plt-web/plt-web-ui/src/views/wel/workIndex.vue b/Source/plt-web/plt-web-ui/src/views/wel/workIndex.vue
index 59352de..380242b 100644
--- a/Source/plt-web/plt-web-ui/src/views/wel/workIndex.vue
+++ b/Source/plt-web/plt-web-ui/src/views/wel/workIndex.vue
@@ -9,7 +9,6 @@
               <icon-show :name="item.icon" style="display: inline-block"></icon-show>
             </div>
             <component :height="height*item.ratio" :is="item.module" :key="item.module" :title="item.title" :icon="item.icon"></component>
-
           </el-card>
         </div>
       </el-col>
@@ -50,7 +49,15 @@
             ratio:1.00
           }];
         }
-        this.loading = false;
+      }).catch(error=>{
+        this.homeData = [{
+          orderNum:1,
+          module: "UndoTaskPortlet",
+          title: "寰呭姙娴佺▼浠诲姟",
+          num:24,
+          icon: "",
+          ratio:1.00
+        }];
       });
     }
   }

--
Gitblit v1.9.3