master
parent
fbd346251f
commit
02815ddfe8
@ -0,0 +1,107 @@
|
||||
<template>
|
||||
<div>
|
||||
<div class="dept-statics bg-color-black">
|
||||
<div class="title d-flex align-center">
|
||||
<span>
|
||||
<SvgIcon icon-class="tudi" class="text-icon"></SvgIcon>
|
||||
</span>
|
||||
<span class="fs-xl text">资产详情</span>
|
||||
</div>
|
||||
|
||||
<dv-scroll-board class="body" :config="config">
|
||||
</dv-scroll-board>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import SvgIcon from '@/components/SvgIcon/index.vue'
|
||||
export default {
|
||||
components: {
|
||||
SvgIcon,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
handleNum (num, precision=2,times=1) {
|
||||
if (!num) return Number(0).toFixed(precision)
|
||||
if (typeof num === 'string') {
|
||||
if (isNaN(Number(num))) {
|
||||
return Number(0).toFixed(precision)
|
||||
} else {
|
||||
return Number(num * times).toFixed(precision)
|
||||
}
|
||||
} else if (typeof num === 'number') {
|
||||
return (num * times).toFixed(precision)
|
||||
} else {
|
||||
return Number(0).toFixed(precision)
|
||||
}
|
||||
},
|
||||
},
|
||||
computed: {
|
||||
config() {
|
||||
let data = this.$store.state.bigdata.departmentStatics || []
|
||||
return {
|
||||
data: data?.map(dept => [
|
||||
dept.name,dept.land_count, this.handleNum(dept.land_shijimianji), dept.house_count, this.handleNum(dept.house_shijimianji)
|
||||
]),
|
||||
carousel: 'single',
|
||||
rowNum: 10,
|
||||
oddRowBGC: '#4fa497',
|
||||
evenRowBGC: 'transparent',
|
||||
headerBGC: 'transparent',
|
||||
header: ['公司','土地','土地面积','房产','房产面积'],
|
||||
columnWidth: [128,50,100,50,100],
|
||||
align: ['center','center','center','center','center']
|
||||
}
|
||||
}
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.text-icon {
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
color: #1da4a1;
|
||||
}
|
||||
.dept-statics {
|
||||
padding: 20px 10px;
|
||||
width: 100%;
|
||||
.title {
|
||||
flex: 0;
|
||||
display: flex;
|
||||
color: #fff;
|
||||
padding: 0 20px;
|
||||
align-items: center;
|
||||
.text {
|
||||
padding: 0 8px;
|
||||
}
|
||||
}
|
||||
.body {
|
||||
width: 100%;
|
||||
height: 540px;
|
||||
padding: 10px 10px;
|
||||
}
|
||||
}
|
||||
.department-statics {
|
||||
&__item {
|
||||
color: #fff;
|
||||
padding: 12px 18px;
|
||||
|
||||
&--name {
|
||||
font-size: 17px;
|
||||
font-weight: 600;
|
||||
margin-bottom: 6px;
|
||||
}
|
||||
&--house, &--land {
|
||||
text-indent: 6px;
|
||||
}
|
||||
.text-icon {
|
||||
color: #73f3df;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
Loading…
Reference in new issue