luolei 5 anos atrás
pai
commit
cd6aa8b0c0

+ 10 - 4
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;
@@ -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 {

+ 78 - 16
src/css/deptConsole.less

@@ -27,7 +27,7 @@ body.console {
   // overflow: auto;
   height: auto;
   background: #f5f5f5;
-  min-width: 1185px;
+  min-width: 1080px;
   ul {
     padding: 0 40px;
   }
@@ -88,9 +88,10 @@ body.console {
 }
 .partTitle {
   position: absolute;
-  top: 0;
-  right: 0;
+  top: 0px;
+  left: 0;
   width: 100%;
+  min-width: 1080px;
   box-sizing: border-box;
   background-color: #fff;
   z-index: 20;
@@ -103,7 +104,7 @@ body.console {
   p {
     display: inline-block;
     font-size: 16px;
-    span {
+    span,i {
       font-size: 16px;
     }
   }
@@ -254,12 +255,15 @@ body.console {
     padding: 40px 20px;
     border-bottom: 10px solid #f5f5f5;
     li {
+      width: 50%;
       float: left;
-      width: 33.33%;
+    }
+    .lis {
       border-left: 3px solid #F2637B;
       height: 72px;
       box-sizing: border-box;
       padding-left: 12px;
+      margin-left: 60px;
       &.li02 {
         border-left: 3px solid #37CBCB;
       }
@@ -322,7 +326,7 @@ body.console {
   }
 }
 .part02{
-  border-right: 10px solid #f5f5f5;
+  // border-right: 10px solid #f5f5f5;
   box-sizing: border-box;
   width: 62%;
   background-color: #fff;
@@ -332,12 +336,16 @@ body.console {
       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;
@@ -406,12 +414,11 @@ body.console {
 
 .toggleSlide {
   cursor: pointer;
-  position: absolute;
-  right: 10px;
-  top: 4px;
+  margin-right: 20px;
+  margin-top: 6px;
   p {
-    width: 100px;
-    height: 26px;
+    width: 170px;
+    height: 30px;
     line-height: 28px;
     border: 1px solid #E2E5EF;
     padding-right: 20px;
@@ -419,6 +426,17 @@ body.console {
     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;
@@ -429,20 +447,64 @@ body.console {
   ul {
     display: none;
     background-color: #fff;
-    position: absolute;
-    top: 27px;
-    right: 0;
+    font-weight: normal;
     border: 1px solid #E2E5EF;
     z-index: 100;
     padding: 0;
-    width: 130px;
+    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

@@ -184,6 +184,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 {

+ 1 - 0
src/css/reset.less

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

+ 22 - 11
src/html/deptConsole.html

@@ -6,12 +6,24 @@
   <title>Document</title>
 </head>
 <body class="console">
+  <div class="partDept">
+    <ul class="clearfix">
+      
+    </ul>
+  </div>
   <div class="partTitle">
-    <p><span></span>质控科数据概览</p>
+    <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>
@@ -19,7 +31,6 @@
   <div class="partTitleT"></div>
   <div class="grayLine"></div>
   <div class="partWrap clearfix">
-
       <div class="part01 fl">
         <p class="partTitlePub clearfix">
           <span class="name">出院人数统计</span>
@@ -27,16 +38,16 @@
         </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>
+            <div class="lis">
+              <p class="numShow died"></p>
+              <p class="explainNum">死亡人数</p>
+            </div>
           </li>
           <li class="li03">
-            <p class="numShow patientNum"></p>
-            <p class="explainNum">手术病人数</p>
+            <div class="lis">
+              <p class="numShow patientNum"></p>
+              <p class="explainNum">手术病人数</p>
+            </div>
           </li>
         </ul>
         <div class="defect">
@@ -62,7 +73,7 @@
             <p class="numShow"></p>
             <p class="explainNum">乙级病历</p>
           </li>
-          <li>
+          <li class="four">
             <p class="numShow"></p>
             <p class="explainNum">丙级病历</p>
           </li>

+ 1 - 1
src/html/index.html

@@ -41,7 +41,7 @@
               <ul></ul>
               <div class="copy-right">©杭州朗通信息技术有限公司</div></div>
           <div class="main" id="mainBox">
-              <iframe src="./deptConsole.html" frameborder="0" id="contentIframe"></iframe>
+              <iframe src="./console.html" frameborder="0" id="contentIframe"></iframe>
           </div>
       </div>
     </div>

+ 2 - 2
src/js/console.js

@@ -9,7 +9,7 @@ const echarts = require('echarts');
 const {post,setCookie,delCookie,getCookie} = require('../js/utils.js');
 let payMoney = [],dayLis = [],dateType = 2,slideType = 1;
 $(function(){
-    if(!hasData('YH-KZT')){
+    if(!hasData('YH-KZTKS')){
         $("body").html('')
     }
     $(".partTitle p span").html(getCookie("hospital"))
@@ -1006,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>

+ 101 - 67
src/js/deptConsole.js

@@ -7,9 +7,9 @@ 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,slideType = 1;
+let payMoney = [],dayLis = [],dateType = 2,curDept = '',datafst=[],datasec=[],datatrd=[],datafour=[];
 $(function(){
-    if(!hasData('YH-KZT')){
+    if(!hasData('YH-KZT')&&!hasData('YH-KZTKS')){
         $("body").html('')
     }
     $(".partTitle p span").html(getCookie("hospital"))
@@ -18,19 +18,14 @@ $(function(){
     }, 1000);
     // resizeBox()
     initConsole()//质控列表
-    getBarData(2)//图标数据获取
+    getOwnDept()
     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()
     })
@@ -38,7 +33,7 @@ $(function(){
 //判断有无某一权限
 function hasData(data){
     let lis = JSON.parse(getCookie("codeLis"))
-    console.log(lis)
+    // console.log(lis)
     if(lis.indexOf(data)>-1){//有权限
         return true
     }
@@ -113,92 +108,94 @@ function initConsole(result){
     }
     $(".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('FUNC000049')){
-        // post('/consoleByDept/leaveHosCountByDept',{//出院人数统计
-        post('/console/leaveHosCount',{//出院人数统计
+    if(hasData('FUNC000054')){
+        post('/consoleByDept/leaveHosCountByDept',{//出院人数统计
             "type": type||1//1月2年
         }).then((res)=>{
             let data = res.data;
             if(data.code == 0){
-                // console.log(data)
-                let result1 = data.data['出院人数统计']||[]
-                personNum(result1)
+                let result = data.data[curDept]||[]
+                datafst = data.data
+                personNum(result)
             }
         })
     }
-    if(hasData('FUNC000050')){
-        // post('/consoleByDept/mrCountByDept',{//质控病历统计
-        post('/console/mrCount',{//质控病历统计
+    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['病历数统计']||[]
-                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%"
-                        }
-                    ]
-                }
+                let result3 = data.data[curDept]||[]
+                datasec = data.data
                 setNumDetail(result3)
             }
         })
     }
-    if(hasData('FUNC000051')){
-        // post('/consoleByDept/entryCountGroupByCaseAndDept',{//各模块缺陷占比排行
-        post('/console/entryCountGroupByCase',{//各模块缺陷占比排行
+    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['各模块缺陷占比排行']||[]
+                let result1 = data.data[curDept]||[]
+                datatrd = data.data
                 queList(result1)
             }
         })
     }
-    if(hasData('FUNC000052')){
-        // post('/consoleByDept/entryCountGroupByEntryAndDept',{//条目缺陷占比
-        post('/console/entryCountGroupByEntry',{//条目缺陷占比
+    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['条目缺陷占比']||[]
+                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)
             }
@@ -215,11 +212,46 @@ function personNum(data){
 //part02
 function setNumDetail(data){
     // console.log(data,2222222222)
-    if(data.length == 0)return
+    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':''}">
+            <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>
@@ -443,4 +475,6 @@ function getTimeDetail(){
     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 - 0
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){

+ 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'){

+ 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',

+ 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 = {