Commit f64f5089 by 前端

commit:私域诊断表

1 parent b3d15bb3
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
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;
...@@ -51,7 +51,7 @@ ...@@ -51,7 +51,7 @@
} }
.report-value { .report-value {
display: inline-flex; display: inline-flex;
color: #FF333A; color: #ff333a;
align-items: flex-end; align-items: flex-end;
margin-bottom: 10px; margin-bottom: 10px;
.report-number { .report-number {
...@@ -72,14 +72,14 @@ ...@@ -72,14 +72,14 @@
.border-bottom { .border-bottom {
border-bottom: 1px solid rgba(255, 208, 171, 0.8); border-bottom: 1px solid rgba(255, 208, 171, 0.8);
} }
} }
.finish-activty { .finish-activty {
margin-top: 50px; margin-top: 50px;
text-align: center; text-align: center;
height: 85px; height: 85px;
.activty-text { .activty-text {
display: inline-block; display: inline-block;
background: linear-gradient(0deg, #FFD7B7 0%, #FFEBDB 100%); background: linear-gradient(0deg, #ffd7b7 0%, #ffebdb 100%);
border-radius: 8px; border-radius: 8px;
padding: 13px 21px; padding: 13px 21px;
font-size: 24px; font-size: 24px;
...@@ -87,34 +87,34 @@ ...@@ -87,34 +87,34 @@
color: #262525; color: #262525;
line-height: 32px; line-height: 32px;
.activty-flag { .activty-flag {
color: #FF363B; color: #ff363b;
font-size: 32px; font-size: 32px;
font-weight: 500; font-weight: 500;
} }
} }
} }
.icon-horn { .icon-horn {
position: absolute; position: absolute;
bottom: 20px; bottom: 20px;
left: 0; left: 0;
width: 157px; width: 157px;
height: 131px; height: 131px;
} }
.icon-fireworks { .icon-fireworks {
position: absolute; position: absolute;
bottom: 35px; bottom: 35px;
right: 4px; right: 4px;
width: 275px; width: 275px;
height: 205px; height: 205px;
} }
.vs-bg { .vs-bg {
position: absolute; position: absolute;
top: 44px; top: 44px;
width: 687px; width: 687px;
height: 356px; height: 356px;
z-index: 0; z-index: 0;
} }
.vs-box { .vs-box {
display: flex; display: flex;
position: relative; position: relative;
width: 687px; width: 687px;
...@@ -141,7 +141,7 @@ ...@@ -141,7 +141,7 @@
margin-right: 30px; margin-right: 30px;
} }
.content-value { .content-value {
color: #FF333A; color: #ff333a;
font-size: 22px; font-size: 22px;
.content-number { .content-number {
display: inline-block; display: inline-block;
...@@ -154,13 +154,21 @@ ...@@ -154,13 +154,21 @@
} }
} }
.left-content { .left-content {
background: linear-gradient(90deg, rgba(255, 211, 177, 0.7) 0%, rgba(255,226,205,0) 100%); background: linear-gradient(
90deg,
rgba(255, 211, 177, 0.7) 0%,
rgba(255, 226, 205, 0) 100%
);
// opacity: 0.7; // opacity: 0.7;
border-radius: 22px; border-radius: 22px;
padding: 14px 20px 8px; padding: 14px 20px 8px;
} }
.right-content { .right-content {
background: linear-gradient(270deg, rgba(255, 167, 152, 0.6) 0%, rgba(254,177,164,0) 100%); background: linear-gradient(
270deg,
rgba(255, 167, 152, 0.6) 0%,
rgba(254, 177, 164, 0) 100%
);
// opacity: 0.6; // opacity: 0.6;
border-radius: 22px; border-radius: 22px;
padding: 14px 20px 8px; padding: 14px 20px 8px;
...@@ -169,8 +177,8 @@ ...@@ -169,8 +177,8 @@
} }
} }
} }
} }
.summary { .summary {
font-size: 30px; font-size: 30px;
font-weight: 600; font-weight: 600;
color: #333333; color: #333333;
...@@ -179,8 +187,8 @@ ...@@ -179,8 +187,8 @@
width: 100%; width: 100%;
margin-top: 40px; margin-top: 40px;
margin-bottom: 10px; margin-bottom: 10px;
} }
.vs-tip { .vs-tip {
display: flex; display: flex;
justify-content: center; justify-content: center;
font-size: 22px; font-size: 22px;
...@@ -188,4 +196,60 @@ ...@@ -188,4 +196,60 @@
color: #333333; color: #333333;
line-height: 34px; line-height: 34px;
margin-bottom: -1px; 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;
}
}
.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;
}
}
} }
}
...@@ -18,3 +18,6 @@ ...@@ -18,3 +18,6 @@
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!