wenbobowen 4 سال پیش
والد
کامیت
904dfb31b3
4فایلهای تغییر یافته به همراه64 افزوده شده و 31 حذف شده
  1. 31 20
      src/components/newLayout/Head.vue
  2. 32 0
      src/components/ui/plainBtn.vue
  3. 1 6
      src/icons/svg/admin.svg
  4. 0 5
      src/icons/svg/setting.svg

+ 31 - 20
src/components/newLayout/Head.vue

@@ -42,23 +42,26 @@
               <span class="label">设置</span>
             </div>
             <div class="item">
-              <div class="label line">
+              <div v-if="navTagType === 1" class="label line" @click="setNavTagType(2)">
                 顶部导航
               </div>
+              <div v-if="navTagType === 2" class="label line" @click="setNavTagType(1)">
+                侧边导航
+              </div>
               <div class="label line">
                 详情页当前标签页打开
               </div>
             </div>
-            <div class="title line">
+            <div class="title line" :class="memberCheck && 'clickText'" @click="administratorsJump()">
               <svg-icon icon-class="admin" class="icon" />
               <span class="label">管理员</span>
             </div>
             <div class="item">
               <div class="label line">
-                {{ userInfo.name }}
+                {{ userInfo.name }} {{ userInfo.idap }}
               </div>
               <div class="label line">
-                <el-button type="primary" plain size="small">退出登录</el-button>
+                <el-button type="primary" plain size="small" @click="layout()">退出登录</el-button>
               </div>
             </div>
             <!-- <div class="user-name">{{ userInfo.name }}</div>
