<template>
    <div v-if="pageLoading">
		<el-main>
			<el-card shadow="never">
				<el-skeleton :rows="5"></el-skeleton>
			</el-card>
			<el-card shadow="never" style="margin-top: 15px;">
				<el-skeleton></el-skeleton>
			</el-card>
		</el-main>
	</div>
    <el-main>
        <div class="card-news mt0">
            <div class="total-panel">
                <div :class="this.$store.state.global.ismobile?'panel-item m':'panel-item'">
                    <div class="item-warp">
                        <div class="left">
                            <div class="title">达人</div>
                            <div class="number" v-if="hideState==1">{{ $TOOL.money(todayData.userNum) }}</div>
                            <div class="number" v-else>0.00</div>
                            <div class="desc"></div>
                        </div>
                        <div class="right"><img src="@/assets/image/wave-4-icon.png" /></div>
                    </div>
                </div>
                <div :class="this.$store.state.global.ismobile?'panel-item m':'panel-item'">
                    <div class="item-warp">
                        <div class="left">
                            <div class="title">任务</div>
                            <div class="number" v-if="hideState==1">{{ $TOOL.money(todayData.userNum) }}</div>
                            <div class="number" v-else>0.00</div>
                            <div class="desc"></div>
                        </div>
                        <div class="right"><img src="@/assets/image/wave-4-icon.png" /></div>
                    </div>
                </div>
                <div :class="this.$store.state.global.ismobile?'panel-item m':'panel-item'">
                    <div class="item-warp">
                        <div class="left">
                            <div class="title">投稿</div>
                            <div class="number" v-if="hideState==1">{{ $TOOL.money(todayData.userNum) }}</div>
                            <div class="number" v-else>0.00</div>
                            <div class="desc"></div>
                        </div>
                        <div class="right"><img src="@/assets/image/wave-4-icon.png" /></div>
                    </div>
                </div>
                <div :class="this.$store.state.global.ismobile?'panel-item m':'panel-item'">
                    <div class="item-warp">
                        <div class="left">
                            <div class="title">待审核</div>
                            <div class="number" v-if="hideState==1">{{ $TOOL.money(todayData.userNum) }}</div>
                            <div class="number" v-else>0.00</div>
                            <div class="desc"></div>
                        </div>
                        <div class="right"><img src="@/assets/image/wave-4-icon.png" /></div>
                    </div>
                </div>
            </div>
        </div>
        <el-row :gutter="20">
            <el-col :span="this.$store.state.global.ismobile?24:8" :xs="24">
                <div class="card-news mt10"> <!---评论数-->
                    <scEcharts height="500px" :option="option"></scEcharts>
                </div>
            </el-col>
            <el-col :span="this.$store.state.global.ismobile?24:16" :xs="24">
                <div class="card-news mt10"> <!---阅读量-->
                    <scEcharts height="500px" :option="option2"></scEcharts>
                </div>
            </el-col>
        </el-row>
        <div class="card-news mt10">
            <div class="news-title">内容排行</div>
            <div class="mt10">
                <el-row :gutter="20">
                    <el-col :span="this.$store.state.global.ismobile?24:12">
                        <el-card header="最新文章" shadow="never"></el-card>
                    </el-col>
                    <el-col :span="this.$store.state.global.ismobile?24:12">
                        <el-card header="最新文章" shadow="never"></el-card>
                    </el-col>
                </el-row>
            </div>
        </div>
    </el-main>
</template>

