|
@@ -1,25 +1,45 @@
|
1
|
1
|
<template>
|
2
|
|
- <div class="libraryListItem flex-h">
|
|
2
|
+ <div class="libraryListItem flex-h" @click="itemClick(data)">
|
3
|
3
|
<div class="img">
|
4
|
4
|
<a>
|
5
|
5
|
<img :src="data.BookImg" class="centerLabel cover" alt>
|
6
|
6
|
</a>
|
|
7
|
+ <span v-if="type === 1" class="active">状态值</span>
|
7
|
8
|
</div>
|
8
|
9
|
<div class="flex-item">
|
9
|
10
|
<div>
|
10
|
11
|
<span>{{data.BookName}}</span>
|
11
|
|
- <h5>{{data.BookDescription}}</h5>
|
12
|
|
- <div class="flex-h" style="margin-top: .06rem;">
|
|
12
|
+ <h5 v-if="!type">{{data.BookDescription}}</h5>
|
|
13
|
+ <div v-if="!type" class="flex-h" style="margin-top: .06rem;">
|
13
|
14
|
<span class="flex-item">{{data.Author}} 著</span>
|
14
|
15
|
<span class="status" @click="appointmentBook(data.BookId)">{{data.Status}}</span>
|
15
|
16
|
</div>
|
16
|
|
- <div class="flex-h">
|
|
17
|
+ <div v-if="!type" class="flex-h">
|
17
|
18
|
<span class="flex-item">{{data.Publisher}}</span>
|
18
|
19
|
<span>
|
19
|
20
|
剩余可借
|
20
|
21
|
<em>{{data.LeftNum}}</em>本
|
21
|
22
|
</span>
|
22
|
23
|
</div>
|
|
24
|
+ <div v-if="type === 1" class="flex-h" style="margin-top: .06rem;">
|
|
25
|
+ <span class="flex-item">应还时间:{{data.ReturnDate}}</span>
|
|
26
|
+ </div>
|
|
27
|
+ <div v-if="type === 1" class="flex-h">
|
|
28
|
+ <span class="flex-item">{{data.CaseName}}</span>
|
|
29
|
+ <span>已归还</span>
|
|
30
|
+ <span>已逾期
|
|
31
|
+ <em>4</em>天
|
|
32
|
+ </span>
|
|
33
|
+ </div>
|
|
34
|
+ <div v-if="type === 2" class="flex-h" style="margin-top: .06rem;">
|
|
35
|
+ <span class="flex-item">预约时间:{{data.appointmentDate}}</span>
|
|
36
|
+ </div>
|
|
37
|
+ <div v-if="type === 2" class="flex-h" style="margin-top: 0;">
|
|
38
|
+ <span class="flex-item">预约资格将保留至:2018-12-08</span>
|
|
39
|
+ </div>
|
|
40
|
+ <div v-if="type === 2" class="flex-h" style="margin-top: 0;">
|
|
41
|
+ <span class="flex-item">{{data.CaseName}}</span>
|
|
42
|
+ </div>
|
23
|
43
|
</div>
|
24
|
44
|
</div>
|
25
|
45
|
</div>
|
|
@@ -29,7 +49,7 @@
|
29
|
49
|
|
30
|
50
|
export default {
|
31
|
51
|
name: '',
|
32
|
|
- props: ['data'],
|
|
52
|
+ props: ['data', 'type'],
|
33
|
53
|
data () {
|
34
|
54
|
return {
|
35
|
55
|
}
|
|
@@ -43,6 +63,9 @@ export default {
|
43
|
63
|
methods: {
|
44
|
64
|
appointmentBook (id) {
|
45
|
65
|
this.$emit('appointmentBook', id)
|
|
66
|
+ },
|
|
67
|
+ itemClick (target) {
|
|
68
|
+ this.$emit('itemClick', target)
|
46
|
69
|
}
|
47
|
70
|
}
|
48
|
71
|
}
|
|
@@ -53,12 +76,12 @@ export default {
|
53
|
76
|
.libraryListItem {
|
54
|
77
|
width: 100%;
|
55
|
78
|
position: relative;
|
56
|
|
- overflow: hidden;
|
|
79
|
+ overflow: visible;
|
57
|
80
|
align-items: center;
|
58
|
81
|
.img {
|
59
|
82
|
width: 0.78rem;
|
60
|
83
|
position: relative;
|
61
|
|
- overflow: hidden;
|
|
84
|
+ overflow: visible;
|
62
|
85
|
a {
|
63
|
86
|
width: 100%;
|
64
|
87
|
display: block;
|
|
@@ -68,6 +91,23 @@ export default {
|
68
|
91
|
padding-bottom: 143.5%;
|
69
|
92
|
background: #eee;
|
70
|
93
|
border-radius: 0.03rem;
|
|
94
|
+ z-index: 1;
|
|
95
|
+ }
|
|
96
|
+ > span {
|
|
97
|
+ display: inline-block;
|
|
98
|
+ position: absolute;
|
|
99
|
+ left: -0.1rem;
|
|
100
|
+ bottom: 0.2rem;
|
|
101
|
+ z-index: 2;
|
|
102
|
+ font-size: 0.12rem;
|
|
103
|
+ color: #fff;
|
|
104
|
+ background: #333;
|
|
105
|
+ line-height: 0.25rem;
|
|
106
|
+ border-radius: 0.25rem;
|
|
107
|
+ padding: 0 0.15rem;
|
|
108
|
+ &.active{
|
|
109
|
+ background: #fc5534;
|
|
110
|
+ }
|
71
|
111
|
}
|
72
|
112
|
}
|
73
|
113
|
> div.flex-item {
|
|
@@ -89,9 +129,9 @@ export default {
|
89
|
129
|
max-height: 0.43rem;
|
90
|
130
|
}
|
91
|
131
|
> h5 {
|
92
|
|
- font-size: .12rem;
|
|
132
|
+ font-size: 0.11rem;
|
93
|
133
|
color: #ccc;
|
94
|
|
- line-height: .16rem;
|
|
134
|
+ line-height: 0.16rem;
|
95
|
135
|
font-weight: normal;
|
96
|
136
|
overflow: hidden;
|
97
|
137
|
text-overflow: ellipsis;
|