Selaa lähdekoodia

Merge branch 'test' into dev_zxc

zhangxc 5 vuotta sitten
vanhempi
commit
0016f4d645

+ 271 - 72
src/css/console.less

@@ -1,3 +1,6 @@
+body.console {
+  overflow: auto;
+}
 .echarts {
   width: 100%;
   height: 300px;
@@ -6,22 +9,24 @@
 .barChartPay {
   width: 100%;
   height: 300px;
-  padding: 0 15px;
 }
 .emptyCircle {
-  width: 45%;
+  width: 35%;
   height: 200px;
   float: left;
-  margin-top: 56px;
+  margin-top: 32px;
+}
+#emptyCircleB {
+  margin-top: 50px;
 }
 .partAll {
   background-color: #fff;
 }
 .partWrap {
-  overflow-x: hidden;
-  overflow-y: auto;
+  // overflow: auto;
   height: auto;
   background: #f5f5f5;
+  min-width: 1185px;
   ul {
     padding: 0 40px;
   }
@@ -77,8 +82,11 @@
   height: 10px;
   background-color: #f5f5f5;
 }
+.partTitleT {
+  height: 44px;
+}
 .partTitle {
-  position: relative;
+  position: absolute;
   top: 0;
   right: 0;
   width: 100%;
@@ -88,13 +96,21 @@
   height: 44px;
   line-height: 44px;
   padding-left: 15px;
-  border-bottom: 1px solid #E2E5EF;
   font-size: 14px;
   font-weight: bold;
   letter-spacing: 1px;
   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;
@@ -130,79 +146,40 @@
   margin-right: 0;
 }
 .pubEchart {
-  width: 50%;
+  width: 100%;
   display: inline-block;
   margin-bottom: 10px;
   background-color: #fff;
+  border-top: 10px solid #f5f5f5;
+}
+.pubEchartB {
+  width: 55%;
+  display: inline-block;
+  margin-bottom: 10px;
+  background-color: #fff;
+  border-top: 10px solid #f5f5f5;
+  border-left: 10px solid #f5f5f5;
+  box-sizing: border-box;
 }
 .paymoney {
-  border-right: 5px solid #f5f5f5;
   box-sizing: border-box;
+  position: relative;
 }
 .dept {
-  border-left: 5px solid #f5f5f5;
   box-sizing: border-box;
 }
-.defect {
-  border-right: 5px solid #f5f5f5;
+.circle {
+  height: 304px;
+  width: 100%;
+  display: inline-block;
   background-color: #fff;
   box-sizing: border-box;
-  width: 45%;
-  display: inline-block;
-  height: 350px;
-  overflow: hidden;
-  .list {
-    padding: 15px 30px;
-    width: 100%;
-    box-sizing: border-box;
-    overflow: auto;
-    height: 308px;
-  }
-  .thead {
-    td {
-      color: #51649C;
-    }
-  }
-  .qtable {
-    width: 100%;
-    overflow: auto;
-  }
-  td {
-    padding: 7px 10px;
-    i {
-      width: 17px;
-      height: 17px;
-      line-height: 17px;
-      border-radius: 8px;
-      background-color: #999;
-      color: #fff;
-      display: inline-block;
-      text-align: center;
-      font-size: 12px;
-    }
-  }
-  tr {
-    border-bottom: 1px solid #f5f5f5;
-    box-sizing: border-box;
-  }
-  .td01 {
-    width: 30px;
-  }
-  .td02 {
-    
-  }
-  .td03 {
-    width: 40px;
-  }
-  .td04 {
-    width: 40px;
-  }
+  position: relative;
 }
-.circle {
+.circleB {
   height: 350px;
-  width: 55%;
+  width: 45%;
   display: inline-block;
-  border-left: 5px solid #f5f5f5;
   background-color: #fff;
   box-sizing: border-box;
   position: relative;
@@ -212,14 +189,14 @@
   overflow: hidden;
 }
 .explainPan {
-  width: 50%;
+  width: 60%;
   float: right;
   position: absolute;
   top: 50%;
-  left: 50%;
+  right: 0;
   padding-right: 30px;
   box-sizing: border-box;
-  max-height: 300px;
+  max-height: 250px;
   overflow: auto;
   table {
     width: 100%;
@@ -239,11 +216,16 @@
       margin-right: 10px;
     }
     .deptName {
-      width: 115px;
-      overflow: hidden;
-      text-overflow: ellipsis;
-      white-space: nowrap;
       color: #777;
+      p {
+        width: 145px;
+        overflow: hidden;
+        text-overflow: ellipsis;
+        white-space: nowrap;
+      }
+      .smp {
+        width: 100px;
+      }
     }
     .deptNum {
       color: #333;
@@ -258,4 +240,221 @@
       width: 40px;
     }
   }
+}
+
+
+.part01 {
+  width: 28%;
+  background-color: #fff;
+  border-right: 10px solid #f5f5f5;
+  box-sizing: border-box;
+  ul {
+    padding: 40px 20px;
+    border-bottom: 10px solid #f5f5f5;
+    li {
+      float: left;
+      width: 33.33%;
+      border-left: 3px solid #F2637B;
+      height: 72px;
+      box-sizing: border-box;
+      padding-left: 12px;
+      &.li02 {
+        border-left: 3px solid #37CBCB;
+      }
+      &.li03 {
+        border-left: 3px solid #FAD336;
+      }
+    }
+  }
+  
+  .defect {
+    background-color: #fff;
+    height: 452px;
+    overflow: hidden;
+    .list {
+      padding: 15px 5px;
+      width: 100%;
+      box-sizing: border-box;
+      overflow: auto;
+      height: 405px;
+    }
+    .thead {
+      td {
+        color: #51649C;
+      }
+    }
+    .qtable {
+      width: 100%;
+      overflow: auto;
+    }
+    td {
+      padding: 7px 10px;
+      i {
+        width: 17px;
+        height: 17px;
+        line-height: 17px;
+        border-radius: 8px;
+        background-color: #999;
+        color: #fff;
+        display: inline-block;
+        text-align: center;
+        font-size: 12px;
+      }
+    }
+    tr {
+      border-bottom: 1px solid #f5f5f5;
+      box-sizing: border-box;
+    }
+    .td01 {
+      width: 30px;
+    }
+    .td02 {
+      
+    }
+    .td03 {
+      width: 40px;
+    }
+    .td04 {
+      width: 40px;
+    }
+  }
+}
+.part02{
+  border-right: 10px solid #f5f5f5;
+  box-sizing: border-box;
+  width: 39%;
+  background-color: #fff;
+  .bingli {
+    padding: 20px;
+    li {
+      float: left;
+      width: 23%;
+      text-align: center;
+    }
+    .fst {
+      // border-right: 1px solid #E2E5EF;
+      box-sizing: border-box;
+      width: 30%;
+    }
+  }
+  .bingliLis {
+    border-top: 1px solid #E2E5EF;
+    padding: 20px 30px;
+    p {
+      text-align: center;
+      font-weight: bold;
+      font-size: 16px;
+      padding-bottom: 2px;
+    }
+  }
+  .panPartPub {
+    width: 33.33%;
+    height: 130px;
+    float: left;
+    position: relative;
+    p {
+      text-align: center;
+      font-size: 12px;
+      font-weight: normal;
+      width: 100px;
+      position: absolute;
+      bottom: 0;
+      left: 50%;
+      margin-left: -50px;
+    }
+    .fen {
+      width: 100px;
+      height: 100px;
+      position: absolute;
+      left: 50%;
+      margin-left: -50px;
+    }
+  }
+}
+.part03 {
+  width: 33%;
+  background-color: #fff;
+  box-sizing: border-box;
+  .barChartLine {
+    box-sizing: border-box;
+    width: 100%;
+    height: 300px;
+  }
+  .barChartLineBox {
+    border-bottom: 10px solid #f5f5f5;
+    // width: 100%;
+    padding-left: 15px;
+  }
+}
+
+.partTitlePub {
+  height: 44px;
+  line-height: 44px;
+  padding: 0 15px;
+  box-sizing: border-box;
+  border-bottom: 1px solid #E2E5EF;
+  font-weight: bold;
+  font-size: 16px;
+  .name {
+    float: left;
+    font-size: 16px;
+  }
+  .personNum {
+    float: right;
+    color: #51649C;
+  }
+}
+
+.numShow {
+  font-size: 28px;
+  display: inline-block;
+  height: 36px;
+  line-height: 40px;
+  font-weight: bold;
+}
+.explainNum {
+  margin-top: 8px;
+}
+
+.toggleSlide {
+  cursor: pointer;
+  position: absolute;
+  right: 10px;
+  top: 4px;
+  p {
+    width: 100px;
+    height: 26px;
+    line-height: 28px;
+    border: 1px solid #E2E5EF;
+    padding-right: 20px;
+    padding-left: 10px;
+    position: relative;
+    font-size: 14px;
+    border-radius: 4px;
+    img {
+      width: 10px;
+      position: absolute;
+      right: 10px;
+      top: 12px;
+    }
+  }
+  ul {
+    display: none;
+    background-color: #fff;
+    position: absolute;
+    top: 27px;
+    right: 0;
+    border: 1px solid #E2E5EF;
+    z-index: 100;
+    padding: 0;
+    width: 130px;
+    li {
+      height: 30px;
+      line-height: 30px;
+      padding: 0 10px;
+      &:hover {
+        background-color: #EEF4FF;
+      }
+    }
+  }
 }

+ 1 - 1
src/css/index.less

@@ -37,7 +37,7 @@
       text-indent: 0;
       width: 100px;
       position: absolute;
-      right: 0;
+      right: -15px;
       top:42px;
       box-shadow:0px 4px 20px -3px rgba(59,89,126,0.3);
       li {

+ 4 - 0
src/css/itemManager.less

@@ -149,6 +149,10 @@
        color: #5A8EEE;
        cursor: pointer;
     }
+    .editItemDis{
+        color: #aaa;
+        cursor: not-allowed;
+    }
     
     .ellipsis{
         overflow: hidden;

+ 4 - 1
src/css/moduleManager.less

@@ -91,7 +91,10 @@ table{
     color: #5A8EEE;
     cursor: pointer;
 }
-
+.moduleOperaItemDis{
+    color: #aaa;
+    cursor: not-allowed;
+}
 input::-webkit-outer-spin-button,
 input::-webkit-inner-spin-button {
     -webkit-appearance: none;

+ 18 - 0
src/css/qcListDept.less

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

+ 18 - 0
src/css/qcListPerson.less

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

+ 27 - 67
src/css/qcScore.less

@@ -188,14 +188,29 @@
     }
     .info-item{
       border-bottom: 1px @borderColor solid;
-      .cont,.contP{
+      .cont{
         display: inline-block;
         min-width: 33%;
         margin-bottom: 15px;
+        box-sizing: border-box;
+        padding-left: 5px;
+        &.active{
+          background: #FFF0DA;
+        }
         span{
           line-height: 20px;
           vertical-align: middle;
         }
+        .text-indent{
+          text-indent: 15px;
+        }
+        .text-left{
+          width: 100%;
+          text-align: right;
+        }
+        .text-bold{
+          font-weight: bold;
+        }
         .label{
           display: inline-block;
           /*min-width: 70px;*/
@@ -209,9 +224,6 @@
           }
         }
       }
-      .contP{
-        display: block;
-      }
       &.cont-2 .cont{
         min-width: 48%;
       }
@@ -249,7 +261,7 @@
       /*margin-bottom: 20px;*/
       span{
         font-size: 16px;
-        margin-left: 20px;
+        margin-left: 15px;
       }
       a{
         float: right;
@@ -272,11 +284,19 @@
     }
     .flaw-item{
       display: none;
-      margin: 0 20px 10px 30px ;
+      margin: 0 20px 10px 12px ;
       border-bottom:1px #E2E5EF solid;
       padding-bottom: 10px;
+      p{
+        text-indent: 5px;
+      }
       .title{
         margin-bottom: 10px;
+        box-sizing: border-box;
+        padding-left: 5px;
+        &.active{
+          background: #FFF0DA;
+        }
       }
     }
   }
@@ -329,51 +349,6 @@
     }
   }
 }
