Browse Source

修改header

秦鹏 3 years ago
parent
commit
ab17231561

BIN
src/assets/teacherdev/headerDownlod2.png


+ 40 - 78
src/components/Header.vue

@@ -6,62 +6,20 @@
         v-if="configInfor.logo_image_url"
         :src="configInfor.logo_image_url"
         alt=""
+        class="logo-image"
+        @click="handleSelect"
       />
       <span class="logo-img" v-else>logo</span>
-      <el-menu
-        :default-active="activeIndex"
-        class="el-menu-demo"
-        mode="horizontal"
-        @select="handleSelect"
-        text-color="#fff"
-        active-text-color="#FF9900"
-      >
-        <el-menu-item index="1">主页</el-menu-item>
-        <el-menu-item index="2">
-          <template v-if="projectList.length > 1">
-            <el-dropdown trigger="click" @command="handleCommand">
-              <span
-                class="el-dropdown-link"
-                :style="{ color: activeIndex == 2 ? '#FF9900' : '#fff' }"
-              >
-                {{ projectName }}
-                <!-- SYSTEM -->
-                <img
-                  v-if="activeIndex == 2"
-                  src="../assets/teacherdev/headerDownlod.png"
-                  alt=""
-                />
-                <img
-                  v-else
-                  src="../assets/teacherdev/headerDownlod2.png"
-                  alt=""
-                />
-              </span>
-              <el-dropdown-menu slot="dropdown" style="min-width: 278px">
-                <el-dropdown-item
-                  :class="i == LoginNavIndex ? 'menuActive' : ''"
-                  :command="i"
-                  :key="i"
-                  class="projectList"
-                  v-for="(item, i) in projectList"
-                >
-                  <img
-                    style="position: relative; width: 24px"
-                    :src="item.icon_url_memu_default"
-                    alt=""
-                  />
-                  <span style="margin-left: 16px">
-                    {{ item.name }}
-                  </span>
-                </el-dropdown-item>
-              </el-dropdown-menu>
-            </el-dropdown>
-          </template>
-          <template v-else>{{
-            projectList.length > 0 && projectList[0].name
-          }}</template>
-        </el-menu-item>
-      </el-menu>
+      <ul class="logo-projectlist">
+        <li
+          v-for="(itemI, indexI) in projectList"
+          :key="indexI"
+          :class="indexI == LoginNavIndex ? 'active' : ''"
+          @click="handleCommand(indexI)"
+        >
+          {{ itemI.name }}
+        </li>
+      </ul>
     </div>
     <div class="userName">
       <template>
@@ -70,9 +28,9 @@
           trigger="click"
           @command="changeLang"
         >
-          <span class="el-dropdown-link" style="color: #fff">
+          <span class="el-dropdown-link" style="color: #000000">
             {{ lang }}
-            <img src="../assets/teacherdev/headerDownlod2.png" alt="" />
+            <i class="el-icon-arrow-down el-icon--right"></i>
           </span>
           <el-dropdown-menu slot="dropdown" style="width: 200px">
             <el-dropdown-item
@@ -117,7 +75,7 @@
       <div class="message">
         <img
           @click="gotoPersonalcenter"
-          src="../assets/login/Vector2.png"
+          src="../assets/login/Vector.png"
           alt=""
         />
         <span class="redDot" v-if="is_exist == 'true'"></span>
