156 lines
4.0 KiB
Vue
Raw Normal View History

2024-10-18 17:31:35 +08:00
<!--
* @Author: SunTao 328867980@qq.com
* @Date: 2024-10-18 10:31:31
* @LastEditors: SunTao 328867980@qq.com
* @LastEditTime: 2024-10-18 14:22:33
* @FilePath: \znxjxt-ui\src\views\big-screen\disease-components\pic-rank.vue
* @Description: 病害巡检-pic排名
-->
<template>
<div class="content">
<vue-seamless-scroll
class="vue-scroll"
:class-option="defaultOption"
:data="picList"
>
<div
class="pic-div"
v-for="(item, index) in picList"
:key="`pic-${index}`"
>
<div class="pic-top">
<div class="pic-top-name">
<a>{{ index + 1 }}</a
>{{ item.name }}
</div>
2024-10-22 09:55:33 +08:00
<div class="pic-top-value">
<span>{{ item.value }}</span>
</div>
2024-10-18 17:31:35 +08:00
</div>
<div class="pic-bottom">
<div
:style="{ width: `${(item.value / 300) * 100}%` }"
:class="`pic-bottom-${index}`"
></div>
</div>
</div>
</vue-seamless-scroll>
</div>
</template>
<script>
import vueSeamlessScroll from "vue-seamless-scroll";
export default {
name: "PicRank",
components: { vueSeamlessScroll },
data() {
return {
// 轮播配置
defaultOption: {
step: 0.2, // 数值越大速度滚动越快
limitMoveNum: 1,
hoverStop: true, // 是否开启鼠标悬停stop
direction: 1, // 0向下 1向上 2向左 3向右
openWatch: true, // 开启数据实时监控刷新dom
singleHeight: 0, // 单步运动停止的高度(默认值0是无缝不停止的滚动)direction => 0/1
singleWidth: 0, // 单步运动停止的宽度(默认值0是无缝不停止的滚动) direction => 2/3
waitTime: 2000, // 单步运动停止的时间(默认值1000ms)
},
// 排名数据
picList: [
{ name: "沈阳绕城高速G1501", value: 95 },
{ name: "沈阳绕城高速G1501", value: 75 },
{ name: "沈阳绕城高速G1501", value: 70 },
{ name: "沈阳绕城高速G1501", value: 65 },
{ name: "沈阳绕城高速G1501", value: 55 },
],
};
},
};
</script>
<style lang="scss" scoped>
.content {
width: 100%;
height: 100%;
color: #c7daf2;
2024-10-22 09:55:33 +08:00
overflow: hidden;
2024-10-18 17:31:35 +08:00
.pic-div {
width: calc(100% - 1rem);
height: 3rem;
display: flex;
flex-direction: column;
justify-content: space-between;
margin: 0.5rem;
padding: 0.5rem 1rem;
2024-10-22 09:55:33 +08:00
border: 1px solid rgba(47, 120, 170, 0.4);
2024-10-18 17:31:35 +08:00
.pic-top {
display: flex;
justify-content: space-between;
.pic-top-name {
display: flex;
align-items: flex-end;
font-size: 0.8rem;
a {
display: flex;
width: 1rem;
height: 1rem;
margin-right: 0.5rem;
justify-content: center;
align-items: center;
2024-10-22 09:55:33 +08:00
border: 1px solid rgba(47, 120, 170, 0.4);
2024-10-18 17:31:35 +08:00
}
}
.pic-top-value {
2024-10-22 09:55:33 +08:00
font-family: "DouYu";
2024-10-18 17:31:35 +08:00
font-size: 1rem;
2024-10-22 09:55:33 +08:00
background: linear-gradient(
to bottom,
#ffffff,
#2773d0
); /*设置渐变的方向从左到右 颜色从ff0000到ffff00*/
background-clip: text; /*将设置的背景颜色限制在文字中*/
-webkit-text-fill-color: transparent; /*给文字设置成透明*/
2024-10-18 17:31:35 +08:00
}
}
.pic-bottom {
width: 100%;
height: 0.3rem;
2024-10-22 09:55:33 +08:00
background-color: rgba(2, 40, 88, 0.7);
2024-10-18 17:31:35 +08:00
.pic-bottom-0 {
height: 0.3rem;
background: linear-gradient(90deg, #322707 0%, #ffc000 100%);
}
.pic-bottom-1 {
height: 0.3rem;
background: linear-gradient(90deg, #322707 0%, #00fcff 100%);
}
.pic-bottom-2 {
height: 0.3rem;
background: linear-gradient(90deg, #322707 0%, #22b5ff 100%);
}
.pic-bottom-3 {
height: 0.3rem;
background: linear-gradient(90deg, #322707 0%, #00fcff 100%);
}
.pic-bottom-4 {
height: 0.3rem;
background: linear-gradient(90deg, #322707 0%, #22b5ff 100%);
}
}
}
}
</style>