Browse Source

Merge remote-tracking branch 'origin/master'

ys321973351 1 year ago
parent
commit
c4b933fe13
2 changed files with 21 additions and 22 deletions
  1. 18 18
      itdmWeb/src/components/tools/UserMenu.vue
  2. 3 4
      itdmWeb/src/views/user/firstIndex.vue

+ 18 - 18
itdmWeb/src/components/tools/UserMenu.vue

@@ -178,25 +178,25 @@
       },
       handleLogout() {
         const that = this
-
-        this.$confirm({
-          title: '提示',
-          content: '真的要注销登录吗 ?',
-          onOk() {
-            return that.Logout({}).then(() => {
-              // update-begin author:scott date:20211223 for:【JTC-198】退出登录体验不好
-              //that.$router.push({ path: '/user/login' });
-              window.location.reload()
-              // update-end author:scott date:20211223 for:【JTC-198】退出登录体验不好
-            }).catch(err => {
-              that.$message.error({
-                title: '错误',
-                description: err.message
-              })
+        this.$confirm('真的要退出登录吗?', '提示', {
+          confirmButtonText: '确定',
+          cancelButtonText: '取消',
+          type: 'warning'
+        }).then(() => {
+          return that.Logout({}).then(() => {
+            // update-begin author:scott date:20211223 for:【JTC-198】退出登录体验不好
+            that.$router.push({ path: '/user/login' });
+            this.$router.push({ name: 'firstIndex' })
+            window.location.reload()
+            // update-end author:scott date:20211223 for:【JTC-198】退出登录体验不好
+          }).catch(err => {
+            that.$message.error({
+              title: '错误',
+              description: err.message
             })
-          },
-          onCancel() {
-          },
+          })
+        }).catch(() => {
+
         });
       },
       updatePassword(){

+ 3 - 4
itdmWeb/src/views/user/firstIndex.vue

@@ -7,7 +7,7 @@
       <div class="common-system system-iTDM" ref="systemiTDM" @click="chooseSystem('/dashboard/analysis')"></div>
     </div>
 </template>
-  
+
   <script>
   export default {
     name: '',
@@ -22,7 +22,7 @@
       // 设置定时器--因为初始执行方法时img没有加载完,所以获取不到高度;定时一段时间等img加载之后再执行
       this.timer = setTimeout(() => {
         this.setSystemStyle()
-      }, 100)
+      }, 1000)
       // this.$nextTick(() => {
       // })
       window.addEventListener('resize', this.setSystemStyle)
@@ -58,7 +58,7 @@
     }
   }
   </script>
-  
+
   <style lang="scss">
   .chooseSystem-container{
     width: 100%;
@@ -98,4 +98,3 @@
     }
   }
   </style>
-