@extends('admin.master')

@section('style')
<link href="{{ asset('data/assets/css/pie.css') }}" rel="stylesheet">
<style>
.sun .content-box {
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    padding: 0;
    min-height: auto;
}
</style>
@endsection

@section('top')
<div class="top-breadcrumb">
    <h5>系统信息</h5>
</div>
@endsection

@section('content')
<div class="main-box" id="text-content">
    <div class="main-box-one">
        <div class="main-box-one__item">
            <div class="main-box-one__item-icon"><i class="iconfont icon-quyutu"></i></div>
            <div class="main-box-one__item-text">
                <div class="main-box-one__item-text-title">访问量</div>
                <div class="main-box-one__item-text-num">
                    <template v-if="loadvisit">
                        <span v-text="visit.pv"></span>
                    </template>
                    <template v-else>
                        <i class="demo-spin-icon-load iview-icon iview-icon-load-c font-20" style="color: #fff;"></i>
                    </template>
                </div>
                <a href="{{ url('/admin/statistic/visit') }}">去查看 <i class="iconfont icon-jiantou-copy-copy"></i></a>
            </div>
        </div>
        <div class="main-box-one__item">
            <div class="main-box-one__item-icon"><i class="iconfont icon-a-gouwudai21"></i></div>
            <div class="main-box-one__item-text">
                <div class="main-box-one__item-text-title">产品数量</div>
                <div class="main-box-one__item-text-num">
                    <template v-if="loadvisit">
                        <span v-text="total.product"></span>
                    </template>
                    <template v-else>
                        <i class="demo-spin-icon-load iview-icon iview-icon-load-c font-20" style="color: #fff;"></i>
                    </template>
                </div>
                <a href="{{ url('/admin/product') }}">去查看 <i class="iconfont icon-jiantou-copy-copy"></i></a>
            </div>
        </div>
        <div class="main-box-one__item">
            <div class="main-box-one__item-icon"><i class="iconfont icon-a-jiaoyiqingdan11"></i></div>
            <div class="main-box-one__item-text">
                <div class="main-box-one__item-text-title">新闻数量</div>
                <div class="main-box-one__item-text-num">
                    <template v-if="loadvisit">
                        <span v-text="total.news"></span>
                    </template>
                    <template v-else>
                        <i class="demo-spin-icon-load iview-icon iview-icon-load-c font-20" style="color: #fff;"></i>
                    </template>
                </div>
                <a href="{{ url('/admin/news') }}">去查看 <i class="iconfont icon-jiantou-copy-copy"></i></a>
            </div>
        </div>
        <div class="main-box-one__item">
            <div class="main-box-one__item-icon"><i class="iconfont icon-a-pinglun11"></i></div>
            <div class="main-box-one__item-text">
                <div class="main-box-one__item-text-title">询盘数量</div>
                <div class="main-box-one__item-text-num">
                    <template v-if="loadvisit">
                        <span v-text="total.message"></span>
                    </template>
                    <template v-else>
                        <i class="demo-spin-icon-load iview-icon iview-icon-load-c font-20" style="color: #fff;"></i>
                    </template>
                </div>
                <a href="{{ url('/admin/message') }}">去查看 <i class="iconfont icon-jiantou-copy-copy"></i></a>
            </div>
        </div>
    </div>
    <div class="main-box-two">
        <div class="main-box-two__infos main-box-item">
            <div class="main-box-two__infos-title">基本信息</div>
            <ul class="main-box-two__infos-list">
                <li class="main-box-two__infos-list-item">
                    <span>用户身份</span>
                    <span>{{ auth()->user()->getRoles()->first()->name }}</span>
                </li>
                <li class="main-box-two__infos-list-item">
                    <span>登录IP</span>
                    <span>{{ request()->ip() }}</span>
                </li>
                <li class="main-box-two__infos-list-item">
                    <span>上次登录时间</span>
                    <span>{{ auth()->user()->updated_at }}</span>
                </li>
                <li class="main-box-two__infos-list-item">
                    <span>系统版本</span>
                    <span>{{ config('setting.version') }}</span>
                </li>
            </ul>
        </div>
        <div class="main-box-two__infos main-box-item">
            <div class="main-box-two__infos-title">套餐信息</div>
            <ul class="main-box-two__infos-list">
                <li class="main-box-two__infos-list-item">
                    <span>网站名称</span>
                    <span v-text="setting.name"></span>
                </li>
                <li class="main-box-two__infos-list-item">
                    <div class="meal-type">
                        <span>套餐版本</span>
                        <span v-text="setting.package">
                            <i slot="load" class="demo-spin-icon-load iview-icon iview-icon-load-c"></i>
                        </span>
                    </div>
                    <span v-text="'剩余翻译字符：' + setting.translate_number">
                        <i slot="load" class="demo-spin-icon-load iview-icon iview-icon-load-c"></i>
                    </span>
                </li>
                <li class="main-box-two__infos-list-item">
                    <span v-text="'服务年限:' + setting.year + '年'"><i slot="load" class="demo-spin-icon-load iview-icon iview-icon-load-c"></i></span>
                    <span v-text="'海关点数：' + setting.customs_data_number">
                        <i slot="load" class="demo-spin-icon-load iview-icon iview-icon-load-c"></i>
                    </span>
                </li>
                <li class="main-box-two__infos-list-item">
                    <span>服务开始时间</span>
                    <span v-text="setting.started_at"><i slot="load" class="demo-spin-icon-load iview-icon iview-icon-load-c"></i></span>
                </li>
            </ul>
        </div>
        <div class="main-box-two__echarts main-box-item">
          <div class="main-box-two__infos-title">
            关键词图示
            <a :href="'http://121.41.51.146/#/show-rank/waimao/' + setting.domain" target="_blank" style="margin-left: 15px">查看排名</a>
            <div class="search-at">查询时间：<span v-text="additional ? additional.searched_at : ''"></span></div>
          </div>
          <div class="total-rank"><span>谷歌排名总数： </span><strong v-text="additional ? additional.count[1] : 0"></strong> 个</div>
          <div class="rank-flex">
            <div class="title">关键词排名结果</div>
            <a href="{{ url('/admin/statistic/keyword') }}">查看更多</a>
          </div>
          <table class="table table-hover mt-20">
            <thead>
            <tr>
              <th width="80">序号</th>
              <th>关键词</th>
              <th>排名</th>
            </tr>
            </thead>
            <tbody>
            <template v-if="rankList && rankList.data.length > 0">
              <tr v-for="(item, index) in rankList.data" :key="item.id">
                <td class="text-center">
                  <template v-if="rankList.current_page == 1">
                    <span v-text="index + 1"></span>
                  </template>
                  <template v-else>
                    <span v-text="index + 1 + rankList.per_page*(rankList.current_page - 1)"></span>
                  </template>
                </td>
                <td>
                  <a class="btn-link" :title="item.keyword" :href="'https://www.google.com/search?q=' + encodeURI(item.keyword)" target="_blank">
                    <span v-text="item.keyword.substring(0,60)"></span>
                    <i v-if="item.keyword.length > 60">...</i>
                  </a>
                </td>
                <td>
                  <template v-if="item.page == 1">
                    <span class="changeblue inline-block padding-0-8">首：@{{ item.num }}</span>
                  </template>
                  <template v-else-if="item.page == 2">
                    <span class="changegray inline-block padding-0-8">二：@{{ item.num }}</span>
                  </template>
                  <template v-else-if="item.page == 3">
                    <span class="changegray inline-block padding-0-8">三：@{{ item.num }}</span>
                  </template>
                  <template v-else>
                    <span>0</span>
                  </template>
                </td>
              </tr>
            </template>
            <template v-else>
              <tr>
                <td class="len-full text-center" colspan="9">
                  <div class="alert alert-danger" id="default-alert" role="alert" style="justify-content: center;">
                    <span class="glyphicon glyphicon-exclamation-sign" aria-hidden="true"></span>
                    <span class="sr-only">Error:</span>
                    暂无排名数据显示！
                  </div>
                </td>
              </tr>
            </template>
            </tbody>
          </table>
        </div>
    </div>
    
    <div class="main-box-five main-box-item mb-15">
        <div class="main-box-five__title">全球服务器区域</div>
        <div class="main-box-five__box">
            <img class="main-box-five__box-img" src="{{ asset('data/assets/images/wordarea/word.png') }}" alt="">
            <div class="main-box-five__box-item main-box-five__box-item-en">
                <div class="main-box-five__box-item-address"><img src="{{ asset('data/assets/images/wordarea/address.png') }}" alt=""></div>
                <div class="main-box-five__box-item-main main-box-five__box-item-main-top">
                    <div class="main-box-five__box-item-main-title">
                        <img src="{{ asset('data/assets/images/wordarea/en.png') }}" alt="">
                        <span>美国·硅谷</span>
                    </div>
                    <div class="main-box-five__box-item-main-ip">IP:47.254.19.78</div>
                </div>
            </div>
            <div class="main-box-five__box-item main-box-five__box-item-de">
                <div class="main-box-five__box-item-address"><img src="{{ asset('data/assets/images/wordarea/address.png') }}" alt=""></div>
                <div class="main-box-five__box-item-main main-box-five__box-item-main-left">
                    <div class="main-box-five__box-item-main-title">
                        <img src="{{ asset('data/assets/images/wordarea/de.png') }}" alt="">
                        <span>德国·法兰克福</span>
                    </div>
                    <div class="main-box-five__box-item-main-ip">IP:194.87.227.26</div>
                </div>
            </div>
            <div class="main-box-five__box-item main-box-five__box-item-ru">
                <div class="main-box-five__box-item-address"><img src="{{ asset('data/assets/images/wordarea/address.png') }}" alt=""></div>
                <div class="main-box-five__box-item-main main-box-five__box-item-main-bottom">
                    <div class="main-box-five__box-item-main-title">
                        <img src="{{ asset('data/assets/images/wordarea/ru.png') }}" alt="">
                        <span>俄罗斯</span>
                    </div>
                    <div class="main-box-five__box-item-main-ip">IP:194.87.106.128</div>
                </div>
            </div>
            <div class="main-box-five__box-item main-box-five__box-item-zh">
                <div class="main-box-five__box-item-address"><img src="{{ asset('data/assets/images/wordarea/address.png') }}" alt=""></div>
                <div class="main-box-five__box-item-main main-box-five__box-item-main-left">
                    <div class="main-box-five__box-item-main-title">
                        <img src="{{ asset('data/assets/images/wordarea/zh.png') }}" alt="">
                        <span>中国·香港</span>
                    </div>
                    <div class="main-box-five__box-item-main-ip">IP:8.218.255.26</div>
                </div>
            </div>
            <div class="main-box-five__box-item main-box-five__box-item-sing">
                <div class="main-box-five__box-item-address"><img src="{{ asset('data/assets/images/wordarea/address.png') }}" alt=""></div>
                <div class="main-box-five__box-item-main main-box-five__box-item-main-top">
                    <div class="main-box-five__box-item-main-title">
                        <img src="{{ asset('data/assets/images/wordarea/sing.png') }}" alt="">
                        <span>新加坡</span>
                    </div>
                    <div class="main-box-five__box-item-main-ip">IP:192.124.176.189</div>
                </div>
            </div>
            <div class="main-box-five__box-item main-box-five__box-item-britain">
                <div class="main-box-five__box-item-address"><img src="{{ asset('data/assets/images/wordarea/address.png') }}" alt=""></div>
                <div class="main-box-five__box-item-main main-box-five__box-item-main-right">
                    <div class="main-box-five__box-item-main-title">
                        <img src="{{ asset('data/assets/images/wordarea/britain.png') }}" alt="">
                        <span>英国·伦敦</span>
                    </div>
                    <div class="main-box-five__box-item-main-ip">IP:91.149.202.237</div>
                </div>
            </div>
            <div class="main-box-five__box-item main-box-five__box-item-alq">
                <div class="main-box-five__box-item-address"><img src="{{ asset('data/assets/images/wordarea/address.png') }}" alt=""></div>
                <div class="main-box-five__box-item-main main-box-five__box-item-main-top">
                    <div class="main-box-five__box-item-main-title">
                        <img src="{{ asset('data/assets/images/wordarea/alq.png') }}" alt="">
                        <span>阿联酋</span>
                    </div>
                    <div class="main-box-five__box-item-main-ip">IP:91.132.48.189</div>
                </div>
            </div>
        </div>
    </div>

    <div class="main-box-three">
        <div class="main-box-three__langs main-box-item">
            <div class="main-box-title">
                <h3>我的多语言营销网站</h3>
                <a href="{{ url('admin/lang') }}">去管理 <i class="iconfont icon-jiantou-copy-copy"></i></a>
            </div>
            <ul class="main-box-three__langs-lists">
                <li v-for="item in langs" :key="item.id" :class="item.buy == 1 ? '' : 'no'">
                    <a :href="item.buy == 1 ? item.url : 'javascript:;'" target="_blank" :title="item.name">
                        <template v-if="item.buy == 1">
                            <img :src="item.img">
                        </template>
                        <template v-else>
                            <svg>
                                <image xmlns:xlink="http://www.w3.org/1999/xlink" :xlink:href="item.img" x="0" y="0" width="70" height="48" filter="url('#grayscale')"></image>
                            </svg>
                        </template>
                    </a>
                </li>
            </ul>
            <div class="main-box-three__langs-tips">
                <i class="iconfont icon-xinxi2"></i> 亮色代表已经开通此语种。
            </div>
        </div>
        <div class="main-box-three__echarts main-box-item">
            <div class="main-box-title">
                <h3>站点健康指数</h3>
            </div>

            <div class="main-box-three__echarts-pie">
                @if(isset($config['test_score']))
                    <div class="pie" id="base-pie"></div>
                @else
                    <div class="no-data">暂无检测数据</div>
                @endif
            </div>
            <div class="main-box-three__echarts-text">
                <p>优化网站信息有助于提高网站优化效果</p>
                <p>时间：<span>{{ substr($config['test_time'] ?? '', 0 , 10) }}</span></p>
                <a href="{{ url('admin/detection') }}">查看详情</a>
            </div>
        </div>
    </div>
    <div class="main-box-four">
        <div class="main-box-four__echarts main-box-item">
            <div class="main-box-title">
                <h3>最近30天浏览/访客量</h3>
            </div>
            <div id="main" style="height:300px;"></div>
        </div>
        <div class="main-box-four__news main-box-item">
            <div class="main-box-title">
                <h3>在线资讯</h3>
                <a href="{{ url('admin/train-news') }}">更多 <i class="iconfont icon-jiantou-copy-copy"></i></a>
            </div>

            <template v-if="loadNews">
                <i class="demo-spin-icon-load iview-icon iview-icon-load-c font-20"></i>
            </template>
            <template v-else>
                <ul class="main-box-four__news-list">
                    <li v-for='(item, index) in content' :key='item.id'>
                        <a :href="homeUrl + '/admin/train-news/' + item.id" :title="item.title" target="_blank">
                            <span>@{{ item.title.substring(0,15) }}</span>
                            <span v-if="item.title.length > 15">...</span>
                        </a>
                        <span class="main-box-four__news-list-time hidden-xs">@{{ item.created_at.substring(0,10) }}</span>
                    </li>
                </ul>
            </template>
        </div>
    </div>
