AnalysisLine.vue
1.72 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
<!--
* @Author: yangming yangming@didihu.com.cn
* @Date: 2023-09-14 11:21:38
* @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2023-10-13 10:53:12
* @FilePath: \scrm-micro-home\src\views\home\components\AnalysisLine.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<template>
<div class="analysis-border" :style="{ 'background-image': analysisData.backgroundColor }">
<div class="analysis-border-title">{{ analysisData.title }}</div>
<div class="analysis-border-num flex">
累计增量产值
<span>¥{{ analysisData.value | formatNumber }}</span>
<span class="jump-btn" @click="jumpDetail" v-if="analysisData.isShow()">查看明细</span>
<span class="jump-btn" v-else>暂无权限</span>
</div>
<div class="analysis-border-line">
<slot />
</div>
</div>
</template>
<script>
import util from '@/utils/util'
export default {
props: {
analysisData: {
type: Object,
default: () => {}
}
},
data() {
return {}
},
filters: {
formatNumber(val) {
return util.formatNumber(val)
}
},
methods: {
jumpDetail() {
this.$history.push(this.analysisData.url)
}
}
}
</script>
<style lang="scss" scoped>
.analysis-border {
padding: 16px 20px;
&-title {
font-size: 16px;
color: #333333;
}
&-num {
font-size: 14px;
color: #666666;
margin: 10px 0px;
span {
color: #2cca74;
margin-left: 10px;
}
.jump-btn {
font-size: 14px;
color: #5850ff;
margin-left: auto;
cursor: pointer;
}
}
&-line {
height: 104px;
}
}
</style>