429 lines
16 KiB
Vue
429 lines
16 KiB
Vue
<template>
|
||
<div class="top box">
|
||
|
||
<div class="l">
|
||
<img class="img-cls" src="/static/town/YHSJ.png" alt="">
|
||
<div class="user center" id="user"></div>
|
||
</div>
|
||
<div class="c">
|
||
<div class="product-list">
|
||
<div class="product" style="display: flex;justify-content: space-around;">
|
||
<img src="/static/index/SPBG.png" style="width: 90%;height: 100%;" alt="">
|
||
<img src="/static/index/SPTB.png" class="product-icon" alt="">
|
||
</div>
|
||
<div class="product" style="display: flex;justify-content: space-around;">
|
||
<img src="/static/index/SPBG.png" style="width: 90%;height: 100%;" alt="">
|
||
<img src="/static/index/SPTB.png" class="product-icon" alt="">
|
||
</div>
|
||
<div class="product" style="display: flex;justify-content: space-around;">
|
||
<img src="/static/index/SPBG.png" style="width: 90%;height: 100%;" alt="">
|
||
<img src="/static/index/SPTB.png" class="product-icon" alt="">
|
||
</div>
|
||
</div>
|
||
|
||
<div class="Views">
|
||
<img src="/static/index/SSLLL.png" class="c-b-img" alt="">
|
||
<div class="view-content">
|
||
<div>昨日数据:3333</div>
|
||
<div style="display: flex;align-items: center;">当前浏览量:
|
||
<Remake /> 人正在浏览
|
||
</div>
|
||
<div>周环比:32%</div>
|
||
</div>
|
||
</div>
|
||
|
||
|
||
</div>
|
||
<div class="r">
|
||
|
||
<img class="img-cls" src="/static/town/DDSJ.png" alt="">
|
||
|
||
|
||
</div>
|
||
|
||
|
||
</div>
|
||
<div class="bottom box">
|
||
<div class="l">
|
||
<div class="user center" id="orderAmount"></div>
|
||
<img class="img-cls" src="/static/town/DRDDJE.png" alt="">
|
||
</div>
|
||
<div class="c">
|
||
<img class="img-cls" src="/static/town/CJYH.png" alt="">
|
||
<div id="transactionUsers" class="transactionUsers"></div>
|
||
</div>
|
||
<div class="r">
|
||
|
||
<img class="img-cls" src="/static/town/PHBSJ.png" alt="">
|
||
<div class="user">
|
||
<div class="btns">
|
||
<span class="btn">店铺销量排行</span>
|
||
<span class="btn">店铺销量排行</span>
|
||
|
||
</div>
|
||
|
||
<dv-scroll-board :config="config3" class="list" />
|
||
</div>
|
||
|
||
|
||
</div>
|
||
</div>
|
||
</template>
|
||
<script setup>
|
||
import { onMounted } from 'vue';
|
||
import * as echarts from 'echarts';
|
||
import option from "./option"
|
||
import { ref, reactive } from "vue"
|
||
import Remake from "@/components/Remake.vue"
|
||
const config3 = reactive({
|
||
oddRowBGC: "#001C2E",
|
||
evenRowBGC: "#001C2E",
|
||
columnWidth: [
|
||
2, 3, 4, 10, 3
|
||
],
|
||
data: [
|
||
[
|
||
`<div style="line-height:30px; text-align: center;background-image: url('/static/index/PM1.png');width: 30px;height: 30px;background-size: cover;" >1</div> `,
|
||
`<div style='background:red;position:relative'><img :src="i" style="width: 30px;height: 30px;position:absolute" alt=""></div>`,
|
||
`<div style='height:40px;line-height:40px'>商品名称</div>`,
|
||
`<div style=' transform: translateY(12px); width: 100%; height: 10px; background-color: #122E3F;overflow: hidden;'> <div style=' width: 40%;height: 100%; background: linear-gradient(to right, #455CCC, #51C2E0);transition: width 0.5s ease-in-out;'></div> </div>`,
|
||
`<div style='height:40px;line-height:40px '>5495 <span style='font-size:10px'>单</span> </div>`,
|
||
|
||
],
|
||
[
|
||
`<div style="line-height:30px; text-align: center;background-image: url('/static/index/PM2.png');width: 30px;height: 30px;background-size: cover;" >2</div> `,
|
||
`<div style='background:red;position:relative'><img :src="i" style="width: 30px;height: 30px;position:absolute" alt=""></div>`,
|
||
`<div style='height:40px;line-height:40px'>商品名称</div>`,
|
||
`<div style=' transform: translateY(12px); width: 100%; height: 10px; background-color: #122E3F;overflow: hidden;'> <div style=' width: 40%;height: 100%; background: linear-gradient(to right, #455CCC, #51C2E0);transition: width 0.5s ease-in-out;'></div> </div>`,
|
||
`<div style='height:40px;line-height:40px '>5495 <span style='font-size:10px'>单</span> </div>`,
|
||
|
||
],
|
||
[
|
||
`<div style="line-height:30px; text-align: center;background-image: url('/static/index/PM3.png');width: 30px;height: 30px;background-size: cover;" >3</div> `,
|
||
`<div style='background:red;position:relative'><img :src="i" style="width: 30px;height: 30px;position:absolute" alt=""></div>`,
|
||
`<div style='height:40px;line-height:40px'>商品名称</div>`,
|
||
`<div style=' transform: translateY(12px); width: 100%; height: 10px; background-color: #122E3F;overflow: hidden;'> <div style=' width: 40%;height: 100%; background: linear-gradient(to right, #455CCC, #51C2E0);transition: width 0.5s ease-in-out;'></div> </div>`,
|
||
`<div style='height:40px;line-height:40px '>5495 <span style='font-size:10px'>单</span> </div>`,
|
||
|
||
],
|
||
[
|
||
`<div style="line-height:30px; text-align: center;background-image: url('/static/index/PM4.png');width: 30px;height: 30px;background-size: cover;" >4</div> `,
|
||
`<div style='background:red;position:relative'><img :src="i" style="width: 30px;height: 30px;position:absolute" alt=""></div>`,
|
||
`<div style='height:40px;line-height:40px'>商品名称</div>`,
|
||
`<div style=' transform: translateY(12px); width: 100%; height: 10px; background-color: #122E3F;overflow: hidden;'> <div style=' width: 40%;height: 100%; background: linear-gradient(to right, #455CCC, #51C2E0);transition: width 0.5s ease-in-out;'></div> </div>`,
|
||
`<div style='height:40px;line-height:40px '>5495 <span style='font-size:10px'>单</span> </div>`,
|
||
|
||
],
|
||
[
|
||
`<div style="line-height:30px; text-align: center;background-image: url('/static/index/PM4.png');width: 30px;height: 30px;background-size: cover;" >5</div> `,
|
||
`<div style='background:red;position:relative'><img :src="i" style="width: 30px;height: 30px;position:absolute" alt=""></div>`,
|
||
`<div style='height:40px;line-height:40px'>商品名称</div>`,
|
||
`<div style=' transform: translateY(12px); width: 100%; height: 10px; background-color: #122E3F;overflow: hidden;'> <div style=' width: 40%;height: 100%; background: linear-gradient(to right, #455CCC, #51C2E0);transition: width 0.5s ease-in-out;'></div> </div>`,
|
||
`<div style='height:40px;line-height:40px '>5495 <span style='font-size:10px'>单</span> </div>`,
|
||
|
||
],
|
||
[
|
||
`<div style="line-height:30px; text-align: center;background-image: url('/static/index/PM4.png');width: 30px;height: 30px;background-size: cover;" >6</div> `,
|
||
`<div style='background:red;position:relative'><img :src="i" style="width: 30px;height: 30px;position:absolute" alt=""></div>`,
|
||
`<div style='height:40px;line-height:40px'>商品名称</div>`,
|
||
`<div style=' transform: translateY(12px); width: 100%; height: 10px; background-color: #122E3F;overflow: hidden;'> <div style=' width: 40%;height: 100%; background: linear-gradient(to right, #455CCC, #51C2E0);transition: width 0.5s ease-in-out;'></div> </div>`,
|
||
`<div style='height:40px;line-height:40px '>5495 <span style='font-size:10px'>单</span> </div>`,
|
||
|
||
], [
|
||
`<div style="line-height:30px; text-align: center;background-image: url('/static/index/PM4.png');width: 30px;height: 30px;background-size: cover;" >7</div> `,
|
||
`<div style='background:red;position:relative'><img :src="i" style="width: 30px;height: 30px;position:absolute" alt=""></div>`,
|
||
`<div style='height:40px;line-height:40px'>商品名称</div>`,
|
||
`<div style=' transform: translateY(12px); width: 100%; height: 10px; background-color: #122E3F;overflow: hidden;'> <div style=' width: 40%;height: 100%; background: linear-gradient(to right, #455CCC, #51C2E0);transition: width 0.5s ease-in-out;'></div> </div>`,
|
||
`<div style='height:40px;line-height:40px '>5495 <span style='font-size:10px'>单</span> </div>`,
|
||
|
||
], [
|
||
`<div style="line-height:30px; text-align: center;background-image: url('/static/index/PM4.png');width: 30px;height: 30px;background-size: cover;" >8</div> `,
|
||
`<div style='background:red;position:relative'><img :src="i" style="width: 30px;height: 30px;position:absolute" alt=""></div>`,
|
||
`<div style='height:40px;line-height:40px'>商品名称</div>`,
|
||
`<div style=' transform: translateY(12px); width: 100%; height: 10px; background-color: #122E3F;overflow: hidden;'> <div style=' width: 40%;height: 100%; background: linear-gradient(to right, #455CCC, #51C2E0);transition: width 0.5s ease-in-out;'></div> </div>`,
|
||
`<div style='height:40px;line-height:40px '>5495 <span style='font-size:10px'>单</span> </div>`,
|
||
|
||
],
|
||
// [` <div style=" text-align: center;background-image: url('/static/index/PM2.png');width: 30px;height: 30px;background-size: cover;"> 2</div> `,
|
||
// `<img :src="i" style="width: 30px;height: 30px;object-fit: cover;" alt="">`,
|
||
// `<div>商品名称</div>`,
|
||
// `<div class="progress-bar"> <div class="progress"></div> </div>`,
|
||
// `<div style='padding-left:30px'>5495 <span style='font-size:10px'>单</span> </div>`,
|
||
|
||
|
||
// ],
|
||
// [` <div style=" text-align: center;background-image: url('/static/index/PM3.png');width: 30px;height: 30px;background-size: cover;">3</div> `,
|
||
// `<img :src="i" style="width: 30px;height: 30px;object-fit: cover;" alt="">`,
|
||
// `<div>商品名称</div>`,
|
||
// `<div class="progress-bar"> <div class="progress"></div> </div>`,
|
||
// `<div style='padding-left:30px'>5495 <span style='font-size:10px'>单</span> </div>`,
|
||
|
||
// ],
|
||
// [` <div style=" text-align: center;background-image: url('/static/index/PM4.png');width: 30px;height: 30px;background-size: cover;">4</div> `,
|
||
// `<img :src="i" style="width: 30px;height: 30px;object-fit: cover;" alt="">`,
|
||
// `<div>商品名称</div>`,
|
||
// `<div class="progress-bar"> <div class="progress"></div> </div>`,
|
||
// `<div style='padding-left:30px'>5495 <span style='font-size:10px'>单</span> </div>`,
|
||
|
||
// ],
|
||
// [` <div style=" text-align: center;background-image: url('/static/index/PM4.png');width: 30px;height: 30px;background-size: cover;">5</div> `,
|
||
// `<img :src="i" style="width: 30px;height: 30px;object-fit: cover;" alt="">`,
|
||
// `<div>商品名称</div>`,
|
||
// `<div class="progress-bar"> <div class="progress"></div> </div>`,
|
||
// `<div style='padding-left:30px'>5495 <span style='font-size:10px'>单</span> </div>`,
|
||
|
||
// ],
|
||
// [` <div style=" text-align: center;background-image: url('/static/index/PM4.png');width: 30px;height: 30px;background-size: cover;">6</div> `,
|
||
// `<img :src="i" style="width: 30px;height: 30px;object-fit: cover;" alt="">`,
|
||
// `<div>商品名称</div>`,
|
||
// `<div class="progress-bar"> <div class="progress"></div> </div>`,
|
||
// `<div style='padding-left:30px'>5495 <span style='font-size:10px'>单</span> </div>`,
|
||
|
||
// ],
|
||
|
||
]
|
||
}
|
||
|
||
)
|
||
|
||
// 图表
|
||
const initCharts = (tag, option) => {
|
||
var chartDom = document.getElementById(tag);
|
||
var myChart = echarts.init(chartDom);
|
||
myChart.setOption(option);
|
||
}
|
||
|
||
onMounted(() => {
|
||
initCharts('user', option.userChartOption)
|
||
initCharts('orderAmount', option.orderAmount)
|
||
initCharts('transactionUsers', option.transactionUsersTown)
|
||
|
||
})
|
||
|
||
</script>
|
||
|
||
|
||
<style lang="scss" scoped>
|
||
@keyframes jump {
|
||
0% {
|
||
transform: translateY(0);
|
||
}
|
||
|
||
50% {
|
||
transform: translateY(-10px);
|
||
}
|
||
|
||
100% {
|
||
transform: translateY(0);
|
||
}
|
||
}
|
||
|
||
.box {
|
||
width: 100vw;
|
||
height: 47vh;
|
||
box-sizing: border-box;
|
||
|
||
}
|
||
|
||
.top {
|
||
display: flex;
|
||
padding-top: 1vh;
|
||
// color: transparent;
|
||
|
||
.l {
|
||
flex: 1;
|
||
height: 46vh;
|
||
overflow: hidden;
|
||
box-sizing: border-box;
|
||
position: relative;
|
||
|
||
.user {
|
||
position: absolute;
|
||
width: 98%;
|
||
height: 35vh;
|
||
|
||
}
|
||
|
||
}
|
||
|
||
.c {
|
||
flex: 2;
|
||
height: 46vh;
|
||
position: relative;
|
||
|
||
.product-list {
|
||
height: 75%;
|
||
// background-color: red;
|
||
display: flex;
|
||
justify-content: space-between;
|
||
position: relative;
|
||
|
||
.product {
|
||
height: 100%;
|
||
width: 32%;
|
||
// background-color: #fff;
|
||
}
|
||
|
||
.product-icon {
|
||
width: 2vw;
|
||
height: 2vw;
|
||
position: absolute;
|
||
animation: jump 1s infinite;
|
||
top: 2vh;
|
||
}
|
||
}
|
||
|
||
.Views {
|
||
height: 25%;
|
||
width: 100%;
|
||
box-sizing: border-box;
|
||
padding: 0 15px;
|
||
color: white;
|
||
font-size: 12px;
|
||
overflow: hidden;
|
||
position: relative;
|
||
|
||
.c-b-img {
|
||
position: absolute;
|
||
width: 99%;
|
||
top: 0;
|
||
height: 99%;
|
||
left: 0;
|
||
// background-color: #fff;
|
||
|
||
}
|
||
|
||
.view-content {
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: space-around;
|
||
height: 100%;
|
||
// color: ;
|
||
// display: flex;
|
||
// height: 100%;
|
||
// width: 100%;
|
||
// align-items: center;
|
||
// justify-content: space-between;
|
||
// padding: 0 20px;
|
||
}
|
||
}
|
||
|
||
}
|
||
|
||
.r {
|
||
flex: 1;
|
||
height: 46vh;
|
||
position: relative;
|
||
|
||
}
|
||
}
|
||
|
||
.bottom {
|
||
// background-color: green;
|
||
display: flex;
|
||
padding-top: 1vh;
|
||
|
||
.l {
|
||
flex: 1;
|
||
height: 46vh;
|
||
position: relative;
|
||
|
||
.user {
|
||
margin-top: 4.5vh;
|
||
position: absolute;
|
||
width: 98%;
|
||
height: 35vh;
|
||
box-sizing: border-box;
|
||
overflow: hidden;
|
||
|
||
}
|
||
|
||
}
|
||
|
||
.c {
|
||
flex: 2;
|
||
height: 46vh;
|
||
position: relative;
|
||
|
||
.transactionUsers {
|
||
position: absolute;
|
||
width: 100%;
|
||
height: 40vh;
|
||
top: 5vh;
|
||
}
|
||
|
||
|
||
}
|
||
|
||
.r {
|
||
flex: 1;
|
||
height: 46vh;
|
||
position: relative;
|
||
|
||
.user {
|
||
box-sizing: border-box;
|
||
// padding-top: 5vh;
|
||
width: 100%;
|
||
// height: 46vh;
|
||
margin-top: 7vh;
|
||
height: 38vh;
|
||
|
||
.btns {
|
||
color: white;
|
||
display: flex;
|
||
justify-content: flex-end;
|
||
margin-bottom: 2vh;
|
||
|
||
.btn {
|
||
margin-right: 1vw;
|
||
font-size: 12px;
|
||
padding: 3px 10px;
|
||
border: 1px solid #2A538D;
|
||
border-radius: 20px;
|
||
}
|
||
}
|
||
|
||
.list {
|
||
|
||
// background-color: #fff;
|
||
box-sizing: border-box;
|
||
padding: 0 1vw 50px 1vw;
|
||
height: 34vh;
|
||
}
|
||
}
|
||
|
||
}
|
||
}
|
||
|
||
.img-cls {
|
||
width: 98%;
|
||
height: 45vh;
|
||
position: absolute;
|
||
top: 50%;
|
||
left: 50%;
|
||
transform: translate(-50%, -50%);
|
||
}
|
||
|
||
.center {
|
||
position: absolute;
|
||
top: 50%;
|
||
left: 50%;
|
||
transform: translate(-50%, -50%);
|
||
}
|
||
|
||
.progress-bar {
|
||
transform: translateY(12px);
|
||
width: 100%;
|
||
height: 10px;
|
||
background-color: #122E3F;
|
||
// border-radius: 10px;
|
||
overflow: hidden;
|
||
}
|
||
|
||
.progress {
|
||
width: 70%;
|
||
height: 100%;
|
||
background: linear-gradient(to right, #455CCC, #51C2E0);
|
||
transition: width 0.5s ease-in-out;
|
||
}
|
||
</style> |