Browse Source

异常数据处理

luolei 5 years ago
parent
commit
78c67497e8

+ 352 - 0
src/css/abnormal.less

@@ -0,0 +1,352 @@
+.container{
+    width: 100%;
+    height: 100%;
+    overflow: auto;
+}
+.abnormal {
+    ul,li{
+        list-style: none;
+    }
+    h2{
+        width: 100%;
+        box-sizing: border-box;
+        background-color: #fff;
+        z-index: 20;
+        height: 44px;
+        line-height: 44px;
+        padding: 0 0 0 15px;
+        border-bottom: 1px solid #E2E5EF;
+        font-size: 16px;
+        font-weight: bold   ;
+        letter-spacing: 1px;
+    }
+    .main-body{
+        margin: 20px 0;
+        padding: 0 35px;
+        min-width: 1090px;
+        /*width: 100%;*/
+    }
+    table{
+        width: 100%;
+        min-width: 1090px;
+        border:1px solid #E2E5EF;
+        border-collapse: collapse;
+        thead{
+            background: #EFF0F9;
+           
+        }
+        th,td{
+            height: 40px;
+            box-sizing: border-box;
+            padding: 10px;
+            border:1px solid #E2E5EF;
+            border-collapse: collapse;
+            text-align: center;
+        }
+        th{
+            font-size: 14px;
+            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;
+            white-space: nowrap;
+        }
+        .moduleNumber{
+            text-align: center;
+        }
+        .scoreOperaItem{
+            width: 50px;
+            cursor: pointer;
+        }
+        
+    }
+    .tabFoot{
+        height: 40px;
+        /*border: 1px solid #E2E5EF;
+        border-top: none;
+        box-sizing: border-box;*/
+    }
+    .scoreOpera{
+        height: 50px;
+        line-height: 50px;
+        margin: 0 20px 0 0;
+        cursor: pointer;
+        img{
+            margin: 0 10px 0 0;
+        }
+    }
+    
+    .recordScoreOperaBtn{
+        cursor: pointer;
+        color: #5A8EEE;
+    }
+    .recordScoreBtn{
+        cursor: pointer;
+        display: inline-block;
+        width:68px;
+        height:30px;
+        line-height: 30px;
+        text-align: center;
+        border-radius:4px;
+        box-sizing: border-box;
+        border: 1px solid #5A8EEE;
+        color: #5A8EEE;
+    }
+    .filterBox{
+        margin-bottom: 15px;
+    }
+    .filterItem{
+        position: relative;
+        display: inline-block;
+        float: left;
+        height: 40px;
+        line-height: 40px;
+        margin: 0 20px 15px 0;
+        span{
+            display: inline-block;
+            line-height: 40px;
+            position: relative;
+        }
+        input{
+            width:120px;
+            height:40px;
+            border-radius:4px;
+            border: 1px solid #E2E5EF;
+            outline: none;
+            margin-right: 10px;
+            padding: 0 10px;
+            box-sizing: border-box;
+        }
+    }
+    
+    .filterDropList{
+        position: absolute;
+        right: 0;
+        max-height: 200px;
+        overflow-y: auto;
+        background: #fff;
+        display: none;
+        border: 1px solid #e4e7ed;
+        box-shadow: 0 2px 12px 0 #e4e7ed;
+        z-index: 2;
+        li{
+            padding: 0 10px;
+        }
+    }
+    .deptList{
+        width: 160px;
+        max-height: 400px;
+    }
+    .levelList{
+        width: 120px;
+        height: 120px;
+        li:hover{
+            background-color: #EEF4FF;
+            cursor: pointer;
+        }
+    }
+    .selectLevel,.selectDept{
+        display: inline-block;
+        position: relative;
+        width:120px;
+        padding: 0 10px;
+        height:40px;
+        border-radius:4px;
+        border: 1px solid #E2E5EF;
+        box-sizing: border-box;
+        cursor: pointer;
+    }
+    .selectDept{
+        width: 160px;
+    }
+    
+    .filter{
+        display: inline-block;
+        width:60px;
+        height:36px;
+        background:#5A8EEE;
+        border-radius:4px;
+        color: #fff;
+        text-align: center;
+        line-height: 36px;
+        position: relative;
+        top: 2px;
+        cursor: pointer;
+        float: left;
+    }
+    .arrow{
+        position: absolute;
+        width: 10px;
+        top: 16px;
+        right: 10px;
+    }
+    .iconCheck{
+        width: 14px;
+    }
+    .fl{
+        float: left;
+    }
+    .clearfix:after {
+        content: '';
+        height: 0;
+        line-height: 0;
+        display: block;
+        visibility: hidden;
+        clear: both;
+    }
+    .clearfix{
+        zoom:1
+    }
+    .divide{
+        margin: 0 10px;
+    }
+    .datapickerBox{
+        position: relative;
+        display: inline-block;
+        width: 120px;
+        height: 40px;
+        input{
+            position: absolute;
+        }
+    }
+    .iconCalen{
+        position: absolute;
+        width: 15px;
+        top: 12px;
+        right: 10px;
+    }
+    .textCenter{
+        text-align: center;
+    }
+    .patientNameSpan{
+        color: #5A8EEE;
+        cursor: pointer;
+    }
+    
+    .deptItem:hover{
+        background-color: #EEF4FF;
+        cursor: pointer;
+    }
+    .ellipsis{
+        overflow: hidden;
+        text-overflow:ellipsis;
+        white-space: nowrap;
+    }
+    
+    
+    .pagination{
+        margin: 35px 0 0 0  ;
+        text-align: right;
+    }
+    .totalSum{
+        font-size:12px;
+        line-height:17px;
+        color: #777777;
+        margin-right: 20px;
+    }
+    .pageNum,.prePage,.nextPage, .more{
+        display: inline-block;
+        width: 20px;
+        cursor: pointer;
+        margin: 0 20px 0 0;
+        text-align: center;
+        color: #777;
+    }
+    .prePage,.nextPage{
+        img{
+            position: relative;
+            top: 0px   ;
+        }
+    }
+     .more{
+        cursor: not-allowed;
+    }
+    .arrowPage{
+        width: 6px;
+    }
+    .activePage{
+        color: #5A8EEE;
+    }
+    
+    
+    
+    .ui-datepicker-calendar {
+        border: 0 none;
+        min-width: 0;
+    }
+    .ui-datepicker thead {
+        background-color: #fff;
+        color: #c3cbd6;
+    }
+    .ui-datepicker td {
+        padding: 0;
+        height: auto;
+        color: #657180;
+    }
+    .ui-datepicker td span, .ui-datepicker td a {
+        text-align: center;
+        height: 30px;
+        line-height: 30px;
+    }
+    
+    .ui-state-default, .ui-widget-content .ui-state-default, .ui-widget-header .ui-state-default {
+        border: 0;
+        background-color: #fff;
+        &:hover {
+            background-color: #c4d8fe;
+        }
+    }
+    .ui-datepicker select.ui-datepicker-month, .ui-datepicker select.ui-datepicker-year {
+        color: #333;
+        font-weight: normal;
+        height: 30px;
+        line-height: 30px;
+        margin: 0 5px;
+        width: 40%;
+        border-radius: 3px;
+    }
+    .ui-datepicker .ui-datepicker-prev, .ui-datepicker .ui-datepicker-next {
+        top: 5px;
+    }
+    .ui-state-active, .ui-widget-content .ui-state-active {
+        background-color: #5a8eee !important;
+        color: #fff;
+    }
+    .ui-state-highlight, .ui-widget-content .ui-state-highlight {
+        background-color: #fff5bf !important;
+        color: #657180;
+    }
+    .ui-widget-header {
+        background-color: #fff;
+        border: 0 none;
+    }
+    
+    input::-webkit-outer-spin-button,
+    input::-webkit-inner-spin-button {
+        -webkit-appearance: none;
+    }
+     
+    input[type="number"] {
+        -moz-appearance: textfield;
+    }
+}

+ 2 - 0
src/css/console.less