<script>
import scEcharts from '@/components/scEcharts';
export default {
    components: {
        scEcharts
    },
    data() {
        return {
            pageLoading:false,
            option2: {
                title: {
                    left: 'left', 
                    text: '评论量',
                },
                grid: {
                    top: '80px'
                },
                tooltip: {trigger: 'axis', show: true, axisPointer: {type: 'cross', label: {}}},
                grid: [{left: '5%', right: '3%', top: '15%', bottom: '5%'}],
                xAxis: [{data: ['1','2','3','4','5'], gridIndex: 0}],
                yAxis: [
                    {
                        splitLine: {show: true}, gridIndex: 0, type: 'value', axisLabel: {
                            formatter: '{value}'
                        }
                    }
                ],
                series: [
                    {
                        smooth: true, showBackground: true,
                        areaStyle: {color: 'rgba(180, 180, 180, 0.5)'},
                        type: 'line', showSymbol: true, xAxisIndex: 0, yAxisIndex: 0,
                        label: {normal: {position: 'top', formatter: '{c}', show: true}},
                        data:['10','2','3','4','1'],
                    }
                ]
            },
            option: {
                title: {
                    left: 'left', 
                    text: '访问量',
                },
                grid: {
                    top: '80px'
                },
                tooltip: {trigger: 'axis', show: true, axisPointer: {type: 'cross', label: {}}},
                grid: [{left: '5%', right: '3%', top: '15%', bottom: '5%'}],
                xAxis: [{data: ['1','2','3','4','5'], gridIndex: 0}],
                yAxis: [
                    {
                        splitLine: {show: true}, gridIndex: 0, type: 'value', axisLabel: {
                            formatter: '{value}'
                        }
                    }
                ],
                series: [
                    {
                        smooth: true, showBackground: true,
                        areaStyle: {color: 'rgba(180, 180, 180, 0.5)'},
                        type: 'bar', showSymbol: true, xAxisIndex: 0, yAxisIndex: 0,
                        label: {normal: {position: 'top', formatter: '{c} 条', show: true}},
                        data:['10','2','3','4','1'],
                    }
                ]
            },
        }
    }
}
</script>

<style>

