Commit 2c09aa13 by 杨明

fixed

1 parent 0a41d3ce
......@@ -488,6 +488,22 @@
"tslib": "^2.0.3"
}
},
"echarts": {
"version": "5.4.0",
"resolved": "https://registry.npmjs.org/echarts/-/echarts-5.4.0.tgz",
"integrity": "sha512-uPsO9VRUIKAdFOoH3B0aNg7NRVdN7aM39/OjovjO9MwmWsAkfGyeXJhK+dbRi51iDrQWliXV60/XwLA7kg3z0w==",
"requires": {
"tslib": "2.3.0",
"zrender": "5.4.0"
},
"dependencies": {
"tslib": {
"version": "2.3.0",
"resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.0.tgz",
"integrity": "sha512-N82ooyxVNm6h1riLCoyS9e3fuJ3AMG2zIZs2Gd1ATcSFjSA23Q0fzjjZeh0jbJvWVDZ0cJT8yaNNaaXHzueNjg=="
}
}
},
"error-ex": {
"version": "1.3.2",
"resolved": "https://registry.npmmirror.com/error-ex/-/error-ex-1.3.2.tgz",
......@@ -1425,6 +1441,21 @@
"resolved": "https://registry.npmmirror.com/yaml/-/yaml-1.10.2.tgz",
"integrity": "sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg==",
"dev": true
},
"zrender": {
"version": "5.4.0",
"resolved": "https://registry.npmjs.org/zrender/-/zrender-5.4.0.tgz",
"integrity": "sha512-rOS09Z2HSVGFs2dn/TuYk5BlCaZcVe8UDLLjj1ySYF828LATKKdxuakSZMvrDz54yiKPDYVfjdKqcX8Jky3BIA==",
"requires": {
"tslib": "2.3.0"
},
"dependencies": {
"tslib": {
"version": "2.3.0",
"resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.0.tgz",
"integrity": "sha512-N82ooyxVNm6h1riLCoyS9e3fuJ3AMG2zIZs2Gd1ATcSFjSA23Q0fzjjZeh0jbJvWVDZ0cJT8yaNNaaXHzueNjg=="
}
}
}
}
}
.wrapper-header {
position: relative;
.img-title {
width: 100%;
}
.img-product {
bottom: 0px;
width: 438px;
height: 191px;
}
.img-cloud {
width: 100%;
bottom: -11px;
}
.img-gold {
width: 623px;
bottom: 90px;
}
.store-name {
top: 242px;
font-size: 32px;
font-weight: 600;
color: #ffffff;
line-height: 32px;
text-shadow: 6px 0px 8px #db4427;
letter-spacing: 10px;
}
.activty-status {
display: inline-block;
padding: 10px 35px;
font-size: 26px;
font-weight: 500;
color: #ffefea;
line-height: 32px;
letter-spacing: 2px;
background-image: linear-gradient(0deg, #ff2028, #ff694b);
border-radius: 8px;
top: 292px;
}
}
.wrapper-output {
position: relative;
margin-top: 46px;
font-size: 0;
.box-header {
position: relative;
.img-title {
&-bg {
width: 100%;
}
.img-product {
bottom: 0px;
width: 438px;
height: 191px;
}
.img-cloud {
&-text {
top: 13px;
display: flex;
align-items: center;
justify-content: center;
width: 100%;
bottom: -11px;
}
.img-gold {
width: 623px;
bottom: 90px;
}
.store-name {
top: 242px;
font-size: 32px;
font-weight: 600;
color: #ffffff;
line-height: 32px;
text-shadow: 6px 0px 8px #db4427;
letter-spacing: 10px;
img {
width: 40px;
height: 16px;
}
}
.activty-status {
display: inline-block;
padding: 10px 35px;
font-size: 26px;
&-title {
font-size: 36px;
font-weight: 500;
color: #ffefea;
line-height: 32px;
letter-spacing: 2px;
background-image: linear-gradient(0deg, #ff2028, #ff694b);
border-radius: 8px;
top: 292px;
color: #ffffff;
line-height: 63px;
margin: 0 15px;
}
}
.wrapper-output {
position: relative;
margin-top: 46px;
font-size: 0;
.box-header {
.box-body {
background-image: url("@/assets/images/activityReport/box-bg.png");
background-repeat: repeat-y;
background-size: 100%;
// height: 1000px;
margin-top: -1px;
padding: 0 35px;
.ratio-box {
display: flex;
position: relative;
&-bg {
width: 100%;
}
&-text {
top: 13px;
width: 100%;
.ratio-left,
.ratio-right {
display: flex;
align-items: center;
width: 50%;
height: 50px;
font-size: 22px;
font-weight: 400;
color: #262525;
line-height: 32px;
justify-content: center;
width: 100%;
img {
width: 40px;
height: 16px;
}
}
&-title {
font-size: 36px;
font-weight: 500;
color: #ffffff;
line-height: 63px;
margin: 0 15px;
.ratio-left {
border-radius: 10px 0px 0px 10px;
background-image: linear-gradient(0deg, #ffd7b7 0%, #ffebdb 100%);
}
.ratio-right {
border-radius: 0 10px 10px 0;
background-image: linear-gradient(0deg, #feaea5 0%, #ffe2db 99%);
}
.ratio-vs {
position: absolute;
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
width: 72px;
height: 100%;
}
.ratio-number {
color: #ff333a;
font-size: 26px;
font-weight: 600;
}
}
.box-body {
background-image: url("@/assets/images/activityReport/box-bg.png");
background-repeat: repeat-y;
background-size: 100%;
// height: 1000px;
margin-top: -1px;
padding: 0 35px;
.ratio-box {
display: flex;
position: relative;
width: 100%;
.ratio-left,
.ratio-right {
.box-funnel {
position: relative;
text-align: center;
margin-top: 40px;
.img-funnel {
width: 517px;
height: 324px;
}
.funnel-content {
top: 0;
width: 517px;
height: 324px;
font-size: 24px;
font-weight: 400;
color: #444444;
line-height: 32px;
.funnel-item {
display: flex;
align-items: center;
width: 50%;
height: 50px;
font-size: 22px;
font-weight: 400;
color: #262525;
line-height: 32px;
justify-content: center;
height: 76px;
margin-bottom: 8px;
.funnel-value {
color: #ff3339;
font-weight: 600;
font-size: 28px;
}
}
.ratio-left {
border-radius: 10px 0px 0px 10px;
background-image: linear-gradient(0deg, #ffd7b7 0%, #ffebdb 100%);
}
}
.box-percentage {
margin-top: 50px;
.percentage-bar {
position: relative;
height: 75px;
}
.bar {
position: absolute;
background: linear-gradient(360deg, #ffaa48 0%, #fff454 100%);
display: inline-flex;
align-items: flex-end;
justify-content: center;
box-shadow: inset 0px -1px 3px 0px #fe9d24, inset 0px 2px 3px 0px rgba(255, 255, 255, 0.5),
inset 0px 1px 3px 0px rgba(255, 255, 255, 0.5);
padding: 14px 15px;
margin-bottom: 20px;
border-radius: 5px;
box-shadow: inset 0px -1px 3px 0px #fe9d24, inset 0px 2px 3px 0px rgba(255, 255, 255, 0.5),
inset 0px 1px 3px 0px rgba(255, 255, 255, 0.5);
transform: translateX(-50%);
.icon-flash {
display: inline-block;
width: 17px;
height: 24px;
background: url("@/assets/images/activityReport/icon-flash.png") no-repeat;
background-size: 17px 24px;
margin-right: 10px;
}
.ratio-right {
border-radius: 0 10px 10px 0;
background-image: linear-gradient(0deg, #feaea5 0%, #ffe2db 99%);
.number {
font-size: 26px;
font-weight: 600;
color: #ff343a;
line-height: 20px;
}
.ratio-vs {
.arrow {
position: absolute;
border-top: 14px solid #ffaa48;
border-left: 14.5px solid transparent;
border-right: 14.5px solid transparent;
border-bottom: 14px solid transparent;
bottom: -27px;
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
width: 72px;
height: 100%
transform: translateX(-50%);
}
.ratio-number {
color: #ff333a;
font-size: 26px;
font-weight: 600;
.right {
left: 80%;
}
}
.box-funnel {
.progress-box {
width: 100%;
height: 38px;
border-radius: 30px;
background-image: linear-gradient(0deg, #ff4444, #fd6c6c);
.progress-line {
position: relative;
font-size: 0;
// width: 50%;
height: 100%;
border-radius: 30px;
background-image: linear-gradient(0deg, #ffaa48, #fff454);
box-shadow: 0px 0px 10px 0px #ffc158;
overflow-x: hidden;
&::after {
content: "";
display: inline-block;
width: 100%;
height: 100%;
background-image: url("@/assets/images/activityReport/icon-line.png");
background-repeat: repeat-x;
background-size: 56px 40px;
}
}
}
}
.box-activty {
margin-top: 15px;
width: 100%;
text-align: center;
.activty-text {
font-size: 24px;
font-weight: 500;
color: #262525;
line-height: 32px;
.activty-flag {
color: #ff363b;
font-size: 32px;
font-size: 600;
}
}
.activty-tip {
width: 678px;
font-size: 22px;
font-weight: 400;
color: #666666;
line-height: 36px;
margin-top: 11px;
}
}
// 排行榜
.ranking-title {
display: inline-flex;
align-items: center;
background: linear-gradient(90deg, #ffcebf 0%, #fff6ea 100%);
border-radius: 20px;
font-size: 22px;
font-weight: 400;
color: #333333;
line-height: 22px;
padding: 9px 21px;
margin-top: 10px;
img {
width: 30px;
height: 17px;
margin-right: 10px;
}
}
.box-ranking {
display: flex;
padding: 20px 16px 10px;
.ranking-item {
display: flex;
position: relative;
width: calc((100% - 271px) / 2);
height: 284px;
margin-right: 26px;
text-align: center;
margin-top: 40px;
.img-funnel {
width: 517px;
height: 324px;
flex-direction: column;
align-items: center;
justify-content: flex-end;
&:last-child {
margin-right: 0;
}
.funnel-content {
.icon-second {
width: 82px;
height: 102px;
bottom: 126px;
}
.second-bg {
width: 191px;
height: 141px;
}
.icon-first {
width: 100px;
height: 127px;
top: 0;
width: 517px;
height: 324px;
font-size: 24px;
}
.department {
width: 120px;
height: 32px;
background: url("@/assets/images/activityReport/bg-department.png") no-repeat;
background-size: 120px 32px;
font-size: 22px;
font-weight: 400;
color: #444444;
color: #ffffff;
line-height: 32px;
.funnel-item {
display: flex;
align-items: center;
justify-content: center;
height: 76px;
margin-bottom: 8px;
.funnel-value {
color: #ff3339;
font-weight: 600;
font-size: 28px;
}
}
}
}
.box-percentage {
margin-top: 50px;
.percentage-bar {
position: relative;
height: 75px;
.second-department {
bottom: 87px;
}
.bar {
position: absolute;
background: linear-gradient(360deg, #ffaa48 0%, #fff454 100%);
display: inline-flex;
align-items: flex-end;
justify-content: center;
box-shadow: inset 0px -1px 3px 0px #fe9d24,
inset 0px 2px 3px 0px rgba(255, 255, 255, 0.5),
inset 0px 1px 3px 0px rgba(255, 255, 255, 0.5);
padding: 14px 15px;
margin-bottom: 20px;
border-radius: 5px;
box-shadow: inset 0px -1px 3px 0px #fe9d24,
inset 0px 2px 3px 0px rgba(255, 255, 255, 0.5),
inset 0px 1px 3px 0px rgba(255, 255, 255, 0.5);
transform: translateX(-50%);
.icon-flash {
display: inline-block;
width: 17px;
height: 24px;
background: url("@/assets/images/activityReport/icon-flash.png") no-repeat;
background-size: 17px 24px;
margin-right: 10px;
}
.number {
font-size: 26px;
font-weight: 600;
color: #ff343a;
line-height: 20px;
}
.arrow {
position: absolute;
border-top: 14px solid #ffaa48;
border-left: 14.5px solid transparent;
border-right: 14.5px solid transparent;
border-bottom: 14px solid transparent;
bottom: -27px;
left: 50%;
transform: translateX(-50%);
}
.right {
left: 80%;
}
.first-department {
bottom: 126px;
}
.progress-box {
width: 100%;
height: 38px;
border-radius: 30px;
background-image: linear-gradient(0deg, #ff4444, #fd6c6c);
.progress-line {
position: relative;
font-size: 0;
// width: 50%;
height: 100%;
border-radius: 30px;
background-image: linear-gradient(0deg, #ffaa48, #fff454);
box-shadow: 0px 0px 10px 0px #ffc158;
overflow-x: hidden;
&::after {
content: "";
display: inline-block;
width: 100%;
height: 100%;
background-image: url("@/assets/images/activityReport/icon-line.png");
background-repeat: repeat-x;
background-size: 56px 40px;
}
.first-box-order {
padding-bottom: 54px;
}
.first-bg {
width: 219px;
height: 161px;
padding-bottom: 20px;
img {
width: 100%;
}
}
}
.box-activty {
margin-top: 15px;
width: 100%;
text-align: center;
.activty-text {
font-size: 24px;
font-weight: 500;
color: #262525;
line-height: 32px;
.activty-flag {
color: #ff363b;
font-size: 32px;
font-size: 600;
}
.first-item {
width: 219px;
}
}
.ranking-table {
}
.ranking-employee {
display: flex;
align-items: center;
font-size: 20px;
text-align: center;
height: 274px;
padding-top: 20px;
box-sizing: border-box;
.employee-item {
position: relative;
width: calc((100% - 20px) / 3);
margin-right: 10px;
&:last-child {
margin-right: 0;
}
.activty-tip {
width: 678px;
font-size: 22px;
font-weight: 400;
color: #666666;
line-height: 36px;
margin-top: 11px;
.first-bg {
display: flex;
align-items: flex-end;
width: 100%;
height: 192px;
background: linear-gradient(0deg, #ffe1c8 0%, #fff2e0 100%);
border-radius: 10px;
}
}
// 排行榜
.ranking-title {
display: inline-flex;
align-items: center;
background: linear-gradient(90deg, #ffcebf 0%, #fff6ea 100%);
border-radius: 20px;
font-size: 22px;
font-weight: 400;
color: #333333;
line-height: 22px;
padding: 9px 21px;
margin-top: 10px;
img {
width: 30px;
height: 17px;
margin-right: 10px;
.second-bg {
display: flex;
align-items: flex-end;
width: 100%;
height: 172px;
background: linear-gradient(0deg, #ffe1c8 0%, #fff2e0 100%);
border-radius: 10px;
}
}
.box-ranking {
display: flex;
padding: 20px 16px 10px;
.ranking-item {
.avatar-bg {
display: flex;
position: relative;
width: calc((100% - 271px) / 2);
height: 284px;
margin-right: 26px;
text-align: center;
flex-direction: column;
justify-content: center;
align-items: center;
justify-content: flex-end;
&:last-child {
margin-right: 0;
}
.icon-second {
width: 82px;
height: 102px;
bottom: 126px;
}
.second-bg {
width: 191px;
height: 141px;
}
.icon-first {
width: 100px;
height: 127px;
top: 0;
}
.department {
width: 120px;
height: 32px;
background: url("@/assets/images/activityReport/bg-department.png")
no-repeat;
background-size: 120px 32px;
font-size: 22px;
font-weight: 400;
color: #ffffff;
line-height: 32px;
}
.second-department {
bottom: 87px;
}
.first-department {
bottom: 126px;
}
.first-box-order {
padding-bottom: 54px;
}
.first-bg {
width: 219px;
height: 161px;
padding-bottom: 20px;
img {
width: 100%;
}
}
}
.first-item {
width: 219px;
.first-avatar-bg {
top: -33px;
width: 140px;
height: 140px;
background: url("@/assets/images/activityReport/first-avatar-bg.png") no-repeat;
background-size: 140px;
}
.second-avatar-bg {
top: -32px;
width: 120px;
height: 120px;
background: url("@/assets/images/activityReport/second-avatar-bg.png") no-repeat;
background-size: 120px;
}
.third-avatar-bg {
top: -32px;
width: 120px;
height: 120px;
background: url("@/assets/images/activityReport/third-avatar-bg.png") no-repeat;
background-size: 120px;
}
.avatar {
width: 90px;
height: 90px;
border-radius: 50%;
}
.first-avatar {
width: 110px;
height: 110px;
border-radius: 50%;
}
.icon-diamond {
position: absolute;
right: 0;
top: 0;
width: 53px;
height: 48px;
}
.first-diamond {
width: 60px;
height: 53px;
}
}
.ranking-table {
}
.ranking-employee {
display: flex;
align-items: center;
}
.box-order {
width: 100%;
padding-bottom: 24px;
.order {
font-size: 20px;
text-align: center;
height: 274px;
padding-top: 20px;
box-sizing: border-box;
.employee-item {
position: relative;
width: calc((100% - 20px) / 3);
margin-right: 10px;
&:last-child {
margin-right: 0;
}
.first-bg {
display: flex;
align-items: flex-end;
width: 100%;
height: 192px;
background: linear-gradient(0deg, #ffe1c8 0%, #fff2e0 100%);
border-radius: 10px;
}
.second-bg {
display: flex;
align-items: flex-end;
width: 100%;
height: 172px;
background: linear-gradient(0deg, #ffe1c8 0%, #fff2e0 100%);
border-radius: 10px;
}
.avatar-bg {
display: flex;
justify-content: center;
align-items: center;
}
.first-avatar-bg {
top: -33px;
width: 140px;
height: 140px;
background: url("@/assets/images/activityReport/first-avatar-bg.png")
no-repeat;
background-size: 140px;
}
.second-avatar-bg {
top: -32px;
width: 120px;
height: 120px;
background: url("@/assets/images/activityReport/second-avatar-bg.png")
no-repeat;
background-size: 120px;
}
.third-avatar-bg {
top: -32px;
width: 120px;
height: 120px;
background: url("@/assets/images/activityReport/third-avatar-bg.png")
no-repeat;
background-size: 120px;
}
.avatar {
width: 90px;
height: 90px;
border-radius: 50%;
}
.first-avatar {
width: 110px;
height: 110px;
border-radius: 50%;
}
.icon-diamond {
position: absolute;
right: 0;
top: 0;
width: 53px;
height: 48px;
}
.first-diamond {
width: 60px;
height: 53px;
}
font-weight: 400;
color: #444444;
line-height: 20px;
&:first-child {
margin-bottom: 11px;
}
}
.box-order {
width: 100%;
padding-bottom: 24px;
.order {
font-size: 20px;
font-weight: 400;
color: #444444;
line-height: 20px;
&:first-child {
margin-bottom: 11px;
}
.order-value {
color: #ff333a;
font-size: 22px;
}
.order-value {
color: #ff333a;
font-size: 22px;
}
}
}
.box-footer {
margin-top: 0;
img {
width: 100%;
}
}
.box-footer {
margin-top: 0;
img {
width: 100%;
}
}
.wrapper-code {
}
.wrapper-code {
display: flex;
align-items: center;
justify-content: center;
flex-direction: column;
margin-top: 40px;
.code-bg {
display: flex;
align-items: center;
justify-content: center;
flex-direction: column;
margin-top: 40px;
.code-bg {
display: flex;
align-items: center;
justify-content: center;
width: 240px;
height: 240px;
background: linear-gradient(180deg, #ffcb8d 0%, #ff8d60 100%);
border-radius: 8px;
img {
width: 220px;
height: 220px;
}
}
.code-tip {
font-size: 24px;
font-weight: 400;
color: #ffffff;
line-height: 32px;
margin-top: 20px;
}
.wrapper-footer {
width: 100%;
height: 224px;
margin-top: -85px;
z-index: -1;
width: 240px;
height: 240px;
background: linear-gradient(180deg, #ffcb8d 0%, #ff8d60 100%);
border-radius: 8px;
img {
width: 220px;
height: 220px;
}
}
.code-tip {
font-size: 24px;
font-weight: 400;
color: #ffffff;
line-height: 32px;
margin-top: 20px;
}
.wrapper-footer {
width: 100%;
height: 224px;
margin-top: -85px;
z-index: -1;
}
}
// 触达通道分析
.legend-list {
......@@ -496,6 +490,7 @@
.funnel-box {
display: flex;
position: relative;
margin-bottom: 50px;
.funnel-list {
position: relative;
margin-left: 30px;
......@@ -515,7 +510,7 @@
align-items: center;
font-size: 20px;
font-weight: 500;
color: #FFFFFF;
color: #ffffff;
line-height: 32px;
transform: skewX(-15deg);
width: 100%;
......@@ -553,7 +548,7 @@
position: absolute;
top: -19px;
right: 10px;
background-color: #FFF6EA;
background-color: #fff6ea;
transform: skewX(-15deg);
width: 65px;
img {
......@@ -561,7 +556,6 @@
width: 14px;
height: 290px;
}
}
}
.funnel-right {
......@@ -572,7 +566,7 @@
align-items: center;
padding: 7px 30px;
margin-bottom: 28px;
background: linear-gradient(90deg, #FFD0B9 0%, #FFF6EA 100%);
background: linear-gradient(90deg, #ffd0b9 0%, #fff6ea 100%);
.icon {
display: inline-block;
width: 30px;
......
......@@ -2,8 +2,8 @@
* @Description:
* @Author: huyue
* @Date: 2022-10-14 18:32:54
* @LastEditors: huyue
* @LastEditTime: 2022-10-19 15:50:56
* @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2022-10-19 17:21:59
-->
<template>
<div :ref="id" class="canvas"></div>
......@@ -12,7 +12,7 @@
import { onMounted, ref } from "vue";
// 按需引入 echarts
import * as echarts from "echarts";
import type { PropType } from "@vue/runtime-core";
import { PropType, watch } from "@vue/runtime-core";
let chart: any = null;
const client = ref();
const props = defineProps({
......@@ -20,6 +20,10 @@ const props = defineProps({
type: Array as PropType<string[]>,
default: () => ["#FFC154", "#FF9671"],
},
value: {
type: Array,
default: [],
},
id: {
type: String,
default: "",
......@@ -31,7 +35,6 @@ const props = defineProps({
});
const id = (el: HTMLElement) => {
if (el) {
console.log(el);
client.value = el;
}
};
......@@ -40,12 +43,18 @@ onMounted(() => {
chart.setOption(getChartSetOption());
window.addEventListener("resize", resizeHandler);
});
watch(props, (count, prevCount) => {
chart = echarts.init(client.value);
chart.setOption(getChartSetOption());
window.addEventListener("resize", resizeHandler);
});
const resizeHandler = () => {
if (chart) {
chart.resize();
}
};
const getChartSetOption = () => {
console.log(props.value);
var option = {
color: props.colors,
series: [
......@@ -68,10 +77,7 @@ const getChartSetOption = () => {
labelLine: {
show: false,
},
data: [
{ value: 735, name: "Direct" },
{ value: 580, name: "Email" },
],
data: props.value,
},
],
};
......
......@@ -2,8 +2,8 @@
* @Description: 战报
* @Author: huyue
* @Date: 2022-10-11 17:41:38
* @LastEditors: huyue
* @LastEditTime: 2022-10-19 16:27:16
* @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2022-10-19 18:00:24
-->
<template>
<!-- 战报产品 -->
......@@ -544,7 +544,11 @@
</div>
<div class="box-body-wrap">
<div class="box-body-wrap-vessel client">
<echart-box id="client" :colors="colors"></echart-box>
<echart-box
id="client"
:value="data.activitedInfo.coverRateValue"
:colors="colors"
></echart-box>
<div class="box-body-details">
<div class="info">
<div class="info-text">基盘客户数</div>
......@@ -552,7 +556,7 @@
</div>
<div class="info">
<div class="info-text">访客总数</div>
<span>600<label>个</label></span>
<span>{{ data.activitedInfo.fansCount }}<label>个</label></span>
</div>
<div class="info">
<div class="info-text">基盘覆盖率</div>
......@@ -561,23 +565,19 @@
</div>
</div>
<div class="box-body-wrap-vessel vehicle">
<echart-box id="vehicle" :colors="colors"></echart-box>
<div class="brand-wrap">
<div class="flex brand-text">
<div class="icon"></div>
奔驰
</div>
<div class="flex brand-text">
<div class="icon"></div>
宝马
</div>
<div class="flex brand-text">
<div class="icon"></div>
宝马
</div>
<echart-box
:value="data.activitedInfo.seriesRank"
id="vehicle"
:colors="data.seriesRankColor"
></echart-box>
<div
class="brand-wrap"
v-for="item in data.activitedInfo.seriesRank"
:key="item"
>
<div class="flex brand-text">
<div class="icon"></div>
宝马
{{ item.name }}
</div>
</div>
</div>
......@@ -646,30 +646,43 @@
class="funnel-bg"
:style="{
'background-color': data.colorList[0],
width: (data.custemData[0] / data.total) * 400 + 'px',
width:
(data.activitedInfo.touchVisitorCount[0] /
data.activitedInfo.touchVisitorCount[3]) *
400 +
'px',
}"
>
<span class="funnel-value">{{ data.custemData[0] }}</span>
<span class="funnel-value">{{
data.activitedInfo.touchVisitorCount[0]
}}</span>
</div>
<div
class="funnel-bg"
style="width: 100px"
:style="{
'background-color': data.colorList[1],
width: (data.custemData[1] / data.total) * 400 + 'px',
width:
(data.activitedInfo.touchVisitorCount[1] /
data.activitedInfo.touchVisitorCount[3]) *
400 +
'px',
}"
>
<span class="funnel-value">{{ data.custemData[1] }}</span>
<span class="funnel-value">{{
data.activitedInfo.touchVisitorCount[1]
}}</span>
</div>
<div
class="funnel-bg"
style="width: 100px"
:style="{
'background-color': data.colorList[2],
flex: 1,
}"
>
<span class="funnel-value">{{ data.custemData[2] }}</span>
<span class="funnel-value">{{
data.activitedInfo.touchVisitorCount[2]
}}</span>
</div>
</div>
<div class="funnel-item width1">
......@@ -677,20 +690,32 @@
class="funnel-bg"
:style="{
'background-color': data.colorList[0],
width: (data.custemData[0] / data.total) * 400 + 'px',
width:
(data.activitedInfo.touchOrderCount[0] /
data.activitedInfo.touchOrderCount[3]) *
400 +
'px',
}"
>
<span class="funnel-value">{{ data.custemData[0] }}</span>
<span class="funnel-value">{{
data.activitedInfo.touchOrderCount[0]
}}</span>
</div>
<div
class="funnel-bg"
style="width: 100px"
:style="{
'background-color': data.colorList[1],
width: (data.custemData[1] / data.total) * 400 + 'px',
width:
(data.activitedInfo.touchOrderCount[1] /
data.activitedInfo.touchOrderCount[3]) *
400 +
'px',
}"
>
<span class="funnel-value">{{ data.custemData[1] }}</span>
<span class="funnel-value">{{
data.activitedInfo.touchOrderCount[1]
}}</span>
</div>
<div
class="funnel-bg"
......@@ -700,7 +725,9 @@
flex: 1,
}"
>
<span class="funnel-value">{{ data.custemData[2] }}</span>
<span class="funnel-value">{{
data.activitedInfo.touchOrderCount[2]
}}</span>
</div>
</div>
<div class="funnel-item width2">
......@@ -708,51 +735,32 @@
class="funnel-bg"
:style="{
'background-color': data.colorList[0],
width: (data.custemData[0] / data.total) * 400 + 'px',
}"
>
<span class="funnel-value">{{ data.custemData[0] }}</span>
</div>
<div
class="funnel-bg"
style="width: 100px"
:style="{
'background-color': data.colorList[1],
width: (data.custemData[1] / data.total) * 400 + 'px',
}"
>
<span class="funnel-value">{{ data.custemData[1] }}</span>
</div>
<div
class="funnel-bg"
style="width: 100px"
:style="{
'background-color': data.colorList[2],
flex: 1,
}"
>
<span class="funnel-value">{{ data.custemData[2] }}</span>
</div>
</div>
<div class="funnel-item width3">
<div
class="funnel-bg"
:style="{
'background-color': data.colorList[0],
width: (data.custemData[0] / data.total) * 400 + 'px',
width:
(data.activitedInfo.touchConversionRate[0] /
data.activitedInfo.touchConversionRate[2]) *
400 +
'px',
}"
>
<span class="funnel-value">{{ data.custemData[0] }}</span>
<span class="funnel-value"
>{{ data.activitedInfo.touchConversionRate[0] }}%</span
>
</div>
<div
class="funnel-bg"
style="width: 100px"
:style="{
'background-color': data.colorList[1],
width: (data.custemData[1] / data.total) * 400 + 'px',
width:
(data.activitedInfo.touchConversionRate[1] /
data.activitedInfo.touchConversionRate[2]) *
400 +
'px',
}"
>
<span class="funnel-value">{{ data.custemData[1] }}</span>
<span class="funnel-value"
>{{ data.activitedInfo.touchConversionRate[1] }}%</span
>
</div>
<div
class="funnel-bg"
......@@ -762,7 +770,9 @@
flex: 1,
}"
>
<span class="funnel-value">{{ data.custemData[2] }}</span>
<span class="funnel-value"
>{{ data.activitedInfo.touchConversionRate[2] }}%</span
>
</div>
</div>
<div class="arrow-left">
......@@ -775,20 +785,16 @@
</div>
<div class="funnel-right">
<div class="label-item">
<span class="icon icon-custom"></span>
<span class="label-name">目标客户数</span>
</div>
<div class="label-item">
<span class="icon icon-visite"></span>
<span class="label-name">目标客户数</span>
<span class="label-name">访客数</span>
</div>
<div class="label-item">
<span class="icon icon-order"></span>
<span class="label-name">目标客户数</span>
<span class="label-name">订单数</span>
</div>
<div class="label-item">
<span class="icon icon-conversion"></span>
<span class="label-name">目标客户数</span>
<span class="label-name">转化率</span>
</div>
</div>
</div>
......@@ -797,7 +803,7 @@
<div class="box-rate">
<img src="@/assets/images/activityReport/micro.png" alt="" />
</div>
<echart-box id="client" :colors="colors"></echart-box>
<echart-box id="clientVis" :colors="colors"></echart-box>
<div class="box-body-details">
<div class="flex statistical-text">
<div class="icon"></div>
......@@ -813,7 +819,11 @@
<div class="box-rate">
<img src="@/assets/images/activityReport/qw.png" alt="" />
</div>
<echart-box id="vehicle" :colors="colors"></echart-box>
<echart-box
id="vehicleVis"
:value="data.activitedInfo.workWechatRate"
:colors="colors"
></echart-box>
<div class="box-body-details">
<div class="flex statistical-text">
<div class="icon"></div>
......@@ -864,13 +874,18 @@ const progress = ref();
interface params {
activityId?: number | string;
}
interface rankingConfig {
name: string;
rate: string;
}
let query: params = {};
// const count = ref(50);
// const progress = ref(50);
const colors = ref<string[]>(["#FFC154", "#FF9671"]);
const data = reactive({
colorList: ["#F65A3F", "#FF8B64", "#FFBD55"],
widthList: [400, 350, 304, 258],
seriesRankColor: ["#ff6e42", "#ffb657", "#677aea", "#76d189"],
widthList: [400, 350, 304],
custemData: [100, 800, 6000],
total: 7200,
activitedInfo: {
......@@ -880,15 +895,23 @@ const data = reactive({
qrcodeUrl: "",
coverRate: "",
seriesRank: [],
touchVisitorCount: [],
touchOrderCount: [],
touchConversionRate: [],
workWechatMomentsRate: "",
workWechatShareRate: "",
coverRateValue: [],
workWechatRate: [],
},
});
const rankingList = reactive({
const rankingList = {
departmentOrderRank: 0,
userOrderRank: 0,
});
};
const getInfo = async () => {
const res = await req("scrm.api.shopmall.activity.end.report.param", query);
data.activitedInfo = res;
const seriesRank = data.activitedInfo.seriesRank;
progress.value = res.volume;
let index = 1;
for (let i in rankingList) {
......@@ -898,6 +921,38 @@ const getInfo = async () => {
index++;
}
}
if (seriesRank) {
const seriesRankValue = seriesRank.map((item: rankingConfig) => {
return {
name: item.name,
value: item.rate.split("%")[0],
};
});
data.activitedInfo.seriesRank = seriesRankValue as any;
let coverRate = data.activitedInfo.coverRate.split(
"%"
)[0] as unknown as number;
data.activitedInfo.coverRateValue = [
{
name: "1",
value: coverRate,
},
{
name: "2",
value: 1 - coverRate,
},
] as any;
data.activitedInfo.workWechatRate = [
{
name: "1",
value: data.activitedInfo.workWechatMomentsRate.split("%")[0],
},
{
name: "2",
value: data.activitedInfo.workWechatShareRate.split("%")[0],
},
] as any;
}
};
onMounted(() => {
if (route.query) {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!