<%@ page import="org.apache.commons.lang.StringUtils" %>
<%@ page language="java" pageEncoding="UTF-8" contentType="text/html; charset=UTF-8" %>
<%@ page isELIgnored="false" %>
<%@ taglib prefix="shiro" uri="http://shiro.apache.org/tags" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%
    String basePath = request.getContextPath();
%>
<!DOCTYPE html>
<html>
<head>
    <jsp:include page="../../../common/admin/head.jsp"></jsp:include>
    <link  rel="stylesheet" type="text/css" href="<%=basePath%>/resource/css/admin/home/index.css">
</head>
<body>
<jsp:include page="../../../common/admin/body_pre.jsp"></jsp:include>
<div class="row hidden-print">
    <div class="col-lg-12">
        <div class="ibox">
            <div class="ibox-title">
                <h2>社会进步</h2>
                <ol class="breadcrumb">
                    <li>
                        <a href="javascript:void(0);" >城市发展</a>
                    </li>
                    <li class="active">
                        <strong>社会进步</strong>
                    </li>
                </ol>
            </div>
        </div>
    </div>
</div>
<%--////////////////--%>
<div class="row hidden-print">
    <div class="col-lg-4 col-md-4">
        <div class="ibox shortcut">
            <div id="divChart1" style="width: 100%;height: 400px;"></div>
        </div>
    </div>
    <div class="col-lg-4 col-md-4">
        <div class="ibox shortcut">
            <div id="divChart2" style="width: 100%;height: 400px;"></div>
        </div>
    </div>
    <div class="col-lg-4 col-md-4">
        <div class="ibox shortcut">
            <div id="divChart3" style="width: 100%;height: 400px;"></div>
        </div>
    </div>
</div>
<div class="row hidden-print">
    <div class="col-lg-4 col-md-4">
        <div class="ibox shortcut">
            <div id="divChart5" style="width: 100%;height: 400px;"></div>
        </div>
    </div>
    <div class="col-lg-4 col-md-4">
        <div class="ibox shortcut">
            <div id="divChart6" style="width: 100%;height: 400px;"></div>
        </div>
    </div>
    <%--<div class="col-lg-4 col-md-4">--%>
        <%--<div class="ibox shortcut">--%>
            <%--<div id="divChart7" style="width: 100%;height: 400px;"></div>--%>
        <%--</div>--%>
    <%--</div>--%>
</div>
<jsp:include page="../../../common/admin/body_post.jsp"></jsp:include>
</body>
<script type="text/javascript">
    var myChart1 = echarts.init(document.getElementById('divChart1'));

    /*//////////////////////////////////*/
    var myChart2 = echarts.init(document.getElementById('divChart2'));

    /*///////////////////////////////////*/
    var myChart3 = echarts.init(document.getElementById('divChart3'));

    /*///////////////////////////////////*/
    var myChart5 = echarts.init(document.getElementById('divChart5'));

    /*///////////////////////////////////*/
    var myChart6 = echarts.init(document.getElementById('divChart6'));

    /*///////////////////////////////////*/
    //var myChart7 = echarts.init(document.getElementById('divChart7'));


    var renderFunc = function () {
        $.get('<%=basePath%>/admin/progress/getServiceExpenditure.action').done(function (data) {
            // 填入数据
            option = {
                tooltip: {
                    trigger: 'axis'
                },
                title: {
                    text: '人均基本公共服务支出',
                    //subtext: '最新公共服务支出:xxx元/人 \r\n同比值:yyy%'
                },
                legend: {
                    orient: 'vertical',
                    left: 'right',
                    top: 10,
                    data: data.name
                },
                xAxis: [
                    {
                        type: 'category',
                        data: data.dataYear,
                        axisPointer: {
                            type: 'shadow'
                        }
                    }
                ],
                yAxis: {
                    type: 'value'
                },
                series: [
                    {
                        name: '公共支出',
                        type: 'bar',
                        data: data.expenditure
                    },
                    {
                        name: '总支出',
                        type: 'bar',
                        data: data.total
                    },
                ]
            };
            myChart1.setOption(option);
        });

        $.get('<%=basePath%>/admin/progress/getYearsEducation.action').done(function (data) {
            option = {
                title: {
                    text: '平均受教育年限',
                    //subtext:'最新受教育年限:xxx年 同比值:yyy:%'
                },
                tooltip: {
                    trigger: 'axis'
                },
                legend: {
                    orient: 'vertical',
                    left: 'right',
                    top: 15,
                    data: ['年限']
                },
                xAxis: {
                    type: 'category',
                    data: data.dataYear
                },
                yAxis: {
                    type: 'value'
                },
                series: [{
                    name: '年限',
                    data: data.number,
                    type: 'line'
                }]
            };
            myChart2.setOption(option);
        });
        $.get('<%=basePath%>/admin/progress/getSocialSecurity.action').done(function (data) {
            option = {
                title: {
                    text: '社会保障',
                    subtext: '单位:yyy%'
                },
                tooltip: {
                    trigger: 'axis'
                },
                legend: {
                    left: 'right',
                    top: 25,
                    data: data.name
                },
                xAxis: {
                    type: 'category',
                    data: data.dataYear
                },
                yAxis: {
                    type: 'value'
                },
                series: [{
                    name: '保险',
                    data: data.wifi,
                    type: 'line'
                },
                    {
                        name: '农村低保',
                        data: data.reads,
                        type: 'line'
                    },
                    {
                        name: '城市低保',
                        data: data.siG,
                        type: 'line'
                    }]
            };
            myChart3.setOption(option);
        });
        $.get('<%=basePath%>/admin/progress/getChildMortality.action').done(function (data) {
            option = {
                title: {
                    text: '五岁以下儿童死亡率',
                    //subtext:'最新死亡率：xxx‰ 同比数据值:yyy%'
                },
                tooltip: {
                    trigger: 'axis'
                },
                xAxis: {
                    type: 'category',
                    data: data.dataYear
                },
                yAxis: {
                    type: 'value'
                },
                series: [{
                    name: "死亡率",
                    data: data.number,
                    type: 'line'
                }]
            };
            myChart5.setOption(option);
        });
    $.get('<%=basePath%>/admin/progress/getSocialSafety.action').done(function (data) {
        option = {
            title: {
                text: ' 社会安全指数',
            },
            tooltip: {
                formatter: "{a} <br/>{b} : {c}%"
            },
            series: [
                {
                    name: '等级',
                    type: 'gauge',
                    detail: {formatter: '{value}%'},
                    data: data
                }
            ]
        };
        myChart6.setOption(option);
    });
    }
    renderFunc();
</script>
</html>
