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>
<div class="user-tab">
<StatisticsBox class="user" :list="userData"></StatisticsBox>
<!-- <template v-for="(tab, index) in userData">
<div :class="['tab-item', { active: selectIndex == index }]" :key="index" @click="getTrend(tab.view, tab.text)">
<div class="tab-title">{{ tab.text }}</div>
<div class="tab-count text-linear">{{ numAddSymbol(dataList[tab.value]) }}</div>
<div class="tab-increase flex-between">
<div class="increase-text">当年新增</div>
<div class="increase-count">{{ numAddSymbol(dataList[tab.key]) }}</div>
<!-- <StatisticsBox class="user" :list="userData"></StatisticsBox> -->
<div class="statistics user">
<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="statistics-top">
<div class="statistics-name">{{item.name}}</div>
<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 v-if="item.rate" class="statistics-top-rate">占比<span>{{item.rate}}%</span></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>
</template> -->
</div>
</div>
</template>
......@@ -99,6 +117,10 @@ export default {
this.$bus.$emit('drawPrivateChart', obj)
}
})
},
clickSaasTab(val) {
if (val > 2) return
this.selectIndex = val
}
}
}
......@@ -107,71 +129,90 @@ export default {
.user-tab {
width: 100%;
height: 9.02vh;
margin: 1.46vh 0 0.98vh 0;
/deep/ {
.statistics {
height: 9.51vh;
.statistics-name {
margin-bottom: 0;
}
.statistics-bottom {
margin-top: 0;
}
margin: 1.22vh 0 0.98vh 0;
.statistics {
display: flex;
color: #fff;
height: 9.51vh;
&-item {
padding: 0.49vh 0.53vw;
margin-right: 0.56vw;
background: #061422;
box-shadow: inset 0 0 20px 0 #3d57ff69;
&:last-child {
margin-right: 0;
}
}
.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;
&::after {
content: '';
position: absolute;
bottom: -4px;
left: 50%;
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;
&-top {
position: relative;
padding-left: 0.3vw;
&-rate {
position: absolute;
right: 0;
top: 0;
font-size: 12px;
color: #e8e8e8;
margin: 0 0.69vw;
height: 2.07vh;
}
.tab-count {
font-weight: 700;
font-size: 22px;
margin: 0 0.69vw;
height: 3.8vh;
line-height: 3.8vh;
color: #95ACD9;
span {
color: #EB6001;
}
}
.tab-increase {
height: 2.44vh;
border-top: 1px solid #171f60;
padding: 0 0.69vw;
}
&-name {
font-weight: 500;
font-size: 14px;
margin-bottom: 0.4vh;
height: 2.22vh;
}
&-unit {
padding-right: 0.56vw;
}
&-price {
display: flex;
align-items: center;
color: #25D6FF;
font-weight: 600;
font-size: 14px;
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;
}
.increase-text {
font-size: 9px;
color: #dddddd;
}
&-bottom {
display: flex;
justify-content: space-between;
font-size: 12px;
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;
}
}
.increase-count {
font-weight: 700;
font-size: 12px;
color: #ffffff;
.bottom-num{
color: #fff;
}
}
.item-active {
border: 1px solid #24D8FF;
}
}
}
</style>
......@@ -208,10 +208,11 @@ function getLineOptions(obj) {
},
padding: 5,
borderWidth: 0.5,
backgroundColor: 'rgba(35, 45, 152, 1)',
backgroundColor: '#161C60',
borderRadius: 4,
borderColor: '#089FF1',
textStyle: {
color: 'rgba(255,255,255,1)',
color: 'color: #FFFFFF',
fontSize: 10
},
formatter: function (item) {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!