<style>
.myMods {list-style:none;margin:-10px;}
.myMods li {display: inline-block;width: 11.5%;height:100px;vertical-align: top;transition:all 0.3s ease;margin:10px;border-radius:5px;color: #333;}
.myMods li:hover {opacity: 0.8;}
.myMods li a {width: 100%;height: 100%;padding:10px;display: flex;flex-direction: column;align-items: center;justify-content: center;text-align: center;color: #333;}
.myMods li i {font-size: 26px;color: #333;}
.myMods li p {font-size: 12px;color: #333;margin-top: 10px;width: 100%;white-space:nowrap;text-overflow:ellipsis;overflow: hidden;}
.mt0 {
    margin-top: 0;
}
.service-item {
    border: 1px solid #EAE9F0;
    padding: 12px 14px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    flex: 1;
}
.service-item .item-sub{
    width: 40%;
}
.service-item .right-btn {
    margin-left: auto;
}
.service-item img {
    width: 44px;
    height: 54px;
    margin-right: 20px;
}
.service-item h3 {
    font-size: 14px;
    color: #000000d9;
    margin-bottom: 8px;
}
.service-item p {
    font-size: 13px;
    color: #333333d9;
}
.service-item .value{
    font-size: 18px;
    color: #f64945;
    font-weight: 700;
    margin-left: auto;
}
.service-item .value span {
    font-weight: normal;
    color: #666;
    font-size: 12px;
}
.service-tel {
    display: flex;
    align-items: center;
    margin-top: 20px;
}
.service-tel img{
    width: 32px;
    height: 32px;
    margin-right: 12px;
}
.service-tel span{
    font-size: 20px;
    font-weight: 500;
    color: #35f;
}
.total-panel .panel-item.bg-gray .item-warp .left{
    padding: 12px 24px;
}
.total-panel .panel-item.bg-gray {
    background-color: #F7F9FC;
    height: 104px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    color: #fff;
}
.total-panel .panel-item.bg-gray .item-warp.img .title {color: #fff;}
.total-panel .panel-item.bg-gray .item-warp.img .number{color: #fff;}
.total-panel .panel-item.bg-gray .item-warp.img .desc{color: #fff;}
.total-panel .panel-item.bg-gray .number{
    font-size: 24px;
}
.total-panel .panel-item.bg-gray .number span{
    font-size: 14px;
    margin-left: 10px;
}
.total-panel .panel-item.bg-gray .title{
    margin-bottom: 7px;
}
.total-panel-sub .sub-card {
    border: 1px solid #EAE9F0;
}
.total-panel-sub .sub-card .title{
    font-size: 14px;
    color: #000000;
    font-weight: bold;
    margin: 22px 0 12px 22px;
}
.total-panel-sub .sub-card .title.red{
    display: flex;
    align-items: center;
}
.card-news .date-check{
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 99;
}
.total-panel-sub .sub-card .title.red::before{
    content: "";
    display: block;
    width: 4px;
    height: 4px;
    border-radius: 4px;
    background-color: #f64945;
    margin-right: 6px;
}
.total-panel-sub .sub-card .sub-content{
    display: flex;
    align-items: stretch;
    justify-content: space-between;
    padding: 0px 22px 22px 22px;
}
.sub-box {
    width: calc((100% - 24px) / 3);
    padding: 12px 16px 12px 16px;
    background: #FFFFFF;
    box-shadow: 0px 0px 10px 0px rgba(203, 203, 203, 0.25);
    border-radius: 6px;
    box-sizing: border-box;
}
.sub-box .row1 {
    display: flex;
    align-items: center;
    line-height: 1;
    margin-bottom: 10px;
}
.sub-box .row2 {
    font-size: 24px;
    color: #333333;
    font-weight: bold;
    margin-bottom: 10px;
}
.sub-box .row2.red{
    color: #f00;
}
.sub-box .row2 span {
    margin-left: 10px;
    font-size: 14px;
}
.sub-box .row3 {
    font-size: 14px;
    color: #666666;
}
.sub-box .row1 img{
    width: 15px;
    height: auto;
    margin-right: 8px;
}
.sub-box .row1 span{
    font-size: 14px;
    color: #333333;
}
.total-panel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    margin-top: 16px;
}
.total-panel .panel-item.m{
    width: calc(100% - 9.6px);
    margin-bottom: 10px;
}
.total-panel .panel-item{
    width: calc(25% - 9.6px);
    position: relative;
    border-radius: 6px;
    border:1px solid #e3e8ee;
}
.total-panel .panel-item .item-warp .left {
    padding:16px 0px 0px 23px;
}
.total-panel .panel-item .item-warp .right {
    width: 32px;
    height: 32px;
    margin: 13px 14px 0px 0px;
}
.total-panel .panel-item .item-warp .right img{
    width:100%;
    height:100%;
    display:block;
}
.total-panel .panel-item .item-warp{
    position: relative;
    z-index: 10;
    display: flex;
    justify-content: space-between;
}
.total-panel .panel-item .item-wave {
    position: absolute;
    left: 0px;
    right: 0px;
    bottom: 0px;
    width: 100%;
    height: auto;
    z-index: 9;
    top: 0;
}
.total-panel .panel-item .item-wave img {
    width: 100%;
    height: 100%;
}
.total-panel .panel-item .title{
    font-size: 14px;
    color: rgb(51, 51, 51);
    margin-bottom: 18px;
    font-weight: 500;
}
.total-panel .panel-item .number{
    font-size: 26px;
    margin-bottom: 7px;
    font-weight: 700;
    color: rgb(51, 51, 51);
}
.total-panel .panel-item .desc{
    font-size: 13px;
    color: rgb(102, 102, 102);
}
.total-panel .panel-item .number span{
    font-size: 16px;
    font-weight: normal;
}
.panel-line{
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
}
.panel-line span{
    width: 1px;
    background-color: #f0f0f0;
    height: 60%;
    display: block;
}
.card-news{
    background-color: #fff;
    padding: 20px;
    border-radius: 5px;
    position: relative;
}
.news-title{
    font-size: 16px;
    color: #000;
    font-weight: bold;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
}
.news-title .title-open{
    margin-left: auto;
    margin-right: 0;
    font-size: 12px;
    font-weight: normal;
    color: #666;
    display: flex;
    align-items: center;
}
.news-title .title-open .name{
    margin-right: 10px;
}
.news-title::before{
    content: "";
    width: 4px;
    height: 16px;
    display: block;
    background-color: var(--el-color-primary);;
    margin-right: 8px;
}
.date-title{display:flex; align-items:center;line-height:40px;position: relative;}
.date-title .dot{
    width: 5px;
    height: 5px;
    background: var(--el-color-primary);
    border-radius: 100%;
    margin-right: 10px;
}
.date-time{
    font-size: 12px;
    color: #666;
    margin-left: auto;
    margin-right: 0;
}
</style>
