From 4638422d5a6b8146ec0f8ddd1bf17160330a2049 Mon Sep 17 00:00:00 2001
From: wangyanshen <3154583358@qq.com>
Date: 星期三, 11 一月 2023 09:27:50 +0800
Subject: [PATCH] 添加故障、趋势模块

---
 src/components/GlobalHeader/GlobalHeader.vue |   28 ++++++++++++++++------------
 1 files changed, 16 insertions(+), 12 deletions(-)

diff --git a/src/components/GlobalHeader/GlobalHeader.vue b/src/components/GlobalHeader/GlobalHeader.vue
index f209ab2..bea3757 100644
--- a/src/components/GlobalHeader/GlobalHeader.vue
+++ b/src/components/GlobalHeader/GlobalHeader.vue
@@ -116,7 +116,7 @@
     },
   },
   methods: {
-    ...mapActions(["Logout","MenuChange", "SetModelSelectKeys"]),
+    ...mapActions(["Logout", "MenuChange", "SetModelSelectKeys"]),
     switchApp(appCode) {
       const applicationData = this.userInfo.apps.filter(
         (item) => item.code === appCode
@@ -124,13 +124,13 @@
       this.MenuChange(applicationData[0]).then((res) => {});
     },
     handleLogout() {
-      this.$confirm({
-        title: "鎻愮ず",
-        content: "鐪熺殑瑕佹敞閿�鐧诲綍鍚� ?",
-        okText: "纭畾",
-        cancelText: "鍙栨秷",
-        onOk: () => {
-          return this.Logout({})
+      this.$confirm("鐪熺殑瑕佹敞閿�鐧诲綍鍚� ?", "鎻愮ず", {
+        confirmButtonText: "纭畾",
+        cancelButtonText: "鍙栨秷",
+        type: "warning",
+      })
+        .then(() => {
+          this.Logout({})
             .then(() => {
               window.location.reload();
               setTimeout(() => {}, 16);
@@ -141,9 +141,13 @@
                 description: err.message,
               });
             });
-        },
-        onCancel() {},
-      });
+        })
+        .catch((err) => {
+          this.$message.error({
+            title: "閿欒",
+            description: err.message,
+          });
+        });
     },
     toggle() {
       this.$emit("toggle");
@@ -154,7 +158,7 @@
 </script>
 
 <style  scoped>
-.headerbox{
+.headerbox {
   display: flex;
   justify-content: space-between;
 }

--
Gitblit v1.9.3