Kaynağa Gözat

甲级病历占比

luolei 5 yıl önce
ebeveyn
işleme
a21b70e374
2 değiştirilmiş dosya ile 97 ekleme ve 97 silme
  1. 1 2
      src/html/console.html
  2. 96 95
      src/js/console.js

+ 1 - 2
src/html/console.html

@@ -19,7 +19,6 @@
   <div class="partTitleT"></div>
   <!--<div class="grayLine"></div>-->
   <div class="partWrap clearfix">
-
       <div class="part01 fl">
         <p class="partTitlePub clearfix" style="cursor: default;">
           <span class="name">出院人数统计</span>
@@ -124,7 +123,7 @@
       </div>
       <div class="part03 fl">
         <p class="partTitlePub clearfix">
-          <span class="name">各科室甲级病历占比</span> <img class="detailGo" src="../images/details.png" alt="">
+          <span class="name">病案首页合格率占比</span> <img class="detailGo" src="../images/details.png" alt="">
         </p>
         <div class="barChartLineBox">
           <div id="lineChart" class="barChartLine"></div>

+ 96 - 95
src/js/console.js

@@ -13,13 +13,13 @@ $(function(){
     if(!hasData('YH-KZT')){
         $("body").html('')
     }
-    if(hospital == "台州市立"){
-        $(".part03 .partTitlePub .name").html('各科室甲级病例占比')
-        $(".innerOuter").css("display","block")
-    }else{
-        $(".part03 .partTitlePub .name").html('病案首页合格率')
-        $(".innerOuter").css("display","none")
-    }
+    // if(hospital == "台州市立"){
+    //     $(".part03 .partTitlePub .name").html('各科室甲级病例占比')
+    //     $(".innerOuter").css("display","block")
+    // }else{
+    //     $(".part03 .partTitlePub .name").html('病案首页合格率')
+    //     $(".innerOuter").css("display","none")
+    // }
     $(".partTitle p span").html(hospital)
     setInterval(() => {
         getTimeDetail()
@@ -318,39 +318,39 @@ function getBarData(type){
     // }else{
     //     $(".toggleSlide2").css("opacity",0.5)
     // }
-    if(hasData('FUNC000048')&&hospital=="台州市立"){
-        post(api.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('FUNC000075')&&hospital=="长兴医院"){
-        post(api.homePageLevelLimit,{//病案首页
-            "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].deptName)
-                    dataY1.push(result1[i].firstLevelPercentStr.replace('%',''))
-                }
-                lineChartSpecial(dataX1,dataY1)
-            }
-        })
-    }
-    if(false){
+    // if(hasData('FUNC000048')&&hospital=="台州市立"){
+    //     post(api.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('FUNC000075')&&hospital=="长兴医院"){
+    //     post(api.homePageLevelLimit,{//病案首页
+    //         "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].deptName)
+    //                 dataY1.push(result1[i].firstLevelPercentStr.replace('%',''))
+    //             }
+    //             lineChartSpecial(dataX1,dataY1)
+    //         }
+    //     })
+    // }
+    if(true){
         post(api.homePageLevelLimit,{//病案首页
             "type": type||1//1月2年
         }).then((res)=>{
@@ -358,12 +358,11 @@ function getBarData(type){
             if(data.code == 0){
                 let result1 = data.data||[]
                 let dataX1=[],dataY1=[],dataY2=[],dataY3=[]
-                console.log(result1)
                 for(let i = 0;i < result1.length;i++){
                     dataX1.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)
+                    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)
             }
@@ -788,14 +787,14 @@ function lineChartSpecial(dataX,dataY){
 //折线图病案首页
 function lineChartHome(dataX,dataY1,dataY2,dataY3){
     console.log(dataX,dataY1,dataY2,dataY3)
-    // if(dataX.length==0&&dataY.length==0){
-    //     $(".barChartLine").css("display","none")
-    //     picEmptyData(".barChartLineEmpty")
-    //     return
-    // }else{
-        // $(".barChartLine").css("display","block")
-        // $(".barChartLineEmpty").css("display","none")
-    // }
+    if(dataX.length==0){
+        $(".barChartLine").css("display","none")
+        picEmptyData(".barChartLineEmpty")
+        return
+    }else{
+        $(".barChartLine").css("display","block")
+        $(".barChartLineEmpty").css("display","none")
+    }
     var myCharts = echarts.init(document.getElementById('lineChart'));
     $(window).resize(function(){
         myCharts.resize()
@@ -826,31 +825,31 @@ function lineChartHome(dataX,dataY1,dataY2,dataY3){
                 </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%',
@@ -885,6 +884,10 @@ function lineChartHome(dataX,dataY1,dataY2,dataY3){
         },
         yAxis: {
             type: 'value',
+            min:0,
+            boundaryGap: [0.01, 0.01],axisLabel: {  
+                show: true,  
+                },  
             axisLine: {//y轴
                 show: false
             },
@@ -894,7 +897,10 @@ function lineChartHome(dataX,dataY1,dataY2,dataY3){
             axisLabel: {//y轴刻度
                 textStyle: {
                     color: '#E9EBEF'
-                }
+                },
+                
+                interval: 'auto',  
+                formatter: '{value} %'  
             },
             splitLine:{//分割线
                 lineStyle:{
@@ -906,19 +912,19 @@ function lineChartHome(dataX,dataY1,dataY2,dataY3){
             {
                 name: '合格率',
                 type: 'line',
-                stack: '总量',
+                // stack: '总量',
                 data: dataY1
             },
             {
                 name: '完整率',
                 type: 'line',
-                stack: '总量',
+                // stack: '总量',
                 data: dataY2
             },
             {
                 name: '完善率',
                 type: 'line',
-                stack: '总量',
+                // stack: '总量',
                 data: dataY3
             }
         ]
@@ -1032,20 +1038,15 @@ function barChartPay(dataX,dataY){
 }
 //柱状图住院日期
 function barChartLevel(dataX,dataY){
-    console.log(dataX,dataY,7887878787)
-    // if(dataX.length==0&&dataY.length==0){
-    //     $("#barChartPay,.innerOuter").css("display","none")
-    //     picEmptyData('.barChartPayEmptys')
-    //     return
-    // }else{
-    //     if(hospital == "台州市立"){
-    //         $(".innerOuter").css("display","block")
-    //     }else{
-    //         $(".innerOuter").css("display","none")
-    //     }
-    //     $("#barChartPay").css("display","block")
-    //     $(".barChartPayEmptys").css("display","none")
-    // }
+    // console.log(dataX,dataY,7887878787)
+    if(dataX.length==0&&dataY.length==0){
+        $("#barChart,.innerOuter").css("display","none")
+        picEmptyData('.barChartPayEmpty')
+        return
+    }else{
+        $("#barChart").css("display","block")
+        $(".barChartPayEmpty").css("display","none")
+    }
     var myCharts = echarts.init(document.getElementById('barChart'));
     $(window).resize(function(){
         myCharts.resize()