-.wardRoundWrap {
-  .container {
-    .lineBlock {
-      line-height: 22px;
-      padding: 3px 0;
-      .lineTitle {
-        color:#333;
-        font-weight: bold;
-      }
-    }
-    .contentH4 {
-      margin-top: 15px ;
-      margin-bottom: 5px ;
-    }
-    .contentDetail {
-      padding-left: 15px;
-    }
-    .wardRound {
-      margin-right: 40px;
-      padding: 7px  0;
-      display: inline-block;
-      i {
-        font-weight: bold;
-        color: #333333;
-      }
-    }
-    .cont {
-      margin-bottom: 35px;
-      .wardRound-table {
-        border: 0 none;
-        td {
-          border: 0 none;
-          text-align: left;
-          padding-left: 0;
-          color: #333333;
-          padding: 0 8px 3px 0;
-        }
-        .tdFstTitle {
-          vertical-align: top;
-          font-weight: bold;
-        }
-      }
-    }
-  }
-}
 /*******手术知情同意书*********/
 .surgery-book{
   .book-item{
@@ -401,22 +376,7 @@
 }
 
 /********术后首次病程记录及谈话记录*******/
-.surgery-af{
-  .af-title{
-    margin-bottom: 15px;
-    span {
-      display: inline-block;
-      width: 50%;
-      font-weight: bold;
-    }
-  }
-  .cont{
-    width: 100%;
-    &.fl,&.fr{
-      width: 30%;
-    }
-  }
-}
+
 .textR{
   text-align: right;
 }

+ 22 - 7
src/css/roleManager.less

@@ -10,12 +10,14 @@
         padding: 0 10px;
         height: 50px;
         line-height: 50px;
-        cursor: pointer;
         &:hover {
             background-color: #F0F5FF;
         }
+        span {
+            cursor: pointer;
+        }
     }
-    // .editRole {
+    .editRole {
     //     float: right;
     //     width: 52px;
     //     height: 30px;
@@ -26,8 +28,8 @@
     //     text-align: center;
     //     position: relative;
     //     top: 10px;
-    //     cursor: pointer;
-    // }
+        cursor: pointer;
+    }
 }
 .rightMenu {
     position: absolute;
@@ -35,13 +37,22 @@
     top: 64px;
     right: 40px;
     border: 1px solid #ccc;
-    overflow: auto;
+    // overflow: auto;
     .toptools {
         height: 56px;
         line-height: 56px;
         border-bottom: 1px solid #E2E5EF;
-        padding: 0 20px;
         border-radius: 4px;
+        position: absolute;
+        left: 0;
+        top: 0;
+        width: 100%;
+    }
+    .toptoolsStatic {
+        height: 56px;
+        line-height: 56px;
+        border-bottom: 1px solid #E2E5EF;
+        padding: 0 20px;
     }
     .saveRoleSet {
         width: 60px;
@@ -52,11 +63,13 @@
         color: #fff;
         float: right;
         margin-top: 10px;
+        margin-right: 10px;
         border-radius: 4px;
         cursor: pointer;
     }
     .mainSysWrap {
         padding: 0 15px;
+        overflow: auto;
     }
     .mainSys {
         border-bottom: 1px solid #E2E5EF;
@@ -68,7 +81,9 @@
         }
         .parentSet {
             padding-bottom: 15px;
-            cursor: pointer;
+            span {
+                cursor: pointer;
+            }
         }
         .sysWrap {
             margin-left: 30px;

+ 115 - 46
src/html/console.html

@@ -3,62 +3,131 @@
 <head>
   <meta charset="UTF-8">
   <meta name="viewport" content="width=device-width, initial-scale=1.0">
-  <!-- <link rel="stylesheet" href="./resource/swiper.css"> -->
   <title>Document</title>
 </head>
-<body >
-    <div class="partTitle">
-      <p>住院病案首页数据质量管理与控制指标</p>
-      <div class="monthYear">
-        <span class="mon">本月</span>
-        <span class="year">本年</span>
-      </div> 
+<body class="console">
+  <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="partWrap clearfix">
-    <!-- <div class="partTitles"></div> -->
-    <ul class="clearfix partAll">
 
-    </ul>
-    <!-- <div class="swiperWrap swiper-container">
-      <div class="swiper-wrapper">
-          <div class="swiper-slide"> Slide1</div>
-          <div class="swiper-slide"> Slide2</div>
-          <div class="swiper-slide"> Slide3</div>
-          <div class="swiper-slide"> Slide4</div>
-          <div class="swiper-slide"> Slide5</div>
-          <div class="swiper-slide"> Slide6</div>
+      <div class="part01 fl">
+        <p class="partTitlePub clearfix">
+          <span class="name">出院人数统计</span>
+          <span class="personNum">总人数:</span>
+        </p>
+        <ul class="clearfix">
+          <li>
+            <p class="numShow died"></p>
+            <p class="explainNum">死亡人数</p>
+          </li>
+          <li class="li02">
+            <p class="numShow newborn"></p>
+            <p class="explainNum">新生儿人数</p>
+          </li>
+          <li class="li03">
+            <p class="numShow patientNum"></p>
+            <p class="explainNum">手术病人数</p>
+          </li>
+        </ul>
+        <div class="defect">
+          <p class="partTitlePub">各模块缺陷占比排名</p>
+          <div class="list">
+            <table class="qtable">
+  
+            </table>
+          </div>
+        </div>
       </div>
-    </div> -->
-    <div class="grayLine"></div>
-    <div class="pubEchart paymoney">
-      <p class="title">医院运行指标</p>
-      <div id="barChartPay" class="barChartPay"></div>
-    </div>
-    <div class="pubEchart dept">
-      <p class="title">医院运行指标</p>
-      <div id="barChart" class="echarts"></div>
-    </div>
-    
-    <div class="btmWrap">
-      <div class="defect fl">
-        <p class="title">缺陷排行列表</p>
-        <div class="list">
-          <table class="qtable">
-
-          </table>
+      <div class="part02 fl">
+        <ul class="bingli clearfix">
+          <li class="fst">
+            <p class="numShow"></p>
+            <p class="explainNum">累计质控病历数</p>
+          </li>
+          <li>
+            <p class="numShow"></p>
+            <p class="explainNum">甲级病历</p>
+          </li>
+          <li>
+            <p class="numShow"></p>
+            <p class="explainNum">乙级病历</p>
+          </li>
+          <li>
+            <p class="numShow"></p>
+            <p class="explainNum">丙级病历</p>
+          </li>
+        </ul>
+        <div class="bingliLis clearfix">
+          <p>病历评分等级占比</p>
+          <div class="panPartPub panPart02">
+            <div class="fen" id="fen01"></div>
+            <p>甲级占比</p>
+          </div>
+          <div class="panPartPub panPart01">
+            <div class="fen" id="fen02"></div>
+            <p>乙级占比</p>
+          </div>
+          <div class="panPartPub panPart03">
+            <div class="fen" id="fen03"></div>
+            <p>丙级占比</p>
+          </div>
+        </div>
+        <div class="pubEchart paymoney">
+          <p class="title">科室平均住院天数柱状图</p>
+          <div class="toggleSlide">
+            <p><span>平均住院天数</span><img src="../images/arrow_down.png" alt=""> </p>
+            <ul>
+              <li class="toggleAverge toggleSlide1" data-str="平均住院天数" data-type="1">平均住院天数</li>
+              <li class="toggleAverge toggleSlide2" data-str="平均住院花费" data-type="2">平均住院花费</li>
+            </ul>
+          </div>
+          <div id="barChart" class="barChartPay"></div>
         </div>
       </div>
-      <div class="circle clearfix">
-        <p class="title">各科室缺陷占比</p>
-        <div id="emptyCircle" class="emptyCircle"></div>
-        <div class="explainPan">
-          <table>
-            
-          </table>
+      <div class="part03 fl">
+        <p class="partTitlePub clearfix">
+          <span class="name">各科室甲级病历占比</span>
+        </p>
+        <div class="barChartLineBox">
+          <div id="lineChart" class="barChartLine"></div>
+        </div>
+        <div class="circle clearfix">
+          <p class="title">各科室缺陷占比</p>
+          <div id="emptyCircle" class="emptyCircle"></div>
+          <div class="explainPan explainPanT">
+            <table>
+              
+            </table>
+          </div>
         </div>
       </div>
-    </div>
+      <div class="part04 clearfix">
+        <div class="circleB clearfix">
+          <p class="title">条目缺陷占比</p>
+          <div id="emptyCircleB" class="emptyCircle"></div>
+          <div class="explainPan explainPanB">
+            <table>
+              
+            </table>
+          </div>
+        </div>
+        
+        <div class="pubEchartB paymoney">
+          <p class="title">各科室质控平均分柱状图</p>
+          <div id="barChartPay" class="barChartPay"></div>
+        </div>
+      </div>
+
   </div>
-  <!-- <script src="./resource/swiper.min.js"></script> -->
 </body>
 </html>

+ 5 - 5
src/html/qcList.html

@@ -15,14 +15,14 @@
         <div class="main-body">
             <div class="filterBox clearfix">
                 <span class="filterItem typeFilter">
-                    <span>病号:</span>
-                    <input class="patientNumInp" type="text" placeholder="请输入病历号">
+                    <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">
+                <span class="filterItem typeFilter deptListWrap">
                     <span>科室:</span>
                     <span class="selectDept"> 
                         全部
@@ -62,7 +62,7 @@
                     <thead>
                     <th class="textCenter" ></th>
                     <th class="recordScoreOpera textCenter" style="width: 65px;">操作</th>
-                    <th class="beHospitalId textCenter" code="behospital_code">病号</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>
@@ -85,7 +85,7 @@
                     <tr>
                         <td colspan="17">
                             <div class="tabFoot">
-                                <span class="scoreOpera" data-selectAll=false><img class="iconCheck" src="" alt="checkbox">全选</span>
+                                <span class="scoreOpera" data-selectAll=false><img class="iconCheck" src="../images/icon_unchecked.png" alt="checkbox">全选</span>
                                 <span class="recordScoreBtn">评分</span>
                             </div>
                         </td>

+ 4 - 4
src/html/qcListDept.html

@@ -15,8 +15,8 @@
         <div class="main-body">
             <div class="filterBox clearfix">
                 <span class="filterItem typeFilter">
-                    <span>病号:</span>
-                    <input class="patientNumInp" type="text" placeholder="请输入病历号">
+                    <span>病人住院序号:</span>
+                    <input class="patientNumInp" style="width: 148px;" type="text" placeholder="请输入病人住院序号">
                 </span>
                 <span class="filterItem typeFilter">
                     <span>病人姓名:</span>
@@ -62,7 +62,7 @@
                     <thead>
                     <th class="textCenter" ></th>
                     <th class="recordScoreOpera textCenter" style="width: 65px;">操作</th>
-                    <th class="beHospitalId textCenter" code="behospital_code">病号</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>
@@ -85,7 +85,7 @@
                     <tr>
                         <td colspan="17">
                             <div class="tabFoot">
-                                <span class="scoreOpera" data-selectAll=false><img class="iconCheck" src="" alt="checkbox">全选</span>
+                                <span class="scoreOpera" data-selectAll=false><img class="iconCheck" src="../images/icon_unchecked.png" alt="checkbox">全选</span>
                                 <span class="recordScoreBtn">评分</span>
                             </div>
                         </td>

+ 4 - 4
src/html/qcListPerson.html

@@ -15,8 +15,8 @@
         <div class="main-body">
             <div class="filterBox clearfix">
                 <span class="filterItem typeFilter">
-                    <span>病号:</span>
-                    <input class="patientNumInp" type="text" placeholder="请输入病历号">
+                    <span>病人住院序号:</span>
+                    <input class="patientNumInp" style="width: 148px;" type="text" placeholder="请输入病人住院序号">
                 </span>
                 <span class="filterItem typeFilter">
                     <span>病人姓名:</span>
@@ -62,7 +62,7 @@
                     <thead>
                     <th class="textCenter" ></th>
                     <th class="recordScoreOpera textCenter" style="width: 65px;">操作</th>
-                    <th class="beHospitalId textCenter" code="behospital_code">病号</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>
@@ -85,7 +85,7 @@
                     <tr>
                         <td colspan="17">
                             <div class="tabFoot">
-                                <span class="scoreOpera" data-selectAll=false><img class="iconCheck" src="" alt="checkbox">全选</span>
+                                <span class="scoreOpera" data-selectAll=false><img class="iconCheck" src="../images/icon_unchecked.png" alt="checkbox">全选</span>
                                 <span class="recordScoreBtn">评分</span>
                             </div>
                         </td>

Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 28 - 2096
src/html/qcScore.html


+ 1 - 0
src/html/roleManager.html

@@ -22,6 +22,7 @@
                     <div class="toptools">
                         <span class="saveRoleSet">保存</span>
                     </div>
+                    <div class="toptoolsStatic"></div>
                     <div class="mainSysWrap">
                         
                     </div>

+ 1 - 0
src/js/api.js

@@ -9,6 +9,7 @@ const api = {
     qcListByPerson:'/qc/behospitalInfo/page_person',
     saveQcCases:'/qc/cases/saveQcCases',
     recordScore:'/qc/behospitalInfo/analyze',
+    getInfoModule:'/qc/module/getById',
     getDeptList:'/bas/dept/getList',
     getDeptListUser:'/bas/dept/listForUser',
     getDeptListDept:'/bas/dept/getListUser',

+ 727 - 100
src/js/console.js

@@ -2,27 +2,72 @@ const $ = require('jquery');
 require("../css/reset.less")
 require("../css/console.less")
 require("../images/logo.png")
+require("../images/arrow_down.png")
 
 // import 'zrender/lib/svg/svg';
 const echarts = require('echarts');
-const {post,setCookie,delCookie} = require('../js/utils.js');
-
+const {post,setCookie,delCookie,getCookie} = require('../js/utils.js');
+let payMoney = [],dayLis = [],dateType = 1,slideType = 1;
 $(function(){
-//   var mySwiper = new Swiper('.swiper-container',{
-//     // autoplay : 500,//可选选项,自动滑动
-//     loop : true,//可选选项,开启循环
-//     slidesPerView : 3,
-//   })
+    if(!hasData('YH-KZT')){
+        $("body").html('')
+    }
+    $(".partTitle p span").html(getCookie("hospital"))
+    setInterval(() => {
+        getTimeDetail()
+    }, 1000);
+    resizeBox()
+    initConsole()//质控列表
+    getBarData()//图标数据获取
+    dateChange()
+    $(window).click(function(){
+        window.parent.userActionHide()
+        $(".toggleSlide ul").css("display","none")
+    })
+    let sildeIS = true
+    if(!hasData('FUNC000045')&&!hasData('FUNC000046')){
+        $(".toggleSlide").css("opacity","0.5")
+        sildeIS = false
+    }
+    $(".toggleSlide p").click(function(e){
+        if(!sildeIS)return
+        e.stopPropagation()
+        $(this).next().slideToggle()
+    })
+    $(".toggleSlide li").click(function(){
+        let str = $(this).attr("data-str"),type = $(this).attr("data-type") 
+        if(type == 1){
+            if(!hasData('FUNC000045')){
+                return
+            }
+            slideType = 1
+            $(".pubEchart .title").html("科室平均住院天数柱状图")
+            barChart(dayLis,dateType)
+        }else{
+            if(!hasData('FUNC000046')){
+                return
+            }
+            slideType = 2
+            $(".pubEchart .title").html("科室平均住院花费柱状图")
+            barChart(payMoney,dateType)
+        }
+        $(this).parent().slideToggle().prev().find("span").html(str)
+    })
+})
+//判断有无某一权限
+function hasData(data){
+    let lis = JSON.parse(getCookie("codeLis"))
+    // console.log(lis)
+    if(lis.indexOf(data)>-1){//有权限
+        return true
+    }
+    return false;
+  }
+function resizeBox(){
     $(".partWrap").css({
         height:$(window).height()-38+'px'
     })
-  initConsole()//质控列表
-  getBarData()//图标数据获取
-  dateChange()
-  $(window).click(function(){
-    window.parent.userActionHide()
-  })
-})
+}
 //所有数据切换日期筛选
 function dateChange(){
     $(".monthYear .mon").click(function(){
@@ -33,6 +78,7 @@ function dateChange(){
             color:'#5A8EEE',
             backgroundColor:'#fff'
         })
+        dateType = 1
         getBarData(1)
     })
     $(".monthYear .year").click(function(){
@@ -43,6 +89,7 @@ function dateChange(){
             color:'#5A8EEE',
             backgroundColor:'#fff'
         })
+        dateType = 2
         getBarData(2)
     })
 }