@@ -224,10 +182,7 @@ export default {
     },
     // 切换导航
     handleSelect(key, keyPath) {
-      this.activeIndex = key;
-      if (this.activeIndex == 1) {
-        window.location.href = "/";
-      }
+      window.location.href = "/";
     },
     // 切换项目
     handleCommand(command) {
@@ -358,35 +313,42 @@ export default {
   .logo {
     > img {
       // width: 188px;
-      height: 50px;
+      height: 48px;
+      cursor: pointer;
     }
     &-img {
       font-style: normal;
       font-weight: 600;
       font-size: 30px;
       font-variant: small-caps;
-      // color: #000000;
-      color: #fff;
+      color: #000000;
+      // color: #fff;
       margin-right: 29px;
       line-height: 64px;
     }
     display: flex;
     align-items: center;
-    .el-menu-demo {
-      background: rgba(0, 0, 0, 0);
-      // margin-left: 100px;
-      li:hover {
-        background: none;
-      }
+    .logo-projectlist {
+      display: flex;
+      padding: 0 24px;
+      height: 64px;
+      list-style: none;
       li {
+        padding: 0 12px;
+        color: rgba(0, 0, 0, 0.45);
         font-size: 16px;
-        background: none;
+        line-height: 64px;
+        font-weight: 500;
+        cursor: pointer;
+        &:hover {
+          background: #f6f6f6;
+        }
+        &.active {
+          color: #ff9900;
+          background: #ffefd6;
+        }
       }
     }
-    // 取消组件默认的样式
-    .el-menu.el-menu--horizontal {
-      border-bottom: none;
-    }
   }
   .userName {
     display: flex;
@@ -447,7 +409,7 @@ export default {
       > span {
         cursor: pointer;
         font-size: 16px;
-        color: #fff;
+        color: #000000;
       }
     }
     .user {
@@ -455,7 +417,7 @@ export default {
       align-items: center;
       cursor: pointer;
       position: relative;
-      color: #fff;
+      color: #000000;
       > img {
         width: 34px;
         height: 34px;
@@ -473,7 +435,7 @@ export default {
         border-radius: 8px;
         bottom: -100px;
         left: -5px;
-        color: black;
+        color: #000000;
         img {
           width: 24px;
           height: 24px;

+ 1 - 1
src/components/teacher-dev/Teaching.vue

@@ -3,7 +3,7 @@
   <div class="Teaching">
     <div class="top" v-if="!type">
       <div class="title">
-        <span class="text"> 教 </span>
+        <span class="text"> 教研资料 </span>
         <div class="more" @click="goMore">
           <span> 查看更多 </span>
           <img src="../../assets/teacherdev/moreImage.png" alt="" />

+ 1 - 1
src/components/teacher-dev/Textbook.vue

@@ -3,7 +3,7 @@
   <div class="Textbook">
     <div class="top">
       <div class="title">
-        <span class="text"> 教 </span>
+        <span class="text"> 教师用书 </span>
         <div class="more" @click="goMore">
           <span> 查看更多 </span>
           <img src="../../assets/teacherdev/moreImage.png" alt="" />

+ 3 - 37
src/views/teacher-dev/index.vue

@@ -1,11 +1,7 @@
 <template>
   <div class="teacher_edu">
     <!-- 头部导航及搜索 -->
-    <div class="nav">
-      <!-- 登录导航 -->
-      <Header />
-      <div class="shade"></div>
-    </div>
+    <Header />
     <div class="nav_title">
       <div class="inner">
         <el-menu
@@ -16,8 +12,8 @@
           text-color="#000"
           active-text-color="#FF9900"
         >
-          <el-menu-item index="TEXTBOOK">教</el-menu-item>
-          <el-menu-item index="TEACHING">教</el-menu-item>
+          <el-menu-item index="TEXTBOOK">教师用书</el-menu-item>
+          <el-menu-item index="TEACHING">教研资料</el-menu-item>
         </el-menu>
         <div class="seek" @keyup="keyDownSeekData">
           <el-input
@@ -218,36 +214,6 @@ export default {
 .teacher_edu {
   min-height: 100vh;
   background: #f6f6f6;
-  .nav {
-    background: url("../../assets/teacherdev/Homebg2.png") no-repeat;
-    background-size: 100% 100%;
-    height: 64px;
-    border-bottom-left-radius: 20px;
-    border-bottom-right-radius: 20px;
-    position: relative;
-    .shade {
-      position: absolute;
-      top: 0;
-      width: 100%;
-      height: 100%;
-      background: rgba(0, 0, 0, 0.5);
-      display: flex;
-      color: #fff;
-      font-weight: bold;
-      font-size: 18px;
-      justify-content: space-around;
-      align-items: center;
-      .el-menu-demo {
-        background: rgba(0, 0, 0, 0);
-        li:hover {
-          background: none;
-        }
-        li {
-          background: none;
-        }
-      }
-    }
-  }
   .seek {
     position: relative;
     img {

+ 1 - 7
src/views/teacher-devEntering/creadDocument.vue

@@ -1,8 +1,6 @@
 <template>
   <div class="creadDocument" v-loading="loading">
-    <div class="nav">
-      <Header />
-    </div>
+    <Header />
     <Nav title="创建文档" />
     <div class="title">
       <div>创建文档</div>
@@ -389,10 +387,6 @@ export default {
 <style lang="scss" scoped>
 .creadDocument {
   height: 100%;
-  .nav {
-    height: 64px;
-    background: #424141;
-  }
   .title {
     display: flex;
     justify-content: space-between;

+ 1 - 6
src/views/teacher-devEntering/index.vue

@@ -1,9 +1,7 @@
 <template>
   <!-- 教研中心录入 -->
   <div class="teacher-devEntering">
-    <div class="nav">
       <Header />
-    </div>
     <Nav />
     <div class="top">
       <div class="seek" @keydown="downSeekdata">
@@ -378,10 +376,7 @@ export default {
 
 <style lang="scss" scoped>
 .teacher-devEntering {
-  .nav {
-    height: 64px;
-    background: #424141;
-  }
+
   .top {
     width: 1200px;
     margin: 0 auto;