|
@@ -7,7 +7,7 @@ require("../images/arrow_down.png")
|
|
// import 'zrender/lib/svg/svg';
|
|
// import 'zrender/lib/svg/svg';
|
|
const {api} = require('./api.js')
|
|
const {api} = require('./api.js')
|
|
const echarts = require('echarts');
|
|
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="";
|
|
let payMoney = [],dayLis = [],dateType = 2,slideType = 1,hospital=getCookie("hospital"),deptType="内科",deptId="";
|
|
$(function(){
|
|
$(function(){
|
|
if(!hasData('YH-KZT')){
|
|
if(!hasData('YH-KZT')){
|
|
@@ -52,14 +52,14 @@ $(function(){
|
|
return
|
|
return
|
|
}
|
|
}
|
|
slideType = 1
|
|
slideType = 1
|
|
- $(".pubEchart .title").html("科室平均住院天数柱状图")
|
|
|
|
|
|
+ $(".pubEchart .title sppan").html("科室平均住院天数柱状图")
|
|
barChart(dayLis,dateType)
|
|
barChart(dayLis,dateType)
|
|
}else if(type == 2){
|
|
}else if(type == 2){
|
|
if(!hasData('FUNC000046')){
|
|
if(!hasData('FUNC000046')){
|
|
return
|
|
return
|
|
}
|
|
}
|
|
slideType = 2
|
|
slideType = 2
|
|
- $(".pubEchart .title").html("科室平均住院花费柱状图")
|
|
|
|
|
|
+ $(".pubEchart .title span").html("科室平均住院花费柱状图")
|
|
barChart(payMoney,dateType)
|
|
barChart(payMoney,dateType)
|
|
}else if(type == 3){//科室平均分内科
|
|
}else if(type == 3){//科室平均分内科
|
|
if(!hasData('FUNC000091')){
|
|
if(!hasData('FUNC000091')){
|
|
@@ -129,7 +129,7 @@ function hasData(data){
|
|
}
|
|
}
|
|
function resizeBox(){
|
|
function resizeBox(){
|
|
$(".partWrap").css({
|
|
$(".partWrap").css({
|
|
- height:$(window).height()-44+'px'
|
|
|
|
|
|
+ height:$(window).height()-43+'px'
|
|
})
|
|
})
|
|
}
|
|
}
|
|
//所有数据切换日期筛选
|
|
//所有数据切换日期筛选
|
|
@@ -314,42 +314,6 @@ function getBarData(type){
|
|
let data = res.data
|
|
let data = res.data
|
|
if(data.code == 0){
|
|
if(data.code == 0){
|
|
let result3 = data.data['病历数统计']||[]
|
|
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)
|
|
setNumDetail(result3)
|
|
}
|
|
}
|
|
})
|
|
})
|
|
@@ -399,6 +363,14 @@ function getBarData(type){
|
|
}
|
|
}
|
|
//part01
|
|
//part01
|
|
function personNum(data){
|
|
function personNum(data){
|
|
|
|
+ if(data['总人数']==0){
|
|
|
|
+ $(".chuyuan").css("display","none")
|
|
|
|
+ picEmptyData(".chuyuanEmpty")
|
|
|
|
+ return
|
|
|
|
+ }else{
|
|
|
|
+ $(".chuyuanEmpty").css("display","none")
|
|
|
|
+ $(".chuyuan").css("display","block")
|
|
|
|
+ }
|
|
$(".personNum").html("总人数:"+data['总人数'])
|
|
$(".personNum").html("总人数:"+data['总人数'])
|
|
$(".died").html(data['死亡人数'])
|
|
$(".died").html(data['死亡人数'])
|
|
$(".newborn").html(data['新生儿人数'])
|
|
$(".newborn").html(data['新生儿人数'])
|
|
@@ -407,7 +379,16 @@ function personNum(data){
|
|
//part02
|
|
//part02
|
|
function setNumDetail(data){
|
|
function setNumDetail(data){
|
|
// console.log(data,2222222222)
|
|
// 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 = ''
|
|
let str = ''
|
|
for(let i = 0;i < data.length;i++){
|
|
for(let i = 0;i < data.length;i++){
|
|
str += `
|
|
str += `
|
|
@@ -498,6 +479,15 @@ function part02pan(data,dom){
|
|
}
|
|
}
|
|
//折现图
|
|
//折现图
|
|
function lineChart(dataX,dataY){
|
|
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'));
|
|
var myCharts = echarts.init(document.getElementById('lineChart'));
|
|
$(window).resize(function(){
|
|
$(window).resize(function(){
|
|
myCharts.resize()
|
|
myCharts.resize()
|
|
@@ -603,8 +593,15 @@ function lineChart(dataX,dataY){
|
|
}
|
|
}
|
|
|
|
|
|
function lineChartSpecial(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 myCharts = echarts.init(document.getElementById('lineChart'));
|
|
- var lengthNum = dataX.length;
|
|
|
|
$(window).resize(function(){
|
|
$(window).resize(function(){
|
|
myCharts.resize()
|
|
myCharts.resize()
|
|
});
|
|
});
|
|
@@ -695,9 +692,16 @@ function lineChartSpecial(dataX,dataY){
|
|
}
|
|
}
|
|
//柱状图住院费用
|
|
//柱状图住院费用
|
|
function barChartPay(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{
|
|
|
|
+ $("#barChartPay,.innerOuter").css("display","block")
|
|
|
|
+ $(".barChartPayEmptys").css("display","none")
|
|
|
|
+ }
|
|
var myCharts = echarts.init(document.getElementById('barChartPay'));
|
|
var myCharts = echarts.init(document.getElementById('barChartPay'));
|
|
- var lengthNum = dataX.length;
|
|
|
|
$(window).resize(function(){
|
|
$(window).resize(function(){
|
|
myCharts.resize()
|
|
myCharts.resize()
|
|
});
|
|
});
|
|
@@ -788,7 +792,15 @@ function barChartPay(dataX,dataY){
|
|
}
|
|
}
|
|
//柱状图住院日期
|
|
//柱状图住院日期
|
|
function barChart(data,type){
|
|
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'));
|
|
var myChart = echarts.init(document.getElementById('barChart'));
|
|
$(window).resize(function(){
|
|
$(window).resize(function(){
|
|
myChart.resize()
|
|
myChart.resize()
|
|
@@ -1014,6 +1026,13 @@ function emptyCircle(data){
|
|
$(window).resize(function(){
|
|
$(window).resize(function(){
|
|
myChart.resize()
|
|
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 bgColor = '#203463';
|
|
let title = '总量';
|
|
let title = '总量';
|
|
let color = ['#F2637B','#975FE4', '#399FFF', '#37CBCB', '#4CCB73','#FAD336','#F2637B','#975FE4', '#399FFF', '#37CBCB', '#4CCB73','#FAD336'];
|
|
let color = ['#F2637B','#975FE4', '#399FFF', '#37CBCB', '#4CCB73','#FAD336','#F2637B','#975FE4', '#399FFF', '#37CBCB', '#4CCB73','#FAD336'];
|
|
@@ -1104,6 +1123,13 @@ function emptyCircle(data){
|
|
myChart.setOption(option);
|
|
myChart.setOption(option);
|
|
}
|
|
}
|
|
function emptyCircleB(data){
|
|
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'));
|
|
var myChart = echarts.init(document.getElementById('emptyCircleB'));
|
|
$(window).resize(function(){
|
|
$(window).resize(function(){
|
|
myChart.resize()
|
|
myChart.resize()
|
|
@@ -1204,6 +1230,15 @@ function queList(data){
|
|
<td class="td03">数量</td>
|
|
<td class="td03">数量</td>
|
|
<td class="td04">占比</td>
|
|
<td class="td04">占比</td>
|
|
</tr>`
|
|
</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++){
|
|
for(let i = 0;i < data.length;i++){
|
|
strAll += `
|
|
strAll += `
|
|
<tr>
|
|
<tr>
|