You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

93 lines
2.1 KiB

2 years ago
<template>
<div>
<div class="ranking bg-color-black">
2 years ago
<div class="title d-flex align-center">
2 years ago
<span>
2 years ago
<SvgIcon icon-class="tudi" class="text-icon"></SvgIcon>
2 years ago
</span>
2 years ago
<span class="fs-xl text">{{ type === 1 ? '土地资产' : '合约中' }}</span>
2 years ago
</div>
2 years ago
<dv-scroll-ranking-board class="dv-scr-rank-board mt-1" :config="ranking" />
</div>
</div>
</template>
<script>
2 years ago
import SvgIcon from "@/components/SvgIcon"
2 years ago
export default {
2 years ago
components: {
SvgIcon
},
2 years ago
data() {
return {
}
},
methods: {},
2 years ago
computed: {
2 years ago
type () {
return this.$store.state.bigdata.type
},
2 years ago
ranking () {
2 years ago
if (this.type === 1) {
if (this.$store.state.bigdata.assets[1]) {
return {
data: this.$store.state.bigdata.assets[1].map(item => ({
name: item.name.length > 16 ? (item.name.slice(0, 14) + '...') : item.name,
value: item.dengjimianji ?? 0
})),
carousel: 'single',
unit: '平方',
waitTime: 4000,
rowNum: 3
}
}
} else if (this.type === 2) {
if (this.$store.state.bigdata.leases) {
return {
data: this.$store.state.bigdata.leases.map(item => ({
name: item.dikuaimingcheng.length > 16 ? (item.dikuaimingcheng.slice(0, 14) + '...') : item.dikuaimingcheng,
value: item.zulinmianji ?? 0
})),
carousel: 'single',
unit: '平方',
waitTime: 4000,
rowNum: 3
}
2 years ago
}
}
2 years ago
2 years ago
}
}
2 years ago
}
</script>
<style scoped lang="scss">
2 years ago
.text-icon {
width: 24px;
height: 24px;
color: #1da4a1;
}
2 years ago
.ranking {
padding: 20px 10px;
width: 100%;
.dv-scr-rank-board {
2 years ago
height: 180px;
padding: 10px 20px;
2 years ago
}
2 years ago
.title {
2 years ago
display: flex;
2 years ago
color: #fff;
padding: 0 20px;
2 years ago
align-items: center;
.text {
padding: 0 8px;
}
2 years ago
}
2 years ago
}
2 years ago
::v-deep .dv-scroll-ranking-board .ranking-column .inside-column {
background: linear-gradient(to left,#7ddacd,#1da4a1);
}
2 years ago
</style>