@@ -87,51 +134,369 @@ function initConsole(result){
 }
 //获取图表数据
 function getBarData(type){
-    post('/console/mrStatistics',{
-        "type": type||1//1月2年
-    }).then((res)=>{
-        let data = res.data;
-        if(data.code == 0){
-            let result = data.data
-            initConsole(result)
+    console.log(slideType,'797979898')
+    if(hasData('FUNC000045')){
+        post('/console/getAverageDayNum',{//平均住院天数
+            "type": type||1//1月2年
+        }).then((res)=>{
+            let data = res.data;
+            if(data.code == 0){
+                let result2 = data.data['平均住院日']||[]
+                dayLis = result2
+                if(slideType == 1){
+                    barChart(result2,type||1)
+                }
+            }
+        })
+    }else{
+        $(".toggleSlide1").css("opacity",0.5)
+    }
+    if(hasData('FUNC000046')){
+        post('/console/getAverageFee',{//平均住院费用
+            "type": type||1//1月2年
+        }).then((res)=>{
+            let data = res.data;
+            if(data.code == 0){
+                let result3 = data.data['平均住院费用']||[]
+                payMoney = result3;
+                if(slideType == 2){
+                    barChart(result3,type||1)
+                }
+            }
+        })
+    }else{
+        $(".toggleSlide2").css("opacity",0.5)
+    }
+    if(hasData('FUNC000047')){
+        post('/console/getAverageScore',{//各科室质控平均分
+            "type": type||1//1月2年
+        }).then((res)=>{
+            let data = res.data;
+            if(data.code == 0){
+                let result1 = data.data['各科室质控平均分']||[]
+                let dataX1=[],dataY1=[]
+                for(let i = 0;i < result1.length;i++){
+                    dataX1.push(result1[i].name)
+                    dataY1.push(result1[i].averageValue)
+                }
+                barChartPay(dataX1,dataY1)
+            }
+        })
+    }
+    if(hasData('FUNC000048')){
+        post('/console/getLevelResultDept',{//各科室甲级占比
+            "type": type||1//1月2年
+        }).then((res)=>{
+            let data = res.data;
+            if(data.code == 0){
+                let result2 = data.data['各科室甲级病历占比']||[]
+                let dataX2=[],dataY2=[];
+                for(let i = 0;i < result2.length;i++){
+                    dataX2.push(result2[i].deptName)
+                    dataY2.push(result2[i].firstPercent.replace('%',''))
+                }
+                lineChart(dataX2,dataY2)
+            }
+        })
+    }
+    if(hasData('FUNC000049')){
+        post('/console/leaveHosCount',{//出院人数统计
+            "type": type||1//1月2年
+        }).then((res)=>{
+            let data = res.data;
+            if(data.code == 0){
+                // barChart(result2,type||1)
+                // console.log(data)
+                let result1 = data.data['出院人数统计']||[]
+                personNum(result1)
+            }
+        })
+    }
+    if(hasData('FUNC000050')){
+        post('/console/mrCount',{//质控病历统计
+            "type": type||1//1月2年
+        }).then((res)=>{
+            let data = res.data
+            if(data.code == 0){
+                let result3 = data.data['病历数统计']||[]
+                if(result3.length == 0){
+                    result3 = [
+                        {
+                            "id":null,
+                            "name":"累计质控病历数",
+                            "totleNum":0,
+                            "num":0,
+                            "percent":null,
+                            "percentStr":null
+                        },
+                        {
+                            "id":null,
+                            "name":"甲级病历",
+                            "totleNum":10,
+                            "num":0,
+                            "percent":0,
+                            "percentStr":"0.00%"
+                        },
+                        {
+                            "id":null,
+                            "name":"乙级病历",
+                            "totleNum":10,
+                            "num":0,
+                            "percent":0,
+                            "percentStr":"0.00%"
+                        },
+                        {
+                            "id":null,
+                            "name":"丙级病历",
+                            "totleNum":10,
+                            "num":0,
+                            "percent":0,
+                            "percentStr":"0.00%"
+                        }
+                    ]
+                }
+                setNumDetail(result3)
+            }
+        })
+    }
+    if(hasData('FUNC000051')){
+        post('/console/entryCountGroupByCase',{//各模块缺陷占比排行
+            "type": type||1//1月2年
+        }).then((res)=>{
+            let data = res.data;
+            if(data.code == 0){
+                let result1 = data.data['各模块缺陷占比排行']||[]
+                queList(result1)
+            }
+        })
+    }
+    if(hasData('FUNC000052')){
+        post('/console/entryCountGroupByEntry',{//条目缺陷占比
+            "type": type||1//1月2年
+        }).then((res)=>{
+            let data = res.data;
+            if(data.code == 0){
+                let result3 = data.data['条目缺陷占比']||[]
+                for(let i = 0;i < result3.length;i++){
+                    result3[i].value = result3[i].num
+                }
+                emptyCircleB(result3)
+                panDetailB(result3)
+            }
+        })
+    }
+    if(hasData('FUNC000053')){
+        post('/console/entryByDept',{//各科室缺陷占比
+            "type": type||1//1月2年
+        }).then((res)=>{
+            let data = res.data;
+            if(data.code == 0){
+                let result2 = data.data['各科室缺陷占比']||[]
+                for(let i = 0;i < result2.length;i++){
+                    result2[i].value = result2[i].num
+                }
+                emptyCircle(result2)
+                panDetail(result2)
+            }
+        })
+    }
+}
+//part01
+function personNum(data){
+    $(".personNum").html("总人数:"+data['总人数'])
+    $(".died").html(data['死亡人数'])
+    $(".newborn").html(data['新生儿人数'])
+    $(".patientNum").html(data['手术病人数'])
+}
+//part02
+function setNumDetail(data){
+    // console.log(data,2222222222)
+    if(data.length == 0)return
+    let str = ''
+    for(let i = 0;i < data.length;i++){
+        str += `
+            <li class="${i==0?'fst':''}">
+            <p class="numShow">${data[i].num}</p>
+            <p class="explainNum">${data[i].name}</p>
+            </li>
+        `
+        if(data[i].name == '甲级病历'){
+            let tmp = []
+            data[i].value = data[i].num
+            tmp.push(data[i])
+            tmp.push({percentStr:(1-data[i].percent)*100+'%',value:data[i].totleNum - data[i].num})
+            part02pan(tmp,'fen01')
         }
-    })
-    post('/console/averageStatistics',{//柱状数据
-        type:type||1
-    }).then((res)=>{
-        let data = res.data;
-        if(data.code == 0){
-            let result1 = data.data['平均住院费用']
-            let result2 = data.data['平均住院日']
-            let dataX1=[],dataY1=[],dataX2=[],dataY2=[];
-            for(let i = 0;i < result1.length;i++){
-                dataX1.push(result1[i].deptName)
-                dataY1.push(result1[i].averageValue)
-            }
-            for(let i = 0;i < result2.length;i++){
-                dataX2.push(result2[i].deptName)
-                dataY2.push(result2[i].averageValue)
-            }
-            barChartPay(dataX1,dataY1)
-            barChart(dataX2,dataY2)
+        if(data[i].name == '乙级病历'){
+            let tmp = []
+            data[i].value = data[i].num
+            tmp.push(data[i])
+            tmp.push({percentStr:(1-data[i].percent)*100+'%',value:data[i].totleNum - data[i].num})
+            part02pan(tmp,'fen02')
         }
-    })
-    post('/console/resultStatistics',{//饼图数据
-        type:type||1
-    }).then((res)=>{
-        let data = res.data;
-        if(data.code == 0){
-            let result1 = data.data['缺陷排行列表']
-            let result2 = data.data['各科室缺陷占比']
-            for(let i = 0;i < result2.length;i++){
-                result2[i].value = result2[i].num
-            }
-            queList(result1)
-            emptyCircle(result2)
-            panDetail(result2)
+        if(data[i].name == '丙级病历'){
+            let tmp = []
+            data[i].value = data[i].num
+            tmp.push(data[i])
+            tmp.push({percentStr:(1-data[i].percent)*100+'%',value:data[i].totleNum - data[i].num})
+            part02pan(tmp,'fen03')
         }
-    })
+    }
+    $('.bingli').html(str)
+}
+//part02pan
+function part02pan(data,dom){
+    // console.log(data,33333)
+    dom = echarts.init(document.getElementById(dom));
+    $(window).resize(function(){
+        dom.resize()
+    });
+    let bgColor = '#fff';
+    let title = '总量';
+    let color = ['#37CBCB','#dedede'];
+    let echartData = data;
+    option = {
+        backgroundColor: bgColor,
+        color: color,
+        title: [{
+            text:'{val|' + echartData[0].percentStr + '}',
+            top: 'center',
+            left: 'center',
+            textStyle: {
+                rich: {
+                    val: {
+                        fontSize: 14,
+                        color: '#333',
+                        fontWeight: 'bold',
+                        padding: [10, 0]
+                    },
+                    name: {
+                        fontSize: 12,
+                        fontWeight: 'normal',
+                        color: '#777',
+                    }
+                }
+            }
+        }],
+        series: [{
+            name: '',
+            type: 'pie',
+            radius: ['70%', '90%'],
+            data: echartData,
+            hoverAnimation:false,
+            label: {
+                normal: {
+                    show:false,
+                }
+            },
+        }]
+    };      
+    dom.setOption(option);
+}
+//折现图
+function lineChart(dataX,dataY){
+    var myCharts = echarts.init(document.getElementById('lineChart'));
+    $(window).resize(function(){
+        myCharts.resize()
+    });
+    option = {
+        color:"#5A8EEE",
+        tooltip: {
+            trigger: 'axis',
+            color:'#fff',
+            formatter: function(param) {           
+                return '<div style="color:#fff;"> '+ param[0].name + "<br>" +"甲级病历占比:"+ param[0].value+"%" + "<br>"
+                '</div>'
+            }
+        },
+        grid: {
+            left: '3%',
+            right: '5%',
+            bottom: '3%',
+            containLabel: true
+        },
+        title:[{
+            text: '百分比',
+            top: 15,
+            left: 0,
+            textStyle: {
+                fontSize: 14,
+                color:'#666666',
+                fontWeight: 400
+            }
+        }],
+        toolbox: {
+            show: false,
+            feature: {
+                dataZoom: {
+                    yAxisIndex: 'none'
+                },
+                dataView: {readOnly: false},
+                magicType: {type: ['line', 'bar']},
+                restore: {
 
+                },
+                saveAsImage: {}
+            },
+            emphasis:{
+                iconStyle:{
+                    color:'red'
+                }
+            },
+        },
+        xAxis: {
+            type: 'category',
+            boundaryGap: false,
+            data: dataX,
+            axisLabel: {//x轴刻度
+                textStyle: {
+                    color: '#333'
+                },
+                rotate:'45',
+                formatter: function (value) {
+                    //x轴的文字改为竖版显示
+                    if(value.length>7){
+                        return value.slice(0,7)+'...'
+                    }
+                    return value;
+                 }
+            },
+            axisLine: {//x轴
+                lineStyle:{
+                    color:'#AAAAAA'
+                }
+            }
+        },
+        yAxis: {
+            type: 'value',
+            axisLabel: {
+                formatter: '{value} %',
+                textStyle: {
+                    color: '#333333'
+                }
+            },
+            
+            axisLine: {//y轴
+                show: false
+            },
+            axisTick: {
+                show: false
+            },
+            splitLine:{//分割线
+                lineStyle:{
+                    color:'#EFF3FC'
+                }
+            }
+        },
+        series: [
+            {
+                name: '甲级病历占比:',
+                type: 'line',
+                data: dataY,
+            }
+        ]
+    };
+    myCharts.setOption(option);
 }
 //柱状图住院费用
 function barChartPay(dataX,dataY){
@@ -144,6 +509,7 @@ function barChartPay(dataX,dataY){
         color: ['#3398DB'],
         tooltip: {
             trigger: 'axis',
+            position: 'right',
             axisPointer: {            // 坐标轴指示器,坐标轴触发有效
                 type: 'line'        // 默认为直线,可选为:'line' | 'shadow'
             }
@@ -165,7 +531,14 @@ function barChartPay(dataX,dataY){
                     textStyle: {
                         color: '#333'
                     },
-                    rotate:lengthNum>8?30:0
+                    rotate:45,
+                    formatter: function (value) {
+                        //x轴的文字改为竖版显示
+                        if(value.length>7){
+                            return value.slice(0,7)+'...'
+                        }
+                        return value;
+                     }
                 },
                 axisLine: {//x轴
                     lineStyle:{
@@ -197,7 +570,7 @@ function barChartPay(dataX,dataY){
             
         ],
         title:[{
-            text: '平均住院费用',
+            text: '分数',
             top: 15,
             left: 10,
             textStyle: {
@@ -208,9 +581,9 @@ function barChartPay(dataX,dataY){
         }],
         series: [
             {
-                name: '平均住院费用',
+                name: '质控平均分',
                 type: 'bar',
-                barWidth: lengthNum<5?'8%':'23%',
+                barWidth: '23%',
                 data: dataY
             }
         ]
@@ -218,18 +591,109 @@ function barChartPay(dataX,dataY){
     myCharts.setOption(option);
 }
 //柱状图住院日期
-function barChart(dataX,dataY){
+function barChart(data,type){
+    // console.log(data,type)
     var myChart = echarts.init(document.getElementById('barChart'));
-    var lengthNum = dataX.length;
     $(window).resize(function(){
         myChart.resize()
     });
+    var posList = [
+        'left', 'right', 'top', 'bottom',
+        'inside',
+        'insideTop', 'insideLeft', 'insideRight', 'insideBottom',
+        'insideTopLeft', 'insideTopRight', 'insideBottomLeft', 'insideBottomRight'
+    ];
+    let app = {}
+    app.configParameters = {
+        rotate: {
+            min: -90,
+            max: 90
+        },
+        align: {
+            options: {
+                left: 'left',
+                center: 'center',
+                right: 'right'
+            }
+        },
+        verticalAlign: {
+            options: {
+                top: 'top',
+                middle: 'middle',
+                bottom: 'bottom'
+            }
+        },
+        position: {
+            options: echarts.util.reduce(posList, function (map, pos) {
+                map[pos] = pos;
+                return map;
+            }, {})
+        },
+        distance: {
+            min: 0,
+            max: 100
+        }
+    };
+    app.config = {
+        rotate: 90,
+        align: 'left',
+        verticalAlign: 'middle',
+        position: 'insideBottom',
+        distance: 15,
+        onChange: function () {
+            var labelOption = {
+                normal: {
+                    rotate: app.config.rotate,
+                    align: app.config.align,
+                    verticalAlign: app.config.verticalAlign,
+                    position: app.config.position,
+                    distance: app.config.distance
+                }
+            };
+            myChart.setOption({
+                series: [{
+                    label: labelOption
+                }, {
+                    label: labelOption
+                }, {
+                    label: labelOption
+                }, {
+                    label: labelOption
+                }]
+            });
+        }
+    };
+    var labelOption = {
+        show: false,
+        position: app.config.position,
+        distance: app.config.distance,
+        align: app.config.align,
+        verticalAlign: app.config.verticalAlign,
+        rotate: app.config.rotate,
+        formatter: '{c}  {name|{a}}',
+        fontSize: 12,
+        rich: {
+            name: {
+                textBorderColor: '#fff'
+            }
+        }
+    };
+    let dataX = []
+    let data1 = []
+    let data2 = []
+    let data3 = []
+    for(let i = 0;i < data.length;i++){
+        dataX.push(data[i].name)
+        data1.push(data[i].averageValue)//本月
+        data2.push(data[i].lastAverageValue)//本年
+        data3.push(data[i].lastYearAverageValue)//去年本月
+    }
     option = {
-        color: ['#3398DB'],
+        color: ['#5A8EEE', '#FAD336', '#37CBCB'],
         tooltip: {
             trigger: 'axis',
-            axisPointer: {            // 坐标轴指示器,坐标轴触发有效
-                type: 'line'        // 默认为直线,可选为:'line' | 'shadow'
+            axisPointer: {
+                type: 'shadow'
             }
         },
         grid: {
@@ -238,24 +702,62 @@ function barChart(dataX,dataY){
             bottom: '3%',
             containLabel: true
         },
+        title:[{
+            text: slideType==1?'天数':'元',
+            top: 15,
+            left: 10,
+            textStyle: {
+                fontSize: 14,
+                color:'#666666',
+                fontWeight: 400
+            }
+        }],
+        legend: {
+            itemWidth :10,
+            itemHeight :10,
+            right:15,
+            top:15,
+            selectedMode:false,
+            formatter: function (name) {
+                return name;
+            }
+        },
+        toolbox: {
+            show: false,
+            orient: 'vertical',
+            left: 'right',
+            top: 'center',
+            feature: {
+                mark: {show: true},
+                dataView: {show: true, readOnly: false},
+                magicType: {show: true, type: ['line', 'bar', 'stack', 'tiled']},
+                restore: {show: true},
+                saveAsImage: {show: true}
+            }
+        },
         xAxis: [
             {
                 type: 'category',
-                data: dataX,
-                axisTick: {
-                    alignWithLabel: true
-                },
+                axisTick: {show: false},
+                data:  dataX,
                 axisLabel: {//x轴刻度
                     textStyle: {
                         color: '#333'
                     },
-                    rotate:lengthNum>8?30:0
+                    rotate:'45',
+                    formatter: function (value) {
+                        //x轴的文字改为竖版显示
+                        if(value.length>7){
+                            return value.slice(0,7)+'...'
+                        }
+                        return value;
+                     }
                 },
                 axisLine: {//x轴
                     lineStyle:{
                         color:'#AAAAAA'
                     }
-                }
+                },
             }
         ],
         yAxis: [
@@ -267,43 +769,43 @@ function barChart(dataX,dataY){
                 axisTick: {
                     show: false
                 },
-                axisLabel: {//y轴刻度
-                    textStyle: {
-                        color: '#333333'
-                    }
-                },
                 splitLine:{//分割线
                     lineStyle:{
                         color:'#EFF3FC'
                     }
                 }
             }
-            
         ],
-        title:[{
-            text: '平均住院日',
-            top: 15,
-            left: 10,
-            textStyle: {
-                fontSize: 14,
-                color:'#666666',
-                fontWeight: 400
-            }
-        }],
         series: [
             {
-                name: '平均住院日',
+                name: type==1?'上月':'',
                 type: 'bar',
-                barWidth:  lengthNum<5?'8%':'23%',
-                data: dataY
+                barGap: 0,
+                label: labelOption,
+                barWidth: '15%',
+                data: type==1?data2:[]
+            },
+            {
+                name: type==1?'去年本月':'去年',
+                type: 'bar',
+                label: labelOption,
+                barWidth: '15%',
+                data: data3
+            },
+            {
+                name: type==1?'本月':'本年',
+                type: 'bar',
+                label: labelOption,
+                barWidth: '15%',
+                data: data1
             }
         ]
     };
     myChart.setOption(option);
-    
 }
 //空心饼图
 function emptyCircle(data){
+    // console.log(data,1111111111)
     var myChart = echarts.init(document.getElementById('emptyCircle'));
     $(window).resize(function(){
         myChart.resize()
@@ -312,7 +814,6 @@ function emptyCircle(data){
     let title = '总量';
     let color = ['#F2637B','#975FE4', '#399FFF', '#37CBCB', '#4CCB73','#FAD336','#F2637B','#975FE4', '#399FFF', '#37CBCB', '#4CCB73','#FAD336'];
     let echartData = data;
-    console.log(echartData)
     let total = 0;
     for(let i = 0;i < echartData.length;i++){
         total += echartData[i].num
@@ -398,15 +899,110 @@ function emptyCircle(data){
     };      
     myChart.setOption(option);
 }
+function emptyCircleB(data){
+    var myChart = echarts.init(document.getElementById('emptyCircleB'));
+    $(window).resize(function(){
+        myChart.resize()
+    });
+    let bgColor = '#fff';
+    let title = '总量';
+    let color = ['#F2637B','#975FE4', '#399FFF', '#37CBCB', '#4CCB73','#FAD336','#F2637B','#975FE4', '#399FFF', '#37CBCB', '#4CCB73','#FAD336'];
+    let echartData = data;
+    let total = 0;
+    for(let i = 0;i < echartData.length;i++){
+        total += echartData[i].num
+    }
+    option = {
+        backgroundColor: bgColor,
+        color: color,
+        title: [{
+            text: data.length>0?'{val|' + total + '}\n{name|' + title + '}':'',
+            top: 'center',
+            left: 'center',
+            textStyle: {
+                rich: {
+                    val: {
+                        fontSize: 24,
+                        color: '#333',
+                        fontWeight: 'bold',
+                        padding: [10, 0]
+                    },
+                    name: {
+                        fontSize: 12,
+                        fontWeight: 'normal',
+                        color: '#777',
+                    }
+                }
+            }
+        }],
+        tooltip: {
+            trigger: 'item',
+            position: 'right',
+            // formatter: '{b} : {c}  ({d}%)',
+            formatter:function(item){
+                const {name, num, percentStr} = item.data
+                return `${name} : ${num} (${percentStr})`
+            }
+        },
+        series: [{
+            name: '',
+            type: 'pie',
+            radius: ['70%', '90%'],
+            data: echartData,
+            hoverAnimation:true,
+            hoverOffset:5,
+            itemStyle: {
+                normal: {
+                    borderColor: bgColor,
+                    borderWidth: 2
+                }
+            },
+            labelLine: {
+                normal: {
+                    length: 20,
+                    length2: 120,
+                    lineStyle: {
+                        color: '#e6e6e6'
+                    }
+                }
+            },
+            label: {
+                normal: {
+                    show:false,
+                    formatter: params => {
+                        return params.name == 'A类'?params.name:''
+                    },
+                    padding: [0 , -100, 25, -100],
+                    rich: {
+                        icon: {
+                            fontSize: 16
+                        },
+                        name: {
+                            fontSize: 14,
+                            padding: [0, 10, 0, 4],
+                            color: '#666666'
+                        },
+                        value: {
+                            fontSize: 18,
+                            fontWeight: 'bold',
+                            color: '#333333'
+                        }
+                    }
+                }
+            },
+        }]
+    };      
+    myChart.setOption(option);
+}
 //缺陷列表渲染
 function queList(data){
-    let strAll = '',tmp = `
-    <tr class="thead">
-      <td class="td01">排名</td>
-      <td class="td02">缺陷名称</td>
-      <td class="td03">数量</td>
-      <td class="td04">占比</td>
-    </tr>`
+    let strAll = '',tmp = `mm
+        <tr class="thead">
+        <td class="td01">排名</td>
+        <td class="td02">缺陷详情</td>
+        <td class="td03">数量</td>
+        <td class="td04">占比</td>
+        </tr>`
     for(let i = 0;i < data.length;i++){
         strAll += `
             <tr>
@@ -426,14 +1022,45 @@ function panDetail(data){
     for(let i = 0;i < data.length;i++){
         strAll += `
             <tr class="explainLi">
-                <td class="deptName"><i class="tip" style="background-color:${color[i]}"></i>${data[i].name}</td>
+                <td class="deptName" title="${data[i].name}">
+                    <p class="smp"><i class="tip" style="background-color:${color[i]}"></i>${data[i].name}</p>
+                </td>
                 <td class="deptNum">${data[i].num}</td>
                 <td class="percent">(${data[i].percentStr})</td>
             </tr>
         `
     }
-    $(".explainPan table").html(strAll);
+    $(".explainPanT table").html(strAll);
     $(".explainPan").css({
         marginTop:-($(".explainPan").height()/2-20)+'px'
     })
+}
+function panDetailB(data){
+    let color = ['#F2637B','#975FE4', '#399FFF', '#37CBCB', '#4CCB73','#FAD336','#F2637B','#975FE4', '#399FFF', '#37CBCB', '#4CCB73','#FAD336'];
+    let strAll = '';
+    for(let i = 0;i < data.length;i++){
+        strAll += `
+            <tr class="explainLi">
+                <td class="deptName" title="${data[i].name}">
+                    <p><i class="tip" style="background-color:${color[i]}"></i>${data[i].name}</p>
+                </td>
+                <td class="deptNum">${data[i].num}</td>
+                <td class="percent">(${data[i].percentStr})</td>
+            </tr>
+        `
+    }
+    $(".explainPanB table").html(strAll);
+    $(".explainPan").css({
+        marginTop:-($(".explainPan").height()/2-20)+'px'
+    })
+}
+//时间获取
+function getTimeDetail(){
+    const d = new Date();
+    const days = ["星期日","星期一","星期二","星期三","星期四","星期五","星期六"];
+    let sec = d.getSeconds()
+    let min = d.getMinutes()
+    let hour = d.getHours()
+    let str = `${d.getFullYear()}年${d.getMonth()+1}月${d.getDate()}日 / ${days[d.getDay()]} / ${hour>9?hour:'0'+hour}:${min>9?min:'0'+min}:${sec>9?sec:'0'+sec}`
+    $(".dateDetail").html(str)
 }

+ 45 - 3
src/js/index.js

@@ -3,7 +3,7 @@ const $ = require('jquery');
 require('jquery-templates');
 const md5 = require('js-md5');
 require("./modal.js")
-const {api,post,pageMap,delCookie} = require('./utils.js');
+const {api,post,pageMap,delCookie,setCookie,getCookie} = require('./utils.js');
 let userInfo={};
 $(function(){
   getMenu();
@@ -18,8 +18,18 @@ $(function(){
   $(window).click(function(e){
     $(".userAction").css("display","none")
   })
+  $("#changeWord").css("opacity",hasData('FUNC000002')?'1':'0.5').hover(function(){
+    $(this).css("color","#777777")
+  })
 });
-
+//判断有无某一权限
+function hasData(data){
+  let lis = JSON.parse(getCookie("codeLis"))
+  if(lis.indexOf(data)>-1){//有权限
+      return true
+  }
+  return false;
+}
 function userActionHide(e){
   $(".userAction").css("display","none")
 }
@@ -66,10 +76,39 @@ function getMenu(){
       const data = res.data.data;
       initMenu(data.menuWrappers,data.userLoginDTO);
       userInfo = data.userLoginDTO
+      setCookie("hospital",data.basHospitalInfoDTO.name)
+      getAllCode(data.menuWrappers);
+      hasData("FUNC000002")?"":$("#changeWord").hide();   //修改密码无权限不显示
     }
   });
 };
-
+function getAllCode(data){
+  let lis = [],personCodeLis=[],deptCodeLis=[],trdObj={}
+  for(let i = 0;i < data.length;i++){
+    let tmpSon = data[i]
+    lis.push(tmpSon.code)
+    if(tmpSon.subMenuList.length > 0){//三层
+      for(let j = 0;j<tmpSon.subMenuList.length;j++){//第二层循环
+        let tmpGrandSon = tmpSon.subMenuList[j]
+        let sonLis=[]
+        lis.push(tmpGrandSon.code)
+        for(let m = 0;m < tmpGrandSon.sysUserPermissionDTOList.length;m++){
+          let tmpData = tmpGrandSon.sysUserPermissionDTOList[m]
+          lis.push(tmpData.code)
+          sonLis.push(tmpData.code)
+        }
+        trdObj[tmpGrandSon.code] = sonLis
+      }
+    }else{//两层
+      for(let n = 0;n < tmpSon.sysUserPermissionDTOList.length;n++){
+        let tmpData = tmpSon.sysUserPermissionDTOList[n]
+        lis.push(tmpData.code)
+      }
+    }
+  }
+  setCookie("codeLis",JSON.stringify(lis))
+  setCookie("trdObj",JSON.stringify(trdObj))
+}
 function sureChangeWord(){
   $(document).on('click','.sureChange',function(){
     let oldword = $(".oldword").val().trim()
@@ -113,6 +152,9 @@ $(".login").click(function(e){
 })
 //点击修改密码
 $("#changeWord").click(function(e){
+  if(!hasData('FUNC000002')){
+      return
+  }
   e.stopPropagation()
   const status = $(".modalAction").css("display")
   $.alerModal({

+ 15 - 3
src/js/itemManager.js

@@ -3,7 +3,7 @@ require("../css/itemManager.less");
 require('./../resource/jquery-ui/jquery-ui.min.js');
 require('./modal.js');
 const {api} = require('./api.js')
-const {post} = require('./utils.js')
+const {post,getCookie} = require('./utils.js')
 const switchIconOpen = require("./../images/btn_open.png")
 const switchIconClose = require("./../images/btn_close.png")
 const iconDown= require("./../images/arrow_down.png")
@@ -17,6 +17,14 @@ $(".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 hasData(data){
+    let lis = JSON.parse(getCookie("codeLis"))
+    if(lis.indexOf(data)>-1){//有权限
+        return true
+    }
+    return false;
+  }
 //获取表格数据
 function getTabData(activePage){
     const param = {
@@ -103,7 +111,8 @@ bindUsedSelect()
 getTabData(1)
 getmoduleTypeList()
 function renderTab(data,activePage){
-    let str = ``
+    let str = ``;
+    const cls = hasData("FUNC000007")?"editItem":"editItemDis";
     for(let i = 0; i < data.length; i++){
         const item = data[i]
         str += `
@@ -115,7 +124,7 @@ function renderTab(data,activePage){
                 <td  class="textCenter">${item.score}</td>
                 <td  class="textCenter">${item.isReject == '1' ? `是`:`否`}</td>
                 <td class="textCenter">${item.isUsed == '1' ? `是`:`否`}</td>
-                <td class="editItem textCenter">修改</td>
+                <td class="editItem textCenter" style="opacity:${hasData('FUNC000007')?'1':'0.5'}">修改</td>
             </tr>
         `
     }
@@ -124,6 +133,9 @@ function renderTab(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)

+ 1 - 1
src/js/login.js

@@ -24,7 +24,7 @@ $(function(){
   })
 });
 function sureLogin(){
-  $(".login .waring").css('display','none')
+  $(".login .waring").html('')
   let username = $("#username").val().trim();
   let password = $("#password").val().trim();
   if(!username){

+ 15 - 4
src/js/moduleManager.js

@@ -6,11 +6,18 @@ require('./modal.js');
 
 // const  layui = require('layui-src');
 const {api} = require('./api.js')
-const {post} = require('./utils.js')
+const {post,getCookie} = require('./utils.js')
 $(".tableWrapper").css({
     height:$(window).height()-180+'px'
 })
-
+//判断有无某一权限
+function hasData(data){
+    let lis = JSON.parse(getCookie("codeLis"))
+    if(lis.indexOf(data)>-1){//有权限
+        return true
+    }
+    return false;
+  }
 let data = {}
 function getTabData(){
     post(api.getQcCases).then(res =>{
@@ -54,7 +61,8 @@ getTabData()
 // ]
 
 function renderTab(){
-    let  str = ``
+    let  str = ``;
+    const cls = hasData("FUNC000004")?"moduleOperaItem":"moduleOperaItemDis";
     for(let i = 0; i < data.length; i++){
     
         str += `
@@ -62,7 +70,7 @@ function renderTab(){
             <td class="moduleNumber">${i+1}</td>
             <td class="moduleName">${data[i].name}</td>
             <td class="moduleScore">${data[i].score}</td>
-            <td class="moduleOpera moduleOperaItem textCenter">修改</td>
+            <td class="moduleOpera moduleOperaItem textCenter" style="opacity:${hasData('FUNC000004')?'1':'0.5'}">修改</td>
         </tr>
         `
     }
@@ -81,6 +89,9 @@ function renderTab(){
 }
 
 function bindModuleOpera(){
+    if(!hasData('FUNC000004')){
+        return
+    }
     $(".moduleOperaItem").on("click", function(e){
         const index = $(this).parent().attr('data-index') 
         const item = data[index]

+ 36 - 15
src/js/qcList.js

@@ -2,7 +2,7 @@ const $ = require('jquery');
 require("../css/qcList.less");
 require('./modal.js');
 const {api} = require('./api.js')
-const {post} = require('./utils.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")
@@ -31,6 +31,20 @@ $('.iconCalen').on("mouseleave", function(e){
 $('.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,
@@ -48,10 +62,11 @@ function getTabData(activePage){
     }
     post(api.qcList,param).then(res =>{
         if(res.data.code == '0'){
-            tabList = res.data.data.records
-            const totalPage = res.data.data.pages
-            const totalNum = res.data.data.total
-            renderTab(tabList)
+            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)
@@ -91,7 +106,7 @@ $(".filter").on("click", function(e){
     doctorNum = doctorNumTemp
     getTabData(1)
 })
-function renderTab(data){
+function renderTab(data,hisId){
     let str = ``
     let hasSelectAll = true
     for(let i = 0; i < data.length; i++){
@@ -102,10 +117,10 @@ function renderTab(data){
         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">评分</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"><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>
@@ -134,23 +149,23 @@ function renderTab(data){
     $('tbody').html(str)
     bindScoreOperaItem()
     bindRecordScoreOper()
-    bindScoreDetail()
+    bindScoreDetail(hisId)
 }
 
-function scoreDetail(id,age){
-    window.open(`./qcScore.html?id=${id}&age=${age}`)
+function scoreDetail(id,age,hid,code){
+    window.open(`./qcScore.html?id=${id}&age=${age}&hid=${hid}&code=${code}`)
 }
-function bindScoreDetail(){
+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 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)
+            scoreDetail(id,age,hisId,'YH-BLZK-ZKPF')
         }
        
     })
@@ -195,6 +210,9 @@ function bindScoreOperaItem(){
 }
 function bindRecordScoreOper(){
     $(".recordScoreOperaBtn").on("click",  function(e){
+        if(!hasData('FUNC000017')){
+            return
+        }
         const index = $(this).parent().attr("data-index")
         const behospitalCode = tabList[index].behospitalCode
         loading()
@@ -241,7 +259,7 @@ function getDeptList(){
            rendeDeptList(deptList)
         }else{}
     }).catch((e) =>{
-    
+
     })
 }
 
@@ -284,6 +302,9 @@ 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){

+ 29 - 5
src/js/qcListDept.js

@@ -2,7 +2,7 @@ const $ = require('jquery');
 require("../css/qcListDept.less");
 require('./modal.js');
 const {api} = require('./api.js')
-const {post} = require('./utils.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")
@@ -30,6 +30,20 @@ $('.iconCalen').on("mouseleave", function(e){
 $('.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-ZKPFKS']
+    if(!lis){
+      return false
+    }
+    if(lis.indexOf(data)>-1){//有权限
+        return true
+    }
+    return false;
+}
 function getTabData(activePage){
     const param = {
         current:activePage,
@@ -95,9 +109,13 @@ $("th[code]").on("click",function(e){
   if(data_asc[0]===code){
     data_desc=[code];
     data_asc=[];
+    $("th[code]").removeClass("asc desc");
+    $(this).addClass("desc");
   }else{
     data_desc=[];
     data_asc=[code];
+    $("th[code]").removeClass("asc desc");
+    $(this).addClass("asc");
   }
   getTabData(1);
   console.log(code)
@@ -113,7 +131,7 @@ function renderTab(data){
         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">评分</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>
@@ -148,8 +166,8 @@ function renderTab(data){
     bindScoreDetail()
 }
 
-function scoreDetail(id,age){
-    window.open(`./qcScore.html?id=${id}&age=${age}`)
+function scoreDetail(id,age,code){
+    window.open(`./qcScore.html?id=${id}&age=${age}&code=${code}`)
 }
 function bindScoreDetail(){
     $('.patientNameSpan').on('click',function(e){
@@ -161,7 +179,7 @@ function bindScoreDetail(){
             $.alerModal({"message":'请先进行评分!',type:"tip",time:'1000',isFather: true, fatherWrapper: $("#mainBox", parent.document)});
             return
         } else{
-            scoreDetail(id,age)
+            scoreDetail(id,age,'YH-BLZK-ZKPFKS')
         }
        
     })
@@ -206,6 +224,9 @@ function bindScoreOperaItem(){
 }
 function bindRecordScoreOper(){
     $(".recordScoreOperaBtn").on("click",  function(e){
+        if(!hasData('FUNC000017')){
+            return
+        }
         const index = $(this).parent().attr("data-index")
         const behospitalCode = tabList[index].behospitalCode
         loading()
@@ -295,6 +316,9 @@ 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){

+ 29 - 6
src/js/qcListPerson.js

@@ -2,7 +2,7 @@ const $ = require('jquery');
 require("../css/qcListPerson.less");
 require('./modal.js');
 const {api} = require('./api.js')
-const {post,getUrlArgObject} = require('./utils.js')
+const {post,getUrlArgObject,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")
@@ -34,6 +34,19 @@ $('.iconCalen').on("mouseleave", function(e){
 $('.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-ZKPFGR']
+    if(!lis){
+      return false
+    }
+    if(lis.indexOf(data)>-1){//有权限
+        return true
+    }
+    return false;
+}
 function getTabData(activePage){
     const param = {
         current:activePage,
@@ -97,9 +110,13 @@ $("th[code]").on("click",function(e){
   if(data_asc[0]===code){
     data_desc=[code];
     data_asc=[];
+    $("th[code]").removeClass("asc desc");
+    $(this).addClass("desc");
   }else{
     data_desc=[];
     data_asc=[code];
+    $("th[code]").removeClass("asc desc");
+    $(this).addClass("asc");
   }
   getTabData(1);
   console.log(code)
@@ -115,7 +132,7 @@ function renderTab(data){
         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">评分</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>
@@ -150,8 +167,8 @@ function renderTab(data){
     bindScoreDetail()
 }
 
-function scoreDetail(id,age){
-    window.open(`./qcScore.html?id=${id}&age=${age}`)
+function scoreDetail(id,age,code){
+    window.open(`./qcScore.html?id=${id}&age=${age}&code=${code}`)
 }
 function bindScoreDetail(){
     $('.patientNameSpan').on('click',function(e){
@@ -163,7 +180,7 @@ function bindScoreDetail(){
             $.alerModal({"message":'请先进行评分!',type:"tip",time:'1000',isFather: true, fatherWrapper: $("#mainBox", parent.document)});
             return
         } else{
-            scoreDetail(id,age)
+            scoreDetail(id,age,'YH-BLZK-ZKPFGR')
         }
        
     })
@@ -208,6 +225,9 @@ function bindScoreOperaItem(){
 }
 function bindRecordScoreOper(){
     $(".recordScoreOperaBtn").on("click",  function(e){
+        if(!hasData('FUNC000017')){
+            return
+        }
         const index = $(this).parent().attr("data-index")
         const behospitalCode = tabList[index].behospitalCode
         loading()
@@ -248,7 +268,7 @@ $('.selectDept').on("click", function(e){
 //获取科室列表
 getDeptList()
 function getDeptList(){
-    post(api.getDeptListUser,{inputStr:""}).then(res =>{
+    post(api.getDeptListDept,{inputStr:""}).then(res =>{
         if(res.data.code == '0'){
            const  deptList = res.data.data
            rendeDeptList(deptList)
@@ -297,6 +317,9 @@ 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){

+ 177 - 29
src/js/qcScore.js

@@ -2,19 +2,23 @@ require("../css/qcScore.less");
 const $ = require('jquery');
 require('jquery-templates');
 require('./modal.js');
-const {api,post,getUrlArgObject,setBoxHeight} = require('./utils.js');
+const {api,post,getUrlArgObject,setBoxHeight,getCookie} = require('./utils.js');
 const {keyMaps} = require('./maps.js');
 const {wardRound,preoperation,summary,operationRecord,applicationForm,resultForm,consultationNote,difficultRecord,illnessNotice,pathologicTest,rescueRecord,transfusionEvaluate,transfusionRecord} = require("./qcScore_byll.js")
 //本页全局变量
 let global_flawData = {};    //缺陷数据
 const global_id=getUrlArgObject("id");
 const global_age = getUrlArgObject("age");
+const global_code = getUrlArgObject("code");
 let global_activeTab=$(".sub-menu .page.active").attr("code");  //当前激活菜单项
+let global_modules ={};   //模板数据缓存
 
 $(function(){
   //getSubMenu();
   //initScoreItem();
-  getRecordDetail();
+  //getRecordDetail();
+  getAllModules()
+  //getInfoModule(15);    //根据对应id获取模板
 function initMenu(data){
   const menu=[{id:0,name:"缺陷总览",parentId: -1,sonMode: []},...(data||[])];
   //菜单数据填充
@@ -42,12 +46,24 @@ function initMenu(data){
     //显示对应内容
     const code=$(this).attr("code");
     global_activeTab=code;
+    //initModuleData();
     $(".content-item,.flaw-item").hide();
     $(".content-item[code='"+code+"']").show();
     showFlawList();
   });
 }
-
+//判断有无某一权限
+function hasData(data){
+  let trdObj = JSON.parse(getCookie("trdObj"))
+  let lis = trdObj[global_code]
+  if(!lis){
+    return false
+  }
+  if(lis.indexOf(data)>-1){//有权限
+      return true
+  }
+  return false;
+}
 //获取病例明细
 function getRecordDetail(){
   post(api.getRecordDetail,{'behospitalCode':global_id}).then(function(res){
@@ -64,7 +80,7 @@ function getRecordDetail(){
       initList(msg);
       initScoreItem(msg);
       global_flawData=msg;
-      let obj = JSON.parse(result.pageData)
+      /*let obj = JSON.parse(result.pageData)
       
       infoNotNull(obj,'查房记录')&&wardRound(obj['查房记录'],'查房记录')
       infoNotNull(obj,'术前讨论、术前小结')&&preoperation(obj['术前讨论、术前小结'],'术前讨论、术前小结')
@@ -77,9 +93,7 @@ function getRecordDetail(){
       infoNotNull(obj,'病危通知书')&&illnessNotice(obj['病危通知书'],'病危通知书')
       infoNotNull(obj,'病理检验送检单')&&pathologicTest(obj['病理检验送检单'],'病理检验送检单')
       infoNotNull(obj,'抢救记录')&&rescueRecord(obj['抢救记录'],'抢救记录')
-      infoNotNull(obj,'输血后效果评价')&&transfusionEvaluate(obj['输血后效果评价'],'输血后效果评价')
-      infoNotNull(obj,'输血/血制品病程记录')&&transfusionRecord(obj['输血/血制品病程记录'],'输血/血制品病程记录')
-      
+      infoNotNull(obj,'输血后效果评价')&&transfusionEvaluate(obj['输血后效果评价'],'输血后效果评价')*/
       setBoxHeight();
     }
   });
@@ -100,26 +114,20 @@ function initPatientInfo(data){
 function initContent(data){
   const obj = JSON.parse(data);
   let info=[];
-  let nameMap={
-    "入院记录":"#inHisTmpl",
-    "出院小结":"#outHisTmpl",
-    "病案首页":"#indexTmpl",
-    "手术知情同意书":"#surgeryBookTmpl",
-    "首次病程录":"#firstCourseTmpl",
-    // "病危通知书":"#illnessNoticeTmpl",
-    // "抢救记录":"#rescueRecordTmpl",
-    "术后首次病程及谈话记录":"#surgeryAfRecord",
-    "危急值记录":"#dangerRecore",
-    // "输血/血制品病程记录":"#transfusionRecordTmpl",
-    // "输血后效果评价":"#transfusionEvaluateTmpl",
-    "死亡记录":"#deathRecordTmpl",
-    "死亡病例讨论记录":"#discusionAboutDeathTmpl",
-    // "病理检验送检单":"#pathologicTestTmpl"
-  };
+  let hml='',moduleId='';
   for(let k in obj){
+    if(k==="病案首页"){   //病案首页不使用动态模板
+      info=formatInfoData(k,obj[k][0]);
+      $("#indexTmpl").tmpl(info).appendTo("#contentInfo");
+      continue;
+    }
     for(let i in obj[k]){
       info=formatInfoData(k,obj[k][i]);
-      nameMap[k]&&Object.keys(obj[k][i]).length !== 0 &&$(nameMap[k]).tmpl(info).appendTo("#contentInfo");
+      moduleId=info.mode_id;
+      if(global_modules[moduleId]){
+        hml=initModuleData(moduleId,obj[k].length);
+        $.tmpl(hml,info).appendTo("#contentInfo");
+      };
     }
   }
   if(obj["病案首页"]&&obj["病案首页"][0]["出院诊断"]){
@@ -131,14 +139,18 @@ function initContent(data){
     $("#tableTmpl").tmpl({k:"手术信息",data:diag}).appendTo("#surgeryTable");
   }
   $(".content-item[code="+global_activeTab+"]").show();
-  console.log(obj)
+  //console.log(obj)
 }
 
 function formatInfoData(k,data){
   let obj = {},name="";
   for(let i in data){
-    name=i.replace(/[^\u4e00-\u9fa5|a-zA-Z0-9]+/g,"").replace(/^[0-9]+/,"a");    //过滤key中存在的特殊符号,模板会渲染不出来且不报错
-    obj[name]=data[i].replace(/\n/g,"<br/>")||"";
+    if(i!=="mode_id"){
+      name=i.replace(/[^\u4e00-\u9fa5|a-zA-Z0-9]+/g,"").replace(/^[0-9]+/,"a");    //过滤key中存在的特殊符号,模板会渲染不出来且不报错
+      obj[name]=data[i].replace(/\n/g,"<br/>")||"";
+    }else{
+      obj[i]=data[i].replace(/\n/g,"<br/>")||"";
+    }
   }
   return Object.assign({title:k},obj);
 }
@@ -168,6 +180,8 @@ function initList(data){
 //评分项数据填充
 function initScoreItem(data){
   $("#flaws .flaw-box").html("");
+  let hasAu = hasData('FUNC000013')
+  let hasAu2 = hasData('FUNC000012')
   for(let k in data){
     $("#flawTmpl").tmpl(data[k]).appendTo("#flaws .flaw-box");
   }
@@ -176,8 +190,21 @@ function initScoreItem(data){
     const i = $(".flaw-item[code="+global_activeTab+"]").index($(this).parents(".flaw-item"));
     const code=$(this).attr("code");
     const isEdit = $(this).is(".edit-flaw");
-    showModal(isEdit?'0':'1',code,i);
+    if(!hasAu)return
+    if(isEdit&&hasAu){
+      showModal('0',code,i);
+    }else if(!isEdit&&hasAu2){
+      showModal('1',code,i);
+    }
   })
+  $(".edit-flaw").css({"opacity":hasAu?"1":"0.5",cursor:hasAu?"pointer":"unset"});
+  $(".del-flaw").css({"opacity":hasAu2?"1":"0.5",cursor:hasAu2?"pointer":"unset"});
+  $(".flaw-item .title a[href]").click(function(){
+    const id = $(this).attr("href");
+    $(".info-item .cont,.flaw-item .title").removeClass("active");
+    $(id).addClass("active");
+    $(this).parent().addClass("active");
+  });
 }
 
 //显示缺陷列表
@@ -192,7 +219,7 @@ function showFlawList(){
 }
 
 //删除评分项
-function delScore(id){
+function delScore(id,info){
   const param={
     'behospitalCode':global_id,
     'optResultAlgVO':{
@@ -203,6 +230,7 @@ function delScore(id){
     if(res.data.code==='0'){
       $("#delModal").hide();
       updateFlaws(res.data.data);
+      $("#anchor"+info.pageKeyList[0]).removeClass("active");
       $.alerModal({"message":"删除成功",type:"tip",time:'1000'});
     }
   });
@@ -298,4 +326,124 @@ function formatFlawKeys(data){
       }
     });
   }
+
+//获取病例模板
+  function getInfoModule(moduleId){
+    const param = {
+      moduleId:moduleId
+    };
+    post(api.getInfoModule,param).then(function(res){
+      if(res.data.code==='0'){
+        const data = res.data.data;
+        cachemoduleDatas(data);
+        getRecordDetail();
+      }
+    });
+  }
+
+  //模板数据缓存
+  function cachemoduleDatas(data){
+    const moudle=data.moduleDetail;
+    global_modules[data.modeName]=[];
+    for(let i in moudle){
+      global_modules[data.modeName].push(moudle[i]);
+    }
+  }
+
+//初始化模板
+  function initModuleData(mid,n){
+    const module=global_modules[mid].moduleDetail;
+    const key = global_modules[mid].modeName.replace(/[^\u4e00-\u9fa5|a-zA-Z0-9]+/g,'');
+    let hml = '<div class="content-item" code="'+key+'">' +
+      '<h2 class="title">'+global_modules[mid].modeName+'('+mid+')</h2>' +
+      (n>1?'<div class="container">':'<div class="container content-ht">');
+
+    for(let i in module){
+      hml=hml+'<div class="info-item">';
+      for(let j=0;j<module[i].length;j++) {
+        const detal = module[i][j].questionDTO;
+        const {tagType} = detal;
+        switch (tagType) {
+          case 1:
+            hml = hml + simpleStructure(detal);
+            break;
+          case 4:
+            hml = hml + combineStructure(detal);
+            break;
+          default:
+            break;
+        }
+      }
+      hml = hml+"</div>"
+    }
+    return hml+"</div></div>";
+  }
+
+  //基础类型结构生成
+  function simpleStructure(data){
+    const {name, val,monoLine,addLine,position,bold,retract,id} = data;
+    const posClass = position===1?'text-left':'';
+    const boldClass = bold===1?'text-bold':'';
+    const retractClass = retract===1?'text-indent':'';
+    const lineHml = ('<p class="'+posClass+' '+boldClass+' '+retractClass+'">'+ extractVars(val)+'</p>');
+    const txtHml = ('<p style="display: inline;vertical-align: middle;" class="'+posClass+' '+boldClass+' '+retractClass+'">'+ extractVars(val)+'</p>');
+
+    let hml = addLine||monoLine?`<div class="cont" style="width: 100%;" id="anchor${id}">`:`<div class="cont" id="anchor${id}">`;
+    hml=hml+`<span class="label">${name}</span>`+ (addLine?lineHml:txtHml)+ `</div>`;
+    return hml;
+  }
+
+  //组合类型结构生成
+  function combineStructure(data){
+    const {name,questionMapping} = data;
+    let hml='<div class="inner-table"><table>';
+    const colNum = Math.ceil(questionMapping.length/2);
+    let tdVal='';
+    const regexp = /(【(.+?)】)/g;
+    for(let i=0;i<questionMapping.length;){
+      if(questionMapping[i+1]){
+        tdVal="<td>"+questionMapping[i].name+extractVars(questionMapping[i].val)+"</td><td>"+questionMapping[i+1].name+extractVars(questionMapping[i+1].val)+"</td>";
+      }else{
+        tdVal="<td>"+questionMapping[i].name+extractVars(questionMapping[i].val)+"</td><td></td>";
+      }
+      if(i==0){
+        hml=hml+`<tr><td rowspan="${colNum}">${name}</td>${tdVal}`;
+      }else{
+        hml=hml+`<tr>${tdVal}`;
+      }
+      hml=hml+"</tr>";
+      i=((i+2)>questionMapping.length?i+1:i+2)
+    }
+    hml=hml+"</table></div>";
+    return hml;
+  }
+
+  //抽取变量
+  function extractVars(org){
+    const regexp = /(【(.+?)】)/g;
+    const arr = org.split(regexp);
+    //console.log(arr)
+    let htl = '',val='';
+    for(let i=0;i<arr.length;i++){
+      val = arr[i].indexOf("【")!=-1?'':(arr[i-1]&&arr[i-1].indexOf("【")!=-1?"{{html "+arr[i]+"}}":arr[i]);
+      htl=htl+val;
+    }
+    return htl;
+  }
+//获取所有模板
+  function getAllModules(){
+  const param={
+    hospitalId:getUrlArgObject("hid"),
+    modeId:''
+  };
+    post(api.getModuleById,param).then((res)=>{
+      if(res.data.code==='0') {
+        const data = res.data.data;
+        global_modules=data;
+        getRecordDetail();
+      }
+    });
+  }
+
 });
+

+ 17 - 6
src/js/roleManager.js

@@ -16,10 +16,13 @@ $(function(){
     $(window).resize(function(){
         $(".role .leftMenu").css("height",$(window).height()-128+'px')
         $(".role .rightMenu").css({"height":$(window).height()-88+'px',"width":$(".filterBox").width()-400+'px'})
+        $(".role .mainSysWrap").css({"height":$(window).height()-145+'px'})
     })
+    $(".role .mainSysWrap").css({"height":$(window).height()-145+'px'})
     $(".role .leftMenu").css("height",$(window).height()-128+'px')
     $(".role .rightMenu").css({"height":$(window).height()-88+'px',"width":$(".filterBox").width()-400+'px'})
     $(".saveRoleSet").click(function(){//保存角色设置
+        getParams()
         $.alerModal({type:"loading"});
         let params = {
             "roleId": curId,
@@ -78,7 +81,9 @@ $(function(){
             let tmp = data[i]
             str += `
                 <div class="mainSys" data-index="${i}" data-menuId="${data[i].menuId}">
-                    <div data-menuId="${data[i].menuId}" data-haveMenu="${data[i].haveMenu}" data-parentId="${data[i].parentId}" class="parentSet selectToggle"><img src="${data[i].haveMenu == 1?require('../images/icon_check.png'):require('../images/icon_unchecked.png')}" alt=""> ${data[i].menuName}</div>
+                    <div class="parentSet">
+                    <span data-menuId="${data[i].menuId}" data-haveMenu="${data[i].haveMenu}" data-parentId="${data[i].parentId}" class="selectToggle"><img src="${data[i].haveMenu == 1?require('../images/icon_check.png'):require('../images/icon_unchecked.png')}" alt=""> ${data[i].menuName}</span>
+                    </div>
                     ${
                         (function(tmp){
                             if(tmp.sonMenuDTOList&&tmp.sonMenuDTOList.length>0){
@@ -131,7 +136,7 @@ $(function(){
                             }
                         }
                         if(num == tmpPer.length){//内层全部都取消了,父级取消选中
-                            tmpDataLis[i].haveMenu = '0'
+                            // tmpDataLis[i].haveMenu = '0'
                         }else{
                             tmpDataLis[i].haveMenu = '1'
                         }
@@ -263,7 +268,9 @@ $(function(){
         let tmpstr = ''
         for(let i = 0;i <data.length;i++){
             tmpstr += `
-                <li data-permissionId="${data[i].permissionId}" data-haveMenu="${data[i].havePermission}" data-parentId="${data[i].parentId}" class="selectToggle"><img src="${data[i].havePermission==1?require('../images/icon_check.png'):require('../images/icon_unchecked.png')}" alt=""> ${data[i].permissionName}</li>
+                <li>
+                <span data-permissionId="${data[i].permissionId}" data-haveMenu="${data[i].havePermission}" data-parentId="${data[i].parentId}" class="selectToggle"><img src="${data[i].havePermission==1?require('../images/icon_check.png'):require('../images/icon_unchecked.png')}" alt=""> ${data[i].permissionName}</span>
+                </li>
             `
         }
         return '<ul class="sonSet clearfix">'+tmpstr+'</ul>'
@@ -274,7 +281,9 @@ $(function(){
         for(let i = 0;i <data.length;i++){
             tmpstr += `
                 <div class="sysWrap">
-                    <div data-menuId="${data[i].menuId}" data-haveMenu="${data[i].haveMenu}" data-parentId="${data[i].parentId}" class="parentSet selectToggle"><img src="${data[i].haveMenu == 1?require('../images/icon_check.png'):require('../images/icon_unchecked.png')}" alt=""> ${data[i].menuName}</div>
+                    <div class="parentSet">
+                        <span data-menuId="${data[i].menuId}" data-haveMenu="${data[i].haveMenu}" data-parentId="${data[i].parentId}" class="selectToggle"><img src="${data[i].haveMenu == 1?require('../images/icon_check.png'):require('../images/icon_unchecked.png')}" alt=""> ${data[i].menuName}</span>
+                    </div>
                     <ul class="sonSet clearfix">
                         ${getTreeLis(data[i].sysPermissionDTOList,data[i].menuId)}
                     </ul>
@@ -287,7 +296,9 @@ $(function(){
         let tmpstr = ''
         for(let i = 0;i <data.length;i++){
             tmpstr += `
-                <li data-permissionId="${data[i].permissionId}" data-haveMenu="${data[i].havePermission}" data-parentId="${data[i].parentId}" class="selectToggle"><img src="${data[i].havePermission==1?require('../images/icon_check.png'):require('../images/icon_unchecked.png')}" alt=""> ${data[i].permissionName}</li>
+                <li>
+                    <span data-permissionId="${data[i].permissionId}" data-haveMenu="${data[i].havePermission}" data-parentId="${data[i].parentId}" class="selectToggle"><img src="${data[i].havePermission==1?require('../images/icon_check.png'):require('../images/icon_unchecked.png')}" alt=""> ${data[i].permissionName}</span>
+                </li>
             `
         }
         return tmpstr
@@ -307,7 +318,7 @@ $(function(){
             let id = $(this).attr("data-id")
             curId = id
             permissionIdLis=[],menuIdLis=[];
-            $(".rightMenu").scrollTop(0)
+            $(".mainSysWrap").scrollTop(0)
             $(this).css({"background-color":"#F0F5FF"}).siblings().css("background-color","#fff")
             getRoleMenu(id)
         })

+ 16 - 0
src/js/utils.js

@@ -22,6 +22,8 @@ const api={
   editScore:'/qc/behospitalInfo/updCase' ,//修改评分
   addScore:'/qc/behospitalInfo/addCase' ,//添加评分项
   getRecordDetail:'/qc/behospitalInfo/getByBehospitalCode', //获取病例明细
+  getInfoModule:'/qc/module/getById',
+  getModuleById:'/qc/module/getModuleMap'
 };
 
 //重写assign方法
@@ -87,6 +89,10 @@ const post = function (url, data) {
         resolve({ data: res });
       },
       error: function (error) {
+        if(error.status===403||error.status===401){
+          const wd = window.parent.window||window;
+          wd.location.href = "../login.html";
+        }
         reject(error);
       },
     });
@@ -146,6 +152,15 @@ $(window).resize(function(){
   setBoxHeight();
 });
 
+//判断有无某一权限
+function hasData(data){
+  let lis = JSON.parse(getCookie("codeLis"))
+  if(lis.indexOf(data)>-1){//有权限
+    return true
+  }
+  return false;
+}
+
 module.exports = {
   pageMap,
   api,
@@ -156,4 +171,5 @@ module.exports = {
   getCookie,
   delCookie,
   setBoxHeight,
+  hasData
 };

+ 2 - 2
webpack.config.js

@@ -6,8 +6,8 @@ const MiniCssExtractPlugin = require('mini-css-extract-plugin');
 const CopyWebpackPlugin = require('copy-webpack-plugin');
 const UglifyJsPlugin = require('uglifyjs-webpack-plugin');
 const webpack = require('webpack');
-// const proxyHost = "http://192.168.2.236:5858";
-const proxyHost = "http://192.168.2.241:5858";
+const proxyHost = "http://192.168.2.236:5858";
+// const proxyHost = "http://192.168.2.241:5858";
 // const proxyHost = "http://192.168.3.117:5858";//铁钢
 // const proxyHost = "http://192.168.3.113:5858";//王峰
 module.exports = {