qymljy 8 kuukautta sitten
vanhempi
commit
abffaa68ce

+ 11 - 3
src/HManagement/serviceDataScreen/index.vue

@@ -3,7 +3,7 @@
     <div style="display: flex;justify-content: space-between">
       <div></div>
       <div class="time-style">
-        {{nowTime}}
+
       </div>
     </div>
     <fullScreen ref="fullRef" class="inline-16" domId="fullScreen" v-show="false" @backFull="backFull"></fullScreen>
@@ -18,7 +18,9 @@ export default {
   data(){
     return {
       timer: "", // 定义一个定时器
-      nowTime: ""
+      nowTime: "",
+      ymd:"",
+      week:""
     }
   },
   mounted() {
@@ -53,7 +55,10 @@ export default {
         ];
 
         // 将获取的时间信息赋值给nowTime
-        this.nowTime = `${year}-${mounth}-${day} ${weekArr[week]} ${hours}:${minutes}:${seconds}`;
+        // this.nowTime = `${year}-${mounth}-${day} ${weekArr[week]} ${hours}:${minutes}:${seconds}`;
+        this.ymd = `${year}年${mounth}月${day}日`
+        this.week = `${weekArr[week]}`
+        this.nowTime = `${hours}:${minutes}:${seconds}`
       }, 1000); // 每隔一秒更新时间
     },
     backFull(){
@@ -91,4 +96,7 @@ export default {
   text-transform: none;
   margin: 18px 20px 0 0 ;
 }
+.time-style .span {
+  margin-right: 20px;
+}
 </style>

+ 3 - 1
src/components/newLayout/modules/header.vue

@@ -39,7 +39,7 @@
       </el-dropdown-menu>
     </el-dropdown>-->
       <!--    <el-divider direction="vertical"></el-divider>-->
-<!--      <el-button size="mint" type="primary"  style="background-color:rgb(52 106 145);margin-right: 20px;color: #FFFFFF" v-if="usertype == 1 || usertype == 0" @click="$router.push('/serviceDataScreen')">{{$t(`业务数据大屏`)}}</el-button>-->
+      <el-button size="mint" type="primary"  style="background-color:rgb(52 106 145);margin-right: 20px;color: #FFFFFF" v-if="usertype == 1 || usertype == 0" @click="$router.push('/serviceDataScreen')">{{$t(`业务数据大屏`)}}</el-button>
       <svg
         t="1725853431060"
         class="icon"
@@ -165,7 +165,9 @@ export default {
       sessionStorage.setItem("active_account", JSON.stringify(item));
       await this.basicData.query_userauth(()=>{
         setTimeout(() => {
+          console.log('33333')
         this.$router.go(0);
+
         },1000);
       })
       this.siteInfos();

+ 6 - 1
src/views/login/login.vue

@@ -317,7 +317,12 @@ export default {
           sessionStorage.setItem("active_password", res.remindchangepassword);
           this.basicData.query_userauth().then(() => {
             this.basicData.querySite_Parameter();
-            this.$router.push({ path: "/main" });
+            let usertype = JSON.parse(sessionStorage.getItem('active_account')).usertype
+            if (usertype == 1 || usertype == 0){
+              this.$router.push('/serviceDataScreen')
+            }else {
+              this.$router.push({ path: "/main" });
+            }
             this.getAccountInfo();
           });
         } else {