Browse Source

详情菜单图标、激活

zhouna 5 years ago
parent
commit
46c3714a04
3 changed files with 36 additions and 5 deletions
  1. 33 3
      src/css/qcScore.less
  2. 2 2
      src/html/qcScore.html
  3. 1 0
      src/js/qcScore.js

+ 33 - 3
src/css/qcScore.less

@@ -25,7 +25,7 @@
 }
 .sub-menu{
   position: relative;
-  width: @menuWt;
+  width: @menuWt+20px;
   height: 100%;
   float: left;
   overflow-y: auto;
@@ -44,6 +44,36 @@
   }
   &>ul>li{
     color: @themeFontClr;
+    &.menu-0{
+      background: url("../images/total.png") 20px 9px no-repeat;
+      &.active{
+        background: url("../images/total_a.png") 20px 9px no-repeat;
+      }
+    }
+    &.menu-6{
+       background: url("../images/index.png") 20px 11px no-repeat;
+      &.active{
+        background: url("../images/index_a.png") 20px 11px no-repeat;
+      }
+     }
+    &.menu-1{
+      background: url("../images/inhis.png") 19px 11px no-repeat;
+      &.active{
+        background: url("../images/inhis_a.png") 19px 11px no-repeat;
+      }
+    }
+    &.menu-37{
+      background: url("../images/prod.png") 20px 10px no-repeat;
+      &.active{
+        background: url("../images/prod_a.png") 20px 10px no-repeat;
+      }
+    }
+    &.menu-5{
+      background: url("../images/out.png") 20px 11px no-repeat;
+      &.active{
+        background: url("../images/out_a.png") 20px 11px no-repeat;
+      }
+    }
   }
   .active{
     color: @activeColor;
@@ -78,7 +108,7 @@
     ul{
       display: none;
       li.page{
-        text-indent: 30px;
+        text-indent: 55px;
         color: @themeFontClr;
         &.active{
           color: @activeColor;
@@ -88,7 +118,7 @@
   }
   li{
     line-height: @menuLiHt;
-    text-indent: 15px;
+    text-indent: 45px;
     cursor: pointer;
   }
   .copy-right{

+ 2 - 2
src/html/qcScore.html

@@ -7,10 +7,10 @@
     <title>质控评分</title>
     <script type="text/html" id="subMenuTmpl">
         {{if sonMode.length}}
-        <li class="list-1">
+        <li class="list-1 menu-${id}">
             <p>${name}</p>
             {{else}}
-        <li class="page" code="${name}">${name}
+        <li class="page menu-${id}" code="${name}">${name}
             {{/if}}
             <ul>
                 {{each sonMode}}

+ 1 - 0
src/js/qcScore.js

@@ -57,6 +57,7 @@ function initMenu(data){
 
     //选中样式
     $(".sub-menu .active").removeClass('active');
+    $(this).parents(".list-1").addClass("active");
     $(this).addClass("active");
     //显示对应内容
     const code=$(this).attr("code");