lion 2 years ago
parent 144f2a3337
commit ee02e9f0c5

@ -319,10 +319,10 @@
$(".hgleft p").eq(3).children("span").text(paramedics.accompany_order) $(".hgleft p").eq(3).children("span").text(paramedics.accompany_order)
$(".hgleft p").eq(4).children("span").text(paramedicper) $(".hgleft p").eq(4).children("span").text(paramedicper)
// 护工陪护实时概况 // 护工陪护实时概况
paramedicChart = [ var paramedicChart = [
{value:paramedics.has_accompany , name: '已陪护'}, {value:paramedics.has_accompany , name: '已陪护'},
{value: paramedics.no_accompany, name: '未陪护'}, {value: paramedics.no_accompany, name: '未陪护'},
] ]
// bed 床位 // bed 床位
var beds = datas.bed var beds = datas.bed
var bedper = parseFloat(((beds.has_accompany/beds.total)*100).toFixed(2))+"%" var bedper = parseFloat(((beds.has_accompany/beds.total)*100).toFixed(2))+"%"
@ -330,22 +330,13 @@
$(".cwleft p").eq(1).children("span").text(beds.has_accompany) $(".cwleft p").eq(1).children("span").text(beds.has_accompany)
$(".cwleft p").eq(2).children("span").text(beds.no_accompany) $(".cwleft p").eq(2).children("span").text(beds.no_accompany)
$(".cwleft p").eq(3).children("span").text(bedper) $(".cwleft p").eq(3).children("span").text(bedper)
// 床位陪护实时概况 var bedChart = [
var option1 = { {value: beds.has_accompany, name: '已陪护'},
series: [{ {value: beds.no_accompany, name: '未陪护'}
type: 'pie', ]
color: ["#04c6c7", "#ffc34a"],
radius: '70%',
data: [
{value: 855, name: '已陪护'},
{value: 7795, name: '未陪护'}
]
}]
};
var myChart1 = echarts.init(document.getElementById('cw'));
myChart1.setOption(option1);
// 陪护统计表 // 陪护统计表
console.log("result",result) console.log("result",result)
initChart()
}, },
complete: function (xhr, textStatus) { complete: function (xhr, textStatus) {
// //
@ -423,252 +414,264 @@
speed: 1000, speed: 1000,
}); });
var paramedicChart = [ // 图表
{value: 0, name: '已陪护'}, function initChart(){
{value: 0, name: '未陪护'}, // 护工陪护实时概况
] var option = {
series: [{
var option = { // name:'访问量',
series: [{ type: 'pie',
// name:'访问量', color: ["#04c6c7", "#ffc34a"],
type: 'pie', radius: '70%',
color: ["#04c6c7", "#ffc34a"], data: paramedicChart
radius: '70%', }]
data: paramedicChart };
}] var myChart = echarts.init(document.getElementById('hg'));
}; myChart.setOption(option);
var myChart = echarts.init(document.getElementById('hg')); // 床位陪护实时概况
myChart.setOption(option); var option1 = {
// 本月陪护订单分析 series: [{
var option2 = { type: 'pie',
tooltip: {}, color: ["#04c6c7", "#ffc34a"],
color: ['#018fff'], radius: '70%',
lineStyle: { data: bedChart
color: '#018fff' }]
}, };
legend: { var myChart1 = echarts.init(document.getElementById('cw'));
itemWidth: 18, myChart1.setOption(option1);
itemHeight: 8, // 本月陪护订单分析
itemGap: 10, var option2 = {
data: ['陪护订单量'], tooltip: {},
orient: 'vertical', color: ['#018fff'],
left: 'center', lineStyle: {
textStyle: { color: '#018fff'
color: "rgba(255,255,255,.7)",
fontSize: '14px'
}
},
xAxis: {
type: 'category',
axisLine: {
show: true,
lineStyle: {
color: '#018fff',
}
},
axisTick: {
show: true,
alignWithLabel: true,
}, },
axisLabel: { legend: {
interval: 0, itemWidth: 18,
itemHeight: 8,
itemGap: 10,
data: ['陪护订单量'],
orient: 'vertical',
left: 'center',
textStyle: { textStyle: {
color: '#fff', color: "rgba(255,255,255,.7)",
fontSize: '14px' fontSize: '14px'
} }
}, },
data: ["一院", "市中", "武进南院", "阳湖院", "康复医院", "妇幼院", "武中", "溧阳院"], xAxis: {
}, type: 'category',
yAxis: { axisLine: {
axisLine: { show: true,
show: true, lineStyle: {
lineStyle: { color: '#018fff',
color: '#018fff', }
} },
}, axisTick: {
axisTick: { show: true,
show: true, alignWithLabel: true,
alignWithLabel: true, },
axisLabel: {
interval: 0,
textStyle: {
color: '#fff',
fontSize: '14px'
}
},
data: ["一院", "市中", "武进南院", "阳湖院", "康复医院", "妇幼院", "武中", "溧阳院"],
}, },
axisLabel: { yAxis: {
interval: 0, axisLine: {
textStyle: { show: true,
color: '#fff', lineStyle: {
color: '#018fff',
}
},
axisTick: {
show: true,
alignWithLabel: true,
},
axisLabel: {
interval: 0,
textStyle: {
color: '#fff',
fontSize: '14px'
}
},
type: 'value',
name: '订单数',
nameTextStyle: {
color: "#2b7ba0",
fontSize: '14px' fontSize: '14px'
} }
}, },
type: 'value', series: [{
name: '订单数', name: '陪护订单量',
nameTextStyle: { type: 'pictorialBar',
color: "#2b7ba0", barCategoryGap: '40%',
fontSize: '14px' symbol: 'triangle',
} itemStyle: {
}, normal: {
series: [{ opacity: 0.5
name: '陪护订单量', },
type: 'pictorialBar', emphasis: {
barCategoryGap: '40%', opacity: 1
symbol: 'triangle', }
itemStyle: {
normal: {
opacity: 0.5
}, },
emphasis: {
opacity: 1
}
},
data: [336, 150, 42, 156, 42, 30, 54, 45], data: [336, 150, 42, 156, 42, 30, 54, 45],
}, { }, {
name: '陪护订单量', name: '陪护订单量',
type: 'pictorialBar', type: 'pictorialBar',
barGap: '-100%', barGap: '-100%',
symbolPosition: 'end', symbolPosition: 'end',
symbolSize: 50, symbolSize: 50,
symbolOffset: [0, '-120%'], symbolOffset: [0, '-120%'],
}] }]
}; };
var myChart2 = echarts.init(document.getElementById('byph')); var myChart2 = echarts.init(document.getElementById('byph'));
myChart2.setOption(option2); myChart2.setOption(option2);
// 本月营收占比分析 // 本月营收占比分析
var option3 = { var option3 = {
tooltip: { tooltip: {
trigger: 'item' trigger: 'item'
}, },
series: [ series: [
{ {
type: 'pie', type: 'pie',
radius: '70%', radius: '70%',
center: ['50%', '50%'], center: ['50%', '50%'],
color: ["#ffb22f", "#ff4954", "#01babb"], color: ["#ffb22f", "#ff4954", "#01babb"],
data: [ data: [
{value: 75, name: '一院'}, {value: 75, name: '一院'},
{value: 60, name: '市中'}, {value: 60, name: '市中'},
{value: 30, name: '武进南院'}, {value: 30, name: '武进南院'},
{value: 25, name: '阳湖院'}, {value: 25, name: '阳湖院'},
{value: 30, name: '康复医院'}, {value: 30, name: '康复医院'},
{value: 20, name: '妇幼院'}, {value: 20, name: '妇幼院'},
{value: 25, name: '武中'}, {value: 25, name: '武中'},
{value: 18, name: '溧阳院'} {value: 18, name: '溧阳院'}
].sort(function (a, b) { ].sort(function (a, b) {
return a.value - b.value; return a.value - b.value;
}), }),
roseType: 'radius', roseType: 'radius',
emphasis: { emphasis: {
itemStyle: { itemStyle: {
shadowBlur: 10, shadowBlur: 10,
shadowOffsetX: 0, shadowOffsetX: 0,
shadowColor: 'rgba(0, 0, 0, 0.5)' shadowColor: 'rgba(0, 0, 0, 0.5)'
}
} }
} }
} ]
] };
}; var myChart3 = echarts.init(document.getElementById('ysbox'));
var myChart3 = echarts.init(document.getElementById('ysbox')); myChart3.setOption(option3);
myChart3.setOption(option3);
// 陪护统计表 // 陪护统计表
var app = {}; var app = {};
var chartDom = document.getElementById('phtable'); var chartDom = document.getElementById('phtable');
var myChart4 = echarts.init(chartDom); var myChart4 = echarts.init(chartDom);
var option4; var option4;
option4 = { option4 = {
color: ['#018fff'], color: ['#018fff'],
lineStyle: { lineStyle: {
color: '#018fff' color: '#018fff'
},
legend: {
itemWidth: 18,
itemHeight: 8,
itemGap: 10,
data: [{
name: '陪护',
itemStyle: {
color: "#ffb22f",
}
}, {
name: "护工数",
itemStyle: {
color: "#0087ff",
}
}],
orient: 'horizontal',
left: 'center',
textStyle: {
color: "rgba(255,255,255,.7)",
fontSize: '14px'
}
},
xAxis: {
type: 'category',
data: ['一院', '市中', '武进南院', '阳湖院', '康复医院', '妇幼院', '武中', '溧阳院'],
axisLine: {
show: true,
lineStyle: {
color: '#018fff',
}
},
axisTick: {
show: true,
alignWithLabel: true,
}, },
axisLabel: { legend: {
interval: 0, itemWidth: 18,
itemHeight: 8,
itemGap: 10,
data: [{
name: '陪护',
itemStyle: {
color: "#ffb22f",
}
}, {
name: "护工数",
itemStyle: {
color: "#0087ff",
}
}],
orient: 'horizontal',
left: 'center',
textStyle: { textStyle: {
color: '#fff', color: "rgba(255,255,255,.7)",
fontSize: '14px' fontSize: '14px'
} }
}
},
yAxis: {
axisLine: {
show: true,
lineStyle: {
color: '#018fff',
}
},
axisTick: {
show: true,
alignWithLabel: true,
}, },
axisLabel: { xAxis: {
interval: 0, type: 'category',
textStyle: { data: ['一院', '市中', '武进南院', '阳湖院', '康复医院', '妇幼院', '武中', '溧阳院'],
color: '#fff', axisLine: {
fontSize: '14px' show: true,
lineStyle: {
color: '#018fff',
}
},
axisTick: {
show: true,
alignWithLabel: true,
},
axisLabel: {
interval: 0,
textStyle: {
color: '#fff',
fontSize: '14px'
}
} }
}, },
type: 'value', yAxis: {
name: '人数', axisLine: {
nameTextStyle: { show: true,
color: "#2b7ba0", lineStyle: {
fontSize: '14px' color: '#018fff',
} }
}, },
series: [ axisTick: {
{ show: true,
type: 'bar', alignWithLabel: true,
name: '陪护单数', },
data: [336, 150, 42, 156, 42, 30, 54, 45], axisLabel: {
itemStyle: { interval: 0,
color: '#ffb22f', textStyle: {
color: '#fff',
fontSize: '14px'
}
},
type: 'value',
name: '人数',
nameTextStyle: {
color: "#2b7ba0",
fontSize: '14px'
} }
}, },
{ series: [
type: 'bar', {
name: '总护工数', type: 'bar',
data: [288, 130, 35, 125, 38, 30, 50, 40], name: '陪护单数',
itemStyle: { data: [336, 150, 42, 156, 42, 30, 54, 45],
color: '#0087ff' itemStyle: {
color: '#ffb22f',
}
},
{
type: 'bar',
name: '总护工数',
data: [288, 130, 35, 125, 38, 30, 50, 40],
itemStyle: {
color: '#0087ff'
}
} }
} ],
], color: ["#ffb22f", "#0087ff"],
color: ["#ffb22f", "#0087ff"], };
}; option4 && myChart4.setOption(option4);
option4 && myChart4.setOption(option4); }
</script> </script>

Loading…
Cancel
Save