Jelajahi Sumber

update

1. 调整登录页
moccus 2 tahun lalu
induk
melakukan
75fbf7788f

TEMPAT SAMPAH
exam-06173-vue/src/assets/web/bg_01.png


+ 13 - 9
exam-06173-vue/src/styles/login.css

@@ -1,7 +1,7 @@
 .login-container {
   height: 100vh;
   overflow: hidden;
-  background: #4B57F5;
+  /* background: #4B57F5; */
 }
 
 .login-container .top {
@@ -16,8 +16,10 @@
 }
 
 .login-container .content {
-  height: calc(100vh - 120px);
-  background: url("../assets/web/bg.png") #fff;
+  /* height: calc(100vh - 120px); */
+  height: 100vh;
+  background: url("../assets/web/bg_01.png");
+  background-size: 100% 100%;
   display: flex;
   align-items: center;
 }
@@ -37,16 +39,17 @@
 }
 
 .login-container .content .right .box {
-  border: #ddd 1px solid;
-  background: #ffffff;
-  height: calc(100vh - 160px);
+  /* border: #ddd 1px solid; */
+  background-image: linear-gradient(to right, rgba(255,255,255,0.6),rgba(255,255,255,0.3));
+  /* height: calc(100vh - 160px); */
+  min-height: 400px;
   padding: 5px 30px;
   line-height: 60px;
   font-size: 14px;
   color: #333;
   width: 100%;
   border-radius: 5px;
-  box-shadow: 10px 10px 5px #eee;
+  /* box-shadow: 10px 10px 5px #eee; */
   overflow-y: auto;
 }
 
