Commit c32fb781 by 胡悦

Merge branch 'v2.1.0' of http://192.168.3.233:8090/h5/glsk-data-view-pd into v2.1.0

2 parents 4dfdbed3 20f34e25
<template> <template>
<div class="user-tab"> <div class="user-tab">
<StatisticsBox class="user" :list="userData"></StatisticsBox> <!-- <StatisticsBox class="user" :list="userData"></StatisticsBox> -->
<!-- <template v-for="(tab, index) in userData"> <div class="statistics user">
<div :class="['tab-item', { active: selectIndex == index }]" :key="index" @click="getTrend(tab.view, tab.text)"> <div :class="['statistics-item', {'item-active': selectIndex == index && selectIndex < 3}]" v-for="(item, index) in userData" :key="index" :style="{'width': 100 / userData.length + '%'}" @click="clickSaasTab(index)">
<div class="tab-title">{{ tab.text }}</div> <div class="statistics-top">
<div class="tab-count text-linear">{{ numAddSymbol(dataList[tab.value]) }}</div> <div class="statistics-name">{{item.name}}</div>
<div class="tab-increase flex-between"> <div class="statistics-price"><span class="statistics-unit" v-if="item.unitType == 'left'">{{item.unit}}</span><span class="statistics-price-number">{{numAddSymbol(item.value)}}</span><span v-if="item.unitType == 'right'">{{item.unit}}</span></div>
<div class="increase-text">当年新增</div> <div v-if="item.rate" class="statistics-top-rate">占比<span>{{item.rate}}%</span></div>
<div class="increase-count">{{ numAddSymbol(dataList[tab.key]) }}</div> </div>
<div class="statistics-bottom" v-if="item.bottomLabel || item.bottomType">
<template v-if="item.bottomType == 'money'">
<span> {{item.bottomLabel}}</span>
<span>¥{{numAddSymbol(item.bottomValue)}}</span>
</template>
<template v-else-if="item.bottomType == 'slot'">
<slot :name="item.valueName" :[item.valueName]="item"></slot>
</template>
<template v-else-if="item.bottomType == 'ratio'">
<div class="ratio">
<div class="ratio-left">{{item.ratioLeftLabel}}<span :class="item.ratioLeftValue > 0 ? 'positive' : 'negative'">{{item.ratioLeftValue}}%</span></div>
<div class="ratio-right">{{item.ratioRightLabel}}<span :class="item.ratioRightValue > 0 ? 'positive' : 'negative'">{{item.ratioRightValue}}%</span></div>
</div>
</template>
<template v-else>
<span>{{item.bottomLabel}}</span>
<span class="bottom-num">{{numAddSymbol(item.bottomValue)}}</span>
</template>
</div>
</div> </div>
</div> </div>
</template> -->
</div> </div>
</template> </template>
...@@ -99,6 +117,10 @@ export default { ...@@ -99,6 +117,10 @@ export default {
this.$bus.$emit('drawPrivateChart', obj) this.$bus.$emit('drawPrivateChart', obj)
} }
}) })
},
clickSaasTab(val) {
if (val > 2) return
this.selectIndex = val
} }
} }
} }
...@@ -107,71 +129,90 @@ export default { ...@@ -107,71 +129,90 @@ export default {
.user-tab { .user-tab {
width: 100%; width: 100%;
height: 9.02vh; height: 9.02vh;
margin: 1.46vh 0 0.98vh 0; margin: 1.22vh 0 0.98vh 0;
/deep/ {
.statistics { .statistics {
display: flex;
color: #fff;
height: 9.51vh; height: 9.51vh;
.statistics-name { &-item {
margin-bottom: 0; padding: 0.49vh 0.53vw;
margin-right: 0.56vw;
background: #061422;
box-shadow: inset 0 0 20px 0 #3d57ff69;
&:last-child {
margin-right: 0;
} }
.statistics-bottom {
margin-top: 0;
} }
} &-top {
}
.tab-item {
cursor: pointer;
width: 9.65vw;
height: 9.02vh;
background: #0b0e31;
margin-right: 0.28vw;
padding: 0.28vh 0;
box-sizing: border-box;
&.active {
border: 1px solid #6578ff;
position: relative; position: relative;
&::after { padding-left: 0.3vw;
content: ''; &-rate {
position: absolute; position: absolute;
bottom: -4px; right: 0;
left: 50%; top: 0;
height: 6px;
width: 6px;
margin-left: -3px;
background: #0b0e31;
border-bottom: 1px solid #6578ff;
border-right: 1px solid #6578ff;
transform: rotate(45deg);
}
}
.tab-title {
font-weight: 400;
font-size: 12px; font-size: 12px;
color: #e8e8e8; color: #95ACD9;
margin: 0 0.69vw; span {
height: 2.07vh; color: #EB6001;
} }
.tab-count { }
font-weight: 700; }
font-size: 22px; &-name {
margin: 0 0.69vw; font-weight: 500;
height: 3.8vh; font-size: 14px;
line-height: 3.8vh; margin-bottom: 0.4vh;
} height: 2.22vh;
.tab-increase { }
height: 2.44vh; &-unit {
border-top: 1px solid #171f60; padding-right: 0.56vw;
padding: 0 0.69vw; }
} &-price {
.increase-text { display: flex;
font-size: 9px; align-items: center;
color: #dddddd; color: #25D6FF;
} font-weight: 600;
.increase-count { font-size: 14px;
font-weight: 700; height: 3.11vh;
&-number {
padding-right: 0.56vw;
font-size: 20px;
color: #5894FF;
background-image:-webkit-linear-gradient(left,#24D8FF,#7787FF);
-webkit-background-clip:text;
-webkit-text-fill-color:transparent;
}
}
&-bottom {
display: flex;
justify-content: space-between;
font-size: 12px; font-size: 12px;
color: #ffffff; color: #95ACD9;
border-top: 1px solid #2A3D72;
padding: 0.4vh 0.3vw 0;
margin-top: 0.4vh;
.ratio {
display: flex;
width: 100%;
justify-content: space-between;
.positive,
.negative{
display: inline-block;
margin-left: 0.28vw;
}
.positive {
color: #EB6001;
}
.negative {
color: #16E193;
}
} }
.bottom-num{
color: #fff;
} }
}
.item-active {
border: 1px solid #24D8FF;
}
}
} }
</style> </style>
...@@ -208,10 +208,11 @@ function getLineOptions(obj) { ...@@ -208,10 +208,11 @@ function getLineOptions(obj) {
}, },
padding: 5, padding: 5,
borderWidth: 0.5, borderWidth: 0.5,
backgroundColor: 'rgba(35, 45, 152, 1)', backgroundColor: '#161C60',
borderRadius: 4, borderRadius: 4,
borderColor: '#089FF1',
textStyle: { textStyle: {
color: 'rgba(255,255,255,1)', color: 'color: #FFFFFF',
fontSize: 10 fontSize: 10
}, },
formatter: function (item) { formatter: function (item) {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!