zhuj123456 před 2 týdny
rodič
revize
d402d3ab1e

+ 40 - 33
gw-ui/src/frontLayout/systemHeader.vue

@@ -1,16 +1,20 @@
 <template>
   <div id="systemHeader">
     <div id="systemInformation">
-      <img class="logoImg" src="@/assets/thlogo.png" alt="">
+      <img class="logoImg" src="@/assets/thlogo.png" alt="" />
       <span>太湖流域河湖管理系统</span>
     </div>
     <div id="systemMenuContainer">
-      <systemMenu @addSystemMenuView='menuItemClick'></systemMenu>
+      <systemMenu @addSystemMenuView="menuItemClick"></systemMenu>
     </div>
     <div class="user-area">
-      <el-dropdown @command="handleCommand" class="avatar-container right-menu-item hover-effect" trigger="hover">
+      <el-dropdown
+        @command="handleCommand"
+        class="avatar-container right-menu-item hover-effect"
+        trigger="hover"
+      >
         <div class="avatar-wrapper">
-          <img :src="userStore.avatar" class="user-avatar"/>
+          <img :src="userStore.avatar" class="user-avatar" />
           <span class="user-nickname"> {{ userStore.nickName }} </span>
         </div>
         <template #dropdown>
@@ -32,47 +36,48 @@
 </template>
 
 <script setup>
-import {onMounted, ref} from 'vue'
-import {useRouter} from 'vue-router'
-import Cookies from 'js-cookie'
-import systemMenu from './systemMenuBar.vue'
-import useUserStore from '@/store/modules/user'
-import {ElMessageBox} from "element-plus";
-
-const router = useRouter()
-const userStore = useUserStore()
-const name = ref('')
-const emit = defineEmits(['addSystemMenuView'])
+import { onMounted, ref } from "vue";
+import { useRouter } from "vue-router";
+import Cookies from "js-cookie";
+import systemMenu from "./systemMenuBar.vue";
+import useUserStore from "@/store/modules/user";
+import { ElMessageBox } from "element-plus";
+
+const router = useRouter();
+const userStore = useUserStore();
+const name = ref("");
+const emit = defineEmits(["addSystemMenuView"]);
 const menuItemClick = (menuItem) => {
-  emit('addSystemMenuView', {viewItem: menuItem.viewItem})
-}
+  emit("addSystemMenuView", { viewItem: menuItem.viewItem });
+};
 
 function handleCommand(command) {
   switch (command) {
     case "logout":
-      logout()
-      break
+      logout();
+      break;
     default:
-      break
+      break;
   }
 }
 
 function logout() {
-  ElMessageBox.confirm('确定注销并退出系统吗?', '提示', {
-    confirmButtonText: '确定',
-    cancelButtonText: '取消',
-    type: 'warning'
-  }).then(() => {
-    userStore.logOut().then(() => {
-      location.href = '/index'
-    })
-  }).catch(() => {
+  ElMessageBox.confirm("确定注销并退出系统吗?", "提示", {
+    confirmButtonText: "确定",
+    cancelButtonText: "取消",
+    type: "warning",
   })
+    .then(() => {
+      userStore.logOut().then(() => {
+        location.href = "/index";
+      });
+    })
+    .catch(() => {});
 }
 
 onMounted(() => {
-  if (Cookies.get('isLogin') === 'true') name.value = Cookies.get('name')
-})
+  if (Cookies.get("isLogin") === "true") name.value = Cookies.get("name");
+});
 </script>
 
 <style lang="scss" scoped>
@@ -83,7 +88,7 @@ onMounted(() => {
   display: flex;
   align-items: center;
   color: #1a3a5c;
-  box-shadow: 0 1px 6px rgba(0, 0, 0, .06);
+  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.06);
   position: relative;
   z-index: 500;
   border-bottom: 2px solid #b8d8f0;
@@ -153,7 +158,6 @@ onMounted(() => {
       }
     }
   }
-
 }
 
 #systemInformation {
@@ -166,6 +170,9 @@ onMounted(() => {
   font-size: 17px;
   font-weight: 600;
   color: #0d4b80;
+  span {
+    font-size: 24px;
+  }
 }
 
 .logoImg {

+ 7 - 4
gw-ui/src/frontLayout/systemMenuBar.vue

@@ -273,8 +273,9 @@ const onClick = (item) => {
     background-color 0.2s,
     color 0.2s;
   color: #3a5f80;
-  font-size: 13px;
-  font-weight: 500;
+  font-size: 16px;
+  line-height: 24px;
+  font-weight: 600;
   white-space: nowrap;
   user-select: none;
 }
@@ -309,7 +310,8 @@ const onClick = (item) => {
   min-width: 100px;
 }
 .dropdown-title {
-  font-size: 14px;
+  font-size: 16px;
+  line-height: 24px;
   font-weight: 600;
   color: #0d4b80;
   padding: 5px 0;
@@ -318,7 +320,8 @@ const onClick = (item) => {
   cursor: pointer;
 }
 .dropdown-link {
-  font-size: 13px;
+  font-size: 14px;
+  line-height: 21px;
   color: #5a7a95;
   padding: 5px 4px;
   cursor: pointer;