@@ -153,6 +156,7 @@ export default {
     async getLoginUser() {
       const res = await memberGetLoginInMemberInfoByLdap()
       if (res && res.data) this.userInfo = res.data || null
+      console.log(res.data)
     },
     // 查看是否为管理员
     async verifyIsAdmin() {
@@ -167,7 +171,9 @@ export default {
       this.$router.push({ path: '/' })
     },
     administratorsJump() {
-      this.$router.push({ name: '管理员' })
+      if (this.memberCheck) {
+        this.$router.push({ name: '管理员' })
+      }
     },
     // websocket数据接收
     websocketonmessage(e) {
@@ -270,27 +276,27 @@ export default {
     height: 30px;
   }
 }
-// .user-admin {
-//   height: 143px;
-//   width: 95px;
-//   display: flex;
-//   flex-direction: column;
-//   display: grid;
-//   grid-template-rows: 47px 1px 47px 1px 47px;
-//   justify-items: center;
-//   align-items: center;
-//   .line {
-//     width: 100%;
-//     height: 1px;
-//     background-color: rgba(112, 112, 112, 0.2);
-//   }
-// }
 .user-admin-one {
   height: 190px;
   .title {
+    cursor: no-drop;
     .icon {
       margin-right: 5px;
       font-size: 12px;
+      color: #93C8FF ;
+    }
+    .label {
+      color: #9A9A9A;
+      font-size: 14px;
+    }
+  }
+  .clickText {
+    cursor: pointer;
+    .label {
+      color: #444;
+    }
+    .icon {
+      color: #409EFF;
     }
   }
   .line {
@@ -298,6 +304,11 @@ export default {
   }
   .item {
     margin-left: 18px;
+    cursor: pointer;
+    .label {
+      color: #444;
+      font-size: 12px;
+    }
   }
   // width: 95px;
   // display: flex;

+ 32 - 0
src/components/ui/plainBtn.vue

@@ -0,0 +1,32 @@
+<template>
+  <div class="btn" :class="type">
+    {{ text }}11
+  </div>
+</template>
+<script>
+export default {
+  props: {
+    text: {
+      type: String,
+      default: '',
+      required: true
+    },
+    type: {
+      type: String,
+      default: 'primary',
+      required: true
+    }
+  }
+}
+</script>
+<style lang="scss" scoped>
+.btn {
+  padding: 7px 15px;
+  border-radius: 3px;
+  border: 1px solid #dcdfe6;
+  &.primary {
+    border-color: #50A6FF;
+    color: #50A6FF;
+  }
+}
+</style>

+ 1 - 6
src/icons/svg/admin.svg

@@ -1,10 +1,5 @@
 <svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 12 12">
   <defs>
-    <style>
-      .cls-1 {
-        fill: #3e9dff;
-      }
-    </style>
   </defs>
-  <path id="管理员" class="cls-1" d="M74.091,71.773a.416.416,0,0,1-.383.385h-.031a.671.671,0,0,0-.669.669.78.78,0,0,0,.059.255.482.482,0,0,1-.165.584l-.018.012-.777.427a.5.5,0,0,1-.213.049.519.519,0,0,1-.381-.163.622.622,0,0,0-1.1-.006.525.525,0,0,1-.576.12l-.768-.427a.489.489,0,0,1-.181-.6.772.772,0,0,0,.059-.253.671.671,0,0,0-.67-.669h-.026a.418.418,0,0,1-.388-.386,2.953,2.953,0,0,1,0-1.242.418.418,0,0,1,.383-.386h.031a.67.67,0,0,0,.67-.668.752.752,0,0,0-.06-.256.484.484,0,0,1,.166-.585l.018-.011.8-.438.015-.006a.529.529,0,0,1,.571.119.618.618,0,0,0,1.072.005.53.53,0,0,1,.572-.114l.782.432a.488.488,0,0,1,.182.6.788.788,0,0,0-.058.253.67.67,0,0,0,.669.668H73.7a.418.418,0,0,1,.388.386,3.979,3.979,0,0,1,.066.621A4.24,4.24,0,0,1,74.091,71.773Zm-.583-1.031A1.277,1.277,0,0,1,72.4,69.477a1.254,1.254,0,0,1,.068-.387l-.553-.307a2.279,2.279,0,0,1-.228.185,1.06,1.06,0,0,1-1.386,0,2,2,0,0,1-.229-.19l-.579.318a1.249,1.249,0,0,1,.069.386,1.278,1.278,0,0,1-1.112,1.266,2.2,2.2,0,0,0,0,.817,1.25,1.25,0,0,1,1.043,1.653l.535.3a2.4,2.4,0,0,1,.229-.193,1.057,1.057,0,0,1,1.421.006,2.337,2.337,0,0,1,.23.2l.56-.309a1.254,1.254,0,0,1,1.043-1.653,2.207,2.207,0,0,0,0-.819Zm-2.544,1.587a1.166,1.166,0,1,1,1.182-1.182A1.184,1.184,0,0,1,70.964,72.329Zm0-1.731a.554.554,0,1,0,.573.55A.574.574,0,0,0,70.964,70.6Zm-1.715-3.009-.192.15a3.044,3.044,0,0,1-1.634.5h-.063q-.208,0-.416.02h-.005a4.4,4.4,0,0,0-3.992,4.361v.669h4.9a3.985,3.985,0,0,0,.478.782H62.551a.393.393,0,0,1-.4-.39v-1.06a5.142,5.142,0,0,1,3.279-4.794l.226-.089-.192-.15A3.017,3.017,0,0,1,64.292,65.2a3.067,3.067,0,0,1,6.133,0A3.022,3.022,0,0,1,69.249,67.589Zm-1.89-4.651A2.26,2.26,0,1,0,69.635,65.2,2.27,2.27,0,0,0,67.359,62.938Z" transform="translate(-62.156 -62.156)"/>
+  <path id="管理员" d="M74.091,71.773a.416.416,0,0,1-.383.385h-.031a.671.671,0,0,0-.669.669.78.78,0,0,0,.059.255.482.482,0,0,1-.165.584l-.018.012-.777.427a.5.5,0,0,1-.213.049.519.519,0,0,1-.381-.163.622.622,0,0,0-1.1-.006.525.525,0,0,1-.576.12l-.768-.427a.489.489,0,0,1-.181-.6.772.772,0,0,0,.059-.253.671.671,0,0,0-.67-.669h-.026a.418.418,0,0,1-.388-.386,2.953,2.953,0,0,1,0-1.242.418.418,0,0,1,.383-.386h.031a.67.67,0,0,0,.67-.668.752.752,0,0,0-.06-.256.484.484,0,0,1,.166-.585l.018-.011.8-.438.015-.006a.529.529,0,0,1,.571.119.618.618,0,0,0,1.072.005.53.53,0,0,1,.572-.114l.782.432a.488.488,0,0,1,.182.6.788.788,0,0,0-.058.253.67.67,0,0,0,.669.668H73.7a.418.418,0,0,1,.388.386,3.979,3.979,0,0,1,.066.621A4.24,4.24,0,0,1,74.091,71.773Zm-.583-1.031A1.277,1.277,0,0,1,72.4,69.477a1.254,1.254,0,0,1,.068-.387l-.553-.307a2.279,2.279,0,0,1-.228.185,1.06,1.06,0,0,1-1.386,0,2,2,0,0,1-.229-.19l-.579.318a1.249,1.249,0,0,1,.069.386,1.278,1.278,0,0,1-1.112,1.266,2.2,2.2,0,0,0,0,.817,1.25,1.25,0,0,1,1.043,1.653l.535.3a2.4,2.4,0,0,1,.229-.193,1.057,1.057,0,0,1,1.421.006,2.337,2.337,0,0,1,.23.2l.56-.309a1.254,1.254,0,0,1,1.043-1.653,2.207,2.207,0,0,0,0-.819Zm-2.544,1.587a1.166,1.166,0,1,1,1.182-1.182A1.184,1.184,0,0,1,70.964,72.329Zm0-1.731a.554.554,0,1,0,.573.55A.574.574,0,0,0,70.964,70.6Zm-1.715-3.009-.192.15a3.044,3.044,0,0,1-1.634.5h-.063q-.208,0-.416.02h-.005a4.4,4.4,0,0,0-3.992,4.361v.669h4.9a3.985,3.985,0,0,0,.478.782H62.551a.393.393,0,0,1-.4-.39v-1.06a5.142,5.142,0,0,1,3.279-4.794l.226-.089-.192-.15A3.017,3.017,0,0,1,64.292,65.2a3.067,3.067,0,0,1,6.133,0A3.022,3.022,0,0,1,69.249,67.589Zm-1.89-4.651A2.26,2.26,0,1,0,69.635,65.2,2.27,2.27,0,0,0,67.359,62.938Z" transform="translate(-62.156 -62.156)"/>
 </svg>

+ 0 - 5
src/icons/svg/setting.svg

@@ -1,10 +1,5 @@
 <svg xmlns="http://www.w3.org/2000/svg" width="12" height="11" viewBox="0 0 12 11">
   <defs>
-    <style>
-      .cls-1 {
-        fill: #409eff;
-      }
-    </style>
   </defs>
   <g id="设置" transform="translate(-112 -128)">
     <path id="路径_13151" data-name="路径 13151" class="cls-1" d="M120.141,139h-4.313a1.744,1.744,0,0,1-1.5-.874l-2.094-3.721a1.868,1.868,0,0,1,0-1.812l2.125-3.721a1.694,1.694,0,0,1,1.469-.874h4.313a1.744,1.744,0,0,1,1.5.874l2.125,3.721a1.868,1.868,0,0,1,0,1.812l-2.125,3.721A1.706,1.706,0,0,1,120.141,139Zm-4.313-10.029a.852.852,0,0,0-.687.388l-2.094,3.721a.813.813,0,0,0,0,.841l2.125,3.721a.778.778,0,0,0,.688.388h4.313a.852.852,0,0,0,.687-.388l2.125-3.721a.813.813,0,0,0,0-.841l-2.125-3.721a.958.958,0,0,0-.719-.388Z" transform="translate(0)"/>