@@ -72,6 +72,7 @@ body.console {
     height: 36px;
     line-height: 36px;
     padding-left: 15px;
+    cursor: pointer;
   }
 }
 .swiperWrap {
@@ -401,6 +402,7 @@ body.console {
   border-bottom: 1px solid #E2E5EF;
   font-weight: bold;
   font-size: 16px;
+  cursor: pointer;
   .name {
     float: left;
     font-size: 16px;

+ 4 - 0
src/css/deptConsole.less

@@ -186,6 +186,9 @@ body.console {
   box-sizing: border-box;
   border-top: 10px solid #f5f5f5;
   position: relative;
+  .title {
+    cursor: pointer;
+  }
 }
 .btmWrap {
   width: 100%;
@@ -391,6 +394,7 @@ body.console {
   border-bottom: 1px solid #E2E5EF;
   font-weight: bold;
   font-size: 16px;
+  cursor: pointer;
   .name {
     float: left;
     font-size: 16px;

+ 2 - 1
src/css/index.less

@@ -509,4 +509,5 @@ input[type="number"] {
   .btm {
     margin-top: 15px;
   }
-}
+}
+

+ 229 - 0
src/css/mukuai.less

@@ -0,0 +1,229 @@
+.mukuai{
+    width: 100%;
+    height: 100%;
+    overflow-y: auto;
+    .selectUsed,.selectReject {
+        float: right;
+    }
+    ul,li{
+        padding:0;
+        margin:0;
+        list-style:none;
+    }
+    h2{
+        width: 100%;
+        box-sizing: border-box;
+        background-color: #fff;
+        z-index: 20;
+        height: 44px;
+        line-height: 44px;
+        padding: 0 0 0 15px;
+        border-bottom: 1px solid #E2E5EF;
+        font-size: 16px;
+        font-weight: bold;
+        letter-spacing: 1px;
+    }
+    .main-body {
+        margin: 20px 40px;
+    }
+    table{
+        width: 100%;
+        border:1px solid #E2E5EF;
+        border-collapse: collapse;
+        thead{
+            background: #EFF0F9;
+           
+        }
+        th,td{
+            height: 40px;
+            box-sizing: border-box;
+            padding: 10px;
+            border:1px solid #E2E5EF;
+            border-collapse: collapse;
+        }
+        th{
+            font-size: 14px;
+            font-weight: 500;
+        }
+        td{
+            font-size: 14px;
+            font-weight: 400 
+        }
+        .moduleNumber{
+            text-align: center;
+        }
+        
+    }
+    // .filterBox{
+    //     margin: 0 0 20px 0;
+    // }
+    .filterItem{
+        position: relative;
+        display: inline-block;
+        margin-right: 20px;
+        height: 40px;
+        line-height: 40px;
+        margin: 0 20px 20px 0;
+    }
+    .filterDropList{
+        position: absolute;
+        right: 0;
+        height: 200px;
+        overflow-y: auto;
+        background: #fff;
+        display: none;
+        border: 1px solid #e4e7ed;
+        box-shadow: 0 2px 12px 0 #e4e7ed;
+        z-index: 2;
+        li{
+            padding: 0 10px;
+        }
+    }
+    .rejectList, .usedList{
+        height: 120px;
+        li{
+            padding: 0 10px;
+        }
+        li:hover{
+            background-color: #EEF4FF;
+            cursor: pointer;
+        }
+    }
+    .switchImg{
+        width: 30px;
+    }
+    .roleSelect {
+        position: relative;
+        top: 3px;
+        cursor: pointer;
+    }
+    .selectModuleType,.moduleItemInp,.selectUsed, .selectReject{
+        display: inline-block;
+        position: relative;
+        width:140px;
+        padding: 0 10px;
+        height:40px;
+        border-radius:4px;
+        border: 1px solid #E2E5EF;
+        box-sizing: border-box;
+        cursor: pointer;
+        padding-right: 26px;
+    }
+    .arrow{
+        position: absolute;
+        width: 10px;
+        top: 16px;
+        right: 10px;
+    }
+    .moduleItemInp{
+        cursor: default;
+        outline: none;
+    }
+    .moduleTypeList{
+         width: 160px;
+    }
+    .selectUsed, .selectReject{
+        width: 140px;
+    }
+    .modeTypeItem:hover{
+        background-color: #EEF4FF;
+        cursor: pointer;
+    }
+    .rejectList, .usedList {
+        width: 140px;
+    }
+    .filter{
+        display: inline-block;
+        width:60px;
+        height:36px;
+        background:#5A8EEE;
+        border-radius:4px;
+        color: #fff;
+        text-align: center;
+        line-height: 36px;
+        position: relative;
+        top: -1px;
+        cursor: pointer;
+    }
+    .editItem{
+       color: #5A8EEE;
+       cursor: pointer;
+    }
+    .editItemDis{
+        color: #aaa;
+        cursor: not-allowed;
+    }
+    
+    .ellipsis{
+        overflow: hidden;
+        text-overflow:ellipsis;
+        white-space: nowrap;
+    }
+    .textCenter{
+        text-align: center;
+    }
+    
+    
+    .pagination{
+        margin: 35px 0 0 0  ;
+        text-align: right;
+    }
+    .totalSum{
+        font-size:12px;
+        line-height:17px;
+        color: #777777;
+        margin-right: 20px;
+    }
+    .pageNum,.prePage,.nextPage, .more{
+        display: inline-block;
+        width: 20px;
+        cursor: pointer;
+        margin: 0 20px 0 0;
+        text-align: center;
+        color: #777;
+    }
+    .prePage,.nextPage{
+        img{
+            position: relative;
+            top: 0px   ;
+        }
+    }
+     .more{
+        cursor: not-allowed;
+    }
+    .arrowPage{
+        width: 6px;
+    }
+    .activePage{
+        color: #5A8EEE;
+    }
+    
+    input::-webkit-outer-spin-button,
+    input::-webkit-inner-spin-button {
+        -webkit-appearance: none;
+    }
+     
+    input[type="number"] {
+        -moz-appearance: textfield;
+    }
+}
+
+.usrContain .selectReject,.usrContain .selectModuleType ,.managerContainer .selectModuleType  {
+    float: right;
+}
+.usrContain .rejectList,.usrContain .usedList{
+    height: 200px;
+}
+.usrContain .selectModuleType, .usrContain .moduleItemInp, .usrContain .selectUsed, .usrContain .selectReject {
+    width: 170px;
+}
+.managerContainer .moduleTypeList {
+    width: 140px;
+}
+.managerContainer.usrContain .moduleTypeList {
+    width: 170px;
+    height: 400px;
+}
+.managerContainer.usrContain .selectReject {
+    width: 140px;
+}

+ 351 - 0
src/css/partDetail.less

@@ -0,0 +1,351 @@
+.container{
+    width: 100%;
+    height: 100%;
+    overflow: auto;
+}
+.partDetail {
+    ul,li{
+        list-style: none;
+    }
+    h2{
+        width: 100%;
+        box-sizing: border-box;
+        background-color: #fff;
+        z-index: 20;
+        height: 44px;
+        line-height: 44px;
+        padding: 0 0 0 15px;
+        border-bottom: 1px solid #E2E5EF;
+        font-size: 16px;
+        font-weight: bold   ;
+        letter-spacing: 1px;
+    }
+    .main-body{
+        margin: 20px 0;
+        padding: 0 35px;
+        min-width: 1090px;
+        /*width: 100%;*/
+    }
+    table{
+        width: 100%;
+        min-width: 1090px;
+        border:1px solid #E2E5EF;
+        border-collapse: collapse;
+        thead{
+            background: #EFF0F9;
+           
+        }
+        th,td{
+            height: 40px;
+            box-sizing: border-box;
+            padding: 10px;
+            border:1px solid #E2E5EF;
+            border-collapse: collapse;
+        }
+        th{
+            font-size: 14px;
+            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;
+            white-space: nowrap;
+        }
+        .moduleNumber{
+            text-align: center;
+        }
+        .scoreOperaItem{
+            width: 50px;
+            cursor: pointer;
+        }
+        
+    }
+    .tabFoot{
+        height: 40px;
+        /*border: 1px solid #E2E5EF;
+        border-top: none;
+        box-sizing: border-box;*/
+    }
+    .scoreOpera{
+        height: 50px;
+        line-height: 50px;
+        margin: 0 20px 0 0;
+        cursor: pointer;
+        img{
+            margin: 0 10px 0 0;
+        }
+    }
+    
+    .recordScoreOperaBtn{
+        cursor: pointer;
+        color: #5A8EEE;
+    }
+    .recordScoreBtn{
+        cursor: pointer;
+        display: inline-block;
+        width:68px;
+        height:30px;
+        line-height: 30px;
+        text-align: center;
+        border-radius:4px;
+        box-sizing: border-box;
+        border: 1px solid #5A8EEE;
+        color: #5A8EEE;
+    }
+    .filterBox{
+        margin-bottom: 15px;
+    }
+    .filterItem{
+        position: relative;
+        display: inline-block;
+        float: left;
+        height: 40px;
+        line-height: 40px;
+        margin: 0 20px 15px 0;
+        span{
+            display: inline-block;
+            line-height: 40px;
+            position: relative;
+        }
+        input{
+            width:120px;
+            height:40px;
+            border-radius:4px;
+            border: 1px solid #E2E5EF;
+            outline: none;
+            margin-right: 10px;
+            padding: 0 10px;
+            box-sizing: border-box;
+        }
+    }
+    
+    .filterDropList{
+        position: absolute;
+        right: 0;
+        max-height: 200px;
+        overflow-y: auto;
+        background: #fff;
+        display: none;
+        border: 1px solid #e4e7ed;
+        box-shadow: 0 2px 12px 0 #e4e7ed;
+        z-index: 2;
+        li{
+            padding: 0 10px;
+        }
+    }
+    .deptList{
+        width: 160px;
+        max-height: 400px;
+    }
+    .levelList{
+        width: 120px;
+        height: 200px;
+        li:hover{
+            background-color: #EEF4FF;
+            cursor: pointer;
+        }
+    }
+    .selectLevel,.selectDept{
+        display: inline-block;
+        position: relative;
+        width:120px;
+        padding: 0 10px;
+        height:40px;
+        border-radius:4px;
+        border: 1px solid #E2E5EF;
+        box-sizing: border-box;
+        cursor: pointer;
+    }
+    .selectDept{
+        width: 160px;
+    }
+    
+    .filter{
+        display: inline-block;
+        width:60px;
+        height:36px;
+        background:#5A8EEE;
+        border-radius:4px;
+        color: #fff;
+        text-align: center;
+        line-height: 36px;
+        position: relative;
+        top: 2px;
+        cursor: pointer;
+        float: left;
+    }
+    .arrow{
+        position: absolute;
+        width: 10px;
+        top: 16px;
+        right: 10px;
+    }
+    .iconCheck{
+        width: 14px;
+    }
+    .fl{
+        float: left;
+    }
+    .clearfix:after {
+        content: '';
+        height: 0;
+        line-height: 0;
+        display: block;
+        visibility: hidden;
+        clear: both;
+    }
+    .clearfix{
+        zoom:1
+    }
+    .divide{
+        margin: 0 10px;
+    }
+    .datapickerBox{
+        position: relative;
+        display: inline-block;
+        width: 120px;
+        height: 40px;
+        input{
+            position: absolute;
+        }
+    }
+    .iconCalen{
+        position: absolute;
+        width: 15px;
+        top: 12px;
+        right: 10px;
+    }
+    .textCenter{
+        text-align: center;
+    }
+    .patientNameSpan{
+        color: #5A8EEE;
+        cursor: pointer;
+    }
+    
+    .deptItem:hover{
+        background-color: #EEF4FF;
+        cursor: pointer;
+    }
+    .ellipsis{
+        overflow: hidden;
+        text-overflow:ellipsis;
+        white-space: nowrap;
+    }
+    
+    
+    .pagination{
+        margin: 35px 0 0 0  ;
+        text-align: right;
+    }
+    .totalSum{
+        font-size:12px;
+        line-height:17px;
+        color: #777777;
+        margin-right: 20px;
+    }
+    .pageNum,.prePage,.nextPage, .more{
+        display: inline-block;
+        width: 20px;
+        cursor: pointer;
+        margin: 0 20px 0 0;
+        text-align: center;
+        color: #777;
+    }
+    .prePage,.nextPage{
+        img{
+            position: relative;
+            top: 0px   ;
+        }
+    }
+     .more{
+        cursor: not-allowed;
+    }
+    .arrowPage{
+        width: 6px;
+    }
+    .activePage{
+        color: #5A8EEE;
+    }
+    
+    
+    
+    .ui-datepicker-calendar {
+        border: 0 none;
+        min-width: 0;
+    }
+    .ui-datepicker thead {
+        background-color: #fff;
+        color: #c3cbd6;
+    }
+    .ui-datepicker td {
+        padding: 0;
+        height: auto;
+        color: #657180;
+    }
+    .ui-datepicker td span, .ui-datepicker td a {
+        text-align: center;
+        height: 30px;
+        line-height: 30px;
+    }
+    
+    .ui-state-default, .ui-widget-content .ui-state-default, .ui-widget-header .ui-state-default {
+        border: 0;
+        background-color: #fff;
+        &:hover {
+            background-color: #c4d8fe;
+        }
+    }
+    .ui-datepicker select.ui-datepicker-month, .ui-datepicker select.ui-datepicker-year {
+        color: #333;
+        font-weight: normal;
+        height: 30px;
+        line-height: 30px;
+        margin: 0 5px;
+        width: 40%;
+        border-radius: 3px;
+    }
+    .ui-datepicker .ui-datepicker-prev, .ui-datepicker .ui-datepicker-next {
+        top: 5px;
+    }
+    .ui-state-active, .ui-widget-content .ui-state-active {
+        background-color: #5a8eee !important;
+        color: #fff;
+    }
+    .ui-state-highlight, .ui-widget-content .ui-state-highlight {
+        background-color: #fff5bf !important;
+        color: #657180;
+    }
+    .ui-widget-header {
+        background-color: #fff;
+        border: 0 none;
+    }
+    
+    input::-webkit-outer-spin-button,
+    input::-webkit-inner-spin-button {
+        -webkit-appearance: none;
+    }
+     
+    input[type="number"] {
+        -moz-appearance: textfield;
+    }
+}

+ 96 - 0
src/css/reset.less

@@ -289,3 +289,99 @@ input:-moz-placeholder{    /* Mozilla Firefox 4 to 18 */
 input:-ms-input-placeholder{  /* Internet Explorer 10-11 */
   color:#ccc;
 }
+
+
+
+.grayLine {
+  height: 10px;
+  background-color: #f5f5f5;
+}
+.partTitleT {
+  height: 44px;
+}
+.partTitle {
+  position: absolute;
+  top: 0;
+  right: 0;
+  width: 100%;
+  box-sizing: border-box;
+  background-color: #fff;
+  z-index: 20;
+  height: 44px;
+  line-height: 44px;
+  padding-left: 15px;
+  font-size: 14px;
+  font-weight: bold;
+  letter-spacing: 1px;
+  min-width: 100px;
+  p {
+    display: inline-block;
+    font-size: 16px;
+    span {
+      font-size: 16px;
+    }
+  }
+  .dateDetail {
+    font-size: 12px;
+    color: #777777;
+    margin-right: 30px;
+    font-weight: normal;
+  }
+  .monthYear {
+    float: right;
+    margin-right: 20px;
+    border: 1px solid #5A8EEE;
+    height: 28px;
+    line-height: 28px;
+    border-radius: 4px;
+    overflow: hidden;
+    cursor: pointer;
+    margin-top: 7px;
+    span {
+      width: 48px;
+      height: 28px;
+      line-height: 28px;
+      display: inline-block;
+      text-align: center;
+      font-weight: normal;
+    }
+    .year {
+      background-color: #5A8EEE;
+      color: #fff;
+    }
+    .mon {
+      color: #5A8EEE;
+    }
+  }
+}
+
+.filterBox {
+  .filter {
+    display: inline-block;
+    width:60px;
+    height:36px;
+    background:#5A8EEE;
+    border-radius:4px;
+    color: #fff;
+    text-align: center;
+    line-height: 36px;
+    position: relative;
+    top: -1px;
+    cursor: pointer;
+  }
+  .filterclear{
+      display: inline-block;
+      width:60px;
+      height:34px;
+      background:#fff;
+      border-radius:4px;
+      color: #777;
+      border: 1px solid #777;
+      text-align: center;
+      line-height: 34px;
+      position: relative;
+      top: -1px;
+      cursor: pointer;
+      margin-left: 5px;
+  }
+}

+ 232 - 0
src/css/tiaomu.less

@@ -0,0 +1,232 @@
+.tiaomu{
+    width: 100%;
+    height: 100%;
+    overflow-y: auto;
+    .rejectList {
+        height: 80px !important;
+    }
+    .selectUsed,.selectReject {
+        float: right;
+    }
+    ul,li{
+        padding:0;
+        margin:0;
+        list-style:none;
+    }
+    h2{
+        width: 100%;
+        box-sizing: border-box;
+        background-color: #fff;
+        z-index: 20;
+        height: 44px;
+        line-height: 44px;
+        padding: 0 0 0 15px;
+        border-bottom: 1px solid #E2E5EF;
+        font-size: 16px;
+        font-weight: bold;
+        letter-spacing: 1px;
+    }
+    .main-body{
+        margin: 20px 40px;
+    }
+    table{
+        width: 100%;
+        border:1px solid #E2E5EF;
+        border-collapse: collapse;
+        thead{
+            background: #EFF0F9;
+           
+        }
+        th,td{
+            height: 40px;
+            box-sizing: border-box;
+            padding: 10px;
+            border:1px solid #E2E5EF;
+            border-collapse: collapse;
+        }
+        th{
+            font-size: 14px;
+            font-weight: 500;
+        }
+        td{
+            font-size: 14px;
+            font-weight: 400 
+        }
+        .moduleNumber{
+            text-align: center;
+        }
+        
+    }
+    // .filterBox{
+    //     margin: 0 0 20px 0;
+    // }
+    .filterItem{
+        position: relative;
+        display: inline-block;
+        margin-right: 20px;
+        height: 40px;
+        line-height: 40px;
+        margin: 0 20px 20px 0;
+    }
+    .filterDropList{
+        position: absolute;
+        right: 0;
+        height: 200px;
+        overflow-y: auto;
+        background: #fff;
+        display: none;
+        border: 1px solid #e4e7ed;
+        box-shadow: 0 2px 12px 0 #e4e7ed;
+        z-index: 2;
+        li{
+            padding: 0 10px;
+        }
+    }
+    .rejectList, .usedList{
+        height: 120px;
+        li{
+            padding: 0 10px;
+        }
+        li:hover{
+            background-color: #EEF4FF;
+            cursor: pointer;
+        }
+    }
+    .switchImg{
+        width: 30px;
+    }
+    .roleSelect {
+        position: relative;
+        top: 3px;
+        cursor: pointer;
+    }
+    .selectModuleType,.moduleItemInp,.selectUsed, .selectReject{
+        display: inline-block;
+        position: relative;
+        width:140px;
+        padding: 0 10px;
+        height:40px;
+        border-radius:4px;
+        border: 1px solid #E2E5EF;
+        box-sizing: border-box;
+        cursor: pointer;
+        padding-right: 26px;
+    }
+    .arrow{
+        position: absolute;
+        width: 10px;
+        top: 16px;
+        right: 10px;
+    }
+    .moduleItemInp{
+        cursor: default;
+        outline: none;
+    }
+    .moduleTypeList{
+         width: 160px;
+    }
+    .selectUsed, .selectReject{
+        width: 140px;
+    }
+    .modeTypeItem:hover{
+        background-color: #EEF4FF;
+        cursor: pointer;
+    }
+    .rejectList, .usedList {
+        width: 140px;
+    }
+    .filter{
+        display: inline-block;
+        width:60px;
+        height:36px;
+        background:#5A8EEE;
+        border-radius:4px;
+        color: #fff;
+        text-align: center;
+        line-height: 36px;
+        position: relative;
+        top: -1px;
+        cursor: pointer;
+    }
+    .editItem{
+       color: #5A8EEE;
+       cursor: pointer;
+    }
+    .editItemDis{
+        color: #aaa;
+        cursor: not-allowed;
+    }
+    
+    .ellipsis{
+        overflow: hidden;
+        text-overflow:ellipsis;
+        white-space: nowrap;
+    }
+    .textCenter{
+        text-align: center;
+    }
+    
+    
+    .pagination{
+        margin: 35px 0 0 0  ;
+        text-align: right;
+    }
+    .totalSum{
+        font-size:12px;
+        line-height:17px;
+        color: #777777;
+        margin-right: 20px;
+    }
+    .pageNum,.prePage,.nextPage, .more{
+        display: inline-block;
+        width: 20px;
+        cursor: pointer;
+        margin: 0 20px 0 0;
+        text-align: center;
+        color: #777;
+    }
+    .prePage,.nextPage{
+        img{
+            position: relative;
+            top: 0px   ;
+        }
+    }
+     .more{
+        cursor: not-allowed;
+    }
+    .arrowPage{
+        width: 6px;
+    }
+    .activePage{
+        color: #5A8EEE;
+    }
+    
+    input::-webkit-outer-spin-button,
+    input::-webkit-inner-spin-button {
+        -webkit-appearance: none;
+    }
+     
+    input[type="number"] {
+        -moz-appearance: textfield;
+    }
+}
+
+.usrContain .selectReject,.usrContain .selectModuleType ,.managerContainer .selectModuleType  {
+    float: right;
+}
+.usrContain .rejectList,.usrContain .usedList{
+    height: 200px;
+}
+.usrContain .selectModuleType, .usrContain .moduleItemInp, .usrContain .selectUsed, .usrContain .selectReject {
+    width: 170px;
+}
+.managerContainer .moduleTypeList {
+    width: 140px;
+}
+.managerContainer.usrContain .moduleTypeList {
+    width: 170px;
+    height: 400px;
+}
+.managerContainer.usrContain .selectReject {
+    width: 140px;
+}

+ 83 - 0
src/html/abnormal.html

@@ -0,0 +1,83 @@
+<!DOCTYPE html>
+<html lang="en">
+
+<head>
+    <meta charset="UTF-8">
+    <meta name="viewport" content="width=device-width, initial-scale=1.0">
+    <meta http-equiv="X-UA-Compatible" content="ie=edge">
+    <title>异常数据监控</title>
+</head>
+
+<body>
+    <div class="container abnormal">
+        <div class="partTitle">
+          <p><span></span>异常数据监控</p>
+          <div class="monthYear">
+            <span class="mon">本月</span>
+            <span class="year">本年</span>
+          </div> 
+          <div class="dateDetail fr">
+            
+          </div>
+        </div>
+        <div class="partTitleT"></div>
+        <div class="grayLine"></div>
+        <div class="main-body">
+            <div class="filterBox clearfix">
+                <span class="filterItem typeFilter">
+                    <span>病历号:</span>
+                    <input class="patientNumInp" style="width: 148px;" type="text" placeholder="请输入病人住院序号">
+                </span>
+                <span class="filterItem typeFilter deptListWrap">
+                    <span>异常归属模块:</span>
+                    <span class="selectDept"> 
+                        全部
+                    </span>
+                    <ul class="deptList filterDropList">
+                        <li class="deptItem " data-id=" " data-name="全部">全部</li>
+                        <li class="deptItem ellipsis" title="数据模块" data-id="1" data-name="数据模块">数据模块</li>
+                        <li class="deptItem ellipsis" title="质控类型" data-id="2" data-name="质控类型">质控类型</li>
+                        <li class="deptItem ellipsis" title="XML结构" data-id="3" data-name="XML结构">XML结构</li>
+                    </ul>
+                </span>
+                <span class="filterItem">
+                    <span>状态:</span>
+                    <span class="selectLevel">全部</span>
+                    <ul class="levelList filterDropList">
+                        <Li class="levelItem" data-name="全部" data-id="">全部</Li>
+                        <Li class="levelItem" data-name="未处理" data-status="0" data-id="0">未处理</Li>
+                        <Li class="levelItem" data-name="已处理" data-status="1" data-id="1">已处理</Li>
+                    </ul>
+                </span>
+                <span class="filter">查询</span>
+            </div>
+            <div>
+                <table>
+                    <thead>
+                    <th class="moduleName" style="width: 65px;">序号</th>
+                    <th class="recordScoreOpera textCenter" style="width: 65px;">类型</th>
+                    <th class="beHospitalId textCenter">病历号</th>
+                    <th class="patientNo textCenter" >异常归属模块</th>
+                    <th class="patientName textCenter" style="width: 100px;">异常说明</th>
+                    <th class="patientSex textCenter" >状态</th>
+                    <th class="patientage textCenter" >备注</th>
+                    <th class="patientage textCenter" >操作</th>
+                    </thead>
+                    <tbody>
+
+                    </tbody>
+                </table>
+            </div>
+
+            <!--<div class="tabFoot">
+                <span class="scoreOpera" data-selectAll=false><img class="iconCheck" src="" alt="checkbox">全选</span>
+                <span class="recordScoreBtn">评分</span>
+            </div>-->
+
+            <div class="pagination"></div>
+        </div>
+        
+    </div>
+</body>
+
+</html>

+ 55 - 0
src/html/mukuai.html

@@ -0,0 +1,55 @@
+<!DOCTYPE html>
+<html lang="en">
+
+<head>
+    <meta charset="UTF-8">
+    <meta name="viewport" content="width=device-width, initial-scale=1.0">
+    <meta http-equiv="X-UA-Compatible" content="ie=edge">
+    <title></title>
+    
+</head>
+
+<body>
+    <div class="managerContainer mukuai">
+        <div class="partTitle">
+          <p><span></span>各模块缺陷占比</p>
+          <div class="monthYear">
+            <span class="mon">本月</span>
+            <span class="year">本年</span>
+          </div> 
+          <div class="dateDetail fr">
+            
+          </div>
+        </div>
+        <div class="partTitleT"></div>
+        <div class="grayLine"></div>
+        <div class="main-body">
+            <div class="filterBox">
+                <span class="filterItem">
+                    <span>模块名称:</span>
+                    <span class="">
+                        <input class="moduleItemInp" type="text" placeholder="请输入模块名称">
+                    </span>
+                </span>
+                <span class="filter">查询</span>
+                <span class="filterclear">清空</span>
+            </div>
+            <table>
+                <thead>
+                    <th class="moduleName" style="width: 65px;">序号</th>
+                    <th class="moduleItemName">模块名称</th>
+                    <th class="moduleScore" style="width: 80px;">缺陷占比</th>
+                </thead>
+                <tbody>
+    
+                </tbody>
+            </table>
+            <div class="pagination"></div>
+        </div>
+        
+        
+        
+    </div>
+</body>
+
+</html>

+ 108 - 0
src/html/partDetail.html

@@ -0,0 +1,108 @@
+<!DOCTYPE html>
+<html lang="en">
+
+<head>
+    <meta charset="UTF-8">
+    <meta name="viewport" content="width=device-width, initial-scale=1.0">
+    <meta http-equiv="X-UA-Compatible" content="ie=edge">
+    <title>病历质控评分</title>
+    
+</head>
+
+<body>
+    <div class="container partDetail">
+        <h2>质控评分</h2>
+        <div class="main-body">
+            <div class="filterBox clearfix">
+                <span class="filterItem typeFilter">
+                    <span>病人住院序号:</span>
+                    <input class="patientNumInp" style="width: 148px;" type="text" placeholder="请输入病人住院序号">
+                </span>
+                <span class="filterItem typeFilter">
+                    <span>病人姓名:</span>
+                    <input class="patientNameInp" type="text" placeholder="请输入病人姓名">
+                </span>
+                <span class="filterItem typeFilter deptListWrap">
+                    <span>科室:</span>
+                    <span class="selectDept"> 
+                        全部
+                    </span>
+                   
+                    <ul class="deptList filterDropList"></ul>
+                </span>
+                <span class="filterItem doctorFilter">
+                    <span>医生姓名:</span>
+                    <input class="doctorInp" type="text" placeholder="请输入医生姓名">
+                </span>
+                <span class="filterItem doctorFilter">
+                    <span>医生工号:</span>
+                    <input class="doctorNumInp" type="text" placeholder="请输入医生工号">
+                </span>
+                <span class="filterItem typeFilter clearfix">
+                    <span class="fl">入院日期:</span>
+                    <span class="datapickerBox fl"><input type="text" placeholder="请选择时间" id="datepicker" autocomplete="off" /></span>
+                    <span  class="divide fl">-</span>
+                    <span class="datapickerBox fl"><input type="text" placeholder="请选择时间" id="datepicker2"  autocomplete="off" /></span>
+                </span>
+                <span class="filterItem">
+                    <span>病历等级:</span>
+                    <span class="selectLevel">全部</span>
+                    <ul class="levelList filterDropList">
+                        <Li class="levelItem" data-name="全部" data-id="">全部</Li>
+                        <Li class="levelItem" data-name="未评分" data-id="未评分">未评分</Li>
+                        <Li class="levelItem" data-name="甲" data-id="甲">甲</Li>
+                        <li class="levelItem" data-name="乙" data-id=乙>乙</li>
+                        <li class="levelItem" data-name="丙" data-id=丙>丙</li>
+                    </ul>
+                </span>
+                <span class="filter">查询</span>
+            </div>
+            <div>
+                <table>
+                    <thead>
+                    <th class="textCenter" ></th>
+                    <th class="recordScoreOpera textCenter" style="width: 65px;">操作</th>
+                    <th class="beHospitalId textCenter" code="behospital_code">病人住院序号</th>
+                    <th class="patientNo textCenter" code="file_code">病案号</th>
+                    <th class="patientName textCenter" code="name" style="width: 100px;">病人姓名</th>
+                    <th class="patientSex textCenter" code="sex">性别</th>
+                    <th class="patientage textCenter" code="age">年龄</th>
+                    <th class="bedNum textCenter" code="bed_code">床号</th>
+                    <th class="inHospitalDate textCenter" code="behospital_date">入院日期</th>
+                    <th class="outHospitalDate textCenter" code="leave_hospital_date">出院日期</th>
+                    <th class="doctorName textCenter" code="beh_doctor_name">住院医生</th>
+                    <th class="doctorName textCenter" code="doctor_name">主管医生</th>
+                    <th class="doctorName textCenter" code="director_doctor_name">主任医生</th>
+                    <th class="deptName textCenter" code="beh_dept_name">科室</th>
+                    <th class="recordLevel textCenter" code="level">病历等级</th>
+                    <th class="recordScore textCenter" code="score_res">病历得分</th>
+                    <th class="scoreTime textCenter" code="grade_time">评分时间</th>
+                    </thead>
+                    <tbody>
+
+                    </tbody>
+                    <tfoot>
+                    <tr>
+                        <td colspan="17">
+                            <div class="tabFoot">
+                                <span class="scoreOpera" data-selectAll=false><img class="iconCheck" src="../images/icon_unchecked.png" alt="checkbox">全选</span>
+                                <span class="recordScoreBtn">评分</span>
+                            </div>
+                        </td>
+                    </tr>
+                    </tfoot>
+                </table>
+            </div>
+
+            <!--<div class="tabFoot">
+                <span class="scoreOpera" data-selectAll=false><img class="iconCheck" src="" alt="checkbox">全选</span>
+                <span class="recordScoreBtn">评分</span>
+            </div>-->
+
+            <div class="pagination"></div>
+        </div>
+        
+    </div>
+</body>
+
+</html>

+ 60 - 0
src/html/tiaomu.html

@@ -0,0 +1,60 @@
+<!DOCTYPE html>
+<html lang="en">
+
+<head>
+    <meta charset="UTF-8">
+    <meta name="viewport" content="width=device-width, initial-scale=1.0">
+    <meta http-equiv="X-UA-Compatible" content="ie=edge">
+    <title></title>
+    
+</head>
+
+<body>
+    <div class="managerContainer tiaomu">
+        <div class="partTitle">
+          <p><span></span>条目缺陷占比</p>
+          <div class="monthYear">
+            <span class="mon">本月</span>
+            <span class="year">本年</span>
+          </div> 
+          <div class="dateDetail fr">
+            
+          </div>
+        </div>
+        <div class="partTitleT"></div>
+        <div class="grayLine"></div>
+        <div class="main-body">
+            <div class="filterBox">
+                <span class="filterItem">
+                    <span>条目名称:</span>
+                    <span class="">
+                        <input class="moduleItemInp" type="text" placeholder="请输入条目名称">
+                    </span>
+                </span>
+                <!-- <span class="filterItem">
+                    <span>时间类型:</span>
+                    <span class="selectReject ellipsis">本年</span>
+                    <ul class="rejectList filterDropList">
+                        <li  class="rejectItem" data-name="本月" data-id=1>本月</li>
+                        <li  class="rejectItem" data-name="本年" data-id=2>本年</li>
+                    </ul>
+                </span> -->
+                <span class="filter">查询</span>
+                <span class="filterclear">清空</span>
+            </div>
+            <table>
+                <thead>
+                    <th class="moduleName" style="width: 65px;">序号</th>
+                    <th class="moduleItemName">条目名称</th>
+                    <th class="moduleScore" style="width: 80px;">缺陷占比</th>
+                </thead>
+                <tbody>
+    
+                </tbody>
+            </table>
+            <div class="pagination"></div>
+        </div>
+    </div>
+</body>
+
+</html>

+ 474 - 0
src/js/abnormal.js

@@ -0,0 +1,474 @@
+const $ = require('jquery');
+require("../css/abnormal.less");
+require('./modal.js');
+const {api} = require('./api.js')
+const {post,getCookie} = require('./utils.js')
+require('./../resource/jquery-ui/jquery-ui.min.js');
+require('./../resource/jquery-ui/jquery-ui.min.css');
+const iconCheck= require("./../images/icon_check.png")
+const iconUnCheck = require("./../images/icon_unchecked.png")
+const  iconCalenBlue= require("./../images/icon_calen_blue.png")
+const  iconCalenGrey= require("./../images/icon_calen_grey.png")
+const iconDown= require("./../images/arrow_down.png")
+const iconUp = require("./../images/arrow_up.png")
+const loadingImg = require("./../images/loading.gif")
+const arrowLeft= require("./../images/arrow_left.png")
+const arrowRight = require("./../images/arrow_right.png")
+
+$(".selectLevel").append(`<img class="arrow" src=${iconDown} alt="下拉">`)
+$(".selectDept").append(`<img class="arrow" src=${iconDown} alt="下拉">`)
+let tabList = [], name = "", behospitalCode="", behosDateStart="", level="",behosDateEnd="", scoreSum = 0,statisticsType=2,
+  nameTemp = "", behospitalCodeTemp="",levelTemp="", deptId="",deptIdTemp="", doctorName="", doctorNum="",doctorNameTemp="",doctorNumTemp="",
+  data_desc=[],data_asc=[];
+
+$('.datapickerBox').append(`<img class="iconCalen" src=${iconCalenGrey} />`)
+$('.iconCalen').on("mouseenter", function(e){
+    $(this).attr("src", iconCalenBlue)
+})
+$('.iconCalen').on("mouseleave", function(e){
+    $(this).attr("src", iconCalenGrey)
+})
+$('.iconCalen').on("click", function(e){
+    $(this).parent().find("input").focus()
+})
+$('.recordScoreBtn').css("opacity",hasData('FUNC000017')?'1':'0.5')
+dateChange()
+//所有数据切换日期筛选
+function dateChange(){
+    $(".monthYear .mon").click(function(){
+        $(this).css({
+            backgroundColor:'#5A8EEE',
+            color:'#fff'
+        }).siblings().css({
+            color:'#5A8EEE',
+            backgroundColor:'#fff'
+        })
+        statisticsType = 1
+        getTabData(1)
+    })
+    $(".monthYear .year").click(function(){
+        $(this).css({
+            backgroundColor:'#5A8EEE',
+            color:'#fff'
+        }).siblings().css({
+            color:'#5A8EEE',
+            backgroundColor:'#fff'
+        })
+        statisticsType = 2
+        getTabData(1)
+    })
+}
+//判断有无某一权限
+  function hasData(data){
+    let trdObj = JSON.parse(getCookie("trdObj"))
+    let lis = trdObj['YH-BLZK-ZKPF']
+    if(!lis){
+      return false
+    }
+    if(lis.indexOf(data)>-1){//有权限
+        return true
+    }
+    return false;
+}
+function getTabData(activePage){
+    const param = {
+        current:activePage,
+        size: 15,
+        behospitalCode: behospitalCode||"",//病历号
+        type: deptId||"",//(1:数据模块 2:质控类型 3:XML结构)
+        status: level||"",//(0:未处理,1:已处理)
+        statisticsType: statisticsType||2, //1-本月,2-本年
+    }
+    post(api.getQcAnnormal,param).then(res =>{
+        if(res.data.code == '0'){
+            const data = res.data.data;
+            tabList = data.records;
+            const totalPage = data.pages;
+            const totalNum = data.total;
+            renderTab(tabList,data.hospitalId,activePage);
+            renderPagination(totalPage,Number(activePage),totalNum)
+            if(totalPage > 1){
+                renderPagination(totalPage,Number(activePage),totalNum)
+            } else{
+                $('.pagination').html("")
+            }
+        }else{
+            $.alerModal({"message":res.data.msg,type:"tip",time:'1000',isFather: true, fatherWrapper: $("#mainBox", parent.document)});
+        }
+    }).catch((e) =>{
+    
+    })
+}
+
+getTabData(1)
+
+$(".filter").on("click", function(e){
+    name = nameTemp
+    behospitalCode = behospitalCodeTemp
+    level = levelTemp
+    deptId = deptIdTemp
+    getTabData(1)
+})
+function renderTab(data,hisId,activePage){
+    let str = ``
+    for(let i = 0; i < data.length; i++){
+        const item = data[i]
+        console.log(item)
+        str += `
+            <tr  data-index=${i}>
+                <td  class="textCenter">${(activePage-1)*15 + i+1}</td>
+                <td>${item.type || "-"}</td>
+                <td>${item.behospitalCode || "-"}</td>
+                <td >${item.typeName || "-"}</td>
+                <td>${item.description || "-"}</td>
+                <td>${item.statusName || "-"}</td>
+                <td>${item.remark || "-"}</td>
+                <td  class="textCenter">
+                    <span data-index=${i} class="patientNameSpan">修改<span>
+                    <span data-index=${i} class="patientNameSpan">删除<span>
+                </td>
+            </tr>
+        `
+    }
+    $('tbody').html(str)
+    bindScoreOperaItem()
+    bindRecordScoreOper()
+    bindScoreDetail(hisId)
+}
+
+function scoreDetail(id,age,hid,code){
+    window.open(`./qcScore.html?id=${id}&age=${age}&hid=${hid}&code=${code}`)
+}
+function bindScoreDetail(hisId){
+    $('.patientNameSpan').on('click',function(e){
+        const index = $(this).attr("data-index")
+        const id = tabList[index].behospitalCode
+        const age = tabList[index].age;
+        const noScore = tabList[index].level == '未评分'
+        if(noScore){
+            $.alerModal({"message":'请先进行评分!',type:"tip",time:'1000',isFather: true, fatherWrapper: $("#mainBox", parent.document)});
+            return
+        } else{
+            scoreDetail(id,age,hisId,'YH-BLZK-ZKPF')
+        }
+       
+    })
+}
+
+//选择病历等级
+$('.selectLevel').on("click", function(e){
+    e.stopPropagation()
+    $(".deptList ").css("display", "none")
+    $(".selectDept .arrow").attr("src",iconDown)
+    const showList =  $(".levelList ").css("display")
+    if(showList == "none" ||!showList){
+        $(".levelList ").css("display","block")
+        $(".selectLevel .arrow").attr("src",iconUp)
+    }else{
+        $(".levelList ").css("display", "none")
+        $(".selectLevel .arrow").attr("src",iconDown)
+    }
+})
+
+bindLeveldSelect()
+//是否启用选择
+function bindLeveldSelect(){
+    $('.levelItem').on("click",function(){
+        const levelItemName = $(this).attr("data-name")
+        const levelItemItemId = $(this).attr("data-id")
+        levelTemp =levelItemItemId
+        $('.selectLevel').html(levelItemName)
+        $(".levelList").css("display", "none")
+        $(".selectLevel").append(`<img class="arrow" src=${iconDown} alt="下拉">`)
+    })
+}
+
+//全选绑定
+bindOperaAll()
+function bindScoreOperaItem(){
+    $(".scoreOperaItem").on("click",  function(e){
+        const index = $(this).parent().attr("data-index")
+        tabList[index].hasSelect = tabList[index].hasSelect ? false:true
+        renderTab(tabList)
+    })
+}
+function bindRecordScoreOper(){
+    $(".recordScoreOperaBtn").on("click",  function(e){
+        if(!hasData('FUNC000017')){
+            return
+        }
+        const index = $(this).parent().attr("data-index")
+        const behospitalCode = tabList[index].behospitalCode
+        loading()
+        recordScore(behospitalCode,1)
+    })
+}
+function bindOperaAll(){
+    $('.scoreOpera').on("click", function(e){
+        const hasSelectAll = $('.scoreOpera').attr("data-selectall")
+        if(hasSelectAll == 'true'){
+
+            for(let i = 0; i < tabList.length; i++){
+                tabList[i].hasSelect = false
+            }
+        }else{
+            for(let i = 0; i < tabList.length; i++){
+                tabList[i].hasSelect = true
+            }
+        }
+        renderTab(tabList)
+    })
+}
+
+$('.selectDept').on("click", function(e){
+    e.stopPropagation()
+    $(".levelList ").css("display","none")
+    $(".selectLevel .arrow").attr("src",iconDown)
+    const showList =  $(".deptList ").css("display")
+    if(showList == "none" ||!showList){
+        $(".deptList ").css("display","block")
+        $(".selectDept .arrow").attr("src",iconUp)
+    }else{
+        $(".deptList ").css("display", "none")
+        $(".selectDept .arrow").attr("src",iconDown)
+    }
+})
+
+//获取科室列表
+// getDeptList()
+// function getDeptList(){
+//     post(api.getDeptList,{inputStr:""}).then(res =>{
+//         if(res.data.code == '0'){
+//            const  deptList = res.data.data
+//            rendeDeptList(deptList)
+//         }else{}
+//     }).catch((e) =>{
+
+//     })
+// }
+
+
+function rendeDeptList(deptList){
+    let str = `<li class="deptItem " data-id=" " data-name="全部">全部</li>`
+    for(let i = 0; i < deptList.length; i++){
+        str += `<li class="deptItem ellipsis" title=${deptList[i].deptName} data-id=${deptList[i].deptId} data-name=${deptList[i].deptName}> ${deptList[i].deptName}</li>`
+    }
+    $('.deptList').html(str)
+}
+bindDeptSelect()
+//科室选择
+function bindDeptSelect(){
+    $('.deptItem').on("click",function(){
+        const deptItemName = $(this).attr("data-name")
+        const deptItemId = $(this).attr("data-id")
+        deptIdTemp =deptItemId
+        if(deptItemName.length > 10){
+            $('.selectDept').html(deptItemName.substring(0,8)+'...')
+        }else{
+            $('.selectDept').html(deptItemName)
+        }
+        $('.selectDept ').attr('title',deptItemName)
+        $(".selectDept").append(`<img class="arrow" src=${iconDown} alt="下拉">`)
+
+        $(".deptList").css("display", "none")
+    })
+}
+function loading(){
+    const str = `
+    <div class="loadingBox">
+            <div class="mask"></div>
+            <img class="loadingImg" src=${loadingImg}  alt="loading" />
+        </div>
+    `
+    $("#mainBox", parent.document).append(str)
+}
+function hideLoading(){
+    $("#mainBox .loadingBox", parent.document).remove()
+}
+$('.recordScoreBtn').on("click",function(e){
+    if(!hasData('FUNC000017')){
+        return
+    }
+    let scoreList = []
+    for(let i = 0; i <tabList.length; i++){
+        if(tabList[i].hasSelect){
+            scoreList.push(tabList[i].behospitalCode)
+        }
+    }
+    if(scoreList.length === 0){
+        $.alerModal({"message":'请选择要评分的项!',type:"tip",time:'1000',isFather: true, fatherWrapper: $("#mainBox", parent.document)});
+        return
+    } else{
+        loading()
+        for(let j = 0; j < scoreList.length; j++){
+            recordScore(scoreList[j],scoreList.length)
+        }
+    }
+})
+$("th[code]").on("click",function(e){
+    const code=$(this).attr("code");
+    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);
+});
+function recordScore(behospitalCode,totalNum){
+    const param = {
+        behospitalCode: behospitalCode
+    }
+    post(api.recordScore,param).then(res =>{
+        if(res.data.code == '0'){
+            scoreSum++
+            if(scoreSum === totalNum){
+                hideLoading()
+                scoreSum = 0
+                const activePage = $(".activePage").attr('data-page') || 1
+
+                getTabData(activePage)
+            }
+      
+        }else{}
+    }).catch((e) =>{
+    
+    })
+}
+$(".patientNumInp").on("input", function(e){
+    const val = $(this).val().trim()
+    behospitalCodeTemp = val
+})
+$(".patientNameInp").on("input", function(e){
+    const val = $(this).val().trim()
+    nameTemp = val
+})
+$(".doctorInp").on("input", function(e){
+    const val = $(this).val().trim()
+    doctorNameTemp = val
+})
+$(".doctorNumInp").on("input", function(e){
+  const val = $(this).val().trim();
+    doctorNumTemp = val
+})
+$(function() {
+    $.datepicker.regional['zh-CN'] = {
+    clearText: '清除',
+    clearStatus: '清除已选e799bee5baa6e59b9ee7ad9431333361303131日期',
+    closeText: '关闭',
+    closeStatus: '不改变当前选择',
+    prevText: '<上月',
+    prevStatus: '显示上月',
+    prevBigText: '<<',
+    prevBigStatus: '显示上一年',
+    nextText: '下月>',
+    nextStatus: '显示下月',
+    nextBigText: '>>',
+    nextBigStatus: '显示下一年',
+    currentText: '今天',
+    currentStatus: '显示本月',
+    monthNames: ['一月','二月','三月','四月','五月','六月', '七月','八月','九月','十月','十一月','十二月'],
+    monthNamesShort: ['一月','二月','三月','四月','五月','六月', '七月','八月','九月','十月','十一月','十二月'],
+    yearNamesShort: ['一月','二月','三月','四月','五月','六月', '七月','八月','九月','十月','十一月','十二月'],
+    monthStatus: '选择月份',
+    yearStatus: '选择年份',
+    weekHeader: '周',
+    weekStatus: '年内周次',
+    dayNames: ['星期日','星期一','星期二','星期三','星期四','星期五','星期六'],
+    dayNamesShort: ['周日','周一','周二','周三','周四','周五','周六'],
+    dayNamesMin: ['日','一','二','三','四','五','六'],
+    dayStatus: '设置 DD 为一周起始',
+    dateStatus: '选择 m月 d日, DD',
+    dateFormat: 'yy-mm-dd',
+    firstDay: 1,
+    initStatus: '请选择日期',
+    isRTL: false};
+    $.datepicker.setDefaults($.datepicker.regional['zh-CN']);
+
+    $( "#datepicker" ).datepicker({
+        changeMonth: true,
+        changeYear: true,
+        dateFormat:"yy/mm/dd"
+    });
+    $( "#datepicker2" ).datepicker({
+        changeMonth: true,
+        changeYear: true,
+        dateFormat:"yy/mm/dd"
+    });
+});
+
+//分页渲染
+function renderPagination(totalPage,activePage,totalNum){
+    let str = `<span class="totalSum">共${totalPage}页/${totalNum}条数据</span><span class="prePage"><img class="arrowPage" src=${arrowLeft} /></span>`
+    if(totalPage <= 6){
+        for(let i = 1; i <= totalPage; i++){
+          
+            str += `<span class="pageNum ${'page'+i}" data-page=${i}>${i}</span>`
+        }
+    }else{
+        if(activePage <= 3){ //选中页数小于4
+            for(let i = 1; i <= 4; i++){
+                str += `<span class="pageNum ${'page'+i}" data-page=${i}>${i}</span>`
+            }
+            str += `<span class="more" >...</span>`
+        str += `<span class="pageNum ${'page'+totalPage}" data-page=${totalPage}>${totalPage}</span>`
+
+        } else if(activePage > totalPage -3){
+            str += `<span class="pageNum page1" data-page=1>1</span>`
+            str += `<span class="more" >...</span>`
+            str += `<span class="pageNum ${'page'+(totalPage-3)}" data-page=${totalPage -3}>${totalPage -3}</span>`
+            str += `<span class="pageNum ${'page'+(totalPage-2)}" data-page=${totalPage -2}>${totalPage -2}</span>`
+            str += `<span class="pageNum ${'page'+(totalPage-1)}" data-page=${totalPage -1}>${totalPage -1}</span>`
+            str += `<span class="pageNum ${'page'+totalPage}" data-page=${totalPage}>${totalPage}</span>`
+        } else {
+            str += `<span class="pageNum page1" data-page=1>1</span>`
+            str += `<span class="more" >...</span>`
+            str += `<span class="pageNum ${'page'+(activePage -1)}" data-page=${activePage -1}>${activePage -1}</span>`
+            str += `<span class="pageNum ${'page'+activePage}" data-page=${activePage}>${activePage}</span>`
+            str += `<span class="pageNum ${'page'+(activePage +1)}" data-page=${activePage +1}>${activePage +1}</span>`
+            str += `<span class="more" >...</span>`
+            str += `<span class="pageNum ${'page'+totalPage}" data-page=${totalPage}>${totalPage}</span>`
+        }
+       
+    }
+    str += `<span class="nextPage"><img class="arrowPage" src=${arrowRight} /></span>`
+    $('.pagination').html(str)
+    $('.page' + activePage).addClass('activePage')
+    $(".pageNum").on("click", function(e){
+        const activePageNow = Number($(this).attr('data-page'))
+        getTabData(activePageNow)
+        // renderPagination(totalPage,activePageNow,totalNum)
+    })
+    $(".prePage").on("click", function(e){
+        let activePageNow = Number($(".activePage").attr('data-page'))
+        if(activePageNow > 1){
+            activePageNow--
+            getTabData(activePageNow)
+            // renderPagination(totalPage,activePageNow,totalNum)
+        }
+    })
+    $(".nextPage").on("click", function(e){
+        let activePageNow = Number($(".activePage").attr('data-page'))
+        if(activePageNow < totalPage){
+            activePageNow++
+            getTabData(activePageNow)
+            // renderPagination(totalPage,activePageNow,totalNum)
+        }
+    })
+    
+}
+
+$(document).on("click", function(){
+    $(".levelList ").css("display", "none")
+    $(".deptList").css("display", "none")
+    $(".selectLevel .arrow").attr("src",iconDown)
+    
+})
+
+$((function($){
+})($));

+ 44 - 1
src/js/api.js

@@ -1,5 +1,14 @@
 
 const api = {
+    getMenu:'/sys/user/getUserOrgMenu',     //获取菜单
+    midifyPassword:'/sys/user/midifyPassword',     //修改密码
+    getSubMenu:'/qc/mode/getMenu',   //获取质控评分菜单
+    delScore:'/qc/behospitalInfo/delCase' ,//删除评分项
+    editScore:'/qc/behospitalInfo/updCase' ,//修改评分
+    addScore:'/qc/behospitalInfo/addCase' ,//添加评分项
+    getRecordDetail:'/qc/behospitalInfo/getByBehospitalCode', //获取病例明细
+    getInfoModule:'/qc/module/getById',
+    getModuleById:'/qc/module/getModuleMap',
     getQcCases:'/qc/cases/getQcCases',
     getQcCasesAll:'/qc/casesEntryHospital/getQcCasesAll',
     getQcCasesEntryAll:'/qc/casesEntryHospital/getQcCasesEntryAll',
@@ -13,7 +22,41 @@ const api = {
     getDeptList:'/bas/dept/getList',
     getDeptListUser:'/bas/dept/listForUser',
     getDeptListDept:'/bas/dept/getListUser',
+    getAverageDayNum:'/console/getAverageDayNum',//平均住院天数
+    getAverageFee:'/console/getAverageFee',//平均住院费用
+    getAverageScore:'/console/getAverageScore',//各科室质控平均分
+    leaveHosCount:'/console/leaveHosCount',//出院人数统计
+    mrCount:'/console/mrCount',//质控病历统计
+    entryCountGroupByCase:'/console/entryCountGroupByCase',//各模块缺陷占比排行
+    getLevelResultDept:'/console/getLevelResultDept',//各科室甲级占比
+    entryCountGroupByEntry:'/console/entryCountGroupByEntry',//条目缺陷占比
+    entryByDept:'/console/entryByDept',//各科室缺陷占比
+    getDept:'/consoleByDept/getDept',//获取科室列表
+    leaveHosCountByDept:'/consoleByDept/leaveHosCountByDept',//出院人数统计
+    mrCountByDept:'/consoleByDept/mrCountByDept',//质控病历统计
+    getJwt:'/sys/user/getJwt',//登录
+    getRoleMenu:'/sys/role/getRoleMenu',//获取角色菜权限单等数据
+    list:'/sys/role/list', //获取角色列表信息
+    userPage:'/sys/user/userPage',
+    getUserDepts:'/sys/user/getUserDepts',
+    getUserRoles:'/sys/user/getUserRoles',
+    disable:'/sys/user/disable',
+    enable:'/sys/user/enable',
+    editUserDepts:'/sys/user/editUserDepts',
+    editUserRoles:'/sys/user/editUserRoles',
+    listForUserRole:'/sys/role/listForUser',
+    saveRoleMenu:'/sys/role/saveRoleMenu',//修改角色菜单权限数据
+    entryCountGroupByEntryAndDept:'/consoleByDept/entryCountGroupByEntryAndDept',//条目缺陷占比
+    entryCountGroupByCaseAndDept:'/consoleByDept/entryCountGroupByCaseAndDept',//各模块缺陷占比排行
+    entryCountGroupByEntryAndDeptPage:'/consoleByDept/entryCountGroupByEntryAndDeptPage',//条目明细(科室)
+    entryCountGroupByCaseAndDeptPage:'/consoleByDept/entryCountGroupByCaseAndDeptPage',//模块缺陷占比明细(科室)
+    entryCountGroupByEntryPage:'/console/entryCountGroupByEntryPage',//条目明细
+    entryCountGroupByCasePage:'/console/entryCountGroupByCasePage',//模块缺陷占比明细
+    delQcAnnormal:'/qc/abnormal/delQcAnnormal',//异常数据删除
+    getQcAnnormal:'/qc/abnormal/getQcAnnormal',//异常数据查询
+    saveQcAnnormal:'/qc/abnormal/saveQcAnnormal',//异常数据修改
 }
+
 module.exports = {
     api
-};
+};

+ 19 - 9
src/js/console.js

@@ -5,6 +5,7 @@ require("../images/logo.png")
 require("../images/arrow_down.png")
 
 // import 'zrender/lib/svg/svg';
+const {api} = require('./api.js')
 const echarts = require('echarts');
 const {post,setCookie,delCookie,getCookie} = require('../js/utils.js');
 let payMoney = [],dayLis = [],dateType = 2,slideType = 1;
@@ -53,7 +54,16 @@ $(function(){
         }
         $(this).parent().slideToggle().prev().find("span").html(str)
     })
+    getDetails()
 })
+function getDetails(){
+    $(".defect .partTitlePub").click(function(){//from 1 console / 2  deptConsole
+        $(parent.document).find("#contentIframe").attr("src","mukuai.html?from=1&dateType="+dateType)
+    })
+    $(".circleB .title").click(function(){
+        $(parent.document).find("#contentIframe").attr("src","tiaomu.html?from=1&dateType="+dateType)
+    })
+}
 //判断有无某一权限
 function hasData(data){
     let lis = JSON.parse(getCookie("codeLis"))
@@ -135,7 +145,7 @@ function initConsole(result){
 //获取图表数据
 function getBarData(type){
     if(hasData('FUNC000045')){
-        post('/console/getAverageDayNum',{//平均住院天数
+        post(api.getAverageDayNum,{//平均住院天数
             "type": type||1//1月2年
         }).then((res)=>{
             let data = res.data;
@@ -151,7 +161,7 @@ function getBarData(type){
         $(".toggleSlide1").css("opacity",0.5)
     }
     if(hasData('FUNC000046')){
-        post('/console/getAverageFee',{//平均住院费用
+        post(api.getAverageFee,{//平均住院费用
             "type": type||1//1月2年
         }).then((res)=>{
             let data = res.data;
@@ -167,7 +177,7 @@ function getBarData(type){
         $(".toggleSlide2").css("opacity",0.5)
     }
     if(hasData('FUNC000047')){
-        post('/console/getAverageScore',{//各科室质控平均分
+        post(api.getAverageScore,{//各科室质控平均分
             "type": type||1//1月2年
         }).then((res)=>{
             let data = res.data;
@@ -183,7 +193,7 @@ function getBarData(type){
         })
     }
     if(hasData('FUNC000048')){
-        post('/console/getLevelResultDept',{//各科室甲级占比
+        post(api.getLevelResultDept,{//各科室甲级占比
             "type": type||1//1月2年
         }).then((res)=>{
             let data = res.data;
@@ -199,7 +209,7 @@ function getBarData(type){
         })
     }
     if(hasData('FUNC000049')){
-        post('/console/leaveHosCount',{//出院人数统计
+        post(api.leaveHosCount,{//出院人数统计
             "type": type||1//1月2年
         }).then((res)=>{
             let data = res.data;
@@ -212,7 +222,7 @@ function getBarData(type){
         })
     }
     if(hasData('FUNC000050')){
-        post('/console/mrCount',{//质控病历统计
+        post(api.mrCount,{//质控病历统计
             "type": type||1//1月2年
         }).then((res)=>{
             let data = res.data
@@ -259,7 +269,7 @@ function getBarData(type){
         })
     }
     if(hasData('FUNC000051')){
-        post('/console/entryCountGroupByCase',{//各模块缺陷占比排行
+        post(api.entryCountGroupByCase,{//各模块缺陷占比排行
             "type": type||1//1月2年
         }).then((res)=>{
             let data = res.data;
@@ -270,7 +280,7 @@ function getBarData(type){
         })
     }
     if(hasData('FUNC000052')){
-        post('/console/entryCountGroupByEntry',{//条目缺陷占比
+        post(api.entryCountGroupByEntry,{//条目缺陷占比
             "type": type||1//1月2年
         }).then((res)=>{
             let data = res.data;
@@ -285,7 +295,7 @@ function getBarData(type){
         })
     }
     if(hasData('FUNC000053')){
-        post('/console/entryByDept',{//各科室缺陷占比
+        post(api.entryByDept,{//各科室缺陷占比
             "type": type||1//1月2年
         }).then((res)=>{
             let data = res.data;

+ 18 - 7
src/js/deptConsole.js

@@ -5,6 +5,7 @@ require("../images/logo.png")
 require("../images/arrow_down.png")
 
 // import 'zrender/lib/svg/svg';
+const {api} = require('./api.js')
 const echarts = require('echarts');
 const {post,setCookie,delCookie,getCookie} = require('../js/utils.js');
 let payMoney = [],dayLis = [],dateType = 2,curDept = '',datafst=[],datasec=[],datatrd=[],datafour=[];
@@ -29,7 +30,17 @@ $(function(){
         e.stopPropagation()
         $(this).next().slideToggle()
     })
+
+    tiaomu()
 })
+function tiaomu(){
+    $(".defect .partTitlePub").click(function(){
+        $(parent.document).find("#contentIframe").attr("src","mukuai.html?from=2&deptName="+curDept+"&dateType="+dateType)
+    })
+    $(".circleB .title").click(function(){
+        $(parent.document).find("#contentIframe").attr("src","tiaomu.html?from=2&deptName="+curDept+"&dateType="+dateType)
+    })
+}
 //判断有无某一权限
 function hasData(data){
     let lis = JSON.parse(getCookie("codeLis"))
@@ -110,8 +121,8 @@ function initConsole(result){
 }
 //获取科室列表
 function getOwnDept(){
-    if(hasData('FUNC000058')){
-        post('/consoleByDept/getDept',{}).then((res)=>{
+    // if(hasData('FUNC000058')){
+        post(api.getDept,{}).then((res)=>{
             let data = res.data;
             if(data.code == 0){
                 let result = data.data
@@ -121,7 +132,7 @@ function getOwnDept(){
                 getBarData(2)//图标数据获取
             }
         })
-    }
+    // }
 }
 function renderDeptLis(data){
     let str = ''
@@ -150,7 +161,7 @@ function renderDeptLis(data){
 //获取图表数据
 function getBarData(type){
     if(hasData('FUNC000054')){
-        post('/consoleByDept/leaveHosCountByDept',{//出院人数统计
+        post(api.leaveHosCountByDept,{//出院人数统计
             "type": type||1//1月2年
         }).then((res)=>{
             let data = res.data;
@@ -162,7 +173,7 @@ function getBarData(type){
         })
     }
     if(hasData('FUNC000055')){
-        post('/consoleByDept/mrCountByDept',{//质控病历统计
+        post(api.mrCountByDept,{//质控病历统计
             "type": type||1//1月2年
         }).then((res)=>{
             let data = res.data
@@ -174,7 +185,7 @@ function getBarData(type){
         })
     }
     if(hasData('FUNC000056')){
-        post('/consoleByDept/entryCountGroupByCaseAndDept',{//各模块缺陷占比排行
+        post(api.entryCountGroupByCaseAndDept,{//各模块缺陷占比排行
             "type": type||1//1月2年
         }).then((res)=>{
             let data = res.data;
@@ -186,7 +197,7 @@ function getBarData(type){
         })
     }
     if(hasData('FUNC000057')){
-        post('/consoleByDept/entryCountGroupByEntryAndDept',{//条目缺陷占比
+        post(api.entryCountGroupByEntryAndDept,{//条目缺陷占比
             "type": type||1//1月2年
         }).then((res)=>{
             let data = res.data;

+ 2 - 1
src/js/index.js

@@ -3,7 +3,8 @@ const $ = require('jquery');
 require('jquery-templates');
 const md5 = require('js-md5');
 require("./modal.js")
-const {api,post,pageMap,delCookie,setCookie,getCookie} = require('./utils.js');
+const {api} = require('./api.js')
+const {post,pageMap,delCookie,setCookie,getCookie} = require('./utils.js');
 let userInfo={};
 $(function(){
   getMenu();

+ 3 - 1
src/js/login.js

@@ -2,6 +2,8 @@ const $ = require('jquery');
 require("../css/reset.less")
 require("../css/login.less")
 require("./modal.js")
+const {api} = require('./api.js')
+
 const {post,setCookie,delCookie} = require('../js/utils.js');
 const md5 = require('js-md5');
 $(function(){
@@ -35,7 +37,7 @@ function sureLogin(){
     return
   }
   $.alerModal({type:"loading"});
-  post('/sys/user/getJwt',{
+  post(api.getJwt,{
     username:username,
     password:md5(password)
   }).then((res)=>{

+ 402 - 0
src/js/mukuai.js

@@ -0,0 +1,402 @@
+const $ = require('jquery');
+require("../css/mukuai.less");
+require('./../resource/jquery-ui/jquery-ui.min.js');
+require('./modal.js');
+const {api} = require('./api.js')
+const {post,getCookie,getUrlArgObjectNew} = require('./utils.js')
+const switchIconOpen = require("./../images/btn_open.png")
+const switchIconClose = require("./../images/btn_close.png")
+const iconDown= require("./../images/arrow_down.png")
+const iconUp = require("./../images/arrow_up.png")
+const arrowLeft= require("./../images/arrow_left.png")
+const arrowRight = require("./../images/arrow_right.png")
+
+
+let casesId="", name="", isReject ="2", isUsed ="",casesIdTemp="", nameTemp="", isRejectTemp ="2", isUsedTemp ="",from=""
+$(".selectModuleType").append(`<img class="arrow" src=${iconDown} alt="下拉">`)
+$(".selectReject").append(`<img class="arrow" src=${iconDown} alt="下拉">`)
+$(".selectUsed").append(`<img class="arrow" src=${iconDown} alt="下拉">`)
+$(function(){
+    dateChange()
+    let srcUrl = $("#contentIframe",parent.document).attr("src")
+    isReject = getUrlArgObjectNew("dateType",srcUrl)||2
+    deptName = getUrlArgObjectNew("deptName",srcUrl)||""
+    from = getUrlArgObjectNew("from",srcUrl)||""
+    console.log(from,'ssssssssssssssssss')
+    getTabData(1)//条目缺陷
+})
+//判断有无某一权限
+function hasData(data){
+    let lis = JSON.parse(getCookie("codeLis"))
+    if(lis.indexOf(data)>-1){//有权限
+        return true
+    }
+    return false;
+  }
+  //所有数据切换日期筛选
+function dateChange(){
+    $(".monthYear .mon").click(function(){
+        $(this).css({
+            backgroundColor:'#5A8EEE',
+            color:'#fff'
+        }).siblings().css({
+            color:'#5A8EEE',
+            backgroundColor:'#fff'
+        })
+        isReject = 1
+        getTabData(1)
+    })
+    $(".monthYear .year").click(function(){
+        $(this).css({
+            backgroundColor:'#5A8EEE',
+            color:'#fff'
+        }).siblings().css({
+            color:'#5A8EEE',
+            backgroundColor:'#fff'
+        })
+        isReject = 2
+        getTabData(1)
+    })
+}
+//获取表格数据
+function getTabData(activePage){
+    const param = {
+        current:activePage,
+        type: isReject,
+        name: name, //条目名
+        deptName: deptName, //科室名
+        size: 15
+    }
+    post(from == 1?api.entryCountGroupByCasePage:api.entryCountGroupByCaseAndDeptPage,param).then(res =>{
+        if(res.data.code == '0'){
+            const data = res.data.data.records
+            const totalPage = res.data.data.pages
+            const totalNum = res.data.data.total
+            renderTab(data,activePage)
+            if(totalPage > 1){
+                renderPagination(totalPage,Number(activePage),totalNum)
+            } else{
+                $('.pagination').html("")
+            }
+        }else{}
+    }).catch((e) =>{})
+}
+$(".moduleItemInp").on("input", function(e){
+    const val = $(this).val().trim()
+    nameTemp = val
+})
+$(".filter").on("click", function(e){
+    casesId=casesIdTemp, name=nameTemp, isReject =isRejectTemp, isUsed =isUsedTemp
+    getTabData(1)
+})
+$(".filterclear").on("click", function(e){
+    nameTemp = ""
+    $(".moduleItemInp").val("")
+})
+$('.selectModuleType').on("click", function(e){
+    e.stopPropagation()
+    $(".rejectList ").css("display","none")
+    $(".usedList ").css("display", "none")
+    $(".selectReject .arrow").attr("src",iconDown)
+    $(".selectUsed .arrow").attr("src",iconDown)
+    const showList =  $(".moduleTypeList ").css("display")
+    if(showList == "none" ||!showList){
+        $(".moduleTypeList ").css("display","block")
+        $(".selectModuleType .arrow").attr("src",iconUp)
+    }else{
+        $(".moduleTypeList ").css("display", "none")
+        $(".selectModuleType .arrow").attr("src",iconDown)
+    }
+})
+    
+$('.selectReject').on("click", function(e){
+    e.stopPropagation()
+    $(".moduleTypeList ").css("display", "none")
+    $(".usedList ").css("display", "none")
+    $(".selectModuleType .arrow").attr("src",iconDown)
+    $(".selectUsed .arrow").attr("src",iconDown)
+    const showList =  $(".rejectList ").css("display")
+    if(showList == "none" ||!showList){
+        $(".rejectList ").css("display","block")
+        $(".selectUsed .arrow").attr("src",iconUp)
+    }else{
+        $(".rejectList ").css("display", "none")
+        $(".selectUsed .arrow").attr("src",iconDown)
+    }
+})
+$('.selectUsed').on("click", function(e){
+    e.stopPropagation()
+    $(".moduleTypeList ").css("display", "none")
+    $(".rejectList ").css("display","none")
+    $(".selectModuleType .arrow").attr("src",iconDown)
+    $(".selectReject .arrow").attr("src",iconDown)
+    const showList =  $(".usedList ").css("display")
+    if(showList == "none" ||!showList){
+        $(".usedList ").css("display","block")
+        $(".selectUsed .arrow").attr("src",iconUp)
+    }else{
+        $(".usedList ").css("display", "none")
+        $(".selectUsed .arrow").attr("src",iconDown)
+    }
+})
+// bindRejectSelect()
+// bindUsedSelect()
+// getmoduleTypeList()
+function renderTab(data,activePage){
+    let str = ``;
+    const cls = hasData("FUNC000007")?"editItem":"editItemDis";
+    for(let i = 0; i < data.length; i++){
+        const item = data[i]
+        str += `
+            <tr data-id=${item.id} data-index=${i}>
+                <td  class="textCenter">${(activePage-1)*15 + i+1}</td>
+                <td>${item.name}</td>
+                <td  class="textCenter">${item.percentStr}</td>
+            </tr>
+        `
+    }
+    $('tbody').html(str)
+    bindEdit(data,activePage)
+}
+
+function bindEdit(data,activePage){
+    if(!hasData('FUNC000007')){
+        return
+    }
+    $('.editItem').click(function(e){
+        const index = $(this).parent().attr('data-index') 
+        editItem(data[index],activePage)
+    })
+}
+
+//修改
+function editItem(item,activePage){
+    const itemCpoy = JSON.parse(JSON.stringify(item))
+    $('.pop-box').remove()
+    $('.container').append('<div class="pop-box"></div>')
+    const str = `
+        <div class="itemMsgBox">
+            <div class="mask"></div>
+            <div class="itemMsgContent">
+                <p class="itemMsgTitle">修改 <img class="iconClose" src=${require('./../images/icon_close_default.png')} alt="关闭" /></p>
+                <div class="itemMsgContentBox">
+                    <div class="itemMsgInfoBox"><span class="itemMsgLab">模块名称:</span> <span class="itemInfoRight">${itemCpoy.casesName}</span></div>
+                    <div class="itemMsgInfoBox"><span class="itemMsgLab">条目名称:</span> <span class="itemInfoRight"> ${itemCpoy.name}</span></div>
+                    <div class="itemMsgInfoBox"><span class="itemMsgLab">提示信息:</span> <span class="itemInfoRight"> <input class="itemTipMsg" value="${itemCpoy.msg}" /></span></div>
+                    <div class="itemMsgInfoBox"><span class="itemMsgLab">
+                        分值:
+                        </span> <span class="itemInfoRight"> 
+                            <input class="itemScore" type="number" min="0" value=${itemCpoy.score} />
+                        </span>
+                        <p class="itemMsgInfoTips">支持≥0的数字输入,最多保留小数点后1位~</p>
+                    </div>
+                 
+                    <div class="itemMsgInfoBox"><span class="itemMsgLab">单项否决:</span><span class="itemInfoRight itemReject">${item.isReject == '1' ? `<img class="switchImg" src=${switchIconOpen} /><span class="imgInfo">  是</span>`:`<img class="switchImg" src=${switchIconClose} /> <span class="imgInfo"> 否</span>`}</span></div>
+                    <div class="itemMsgInfoBox"><span class="itemMsgLab">启用:</span><span class=" temInfoRight itemUsed">${item.isUsed == '1' ? `<img class="switchImg" src=${switchIconOpen} /><span class="imgInfo"> 是</span>`:`<img class="switchImg" src=${switchIconClose} /> <span class="imgInfo"> 否</span>`}</span></div>
+                </div>
+                
+                <div class="confirmEditBox"><span class="confirmEdit">保存</span></div>
+            </div>
+        </div>
+       
+    `
+    $("#mainBox", parent.document).append(str)
+    $("#mainBox .itemMsgBox .iconClose", parent.document).on("click", function(e){
+        $("#mainBox .itemMsgBox", parent.document).remove()
+    })
+    $("#mainBox .itemMsgBox .itemTipMsg", parent.document).on("input", function(e){
+        const val = $(this).val().trim()
+        itemCpoy.msg = val
+    })
+    $("#mainBox .itemMsgBox .itemScore", parent.document).on("keypress", function(e){
+        return (/[0-9\.]/.test(String.fromCharCode(e.keyCode)))
+    })
+    $("#mainBox .itemMsgBox .itemScore", parent.document).on("input", function(e){
+        const val = $(this).val()
+        itemCpoy.score = val
+    })
+    $("#mainBox .itemMsgBox .itemReject", parent.document).on("click", function(e){
+        itemCpoy.isReject = itemCpoy.isReject == 1 ? 0 : 1
+        $('#mainBox .itemMsgBox', parent.document).remove()
+        editItem(itemCpoy,activePage)
+    })
+    $("#mainBox .itemMsgBox .itemUsed", parent.document).on("click", function(e){
+        itemCpoy.isUsed = itemCpoy.isUsed == 1 ? 0 : 1
+        $('#mainBox .itemMsgBox', parent.document).remove()
+        editItem(itemCpoy,activePage)
+    })
+    
+    $("#mainBox .itemMsgBox .confirmEdit", parent.document).on("click", function(){
+        var reg = new RegExp(/^\d+(\.\d)?$/);
+        if(reg.test(itemCpoy.score)){
+            console.log('itemCopy', itemCpoy)
+            if(!itemCpoy.msg.trim()){
+                $.alerModal({"message":"提示信息不能为空~",type:"tip",time:'1000',isFather: true, fatherWrapper: $("#mainBox", parent.document)});
+                return 
+            }
+            
+            saveEdit(itemCpoy,activePage)
+            $("#mainBox .itemMsgBox .itemMsgInfoTips", parent.document).css("display","none")
+            $('#mainBox .itemMsgBox', parent.document).remove()
+            return 
+        }else{
+            $("#mainBox .itemMsgBox .itemMsgInfoTips", parent.document).css("display","block")
+            
+            return
+        }
+      
+    })
+   
+    
+}
+
+//保存修改
+function saveEdit(item,activePage){
+    const param = {
+        id: item.id,
+        isReject: item.isReject,
+        isUsed: item.isUsed,
+        msg: item.msg,
+        score: item.score
+    }
+
+    post(api.updataQcCasesEntry,param).then(res =>{
+        if(res.data.code == '0'){
+            // const data = res.data.data
+            $.alerModal({"message":"修改成功",type:"tip",time:'1000',isFather: true, fatherWrapper: $("#mainBox", parent.document)});
+            getTabData(activePage)
+        }else{}
+    }).catch((e) =>{
+    
+    })
+}
+
+//获取模块类型
+function getmoduleTypeList(){
+    post(api.getQcCasesAll).then(res =>{
+        if(res.data.code == '0'){
+           const  moduleTypeList = res.data.data
+           renderModuleTypeList(moduleTypeList)
+        }else{}
+    }).catch((e) =>{
+    
+    })
+}
+
+
+function renderModuleTypeList(moduleTypeList){
+    let str = `<li class="modeTypeItem " data-id=" " data-name="全部">全部</li>`
+    for(let i = 0; i < moduleTypeList.length; i++){
+        str += `<li class="modeTypeItem ellipsis" title=${moduleTypeList[i].name} data-id=${moduleTypeList[i].id} data-name=${moduleTypeList[i].name}> ${moduleTypeList[i].name}</li>`
+    }
+    $('.moduleTypeList').html(str)
+    bindModuleTypeSelect()
+}
+
+//模块类型选择
+function bindModuleTypeSelect(){
+    $('.modeTypeItem').on("click",function(){
+        const modeTypeItemName = $(this).attr("data-name")
+        const modeTypeItemId = $(this).attr("data-id")
+        casesIdTemp =modeTypeItemId
+        $('.selectModuleType').html(modeTypeItemName).attr("title",modeTypeItemName)
+        $(".selectModuleType").append(`<img class="arrow" src=${iconDown} alt="下拉">`)
+
+        $(".moduleTypeList ").css("display", "none")
+    })
+}
+//单项否决选择
+function bindRejectSelect(){
+    $('.rejectItem').on("click",function(){
+        const rejectItemName = $(this).attr("data-name")
+        const rejectItemId = $(this).attr("data-id")
+        isRejectTemp=rejectItemId
+        $('.selectReject').html(rejectItemName)
+        $(".rejectList ").css("display", "none")
+        $(".selectReject").append(`<img class="arrow" src=${iconDown} alt="下拉">`)
+
+    })
+}
+//是否启用选择
+function bindUsedSelect(){
+    $('.usedItem').on("click",function(){
+        const usedItemName = $(this).attr("data-name")
+        const usedItemItemId = $(this).attr("data-id")
+        isUsedTemp =usedItemItemId
+        $('.selectUsed').html(usedItemName)
+        $(".usedList").css("display", "none")
+        $(".selectUsed").append(`<img class="arrow" src=${iconDown} alt="下拉">`)
+    })
+}
+
+
+
+
+//分页渲染
+function renderPagination(totalPage,activePage,totalNum){
+    let str = `<span class="totalSum">共${totalPage}页/${totalNum}条数据</span><span class="prePage"><img class="arrowPage" src=${arrowLeft} /></span>`
+    if(totalPage <= 6){
+        for(let i = 1; i <= totalPage; i++){
+            str += `<span class="pageNum ${'page'+i}" data-page=${i}>${i}</span>`
+        }
+    }else{
+        if(activePage <= 3){ //选中页数小于4
+            for(let i = 1; i <= 4; i++){
+                str += `<span class="pageNum ${'page'+i}" data-page=${i}>${i}</span>`
+            }
+            str += `<span class="more" >...</span>`
+        str += `<span class="pageNum ${'page'+totalPage}" data-page=${totalPage}>${totalPage}</span>`
+
+        } else if(activePage > totalPage -3){
+            str += `<span class="pageNum page1" data-page=1>1</span>`
+            str += `<span class="more" >...</span>`
+            str += `<span class="pageNum ${'page'+(totalPage-3)}" data-page=${totalPage -3}>${totalPage -3}</span>`
+            str += `<span class="pageNum ${'page'+(totalPage-2)}" data-page=${totalPage -2}>${totalPage -2}</span>`
+            str += `<span class="pageNum ${'page'+(totalPage-1)}" data-page=${totalPage -1}>${totalPage -1}</span>`
+            str += `<span class="pageNum ${'page'+totalPage}" data-page=${totalPage}>${totalPage}</span>`
+        } else {
+            str += `<span class="pageNum page1" data-page=1>1</span>`
+            str += `<span class="more" >...</span>`
+            str += `<span class="pageNum ${'page'+(activePage -1)}" data-page=${activePage -1}>${activePage -1}</span>`
+            str += `<span class="pageNum ${'page'+activePage}" data-page=${activePage}>${activePage}</span>`
+            str += `<span class="pageNum ${'page'+(activePage +1)}" data-page=${activePage +1}>${activePage +1}</span>`
+            str += `<span class="more" >...</span>`
+            str += `<span class="pageNum ${'page'+totalPage}" data-page=${totalPage}>${totalPage}</span>`
+        }
+       
+    }
+    str += `<span class="nextPage"><img class="arrowPage" src=${arrowRight} /></span>`
+    $('.pagination').html(str)
+    $('.page' + activePage).addClass('activePage')
+    $(".pageNum").on("click", function(e){
+        const activePageNow = Number($(this).attr('data-page'))
+        getTabData(activePageNow)
+        // renderPagination(totalPage,activePageNow,totalNum)
+    })
+    $(".prePage").on("click", function(e){
+        let activePageNow = Number($(".activePage").attr('data-page'))
+        if(activePageNow > 1){
+            activePageNow--
+            getTabData(activePageNow)
+            // renderPagination(totalPage,activePageNow,totalNum)
+        }
+    })
+    $(".nextPage").on("click", function(e){
+        let activePageNow = Number($(".activePage").attr('data-page'))
+        if(activePageNow < totalPage){
+            activePageNow++
+            getTabData(activePageNow)
+            // renderPagination(totalPage,activePageNow,totalNum)
+        }
+    })
+    
+}
+
+$(document).on("click", function(){
+    $(".moduleTypeList ").css("display", "none")
+    $(".rejectList ").css("display","none")
+    $(".usedList ").css("display", "none")
+    $(".selectModuleType .arrow").attr("src",iconDown)
+    $(".selectReject .arrow").attr("src",iconDown)
+    $(".selectUsed .arrow").attr("src",iconDown)
+})

+ 491 - 0
src/js/partDetail.js

@@ -0,0 +1,491 @@
+const $ = require('jquery');
+require("../css/partDetail.less");
+require('./modal.js');
+const {api} = require('./api.js')
+const {post,getCookie} = require('./utils.js')
+require('./../resource/jquery-ui/jquery-ui.min.js');
+require('./../resource/jquery-ui/jquery-ui.min.css');
+const iconCheck= require("./../images/icon_check.png")
+const iconUnCheck = require("./../images/icon_unchecked.png")
+const  iconCalenBlue= require("./../images/icon_calen_blue.png")
+const  iconCalenGrey= require("./../images/icon_calen_grey.png")
+const iconDown= require("./../images/arrow_down.png")
+const iconUp = require("./../images/arrow_up.png")
+const loadingImg = require("./../images/loading.gif")
+const arrowLeft= require("./../images/arrow_left.png")
+const arrowRight = require("./../images/arrow_right.png")
+
+$(".selectLevel").append(`<img class="arrow" src=${iconDown} alt="下拉">`)
+$(".selectDept").append(`<img class="arrow" src=${iconDown} alt="下拉">`)
+let tabList = [], name = "", behospitalCode="", behosDateStart="", level="",behosDateEnd="", scoreSum = 0,
+  nameTemp = "", behospitalCodeTemp="",levelTemp="", deptId="",deptIdTemp="", doctorName="", doctorNum="",doctorNameTemp="",doctorNumTemp="",
+  data_desc=[],data_asc=[];
+
+$('.datapickerBox').append(`<img class="iconCalen" src=${iconCalenGrey} />`)
+$('.iconCalen').on("mouseenter", function(e){
+    $(this).attr("src", iconCalenBlue)
+})
+$('.iconCalen').on("mouseleave", function(e){
+    $(this).attr("src", iconCalenGrey)
+})
+$('.iconCalen').on("click", function(e){
+    $(this).parent().find("input").focus()
+})
+$('.recordScoreBtn').css("opacity",hasData('FUNC000017')?'1':'0.5')
+
+//判断有无某一权限
+  function hasData(data){
+    let trdObj = JSON.parse(getCookie("trdObj"))
+    let lis = trdObj['YH-BLZK-ZKPF']
+    if(!lis){
+      return false
+    }
+    if(lis.indexOf(data)>-1){//有权限
+        return true
+    }
+    return false;
+}
+function getTabData(activePage){
+    const param = {
+        current:activePage,
+        behospitalCode: behospitalCode,
+        name: name, //条目名
+        level:level,//病历等级
+        deptId: deptId,
+        asc:data_asc,     //升序
+        desc:data_desc,       //降序
+        doctorName: doctorName,
+        doctorCode: doctorNum,
+        behosDateStart: behosDateStart, //1-单项否决 0-非
+        behosDateEnd: behosDateEnd, //0-未启用 1-启用
+        size: 15
+    }
+    post(api.qcList,param).then(res =>{
+        if(res.data.code == '0'){
+            const data = res.data.data;
+            tabList = data.records;
+            const totalPage = data.pages;
+            const totalNum = data.total;
+            renderTab(tabList,data.hospitalId);
+            renderPagination(totalPage,Number(activePage),totalNum)
+            if(totalPage > 1){
+                renderPagination(totalPage,Number(activePage),totalNum)
+            } else{
+                $('.pagination').html("")
+            }
+        }else{
+            $.alerModal({"message":res.data.msg,type:"tip",time:'1000',isFather: true, fatherWrapper: $("#mainBox", parent.document)});
+        }
+    }).catch((e) =>{
+    
+    })
+}
+
+getTabData(1)
+
+$(".filter").on("click", function(e){
+    behosDateStart = $("#datepicker").val().trim()
+    behosDateEnd = $("#datepicker2").val().trim()
+    const start = new Date(behosDateStart).getTime()
+    const end = new Date(behosDateEnd).getTime()
+    if(start > end){
+        $.alerModal({"message":'开始时间不能大于结束时间~',type:"tip",time:'1000',isFather: true, fatherWrapper: $("#mainBox", parent.document)});
+        return
+    }
+    if(behosDateStart){
+        behosDateStart = behosDateStart.replace(/\//g,'-') + ' 00:00:00'
+    }
+    if(behosDateEnd){
+        behosDateEnd = behosDateEnd.replace(/\//g,'-') + ' 23:59:59'
+    }
+    name = nameTemp
+    behospitalCode = behospitalCodeTemp
+    level = levelTemp
+    deptId = deptIdTemp
+    doctorName = doctorNameTemp
+    doctorNum = doctorNumTemp
+    getTabData(1)
+})
+function renderTab(data,hisId){
+    let str = ``
+    let hasSelectAll = true
+    for(let i = 0; i < data.length; i++){
+        const item = data[i]
+        if(!item.hasSelect){
+            hasSelectAll = false
+        }
+        str += `
+            <tr  data-index=${i}>
+                <td class="scoreOperaItem textCenter">${item.hasSelect ? `<img class="iconCheck" src=${iconCheck} />`:`<img class="iconCheck" src=${iconUnCheck} />`}</td>
+                <td  class="recordScoreOperaBtn textCenter" style="opacity:${hasData('FUNC000017')?'1':'0.5'}">评分</td>
+                <td >${item.behospitalCode || "-"}</td>
+                <td>${item.fileCode || "-"}</td>
+                <td  class="textCenter"><span data-index=${i} class="patientNameSpan">${item.name || "-"}<span></td>
+                <td  class="textCenter">${item.sex || "-"}</td>
+                <td  class="textCenter">${item.age || "-"}</td>
+                <td  class="textCenter">${item.bedCode || "-"}</td>
+                <td  class="textCenter">${item.behospitalDate&&item.behospitalDate.slice(0,10) || "-"}</td>
+                <td  class="textCenter">${item.leaveHospitalDate&&item.leaveHospitalDate.slice(0,10)|| "-"}</td>
+                <td  class="textCenter">${item.behDoctorName   || "-"}</td>
+                <td  class="textCenter">${item.doctorName || "-"}</td>
+                <td  class="textCenter">${item.directorDoctorName || "-"}</td>
+                <td  class="textCenter">${item.behDeptName || "-"}</td>
+                <td  class="textCenter">${item.level || "-"}</td>
+                <td  class="textCenter">${item.scoreRes || "-"}</td>
+                <td  class="textCenter">${item.gradeTime&&item.gradeTime.slice(0,10) || "-"}</td>
+            </tr>
+        `
+    }
+    if(data.length === 0){
+        hasSelectAll = false
+    }
+    if(hasSelectAll){
+        $('.scoreOpera img').attr("src" ,iconCheck)
+        $('.scoreOpera').attr("data-selectall",true)
+    }else{
+        $('.scoreOpera img').attr("src" ,iconUnCheck)
+        $('.scoreOpera').attr("data-selectall",false)
+    }
+    $('tbody').html(str)
+    bindScoreOperaItem()
+    bindRecordScoreOper()
+    bindScoreDetail(hisId)
+}
+
+function scoreDetail(id,age,hid,code){
+    window.open(`./qcScore.html?id=${id}&age=${age}&hid=${hid}&code=${code}`)
+}
+function bindScoreDetail(hisId){
+    $('.patientNameSpan').on('click',function(e){
+        const index = $(this).attr("data-index")
+        const id = tabList[index].behospitalCode
+        const age = tabList[index].age;
+        const noScore = tabList[index].level == '未评分'
+        if(noScore){
+            $.alerModal({"message":'请先进行评分!',type:"tip",time:'1000',isFather: true, fatherWrapper: $("#mainBox", parent.document)});
+            return
+        } else{
+            scoreDetail(id,age,hisId,'YH-BLZK-ZKPF')
+        }
+       
+    })
+}
+
+//选择病历等级
+$('.selectLevel').on("click", function(e){
+    e.stopPropagation()
+    $(".deptList ").css("display", "none")
+    $(".selectDept .arrow").attr("src",iconDown)
+    const showList =  $(".levelList ").css("display")
+    if(showList == "none" ||!showList){
+        $(".levelList ").css("display","block")
+        $(".selectLevel .arrow").attr("src",iconUp)
+    }else{
+        $(".levelList ").css("display", "none")
+        $(".selectLevel .arrow").attr("src",iconDown)
+    }
+})
+
+bindLeveldSelect()
+//是否启用选择
+function bindLeveldSelect(){
+    $('.levelItem').on("click",function(){
+        const levelItemName = $(this).attr("data-name")
+        const levelItemItemId = $(this).attr("data-id")
+        levelTemp =levelItemItemId
+        $('.selectLevel').html(levelItemName)
+        $(".levelList").css("display", "none")
+        $(".selectLevel").append(`<img class="arrow" src=${iconDown} alt="下拉">`)
+    })
+}
+
+//全选绑定
+bindOperaAll()
+function bindScoreOperaItem(){
+    $(".scoreOperaItem").on("click",  function(e){
+        const index = $(this).parent().attr("data-index")
+        tabList[index].hasSelect = tabList[index].hasSelect ? false:true
+        renderTab(tabList)
+    })
+}
+function bindRecordScoreOper(){
+    $(".recordScoreOperaBtn").on("click",  function(e){
+        if(!hasData('FUNC000017')){
+            return
+        }
+        const index = $(this).parent().attr("data-index")
+        const behospitalCode = tabList[index].behospitalCode
+        loading()
+        recordScore(behospitalCode,1)
+    })
+}
+function bindOperaAll(){
+    $('.scoreOpera').on("click", function(e){
+        const hasSelectAll = $('.scoreOpera').attr("data-selectall")
+        if(hasSelectAll == 'true'){
+
+            for(let i = 0; i < tabList.length; i++){
+                tabList[i].hasSelect = false
+            }
+        }else{
+            for(let i = 0; i < tabList.length; i++){
+                tabList[i].hasSelect = true
+            }
+        }
+        renderTab(tabList)
+    })
+}
+
+$('.selectDept').on("click", function(e){
+    e.stopPropagation()
+    $(".levelList ").css("display","none")
+    $(".selectLevel .arrow").attr("src",iconDown)
+    const showList =  $(".deptList ").css("display")
+    if(showList == "none" ||!showList){
+        $(".deptList ").css("display","block")
+        $(".selectDept .arrow").attr("src",iconUp)
+    }else{
+        $(".deptList ").css("display", "none")
+        $(".selectDept .arrow").attr("src",iconDown)
+    }
+})
+
+//获取科室列表
+getDeptList()
+function getDeptList(){
+    post(api.getDeptList,{inputStr:""}).then(res =>{
+        if(res.data.code == '0'){
+           const  deptList = res.data.data
+           rendeDeptList(deptList)
+        }else{}
+    }).catch((e) =>{
+
+    })
+}
+
+
+function rendeDeptList(deptList){
+    let str = `<li class="deptItem " data-id=" " data-name="全部">全部</li>`
+    for(let i = 0; i < deptList.length; i++){
+        str += `<li class="deptItem ellipsis" title=${deptList[i].deptName} data-id=${deptList[i].deptId} data-name=${deptList[i].deptName}> ${deptList[i].deptName}</li>`
+    }
+    $('.deptList').html(str)
+    bindDeptSelect()
+}
+//科室选择
+function bindDeptSelect(){
+    $('.deptItem').on("click",function(){
+        const deptItemName = $(this).attr("data-name")
+        const deptItemId = $(this).attr("data-id")
+        deptIdTemp =deptItemId
+        if(deptItemName.length > 10){
+            $('.selectDept').html(deptItemName.substring(0,8)+'...')
+        }else{
+            $('.selectDept').html(deptItemName)
+        }
+        $('.selectDept ').attr('title',deptItemName)
+        $(".selectDept").append(`<img class="arrow" src=${iconDown} alt="下拉">`)
+
+        $(".deptList").css("display", "none")
+    })
+}
+function loading(){
+    const str = `
+    <div class="loadingBox">
+            <div class="mask"></div>
+            <img class="loadingImg" src=${loadingImg}  alt="loading" />
+        </div>
+    `
+    $("#mainBox", parent.document).append(str)
+}
+function hideLoading(){
+    $("#mainBox .loadingBox", parent.document).remove()
+}
+$('.recordScoreBtn').on("click",function(e){
+    if(!hasData('FUNC000017')){
+        return
+    }
+    let scoreList = []
+    for(let i = 0; i <tabList.length; i++){
+        if(tabList[i].hasSelect){
+            scoreList.push(tabList[i].behospitalCode)
+        }
+    }
+    if(scoreList.length === 0){
+        $.alerModal({"message":'请选择要评分的项!',type:"tip",time:'1000',isFather: true, fatherWrapper: $("#mainBox", parent.document)});
+        return
+    } else{
+        loading()
+        for(let j = 0; j < scoreList.length; j++){
+            recordScore(scoreList[j],scoreList.length)
+        }
+    }
+})
+$("th[code]").on("click",function(e){
+    const code=$(this).attr("code");
+    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)
+});
+function recordScore(behospitalCode,totalNum){
+    const param = {
+        behospitalCode: behospitalCode
+    }
+    post(api.recordScore,param).then(res =>{
+        if(res.data.code == '0'){
+            scoreSum++
+            if(scoreSum === totalNum){
+                hideLoading()
+                scoreSum = 0
+                const activePage = $(".activePage").attr('data-page') || 1
+
+                getTabData(activePage)
+            }
+      
+        }else{}
+    }).catch((e) =>{
+    
+    })
+}
+$(".patientNumInp").on("input", function(e){
+    const val = $(this).val().trim()
+    behospitalCodeTemp = val
+})
+$(".patientNameInp").on("input", function(e){
+    const val = $(this).val().trim()
+    nameTemp = val
+})
+$(".doctorInp").on("input", function(e){
+    const val = $(this).val().trim()
+    doctorNameTemp = val
+})
+$(".doctorNumInp").on("input", function(e){
+  const val = $(this).val().trim();
+    doctorNumTemp = val
+})
+$(function() {
+    $.datepicker.regional['zh-CN'] = {
+    clearText: '清除',
+    clearStatus: '清除已选e799bee5baa6e59b9ee7ad9431333361303131日期',
+    closeText: '关闭',
+    closeStatus: '不改变当前选择',
+    prevText: '<上月',
+    prevStatus: '显示上月',
+    prevBigText: '<<',
+    prevBigStatus: '显示上一年',
+    nextText: '下月>',
+    nextStatus: '显示下月',
+    nextBigText: '>>',
+    nextBigStatus: '显示下一年',
+    currentText: '今天',
+    currentStatus: '显示本月',
+    monthNames: ['一月','二月','三月','四月','五月','六月', '七月','八月','九月','十月','十一月','十二月'],
+    monthNamesShort: ['一月','二月','三月','四月','五月','六月', '七月','八月','九月','十月','十一月','十二月'],
+    yearNamesShort: ['一月','二月','三月','四月','五月','六月', '七月','八月','九月','十月','十一月','十二月'],
+    monthStatus: '选择月份',
+    yearStatus: '选择年份',
+    weekHeader: '周',
+    weekStatus: '年内周次',
+    dayNames: ['星期日','星期一','星期二','星期三','星期四','星期五','星期六'],
+    dayNamesShort: ['周日','周一','周二','周三','周四','周五','周六'],
+    dayNamesMin: ['日','一','二','三','四','五','六'],
+    dayStatus: '设置 DD 为一周起始',
+    dateStatus: '选择 m月 d日, DD',
+    dateFormat: 'yy-mm-dd',
+    firstDay: 1,
+    initStatus: '请选择日期',
+    isRTL: false};
+    $.datepicker.setDefaults($.datepicker.regional['zh-CN']);
+
+    $( "#datepicker" ).datepicker({
+        changeMonth: true,
+        changeYear: true,
+        dateFormat:"yy/mm/dd"
+    });
+    $( "#datepicker2" ).datepicker({
+        changeMonth: true,
+        changeYear: true,
+        dateFormat:"yy/mm/dd"
+    });
+});
+
+//分页渲染
+function renderPagination(totalPage,activePage,totalNum){
+    let str = `<span class="totalSum">共${totalPage}页/${totalNum}条数据</span><span class="prePage"><img class="arrowPage" src=${arrowLeft} /></span>`
+    if(totalPage <= 6){
+        for(let i = 1; i <= totalPage; i++){
+          
+            str += `<span class="pageNum ${'page'+i}" data-page=${i}>${i}</span>`
+        }
+    }else{
+        if(activePage <= 3){ //选中页数小于4
+            for(let i = 1; i <= 4; i++){
+                str += `<span class="pageNum ${'page'+i}" data-page=${i}>${i}</span>`
+            }
+            str += `<span class="more" >...</span>`
+        str += `<span class="pageNum ${'page'+totalPage}" data-page=${totalPage}>${totalPage}</span>`
+
+        } else if(activePage > totalPage -3){
+            str += `<span class="pageNum page1" data-page=1>1</span>`
+            str += `<span class="more" >...</span>`
+            str += `<span class="pageNum ${'page'+(totalPage-3)}" data-page=${totalPage -3}>${totalPage -3}</span>`
+            str += `<span class="pageNum ${'page'+(totalPage-2)}" data-page=${totalPage -2}>${totalPage -2}</span>`
+            str += `<span class="pageNum ${'page'+(totalPage-1)}" data-page=${totalPage -1}>${totalPage -1}</span>`
+            str += `<span class="pageNum ${'page'+totalPage}" data-page=${totalPage}>${totalPage}</span>`
+        } else {
+            str += `<span class="pageNum page1" data-page=1>1</span>`
+            str += `<span class="more" >...</span>`
+            str += `<span class="pageNum ${'page'+(activePage -1)}" data-page=${activePage -1}>${activePage -1}</span>`
+            str += `<span class="pageNum ${'page'+activePage}" data-page=${activePage}>${activePage}</span>`
+            str += `<span class="pageNum ${'page'+(activePage +1)}" data-page=${activePage +1}>${activePage +1}</span>`
+            str += `<span class="more" >...</span>`
+            str += `<span class="pageNum ${'page'+totalPage}" data-page=${totalPage}>${totalPage}</span>`
+        }
+       
+    }
+    str += `<span class="nextPage"><img class="arrowPage" src=${arrowRight} /></span>`
+    $('.pagination').html(str)
+    $('.page' + activePage).addClass('activePage')
+    $(".pageNum").on("click", function(e){
+        const activePageNow = Number($(this).attr('data-page'))
+        getTabData(activePageNow)
+        // renderPagination(totalPage,activePageNow,totalNum)
+    })
+    $(".prePage").on("click", function(e){
+        let activePageNow = Number($(".activePage").attr('data-page'))
+        if(activePageNow > 1){
+            activePageNow--
+            getTabData(activePageNow)
+            // renderPagination(totalPage,activePageNow,totalNum)
+        }
+    })
+    $(".nextPage").on("click", function(e){
+        let activePageNow = Number($(".activePage").attr('data-page'))
+        if(activePageNow < totalPage){
+            activePageNow++
+            getTabData(activePageNow)
+            // renderPagination(totalPage,activePageNow,totalNum)
+        }
+    })
+    
+}
+
+$(document).on("click", function(){
+    $(".levelList ").css("display", "none")
+    $(".deptList").css("display", "none")
+    $(".selectLevel .arrow").attr("src",iconDown)
+    
+})
+
+$((function($){
+})($));

+ 4 - 8
src/js/roleManager.js

@@ -31,16 +31,12 @@ $(function(){
         }
         saveRoleMenu(params)
     })
-    '/sys/role/getRoleMenu'//获取角色菜权限单等数据
-    '/sys/role/list' //获取角色列表信息
-    '/sys/role/listForUser'//获取角色下拉列表信息
-    '/sys/role/saveRoleMenu'//修改角色菜单权限数据
     getRoleList()
     getRoleMenu()
     // saveRoleMenu()
     function getRoleMenu(id){
         if(!id)return
-        post('/sys/role/getRoleMenu',{roleId:id}).then(res =>{
+        post(api.getRoleMenu,{roleId:id}).then(res =>{
             let data = res.data;
             if(data.code == '0'){
                 curData = data.data
@@ -51,7 +47,7 @@ $(function(){
         })
     }
     function getRoleList(){
-        post('/sys/role/list').then(res =>{
+        post(api.list).then(res =>{
             let data = res.data;
             if(data.code == '0'){
                 roleLeftLis(data.data)
@@ -63,7 +59,7 @@ $(function(){
         })
     }
     function saveRoleMenu(params){
-        post('/sys/role/saveRoleMenu',params).then(res =>{
+        post(api.saveRoleMenu,params).then(res =>{
             let data = res.data;
             $(".loading").remove()
             if(data.code == '0'){
@@ -108,7 +104,7 @@ $(function(){
             let grandParentId = $(this).parents(".mainSys").attr("data-menuId")
             let grandIndex = $(this).parents(".mainSys").attr("data-index")
             let tmpSelectData = null,tmpSelectDataOr=[];
-            if(grandParentId == 3||grandParentId == 2){//循环
+            if(grandParentId == 3||grandParentId == 2||grandParentId==17||grandParentId==18){//循环
                 // console.log(curData[grandIndex])
                 let tmpData = curData[grandIndex];
                 let tmpDataLis = curData[grandIndex].sonMenuDTOList;

+ 429 - 0
src/js/tiaomu.js

@@ -0,0 +1,429 @@
+const $ = require('jquery');
+require("../css/tiaomu.less");
+require('./../resource/jquery-ui/jquery-ui.min.js');
+require('./modal.js');
+const {api} = require('./api.js')
+const {post,getCookie,getUrlArgObjectNew} = require('./utils.js')
+const switchIconOpen = require("./../images/btn_open.png")
+const switchIconClose = require("./../images/btn_close.png")
+const iconDown= require("./../images/arrow_down.png")
+const iconUp = require("./../images/arrow_up.png")
+const arrowLeft= require("./../images/arrow_left.png")
+const arrowRight = require("./../images/arrow_right.png")
+
+
+let casesId="", name="", isReject ="2",deptName="", isUsed ="",casesIdTemp="", nameTemp="", isRejectTemp ="2", isUsedTemp ="",from=""
+$(".selectModuleType").append(`<img class="arrow" src=${iconDown} alt="下拉">`)
+$(".selectReject").append(`<img class="arrow" src=${iconDown} alt="下拉">`)
+$(".selectUsed").append(`<img class="arrow" src=${iconDown} alt="下拉">`)
+$(function(){
+    dateChange()
+    let srcUrl = $("#contentIframe",parent.document).attr("src")
+    isReject = getUrlArgObjectNew("dateType",srcUrl)||2
+    deptName = getUrlArgObjectNew("deptName",srcUrl)||""
+    from = getUrlArgObjectNew("from",srcUrl)||""
+    getTabData(1)//条目缺陷
+})
+function getTabData(activePage){
+    const param = {
+        current:activePage,
+        type: isReject,
+        name: name, //条目名
+        deptName: deptName, //科室名
+        size: 15
+    }
+    console.log(isReject)
+    post(from == 1?api.entryCountGroupByEntryPage:api.entryCountGroupByEntryAndDeptPage,param).then(res =>{
+        if(res.data.code == '0'){
+            const data = res.data.data.records
+            const totalPage = res.data.data.pages
+            const totalNum = res.data.data.total
+            renderTab(data,activePage)
+            if(totalPage > 1){
+                renderPagination(totalPage,Number(activePage),totalNum)
+            } else{
+                $('.pagination').html("")
+            }
+        }else{}
+    }).catch((e) =>{
+    
+    })
+}
+//所有数据切换日期筛选
+function dateChange(){
+    $(".monthYear .mon").click(function(){
+        $(this).css({
+            backgroundColor:'#5A8EEE',
+            color:'#fff'
+        }).siblings().css({
+            color:'#5A8EEE',
+            backgroundColor:'#fff'
+        })
+        isReject = 1
+        getTabData(1)
+    })
+    $(".monthYear .year").click(function(){
+        $(this).css({
+            backgroundColor:'#5A8EEE',
+            color:'#fff'
+        }).siblings().css({
+            color:'#5A8EEE',
+            backgroundColor:'#fff'
+        })
+        isReject = 2
+        getTabData(1)
+    })
+}
+//判断有无某一权限
+function hasData(data){
+    let lis = JSON.parse(getCookie("codeLis"))
+    if(lis.indexOf(data)>-1){//有权限
+        return true
+    }
+    return false;
+}
+//获取表格数据
+function getTabDatas(activePage){
+    const param = {
+        current:activePage,
+        casesId: casesId,
+        name: name, //条目名
+        isReject: isReject, //1-单项否决 0-非
+        isUsed: isUsed, //0-未启用 1-启用
+        size: 15
+    }
+    post(api.getQcCasesEntryAll,param).then(res =>{
+        if(res.data.code == '0'){
+            const data = res.data.data.records
+            const totalPage = res.data.data.pages
+            const totalNum = res.data.data.total
+            renderTab(data,activePage)
+            if(totalPage > 1){
+                renderPagination(totalPage,Number(activePage),totalNum)
+            } else{
+                $('.pagination').html("")
+            }
+        }else{}
+    }).catch((e) =>{
+    
+    })
+}
+$(".moduleItemInp").on("input", function(e){
+    const val = $(this).val().trim()
+    nameTemp = val
+})
+$(".filter").on("click", function(e){
+    casesId=casesIdTemp, name=nameTemp, isReject =isRejectTemp, isUsed =isUsedTemp
+    getTabData(1)
+})
+$(".filterclear").on("click", function(e){
+    nameTemp = ""
+    $(".moduleItemInp").val("")
+})
+$('.selectModuleType').on("click", function(e){
+    e.stopPropagation()
+    $(".rejectList ").css("display","none")
+    $(".usedList ").css("display", "none")
+    $(".selectReject .arrow").attr("src",iconDown)
+    $(".selectUsed .arrow").attr("src",iconDown)
+    const showList =  $(".moduleTypeList ").css("display")
+    if(showList == "none" ||!showList){
+        $(".moduleTypeList ").css("display","block")
+        $(".selectModuleType .arrow").attr("src",iconUp)
+    }else{
+        $(".moduleTypeList ").css("display", "none")
+        $(".selectModuleType .arrow").attr("src",iconDown)
+    }
+})
+$('.selectReject').on("click", function(e){
+    e.stopPropagation()
+    $(".moduleTypeList ").css("display", "none")
+    $(".usedList ").css("display", "none")
+    $(".selectModuleType .arrow").attr("src",iconDown)
+    $(".selectUsed .arrow").attr("src",iconDown)
+    const showList =  $(".rejectList ").css("display")
+    if(showList == "none" ||!showList){
+        $(".rejectList ").css("display","block")
+        $(".selectUsed .arrow").attr("src",iconUp)
+    }else{
+        $(".rejectList ").css("display", "none")
+        $(".selectUsed .arrow").attr("src",iconDown)
+    }
+})
+$('.selectUsed').on("click", function(e){
+    e.stopPropagation()
+    $(".moduleTypeList ").css("display", "none")
+    $(".rejectList ").css("display","none")
+    $(".selectModuleType .arrow").attr("src",iconDown)
+    $(".selectReject .arrow").attr("src",iconDown)
+    const showList =  $(".usedList ").css("display")
+    if(showList == "none" ||!showList){
+        $(".usedList ").css("display","block")
+        $(".selectUsed .arrow").attr("src",iconUp)
+    }else{
+        $(".usedList ").css("display", "none")
+        $(".selectUsed .arrow").attr("src",iconDown)
+    }
+})
+// bindRejectSelect()
+// bindUsedSelect()
+// getTabData(1)
+// getmoduleTypeList()
+function renderTab(data,activePage){
+    let str = ``;
+    const cls = hasData("FUNC000007")?"editItem":"editItemDis";
+    for(let i = 0; i < data.length; i++){
+        const item = data[i]
+        str += `
+            <tr data-id=${item.id} data-index=${i}>
+                <td  class="textCenter">${(activePage-1)*15 + i+1}</td>
+                <td>${item.name}</td>
+                <td  class="textCenter">${item.percentStr}</td>
+            </tr>
+        `
+    }
+    $('tbody').html(str)
+    bindEdit(data,activePage)
+}
+
+function bindEdit(data,activePage){
+    if(!hasData('FUNC000007')){
+        return
+    }
+    $('.editItem').click(function(e){
+        const index = $(this).parent().attr('data-index') 
+        editItem(data[index],activePage)
+    })
+}
+
+//修改
+function editItem(item,activePage){
+    const itemCpoy = JSON.parse(JSON.stringify(item))
+    $('.pop-box').remove()
+    $('.container').append('<div class="pop-box"></div>')
+    const str = `
+        <div class="itemMsgBox">
+            <div class="mask"></div>
+            <div class="itemMsgContent">
+                <p class="itemMsgTitle">修改 <img class="iconClose" src=${require('./../images/icon_close_default.png')} alt="关闭" /></p>
+                <div class="itemMsgContentBox">
+                    <div class="itemMsgInfoBox"><span class="itemMsgLab">模块名称:</span> <span class="itemInfoRight">${itemCpoy.casesName}</span></div>
+                    <div class="itemMsgInfoBox"><span class="itemMsgLab">条目名称:</span> <span class="itemInfoRight"> ${itemCpoy.name}</span></div>
+                    <div class="itemMsgInfoBox"><span class="itemMsgLab">提示信息:</span> <span class="itemInfoRight"> <input class="itemTipMsg" value="${itemCpoy.msg}" /></span></div>
+                    <div class="itemMsgInfoBox"><span class="itemMsgLab">
+                        分值:
+                        </span> <span class="itemInfoRight"> 
+                            <input class="itemScore" type="number" min="0" value=${itemCpoy.score} />
+                        </span>
+                        <p class="itemMsgInfoTips">支持≥0的数字输入,最多保留小数点后1位~</p>
+                    </div>
+                 
+                    <div class="itemMsgInfoBox"><span class="itemMsgLab">单项否决:</span><span class="itemInfoRight itemReject">${item.isReject == '1' ? `<img class="switchImg" src=${switchIconOpen} /><span class="imgInfo">  是</span>`:`<img class="switchImg" src=${switchIconClose} /> <span class="imgInfo"> 否</span>`}</span></div>
+                    <div class="itemMsgInfoBox"><span class="itemMsgLab">启用:</span><span class=" temInfoRight itemUsed">${item.isUsed == '1' ? `<img class="switchImg" src=${switchIconOpen} /><span class="imgInfo"> 是</span>`:`<img class="switchImg" src=${switchIconClose} /> <span class="imgInfo"> 否</span>`}</span></div>
+                </div>
+                
+                <div class="confirmEditBox"><span class="confirmEdit">保存</span></div>
+            </div>
+        </div>
+       
+    `
+    $("#mainBox", parent.document).append(str)
+    $("#mainBox .itemMsgBox .iconClose", parent.document).on("click", function(e){
+        $("#mainBox .itemMsgBox", parent.document).remove()
+    })
+    $("#mainBox .itemMsgBox .itemTipMsg", parent.document).on("input", function(e){
+        const val = $(this).val().trim()
+        itemCpoy.msg = val
+    })
+    $("#mainBox .itemMsgBox .itemScore", parent.document).on("keypress", function(e){
+        return (/[0-9\.]/.test(String.fromCharCode(e.keyCode)))
+    })
+    $("#mainBox .itemMsgBox .itemScore", parent.document).on("input", function(e){
+        const val = $(this).val()
+        itemCpoy.score = val
+    })
+    $("#mainBox .itemMsgBox .itemReject", parent.document).on("click", function(e){
+        itemCpoy.isReject = itemCpoy.isReject == 1 ? 0 : 1
+        $('#mainBox .itemMsgBox', parent.document).remove()
+        editItem(itemCpoy,activePage)
+    })
+    $("#mainBox .itemMsgBox .itemUsed", parent.document).on("click", function(e){
+        itemCpoy.isUsed = itemCpoy.isUsed == 1 ? 0 : 1
+        $('#mainBox .itemMsgBox', parent.document).remove()
+        editItem(itemCpoy,activePage)
+    })
+    
+    $("#mainBox .itemMsgBox .confirmEdit", parent.document).on("click", function(){
+        var reg = new RegExp(/^\d+(\.\d)?$/);
+        if(reg.test(itemCpoy.score)){
+            console.log('itemCopy', itemCpoy)
+            if(!itemCpoy.msg.trim()){
+                $.alerModal({"message":"提示信息不能为空~",type:"tip",time:'1000',isFather: true, fatherWrapper: $("#mainBox", parent.document)});
+                return 
+            }
+            
+            saveEdit(itemCpoy,activePage)
+            $("#mainBox .itemMsgBox .itemMsgInfoTips", parent.document).css("display","none")
+            $('#mainBox .itemMsgBox', parent.document).remove()
+            return 
+        }else{
+            $("#mainBox .itemMsgBox .itemMsgInfoTips", parent.document).css("display","block")
+            
+            return
+        }
+      
+    })
+   
+    
+}
+
+//保存修改
+function saveEdit(item,activePage){
+    const param = {
+        id: item.id,
+        isReject: item.isReject,
+        isUsed: item.isUsed,
+        msg: item.msg,
+        score: item.score
+    }
+
+    post(api.updataQcCasesEntry,param).then(res =>{
+        if(res.data.code == '0'){
+            // const data = res.data.data
+            $.alerModal({"message":"修改成功",type:"tip",time:'1000',isFather: true, fatherWrapper: $("#mainBox", parent.document)});
+            getTabData(activePage)
+        }else{}
+    }).catch((e) =>{
+    
+    })
+}
+
+//获取模块类型
+function getmoduleTypeList(){
+    post(api.getQcCasesAll).then(res =>{
+        if(res.data.code == '0'){
+           const  moduleTypeList = res.data.data
+           renderModuleTypeList(moduleTypeList)
+        }else{}
+    }).catch((e) =>{
+    
+    })
+}
+
+
+function renderModuleTypeList(moduleTypeList){
+    let str = `<li class="modeTypeItem " data-id=" " data-name="全部">全部</li>`
+    for(let i = 0; i < moduleTypeList.length; i++){
+        str += `<li class="modeTypeItem ellipsis" title=${moduleTypeList[i].name} data-id=${moduleTypeList[i].id} data-name=${moduleTypeList[i].name}> ${moduleTypeList[i].name}</li>`
+    }
+    $('.moduleTypeList').html(str)
+    bindModuleTypeSelect()
+}
+
+//模块类型选择
+function bindModuleTypeSelect(){
+    $('.modeTypeItem').on("click",function(){
+        const modeTypeItemName = $(this).attr("data-name")
+        const modeTypeItemId = $(this).attr("data-id")
+        casesIdTemp =modeTypeItemId
+        $('.selectModuleType').html(modeTypeItemName).attr("title",modeTypeItemName)
+        $(".selectModuleType").append(`<img class="arrow" src=${iconDown} alt="下拉">`)
+
+        $(".moduleTypeList ").css("display", "none")
+    })
+}
+//单项否决选择
+function bindRejectSelect(){
+    $('.rejectItem').on("click",function(){
+        const rejectItemName = $(this).attr("data-name")
+        const rejectItemId = $(this).attr("data-id")
+        isRejectTemp=rejectItemId
+        $('.selectReject').html(rejectItemName)
+        $(".rejectList ").css("display", "none")
+        $(".selectReject").append(`<img class="arrow" src=${iconDown} alt="下拉">`)
+
+    })
+}
+//是否启用选择
+function bindUsedSelect(){
+    $('.usedItem').on("click",function(){
+        const usedItemName = $(this).attr("data-name")
+        const usedItemItemId = $(this).attr("data-id")
+        isUsedTemp =usedItemItemId
+        $('.selectUsed').html(usedItemName)
+        $(".usedList").css("display", "none")
+        $(".selectUsed").append(`<img class="arrow" src=${iconDown} alt="下拉">`)
+    })
+}
+
+
+
+
+//分页渲染
+function renderPagination(totalPage,activePage,totalNum){
+    let str = `<span class="totalSum">共${totalPage}页/${totalNum}条数据</span><span class="prePage"><img class="arrowPage" src=${arrowLeft} /></span>`
+    if(totalPage <= 6){
+        for(let i = 1; i <= totalPage; i++){
+            str += `<span class="pageNum ${'page'+i}" data-page=${i}>${i}</span>`
+        }
+    }else{
+        if(activePage <= 3){ //选中页数小于4
+            for(let i = 1; i <= 4; i++){
+                str += `<span class="pageNum ${'page'+i}" data-page=${i}>${i}</span>`
+            }
+            str += `<span class="more" >...</span>`
+        str += `<span class="pageNum ${'page'+totalPage}" data-page=${totalPage}>${totalPage}</span>`
+
+        } else if(activePage > totalPage -3){
+            str += `<span class="pageNum page1" data-page=1>1</span>`
+            str += `<span class="more" >...</span>`
+            str += `<span class="pageNum ${'page'+(totalPage-3)}" data-page=${totalPage -3}>${totalPage -3}</span>`
+            str += `<span class="pageNum ${'page'+(totalPage-2)}" data-page=${totalPage -2}>${totalPage -2}</span>`
+            str += `<span class="pageNum ${'page'+(totalPage-1)}" data-page=${totalPage -1}>${totalPage -1}</span>`
+            str += `<span class="pageNum ${'page'+totalPage}" data-page=${totalPage}>${totalPage}</span>`
+        } else {
+            str += `<span class="pageNum page1" data-page=1>1</span>`
+            str += `<span class="more" >...</span>`
+            str += `<span class="pageNum ${'page'+(activePage -1)}" data-page=${activePage -1}>${activePage -1}</span>`
+            str += `<span class="pageNum ${'page'+activePage}" data-page=${activePage}>${activePage}</span>`
+            str += `<span class="pageNum ${'page'+(activePage +1)}" data-page=${activePage +1}>${activePage +1}</span>`
+            str += `<span class="more" >...</span>`
+            str += `<span class="pageNum ${'page'+totalPage}" data-page=${totalPage}>${totalPage}</span>`
+        }
+       
+    }
+    str += `<span class="nextPage"><img class="arrowPage" src=${arrowRight} /></span>`
+    $('.pagination').html(str)
+    $('.page' + activePage).addClass('activePage')
+    $(".pageNum").on("click", function(e){
+        const activePageNow = Number($(this).attr('data-page'))
+        getTabData(activePageNow)
+        // renderPagination(totalPage,activePageNow,totalNum)
+    })
+    $(".prePage").on("click", function(e){
+        let activePageNow = Number($(".activePage").attr('data-page'))
+        if(activePageNow > 1){
+            activePageNow--
+            getTabData(activePageNow)
+            // renderPagination(totalPage,activePageNow,totalNum)
+        }
+    })
+    $(".nextPage").on("click", function(e){
+        let activePageNow = Number($(".activePage").attr('data-page'))
+        if(activePageNow < totalPage){
+            activePageNow++
+            getTabData(activePageNow)
+            // renderPagination(totalPage,activePageNow,totalNum)
+        }
+    })
+    
+}
+
+$(document).on("click", function(){
+    $(".moduleTypeList ").css("display", "none")
+    $(".rejectList ").css("display","none")
+    $(".usedList ").css("display", "none")
+    $(".selectModuleType .arrow").attr("src",iconDown)
+    $(".selectReject .arrow").attr("src",iconDown)
+    $(".selectUsed .arrow").attr("src",iconDown)
+})

+ 9 - 9
src/js/userManager.js

@@ -25,7 +25,7 @@ function getTabData(activePage){
         "roleId": isReject||"",
         "size": 15
     }
-    post('/sys/user/userPage',params).then(res =>{
+    post(api.userPage,params).then(res =>{
         if(res.data.code == '0'){
             const data = res.data.data.records
             const totalPage = res.data.data.pages
@@ -126,7 +126,7 @@ function renderTab(data,activePage){
 
 //获取用户科室列表
 function getDeptList(id,activePage,title){
-    post('/sys/user/getUserDepts',{userId:id}).then(res =>{
+    post(api.getUserDepts,{userId:id}).then(res =>{
         let data = res.data;
         if(data.code == '0'){
             let result = data.data
@@ -139,7 +139,7 @@ function getDeptList(id,activePage,title){
 }
 //获取用户角色列表
 function getUserList(id,activePage,title){
-    post('/sys/user/getUserRoles',{userId:id}).then(res =>{
+    post(api.getUserRoles,{userId:id}).then(res =>{
         let data = res.data;
         if(data.code == '0'){
             const result = data.data
@@ -166,9 +166,9 @@ function bindEdit(data,activePage){
         const status = $(this).attr('data-status')
         let that = $(this);
         if(status == 1){
-            toggleOnOff('/sys/user/disable',id,that,status)
+            toggleOnOff(api.disable,id,that,status)
         }else{
-            toggleOnOff('/sys/user/enable',id,that,status)
+            toggleOnOff(api.enable,id,that,status)
         }
     })
 }
@@ -457,7 +457,7 @@ function saveEdit(id,activePage){
         "deptIds": ids,
         "userId": id
       }
-    post('/sys/user/editUserDepts',param).then(res =>{
+    post(api.editUserDepts,param).then(res =>{
         if(res.data.code == '0'){
             // const data = res.data.data
             getTabData(activePage)
@@ -482,7 +482,7 @@ function saveEditRole(id,activePage){
         "roleIds": ids,
         "userId": id
       }
-    post('/sys/user/editUserRoles',param).then(res =>{
+    post(api.editUserRoles,param).then(res =>{
         if(res.data.code == '0'){
             // const data = res.data.data
             getTabData(activePage)
@@ -496,7 +496,7 @@ function saveEditRole(id,activePage){
 
 //获取科室,角色列表
 function getmoduleTypeList(){
-    post('/bas/dept/listForUser',{
+    post(api.getDeptListUser,{
         "inputStr": ""
       }).then(res =>{
         if(res.data.code == '0'){
@@ -506,7 +506,7 @@ function getmoduleTypeList(){
     }).catch((e) =>{
     
     })
-    post('/sys/role/listForUser').then(res =>{
+    post(api.listForUserRole).then(res =>{
         if(res.data.code == '0'){
            const  moduleTypeList = res.data.data
            renderRoleTypeList(moduleTypeList)

+ 23 - 14
src/js/utils.js

@@ -1,7 +1,7 @@
 const qs = require('qs');
 const $ = require("jquery");
 var Utils = require('./rePromise');
-
+const baseUrl = "http://192.168.2.236:5858"
 //页面映射
 const pageMap={
   'YH-KZT':'console.html',
@@ -14,17 +14,11 @@ const pageMap={
   'YH-TJFX':'statistics.html',
   'YH-QXGL-YHGL':'userManager.html',
   'YH-QXGL-JSGL':'roleManager.html',
-};
-const api={
-  getMenu:'/sys/user/getUserOrgMenu',     //获取菜单
-  midifyPassword:'/sys/user/midifyPassword',     //修改密码
-  getSubMenu:'/qc/mode/getMenu',   //获取质控评分菜单
-  delScore:'/qc/behospitalInfo/delCase' ,//删除评分项
-  editScore:'/qc/behospitalInfo/updCase' ,//修改评分
-  addScore:'/qc/behospitalInfo/addCase' ,//添加评分项
-  getRecordDetail:'/qc/behospitalInfo/getByBehospitalCode', //获取病例明细
-  getInfoModule:'/qc/module/getById',
-  getModuleById:'/qc/module/getModuleMap'
+  'YH-KSZR-GMKQXZB_XQ':'mukuai.html?from=2',
+  'YH-KSZR-TMQXZB_XQ':'tiaomu.html?from=2',
+  'YH-ZKK-GMKQXZB_XQ':'mukuai.html?from=1',
+  'YH-ZKK-TMQXZB_XQ':'tiaomu.html?from=1',
+  'YH-YCSJJK':'abnormal.html',
 };
 
 //重写assign方法
@@ -69,6 +63,17 @@ const getUrlArgObject = function getQueryString(name) {
     return null;
   }
 }
+const getUrlArgObjectNew = function(name,srcUrl) {
+  if(srcUrl.indexOf("?") == -1){
+    return ""
+  }
+  var r = srcUrl.split("?")[1].split("&"),obj={};
+  for(let i = 0;i < r.length;i++){
+    let tmp = r[i].split("=")
+    obj[tmp[0]] = tmp[1]
+  }
+  return obj[name]
+}
 
 const post = function (url, data) {
   const token = getCookie('accessToken')
@@ -78,7 +83,11 @@ const post = function (url, data) {
   return new Utils((resolve, reject) => {
     $.ajax({
       method: 'post',
-      url: url,
+      url: baseUrl+url,
+      async:true,
+      cache: false,
+      contentType: false,
+      processData: false,
       data: JSON.stringify(data),
       contentType: "application/json; charset=UTF-8",
       beforeSend: function (xmlHttp) {
@@ -164,9 +173,9 @@ function hasData(data){
 
 module.exports = {
   pageMap,
-  api,
   post,
   getUrlArgObject,
+  getUrlArgObjectNew,
   isIe8,
   setCookie,
   getCookie,

+ 56 - 1
webpack.config.js

@@ -24,6 +24,10 @@ module.exports = {
     qcListPerson:path.resolve(__dirname, 'src/js', 'qcListPerson.js'),
     userManager: path.resolve(__dirname, 'src/js', 'userManager.js'),
     roleManager: path.resolve(__dirname, 'src/js', 'roleManager.js'),
+    tiaomu: path.resolve(__dirname, 'src/js', 'tiaomu.js'),
+    mukuai: path.resolve(__dirname, 'src/js', 'mukuai.js'),
+    abnormal: path.resolve(__dirname, 'src/js', 'abnormal.js'),
+    partDetail: path.resolve(__dirname, 'src/js', 'partDetail.js'),
     vendor: 'lodash'// 多个页面所需的公共库文件,防止重复打包带入
   },
   output: {
@@ -62,6 +66,32 @@ module.exports = {
         collapseWhitespace: true //删除空白符与换行符
       }
     }),
+    new HtmlWebpackPlugin({
+      title: 'abnormal.html',
+      template: path.resolve(__dirname, 'src/html', 'abnormal.html'),
+      filename: 'abnormal.html',
+      chunks: ['abnormal', 'vendor', 'common'],
+      hash: true, //防止缓存
+      inject: true,
+      minify: {
+        removeAttributeQuotes: true, //压缩 去掉引号
+        removeComments: true, //移除HTML中的注释
+        collapseWhitespace: true //删除空白符与换行符
+      }
+    }),
+    new HtmlWebpackPlugin({
+      title: 'partDetail.html',
+      template: path.resolve(__dirname, 'src/html', 'partDetail.html'),
+      filename: 'partDetail.html',
+      chunks: ['partDetail', 'vendor', 'common'],
+      hash: true, //防止缓存
+      inject: true,
+      minify: {
+        removeAttributeQuotes: true, //压缩 去掉引号
+        removeComments: true, //移除HTML中的注释
+        collapseWhitespace: true //删除空白符与换行符
+      }
+    }),
     new HtmlWebpackPlugin({
       title: 'deptConsole.html',
       template: path.resolve(__dirname, 'src/html', 'deptConsole.html'),
@@ -101,6 +131,32 @@ module.exports = {
         collapseWhitespace: true //删除空白符与换行符
       }
     }),
+    new HtmlWebpackPlugin({
+      title: 'tiaomu.html',
+      template: path.resolve(__dirname, 'src/html', 'tiaomu.html'),
+      filename: 'tiaomu.html',
+      chunks: ['tiaomu', 'vendor', 'common'],
+      hash: true, //防止缓存
+      inject: true,
+      minify: {
+        removeAttributeQuotes: true, //压缩 去掉引号
+        removeComments: true, //移除HTML中的注释
+        collapseWhitespace: true //删除空白符与换行符
+      }
+    }),
+    new HtmlWebpackPlugin({
+      title: 'mukuai.html',
+      template: path.resolve(__dirname, 'src/html', 'mukuai.html'),
+      filename: 'mukuai.html',
+      chunks: ['mukuai', 'vendor', 'common'],
+      hash: true, //防止缓存
+      inject: true,
+      minify: {
+        removeAttributeQuotes: true, //压缩 去掉引号
+        removeComments: true, //移除HTML中的注释
+        collapseWhitespace: true //删除空白符与换行符
+      }
+    }),
     new HtmlWebpackPlugin({
       title: 'login.html',
       template: path.resolve(__dirname, 'src/html', 'login.html'),
@@ -314,6 +370,5 @@ module.exports = {
     },
     hot: true,
     openPage:'login.html'
-    
   }
 }