소스 검색

科室、个人排序

zhouna 5 년 전
부모
커밋
514a5a057b
4개의 변경된 파일44개의 추가작업 그리고 0개의 파일을 삭제
  1. 18 0
      src/css/qcListDept.less
  2. 18 0
      src/css/qcListPerson.less
  3. 4 0
      src/js/qcListDept.js
  4. 4 0
      src/js/qcListPerson.js

+ 18 - 0
src/css/qcListDept.less

@@ -46,6 +46,24 @@ table{
         font-weight: 500;
         white-space: nowrap;
     }
+    th[code]{
+        cursor: pointer;
+        &:after{
+            content:"";
+            display:inline-block;
+            width: 11px;
+            height: 14px;
+            margin-left: 4px;
+            vertical-align: middle;
+            background: url("../images/grey.png");
+        }
+        &.asc:after{
+            background: url("../images/up_blue.png");
+        }
+        &.desc:after{
+            background: url("../images/down_blue.png");
+        }
+    }
     td{
         font-size: 14px;
         font-weight: 400;

+ 18 - 0
src/css/qcListPerson.less

@@ -46,6 +46,24 @@ table{
         font-weight: 500;
         white-space: nowrap;
     }
+    th[code]{
+        cursor: pointer;
+        &:after{
+            content:"";
+            display:inline-block;
+            width: 11px;
+            height: 14px;
+            margin-left: 4px;
+            vertical-align: middle;
+            background: url("../images/grey.png");
+        }
+        &.asc:after{
+            background: url("../images/up_blue.png");
+        }
+        &.desc:after{
+            background: url("../images/down_blue.png");
+        }
+    }
     td{
         font-size: 14px;
         font-weight: 400;

+ 4 - 0
src/js/qcListDept.js

@@ -95,9 +95,13 @@ $("th[code]").on("click",function(e){
   if(data_asc[0]===code){
     data_desc=[code];
     data_asc=[];
+    $("th[code]").removeClass("asc desc");
+    $(this).addClass("desc");
   }else{
     data_desc=[];
     data_asc=[code];
+    $("th[code]").removeClass("asc desc");
+    $(this).addClass("asc");
   }
   getTabData(1);
   console.log(code)

+ 4 - 0
src/js/qcListPerson.js

@@ -97,9 +97,13 @@ $("th[code]").on("click",function(e){
   if(data_asc[0]===code){
     data_desc=[code];
     data_asc=[];
+    $("th[code]").removeClass("asc desc");
+    $(this).addClass("desc");
   }else{
     data_desc=[];
     data_asc=[code];
+    $("th[code]").removeClass("asc desc");
+    $(this).addClass("asc");
   }
   getTabData(1);
   console.log(code)