</div>
@endsection

@section('texts')
@endsection

@section('foot')
<script src="{{ asset('data/assets/js/echarts.min.js') }}"></script>
<script src="{{ asset('data/assets/js/pie1.0.js') }}"></script>
<script>
var apiUrl  = "{{ config('setting.api_url') }}";
var si      = "{{ inject('setting')->config('appid') }}";
var today   = "{{ date('Y-m-d') }}";
var month   = "{{ date('Y-m-d', strtotime('-29 day')) }}";
var urlPath = "{{ config('setting.api_url') }}" + "/content";
var percent = "{{ $config['test_score'] ?? 0 }}";
var checkTime = "{{ $config['test_time'] ?? '' }}";

new Vue({
    el: '#text-content',
    data: {
        homeUrl: HOME_URL,
        total: {},
        visit: {},
        setting: {},
        content: {},
        video: {},
        videoTop: {},
        langs: [],
        loadLang: false,
        loadvisit: false,
        loadNews: true,
        loadVideo: true,
        loadVideoTop: true,
        contentText: '',
        keyPage1: 0,
        keyPage2: 0,
        keyPage3: 0,
        additional: null,
        rankList: null,
    },
    created: function() {
        this.load();
    },
	mounted: function() {
        var that = this;
		this.myChart = echarts.init(document.getElementById('main'));
        this.myChart.showLoading();
        this.loadEchart(month, today);
        window.onresize = function sizes() {
            that.myChart.resize();
        };        
	},
    methods: {
        load: function() {
            var _this = this;
            $.get(_this.homeUrl + '/admin/ajax/lang', {action: 'totals'}, function(res) {
                if (res.status == 'success') {
                    _this.total = res.data;
                }
            });
            $.get(apiUrl + '/setting', function(res) {
                if (res.status == 'success') {
                    res.data.domain = res.data.domain.replace(/\/$/g, '');
                    _this.setting = res.data;
                }
            });
            $.get(apiUrl + '/visit', function(res) {
                _this.loadvisit = true;
                _this.visit = res;
            });
            $.get(_this.homeUrl + '/admin/ajax/lang', {action: 'langs'}, function(res) {
                if (res.status == 'success') {
                    _this.langs = res.data;
                    _this.loadLang = true;
                }
            });
            $.ajax({
                type: "GET",
                url: urlPath,
                data: {"table": "article", "recom": 1, "limit": 7},
                success: function(json) {
                    _this.loadNews = false;
                    _this.content  = json.data;
                }
            });
            $.ajax({
                type: "GET",
                url: urlPath,
                data: {"table": "training", "recom": 1, "limit": 7},
                success: function(json) {
                    _this.loadVideo = false;
                    _this.video     = json.data;
                }
            });
            $.ajax({
                type: "GET",
                url: urlPath,
                data: {"table": "training", "recom": 2, "limit": 1},
                success: function(json) {
                    _this.loadVideoTop = false;
                    _this.videoTop     = json.data;
                }
            });
            $.get(apiUrl + '/rank', {page: 1, limit: 4}, function(res) {
                if (res.status == 'success') {
                    _this.additional = res.data;
                    _this.rankList   = res.data.data;
                }
            });
        },
        loadEchart: function(startTime, endTime) {
			var _this = this;
            $.get(apiUrl + '/visitByDay', {"si": si, "fromDate": startTime, "toDate": endTime}, function(res) {
                _this.option(res);
            });
		},
        loadKeyword: function() {
            var _this = this;
            $.get(apiUrl + '/keyword', function(res) {
                if (res.status == 'success') {
                    if (res.data.length < 1) {
                        var yesterday   = '{{ date('Y-m-d', strtotime('-1 day')) }}';
                        res.data = [{key: yesterday, page1: 0, page2: 0, page3: 0}];
                    }
                    var key = res.data.length;
                    var num = 1;
                    var ranking = {};
                    for (var i = 0; i < key; i++) {
                        if (res.data[key - num]) {
                            ranking = res.data[key - num];
                            break;
                        }
                        num ++ ;
                    }
                    _this.ranking(ranking);
                    _this.keyword(res.data);
                }
            });
        },
        contact: function(data, keys, intercept) {
			var arr = [];
            intercept = intercept ? intercept : 0;
			for ($i = 0; $i < data.length; $i++) {
                if (intercept != 0) {
                    data[$i][keys] = data[$i][keys].substring(intercept);
                }
				arr.push(data[$i][keys]);
			}
			return arr;
		},
        send: function() {
            var _this = this;
            $.ajax({
                type: "POST", 
                url: apiUrl + '/feedback',
                data: {"content": _this.contentText},
                success: function(data) {
                    if (data.status == 'success') {
                        _this.contentText = '';
                        swal({
                            title: "", 
                            text: "信息提交成功！",
                            type: "success",
                            confirmButtonText: '确定',
                        });
                    } else {
                        swal({
                            title: "", 
                            text: "信息提交失败，请重新提交！",
                            type: "error",
                            confirmButtonText: '确定',
                        });
                    }
                }
            });
        },
		option: function(json) {
			this.options = {
				tooltip : {
					trigger: 'axis',
					axisPointer: {
						type: 'cross',
						label: {
							backgroundColor: '#999'
						}
					}
				},
				legend: {
					data: ['浏览量PV','访问量UV']
				},
				toolbox: {
                    right: '1%',
				},
				grid: {
					left: '1.5%',
					right: '2%',
					bottom: '3%',
					containLabel: true
				},
				xAxis : [
					{
						type : 'category',
						boundaryGap : false,
						data : this.contact(json, 'key', 5)
					}
				],
				yAxis : [
					{
						type : 'value'
					}
				],
				series : [
					{
						name:'浏览量PV',
						type:'line',
						stack: '总量',
						symbolSize: 6,
                        smooth: true,
						areaStyle: {normal: {
							color: "#cce9fe",
						}},
						itemStyle: {normal: {
							color: "#cce9fe",
						}},
						data: this.contact(json, 'pv')
					},
                    {
						name:'访问量UV',
						type:'line',
						stack: '总量',
						symbolSize: 6,
                        smooth: true,
						areaStyle: {normal: {
							color: "#44acfc",
						}},
						itemStyle: {normal: {
							color: "#44acfc",
						}},
						data: this.contact(json, 'uv')
					}
				]
			};
			this.myChart.hideLoading();
			this.myChart.setOption(this.options);
		},
        keyword: function(json) {
            this.keyPage1 = this.contact(json, 'page1')[0]
            this.keyPage2 = this.contact(json, 'page2')[0]
            this.keyPage3 = this.contact(json, 'page3')[0]
            var option  = {
                tooltip: {
                    trigger: 'axis'
                },
                legend: {
                    data:['第一页','第二页','第三页']
                },
                grid: {
                    left: '1.5%',
                    right: '2%',
                    bottom: '3%',
                    containLabel: true
                },
                toolbox: {
                    right: '1%',
                },
                xAxis: {
                    type: 'category',
                    boundaryGap: false,
                    data: this.contact(json, 'key', 5)
                },
                yAxis: {
                    type: 'value',
                    axisLine: {
                        show: false
                    },
                    splitNumber: 5
                },
                series: [
                    {
                        name:'第一页',
                        type:'line',
                        stack: '第一页',
                        itemStyle: {normal: {
                            color: "#00ca74",
                        }},
                        data: this.contact(json, 'page1')
                    },
                    {
                        name:'第二页',
                        type:'line',
                        stack: '第二页',
                        itemStyle: {normal: {
                            color: "#7b83e4",
                        }},
                        data: this.contact(json, 'page2')
                    },
                    {
                        name:'第三页',
                        type:'line',
                        stack: '第三页',
                        itemStyle: {normal: {
                            color: "#0088dd",
                        }},
                        data: this.contact(json, 'page3')
                    }
                ]
            };
            this.keywordChart.hideLoading();
            this.keywordChart.setOption(option);
        },
        ranking: function(json) {
            var option = {
                tooltip: {
                    trigger: 'item',
                    formatter: '{b}: {c} ({d}%)'
                },
                legend: {
                    orient: 'vertical',
                    x: 'right',
                    data:['第一页','第二页','第三页']
                },
                title: [{
                    text: '合计',
                    left: '39%',
                    top: '40%',
                    textAlign: 'center',
                    textBaseline: 'middle',
                    textStyle: {
                        color: '#999',
                        fontWeight: 'normal',
                        fontSize: 18
                        }
                    }, {
                        text: json.page1 + json.page2 + json.page3,
                        left: '39%',
                        top: '53%',
                        textAlign: 'center',
                        textBaseline: 'middle',
                        textStyle: {
                            color: '#666',
                            fontWeight: 'normal',
                            fontSize: 20
                    }
                }],
                series: [{
                    hoverAnimation: false,
                    radius: ['45%', '80%'],
                    center: ['40%', '50%'],
                    name: 'pie',
                    type: 'pie',
                    selectedMode: 'single',
                    selectedOffset: 16,
                    clockwise: true,
                    startAngle: 90,
                    label: {
                        normal: {
                             show: false
                        }
                    },
                    labelLine: {
                        normal: {
                            show: false
                        }
                    },
                    itemStyle: {
                        normal: {
                            borderWidth: 5,
                            borderColor: '#ffffff',
                        },
                        emphasis: {
                            borderWidth: 0,
                            shadowBlur: 0,
                            shadowOffsetX: 0,
                            shadowColor: 'rgba(0, 0, 0, 0.2)'
                        }
                    },
                    data:[
                        {
                            value: json.page1,
                            name:'第一页',
                            itemStyle: {
                                normal: {
                                    color: '#00ca74',
                                }
                            }
                        },
                        {
                            value: json.page2,
                            name:'第二页',
                            itemStyle: {
                                normal: {
                                    color: '#7b83e4',
                                }
                            }
                        },
                        {
                            value: json.page3,
                            name:'第三页',
                            itemStyle: {
                                normal: {
                                    color: '#0088dd',
                                }
                            }
                        },
                    ]
                 }]
             };
        
            this.contentChart.hideLoading();
            this.contentChart.setOption(option);
        }
    }
});
//评分饼状图
var pie1 = new Pie({
    el: '#base-pie',
    number: true,
    animite: true,
    color: '#a48ad4',
    ring: 0.7
});
pie1.init(percent);
//
$(".global-area").click(function () {
    $("#global-area").modal()
})
</script>
@endsection