main
MY-SH\lenovo 11 months ago
parent a63783ddbf
commit e1da5981ce

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.9 KiB

@ -1,4 +1,27 @@
<template> <template>
<div class="loginBox">
<div class="head">
<div class="doll">
<div class="leftBox">
<img src="../assets/images/logo2.png" alt="">
<span>
<p class="pChina">中华人民共和国应急管理部</p>
<p class="pEnglish">Ministry of Emergency Management of the People's Republic of China</p>
</span>
<span class="slogan">
<p>对党忠诚 纪律严明</p>
<p>赴汤蹈火 竭诚为民</p>
</span>
</div>
<div class="rightBox">
<span class="time">{{ currentTime }}</span>
<span class="day">
<p>{{ currentDayOfWeek }}</p>
<p>{{ currentDate }}</p>
</span>
</div>
</div>
</div>
<div class="login"> <div class="login">
<el-form ref="loginForm" :model="loginForm" :rules="loginRules" class="login-form"> <el-form ref="loginForm" :model="loginForm" :rules="loginRules" class="login-form">
<h3 class="title">唐河县安全隐患及应急救援管理平台</h3> <h3 class="title">唐河县安全隐患及应急救援管理平台</h3>
@ -56,9 +79,11 @@
</el-form> </el-form>
<!-- 底部 --> <!-- 底部 -->
<div class="el-login-footer"> <div class="el-login-footer">
<span>Copyright © 2018-2023 ruoyi.vip All Rights Reserved.</span> <!-- <span>Copyright © 2018-2023 ruoyi.vip All Rights Reserved.</span> -->
</div>
</div> </div>
</div> </div>
</template> </template>
<script> <script>
@ -92,7 +117,11 @@ export default {
captchaEnabled: true, captchaEnabled: true,
// //
register: false, register: false,
redirect: undefined redirect: undefined,
currentTime: '',
currentDayOfWeek: '',
currentDate: '' ,
timer:null,
}; };
}, },
watch: { watch: {
@ -106,6 +135,8 @@ export default {
created() { created() {
this.getCode(); this.getCode();
this.getCookie(); this.getCookie();
this.getCurrentTime()
this.timer = setInterval(this.getCurrentTime, 1000);
}, },
methods: { methods: {
getCode() { getCode() {
@ -150,19 +181,41 @@ export default {
}); });
} }
}); });
},
//
getCurrentTime() {
const date = new Date();
const hours = String(date.getHours()).padStart(2, '0');
const minutes = String(date.getMinutes()).padStart(2, '0');
const dayOfWeek = this.getDayOfWeek(date.getDay());
const year = date.getFullYear();
const month = String(date.getMonth() + 1).padStart(2, '0');
const day = String(date.getDate()).padStart(2, '0');
this.currentTime = `${hours}:${minutes}`;
this.currentDayOfWeek = dayOfWeek;
this.currentDate = `${year}-${month}-${day}`;
},
getDayOfWeek(day) {
const daysOfWeek = ['星期日', '星期一', '星期二', '星期三', '星期四', '星期五', '星期六'];
return daysOfWeek[day];
} }
} },
beforeDestroy() {
clearInterval(this.timer); //
},
}; };
</script> </script>
<style rel="stylesheet/scss" lang="scss"> <style rel="stylesheet/scss" lang="scss">
.login { .login {
display: flex; display: flex;
justify-content: center; justify-content: flex-end;
align-items: center; align-items: center;
height: 100%; // height: 100%;
background-image: url("../assets/images/login-background.jpg");
background-size: cover; margin-top: 4%;
margin-right: 8%;
} }
.title { .title {
margin: 0px auto 30px auto; margin: 0px auto 30px auto;
@ -216,4 +269,77 @@ export default {
.login-code-img { .login-code-img {
height: 38px; height: 38px;
} }
.loginBox{
width: 100%;
height: 100%;
background-image: url("../assets/images/background.jpg");
background-size: 100% 100%;
.head{
height: 20%;
background: #056891;
.doll{
width: 85%;
height: 100%;
margin: auto;
display: flex;
justify-content: space-between;
align-items: center;
.leftBox{
display: flex;
align-items: center;
img{
// object-fit: none;
width: 50px;
height: 50px;
margin-right: 15px;
}
color: #ffffff;
}
.rightBox{
display: flex;
align-items: center;
}
}
}
}
.leftBox {
.pChina{
display: table-row;
font-size: 40px;
}
.pEnglish{
display: table-row;
font-size: 13px;
letter-spacing: 1px;
}
.slogan{
font-size: 24px;
color: #ff6c00;
line-height: 10px;
font-weight: 500;
margin-left: 30px;
}
}
.rightBox{
color: #ffffff;
font-size: 24px;
line-height: 10px;
.time{
font-size: 60px;
margin-right: 20px;
}
.day{
font-size: 20px;
}
}
</style> </style>

Loading…
Cancel
Save