<!DOCTYPE html>
<html lang=zh-cn>
<head>
    <meta charset=utf-8>
    <title>纵横计量支付系统</title>
    <meta name=description content=计量支付>
    <meta name=copyright content=smartcost.com.cn>
    <link rel=stylesheet href={{rootUrl}}global/css/bootstrap.css>
    <link rel=stylesheet href={{rootUrl}}global/css/style.css>
    <script src={{rootUrl}}global/js/jquery-1.9.1.min.js></script>
    <script src={{rootUrl}}global/js/bootstrap.js></script>
    <script src={{rootUrl}}global/js/jl.js></script>
    <script src={{rootUrl}}global/js/echarts.min.js></script>
</head>
<body style="overflow:auto">
<div class="wrapHeader"><h1 title="纵横计量支付" class="mainLogo"></h1></div>
<div class="mainContent">
    <div class="row-fluid">
        <div class="span7"><h2>{{pname}}</h2>
            <p><span data-icon="n"></span> <a href="{{rootUrl}}share/project/{{hashcode}}">{{rootUrl}}share/project/{{hashcode}}</a>
            </p></div>
        <div class="span5">
            <div class="detail">
                <h5>总价：￥{{pros.bcontracttotal}}元 (<span class="colRed">+￥{{pros.bchangTotal}}</span>)</h5>
                <div class="progress">
                    <div class="progress-bar progress-bar-success" style="width:{{pros.pcurrdone}};">{{pros.pcurrdone}}</div>
                </div>
            </div>
        </div>
    </div>
    <!--项目汇总-->
    <ul class="nav nav-tabs">
        <li class="active">
            <a href="javascript:void(0);">项目汇总</a>
        </li>
    </ul>
    <div class="project">
        <div class="proSection clearfix">
            <!--图表1-->
            <div class="fL" style="width:39%">
                <div id="chartContainer" style="height: 300px; width: 100%;">
                </div>
            </div>
            <!--图表1-->
            <!--图表2-->
            <div class="fR" style="width:59%">
                <div id="chartContainer2" style="height: 300px; width: 100%;">
                </div>
            </div>
            <!--图表2-->
        </div>
        <div class="proSection clearfix">
            <!--图表3-->
            <div id="chartContainer3" style="height: 300px; width: 100%;">
            </div>
            <!--图表3-->
        </div>
    </div>
    <!--标段列表-->
    <ul class="nav nav-tabs">
        <li class="active"><a>标段列表</a></li>
    </ul>
    {{htmlstr}}
