Commit f64f5089 by 前端

commit:私域诊断表

1 parent b3d15bb3
// 已结束 // 已结束
.box-report { .box-report {
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
font-size: 22px; font-size: 22px;
text-align: center; text-align: center;
background: linear-gradient(0deg, #FFE1C8 0%, #FFF2E0 100%); background: linear-gradient(0deg, #ffe1c8 0%, #fff2e0 100%);
border-radius: 10px; border-radius: 10px;
padding: 10px; padding: 10px;
margin-top: 30px; margin-top: 30px;
.p-t-10 { .p-t-10 {
padding-top: 10px; padding-top: 10px;
}
.report-item {
width: calc((100% - 4px) / 3);
.icon {
display: inline-block;
width: 50px;
height: 50px;
} }
.report-item { .icon-1 {
width: calc((100% - 4px) / 3); background: url("@/assets/images/activityReport/1.png") no-repeat;
.icon { background-size: 50px;
display: inline-block;
width: 50px;
height: 50px;
}
.icon-1 {
background: url("@/assets/images/activityReport/1.png") no-repeat;
background-size: 50px;
}
.icon-2 {
background: url("@/assets/images/activityReport/2.png") no-repeat;
background-size: 50px;
}
.icon-3 {
background: url("@/assets/images/activityReport/3.png") no-repeat;
background-size: 50px;
}
.icon-4 {
background: url("@/assets/images/activityReport/4.png") no-repeat;
background-size: 50px;
}
.icon-5 {
background: url("@/assets/images/activityReport/5.png") no-repeat;
background-size: 50px;
}
.icon-6 {
background: url("@/assets/images/activityReport/6.png") no-repeat;
background-size: 50px;
}
.report-name {
margin-bottom: 5px;
font-weight: 400;
color: #333333;
line-height: 32px;
}
.report-value {
display: inline-flex;
color: #FF333A;
align-items: flex-end;
margin-bottom: 10px;
.report-number {
font-size: 36px;
font-weight: 600;
margin-right: 8px;
line-height: 40px;
}
.report-unit {
display: inline-block;
line-height: 36px;
}
}
} }
.border-right { .icon-2 {
border-right: 1px solid rgba(255, 208, 171, 0.8); background: url("@/assets/images/activityReport/2.png") no-repeat;
background-size: 50px;
} }
.border-bottom { .icon-3 {
border-bottom: 1px solid rgba(255, 208, 171, 0.8); background: url("@/assets/images/activityReport/3.png") no-repeat;
background-size: 50px;
} }
} .icon-4 {
.finish-activty { background: url("@/assets/images/activityReport/4.png") no-repeat;
margin-top: 50px; background-size: 50px;
text-align: center; }
height: 85px; .icon-5 {
.activty-text { background: url("@/assets/images/activityReport/5.png") no-repeat;
display: inline-block; background-size: 50px;
background: linear-gradient(0deg, #FFD7B7 0%, #FFEBDB 100%); }
border-radius: 8px; .icon-6 {
padding: 13px 21px; background: url("@/assets/images/activityReport/6.png") no-repeat;
font-size: 24px; background-size: 50px;
font-weight: 500; }
color: #262525;
.report-name {
margin-bottom: 5px;
font-weight: 400;
color: #333333;
line-height: 32px; line-height: 32px;
.activty-flag { }
color: #FF363B; .report-value {
font-size: 32px; display: inline-flex;
font-weight: 500; color: #ff333a;
align-items: flex-end;
margin-bottom: 10px;
.report-number {
font-size: 36px;
font-weight: 600;
margin-right: 8px;
line-height: 40px;
}
.report-unit {
display: inline-block;
line-height: 36px;
} }
} }
} }
.icon-horn { .border-right {
position: absolute; border-right: 1px solid rgba(255, 208, 171, 0.8);
bottom: 20px;
left: 0;
width: 157px;
height: 131px;
} }
.icon-fireworks { .border-bottom {
position: absolute; border-bottom: 1px solid rgba(255, 208, 171, 0.8);
bottom: 35px;
right: 4px;
width: 275px;
height: 205px;
} }
.vs-bg { }
position: absolute; .finish-activty {
top: 44px; margin-top: 50px;
width: 687px; text-align: center;
height: 356px; height: 85px;
z-index: 0; .activty-text {
display: inline-block;
background: linear-gradient(0deg, #ffd7b7 0%, #ffebdb 100%);
border-radius: 8px;
padding: 13px 21px;
font-size: 24px;
font-weight: 500;
color: #262525;
line-height: 32px;
.activty-flag {
color: #ff363b;
font-size: 32px;
font-weight: 500;
}
} }
.vs-box { }
display: flex; .icon-horn {
position: relative; position: absolute;
width: 687px; bottom: 20px;
.vs-item { left: 0;
width: 50%; width: 157px;
text-align: center; height: 131px;
.vs-title { }
font-size: 28px; .icon-fireworks {
font-weight: 600; position: absolute;
bottom: 35px;
right: 4px;
width: 275px;
height: 205px;
}
.vs-bg {
position: absolute;
top: 44px;
width: 687px;
height: 356px;
z-index: 0;
}
.vs-box {
display: flex;
position: relative;
width: 687px;
.vs-item {
width: 50%;
text-align: center;
.vs-title {
font-size: 28px;
font-weight: 600;
color: #333333;
line-height: 32px;
}
.vs-content {
margin-top: 16px;
padding: 24px 30px;
.content-item {
display: flex;
font-size: 22px;
font-weight: 400;
color: #333333; color: #333333;
line-height: 32px; line-height: 22px;
} margin-bottom: 15px;
.vs-content { .content-label {
margin-top: 16px; margin-right: 30px;
padding: 24px 30px; }
.content-item { .content-value {
display: flex; color: #ff333a;
font-size: 22px; font-size: 22px;
font-weight: 400; .content-number {
color: #333333; display: inline-block;
line-height: 22px; width: 100px;
margin-bottom: 15px; text-align: left;
.content-label { font-size: 36px;
margin-right: 30px; font-weight: 600;
font-style: italic;
} }
.content-value {
color: #FF333A;
font-size: 22px;
.content-number {
display: inline-block;
width: 100px;
text-align: left;
font-size: 36px;
font-weight: 600;
font-style: italic;
}
}
}
.left-content {
background: linear-gradient(90deg, rgba(255, 211, 177, 0.7) 0%, rgba(255,226,205,0) 100%);
// opacity: 0.7;
border-radius: 22px;
padding: 14px 20px 8px;
}
.right-content {
background: linear-gradient(270deg, rgba(255, 167, 152, 0.6) 0%, rgba(254,177,164,0) 100%);
// opacity: 0.6;
border-radius: 22px;
padding: 14px 20px 8px;
display: flex;
justify-content: flex-end;
} }
} }
.left-content {
background: linear-gradient(
90deg,
rgba(255, 211, 177, 0.7) 0%,
rgba(255, 226, 205, 0) 100%
);
// opacity: 0.7;
border-radius: 22px;
padding: 14px 20px 8px;
}
.right-content {
background: linear-gradient(
270deg,
rgba(255, 167, 152, 0.6) 0%,
rgba(254, 177, 164, 0) 100%
);
// opacity: 0.6;
border-radius: 22px;
padding: 14px 20px 8px;
display: flex;
justify-content: flex-end;
}
} }
} }
.summary { }
font-size: 30px; .summary {
font-weight: 600; font-size: 30px;
color: #333333; font-weight: 600;
line-height: 30px; color: #333333;
line-height: 30px;
text-align: center;
width: 100%;
margin-top: 40px;
margin-bottom: 10px;
}
.vs-tip {
display: flex;
justify-content: center;
font-size: 22px;
font-weight: 400;
color: #333333;
line-height: 34px;
margin-bottom: -1px;
}
.box-body-head {
display: flex;
padding: 29px 0 21px 0;
font-size: 28px;
font-weight: 600;
color: #333333;
div {
flex: 1;
text-align: center; text-align: center;
width: 100%;
margin-top: 40px;
margin-bottom: 10px;
} }
.vs-tip {
display: flex;
justify-content: center;
font-size: 22px;
font-weight: 400;
color: #333333;
line-height: 34px;
margin-bottom: -1px;
}
\ No newline at end of file \ No newline at end of file
}
.box-body-wrap {
display: flex;
&-vessel {
flex: 1;
height: 374px;
background: linear-gradient(0deg, #ffefe2 0%, #fff6ea 100%);
box-shadow: 0px 0px 10px 0px rgba(255, 193, 88, 0.2);
border-radius: 10px;
&:nth-child(1) {
margin-right: 13px;
}
}
.box-body-details {
margin: 0 35px;
.info {
margin-bottom: 34px;
display: flex;
align-items: center;
.info-text {
min-width: 109px;
font-size: 22px;
font-weight: 400;
color: #333333;
line-height: 18px;
text-align:left;
}
span {
margin-left: 36px;
font-size: 36px;
font-family: PingFang SC;
font-weight: 600;
font-style: italic;
color: #ff333a;
line-height: 32px;
}
label {
font-size: 22px;
font-weight: 400;
color: #ff343a;
line-height: 32px;
margin-left:8px;
}
}
}
}
...@@ -17,4 +17,7 @@ ...@@ -17,4 +17,7 @@
position: absolute; position: absolute;
left: 50%; left: 50%;
transform: translateX(-50%); transform: translateX(-50%);
}
.mrg-22{
margin:0
} }
\ No newline at end of file \ No newline at end of file
import { App } from '@vue/runtime-dom'
import Component from './index.vue'
export default {
install (app: App) {
app.component('EchartBox', Component)
}
}
<template>
<div :ref="id" :style="{width: '100%', height: height}"></div>
</template>
<script lang="ts" setup>
import { onMounted, ref } from "vue";
// 按需引入 echarts
import * as echarts from "echarts";
import type { PropType } from "@vue/runtime-core";
let chart: any = null;
const client = ref();
const props = defineProps({
colors: {
type: Array as PropType<string[]>,
default: () => ["#FFC154", "#FF9671"],
},
id: {
type: String,
default: "",
},
height:{
type:String,
default:'100px'
}
});
const id = (el: HTMLElement) => {
if (el) {
console.log(el);
client.value = el;
}
};
onMounted(() => {
chart = echarts.init(client.value);
chart.setOption(getChartSetOption());
window.addEventListener("resize", resizeHandler);
});
const resizeHandler = () => {
if (chart) {
chart.resize();
}
};
const getChartSetOption = () => {
var option = {
color: props.colors,
series: [
{
type: "pie",
radius: ["45%", "80%"],
center: ["50%", "50%"],
avoidLabelOverlap: false,
label: {
formatter: "{d}%",
position: "inside",
fontSize: 12,
color: "#ffffff",
},
emphasis: {
label: {
show: false,
},
},
labelLine: {
show: false,
},
data: [
{ value: 735, name: "Direct" },
{ value: 580, name: "Email" },
],
},
],
};
return option;
};
</script>
\ No newline at end of file \ No newline at end of file
import { App } from '@vue/runtime-dom'
import Component from './index.vue'
export default {
install (app: App) {
app.component('ReportTable', Component)
}
}
import { App } from '@vue/runtime-dom'
import Component from './index.vue'
export default {
install (app: App) {
app.component('SvgIcon', Component)
}
}
...@@ -11,8 +11,6 @@ import axios from 'axios' ...@@ -11,8 +11,6 @@ import axios from 'axios'
// import apis from './api/index' // import apis from './api/index'
import router, { setupRouter } from './router' import router, { setupRouter } from './router'
import App from './App.vue' import App from './App.vue'
import SvgIcon from 'comps/SvgIcon/index.vue'
import ReportTable from 'comps/ReportTable/index.vue'
import 'lib-flexible/flexible' import 'lib-flexible/flexible'
import 'utils/rem' import 'utils/rem'
import fetchConfig from './utils/config' import fetchConfig from './utils/config'
...@@ -22,8 +20,12 @@ const app = createApp(App) ...@@ -22,8 +20,12 @@ const app = createApp(App)
let vConsole: object = {} let vConsole: object = {}
import { components } from './libs/vant' import { components } from './libs/vant'
components.forEach(component => app.use(component)); components.forEach(component => app.use(component));
app.component('svg-icon', SvgIcon) // 自动注册全局组件
app.component('report-table', ReportTable) const modules = import.meta.globEager('./components/**/index.ts')
for (const path in modules) {
app.use(modules[path].default)
}
fetchConfig().then(res => { fetchConfig().then(res => {
// axios.defaults.baseURL = res.request.baseURL // axios.defaults.baseURL = res.request.baseURL
localStorage.setItem('config', JSON.stringify(res)) localStorage.setItem('config', JSON.stringify(res))
......
...@@ -421,8 +421,37 @@ ...@@ -421,8 +421,37 @@
<img src="@/assets/images/activityReport/title-right.png" alt="" /> <img src="@/assets/images/activityReport/title-right.png" alt="" />
</div> </div>
</div> </div>
<div class="box-body"> <!-- <div class="box-body">
<div ref="main" style="width: 100%; height: 400px"></div> <div ref="main" style="width: 100%; height: 400px"></div>
</div> -->
<div class="box-body mrg-22">
<div class="box-body-head">
<div>客户数占比</div>
<div>车型占比</div>
</div>
<div class="box-body-wrap">
<div class="box-body-wrap-vessel client">
<echart-box id="client" :colors="colors"></echart-box>
<div class="box-body-details">
<div class="info">
<div class="info-text">基盘客户数</div>
<span>6000</span><label>个</label>
</div>
<div class="info">
<div class="info-text">访客总数</div>
<span>60000</span><label>个</label>
</div>
<div class="info">
<div class="info-text">基盘覆盖率</div>
<span>60%</span>
</div>
</div>
</div>
<div class="box-body-wrap-vessel vehicle">
<echart-box id="vehicle" :colors="colors"></echart-box>
<div></div>
</div>
</div>
</div> </div>
<div class="box-footer"> <div class="box-footer">
<img src="@/assets/images/activityReport/box-footer.png" alt="" /> <img src="@/assets/images/activityReport/box-footer.png" alt="" />
...@@ -447,9 +476,9 @@ import { ref, onMounted } from "vue"; ...@@ -447,9 +476,9 @@ import { ref, onMounted } from "vue";
import * as echarts from "echarts"; import * as echarts from "echarts";
const count = ref(50); const count = ref(50);
const progress = ref(50); const progress = ref(50);
const main = ref(); const colors = ref<string[]>(["#FFC154", "#FF9671"]);
onMounted(() => { onMounted(() => {
init(); // init();
}); });
function init() { function init() {
var myChart = echarts.init(main.value); var myChart = echarts.init(main.value);
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!