提交 920e7405 authored 作者: haodaking's avatar haodaking

chore: 优化报表分析页面样式

上级 9dba3ec2
...@@ -39,10 +39,9 @@ const genderOption = computed(() => { ...@@ -39,10 +39,9 @@ const genderOption = computed(() => {
yAxis: { yAxis: {
data: ['男性', '女性'], data: ['男性', '女性'],
inverse: true, inverse: true,
axisLine: { show: true }, axisLine: { show: false },
axisTick: { show: false }, axisTick: { show: false },
axisLabel: { axisLabel: {
fontSize: 14,
formatter: function (value, index) { formatter: function (value, index) {
const total = gender.value[1] + gender.value[2] const total = gender.value[1] + gender.value[2]
return value + '\n' + (index === 0 ? ((gender.value[1] / total) * 100).toFixed(1) : ((gender.value[2] / total) * 100).toFixed(1)) + '%' return value + '\n' + (index === 0 ? ((gender.value[1] / total) * 100).toFixed(1) : ((gender.value[2] / total) * 100).toFixed(1)) + '%'
...@@ -59,9 +58,9 @@ const genderOption = computed(() => { ...@@ -59,9 +58,9 @@ const genderOption = computed(() => {
{ {
type: 'pictorialBar', type: 'pictorialBar',
symbolRepeat: true, symbolRepeat: true,
symbolSize: ['18', '36'], symbolSize: ['14', '28'],
symbolOffset: [20, 0], symbolOffset: [20, 0],
symbolMargin: 20, symbolMargin: 10,
data: [ data: [
{ value: gender.value[1], symbol: man, itemStyle: { color: '#767aca' } }, { value: gender.value[1], symbol: man, itemStyle: { color: '#767aca' } },
{ value: gender.value[2], symbol: woman, itemStyle: { color: '#d26080' } } { value: gender.value[2], symbol: woman, itemStyle: { color: '#d26080' } }
...@@ -93,6 +92,7 @@ const ageOption = computed(() => { ...@@ -93,6 +92,7 @@ const ageOption = computed(() => {
itemStyle: { itemStyle: {
borderRadius: 6 borderRadius: 6
}, },
radius: [0, '45%'],
data: age.value data: age.value
} }
] ]
...@@ -109,11 +109,17 @@ onMounted(fetchCardLevel) ...@@ -109,11 +109,17 @@ onMounted(fetchCardLevel)
const levelOption = computed(() => { const levelOption = computed(() => {
return { return {
grid: {
left: '20%',
right: '10%'
// bottom: '10%'
},
tooltip: { tooltip: {
trigger: 'axis' trigger: 'axis'
}, },
xAxis: { xAxis: {
type: 'category', type: 'category',
axisLabel: { interval: 0, rotate: 30 },
data: cardLevel.value.map(item => item.group_name) data: cardLevel.value.map(item => item.group_name)
}, },
yAxis: { yAxis: {
...@@ -147,7 +153,7 @@ const monthlyOption = computed(() => { ...@@ -147,7 +153,7 @@ const monthlyOption = computed(() => {
series: [ series: [
{ {
type: 'pie', type: 'pie',
radius: ['55%', '75%'], radius: ['30%', '45%'],
itemStyle: { itemStyle: {
borderRadius: 6 borderRadius: 6
}, },
...@@ -371,11 +377,11 @@ onMounted(fetchCardInstallment) ...@@ -371,11 +377,11 @@ onMounted(fetchCardInstallment)
<h3>信用卡开卡</h3> <h3>信用卡开卡</h3>
<div class="card"> <div class="card">
<div class="item" v-for="(item, index) in cardOpen" :key="index"> <div class="item" v-for="(item, index) in cardOpen" :key="index">
<div class="item-left">{{ item.group_name }}</div> <!-- <div class="item-left">{{ item.group_name }}</div> -->
<div class="item-center"> <div class="item-center">
<p v-if="index === 0">总转换率 {{ item.rate }}%</p> <p v-if="index === 0">总转换率 {{ item.rate }}%</p>
<p v-else>{{ item.rate }}%</p> <p v-else>{{ item.rate }}%</p>
<div class="circle"></div> <div class="circle">{{ item.group_name }}</div>
</div> </div>
<div class="item-right">{{ item.total }}</div> <div class="item-right">{{ item.total }}</div>
</div> </div>
...@@ -385,11 +391,11 @@ onMounted(fetchCardInstallment) ...@@ -385,11 +391,11 @@ onMounted(fetchCardInstallment)
<h3>积分翻倍及消费满减</h3> <h3>积分翻倍及消费满减</h3>
<div class="card"> <div class="card">
<div class="item" v-for="(item, index) in cardIntegral" :key="index"> <div class="item" v-for="(item, index) in cardIntegral" :key="index">
<div class="item-left">{{ item.group_name }}</div> <!-- <div class="item-left">{{ item.group_name }}</div> -->
<div class="item-center"> <div class="item-center">
<p v-if="index === 0">总转换率 {{ item.rate }}%</p> <p v-if="index === 0">总转换率 {{ item.rate }}%</p>
<p v-else>{{ item.rate }}%</p> <p v-else>{{ item.rate }}%</p>
<div class="circle"></div> <div class="circle">{{ item.group_name }}</div>
</div> </div>
<div class="item-right">{{ item.total }}</div> <div class="item-right">{{ item.total }}</div>
</div> </div>
...@@ -399,11 +405,11 @@ onMounted(fetchCardInstallment) ...@@ -399,11 +405,11 @@ onMounted(fetchCardInstallment)
<h3>分期还款</h3> <h3>分期还款</h3>
<div class="card"> <div class="card">
<div class="item" v-for="(item, index) in cardInstallment" :key="index"> <div class="item" v-for="(item, index) in cardInstallment" :key="index">
<div class="item-left">{{ item.group_name }}</div> <!-- <div class="item-left">{{ item.group_name }}</div> -->
<div class="item-center"> <div class="item-center">
<p v-if="index === 0">总转换率 {{ item.rate }}%</p> <p v-if="index === 0">总转换率 {{ item.rate }}%</p>
<p v-else>{{ item.rate }}%</p> <p v-else>{{ item.rate }}%</p>
<div class="circle"></div> <div class="circle">{{ item.group_name }}</div>
</div> </div>
<div class="item-right">{{ item.total }}</div> <div class="item-right">{{ item.total }}</div>
</div> </div>
...@@ -426,7 +432,7 @@ onMounted(fetchCardInstallment) ...@@ -426,7 +432,7 @@ onMounted(fetchCardInstallment)
h3 { h3 {
padding: 10px; padding: 10px;
font-size: 16px; font-size: 16px;
color: #000; color: rgba(0, 0, 0, 0.8);
line-height: 30px; line-height: 30px;
text-align: center; text-align: center;
} }
...@@ -439,7 +445,7 @@ onMounted(fetchCardInstallment) ...@@ -439,7 +445,7 @@ onMounted(fetchCardInstallment)
} }
.box { .box {
flex: 1; flex: 1;
background-color: #eaeaea; background-color: rgba(234, 234, 234, 0.6);
border-radius: 6px; border-radius: 6px;
overflow: hidden; overflow: hidden;
} }
...@@ -463,12 +469,18 @@ onMounted(fetchCardInstallment) ...@@ -463,12 +469,18 @@ onMounted(fetchCardInstallment)
} }
.item-center { .item-center {
position: relative; position: relative;
margin: 40px 10px 0; margin: 40px 0 0;
flex: 1; flex: 1;
height: 40px; height: 40px;
.circle { .circle {
width: 100%; width: 100%;
height: 100%; height: 100%;
font-size: 12px;
color: #fff;
display: flex;
align-items: center;
justify-content: center;
text-align: center;
background-color: #1b41a0; background-color: #1b41a0;
} }
p { p {
...@@ -505,7 +517,6 @@ onMounted(fetchCardInstallment) ...@@ -505,7 +517,6 @@ onMounted(fetchCardInstallment)
} }
} }
.item-right { .item-right {
padding: 0 10px;
font-size: 14px; font-size: 14px;
color: #999; color: #999;
text-align: right; text-align: right;
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论