luolei 5 anni fa
parent
commit
21a87b456f
6 ha cambiato i file con 91 aggiunte e 52 eliminazioni
  1. 4 1
      src/css/common.less
  2. 2 0
      src/css/console.less
  3. 15 1
      src/html/console.html
  4. 6 0
      src/html/partDetail.html
  5. 63 49
      src/js/console.js
  6. 1 1
      src/js/utils.js

+ 4 - 1
src/css/common.less

@@ -16,7 +16,6 @@
 //       }
 //     }
 //   }
-    
 .ellipsis{
     overflow: hidden;
     text-overflow:ellipsis;
@@ -35,4 +34,8 @@ input:disabled {
     margin: 0;
     padding: 20px 25px 0;
     border:10px @disColor solid;
+}
+
+.selectDates {
+
 }

+ 2 - 0
src/css/console.less

@@ -497,6 +497,7 @@ body.console {
   width: 33%;
   background-color: #fff;
   box-sizing: border-box;
+  position: relative;
   .barChartLine {
     box-sizing: border-box;
     width: 100%;
@@ -522,6 +523,7 @@ body.console {
   color:@themeFontClr;
   font-size: 16px;
   cursor: pointer;
+  position: relative;
   span{
     color: @themeFontClr;
   }

+ 15 - 1
src/html/console.html

@@ -11,7 +11,13 @@
     <div class="monthYear clearfix">
       <span class="mon">本月</span>
       <span class="year">本年</span>
-    </div> 
+    </div>
+    <!-- <span class="selectDates filterItem typeFilter clearfix" style="margin-top: 3px;">
+        <span class="fl">出院日期:</span>
+        <span class="datapickerBox fl"><input type="text" placeholder="请选择时间" id="datepicker" autocomplete="off" /></span>
+        <span  class="divide fl">-</span>
+        <span class="datapickerBox fl"><input type="text" placeholder="请选择时间" id="datepicker2"  autocomplete="off" /></span>
+    </span> -->
     <div class="dateDetail fr">
       
     </div>
@@ -125,6 +131,14 @@
         <p class="partTitlePub clearfix">
           <span class="name">病案首页合格率占比</span> <img class="detailGo" src="../images/details.png" alt="">
         </p>
+        <div class="toggleSlide">
+          <p><span>合格率</span><img src="../images/arrow_down.png" alt=""> </p>
+          <ul>
+            <li class="toggleAverge toggleSlide1" data-str="合格率" data-level="合格率" data-type="7">合格率</li>
+            <li class="toggleAverge toggleSlide2" data-str="完整率" data-level="完整率" data-type="8">完整率</li>
+            <li class="toggleAverge toggleSlide2" data-str="完善率" data-level="完善率" data-type="9">完善率</li>
+          </ul>
+        </div>
         <div class="barChartLineBox">
           <div id="lineChart" class="barChartLine"></div>
           <div class="barChartLineEmpty"></div>

+ 6 - 0
src/html/partDetail.html

@@ -34,6 +34,12 @@
                         
                     </ul>
                 </span>
+                <!-- <span class="filterItem typeFilter clearfix" style="margin-top: 3px;">
+                    <span class="fl">出院日期:</span>
+                    <span class="datapickerBox fl"><input type="text" placeholder="请选择时间" id="datepicker" autocomplete="off" /></span>
+                    <span  class="divide fl">-</span>
+                    <span class="datapickerBox fl"><input type="text" placeholder="请选择时间" id="datepicker2"  autocomplete="off" /></span>
+                </span> -->
                 <span class="filter">查询</span>
                 <span class="filterclear abnormalClear">重置</span>
             </div>

+ 63 - 49
src/js/console.js

@@ -8,7 +8,7 @@ require("../images/arrow_down.png")
 const {api} = require('./api.js')
 const echarts = require('echarts');
 const {post,setCookie,delCookie,getCookie,focusMenuItem,picEmptyData} = require('../js/utils.js');
-let payMoney = [],dayLis = [],dateType = 2,slideType = 1,hospital=getCookie("hospital"),deptType="内科",deptId="",level="甲";
+let payMoney = [],dayLis = [],dateType = 2,slideType = 1,hospital=getCookie("hospital"),deptType="内科",deptId="",level="甲",lineType="合格率",lineType1=[],lineType2=[],lineType3=[],lineType4=[];
 $(function(){
     if(!hasData('YH-KZT')){
         $("body").html('')
@@ -91,6 +91,18 @@ $(function(){
             deptType="外科"
             getAverageScoreLis()
             $(this).parent().slideToggle().prev().find("span").html(str+"系统")
+        }else if(type == 7){//病案首页
+            deptType="合格率"
+            lineChartHome(lineType4,lineType1)
+            $(this).parent().slideToggle().prev().find("span").html(str)
+        }else if(type == 8){//病案首页
+            lineType = "完整率"
+            lineChartHome(lineType4,lineType2)
+            $(this).parent().slideToggle().prev().find("span").html(str)
+        }else if(type == 9){//病案首页
+            lineType = "完善率"
+            lineChartHome(lineType4,lineType3)
+            $(this).parent().slideToggle().prev().find("span").html(str)
         }
     })
     $(".part02").on("mouseenter",".bingli li.sec",function(){
@@ -130,7 +142,6 @@ function getDetails(){
         //     focusMenuItem("YH-ZKK-BASYHGLZB_XQ");
         //     $(parent.document).find("#contentIframe").attr("src","./partDetailControl.html?from=1&dateType="+dateType)
         // }
-        
         focusMenuItem("YH-ZKK-BASYHGLZB_XQ");
         $(parent.document).find("#contentIframe").attr("src","./partDetailControl.html?from=1&dateType="+dateType)
     })
@@ -362,14 +373,19 @@ function getBarData(type){
             let data = res.data;
             if(data.code == 0){
                 let result1 = data.data||[]
-                let dataX1=[],dataY1=[],dataY2=[],dataY3=[]
+                let dataX=[],dataY1=[],dataY2=[],dataY3=[]
                 for(let i = 0;i < result1.length;i++){
-                    dataX1.push(result1[i].deptName)
+                    dataX.push(result1[i].deptName)
                     dataY1.push((result1[i].firstLevelPercentStr.replace('%','')-0))
                     dataY2.push((result1[i].emptyPercentStr.replace('%','')-0))
                     dataY3.push((result1[i].errorPercentStr.replace('%','')-0))
                 }
-                lineChartHome(dataX1,dataY1,dataY2,dataY3)
+                lineType1 = dataY1.sort(function(a, b){return b - a})
+                lineType2 = dataY2.sort(function(a, b){return b - a})
+                lineType3 = dataY3.sort(function(a, b){return b - a})
+                lineType4 = dataX
+                
+                lineChartHome(dataX,lineType == "合格率"?lineType1:lineType=="完整率"?lineType2:lineType3)
             }
         })
     }
@@ -790,8 +806,8 @@ function lineChartSpecial(dataX,dataY){
     myCharts.setOption(option);
 }
 //折线图病案首页
-function lineChartHome(dataX,dataY1,dataY2,dataY3){
-    console.log(dataX,dataY1,dataY2,dataY3)
+function lineChartHome(dataX,dataY){
+    // console.log(dataX,dataY)
     if(dataX.length==0){
         $(".barChartLine").css("display","none")
         picEmptyData(".barChartLineEmpty")
@@ -824,37 +840,35 @@ function lineChartHome(dataX,dataY1,dataY2,dataY3){
             },
             formatter: function(param) {           
                 return `<div style="color:#fff;">${param[0].name}<br>
-                    <i style="background:#00A1FF;margin-right:5px;display:inline-block;width:8px;height:8px;border-radius:50%"></i>病案首页合格率:${param[0]&&param[0].value}%<br>
-                    <i style="background:#FF2B92;margin-right:5px;display:inline-block;width:8px;height:8px;border-radius:50%"></i>病案首页完整率:${param[1]&&param[1].value}%<br>
-                    <i style="background:#3EFFD1;margin-right:5px;display:inline-block;width:8px;height:8px;border-radius:50%"></i>病案首页完善率:${param[2]&&param[2].value}%<br>
+                    <i style="background:#00A1FF;margin-right:5px;display:inline-block;width:8px;height:8px;border-radius:50%"></i>病案首页${lineType}:${param[0]&&param[0].value}%<br>
                 </div>`
             }
         },
-        legend: {
-            selectedMode :false,
-            right:15,
-            top:15,
-            data: [
-                {
-                    name: '合格率',
-                    textStyle: {
-                        color: '#A5ADBF'
-                    }
-                },
-                {
-                    name: '完整率',
-                    textStyle: {
-                        color: '#A5ADBF'
-                    }
-                },
-                {
-                    name: '完善率',
-                    textStyle: {
-                        color: '#A5ADBF'
-                    }
-                }
-            ]
-        },
+        // legend: {
+        //     selectedMode :false,
+        //     right:15,
+        //     top:15,
+        //     data: [
+        //         {
+        //             name: '合格率',
+        //             textStyle: {
+        //                 color: '#A5ADBF'
+        //             }
+        //         },
+        //         {
+        //             name: '完整率',
+        //             textStyle: {
+        //                 color: '#A5ADBF'
+        //             }
+        //         },
+        //         {
+        //             name: '完善率',
+        //             textStyle: {
+        //                 color: '#A5ADBF'
+        //             }
+        //         }
+        //     ]
+        // },
         grid: {
             left: '3%',
             right: '4%',
@@ -915,23 +929,23 @@ function lineChartHome(dataX,dataY1,dataY2,dataY3){
         },
         series: [
             {
-                name: '合格率',
-                type: 'line',
-                // stack: '总量',
-                data: dataY1
-            },
-            {
-                name: '完整率',
+                name: lineType,
                 type: 'line',
                 // stack: '总量',
-                data: dataY2
+                data: dataY
             },
-            {
-                name: '完善率',
-                type: 'line',
-                // stack: '总量',
-                data: dataY3
-            }
+            // {
+            //     name: '完整率',
+            //     type: 'line',
+            //     // stack: '总量',
+            //     data: dataY2
+            // },
+            // {
+            //     name: '完善率',
+            //     type: 'line',
+            //     // stack: '总量',
+            //     data: dataY3
+            // }
         ]
     };   
     myCharts.setOption(option); 

+ 1 - 1
src/js/utils.js

@@ -2,7 +2,7 @@ const qs = require('qs');
 const $ = require("jquery");
 const axios = require("axios")
 var Utils = require('./rePromise');
-const baseUrl = "http://192.168.2.121:5858"
+const baseUrl = "http://192.168.2.236:5858"
 //页面映射
 const pageMap={
   'YH-KZT':'console.html',