zwq 2 жил өмнө
parent
commit
1c31ded8d6

+ 4 - 3
nngkxxdp/src/main/resources/static/naqwzsjtj/naqwzsjtj/src/App.vue

@@ -1,12 +1,13 @@
 <template>
 <template>
     <div id="app">
     <div id="app">
-        <router-view></router-view>
+        <keep-alive>
+            <router-view/>
+        </keep-alive>
     </div>
     </div>
 </template>
 </template>
 <script>
 <script>
-
     export default {
     export default {
-        name: 'App',
+        name: 'App'
     }
     }
 </script>
 </script>
 <style lang="less">
 <style lang="less">

+ 27 - 25
nngkxxdp/src/main/resources/static/naqwzsjtj/naqwzsjtj/src/layout/components/Navbar.vue

@@ -3,28 +3,21 @@
     <hamburger id="hamburger-container" :is-active="sidebar.opened" class="hamburger-container" @toggleClick="toggleSideBar" />
     <hamburger id="hamburger-container" :is-active="sidebar.opened" class="hamburger-container" @toggleClick="toggleSideBar" />
     <breadcrumb id="breadcrumb-container" class="breadcrumb-container" />
     <breadcrumb id="breadcrumb-container" class="breadcrumb-container" />
     <div class="right-menu">
     <div class="right-menu">
-      <!-- <template v-if="device!=='mobile'"></template> -->
-      <div class="right-menu-item">{{ this.username }}</div>
-      <el-dropdown class="avatar-container right-menu-item hover-effect" trigger="click">
-        <div class="avatar-wrapper">
-          <div style="font-size: 30px">
-            <i class="el-icon-user"></i>
-          </div>
-          <i class="el-icon-caret-bottom" />
+      <div class="right-menu-item">
+        <div style="font-size: 23px;display: flex;align-items: center;justify-content: center;">
+          <span style="color: #24B0FE;font-size: 15px;margin-right: 28px;cursor: pointer;" @click="$router.go(0)">刷新当前</span>
+          <span>
+            <i class="el-icon-user" style="font-size: 21px; border-radius: 50%;border: 2px solid;padding: 1px;"></i>
+          </span>
+          <span style="font-size: 15px;margin-left: 6px;margin-right: 13px;">你好,{{ this.username }}</span>
+          <i class="el-icon-setting" style="cursor: pointer;" @click="seting('modifypwd')"></i>
+          <span style="color: #24B0FE;font-size: 15px;margin-left: 13px;margin-right: 13px;cursor: pointer;" @click="seting('modifypwd')">账户设置</span>
+          <span style="font-size: 15px;margin-right: 13px;">|</span>
+          <span class="hand" style="padding-right: 16px;font-size: 15px;" @click="logout">退出</span>
         </div>
         </div>
-        <el-dropdown-menu slot="dropdown">
-          <el-dropdown-item @click.native="seting('modifypwd')">
-            <span style="display:block;">修改密码</span>
-          </el-dropdown-item>
-          <router-link to="/">
-            <el-dropdown-item>首页</el-dropdown-item>
-          </router-link>
-          <el-dropdown-item divided @click.native="logout">
-            <span style="display:block;">注销</span>
-          </el-dropdown-item>
-        </el-dropdown-menu>
-      </el-dropdown>
+      </div>
     </div>
     </div>
+    
     <!-- 修改密码 -->
     <!-- 修改密码 -->
     <el-dialog width="80%" :visible.sync="modifyPwdDialog">
     <el-dialog width="80%" :visible.sync="modifyPwdDialog">
         <div slot="title">
         <div slot="title">
@@ -86,7 +79,7 @@ export default {
       gitUrl: '#',
       gitUrl: '#',
       username: '',
       username: '',
       modifyPwdDialog: false,
       modifyPwdDialog: false,
-	    modifyPwdForm: {
+     modifyPwdForm: {
         pwd: '',
         pwd: '',
         newPwd: '',
         newPwd: '',
         sureNewPwd: '',
         sureNewPwd: '',
@@ -137,15 +130,15 @@ export default {
         closeOnClickModal: false,
         closeOnClickModal: false,
         cancelButtonText: '取消',
         cancelButtonText: '取消',
         type: 'warning' 
         type: 'warning' 
-	  }).then(() => {
+    }).then(() => {
         this.$router.push(`/login?redirect=${this.$route.fullPath}`)
         this.$router.push(`/login?redirect=${this.$route.fullPath}`)
         sessionStorage.removeItem('utoken')
         sessionStorage.removeItem('utoken')
         this.$message({
         this.$message({
           type: 'success',
           type: 'success',
           message: '安全退出'
           message: '安全退出'
         });
         });
-	  }).catch(() => { 
-	    this.$message({
+    }).catch(() => {
+    this.$message({
         type: 'info',
         type: 'info',
         message: '取消退出'
         message: '取消退出'
         });
         });
@@ -208,7 +201,7 @@ export default {
               this.$message.error('密码修改失败')
               this.$message.error('密码修改失败')
               this.modifyPwdDialog = false
               this.modifyPwdDialog = false
             }}
             }}
-		  ).catch(() => {
+      ).catch(() => {
               this.$message.error('密码修改失败')
               this.$message.error('密码修改失败')
           })
           })
         }
         }
@@ -300,4 +293,13 @@ export default {
     }
     }
   }
   }
 }
 }
+
+.hand {
+  cursor: pointer;
+}
+
+.hand:hover {
+  color:#24B0FE;
+}
+
 </style>
 </style>