|
@@ -8,7 +8,7 @@ require("../images/arrow_down.png")
|
|
|
const {api} = require('./api.js')
|
|
|
const echarts = require('echarts');
|
|
|
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="",level="甲";
|
|
|
$(function(){
|
|
|
if(!hasData('YH-KZT')){
|
|
|
$("body").html('')
|
|
@@ -48,20 +48,34 @@ $(function(){
|
|
|
$(".toggleSlide li").click(function(){
|
|
|
let str = $(this).attr("data-str"),type = $(this).attr("data-type")
|
|
|
if(type == 1){
|
|
|
- if(!hasData('FUNC000045')){
|
|
|
- return
|
|
|
- }
|
|
|
+ // if(!hasData('FUNC000045')){
|
|
|
+ // return
|
|
|
+ // }
|
|
|
slideType = 1
|
|
|
- $(".pubEchart .title span").html("科室平均住院天数柱状图")
|
|
|
- barChart(dayLis,dateType)
|
|
|
+ level = "甲"
|
|
|
+ getEveryDeptLevel()
|
|
|
+ // $(".pubEchart .title span").html("科室平均住院天数柱状图")
|
|
|
+ // barChart(dayLis,dateType)
|
|
|
$(this).parent().slideToggle().prev().find("span").html(str)
|
|
|
}else if(type == 2){
|
|
|
- if(!hasData('FUNC000046')){
|
|
|
- return
|
|
|
- }
|
|
|
+ // if(!hasData('FUNC000046')){
|
|
|
+ // return
|
|
|
+ // }
|
|
|
slideType = 2
|
|
|
- $(".pubEchart .title span").html("科室平均住院花费柱状图")
|
|
|
- barChart(payMoney,dateType)
|
|
|
+ level = "乙"
|
|
|
+ getEveryDeptLevel()
|
|
|
+ // $(".pubEchart .title span").html("科室平均住院花费柱状图")
|
|
|
+ // barChart(payMoney,dateType)
|
|
|
+ $(this).parent().slideToggle().prev().find("span").html(str)
|
|
|
+ }else if(type == 6){
|
|
|
+ // if(!hasData('FUNC000046')){
|
|
|
+ // return
|
|
|
+ // }
|
|
|
+ slideType = 6
|
|
|
+ level = "丙"
|
|
|
+ getEveryDeptLevel()
|
|
|
+ // $(".pubEchart .title span").html("科室平均住院花费柱状图")
|
|
|
+ // barChart(payMoney,dateType)
|
|
|
$(this).parent().slideToggle().prev().find("span").html(str)
|
|
|
}else if(type == 3){//科室平均分内科
|
|
|
if(!hasData('FUNC000091')){
|
|
@@ -87,6 +101,7 @@ $(function(){
|
|
|
})
|
|
|
getDetails()
|
|
|
getAverageScoreLis()
|
|
|
+ getEveryDeptLevel()
|
|
|
})
|
|
|
function getDetails(){
|
|
|
$(".pubEchartB.paymoney .title").click(function(){
|
|
@@ -121,7 +136,7 @@ function getDetails(){
|
|
|
$(parent.document).find("#contentIframe").attr("src","./dayDetail.html?from=1&dateType="+dateType)
|
|
|
}
|
|
|
})
|
|
|
- $(".defect .partTitlePub").click(function(){//from 1 console / 2 deptConsole
|
|
|
+ $(".defect .partTitlePub").click(function(){ //from 1 console / 2 deptConsole
|
|
|
focusMenuItem("YH-ZKK-GMKQXZB_XQ");
|
|
|
$(parent.document).find("#contentIframe").attr("src","./mukuaiControl.html?from=1&dateType="+dateType)
|
|
|
})
|
|
@@ -241,15 +256,16 @@ function getAverageScoreLis(){
|
|
|
}
|
|
|
})
|
|
|
}
|
|
|
-//获取图表数据
|
|
|
-function getBarData(type){
|
|
|
- if(hasData('FUNC000045')){
|
|
|
- post(api.getAverageDayNum,{//平均住院天数
|
|
|
- "type": type||1//1月2年
|
|
|
+//获取各科室病历等级占比
|
|
|
+function getEveryDeptLevel(){
|
|
|
+ if(1){
|
|
|
+ post(api.qcResultLevelPercent,{//各科室病历等级占比
|
|
|
+ "type": dateType||2,//1月2年
|
|
|
+ "level":level
|
|
|
}).then((res)=>{
|
|
|
let data = res.data;
|
|
|
if(data.code == 0){
|
|
|
- let result2 = data.data['平均住院日']||[]
|
|
|
+ let result2 = data.data||[]
|
|
|
dayLis = result2
|
|
|
if(slideType == 1){
|
|
|
barChart(result2,type||1)
|
|
@@ -259,6 +275,25 @@ function getBarData(type){
|
|
|
}else{
|
|
|
$(".toggleSlide1").css("opacity",0.5)
|
|
|
}
|
|
|
+}
|
|
|
+//获取图表数据
|
|
|
+function getBarData(type){
|
|
|
+ // if(hasData('FUNC000045')){
|
|
|
+ // post(api.getAverageDayNum,{//平均住院天数
|
|
|
+ // "type": type||1//1月2年
|
|
|
+ // }).then((res)=>{
|
|
|
+ // let data = res.data;
|
|
|
+ // if(data.code == 0){
|
|
|
+ // let result2 = data.data['平均住院日']||[]
|
|
|
+ // dayLis = result2
|
|
|
+ // if(slideType == 1){
|
|
|
+ // barChart(result2,type||1)
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // })
|
|
|
+ // }else{
|
|
|
+ // $(".toggleSlide1").css("opacity",0.5)
|
|
|
+ // }
|
|
|
if(hasData('FUNC000046')){
|
|
|
post(api.getAverageFee,{//平均住院费用
|
|
|
"type": type||1//1月2年
|
|
@@ -307,6 +342,25 @@ function getBarData(type){
|
|
|
}
|
|
|
})
|
|
|
}
|
|
|
+ if(false){
|
|
|
+ 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=[],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)
|
|
|
+ }
|
|
|
+ lineChartHome(dataX1,dataY1,dataY2,dataY3)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
if(hasData('FUNC000049')){
|
|
|
post(api.leaveHosCount,{//出院人数统计
|
|
|
"type": type||1//1月2年
|
|
@@ -358,13 +412,28 @@ function getBarData(type){
|
|
|
}
|
|
|
})
|
|
|
}
|
|
|
- if(hasData('FUNC000053')){
|
|
|
- post(api.entryByDept,{//各科室缺陷占比
|
|
|
+ // if(hasData('FUNC000053')){
|
|
|
+ // post(api.entryByDept,{//各科室缺陷占比
|
|
|
+ // "type": type||1//1月2年
|
|
|
+ // }).then((res)=>{
|
|
|
+ // let data = res.data;
|
|
|
+ // if(data.code == 0){
|
|
|
+ // let result2 = data.data['各科室缺陷占比']||[]
|
|
|
+ // for(let i = 0;i < result2.length;i++){
|
|
|
+ // result2[i].value = result2[i].num
|
|
|
+ // }
|
|
|
+ // emptyCircle(result2)
|
|
|
+ // panDetail(result2)
|
|
|
+ // }
|
|
|
+ // })
|
|
|
+ // }
|
|
|
+ if(1){
|
|
|
+ post(api.entryRejectPercent,{//单项否决
|
|
|
"type": type||1//1月2年
|
|
|
}).then((res)=>{
|
|
|
let data = res.data;
|
|
|
if(data.code == 0){
|
|
|
- let result2 = data.data['各科室缺陷占比']||[]
|
|
|
+ let result2 = data.data||[]
|
|
|
for(let i = 0;i < result2.length;i++){
|
|
|
result2[i].value = result2[i].num
|
|
|
}
|
|
@@ -490,7 +559,7 @@ function part02pan(data,dom){
|
|
|
};
|
|
|
dom.setOption(option);
|
|
|
}
|
|
|
-//折现图
|
|
|
+//折现图各科室甲级病历占比(长兴)
|
|
|
function lineChart(dataX,dataY){
|
|
|
if(dataX.length==0&&dataY.length==0){
|
|
|
$(".barChartLine").css("display","none")
|
|
@@ -706,6 +775,146 @@ function lineChartSpecial(dataX,dataY){
|
|
|
};
|
|
|
myCharts.setOption(option);
|
|
|
}
|
|
|
+//折线图病案首页
|
|
|
+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")
|
|
|
+ // }
|
|
|
+ var myCharts = echarts.init(document.getElementById('lineChart'));
|
|
|
+ $(window).resize(function(){
|
|
|
+ myCharts.resize()
|
|
|
+ });
|
|
|
+ option = {
|
|
|
+ color:['#00A1FF','#FF2B92','#3EFFD1'],
|
|
|
+ title: {
|
|
|
+ text: '百分比',
|
|
|
+ top: 15,
|
|
|
+ left: 10,
|
|
|
+ textStyle: {
|
|
|
+ fontSize: 14,
|
|
|
+ color:'#E9EBEF',
|
|
|
+ fontWeight: 400
|
|
|
+ }
|
|
|
+ },
|
|
|
+ tooltip: {
|
|
|
+ trigger: 'axis',
|
|
|
+ position: 'right',
|
|
|
+ axisPointer: { // 坐标轴指示器,坐标轴触发有效
|
|
|
+ type: 'line' // 默认为直线,可选为:'line' | 'shadow'
|
|
|
+ },
|
|
|
+ formatter: function(param) {
|
|
|
+ return `<div style="color:#fff;">${param[0].name}<br>
|
|
|
+ <i style="background:#00A1FF;margin-right:5px;display:inline-block;width:8px;height:8px;border-radius:50%"></i>病案首页合格率:${param[0]&¶m[0].value}%<br>
|
|
|
+ <i style="background:#FF2B92;margin-right:5px;display:inline-block;width:8px;height:8px;border-radius:50%"></i>病案首页合格率:${param[1]&¶m[1].value}%<br>
|
|
|
+ <i style="background:#3EFFD1;margin-right:5px;display:inline-block;width:8px;height:8px;border-radius:50%"></i>病案首页合格率:${param[2]&¶m[2].value}%<br>
|
|
|
+ </div>`
|
|
|
+ }
|
|
|
+ },
|
|
|
+ // 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%',
|
|
|
+ bottom: '3%',
|
|
|
+ containLabel: true
|
|
|
+ },
|
|
|
+ xAxis: {
|
|
|
+ type: 'category',
|
|
|
+ boundaryGap: false,
|
|
|
+ data: dataX,
|
|
|
+ axisTick: {
|
|
|
+ alignWithLabel: true
|
|
|
+ },
|
|
|
+ axisLabel: {//x轴刻度
|
|
|
+ textStyle: {
|
|
|
+ color: '#E9EBEF'
|
|
|
+ },
|
|
|
+ rotate:45,
|
|
|
+ formatter: function (value) {
|
|
|
+ //x轴的文字改为竖版显示
|
|
|
+ if(value.length>7){
|
|
|
+ return value.slice(0,7)+'...'
|
|
|
+ }
|
|
|
+ return value;
|
|
|
+ }
|
|
|
+ },
|
|
|
+ axisLine: {//x轴
|
|
|
+ lineStyle:{
|
|
|
+ color:'#4A5D8E'
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ yAxis: {
|
|
|
+ type: 'value',
|
|
|
+ axisLine: {//y轴
|
|
|
+ show: false
|
|
|
+ },
|
|
|
+ axisTick: {
|
|
|
+ show: false
|
|
|
+ },
|
|
|
+ axisLabel: {//y轴刻度
|
|
|
+ textStyle: {
|
|
|
+ color: '#E9EBEF'
|
|
|
+ }
|
|
|
+ },
|
|
|
+ splitLine:{//分割线
|
|
|
+ lineStyle:{
|
|
|
+ color:'#344876'
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ series: [
|
|
|
+ {
|
|
|
+ name: '合格率',
|
|
|
+ type: 'line',
|
|
|
+ stack: '总量',
|
|
|
+ data: dataY1
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: '完整率',
|
|
|
+ type: 'line',
|
|
|
+ stack: '总量',
|
|
|
+ data: dataY2
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: '完善率',
|
|
|
+ type: 'line',
|
|
|
+ stack: '总量',
|
|
|
+ data: dataY3
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ };
|
|
|
+ myCharts.setOption(option);
|
|
|
+}
|
|
|
//柱状图住院费用
|
|
|
function barChartPay(dataX,dataY){
|
|
|
// console.log(dataX,dataY,78787878)
|
|
@@ -1292,7 +1501,7 @@ function panDetail(data){
|
|
|
let deptName = $(this).attr("data-dept")
|
|
|
let deptId = $(this).attr("dept-id")
|
|
|
focusMenuItem("YH-ZKK-GKSQXZB_XQ");
|
|
|
- $(parent.document).find("#contentIframe").attr("src","quexianDetailControl.html?shijian"+dateType+"&deptName="+deptName)
|
|
|
+ $(parent.document).find("#contentIframe").attr("src","singleVeto.html?shijian"+dateType+"&qxName="+deptName)
|
|
|
|
|
|
})
|
|
|
}
|