|
@@ -7,7 +7,7 @@ require("../images/arrow_down.png")
|
|
|
// import 'zrender/lib/svg/svg';
|
|
|
const {api} = require('./api.js')
|
|
|
const echarts = require('echarts');
|
|
|
-const {post,setCookie,delCookie,getCookie,focusMenuItem} = require('../js/utils.js');
|
|
|
+const {post,setCookie,delCookie,getCookie,focusMenuItem,picEmptyData} = require('../js/utils.js');
|
|
|
let payMoney = [],dayLis = [],dateType = 2,slideType = 1,hospital=getCookie("hospital"),deptType="内科",deptId="";
|
|
|
$(function(){
|
|
|
if(!hasData('YH-KZT')){
|
|
@@ -52,38 +52,45 @@ $(function(){
|
|
|
return
|
|
|
}
|
|
|
slideType = 1
|
|
|
- $(".pubEchart .title").html("科室平均住院天数柱状图")
|
|
|
+ $(".pubEchart .title span").html("科室平均住院天数柱状图")
|
|
|
barChart(dayLis,dateType)
|
|
|
+ $(this).parent().slideToggle().prev().find("span").html(str)
|
|
|
}else if(type == 2){
|
|
|
if(!hasData('FUNC000046')){
|
|
|
return
|
|
|
}
|
|
|
slideType = 2
|
|
|
- $(".pubEchart .title").html("科室平均住院花费柱状图")
|
|
|
+ $(".pubEchart .title span").html("科室平均住院花费柱状图")
|
|
|
barChart(payMoney,dateType)
|
|
|
+ $(this).parent().slideToggle().prev().find("span").html(str)
|
|
|
}else if(type == 3){//科室平均分内科
|
|
|
if(!hasData('FUNC000091')){
|
|
|
return
|
|
|
}
|
|
|
deptType="内科"
|
|
|
getAverageScoreLis()
|
|
|
+ $(this).parent().slideToggle().prev().find("span").html(str+"系统")
|
|
|
}else if(type == 4){//科室平均分外科
|
|
|
if(!hasData('FUNC000091')){
|
|
|
return
|
|
|
}
|
|
|
deptType="外科"
|
|
|
getAverageScoreLis()
|
|
|
+ $(this).parent().slideToggle().prev().find("span").html(str+"系统")
|
|
|
}
|
|
|
- $(this).parent().slideToggle().prev().find("span").html(str)
|
|
|
})
|
|
|
getDetails()
|
|
|
getAverageScoreLis()
|
|
|
})
|
|
|
function getDetails(){
|
|
|
- $(".part02 .bingliLis,.part03 .circle .title,.pubEchartB.paymoney .title").click(function(){
|
|
|
+ $(".pubEchartB.paymoney .title").click(function(){
|
|
|
focusMenuItem("YH-ZKK-GKSQXZB_XQ");
|
|
|
$(parent.document).find("#contentIframe").attr("src","./deptScoreDetailControl.html?from=1&dateType="+dateType+"&deptType="+deptType)
|
|
|
})
|
|
|
+ $(".part02 .bingliLis,.part03 .circle .title").click(function(){
|
|
|
+ focusMenuItem("YH-ZKK-GKSQXZB_XQ");
|
|
|
+ $(parent.document).find("#contentIframe").attr("src","./deptScoreDetailControl.html?from=1&dateType="+dateType)
|
|
|
+ })
|
|
|
$(".part02").on("click",".bingli li.sec",function(){
|
|
|
focusMenuItem("YH-BLZK-ZKPF");
|
|
|
let dataC = $(this).attr("data-c")
|
|
@@ -129,7 +136,7 @@ function hasData(data){
|
|
|
}
|
|
|
function resizeBox(){
|
|
|
$(".partWrap").css({
|
|
|
- height:$(window).height()-44+'px'
|
|
|
+ height:$(window).height()-43+'px'
|
|
|
})
|
|
|
}
|
|
|
//所有数据切换日期筛选
|
|
@@ -314,42 +321,6 @@ function getBarData(type){
|
|
|
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)
|
|
|
}
|
|
|
})
|
|
@@ -399,6 +370,14 @@ function getBarData(type){
|
|
|
}
|
|
|
//part01
|
|
|
function personNum(data){
|
|
|
+ if(data['总人数']==0){
|
|
|
+ $(".chuyuan,.personNum").css("display","none")
|
|
|
+ picEmptyData(".chuyuanEmpty")
|
|
|
+ return
|
|
|
+ }else{
|
|
|
+ $(".chuyuanEmpty").css("display","none")
|
|
|
+ $(".chuyuan,.personNum").css("display","block")
|
|
|
+ }
|
|
|
$(".personNum").html("总人数:"+data['总人数'])
|
|
|
$(".died").html(data['死亡人数'])
|
|
|
$(".newborn").html(data['新生儿人数'])
|
|
@@ -407,7 +386,16 @@ function personNum(data){
|
|
|
//part02
|
|
|
function setNumDetail(data){
|
|
|
// console.log(data,2222222222)
|
|
|
- if(data.length == 0)return
|
|
|
+ if(data.length == 0){
|
|
|
+ $(".pingfendengji").css("display","block")
|
|
|
+ $(".bldjs").css("display","none")
|
|
|
+ picEmptyData(".pingfendengjiEmpty")
|
|
|
+ return
|
|
|
+ }else{
|
|
|
+ $(".bldjs").css("display","block")
|
|
|
+ $(".pingfendengji").css("display","none")
|
|
|
+
|
|
|
+ }
|
|
|
let str = ''
|
|
|
for(let i = 0;i < data.length;i++){
|
|
|
str += `
|
|
@@ -498,6 +486,14 @@ function part02pan(data,dom){
|
|
|
}
|
|
|
//折现图
|
|
|
function lineChart(dataX,dataY){
|
|
|
+ if(dataX.length==0&&dataY.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()
|
|
@@ -603,8 +599,15 @@ function lineChart(dataX,dataY){
|
|
|
}
|
|
|
|
|
|
function lineChartSpecial(dataX,dataY){
|
|
|
+ if(dataX.length==0&&dataY.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'));
|
|
|
- var lengthNum = dataX.length;
|
|
|
$(window).resize(function(){
|
|
|
myCharts.resize()
|
|
|
});
|
|
@@ -615,6 +618,10 @@ function lineChartSpecial(dataX,dataY){
|
|
|
position: 'right',
|
|
|
axisPointer: { // 坐标轴指示器,坐标轴触发有效
|
|
|
type: 'line' // 默认为直线,可选为:'line' | 'shadow'
|
|
|
+ },
|
|
|
+ formatter: function(param) {
|
|
|
+ return '<div style="color:#fff;">'+ param[0].name + "<br>" +'<i style="background:#37C4FC;margin-right:5px;display:inline-block;width:8px;height:8px;border-radius:50%"></i>病案首页合格率:'+ param[0].value+"%" + "<br>"
|
|
|
+ '</div>'
|
|
|
}
|
|
|
},
|
|
|
grid: {
|
|
@@ -695,9 +702,21 @@ function lineChartSpecial(dataX,dataY){
|
|
|
}
|
|
|
//柱状图住院费用
|
|
|
function barChartPay(dataX,dataY){
|
|
|
- // console.log(dataX,dataY)
|
|
|
+ // console.log(dataX,dataY,78787878)
|
|
|
+ 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")
|
|
|
+ }
|
|
|
var myCharts = echarts.init(document.getElementById('barChartPay'));
|
|
|
- var lengthNum = dataX.length;
|
|
|
$(window).resize(function(){
|
|
|
myCharts.resize()
|
|
|
});
|
|
@@ -788,7 +807,15 @@ function barChartPay(dataX,dataY){
|
|
|
}
|
|
|
//柱状图住院日期
|
|
|
function barChart(data,type){
|
|
|
- // console.log(data,type)
|
|
|
+ // console.log(data,type,78787888787787)
|
|
|
+ if(data.length==0){
|
|
|
+ $(".toggleSlide,#barChart").css("display","none")
|
|
|
+ picEmptyData('.barChartPayEmpty')
|
|
|
+ return
|
|
|
+ }else{
|
|
|
+ $(".toggleSlide,#barChart").css("display","block")
|
|
|
+ $(".barChartPayEmpty").css("display","none")
|
|
|
+ }
|
|
|
var myChart = echarts.init(document.getElementById('barChart'));
|
|
|
$(window).resize(function(){
|
|
|
myChart.resize()
|
|
@@ -1014,6 +1041,13 @@ function emptyCircle(data){
|
|
|
$(window).resize(function(){
|
|
|
myChart.resize()
|
|
|
});
|
|
|
+ if(data.length == 0){
|
|
|
+ $(".emptyCircleWrap").css("'display","none !important")
|
|
|
+ picEmptyData("#emptyCircleWrapEmpty")
|
|
|
+ }else{
|
|
|
+ $(".emptyCircleWrap").css("'display","block")
|
|
|
+ $(".console #emptyCircleWrapEmpty").html('')
|
|
|
+ }
|
|
|
let bgColor = '#203463';
|
|
|
let title = '总量';
|
|
|
let color = ['#F2637B','#975FE4', '#399FFF', '#37CBCB', '#4CCB73','#FAD336','#F2637B','#975FE4', '#399FFF', '#37CBCB', '#4CCB73','#FAD336'];
|
|
@@ -1104,6 +1138,13 @@ function emptyCircle(data){
|
|
|
myChart.setOption(option);
|
|
|
}
|
|
|
function emptyCircleB(data){
|
|
|
+ if(data.length == 0){
|
|
|
+ $(".emptyCircleBData,.emptyCircle").css("'display","none !important")
|
|
|
+ picEmptyData(".emptyCircleBWrap")
|
|
|
+ }else{
|
|
|
+ $(".emptyCircleBData").css("'display","block")
|
|
|
+ $(".emptyCircleBWrap").css("display","none")
|
|
|
+ }
|
|
|
var myChart = echarts.init(document.getElementById('emptyCircleB'));
|
|
|
$(window).resize(function(){
|
|
|
myChart.resize()
|
|
@@ -1204,6 +1245,15 @@ function queList(data){
|
|
|
<td class="td03">数量</td>
|
|
|
<td class="td04">占比</td>
|
|
|
</tr>`
|
|
|
+ if(data.length == 0){
|
|
|
+ $(".qtable").css("display","none")
|
|
|
+ picEmptyData(".qtableEmpty")
|
|
|
+ return
|
|
|
+ }else{
|
|
|
+ $(".qtableEmpty").css("display","none")
|
|
|
+ $(".qtable").css("display","table")
|
|
|
+
|
|
|
+ }
|
|
|
for(let i = 0;i < data.length;i++){
|
|
|
strAll += `
|
|
|
<tr>
|