|
@@ -15,11 +15,30 @@ require('./../resource/jquery-ui/jquery-ui.min.css');
|
|
|
const {post,setCookie,delCookie,getCookie,focusMenuItem,picEmptyData, initScroll,listenScroll} = require('../js/utils.js');
|
|
|
const { get } = require('jquery');
|
|
|
let payMoney = [],behosDateStart="",ownSelectDate='',behosDateEnd="",dayLis = [],dateType = 2,slideType = 1,hospital=getCookie("hospital"),deptType="内科",deptId="",level="甲",lineType="all",lineType1=[],lineType2=[],lineType3=[],lineType4=[];
|
|
|
+let isPlacefile = getCookie('isPlacefile')||1
|
|
|
listenScroll(".partWrap")
|
|
|
+if(isPlacefile == 1){
|
|
|
+ $(".part01 .partTitlePub").css('cursor','default')
|
|
|
+ $(".part01 .partTitlePub img").css('display','none')
|
|
|
+}else{
|
|
|
+ $(".part01 .partTitlePub img").css('display','inline-block')
|
|
|
+ $(".part01 .partTitlePub").css('cursor','pointer')
|
|
|
+}
|
|
|
$(function(){
|
|
|
if(!hasData('YH-KZT')){
|
|
|
$("body").html('')
|
|
|
}
|
|
|
+
|
|
|
+ const firstM = $(".menu .page",parent.document).eq(0);
|
|
|
+ $('.page',parent.document).removeClass("active")
|
|
|
+ firstM.addClass("active");
|
|
|
+ if(firstM.is(".YH-KZT")||firstM.is(".YH-KZTKS")){
|
|
|
+ $(".container",parent.document).addClass("console-cont");
|
|
|
+ $('.qiehuan',parent.document).css("display","inline-block")
|
|
|
+ }else{
|
|
|
+ $('.qiehuan',parent.document).css("display","none")
|
|
|
+ }
|
|
|
+
|
|
|
// if(hospital == "台州市立"){
|
|
|
// $(".part03 .partTitlePub .name").html('各科室甲级病例占比')
|
|
|
// $(".innerOuter").css("display","block")
|
|
@@ -33,15 +52,16 @@ $(function(){
|
|
|
// getBarData(2)//图标数据获取
|
|
|
dateChange()
|
|
|
$(window).resize(function(){
|
|
|
+ console.log('窗口大小改变');
|
|
|
resizeBox()
|
|
|
})
|
|
|
$(window).click(function(){
|
|
|
window.parent.userActionHide()
|
|
|
- $(".toggleSlide ul").css("display","none")
|
|
|
+ $(".part02 .toggleSlide ul").css("display","none")
|
|
|
})
|
|
|
let sildeIS = true
|
|
|
if(!hasData('FUNC000045')&&!hasData('FUNC000046')){
|
|
|
- $(".toggleSlide").css("opacity","0.5")
|
|
|
+ $(".part02 .toggleSlide").css("opacity","0.5")
|
|
|
sildeIS = false
|
|
|
}
|
|
|
$(".toggleSlide p").click(function(e){
|
|
@@ -137,15 +157,19 @@ function getDetails(dateType){
|
|
|
$(parent.document).find("#contentIframe").attr("src","./qcList.html?from=1&dateType="+dateType+"&chengdu="+chengdu+"&startDateParam="+behosDateStart+"&endDateParam="+behosDateEnd)
|
|
|
})
|
|
|
$(".part03 .partTitlePub").click(function(){
|
|
|
- // if(hospital=="台州市立"){
|
|
|
- // focusMenuItem("YH-ZKK-GKSJJBLZB_XQ")
|
|
|
- // $(parent.document).find("#contentIframe").attr("src","./jiaji.html?from=1&dateType="+dateType)
|
|
|
- // }else{
|
|
|
- // 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+"&lineType="+lineType+"&startDateParam="+behosDateStart+"&endDateParam="+behosDateEnd)
|
|
|
+ if(isPlacefile == 1){
|
|
|
+ focusMenuItem("YH-ZKK-BASYHGLZB_XQ");
|
|
|
+ $(parent.document).find("#contentIframe").attr("src","./partDetailControl.html?from=1&dateType="+dateType+"&lineType="+lineType+"&startDateParam="+behosDateStart+"&endDateParam="+behosDateEnd)
|
|
|
+ }else{
|
|
|
+ focusMenuItem("YH-ZKK-WZGBLTJ");
|
|
|
+ $(parent.document).find("#contentIframe").attr("src","./uncorrectedCasesStatistics.html?from=1&dateType="+dateType+"&lineType="+lineType+"&startDateParam="+behosDateStart+"&endDateParam="+behosDateEnd)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ $(".part01 .partTitlePub").click(function(){
|
|
|
+ if(isPlacefile == 0){
|
|
|
+ focusMenuItem("YH-ZKK-RYRSTJ");
|
|
|
+ $(parent.document).find("#contentIframe").attr("src","./qcListOutHospital.html?inner=2&from=1&dateType="+dateType+"&lineType="+lineType+"&startDateParam="+behosDateStart+"&endDateParam="+behosDateEnd)
|
|
|
+ }
|
|
|
})
|
|
|
$(".paymoney.pubEchart .title").click(function(){
|
|
|
// if($(this).text().indexOf("花费")!==-1){
|
|
@@ -348,40 +372,61 @@ function getHomeData(name){
|
|
|
// lineChartHome(dataX,datay)
|
|
|
// }
|
|
|
// })
|
|
|
- post(api.homePageMRCount,{//病案首页
|
|
|
- "type": dateType||2,//1月2年
|
|
|
- "startDate":behosDateStart,
|
|
|
- "endDate":behosDateEnd,
|
|
|
- }).then((res)=>{
|
|
|
- let data = res.data;
|
|
|
- if(data.code == 0){
|
|
|
- let result1 = data.data||[]
|
|
|
- let data1=result1['合格率'],data2=result1['完整率'],data3=result1['改善率'],tmp1=[],tmp2=[],tmp3=[]
|
|
|
- // console.log("data1",data1)
|
|
|
- if(data1&&data1.totleNum == 0){
|
|
|
-
|
|
|
- $(".binganshouye").css("display","block")
|
|
|
- $(".bldjss").css("display","none")
|
|
|
- picEmptyData(".binganshouyeEmpty")
|
|
|
- return
|
|
|
- }else{
|
|
|
- $(".bldjss").css("display","block")
|
|
|
- $(".binganshouye").css("display","none")
|
|
|
+ if(isPlacefile == '0'){
|
|
|
+ // $('.bldjss').html('')
|
|
|
+ $(".part03 .partTitlePub .name").html('入院记录24h内未完成')
|
|
|
+ post(api.casesEntryStatisticsById,{
|
|
|
+ startDate:behosDateStart, //起始时间
|
|
|
+ endDate:behosDateEnd, //截止时间
|
|
|
+ }).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].name)
|
|
|
+ dataY1.push(result1[i].num)
|
|
|
+ }
|
|
|
+ lineChartSpecial(dataX1,dataY1,'bldjss')
|
|
|
}
|
|
|
- data1.value = data1.num
|
|
|
- tmp1.push(data1)
|
|
|
- tmp1.push({percentStr:(1-data1.percent)*100+'%',value:data1.totleNum - data1.num})
|
|
|
- part03pan(tmp1,'fen05')
|
|
|
- data2.value = data2.num
|
|
|
- tmp2.push(data2)
|
|
|
- tmp2.push({percentStr:(1-data2.percent)*100+'%',value:data2.totleNum - data2.num})
|
|
|
- part03pan(tmp2,'fen06')
|
|
|
- data3.value = data3.num
|
|
|
- tmp3.push(data3)
|
|
|
- tmp3.push({percentStr:(1-data3.percent)*100+'%',value:data3.totleNum - data3.num})
|
|
|
- part03pan(tmp3,'fen07')
|
|
|
- }
|
|
|
- })
|
|
|
+ })
|
|
|
+ }else{
|
|
|
+ post(api.homePageMRCount,{//病案首页
|
|
|
+ "type": dateType||2,//1月2年
|
|
|
+ "startDate":behosDateStart,
|
|
|
+ "endDate":behosDateEnd,
|
|
|
+ }).then((res)=>{
|
|
|
+ let data = res.data;
|
|
|
+ if(data.code == 0){
|
|
|
+ let result1 = data.data||[]
|
|
|
+ let data1=result1['合格率'],data2=result1['完整率'],data3=result1['改善率'],tmp1=[],tmp2=[],tmp3=[]
|
|
|
+ // console.log("data1",data1)
|
|
|
+ if(data1&&data1.totleNum == 0){
|
|
|
+
|
|
|
+ $(".binganshouye").css("display","block")
|
|
|
+ $(".bldjss").css("display","none")
|
|
|
+ picEmptyData(".binganshouyeEmpty")
|
|
|
+ return
|
|
|
+ }else{
|
|
|
+ $(".bldjss").css("display","block")
|
|
|
+ $(".binganshouye").css("display","none")
|
|
|
+ }
|
|
|
+ data1.value = data1.num
|
|
|
+ tmp1.push(data1)
|
|
|
+ tmp1.push({percentStr:(1-data1.percent)*100+'%',value:data1.totleNum - data1.num})
|
|
|
+ part03pan(tmp1,'fen05')
|
|
|
+ data2.value = data2.num
|
|
|
+ tmp2.push(data2)
|
|
|
+ tmp2.push({percentStr:(1-data2.percent)*100+'%',value:data2.totleNum - data2.num})
|
|
|
+ part03pan(tmp2,'fen06')
|
|
|
+ data3.value = data3.num
|
|
|
+ tmp3.push(data3)
|
|
|
+ tmp3.push({percentStr:(1-data3.percent)*100+'%',value:data3.totleNum - data3.num})
|
|
|
+ part03pan(tmp3,'fen07')
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+
|
|
|
// }
|
|
|
}
|
|
|
//获取图表数据
|
|
@@ -434,23 +479,26 @@ function getBarData(type){
|
|
|
// }
|
|
|
// })
|
|
|
// }
|
|
|
- // 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(hasData('FUNC000049')){
|
|
|
+
|
|
|
+ if(isPlacefile==0){
|
|
|
+ $(".part01 .partTitlePub .name").html('入院人数统计')
|
|
|
+ post(api.beHosCount,{
|
|
|
+ startDate:behosDateStart, //起始时间
|
|
|
+ endDate:behosDateEnd, //截止时间
|
|
|
+ }).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].name)
|
|
|
+ dataY1.push(result1[i].num)
|
|
|
+ }
|
|
|
+ $(".personNum").html("总人数:"+dataY1[0]).parent(".chuyuannum").attr("data-num",'全部')
|
|
|
+ lineChartSpecial(dataX1,dataY1,'chuyuan')
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }else if(hasData('FUNC000049')&&isPlacefile==1){
|
|
|
post(api.leaveHosCount,{//出院人数统计
|
|
|
"type": type||1,//1月2年
|
|
|
"startDate":behosDateStart,
|
|
@@ -554,6 +602,32 @@ function personNum(data){
|
|
|
$(".chuyuanEmpty").css("display","none")
|
|
|
$(".chuyuan,.personNum").css("display","block")
|
|
|
}
|
|
|
+ $('.chuyuan').html(`
|
|
|
+ <ul class="clearfix" style="cursor: default;">
|
|
|
+ <li class="topLis chuyuannum" data-type="1">
|
|
|
+ <p class="numShow died"></p>
|
|
|
+ <p class="explainNum">死亡人数</p>
|
|
|
+ </li>
|
|
|
+ <li class="li02 topLis chuyuannum" data-type="2">
|
|
|
+ <p class="numShow newborn"></p>
|
|
|
+ <p class="explainNum">新生儿患者</p>
|
|
|
+ </li>
|
|
|
+ <li class="li03 topLis chuyuannum" data-type="3">
|
|
|
+ <p class="numShow patientNum"></p>
|
|
|
+ <p class="explainNum">手术病人数</p>
|
|
|
+ </li>
|
|
|
+ <li class="li04 chuyuannum" data-type="4">
|
|
|
+ <p class="numShow goAwayNum"></p>
|
|
|
+ <p class="explainNum">非医嘱离院病人数</p>
|
|
|
+ </li>
|
|
|
+ <li class="li04 li04again" data-type="5">
|
|
|
+ <p class="numShow againNum"></p>
|
|
|
+ <p class="explainNum">31日再入院病人数</p>
|
|
|
+ </li>
|
|
|
+ </ul>
|
|
|
+
|
|
|
+ `)
|
|
|
+ $('.part01 .partTitlePub .name').text('出院人数统计')
|
|
|
$(".personNum").html("总人数:"+data['总人数']).parent(".chuyuannum").attr("data-num",'全部')
|
|
|
$(".died").html(data['死亡人数']).parent(".chuyuannum").attr("data-num",'死亡人数')
|
|
|
$(".newborn").html(data['新生儿人数']).parent(".chuyuannum").attr("data-num",'新生儿患者')
|
|
@@ -846,21 +920,43 @@ function lineChart(dataX,dataY){
|
|
|
myCharts.setOption(option);
|
|
|
}
|
|
|
|
|
|
-function lineChartSpecial(dataX,dataY){
|
|
|
- if(dataX.length==0&&dataY.length==0){
|
|
|
- $(".barChartLine").css("display","none")
|
|
|
- picEmptyData(".barChartLineEmpty")
|
|
|
- return
|
|
|
+function lineChartSpecial(dataX,dataY,dom){
|
|
|
+ // if(dataX.length==0&&dataY.length==0){
|
|
|
+ // $(".barChartLine").css("display","none")
|
|
|
+ // picEmptyData(".barChartLineEmpty")
|
|
|
+ // return
|
|
|
+ // }else{
|
|
|
+ // $(".barChartLine").css("display","block")
|
|
|
+ // $(".barChartLineEmpty").css("display","none")
|
|
|
+ // }
|
|
|
+ if(dom == 'chuyuan'){
|
|
|
+ if(dataX.length==0){
|
|
|
+ $(".chuyuan,.personNum").css("display","none")
|
|
|
+ picEmptyData(".chuyuanEmpty")
|
|
|
+ return
|
|
|
+ }else{
|
|
|
+ $(".chuyuanEmpty").css("display","none")
|
|
|
+ $(".chuyuan,.personNum").css("display","block")
|
|
|
+ }
|
|
|
}else{
|
|
|
- $(".barChartLine").css("display","block")
|
|
|
- $(".barChartLineEmpty").css("display","none")
|
|
|
+ if(dataX.length==0){
|
|
|
+ $(".binganshouye").css("display","block")
|
|
|
+ $(".bldjss").css("display","none")
|
|
|
+ picEmptyData(".binganshouyeEmpty")
|
|
|
+ return
|
|
|
+ }else{
|
|
|
+ $(".bldjss").css("display","block")
|
|
|
+ $(".binganshouye").css("display","none")
|
|
|
+ }
|
|
|
}
|
|
|
- var myCharts = echarts.init(document.getElementById('lineChart'));
|
|
|
+ // console.log(999,dataX,dataY,dom)
|
|
|
+
|
|
|
+ var myCharts = echarts.init(document.getElementById(dom));
|
|
|
$(window).resize(function(){
|
|
|
myCharts.resize()
|
|
|
});
|
|
|
option = {
|
|
|
- color: ['#37C4FC'],
|
|
|
+ color: dom=='chuyuan'?['#37CBCB']:['#37C4FC'],
|
|
|
tooltip: {
|
|
|
trigger: 'axis',
|
|
|
position: 'right',
|
|
@@ -868,7 +964,7 @@ function lineChartSpecial(dataX,dataY){
|
|
|
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>"
|
|
|
+ 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>'+(dom=="chuyuan"?"入院人数:":"入院记录24h内未完成:")+ param[0].value+ "<br>"
|
|
|
'</div>'
|
|
|
}
|
|
|
},
|
|
@@ -876,6 +972,7 @@ function lineChartSpecial(dataX,dataY){
|
|
|
left: '3%',
|
|
|
right: '4%',
|
|
|
bottom: '3%',
|
|
|
+ top:dom == 'chuyuan'?'25':'45',
|
|
|
containLabel: true
|
|
|
},
|
|
|
xAxis: [
|
|
@@ -892,7 +989,9 @@ function lineChartSpecial(dataX,dataY){
|
|
|
rotate:45,
|
|
|
formatter: function (value) {
|
|
|
//x轴的文字改为竖版显示
|
|
|
- if(value.length>7){
|
|
|
+ if(dom == 'chuyuan'&&value.length>3){
|
|
|
+ return value.slice(0,3)+'...'
|
|
|
+ }else if(value.length>7){
|
|
|
return value.slice(0,7)+'...'
|
|
|
}
|
|
|
return value;
|
|
@@ -928,8 +1027,8 @@ function lineChartSpecial(dataX,dataY){
|
|
|
|
|
|
],
|
|
|
title:[{
|
|
|
- text: '合格率',
|
|
|
- top: 15,
|
|
|
+ text: '数量',
|
|
|
+ top: dom == 'chuyuan'?0:10,
|
|
|
left: 10,
|
|
|
textStyle: {
|
|
|
fontSize: 14,
|
|
@@ -1096,15 +1195,17 @@ function lineChartHome(dataX,dataY){
|
|
|
}
|
|
|
//柱状图住院费用
|
|
|
function barChartPay(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 == "台州市立"){
|
|
|
+ if(getCookie("hospital") == "台州市立"){
|
|
|
+ console.log($(".innerOuter")[0],88989898)
|
|
|
+
|
|
|
$(".innerOuter").css("display","block")
|
|
|
}else{
|
|
|
+ console.log($(".innerOuter")[0])
|
|
|
$(".innerOuter").css("display","none")
|
|
|
}
|
|
|
$("#barChartPay").css("display","block")
|
|
@@ -1203,14 +1304,16 @@ function barChartPay(dataX,dataY){
|
|
|
function barChartLevel(dataX,dataY){
|
|
|
// console.log(dataX,dataY,7887878787)
|
|
|
if(dataX.length==0&&dataY.length==0){
|
|
|
- $("#barChart,.toggleSlide").css("display","none")
|
|
|
+ $("#barChart,.part02 .toggleSlide").css("display","none")
|
|
|
picEmptyData('.barChartPayEmpty')
|
|
|
- return
|
|
|
}else{
|
|
|
- $("#barChart,.toggleSlide").css("display","block")
|
|
|
+ // $("#barChart,.part02 .toggleSlide").css("display","block")
|
|
|
+ $("#barChart,.part02 .toggleSlide").show()
|
|
|
$(".barChartPayEmpty").css("display","none")
|
|
|
}
|
|
|
var myCharts = echarts.init(document.getElementById('barChart'));
|
|
|
+ // console.log(myCharts,'myCharts');
|
|
|
+ setTimeout(function () { myCharts.resize()},0) // 处理 #5737bug,暂时处理方法,需后续优化
|
|
|
$(window).resize(function(){
|
|
|
myCharts.resize()
|
|
|
});
|
|
@@ -1305,16 +1408,17 @@ function barChartLevel(dataX,dataY){
|
|
|
}
|
|
|
]
|
|
|
};
|
|
|
+ // setTimeout(function () { myCharts.setOption(option);},200)
|
|
|
myCharts.setOption(option);
|
|
|
}
|
|
|
function barChart(data,type){
|
|
|
// console.log(data,type,78787888787787)
|
|
|
if(data.length==0){
|
|
|
- $(".toggleSlide,#barChart").css("display","none")
|
|
|
+ $(".part02 .toggleSlide,#barChart").css("display","none")
|
|
|
picEmptyData('.barChartPayEmpty')
|
|
|
return
|
|
|
}else{
|
|
|
- $(".toggleSlide,#barChart").css("display","block")
|
|
|
+ $(".part02 .toggleSlide,#barChart").css("display","block")
|
|
|
$(".barChartPayEmpty").css("display","none")
|
|
|
}
|
|
|
var myChart = echarts.init(document.getElementById('barChart'));
|