瀏覽代碼

Merge branch 'test' into dev_zxc

zhangxc 5 年之前
父節點
當前提交
0794fc2e52

+ 12 - 6
src/css/console.less

@@ -99,6 +99,7 @@ body.console {
   font-size: 14px;
   font-weight: bold;
   letter-spacing: 1px;
+  min-width: 100px;
   p {
     display: inline-block;
     font-size: 16px;
@@ -130,11 +131,11 @@ body.console {
       text-align: center;
       font-weight: normal;
     }
-    .mon {
+    .year {
       background-color: #5A8EEE;
       color: #fff;
     }
-    .year {
+    .mon {
       color: #5A8EEE;
     }
   }
@@ -275,7 +276,8 @@ body.console {
       padding: 15px 5px;
       width: 100%;
       box-sizing: border-box;
-      overflow: auto;
+      overflow-y: auto;
+      overflow-x: hidden;
       height: 405px;
     }
     .thead {
@@ -306,10 +308,12 @@ body.console {
       box-sizing: border-box;
     }
     .td01 {
-      width: 30px;
+      min-width: 30px;
+    }
+    .td02name {
+      min-width: 113px;
     }
     .td02 {
-      
     }
     .td03 {
       width: 40px;
@@ -340,11 +344,13 @@ body.console {
   .bingliLis {
     border-top: 1px solid #E2E5EF;
     padding: 20px 30px;
+    height: 197px;
+    box-sizing: border-box;
     p {
       text-align: center;
       font-weight: bold;
       font-size: 16px;
-      padding-bottom: 2px;
+      padding-bottom: 5px;
     }
   }
   .panPartPub {

+ 510 - 0
src/css/deptConsole.less

@@ -0,0 +1,510 @@
+body.console {
+  overflow: auto;
+  background-color: #f5f5f5;
+}
+.echarts {
+  width: 100%;
+  height: 300px;
+  padding: 0 15px;
+}
+.barChartPay {
+  width: 100%;
+  height: 300px;
+}
+.emptyCircle {
+  width: 35%;
+  height: 200px;
+  float: left;
+  margin-top: 32px;
+}
+#emptyCircleB {
+  margin-top: 50px;
+}
+.partAll {
+  background-color: #fff;
+}
+.partWrap {
+  // overflow: auto;
+  height: auto;
+  background: #f5f5f5;
+  min-width: 1080px;
+  ul {
+    padding: 0 40px;
+  }
+  .partLi {
+    float: left;
+    margin: 15px 0;
+    width: 20%;
+    height: 100px;
+    overflow: hidden;
+    .partIn {
+      height: 100px;
+      box-sizing: border-box;
+      border-radius: 3px;
+      padding: 10px 15px;
+      border: 1px solid #E2E5EF;
+      margin: 0 6px;
+    }
+    p {
+      padding-bottom: 10px;
+      color: #51649C;
+    }
+    .top {
+      margin-bottom: 12px;
+    }
+    .btm {
+      padding-bottom: 4px;
+      img {
+        float: left;
+        width: 40px;
+      }
+      span {
+        float: right;
+        font-size: 28px;
+        color: #51649C;
+      }
+    }
+  }
+  
+  .title {
+    font-size: 16px;
+    font-weight: bold;
+    border-bottom: 1px solid #E2E5EF;
+    height: 36px;
+    line-height: 36px;
+    padding-left: 15px;
+  }
+}
+.swiperWrap {
+  width: 300px;
+  border: 1px solid #ccc;
+}
+.grayLine {
+  height: 10px;
+  background-color: #f5f5f5;
+}
+.partTitleT {
+  height: 44px;
+}
+.partTitle {
+  position: absolute;
+  top: 0px;
+  left: 0;
+  width: 100%;
+  min-width: 1080px;
+  box-sizing: border-box;
+  background-color: #fff;
+  z-index: 20;
+  height: 44px;
+  line-height: 44px;
+  padding-left: 15px;
+  font-size: 14px;
+  font-weight: bold;
+  letter-spacing: 1px;
+  p {
+    display: inline-block;
+    font-size: 16px;
+    span,i {
+      font-size: 16px;
+    }
+  }
+  .dateDetail {
+    font-size: 12px;
+    color: #777777;
+    margin-right: 30px;
+    font-weight: normal;
+  }
+  .monthYear {
+    float: right;
+    margin-right: 20px;
+    border: 1px solid #5A8EEE;
+    height: 28px;
+    line-height: 28px;
+    border-radius: 4px;
+    overflow: hidden;
+    cursor: pointer;
+    margin-top: 7px;
+    span {
+      width: 48px;
+      height: 28px;
+      line-height: 28px;
+      display: inline-block;
+      text-align: center;
+      font-weight: normal;
+    }
+    .year {
+      background-color: #5A8EEE;
+      color: #fff;
+    }
+    .mon {
+      color: #5A8EEE;
+    }
+  }
+}
+.partTitles {
+  height: 44px;
+  line-height: 44px;
+  padding-left: 10px;
+  margin-right: 0;
+}
+.pubEchart {
+  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 {
+  box-sizing: border-box;
+  position: relative;
+}
+.dept {
+  box-sizing: border-box;
+}
+.circle {
+  height: 304px;
+  width: 100%;
+  display: inline-block;
+  background-color: #fff;
+  box-sizing: border-box;
+  position: relative;
+}
+.circleB {
+  height: 350px;
+  width: 100%;
+  display: inline-block;
+  background-color: #fff;
+  box-sizing: border-box;
+  border-top: 10px solid #f5f5f5;
+  position: relative;
+}
+.btmWrap {
+  width: 100%;
+  overflow: hidden;
+}
+.explainPan {
+  width: 60%;
+  float: right;
+  position: absolute;
+  top: 50%;
+  right: 0;
+  padding-right: 30px;
+  box-sizing: border-box;
+  max-height: 250px;
+  overflow: auto;
+  table {
+    width: 100%;
+  }
+  .explainLi {
+    height: 30px;
+    line-height: 30px;
+    span {
+      display: inline-block;
+    }
+    .tip {
+      display: inline-block;
+      width: 10px;
+      height: 10px;
+      border-radius: 50%;
+      background-color: red;
+      margin-right: 10px;
+    }
+    .deptName {
+      color: #777;
+      p {
+        width: 145px;
+        overflow: hidden;
+        text-overflow: ellipsis;
+        white-space: nowrap;
+      }
+      .smp {
+        width: 100px;
+      }
+    }
+    .deptNum {
+      color: #333;
+      font-size: 16px;
+      font-weight: bold;
+      padding-right: 10px;
+      width: 40px;
+      text-align: right;
+    }
+    .percent {
+      color: #777;
+      width: 40px;
+    }
+  }
+}
+
+
+.part01 {
+  width: 38%;
+  background-color: #fff;
+  border-right: 10px solid #f5f5f5;
+  box-sizing: border-box;
+  ul {
+    padding: 40px 20px;
+    border-bottom: 10px solid #f5f5f5;
+    li {
+      width: 50%;
+      float: left;
+    }
+    .lis {
+      border-left: 3px solid #F2637B;
+      height: 72px;
+      box-sizing: border-box;
+      padding-left: 12px;
+      margin-left: 60px;
+      &.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: 62%;
+  background-color: #fff;
+  .bingli {
+    padding: 20px;
+    li {
+      float: left;
+      width: 23%;
+      text-align: center;
+      border-right: 1px solid #E2E5EF;
+    }
+    .fst {
+      // border-right: 1px solid #E2E5EF;
+      box-sizing: border-box;
+      width: 30%;
+    }
+    .four {
+      border-right: 0 none;
+    }
+  }
+  .bingliLis {
+    border-top: 1px solid #E2E5EF;
+    padding: 20px 30px;
+    p {
+      text-align: center;
+      font-weight: bold;
+      font-size: 16px;
+      padding-bottom: 2px;
+      margin-bottom: 10px;
+    }
+  }
+  .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;
+    }
+  }
+}
+
+.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;
+  margin-right: 20px;
+  margin-top: 6px;
+  p {
+    width: 170px;
+    height: 30px;
+    line-height: 28px;
+    border: 1px solid #E2E5EF;
+    padding-right: 20px;
+    padding-left: 10px;
+    position: relative;
+    font-size: 14px;
+    border-radius: 4px;
+    font-weight: normal;
+    span {
+      width: 155px;
+      height: 30px;
+      line-height: 30px;
+      display: inline-block;
+      overflow: hidden;
+      text-overflow: ellipsis;
+      white-space: nowrap;
+      font-size: 14px;
+    }
+    img {
+      width: 10px;
+      position: absolute;
+      right: 10px;
+      top: 12px;
+    }
+  }
+  ul {
+    display: none;
+    background-color: #fff;
+    font-weight: normal;
+    border: 1px solid #E2E5EF;
+    z-index: 100;
+    padding: 0;
+    position: relative;
+    top: -15px;
+    li {
+      height: 30px;
+      line-height: 30px;
+      padding: 0 10px;
+      width: 180px;
+      overflow: hidden;
+      text-overflow: ellipsis;
+      white-space: nowrap;
+      font-size: 14px;
+      &:hover {
+        background-color: #EEF4FF;
+      }
+    }
+  }
+}
+
+// .partDept {
+//   position: absolute;
+//   top: 0;
+//   right: 0;
+//   width: 100%;
+//   box-sizing: border-box;
+//   background-color: #fff;
+//   z-index: 20;
+//   height: 44px;
+//   // line-height: 44px;
+//   padding-left: 15px;
+//   font-size: 14px;
+//   font-weight: bold;
+//   letter-spacing: 1px;
+//   border-bottom: 1px solid #E2E5EF;
+//   ul {
+//     .li0 {
+//       background-color: #5A8EEE;
+//       color: #fff;
+//     }
+//     li {
+//       float: left;
+//       padding: 0 12px;
+//       height: 34px;
+//       line-height: 34px;
+//       margin-top: 10px;
+//       border-radius: 6px 6px 0 0;
+//       background-color: #f5f5f5;
+//       margin-right: 15px;
+//       color: #777777;
+//       font-weight: normal;
+//       cursor: pointer;
+//       &:hover {
+//         color: #fff;
+//         background-color: #5A8EEE;
+//       }
+//     }
+//   }
+// }

+ 1 - 0
src/css/login.less

@@ -192,6 +192,7 @@ body {
   border-radius: 3px;
   color: #fff;
   background: rgba(0, 0, 0, .6);
+  z-index: 9999;
   filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#88000000,endColorstr=#88000000);
 }
 .loading {

+ 6 - 2
src/css/qcScore.less

@@ -3,6 +3,10 @@
   height: 100%;
   margin-top: 20px;
 }
+#loading{
+  text-align: center;
+  margin-top: 30px;
+}
 .waring {
   color: #FF4D4F;
   margin-top: 18px;
@@ -202,7 +206,7 @@
           vertical-align: middle;
         }
         .text-indent{
-          text-indent: 15px;
+          text-indent: 28px;
         }
         .text-left{
           width: 100%;
@@ -450,4 +454,4 @@
       }
     }
   }
-}
+}

+ 1 - 0
src/css/reset.less

@@ -245,6 +245,7 @@ textarea {
 }
 .divModal {
   position: fixed;
+  z-index: 9999;
 }
 .modaltip {
   position: fixed;

+ 108 - 0
src/html/deptConsole.html

@@ -0,0 +1,108 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+  <meta charset="UTF-8">
+  <meta name="viewport" content="width=device-width, initial-scale=1.0">
+  <title>Document</title>
+</head>
+<body class="console">
+  <div class="partDept">
+    <ul class="clearfix">
+      
+    </ul>
+  </div>
+  <div class="partTitle">
+    <p><span></span><i></i>数据概览</p>
+    <div class="monthYear">
+      <span class="mon">本月</span>
+      <span class="year">本年</span>
+    </div> 
+    <div class="toggleSlide fr">
+      <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 class="dateDetail fr">
+      
+    </div>
+  </div>
+  <div class="partTitleT"></div>
+  <div class="grayLine"></div>
+  <div class="partWrap clearfix">
+      <div class="part01 fl">
+        <p class="partTitlePub clearfix">
+          <span class="name">出院人数统计</span>
+          <span class="personNum">总人数:</span>
+        </p>
+        <ul class="clearfix">
+          <li>
+            <div class="lis">
+              <p class="numShow died"></p>
+              <p class="explainNum">死亡人数</p>
+            </div>
+          </li>
+          <li class="li03">
+            <div class="lis">
+              <p class="numShow patientNum"></p>
+              <p class="explainNum">手术病人数</p>
+            </div>
+          </li>
+        </ul>
+        <div class="defect">
+          <p class="partTitlePub">各模块缺陷占比排名</p>
+          <div class="list">
+            <table class="qtable">
+  
+            </table>
+          </div>
+        </div>
+      </div>
+      <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 class="four">
+            <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="circleB clearfix">
+          <p class="title">条目缺陷占比</p>
+          <div id="emptyCircleB" class="emptyCircle"></div>
+          <div class="explainPan explainPanB">
+            <table>
+              
+            </table>
+          </div>
+        </div>
+      </div>
+  </div>
+</body>
+</html>

+ 3 - 1
src/html/index.html

@@ -10,7 +10,9 @@
     {{if subMenuList.length}}
         <li class="list-1"><p>${name}</p>
     {{else}}
-        <li class="page" code="${code}">${name}
+        {{if showStatus==1}}
+            <li class="page" code="${code}">${name}
+        {{/if}}
     {{/if}}
         <ul>
             {{each subMenuList}}

+ 1 - 0
src/html/qcScore.html

@@ -616,6 +616,7 @@
 </head>
 <body>
     <div class="patient-info" id="patientInfo"></div>
+    <p id="loading">加载中,请稍候 ...</p>
     <div class="main-part clearfix">
         <div class="sub-menu content-ht">
             <ul id="subMenu"></ul>

+ 6 - 7
src/js/console.js

@@ -7,7 +7,7 @@ require("../images/arrow_down.png")
 // import 'zrender/lib/svg/svg';
 const echarts = require('echarts');
 const {post,setCookie,delCookie,getCookie} = require('../js/utils.js');
-let payMoney = [],dayLis = [],dateType = 1,slideType = 1;
+let payMoney = [],dayLis = [],dateType = 2,slideType = 1;
 $(function(){
     if(!hasData('YH-KZT')){
         $("body").html('')
@@ -18,7 +18,7 @@ $(function(){
     }, 1000);
     resizeBox()
     initConsole()//质控列表
-    getBarData()//图标数据获取
+    getBarData(2)//图标数据获取
     dateChange()
     $(window).click(function(){
         window.parent.userActionHide()
@@ -134,7 +134,6 @@ function initConsole(result){
 }
 //获取图表数据
 function getBarData(type){
-    console.log(slideType,'797979898')
     if(hasData('FUNC000045')){
         post('/console/getAverageDayNum',{//平均住院天数
             "type": type||1//1月2年
@@ -416,7 +415,7 @@ function lineChart(dataX,dataY){
             containLabel: true
         },
         title:[{
-            text: '百分比',
+            text: dataX.length>0?'百分比':'',
             top: 15,
             left: 0,
             textStyle: {
@@ -570,7 +569,7 @@ function barChartPay(dataX,dataY){
             
         ],
         title:[{
-            text: '分数',
+            text: dataX.length>0?'分数':'',
             top: 15,
             left: 10,
             textStyle: {
@@ -703,7 +702,7 @@ function barChart(data,type){
             containLabel: true
         },
         title:[{
-            text: slideType==1?'天数':'元',
+            text: dataX.length>0?(slideType==1?'天数':'元'):'',
             top: 15,
             left: 10,
             textStyle: {
@@ -1007,7 +1006,7 @@ function queList(data){
         strAll += `
             <tr>
                 <td style="text-align:center;"><i style="background:${i < 3?'#bea571':'#eff3fc'};color:${i < 3?'#fff':'#999'};">${i+1}</i></td>
-                <td>${data[i].name}</td>
+                <td><p class="td02name">${data[i].name}</p></td>
                 <td>${data[i].num}</td>
                 <td>${data[i].percentStr}</td>
             </tr>

+ 480 - 0
src/js/deptConsole.js

@@ -0,0 +1,480 @@
+const $ = require('jquery');
+require("../css/reset.less")
+require("../css/deptConsole.less")
+require("../images/logo.png")
+require("../images/arrow_down.png")
+
+// import 'zrender/lib/svg/svg';
+const echarts = require('echarts');
+const {post,setCookie,delCookie,getCookie} = require('../js/utils.js');
+let payMoney = [],dayLis = [],dateType = 2,curDept = '',datafst=[],datasec=[],datatrd=[],datafour=[];
+$(function(){
+    if(!hasData('YH-KZT')&&!hasData('YH-KZTKS')){
+        $("body").html('')
+    }
+    $(".partTitle p span").html(getCookie("hospital"))
+    setInterval(() => {
+        getTimeDetail()
+    }, 1000);
+    // resizeBox()
+    initConsole()//质控列表
+    getOwnDept()
+    dateChange()
+    $(window).click(function(){
+        window.parent.userActionHide()
+        $(".toggleSlide ul").css("display","none")
+    })
+                
+    $(".toggleSlide p").click(function(e){
+        e.stopPropagation()
+        $(this).next().slideToggle()
+    })
+})
+//判断有无某一权限
+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'
+    })
+}
+//所有数据切换日期筛选
+function dateChange(){
+    $(".monthYear .mon").click(function(){
+        $(this).css({
+            backgroundColor:'#5A8EEE',
+            color:'#fff'
+        }).siblings().css({
+            color:'#5A8EEE',
+            backgroundColor:'#fff'
+        })
+        dateType = 1
+        getBarData(1)
+    })
+    $(".monthYear .year").click(function(){
+        $(this).css({
+            backgroundColor:'#5A8EEE',
+            color:'#fff'
+        }).siblings().css({
+            color:'#5A8EEE',
+            backgroundColor:'#fff'
+        })
+        dateType = 2
+        getBarData(2)
+    })
+}
+//控制台数
+function initConsole(result){
+    let url = {
+        '本月病历数':require("../images/icon6.png"),
+        '本月不合格病历-机器':require("../images/icon7.png"),
+        '本月质控数-机器':require("../images/icon10.png"),
+        '本月甲级病历-机器':require("../images/icon8.png"),
+        '本月乙级病历-机器':require("../images/icon9.png"),
+        '本年病历数':require("../images/icon6.png"),
+        '本年不合格病历-机器':require("../images/icon7.png"),
+        '本年质控数-机器':require("../images/icon10.png"),
+        '本年甲级病历-机器':require("../images/icon8.png"),
+        '本年乙级病历-机器':require("../images/icon9.png"),
+    }
+    let dom = '';
+    for(let i in result){
+        if(i.indexOf("人工")==-1){
+            let name = i.split("-")[0];
+            let num = 0;
+            if(name=='本月病历数'||name=='本年病历数'){
+                num = result[i]
+            }else{
+                num = result[name+'-人工']+result[i]
+            }
+            dom += `
+                <li class="partLi">
+                    <div class="partIn">
+                        <p class="top">${name}</p>
+                        <p class="btm clearfix">
+                        <img src="${url[i]}" alt="">
+                        <span>${num}</span>
+                        </p>
+                    </div>
+                </li>
+            `
+        }
+    }
+    $(".partAll").html(dom)
+}
+//获取科室列表
+function getOwnDept(){
+    if(hasData('FUNC000058')){
+        post('/consoleByDept/getDept',{}).then((res)=>{
+            let data = res.data;
+            if(data.code == 0){
+                let result = data.data
+                renderDeptLis(result)//科室tab渲染
+                curDept = result[0].deptName
+                $(".partTitle p i,.toggleSlide p span").html(curDept).attr("title",curDept)
+                getBarData(2)//图标数据获取
+            }
+        })
+    }
+}
+function renderDeptLis(data){
+    let str = ''
+    for(let i = 0; i < data.length;i++){
+        str += `
+            <li title="${data[i].deptName}" class="${i == 0?'li0 toggleAverge toggleSlide1':'toggleAverge toggleSlide1'}" data-dept="${data[i].deptName}">${data[i].deptName}</li>
+        `
+    }
+    $(".toggleSlide ul").html(str)
+    $(".toggleSlide ul li").click(function(){
+        let name = $(this).attr("data-dept")
+        curDept = name
+        $(this).parent().slideToggle().prev().find("span").html(name).attr("title",name)
+        $(".partTitle p i").html(name).attr("title",name)
+        personNum(datafst[name]||[])
+        setNumDetail(datasec[name]||[])
+        queList(datatrd[name]||[])
+        for(let i = 0;i < datafour[name].length;i++){
+            datafour[name][i].value = datafour[name][i].num
+        }
+        emptyCircleB(datafour[name])
+        panDetailB(datafour[name])
+        $(this).addClass("li0").siblings().removeClass("li0")
+    })
+}
+//获取图表数据
+function getBarData(type){
+    if(hasData('FUNC000054')){
+        post('/consoleByDept/leaveHosCountByDept',{//出院人数统计
+            "type": type||1//1月2年
+        }).then((res)=>{
+            let data = res.data;
+            if(data.code == 0){
+                let result = data.data[curDept]||[]
+                datafst = data.data
+                personNum(result)
+            }
+        })
+    }
+    if(hasData('FUNC000055')){
+        post('/consoleByDept/mrCountByDept',{//质控病历统计
+            "type": type||1//1月2年
+        }).then((res)=>{
+            let data = res.data
+            if(data.code == 0){
+                let result3 = data.data[curDept]||[]
+                datasec = data.data
+                setNumDetail(result3)
+            }
+        })
+    }
+    if(hasData('FUNC000056')){
+        post('/consoleByDept/entryCountGroupByCaseAndDept',{//各模块缺陷占比排行
+            "type": type||1//1月2年
+        }).then((res)=>{
+            let data = res.data;
+            if(data.code == 0){
+                let result1 = data.data[curDept]||[]
+                datatrd = data.data
+                queList(result1)
+            }
+        })
+    }
+    if(hasData('FUNC000057')){
+        post('/consoleByDept/entryCountGroupByEntryAndDept',{//条目缺陷占比
+            "type": type||1//1月2年
+        }).then((res)=>{
+            let data = res.data;
+            if(data.code == 0){
+                let result3 = data.data[curDept]||[]
+                for(let i = 0;i < result3.length;i++){
+                    result3[i].value = result3[i].num
+                }
+                datafour = data.data
+                emptyCircleB(result3)
+                panDetailB(result3)
+            }
+        })
+    }
+}
+//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){
+        data = [
+            {
+                "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%"
+            }
+        ]
+    }
+    let str = ''
+    for(let i = 0;i < data.length;i++){
+        str += `
+            <li class="${i==0?'fst':i == data.length-1?' four':''}">
+            <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')
+        }
+        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')
+        }
+        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 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 = `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>
+                <td style="text-align:center;"><i style="background:${i < 3?'#bea571':'#eff3fc'};color:${i < 3?'#fff':'#999'};">${i+1}</i></td>
+                <td>${data[i].name}</td>
+                <td>${data[i].num}</td>
+                <td>${data[i].percentStr}</td>
+            </tr>
+        `
+    }
+    $(".qtable").html(tmp+strAll)
+}
+//饼图列表注释渲染
+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)
+}
+
+

+ 1 - 1
src/js/index.js

@@ -21,6 +21,7 @@ $(function(){
   $("#changeWord").css("opacity",hasData('FUNC000002')?'1':'0.5').hover(function(){
     $(this).css("color","#777777")
   })
+  // $("#contentIframe").attr("src",hasData('YH-KZT')?'console.html':hasData('YH-KZTKS')?'deptConsole.html':'console.html');
 });
 //判断有无某一权限
 function hasData(data){
@@ -78,7 +79,6 @@ function getMenu(){
       userInfo = data.userLoginDTO
       setCookie("hospital",data.basHospitalInfoDTO.name)
       getAllCode(data.menuWrappers);
-      hasData("FUNC000002")?"":$("#changeWord").hide();   //修改密码无权限不显示
     }
   });
 };

+ 1 - 1
src/js/modal.js

@@ -49,9 +49,9 @@ const jQuery = require('jquery');
             top:$(".modaltip").height()/2+'px'
         })
         if(ops.isFather){
+            console.log('bbbbbbb')
            ops.fatherWrapper.append(box)
         } else{
-            console.log('bbbbbbb')
             $("body").append(box)
         }
         if(ops.type == 'tip'){

+ 2 - 1
src/js/qcScore.js

@@ -355,7 +355,7 @@ function formatFlawKeys(data){
     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>' +
+      '<h2 class="title">'+global_modules[mid].modeName+'</h2>' +
       (n>1?'<div class="container">':'<div class="container content-ht">');
 
     for(let i in module){
@@ -441,6 +441,7 @@ function formatFlawKeys(data){
         const data = res.data.data;
         global_modules=data;
         getRecordDetail();
+        $("#loading").hide();
       }
     });
   }

+ 24 - 0
src/js/userManager.js

@@ -326,6 +326,10 @@ function editItem(result,activePage,title){
     })
     $("#mainBox .itemMsgBox .activeGoRight", parent.document).on("click", function(e){//数据往右
         let selectDeptLeftTmp = selectDeptLeft
+        if(selectDeptLeftTmp.length == 0){
+            $.alerModal({type:"tip",message:"请先选择内容",isFather: true, fatherWrapper: $("#mainBox", parent.document)});
+            return
+        }
         for(let j = 0;j < selectDeptLeftTmp.length;j++){
             for(let i = 0;i < leftDeptLis.length;i++){
                 if(leftDeptLis[i].deptId == selectDeptLeftTmp[j]){
@@ -339,6 +343,10 @@ function editItem(result,activePage,title){
     })
     $("#mainBox .itemMsgBox .activeGoLeft", parent.document).on("click", function(e){//数据往左
         let selectDeptRightTmp = selectDeptRight
+        if(selectDeptRightTmp.length == 0){
+            $.alerModal({type:"tip",message:"请先选择内容",isFather: true, fatherWrapper: $("#mainBox", parent.document)});
+            return
+        }
         for(let j = 0;j < selectDeptRightTmp.length;j++){
             for(let i = 0;i < rightDeptLis.length;i++){
                 if(rightDeptLis[i].deptId == selectDeptRightTmp[j]){
@@ -394,6 +402,10 @@ function editItemRole(result,activePage,title){
     })
     $("#mainBox .itemMsgBox .activeGoRight", parent.document).on("click", function(e){//数据往右
         let selectDeptLeftTmp = selectRoleLeft
+        if(selectDeptLeftTmp.length == 0){
+            $.alerModal({type:"tip",message:"请先选择内容",isFather: true, fatherWrapper: $("#mainBox", parent.document)});
+            return
+        }
         let leftDeptLis = leftRoleLis
         for(let j = 0;j < selectDeptLeftTmp.length;j++){
             for(let i = 0;i < leftDeptLis.length;i++){
@@ -410,6 +422,10 @@ function editItemRole(result,activePage,title){
     })
     $("#mainBox .itemMsgBox .activeGoLeft", parent.document).on("click", function(e){//数据往左
         let selectDeptRightTmp = selectRoleRight
+        if(selectDeptRightTmp.length == 0){
+            $.alerModal({type:"tip",message:"请先选择内容",isFather: true, fatherWrapper: $("#mainBox", parent.document)});
+            return
+        }
         let rightDeptLis = rightRoleLis
         for(let j = 0;j < selectDeptRightTmp.length;j++){
             for(let i = 0;i < rightDeptLis.length;i++){
@@ -430,6 +446,10 @@ function editItemRole(result,activePage,title){
 //保存科室修改
 function saveEdit(id,activePage){
     let ids = []
+    if(rightDeptLis.length==0){
+        $.alerModal({"message":"请选择科室",type:"tip",time:'1000',isFather: true, fatherWrapper: $("#mainBox", parent.document)});
+        return
+    }
     for(let i = 0;i < rightDeptLis.length;i++){
         ids.push(rightDeptLis[i].deptId)
     }
@@ -451,6 +471,10 @@ function saveEdit(id,activePage){
 //保存角色修改
 function saveEditRole(id,activePage){
     let ids = []
+    if(rightRoleLis.length==0){
+        $.alerModal({"message":"请选择角色",type:"tip",time:'1000',isFather: true, fatherWrapper: $("#mainBox", parent.document)});
+        return
+    }
     for(let i = 0;i < rightRoleLis.length;i++){
         ids.push(rightRoleLis[i].id)
     }

+ 1 - 0
src/js/utils.js

@@ -5,6 +5,7 @@ var Utils = require('./rePromise');
 //页面映射
 const pageMap={
   'YH-KZT':'console.html',
+  'YH-KZTKS':'deptConsole.html',
   'YH-JCSJWH-MKSJWH':'moduleManager.html',
   'YH-JCSJWH-TMSJWH':'itemManager.html',
   'YH-BLZK-ZKPF':'qcList.html',

+ 16 - 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 = {
@@ -16,6 +16,7 @@ module.exports = {
     qcScore:path.resolve(__dirname, 'src/js', 'qcScore.js'),
     login:path.resolve(__dirname, 'src/js', 'login.js'),
     console:path.resolve(__dirname, 'src/js', 'console.js'),
+    deptConsole:path.resolve(__dirname, 'src/js', 'deptConsole.js'),
     moduleManager: path.resolve(__dirname, 'src/js', 'moduleManager.js'),
     itemManager: path.resolve(__dirname, 'src/js', 'itemManager.js'),
     qcList: path.resolve(__dirname, 'src/js', 'qcList.js'),
@@ -61,6 +62,19 @@ module.exports = {
         collapseWhitespace: true //删除空白符与换行符
       }
     }),
+    new HtmlWebpackPlugin({
+      title: 'deptConsole.html',
+      template: path.resolve(__dirname, 'src/html', 'deptConsole.html'),
+      filename: 'deptConsole.html',
+      chunks: ['deptConsole', 'vendor', 'common'],
+      hash: true, //防止缓存
+      inject: true,
+      minify: {
+        removeAttributeQuotes: true, //压缩 去掉引号
+        removeComments: true, //移除HTML中的注释
+        collapseWhitespace: true //删除空白符与换行符
+      }
+    }),
     new HtmlWebpackPlugin({
       title: 'itemManager.html',
       template: path.resolve(__dirname, 'src/html', 'itemManager.html'),