|
|
@@ -1,9 +1,9 @@
|
|
|
<template>
|
|
|
<Card :title="title" :subTitle="subTitle" :icon="icon" class="online-pay-week">
|
|
|
- <div class="info margin-r-20">
|
|
|
+ <div class="info margin-r-20" v-if="showInfo">
|
|
|
<div class="title">
|
|
|
<p class="p1">线上缴费</p>
|
|
|
- <p class="p2">周热度统计</p>
|
|
|
+ <p class="p2 margin-tg-20">周热度统计</p>
|
|
|
<p class="p3">(近12月周平均)</p>
|
|
|
</div>
|
|
|
<div class="legend">
|
|
|
@@ -11,7 +11,7 @@
|
|
|
<span class="legend1-color"></span>
|
|
|
<span>日线上缴费</span>
|
|
|
</p>
|
|
|
- <p class="legend2">
|
|
|
+ <p class="legend2 margin-tg-20">
|
|
|
<span class="legend2-color"></span>
|
|
|
<span>日占比</span>
|
|
|
</p>
|
|
|
@@ -21,13 +21,12 @@
|
|
|
</p>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <div ref="onlinePayWeekBar" class="online-pay-week-bar"></div>
|
|
|
+ <div ref="onlinePayWeekBar" class="online-pay-week-bar flex-1"></div>
|
|
|
</Card>
|
|
|
</template>
|
|
|
<script>
|
|
|
import * as echarts from 'echarts'
|
|
|
-// import { getBigNumberWithUint } from '@/libs/tools.js'
|
|
|
-import Card from '@/views/components/card'
|
|
|
+import Card from '@/views/hui-jia/components/card'
|
|
|
import icon from './images/icon-title.png'
|
|
|
|
|
|
export default {
|
|
|
@@ -35,6 +34,16 @@ export default {
|
|
|
components: {
|
|
|
Card
|
|
|
},
|
|
|
+ props: {
|
|
|
+ showMarkPoint: {
|
|
|
+ type: Boolean,
|
|
|
+ default: () => true
|
|
|
+ },
|
|
|
+ showInfo: {
|
|
|
+ type: Boolean,
|
|
|
+ default: () => true
|
|
|
+ }
|
|
|
+ },
|
|
|
data () {
|
|
|
return {
|
|
|
title: '线上缴费周热度',
|
|
|
@@ -60,7 +69,7 @@ export default {
|
|
|
initChart () {
|
|
|
const myChart = echarts.init(this.$refs.onlinePayWeekBar)
|
|
|
const xAxisData = ['周一', '周二', '周三', '周四', '周五', '周六', '周日']
|
|
|
- const seriesData = [5, 20, 36, 10, 10, 20, 40]
|
|
|
+ const seriesData = [10, 20, 36, 10, 10, 20, 40]
|
|
|
let all = seriesData.reduce((total, num) => {
|
|
|
return Number(total) + Number(num)
|
|
|
})
|
|
|
@@ -113,7 +122,7 @@ export default {
|
|
|
show: false
|
|
|
},
|
|
|
grid: {
|
|
|
- top: '40px',
|
|
|
+ top: this.showMarkPoint ? '10%' : '6%',
|
|
|
bottom: '0px',
|
|
|
left: '0px',
|
|
|
right: '0px',
|
|
|
@@ -137,7 +146,7 @@ export default {
|
|
|
cap: 'round'
|
|
|
}
|
|
|
},
|
|
|
- boundaryGap: false,
|
|
|
+ boundaryGap: true,
|
|
|
axisTick: {
|
|
|
alignWithLabel: true,
|
|
|
length: 7,
|
|
|
@@ -226,17 +235,20 @@ export default {
|
|
|
borderWidth: 3
|
|
|
},
|
|
|
lineStyle: {
|
|
|
- opacity: 0
|
|
|
+ // opacity: 0
|
|
|
+ color: '#3D7BF8',
|
|
|
+ width: 2
|
|
|
},
|
|
|
markPoint: {
|
|
|
- symbol: 'path://m 0,0 h 48 a 5 5 0 0 1 4 4 v 20 a 5 5 0 0 1 -4 4 h -18 l -5,5 l -5,-5 h -18 a 5 5 0 0 1 -4 -4 v -20 a 5 5 0 0 1 4 -4 z', // 带下箭头的圆角矩形
|
|
|
+ // symbol: 'none',
|
|
|
+ symbol: this.showMarkPoint ? 'path://m 0,0 h 48 a 5 5 0 0 1 4 4 v 20 a 5 5 0 0 1 -4 4 h -18 l -5,5 l -5,-5 h -18 a 5 5 0 0 1 -4 -4 v -20 a 5 5 0 0 1 4 -4 z' : 'none', // 带下箭头的圆角矩形
|
|
|
symbolSize: function (val) {
|
|
|
- return [textSize(val, '14px').width + 20, 35] // 设置宽高
|
|
|
+ return [textSize(val, '14px').width + 20, 55] // 设置宽高
|
|
|
},
|
|
|
itemStyle: {
|
|
|
- color: '#262BB3' // 背景颜色
|
|
|
+ color: '#262BB3' // %值的背景颜色
|
|
|
},
|
|
|
- symbolOffset: ['0', '-70%'], // 相对位置
|
|
|
+ symbolOffset: ['0', '-30%'], // 相对位置
|
|
|
symbolKeepAspect: true, // 是否保持宽高比
|
|
|
label: {
|
|
|
position: 'insideTop',
|
|
|
@@ -266,9 +278,8 @@ export default {
|
|
|
data: lineData
|
|
|
},
|
|
|
{
|
|
|
- name: '线上流水',
|
|
|
type: 'bar',
|
|
|
- barWidth: '23%',
|
|
|
+ barWidth: '25%',
|
|
|
labelLine: {
|
|
|
show: false
|
|
|
},
|
|
|
@@ -290,14 +301,14 @@ export default {
|
|
|
@import '@/assets/css/function.scss';
|
|
|
.online-pay-week-bar {
|
|
|
width: 100%;
|
|
|
- height: halfH(350);
|
|
|
+ // height: halfH(350);
|
|
|
}
|
|
|
.online-pay-week {
|
|
|
.card-body{
|
|
|
display: flex;
|
|
|
.info{
|
|
|
width: halfW(160);
|
|
|
- height: halfH(350);
|
|
|
+ // height: calc(100% - halfH(60));
|
|
|
border: 1px solid rgba(0, 123, 211, 0.2);
|
|
|
border-radius: halfW(5) halfH(5);
|
|
|
display: flex;
|
|
|
@@ -321,7 +332,7 @@ export default {
|
|
|
.title{
|
|
|
// height: halfH(125);
|
|
|
flex: 1;
|
|
|
- line-height: halfH(40);
|
|
|
+ // line-height: halfH(40);
|
|
|
|
|
|
}
|
|
|
.legend{
|
|
|
@@ -329,7 +340,7 @@ export default {
|
|
|
background: #111C30;
|
|
|
font-size: halfW(14);
|
|
|
flex: 1;
|
|
|
- line-height: halfH(40);
|
|
|
+ // line-height: halfH(40);
|
|
|
.legend1-color, .legend2-color{
|
|
|
display: inline-block;
|
|
|
width: halfW(20);
|