|
@@ -8,12 +8,19 @@ require("../images/arrow_down.png")
|
|
|
const {api} = require('./api.js')
|
|
|
const echarts = require('echarts');
|
|
|
const {post,setCookie,delCookie,getCookie} = require('../js/utils.js');
|
|
|
-let payMoney = [],dayLis = [],dateType = 2,curDept = '',datafst=[],datasec=[],datatrd=[],datafour=[];
|
|
|
+let payMoney = [],dayLis = [],dateType = 2,curDept = '',datafst=[],datasec=[],datatrd=[],datafour=[],hospital=getCookie("hospital");
|
|
|
$(function(){
|
|
|
if(!hasData('YH-KZT')&&!hasData('YH-KZTKS')){
|
|
|
$("body").html('')
|
|
|
}
|
|
|
- $(".partTitle p span").html(getCookie("hospital"))
|
|
|
+ if(hospital == "台州市立"){
|
|
|
+ $(".circleBSingle").css("display","block")
|
|
|
+ $(".circleBLis").css("display","none")
|
|
|
+ }else{
|
|
|
+ $(".circleBSingle").css("display","none")
|
|
|
+ $(".circleBLis").css("display","block")
|
|
|
+ }
|
|
|
+ $(".partTitle p span").html(hospital)
|
|
|
setInterval(() => {
|
|
|
getTimeDetail()
|
|
|
}, 1000);
|
|
@@ -37,9 +44,15 @@ function tiaomu(){
|
|
|
$(".defect .partTitlePub").click(function(){
|
|
|
$(parent.document).find("#contentIframe").attr("src","mukuai.html?from=2&deptName="+curDept+"&dateType="+dateType)
|
|
|
})
|
|
|
- $(".circleB .title").click(function(){
|
|
|
+ $(".circleBSingle .title,.homePageNo .title").click(function(){
|
|
|
$(parent.document).find("#contentIframe").attr("src","tiaomu.html?from=2&deptName="+curDept+"&dateType="+dateType)
|
|
|
})
|
|
|
+ $(".homePage .title").click(function(){
|
|
|
+ $(parent.document).find("#contentIframe").attr("src","partDetail.html")
|
|
|
+ })
|
|
|
+ $(".part02 .bingli,.part02 .bingliLis").click(function(){
|
|
|
+ $(parent.document).find("#contentIframe").attr("src","deptScoreDetail.html")
|
|
|
+ })
|
|
|
}
|
|
|
//判断有无某一权限
|
|
|
function hasData(data){
|
|
@@ -80,6 +93,7 @@ function dateChange(){
|
|
|
getBarData(2)
|
|
|
})
|
|
|
}
|
|
|
+
|
|
|
//控制台数
|
|
|
function initConsole(result){
|
|
|
let url = {
|
|
@@ -197,22 +211,146 @@ function getBarData(type){
|
|
|
})
|
|
|
}
|
|
|
if(hasData('FUNC000057')){
|
|
|
- post(api.entryCountGroupByEntryAndDept,{//条目缺陷占比
|
|
|
+ if(hospital=="台州市立"){
|
|
|
+ post(api.entryCountGroupByEntryAndDept,{//条目缺陷占比
|
|
|
+ "type": type||1//1月2年
|
|
|
+ }).then((res)=>{
|
|
|
+ let data = res.data;
|
|
|
+ if(data.code == 0){
|
|
|
+ let result3 = data.data[curDept]||[]
|
|
|
+ for(let i = 0;i < result3.length;i++){
|
|
|
+ result3[i].value = result3[i].num
|
|
|
+ }
|
|
|
+ datafour = data.data
|
|
|
+ emptyCircleB(result3)
|
|
|
+ panDetailB(result3)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }else{
|
|
|
+ post(api.entryCountGroupByEntryAndDept,{//条目缺陷占比
|
|
|
+ "type": type||1//1月2年
|
|
|
+ }).then((res)=>{
|
|
|
+ let data = res.data;
|
|
|
+ if(data.code == 0){
|
|
|
+ let result3 = data.data[curDept]||[]
|
|
|
+ for(let i = 0;i < result3.length;i++){
|
|
|
+ result3[i].value = result3[i].num
|
|
|
+ }
|
|
|
+ datafour = data.data
|
|
|
+ emptyCircleBc(result3)
|
|
|
+ panDetailBc(result3)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if(hospital=="长兴医院"&&hasData("FUNC000076")){
|
|
|
+ post(api.getAverageScore,{//病案首页
|
|
|
"type": type||1//1月2年
|
|
|
}).then((res)=>{
|
|
|
let data = res.data;
|
|
|
if(data.code == 0){
|
|
|
- let result3 = data.data[curDept]||[]
|
|
|
- for(let i = 0;i < result3.length;i++){
|
|
|
- result3[i].value = result3[i].num
|
|
|
+ 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)
|
|
|
}
|
|
|
- datafour = data.data
|
|
|
- emptyCircleB(result3)
|
|
|
- panDetailB(result3)
|
|
|
+ lineChartSpecial(dataX1,dataY1)
|
|
|
}
|
|
|
})
|
|
|
}
|
|
|
}
|
|
|
+function lineChartSpecial(dataX,dataY){
|
|
|
+ var myCharts = echarts.init(document.getElementById('lineChart'));
|
|
|
+ var lengthNum = dataX.length;
|
|
|
+ $(window).resize(function(){
|
|
|
+ myCharts.resize()
|
|
|
+ });
|
|
|
+ option = {
|
|
|
+ color: ['#3398DB'],
|
|
|
+ tooltip: {
|
|
|
+ trigger: 'axis',
|
|
|
+ position: 'right',
|
|
|
+ axisPointer: { // 坐标轴指示器,坐标轴触发有效
|
|
|
+ type: 'line' // 默认为直线,可选为:'line' | 'shadow'
|
|
|
+ }
|
|
|
+ },
|
|
|
+ grid: {
|
|
|
+ left: '3%',
|
|
|
+ right: '4%',
|
|
|
+ bottom: '3%',
|
|
|
+ containLabel: true
|
|
|
+ },
|
|
|
+ xAxis: [
|
|
|
+ {
|
|
|
+ type: 'category',
|
|
|
+ data: dataX,
|
|
|
+ axisTick: {
|
|
|
+ alignWithLabel: true
|
|
|
+ },
|
|
|
+ axisLabel: {//x轴刻度
|
|
|
+ textStyle: {
|
|
|
+ color: '#333'
|
|
|
+ },
|
|
|
+ rotate:45,
|
|
|
+ formatter: function (value) {
|
|
|
+ //x轴的文字改为竖版显示
|
|
|
+ if(value.length>7){
|
|
|
+ return value.slice(0,7)+'...'
|
|
|
+ }
|
|
|
+ return value;
|
|
|
+ }
|
|
|
+ },
|
|
|
+ axisLine: {//x轴
|
|
|
+ lineStyle:{
|
|
|
+ color:'#AAAAAA'
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ ],
|
|
|
+ yAxis: [
|
|
|
+ {
|
|
|
+ type: 'value',
|
|
|
+ axisLine: {//y轴
|
|
|
+ show: false
|
|
|
+ },
|
|
|
+ axisTick: {
|
|
|
+ show: false
|
|
|
+ },
|
|
|
+ axisLabel: {//y轴刻度
|
|
|
+ textStyle: {
|
|
|
+ color: '#333333'
|
|
|
+ }
|
|
|
+ },
|
|
|
+ splitLine:{//分割线
|
|
|
+ lineStyle:{
|
|
|
+ color:'#EFF3FC'
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ ],
|
|
|
+ title:[{
|
|
|
+ text: '合格率',
|
|
|
+ top: 15,
|
|
|
+ left: 10,
|
|
|
+ textStyle: {
|
|
|
+ fontSize: 14,
|
|
|
+ color:'#666666',
|
|
|
+ fontWeight: 400
|
|
|
+ }
|
|
|
+ }],
|
|
|
+ series: [
|
|
|
+ {
|
|
|
+ name: '质控平均分',
|
|
|
+ type: 'bar',
|
|
|
+ barWidth: '23%',
|
|
|
+ data: dataY
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ };
|
|
|
+ myCharts.setOption(option);
|
|
|
+}
|
|
|
//part01
|
|
|
function personNum(data){
|
|
|
$(".personNum").html("总人数:"+data['总人数'])
|
|
@@ -436,6 +574,101 @@ function emptyCircleB(data){
|
|
|
};
|
|
|
myChart.setOption(option);
|
|
|
}
|
|
|
+function emptyCircleBc(data){
|
|
|
+ var myChart = echarts.init(document.getElementById('emptyCircleBc'));
|
|
|
+ $(window).resize(function(){
|
|
|
+ myChart.resize()
|
|
|
+ });
|
|
|
+ let bgColor = '#fff';
|
|
|
+ let title = '总量';
|
|
|
+ let color = ['#F2637B','#975FE4', '#399FFF', '#37CBCB', '#4CCB73','#FAD336','#F2637B','#975FE4', '#399FFF', '#37CBCB', '#4CCB73','#FAD336'];
|
|
|
+ let echartData = data;
|
|
|
+ let total = 0;
|
|
|
+ for(let i = 0;i < echartData.length;i++){
|
|
|
+ total += echartData[i].num
|
|
|
+ }
|
|
|
+ option = {
|
|
|
+ backgroundColor: bgColor,
|
|
|
+ color: color,
|
|
|
+ title: [{
|
|
|
+ text: data.length>0?'{val|' + total + '}\n{name|' + title + '}':'',
|
|
|
+ top: 'center',
|
|
|
+ left: 'center',
|
|
|
+ textStyle: {
|
|
|
+ rich: {
|
|
|
+ val: {
|
|
|
+ fontSize: 24,
|
|
|
+ color: '#333',
|
|
|
+ fontWeight: 'bold',
|
|
|
+ padding: [10, 0]
|
|
|
+ },
|
|
|
+ name: {
|
|
|
+ fontSize: 12,
|
|
|
+ fontWeight: 'normal',
|
|
|
+ color: '#777',
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }],
|
|
|
+ tooltip: {
|
|
|
+ trigger: 'item',
|
|
|
+ position: 'right',
|
|
|
+ // formatter: '{b} : {c} ({d}%)',
|
|
|
+ formatter:function(item){
|
|
|
+ const {name, num, percentStr} = item.data
|
|
|
+ return `${name} : ${num} (${percentStr})`
|
|
|
+ }
|
|
|
+ },
|
|
|
+ series: [{
|
|
|
+ name: '',
|
|
|
+ type: 'pie',
|
|
|
+ radius: ['70%', '90%'],
|
|
|
+ data: echartData,
|
|
|
+ hoverAnimation:true,
|
|
|
+ hoverOffset:5,
|
|
|
+ itemStyle: {
|
|
|
+ normal: {
|
|
|
+ borderColor: bgColor,
|
|
|
+ borderWidth: 2
|
|
|
+ }
|
|
|
+ },
|
|
|
+ labelLine: {
|
|
|
+ normal: {
|
|
|
+ length: 20,
|
|
|
+ length2: 120,
|
|
|
+ lineStyle: {
|
|
|
+ color: '#e6e6e6'
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ label: {
|
|
|
+ normal: {
|
|
|
+ show:false,
|
|
|
+ formatter: params => {
|
|
|
+ return params.name == 'A类'?params.name:''
|
|
|
+ },
|
|
|
+ padding: [0 , -100, 25, -100],
|
|
|
+ rich: {
|
|
|
+ icon: {
|
|
|
+ fontSize: 16
|
|
|
+ },
|
|
|
+ name: {
|
|
|
+ fontSize: 14,
|
|
|
+ padding: [0, 10, 0, 4],
|
|
|
+ color: '#666666'
|
|
|
+ },
|
|
|
+ value: {
|
|
|
+ fontSize: 18,
|
|
|
+ fontWeight: 'bold',
|
|
|
+ color: '#333333'
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ }]
|
|
|
+ };
|
|
|
+ myChart.setOption(option);
|
|
|
+}
|
|
|
//缺陷列表渲染
|
|
|
function queList(data){
|
|
|
let strAll = '',tmp = `mm
|
|
@@ -477,6 +710,25 @@ function panDetailB(data){
|
|
|
marginTop:-($(".explainPan").height()/2-20)+'px'
|
|
|
})
|
|
|
}
|
|
|
+function panDetailBc(data){
|
|
|
+ let color = ['#F2637B','#975FE4', '#399FFF', '#37CBCB', '#4CCB73','#FAD336','#F2637B','#975FE4', '#399FFF', '#37CBCB', '#4CCB73','#FAD336'];
|
|
|
+ let strAll = '';
|
|
|
+ for(let i = 0;i < data.length;i++){
|
|
|
+ strAll += `
|
|
|
+ <tr class="explainLi">
|
|
|
+ <td class="deptName" title="${data[i].name}">
|
|
|
+ <p><i class="tip" style="background-color:${color[i]}"></i>${data[i].name}</p>
|
|
|
+ </td>
|
|
|
+ <td class="deptNum">${data[i].num}</td>
|
|
|
+ <td class="percent">(${data[i].percentStr})</td>
|
|
|
+ </tr>
|
|
|
+ `
|
|
|
+ }
|
|
|
+ $(".explainPanBc table").html(strAll);
|
|
|
+ $(".explainPan").css({
|
|
|
+ marginTop:-($(".explainPanc").height()/2-20)+'px'
|
|
|
+ })
|
|
|
+}
|
|
|
//时间获取
|
|
|
function getTimeDetail(){
|
|
|
const d = new Date();
|