</div>
<script type="text/javascript">
    //1 标段计量分布//
    // 基于准备好的dom，初始化echarts图表
    var myChart = echarts.init(document.getElementById('chartContainer'));
    var option = {
        color: ['#e9af68', '#57b7b6', '#e4575a', '#959eac', '#ffa500',
            '#d38b70', '#8fb7cf', '#cd5c5c', '#5c616b', '#40e0d0',
            '#1e90ff', '#ff6347', '#7b68ee', '#00fa9a', '#ffd700',
            '#6699FF', '#ff6666', '#3cb371', '#b8860b', '#30e0e0'],
        title: {
            text: '标段计量分布',
            x: 'left'
        },
        tooltip: {
            trigger: 'item',
            formatter: "{a} <br/>{b}：{c} <br>占总项目：{d} %"
        },
        legend: {
            selectedMode: false,
            orient: 'vertical',
            x: 'left',
            y: 'center',
            data: [
                <!-- loop conArray -->
                '{{conArray' value.stname}}',
                <!-- endloop -->
            ]
        },
        calculable: true,
        series: [
            {
                name: '标段计量分布',
                type: 'pie',
//                roseType: 'angle',
                radius: '60%',
                center: ['60%', 175],
                data: [
                    <!-- loop conArray -->
                    {value: {{conArray' value.total}}, name: '{{conArray' value.stname}}'},
                    <!-- endloop -->
                ]
            }
        ]
    };
    // 为echarts对象加载数据
    myChart.setOption(option);
    //1 标段计量分布//
    //2 标段计量进度//
    var myChart = echarts.init(document.getElementById('chartContainer2'));
    var option = {
        color: ["#e9af68", "#57b7b6", "#e4575a"],
        title: {
            text: '标段计量进度',
        },
        tooltip: {
            trigger: 'axis',
            formatter: "{b}  <br/>{a}：{c}元 <br/>{a1}：{c1}元<br/>{a2}：{c2} %"
        },
        legend: {
            data: ['总价', '累计完成计量', '完成进度百分比']
        },
        xAxis: [
            {
                type: 'category',
                data: [
                    <!-- loop conArray -->
                    '{{conArray' value.stname}}',
                    <!-- endloop -->
                ]
            }
        ],
        yAxis: [
            {
                type: 'value',
                name: '金额',
                position: 'left',
                axisLabel: {
                    formatter: '{value} 元'
                },
                splitArea: {show: true}
            },
            {
                type: 'value',
                position: 'right',
                max: '100',
                axisLabel: {
                    formatter: '{value} %'
                },
                splitArea: {show: false},
                splitLine: {show: false}
            }
        ],
        series: [
            {
                name: '总价',
                type: 'bar',
                data: [
                    <!-- loop conArray -->
                    {{conArray' value.total}},
                    <!-- endloop -->
                ]
            },
            {
                name: '累计完成计量',
                type: 'bar',
                data: [
                    <!-- loop conArray -->
                    {{conArray' value.stopnow}},
                    <!-- endloop -->
                ]
            },
            {
                name: '完成进度百分比',
                type: 'line',
                yAxisIndex: 1,
                data: [
                    <!-- loop conArray -->
                    {{conArray' value.pstopnow}},
                    <!-- endloop -->
                ]
            }
        ]
    };
    // 为echarts对象加载数据
    myChart.setOption(option);
    //2 标段计量进度//
    //3 标段计量分布//
    // 基于准备好的dom，初始化echarts图表
    var myChart = echarts.init(document.getElementById('chartContainer3'));
    var option = {
        color: ["#e9af68", "#57b7b6"],
        title: {
            text: '项目按月进度'
        },
        tooltip: {
            trigger: 'axis',
            formatter: "{b} <br/>{a}：{c} %<br/>{a1}：{c1} %"
        },
        legend: {
            data: ['累计完成', '本月完成']
        },
        toolbox: {
            show: true,
            feature: {
                magicType: {show: true, type: ['line', 'bar']}
            }
        },
        dataZoom: {
            show: true,
            start: 0,
            end: 100
        },
        xAxis: [
            {
                type: 'category',
                boundaryGap: true,
                data: [
                    {{projectDate}}
                ]
            }
        ],
        yAxis: [
            {
                type: 'value',
                axisLabel: {
                    formatter: '{value} %'
                },
                splitArea: {show: true}
            }
        ],
        series: [
            {
                name: '累计完成',
                type: 'line',
                itemStyle: {
                    normal: {
                        lineStyle: {
                            shadowColor: 'rgba(0,0,0,0.4)',
                            shadowBlur: 5,
                            shadowOffsetX: 3,
                            shadowOffsetY: 3
                        }
                    }
                },
                data: [
                    {{t1}}
                ]
            },
            {
                name: '本月完成',
                type: 'line',
                itemStyle: {
                    normal: {
                        lineStyle: {
                            shadowColor: 'rgba(0,0,0,0.4)',
                            shadowBlur: 5,
                            shadowOffsetX: 3,
                            shadowOffsetY: 3
                        }
                    }
                },
                data: [
                        {{t2}}
                        ]
            }
        ]
    };


    // 为echarts对象加载数据
    myChart.setOption(option);
    //3 标段计量分布//
</script>
</body>