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=="
}
}
}
}
}
......@@ -37,8 +37,8 @@
border-radius: 8px;
top: 292px;
}
}
.wrapper-output {
}
.wrapper-output {
position: relative;
margin-top: 46px;
font-size: 0;
......@@ -103,7 +103,7 @@
top: 50%;
transform: translate(-50%, -50%);
width: 72px;
height: 100%
height: 100%;
}
.ratio-number {
color: #ff333a;
......@@ -153,14 +153,12 @@
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),
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),
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 {
......@@ -292,8 +290,7 @@
.department {
width: 120px;
height: 32px;
background: url("@/assets/images/activityReport/bg-department.png")
no-repeat;
background: url("@/assets/images/activityReport/bg-department.png") no-repeat;
background-size: 120px 32px;
font-size: 22px;
font-weight: 400;
......@@ -365,24 +362,21 @@
top: -33px;
width: 140px;
height: 140px;
background: url("@/assets/images/activityReport/first-avatar-bg.png")
no-repeat;
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: 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: url("@/assets/images/activityReport/third-avatar-bg.png") no-repeat;
background-size: 120px;
}
.avatar {
......@@ -432,8 +426,8 @@
width: 100%;
}
}
}
.wrapper-code {
}
.wrapper-code {
display: flex;
align-items: center;
justify-content: center;
......@@ -465,7 +459,7 @@
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,
},
],
};
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!