From 6afb98b81fa4b4b3223d53d42a891fb89862d38b Mon Sep 17 00:00:00 2001
From: Tcsm <1377977403@qq.com>
Date: 星期一, 14 八月 2023 16:36:29 +0800
Subject: [PATCH] 新增家谱图,完善各模块新增时的电子文件上传功能,在上传期间显示正在上传

---
 ruoyi-ui/src/views/homeRoot/index.vue |   33 ++++++++++++++++++++++++++-------
 1 files changed, 26 insertions(+), 7 deletions(-)

diff --git a/ruoyi-ui/src/views/homeRoot/index.vue b/ruoyi-ui/src/views/homeRoot/index.vue
index 2d294c1..c664157 100644
--- a/ruoyi-ui/src/views/homeRoot/index.vue
+++ b/ruoyi-ui/src/views/homeRoot/index.vue
@@ -1,7 +1,7 @@
 <template>
   <div class="app-container">
     <div class="container">
-      <h1 style="font-size:21px;padding-top:30px">鏃╀笂濂斤紒
+      <h1 style="font-size: 21px;">{{ greeting +'锛�' + user.userName }}
       <el-dropdown style="float:right">
         <span class="el-dropdown-link">
           <img src="../../assets/images/Frame.png">
@@ -188,11 +188,14 @@
 <script>
 
 import {listRoot} from "@/api/root/index";
+import { getUserProfile } from "@/api/system/user";
 
 export default {
   name: "index",
   data(){
     return{
+      user: {},
+      greeting: "",
       imageSrc: require('../../assets/images/Group 407.png') ,
       dropdownList: [
         { name: '鍙樉绀虹涓�浠�', src: 'Group 407.png' },
@@ -301,10 +304,8 @@
   },
   created() {
 
-    // this.getCateInfor()
-    // for (let i = 0; i < this.contactList.length; i++) {
-    //   this.formDat[i] = this.contactList[i];
-    // }
+    this.setGreeting();
+    this.getUser();
   },
   mounted() {
      this.getList(1);
@@ -331,8 +332,6 @@
       }
     },
     generation_1(){
-
-
     //  alert(127)
       // this.getList(1)
             listRoot(1).then(response => {
@@ -423,7 +422,27 @@
         }
       );
     },
+    setGreeting() {
+      const currentTime = new Date();
+      const currentHour = currentTime.getHours();
 
+      if (currentHour < 12) {
+        this.greeting = "鏃╀笂濂�";
+      } else if (currentHour < 14) {
+        this.greeting = "涓崍濂�";
+      } else if (currentHour < 18) {
+        this.greeting = "涓嬪崍濂�";
+      } else {
+        this.greeting = "鏅氫笂濂�";
+      }
+    },
+
+    getUser() {
+      getUserProfile().then(response => {
+        this.user = response.data;
+
+      });
+    }
   }
 }
 </script>

--
Gitblit v1.9.1