<!DOCTYPE html>
<html>
    <head>
        <meta charset="UTF-8">
        <title>长处方分析</title>
        <meta name="author" content="yihu.com" />
        <meta name="format-detection" content="telephone=no" />
        <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0" />
        <meta name="apple-mobile-web-app-capable" content="yes" />
        <meta name="apple-mobile-web-app-status-bar-style" content="black" />
        <link rel="stylesheet" type="text/css" href="../../css/font-awesome.min.css"/>
        <link rel="stylesheet" type="text/css" href="../../css/style.min.css"/>
        <link rel="stylesheet" type="text/css" href="../../css/cross.css"/>
        <link rel="stylesheet" type="text/css" href="css/common.css"/>
        <style>
            .chart-center-text{position: absolute; width: 100%; top: 50%; margin-top: -17px;}
        </style>
    </head>
    <body>
        <div id="main">
            <header-tab :appname="appname" :isback="isback" :isrefresh="isrefresh" :isfilter="isfilter" :isopen="isopen" ></header-tab>
            <header-prompt></header-prompt>
            <div v-show="sumType==1" class="order-tag-panel">
                <ul class="l-banner">
                    <li>
                        <div class="tag" :class="{'active': tagCode==1}" @click="changeTagCode(1)">
                            <div class="c-f18">{{orderTagDatas.total}}</div>
                            <div class="mt5 c-f14 l-name">续方总量</div>
                        </div>
                    </li>
                    <li>
                        <div class="tag" :class="{'active': tagCode==2}" @click="changeTagCode(2)">
                            <div class="c-f18">{{orderTagDatas.finishCount}}</div>
                            <div class="mt5 c-f14 l-name">已完成</div>
                        </div>
                    </li>
                    <li>
                        <div class="tag" :class="{'active': tagCode==3}" @click="changeTagCode(3)">
                            <div class="c-f18">{{orderTagDatas.patientCancelCount}}</div>
                            <div class="mt5 c-f14 l-name">居民取消</div>
                        </div>
                    </li>
                </ul>
                <ul class="l-banner">
                    <li>
                        <div class="tag" :class="{'active': tagCode==4}" @click="changeTagCode(4)">
                            <div class="c-f18">{{orderTagDatas.noReviewedCount}}</div>
                            <div class="mt5 c-f14 l-name">审核未通过</div>
                        </div>
                    </li>
                    <li>
                        <div class="tag" :class="{'active': tagCode==5}" @click="changeTagCode(5)">
                            <div class="c-f18">{{orderTagDatas.processingCount}}</div>
                            <div class="mt5 c-f14 l-name">进行中</div>
                        </div>
                    </li>
                    <li>
                        <div class="tag" :class="{'active': tagCode==6}" @click="changeTagCode(6)">
                            <div class="c-f18">{{orderTagDatas.payOuttimeCount}}</div>
                            <div class="mt5 c-f14 l-name">其他原因取消</div>
                        </div>
                    </li>
                </ul>
            </div>
            <div v-show="sumType==2" class="payment-tag-panel">
                <ul class="l-banner">
                    <li style="width:calc(100% / 2)">
                        <div class="tag" :class="{'active': tagCode==1}" @click="changeTagCode(1)" style="width: 60%">
                            <div class="c-f18">{{paymentData.sum}}</div>
                            <div class="mt5 c-f14 l-name">费用总计</div>
                        </div>
                    </li>
                    <li style="width:calc(100% / 2)">
                        <div class="tag" :class="{'active': tagCode==2}" @click="changeTagCode(2)" style="width: 60%">
                            <div class="c-f18">{{paymentData.avg}}</div>
                            <div class="mt5 c-f14 l-name">人均费用</div>
                        </div>
                    </li>
                </ul>
            </div>
            <div v-show="sumType==3">
                <ul class="l-banner">
                    <li>
                        <div class="tag" :class="{'active': tagCode==1}" @click="changeTagCode(1)">
                            <div class="c-f18">{{expressData.self}}</div>
                            <div class="mt5 c-f14 l-name">居民自取</div>
                        </div>
                    </li>
                    <li>
                        <div class="tag" :class="{'active': tagCode==2}" @click="changeTagCode(2)">
                            <div class="c-f18">{{expressData.delivery}}</div>
                            <div class="mt5 c-f14 l-name">物流配送</div>
                        </div>
                    </li>
                    <li>
                        <div class="tag" :class="{'active': tagCode==3}" @click="changeTagCode(3)">
                            <div class="c-f18">{{expressData.doctor}}</div>
                            <div class="mt5 c-f14 l-name">健管师配送</div>
                        </div>
                    </li>
                </ul>
            </div>
            <div v-show="sumType==4" class="mt10 c-border">
                <div class="plr10 ptb10 c-border-b">
                    <span class="c-f14 c-333 ml5">年龄统计</span>
                </div>
                <div class="ui-grid ui-grid-middle">
                    <div class="ui-col-0 ptb10 c-position-r" style="width: 50%">
                        <div class="c-t-center chart-center-text">年龄分布<br/>情况</div>
                        <div id="agePie" style="width: 100%; height:160px;"></div>
                    </div>
                    <div class="ui-col-1" id="fenbuList">
                        <div v-for="age in ageDatas" class="mtb5 ml10">
                            <span class="color-tag" :style="{'background-color': age.color}"></span>
                            <span class="div-jkrq c-f14" :style="{'color': age.color}">{{age.value}}人</span>
                            <span class="c-f12 c-909090 ml5">({{age.name}})</span>
                        </div>
                    </div>
                </div>
            </div>
            
            <bar-chart v-show="sumType==1 || sumType==3" class="mt15" @getbardata="getBarData" :barid="'barChart'+ sumType"></bar-chart>
            
            <line-chart v-show="sumType==2" @getlinedata="getPaymentLineData"></line-chart>
            
            <div v-show="sumType==4" class="mt10 c-border">
                <div class="plr10 ptb10 c-border-b">
                    <span class="c-f14 c-333 ml5">人均使用次数</span>
                </div>
                <div id="ageBar" style="height: 200px; width: 100%;"></div>
            </div>
            
            <area-data-panel class="mt15" @getnewdata="getBottomAreaData"></area-data-panel>
            
            <vuedals></vuedals>
        </div>
        <script src="../../js/vue.js" type="text/javascript" charset="utf-8"></script>
        <script src="../../js/jquery-2.2.4.js" type="text/javascript" charset="utf-8"></script>
        <script src="../../js/es6-promise.js" type="text/javascript" charset="utf-8"></script>
        <script src="../../js/underscore.js" type="text/javascript" charset="utf-8"></script>
        <script src="../../js/util.js" type="text/javascript" charset="utf-8"></script>
        <script src="../../plugins/echarts/3.8.5/echarts.min.js" type="text/javascript" charset="utf-8"></script>
        <script src="../../api/http-request.js" type="text/javascript" charset="utf-8"></script>
        <script src="../../api/statistics-api.js" type="text/javascript" charset="utf-8"></script>
        <script src="../../component/common/event-bus.js"></script>
        <script src="../../component/common/vuedals.js" type="text/javascript" charset="utf-8"></script>
        <script src="../../component/statistics/header-tab.js" type="text/javascript" charset="utf-8"></script>
        <script src="../../component/statistics/header-prompt.js" type="text/javascript" charset="utf-8"></script>
        <script src="../../component/statistics/line-chart.js" type="text/javascript" charset="utf-8"></script>
        <script src="../../component/statistics/bar-chart.js" type="text/javascript" charset="utf-8"></script>
        <script src="../../component/statistics/area-data-panel.js" type="text/javascript" charset="utf-8"></script>
        <script src="../../component/statistics/team-info.js" type="text/javascript" charset="utf-8"></script>
        <script src="js/common.js" type="text/javascript" charset="utf-8"></script>
        <script src="js/prescription-analysis.js" type="text/javascript" charset="utf-8"></script>
    </body>
</html>
