zhangjie 2 سال پیش
والد
کامیت
8170145e4f
6فایلهای تغییر یافته به همراه66 افزوده شده و 8 حذف شده
  1. 23 0
      src/assets/styles/home.scss
  2. 23 2
      src/assets/styles/login.scss
  3. 6 0
      src/modules/login/views/Login.vue
  4. 1 1
      src/modules/login/views/LoginHome.vue
  5. 2 2
      src/store.js
  6. 11 3
      src/views/Layout.vue

+ 23 - 0
src/assets/styles/home.scss

@@ -16,6 +16,7 @@
   background: $--color-background;
   z-index: 98;
   padding-top: 30px;
+  padding-bottom: 30px;
 }
 
 /* head */
@@ -57,3 +58,25 @@
     }
   }
 }
+
+.home-footer{
+  position: absolute;
+  left: 0;
+  bottom: 0;
+  width: 100%;
+  height: 30px;
+  z-index: 99;
+  color: #fff;
+  padding: 0 10px;
+
+  display: flex;
+  justify-content: space-between;
+  align-items: center;
+
+  &-ip{
+    letter-spacing: 1px;
+    > i{
+      margin-right: 5px;
+    }
+  }
+}

+ 23 - 2
src/assets/styles/login.scss

@@ -9,6 +9,27 @@
   .head-title,.head-actions{
     color: #fff;
   }
+
+  .login-action{
+    position: absolute;
+    top: 50px;
+    right: 20px;
+    z-index: auto;
+    border: 1px solid #fff;
+    border-radius: 5px;
+    padding: 6px 10px;
+    line-height: 1;
+    color: #fff;
+    cursor: pointer;
+
+    >i {
+      margin-right: 5px;
+    }
+
+    &:hover{
+      opacity: 0.8;
+    }
+  }
 }
 
 .login-body {
@@ -41,8 +62,8 @@
   }
 
   .el-form{
-    padding: 20px 40px;
-    width: 300px;
+    padding: 30px 40px;
+    width: 360px;
   }
   .el-input__prefix {
     left: 9px;

+ 6 - 0
src/modules/login/views/Login.vue

@@ -1,5 +1,8 @@
 <template>
   <div class="login" @keyup.enter="submit">
+    <div class="login-action" @click="toSet">
+      <i class="el-icon-s-tools"></i><span>设置</span>
+    </div>
     <div class="login-body">
       <div class="login-title">
         <h1>档案电子化扫描系统</h1>
@@ -86,6 +89,9 @@ export default {
         this.loginModel = { ...JSON.parse(lastLoginUser) };
       }
     },
+    toSet() {
+      this.$router.push({ name: "Setting" });
+    },
     async submit() {
       const valid = await this.$refs.loginForm.validate();
       if (!valid) return;

+ 1 - 1
src/modules/login/views/LoginHome.vue

@@ -1,5 +1,5 @@
 <template>
-  <layout class="login-home"> </layout>
+  <layout class="login-home" show-footer> </layout>
 </template>
 
 <script>

+ 2 - 2
src/store.js

@@ -9,8 +9,8 @@ import client from "./modules/client/store";
 export default new Vuex.Store({
   state: {
     user: {},
-    // 硬件检测结果
-    hardwareCheckResult: {}
+    input: "",
+    domain: ""
   },
   mutations: {
     setUser(state, user) {

+ 11 - 3
src/views/Layout.vue

@@ -28,9 +28,9 @@
     <div class="home-body">
       <router-view />
     </div>
-    <div class="home-footer">
+    <div v-if="showFooter" class="home-footer">
       <div class="home-footer-ip">
-        <i class="el-icon-link"></i><span>{{ domain }}</span>
+        <i class="el-icon-monitor"></i><span>{{ domain || "0.0.0.0" }}</span>
       </div>
       <div class="home-footer-version">版本号:{{ version }}</div>
     </div>
@@ -46,15 +46,23 @@ export default {
   props: {
     backHandle: {
       type: Function
+    },
+    showFooter: {
+      type: Boolean,
+      default: false
     }
   },
   data() {
     return {
       isDev: process.env.NODE_ENV === "development",
-      domain: "",
       version: pkInfo.version
     };
   },
+  computed: {
+    domain() {
+      return this.$store.state.domain;
+    }
+  },
   methods: {
     logout() {
       this.$ls.clear();