@@ -58,8 +61,9 @@
 
 .login-container .footer{
 
-  color: #A3A8B0;
-  background: #333;
+  /* color: #A3A8B0; */
+  color: white;
+  /* background: #333; */
   padding-top: 20px;
   padding-bottom: 20px;
   height: 60px;

+ 26 - 12
exam-06173-vue/src/views/dashboard/index.vue

@@ -219,20 +219,36 @@ export default {
     // 调用函数
     callFn(fn1, fn2) {
       const tabActive = this.tabActive;
-      const day =
-        this.radioValue === "1" ? 7 : this.radioValue === "2" ? 30 : 360;
-
       let pxChartDom = document.getElementById(`${tabActive}PxChartDom`);
       let ksChartDom = document.getElementById(`${tabActive}KsChartDom`);
 
       pxChartDom && pxChartDom.removeAttribute("_echarts_instance_");
       ksChartDom && ksChartDom.removeAttribute("_echarts_instance_");
-
+      const nowDate = new Date()
+      let startDate = null
+      let endDate = null
+      let monthDays = null // 当前月共多少天
+      const weekDay = nowDate.getDay() // 获取当前为周几
+      const month = nowDate.getMonth() + 1 // 获取当前为几月
+      if (this.radioValue === '1') {
+        nowDate.setDate(nowDate.getDate() - weekDay)
+        startDate = nowDate.formatDate("yyyy-MM-dd 00:00:00")
+        nowDate.setDate(nowDate.getDate() + 6)
+        endDate = nowDate.formatDate("yyyy-MM-dd 23:59:59")
+      } else if (this.radioValue === '2') {
+        nowDate.setMonth(month)
+        nowDate.setDate(0)
+        monthDays = nowDate.getDate()
+        nowDate.setMonth(month - 1)
+        startDate = nowDate.formatDate("yyyy-MM-01 00:00:00")
+        endDate = nowDate.formatDate(`yyyy-MM-${monthDays} 23:59:59`)
+      } else {
+        startDate = nowDate.formatDate("yyyy-01-01 00:00:00")
+        endDate = nowDate.formatDate('yyyy-12-31 23:59:59')
+      }
       this[fn1]({
-        statDateL: new Date(new Date() - 3600 * 1000 * 24 * day).formatDate(
-          "yyyy-MM-dd hh:mm:ss"
-        ),
-        statDateR: new Date().formatDate("yyyy-MM-dd hh:mm:ss"),
+        statDateL: startDate,
+        statDateR: endDate
       }).then((res) => {
         let myChart = echarts.init(pxChartDom);
 
@@ -304,10 +320,8 @@ export default {
       });
 
       this[fn2]({
-        statDateL: new Date(new Date() - 3600 * 1000 * 24 * day).formatDate(
-          "yyyy-MM-dd hh:mm:ss"
-        ),
-        statDateR: new Date().formatDate("yyyy-MM-dd hh:mm:ss"),
+        statDateL: startDate,
+        statDateR: endDate,
       }).then((res) => {
         let myChart = echarts.init(ksChartDom);
 

+ 1 - 1
exam-06173-vue/src/views/login/forgot.vue

@@ -5,7 +5,7 @@
     <el-row>
 
       <el-col :lg="14" :md="10" class="left hidden-sm-and-down">
-        <img src="../../assets/web/images/login2.png" style="height: 45vh">
+        <!-- <img src="../../assets/web/images/login2.png" style="height: 45vh"> -->
       </el-col>
 
       <el-col :lg="10" :md="14" class="right">

+ 11 - 8
exam-06173-vue/src/views/login/index.vue

@@ -2,9 +2,9 @@
   <div>
     <el-row>
       <el-col :lg="14" :md="10" class="left hidden-sm-and-down">
-        <img src="@/assets/web/images/login2.png" style="height: 45vh" />
+        <!-- <img src="@/assets/web/images/login2.png" style="height: 45vh" /> -->
       </el-col>
-      <el-col :lg="10" :md="14" class="right">
+      <el-col :lg="8" :md="14" class="right">
         <div class="box">
           <el-tabs v-model="activeName">
             <el-tab-pane label="账号登录" name="account">
@@ -13,8 +13,11 @@
                 ref="postForm"
                 :model="postForm"
                 :rules="loginRules"
+                label-position="left"
+                hide-required-asterisk
+                label-width="70px"
               >
-                <el-form-item prop="username">
+                <el-form-item prop="username" label="用户名:">
                   <el-input
                     v-model="postForm.username"
                     style="width: 100%"
@@ -23,7 +26,7 @@
                   />
                 </el-form-item>
 
-                <el-form-item prop="password">
+                <el-form-item prop="password" label="密码:">
                   <el-input
                     v-model="postForm.password"
                     style="width: 100%"
@@ -33,11 +36,11 @@
                   />
                 </el-form-item>
 
-                <el-form-item prop="captchaValue">
+                <el-form-item prop="captchaValue" label="验证码:">
                   <yf-captcha ref="captcha" v-model="postForm" />
                 </el-form-item>
 
-                <el-form-item>
+                <el-form-item label-width="0px">
                   <el-button
                     :loading="loading"
                     type="primary"
@@ -83,9 +86,9 @@
 
           <div style="text-align: right; line-height: 10px">
             <el-link href="/#/register">立即注册</el-link>
-            <el-link href="/#/forgot" style="margin-left: 10px"
+            <!-- <el-link href="/#/forgot" style="margin-left: 10px"
               >忘记密码?</el-link
-            >
+            > -->
           </div>
 
           <login-demo v-if="isDemo" />

+ 23 - 15
exam-06173-vue/src/views/login/layout/LoginLayout.vue

@@ -1,11 +1,18 @@
 <template>
   <div class="login-container">
-    <el-row :gutter="20" class="top">
+    <!-- <el-row :gutter="20" class="top">
       <el-col :span="6" :offset="1">
-        <div style="display: flex; flex-direction: row; align-items: center">
+      </el-col>
+
+      <el-col :span="12" style="line-height: 60px; text-align: right" />
+    </el-row> -->
+
+    <el-row :gutter="20" class="content">
+      <el-col :span="18" :offset="3">
+        <div style="display: flex; flex-direction: row; align-items: center" class="lg-logo">
           <a href="/">
             <div v-if="siteData.frontLogo">
-              <img :src="siteData.frontLogo" />
+              <img :src="siteData.frontLogo" style="max-width: 100%;"/>
             </div>
             <div
               v-else
@@ -22,28 +29,23 @@
             </div>
           </a>
         </div>
-      </el-col>
-
-      <el-col :span="12" style="line-height: 60px; text-align: right" />
-    </el-row>
-
-    <el-row :gutter="20" class="content">
-      <el-col :span="18" :offset="3">
         <app-main />
+        <div class="footer">
+          <div class="flex">
+          <div v-html="siteData.copyRight" />
+        </div>
+        </div>
       </el-col>
       <!-- <div class="loginImgBox">
         <img src="@/assets/web/images/login3.png" />
       </div> -->
     </el-row>
 
-    <el-row :gutter="20" class="footer">
-      <!-- <el-col :span="18" :offset="3">
-        <div v-html="siteData.copyRight" />
-      </el-col> -->
+    <!-- <el-row :gutter="20" class="footer">
       <div class="flex">
         <div v-html="siteData.copyRight" />
       </div>
-    </el-row>
+    </el-row> -->
   </div>
 </template>
 
@@ -182,4 +184,10 @@ export default {
     background-size: 100% 100%;
   }
 }
+.lg-logo{
+  position: absolute;
+  top: 46px;
+  left: 114px;
+  width: 100%;
+}
 </style>

+ 2 - 2
exam-06173-vue/src/views/login/register.vue

@@ -5,10 +5,10 @@
     <el-row>
 
       <el-col :lg="14" :md="10" class="left hidden-sm-and-down">
-        <img src="../../assets/web/images/login2.png" style="height: 45vh">
+        <!-- <img src="../../assets/web/images/login2.png" style="height: 45vh"> -->
       </el-col>
 
-      <el-col :lg="10" :md="14" class="right">
+      <el-col :lg="8" :md="14" class="right">
 
         <div class="box">