123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137 |
- /*$(document).ready(function () {
- var obj = new Object();
- $.ajax({
- url : prefix + "/queryXinGuanJieZhongShuLiang",
- method : 'post',
- data : obj,
- success : function (e) {
- if(e.code == 0){
- jieZhongShuLiang(e);
- }
- }
- });
- });*/
- function jieZhongShuLiang(e){//疫苗接种数量统计
- var jieZhongShuLiang = e.jieZhongShuLiang;
- var jzAll = 0;
- for (var i = 0; i < jieZhongShuLiang.length; i++) {
- jzAll += jieZhongShuLiang[i].jzNumber;
- }
- var container = document.getElementById("ymjzsl");
- container.innerHTML = "";
- for (var i = 0; i < jieZhongShuLiang.length; i++) {
- var box = $("<div class=\"col-sm-3 padding-y-5 flex-c h-30 text-center\"></div>");
- $(container).append(box);
- var content = $("<div class=\"bg-blue\"></div>");
- box.append(content);
- content.append("<div class=\"chart-title-s\">"+jieZhongShuLiang[i].jdName.substr(0, 4)+"</div>");
- var chart = $("<div class=\"chart-container-s\"></div>");
- content.append(chart);
- content.append("<div class=\"chart-text c-blue\">"+jieZhongShuLiang[i].rkNumber+"</div>");
- content.append("<div class=\"chart-text c-white\">辖区居民总数</div>");
- content.append("<div class=\"chart-text c-blue\">"+jieZhongShuLiang[i].jzNumber+"</div>");
- content.append("<div class=\"chart-text c-white\">实际接种人数</div>");
- var myChart = echarts.init(chart[0]);
- myChart.on("click", function (e) {
- openDialog_jzsl(e.dataIndex);
- });
- var option;
- option = {
- tooltip: {
- trigger: 'item',
- position:'inside'
- },
- series: [
- {
- name: '占全区接种人数百分比',
- type: 'pie',
- radius: ['60%', '70%'],
- selectedOffset:0, //选中块的偏移量
- // emphasis: {
- // label: {
- // show: true,
- // fontSize: '15',
- // fontWeight: 'bold',
- // color:'83bff6'
- //
- // }
- // },
- labelLine: {
- show: false
- },
- data: [
- {
- value: jieZhongShuLiang[i].jzNumber,
- name: '本街道接种',
- itemStyle: {
- color: new echarts.graphic.LinearGradient(1, 1, 0, 0, [{
- offset: 0,
- color: '#1270d9'
- }, {
- offset: 1,
- color: '#00ffeb'
- }]),
- },
- selected:true, //默认选中第一块
- label: {
- normal:{
- show: true,
- fontSize: '15',
- position: 'center',
- textStyle:{
- color:'#fff',
- fontWeight: 'bold',
- },
- formatter: '{d}%'
- }
- },
- },
- {
- value: (jzAll - jieZhongShuLiang[i].jzNumber),
- name: '其他街道接种',
- itemStyle: {
- color: new echarts.graphic.LinearGradient(1, 1, 0, 0, [{
- offset: 0,
- color: '#ff8404'
- }, {
- offset: 1,
- color: '#ffd904'
- }]),
- },
- label:{
- show:false, //默认显示第一块
- }
- },
- ]
- }
- ]
- };
- option && myChart.setOption(option);
- }
- }
- function openDialog_jzsl(index) {//弹出对话框
- console.log(index+"=index")
- var url = prefix + "/xgym/jzsl/" + index;
- var title
- switch (index){
- case 0:
- title = '疫苗接种数量统计 - 已接种';
- break;
- case 1:
- title = '疫苗接种数量统计 - 未接种';
- break;
- }
- $.modal.openDetailFull(title, url, 1200);
- }
|