|
@@ -15,6 +15,7 @@ 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")
|
|
|
$(function(){
|
|
|
if(!hasData('YH-KZT')){
|
|
@@ -144,8 +145,13 @@ function getDetails(dateType){
|
|
|
// 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)
|
|
|
+ }
|
|
|
})
|
|
|
$(".paymoney.pubEchart .title").click(function(){
|
|
|
// if($(this).text().indexOf("花费")!==-1){
|
|
@@ -348,40 +354,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 +461,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,
|
|
@@ -846,21 +876,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 +920,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 +928,7 @@ function lineChartSpecial(dataX,dataY){
|
|
|
left: '3%',
|
|
|
right: '4%',
|
|
|
bottom: '3%',
|
|
|
+ top:dom == 'chuyuan'?'25':'45',
|
|
|
containLabel: true
|
|
|
},
|
|
|
xAxis: [
|
|
@@ -892,7 +945,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 +983,8 @@ function lineChartSpecial(dataX,dataY){
|
|
|
|
|
|
],
|
|
|
title:[{
|
|
|
- text: '合格率',
|
|
|
- top: 15,
|
|
|
+ text: '数量',
|
|
|
+ top: dom == 'chuyuan'?0:10,
|
|
|
left: 10,
|
|
|
textStyle: {
|
|
|
fontSize: 14,
|