|
@@ -2,11 +2,12 @@ const $ = require('jquery');
|
|
|
require("../css/reset.less")
|
|
|
require("../css/console.less")
|
|
|
require("../images/logo.png")
|
|
|
+require("../images/arrow_down.png")
|
|
|
|
|
|
// import 'zrender/lib/svg/svg';
|
|
|
const echarts = require('echarts');
|
|
|
const {post,setCookie,delCookie,getCookie} = require('../js/utils.js');
|
|
|
-
|
|
|
+let payMoney = [],dayLis = [],dataType = 1;
|
|
|
$(function(){
|
|
|
$(".partTitle p span").html(getCookie("hospital"))
|
|
|
setInterval(() => {
|
|
@@ -18,8 +19,31 @@ $(function(){
|
|
|
dateChange()
|
|
|
$(window).click(function(){
|
|
|
window.parent.userActionHide()
|
|
|
+ $(".toggleSlide ul").css("display","none")
|
|
|
+ })
|
|
|
+ $(".toggleSlide p").click(function(e){
|
|
|
+ e.stopPropagation()
|
|
|
+ $(this).next().slideToggle()
|
|
|
+ })
|
|
|
+ $(".toggleSlide li").click(function(){
|
|
|
+ let str = $(this).attr("data-str"),type = $(this).attr("data-type")
|
|
|
+ if(type == 1){
|
|
|
+ barChart(dayLis,dataType)
|
|
|
+ }else{
|
|
|
+ barChart(payMoney,dataType)
|
|
|
+ }
|
|
|
+ $(this).parent().slideToggle().prev().find("span").html(str)
|
|
|
})
|
|
|
})
|
|
|
+//判断有无某一权限
|
|
|
+function hasData(data){
|
|
|
+ let lis = JSON.parse(getCookie("codeLis"))
|
|
|
+ // console.log(lis)
|
|
|
+ if(lis.indexOf(data)>-1){//有权限
|
|
|
+ return true
|
|
|
+ }
|
|
|
+ return false;
|
|
|
+ }
|
|
|
function resizeBox(){
|
|
|
$(".partWrap").css({
|
|
|
height:$(window).height()-38+'px'
|
|
@@ -35,6 +59,7 @@ function dateChange(){
|
|
|
color:'#5A8EEE',
|
|
|
backgroundColor:'#fff'
|
|
|
})
|
|
|
+ dataType = 1
|
|
|
getBarData(1)
|
|
|
})
|
|
|
$(".monthYear .year").click(function(){
|
|
@@ -45,6 +70,7 @@ function dateChange(){
|
|
|
color:'#5A8EEE',
|
|
|
backgroundColor:'#fff'
|
|
|
})
|
|
|
+ dataType = 2
|
|
|
getBarData(2)
|
|
|
})
|
|
|
}
|
|
@@ -89,98 +115,163 @@ function initConsole(result){
|
|
|
}
|
|
|
//获取图表数据
|
|
|
function getBarData(type){
|
|
|
- post('/console/mrStatistics',{//出院人数统计,各科室甲级病历占比,病历数统计
|
|
|
- "type": type||1//1月2年
|
|
|
- }).then((res)=>{
|
|
|
- let data = res.data;
|
|
|
- if(data.code == 0){
|
|
|
- let result = data.data
|
|
|
- let result1 = data.data['出院人数统计']||[]
|
|
|
- personNum(result1)
|
|
|
- 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%"
|
|
|
- }
|
|
|
- ]
|
|
|
+ if(hasData('FUNC000045')){
|
|
|
+ post('/console/getAverageDayNum',{//平均住院天数
|
|
|
+ "type": type||1//1月2年
|
|
|
+ }).then((res)=>{
|
|
|
+ let data = res.data;
|
|
|
+ if(data.code == 0){
|
|
|
+ let result2 = data.data['平均住院日']||[]
|
|
|
+ dayLis = result2
|
|
|
+ barChart(result2,type||1)
|
|
|
}
|
|
|
- setNumDetail(result3)
|
|
|
- let result2 = data.data['各科室甲级病历占比']||[]
|
|
|
- let dataX2=[],dataY2=[];
|
|
|
- for(let i = 0;i < result2.length;i++){
|
|
|
- dataX2.push(result2[i].deptName)
|
|
|
- dataY2.push(result2[i].firstPercent.replace('%',''))
|
|
|
+ })
|
|
|
+ }
|
|
|
+ if(hasData('FUNC000046')){
|
|
|
+ post('/console/getAverageFee',{//平均住院费用
|
|
|
+ "type": type||1//1月2年
|
|
|
+ }).then((res)=>{
|
|
|
+ let data = res.data;
|
|
|
+ if(data.code == 0){
|
|
|
+ let result3 = data.data['平均住院费用']||[]
|
|
|
+ payMoney = result3;
|
|
|
+ barChart(result2,type||1)
|
|
|
}
|
|
|
- lineChart(dataX2,dataY2)
|
|
|
- }
|
|
|
- })
|
|
|
- post('/console/averageStatistics',{//平均住院日,平均住院费用,各科室质控平均分
|
|
|
- type:type||1
|
|
|
- }).then((res)=>{
|
|
|
- let data = res.data;
|
|
|
- if(data.code == 0){
|
|
|
- let result1 = data.data['各科室质控平均分']||[]
|
|
|
- let result2 = data.data['平均住院日']||[]
|
|
|
- let dataX1=[],dataY1=[],dataX2=[],dataY2=[];
|
|
|
- for(let i = 0;i < result1.length;i++){
|
|
|
- dataX1.push(result1[i].name)
|
|
|
- dataY1.push(result1[i].averageValue)
|
|
|
- }
|
|
|
- barChartPay(dataX1,dataY1)
|
|
|
- barChart(result2,type||1)
|
|
|
- }
|
|
|
- })
|
|
|
- post('/console/resultStatistics',{//各科室缺陷占比,各模块缺陷占比排行,条目缺陷占比
|
|
|
- type:type||1
|
|
|
- }).then((res)=>{
|
|
|
- let data = res.data;
|
|
|
- if(data.code == 0){
|
|
|
- let result1 = data.data['各模块缺陷占比排行']||[]
|
|
|
- let result2 = data.data['各科室缺陷占比']||[]
|
|
|
- let result3 = data.data['条目缺陷占比']||[]
|
|
|
- for(let i = 0;i < result2.length;i++){
|
|
|
- result2[i].value = result2[i].num
|
|
|
- }
|
|
|
- for(let i = 0;i < result3.length;i++){
|
|
|
- result3[i].value = result3[i].num
|
|
|
- }
|
|
|
- queList(result1)
|
|
|
- emptyCircle(result2)
|
|
|
- emptyCircleB(result3)
|
|
|
- panDetail(result2)
|
|
|
- panDetailB(result3)
|
|
|
- }
|
|
|
- })
|
|
|
+ })
|
|
|
+ }
|
|
|
+ if(hasData('FUNC000047')){
|
|
|
+ post('/console/getAverageScore',{//各科室质控平均分
|
|
|
+ "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].name)
|
|
|
+ dataY1.push(result1[i].averageValue)
|
|
|
+ }
|
|
|
+ barChartPay(dataX1,dataY1)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ if(hasData('FUNC000048')){
|
|
|
+ post('/console/getLevelResultDept',{//各科室甲级占比
|
|
|
+ "type": type||1//1月2年
|
|
|
+ }).then((res)=>{
|
|
|
+ let data = res.data;
|
|
|
+ if(data.code == 0){
|
|
|
+ let result2 = data.data['各科室甲级病历占比']||[]
|
|
|
+ let dataX2=[],dataY2=[];
|
|
|
+ for(let i = 0;i < result2.length;i++){
|
|
|
+ dataX2.push(result2[i].deptName)
|
|
|
+ dataY2.push(result2[i].firstPercent.replace('%',''))
|
|
|
+ }
|
|
|
+ lineChart(dataX2,dataY2)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ if(hasData('FUNC000049')){
|
|
|
+ post('/console/leaveHosCount',{//出院人数统计
|
|
|
+ "type": type||1//1月2年
|
|
|
+ }).then((res)=>{
|
|
|
+ let data = res.data;
|
|
|
+ if(data.code == 0){
|
|
|
+ // barChart(result2,type||1)
|
|
|
+ // console.log(data)
|
|
|
+ let result1 = data.data['出院人数统计']||[]
|
|
|
+ personNum(result1)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ if(hasData('FUNC000050')){
|
|
|
+ post('/console/mrCount',{//质控病历统计
|
|
|
+ "type": type||1//1月2年
|
|
|
+ }).then((res)=>{
|
|
|
+ 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)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ if(hasData('FUNC000051')){
|
|
|
+ post('/console/entryCountGroupByCase',{//各模块缺陷占比排行
|
|
|
+ "type": type||1//1月2年
|
|
|
+ }).then((res)=>{
|
|
|
+ let data = res.data;
|
|
|
+ if(data.code == 0){
|
|
|
+ let result1 = data.data['各模块缺陷占比排行']||[]
|
|
|
+ queList(result1)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ if(hasData('FUNC000052')){
|
|
|
+ post('/console/entryCountGroupByEntry',{//条目缺陷占比
|
|
|
+ "type": type||1//1月2年
|
|
|
+ }).then((res)=>{
|
|
|
+ let data = res.data;
|
|
|
+ if(data.code == 0){
|
|
|
+ let result3 = data.data['条目缺陷占比']||[]
|
|
|
+ for(let i = 0;i < result3.length;i++){
|
|
|
+ result3[i].value = result3[i].num
|
|
|
+ }
|
|
|
+ emptyCircleB(result3)
|
|
|
+ panDetailB(result3)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ if(hasData('FUNC000053')){
|
|
|
+ post('/console/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)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
}
|
|
|
//part01
|
|
|
function personNum(data){
|
|
@@ -473,6 +564,7 @@ function barChartPay(dataX,dataY){
|
|
|
}
|
|
|
//柱状图住院日期
|
|
|
function barChart(data,type){
|
|
|
+ // console.log(data,type)
|
|
|
var myChart = echarts.init(document.getElementById('barChart'));
|
|
|
$(window).resize(function(){
|
|
|
myChart.resize()
|
|
@@ -876,7 +968,7 @@ function emptyCircleB(data){
|
|
|
}
|
|
|
//缺陷列表渲染
|
|
|
function queList(data){
|
|
|
- let strAll = '',tmp = `
|
|
|
+ let strAll = '',tmp = `mm
|
|
|
<tr class="thead">
|
|
|
<td class="td01">排名</td>
|
|
|
<td class="td02">缺陷详情</td>
|
|
@@ -910,7 +1002,7 @@ function panDetail(data){
|
|
|
</tr>
|
|
|
`
|
|
|
}
|
|
|
- $(".explainPan table").html(strAll);
|
|
|
+ $(".explainPanT table").html(strAll);
|
|
|
$(".explainPan").css({
|
|
|
marginTop:-($(".explainPan").height()/2-20)+'px'
|
|
|
})
|