DetailList.vue
2.78 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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
<template>
<div class="list_container">
<!-- {{type}} -->
<div class="item" v-for="(item,index) in list" :key="index">
<h2>{{item.title}}</h2>
<div class="item_child">
<div class="child" v-for="(childItem,childIndex) in item.arr" :key="childIndex" @click="jumpPdfDetail(childItem)">
<div class="child-title"><span>{{childItem.title}}</span><img :src="pdfIcon" alt=""></div>
<div class="time">{{childItem.time}}</div>
</div>
</div>
</div>
<div class="item-other">
1
</div>
</div>
</template>
<script>
export default {
name: 'DetailList',
props: {
type: {
type: String,
default: '1'
}
},
data() {
return {
pdfIcon: require('@/assets/icon/pdf_icon.png'),
list: [
{
title: '无锡产业发展集团有限公司2020年三季度财务报表',
arr: [
{ time: '2021.4.12', title: '初稿' }
]
},
{
title: '无锡产业发展集团有限公司2020年三季度财务报表',
arr: [
{ time: '2021.4.12', title: '初稿' },
{ time: '2021.4.13', title: '上会搞' },
]
},
{
title: '无锡产业发展集团有限公司2020年三季度财务报表',
arr: [
{ time: '2021.4.12', title: '初稿' },
{ time: '2021.4.13', title: '上会搞' },
{ time: '2021.4.13', title: '终稿' },
]
}
]
}
},
watch: {
type() {
// console.log(111)
return this.type
}
},
methods: {
jumpPdfDetail(item) {
this.$router.push({
name: 'PdfView',
query: {
item
}
})
}
}
}
</script>
<style lang="less" scoped>
.item {
border-radius: 8px;
background-color: #fff;
box-shadow: 0px 0px 6px 0px rgba(2, 15, 41, 0.06);
margin-bottom: 10px;
h2 {
padding: 10px 15px;
border-bottom: 1px solid #efefef;
font-size: 14px;
color: #222;
}
.item_child {
display: flex;
padding: 15px 0;
.child {
width: 33%;
text-align: center;
position: relative;
&:after {
content: "";
position: absolute;
top: 0px;
right: 0;
border-right: 1px solid #efefef;
height: 40px;
}
&:last-child {
&:after {
border-right: 0;
}
}
.child-title {
display: flex;
align-items: center;
justify-content: center;
span {
text-decoration: underline;
font-size: 14px;
color: #388de2;
margin-right: 2px;
}
}
.time {
font-size: 11px;
color: #666;
}
}
img {
width: 19px;
height: 14px;
}
}
}
</style>