wangfei 6 vuotta sitten
vanhempi
commit
8e1f5d43cf

+ 1
- 1
src/components/libraryListItem/index.vue Näytä tiedosto

@@ -84,7 +84,7 @@ export default {
84 84
           status = '借阅中'
85 85
           break
86 86
         case '0':
87
-          status = '期未还'
87
+          status = '期未还'
88 88
           break
89 89
         case '3':
90 90
           status = '逾期归还'

+ 26
- 4
src/pages/user/library/borrowedRecord/index.vue Näytä tiedosto

@@ -37,12 +37,12 @@
37 37
         <div class="flex-item">
38 38
           <div>
39 39
             <div>
40
-              <span>状态值</span>
40
+              <span>{{myBookStatus}}</span>
41 41
             </div>
42 42
             <span class="title">{{currentItem.BookName}}</span>
43
-            <span>借阅时间:</span>
44
-            <span>应还时间:</span>
45
-            <span>归还时间:</span>
43
+            <span>借阅时间:{{toolClass.dateFormat(currentItem.BorrowDate)}}</span>
44
+            <span>应还时间:{{toolClass.dateFormat(currentItem.EndDate, 'yyyy-MM-dd')}}</span>
45
+            <span>归还时间:{{currentItem.BorrowStatus == '2' || currentItem.BorrowStatus == '3' ? '暂未归还' : toolClass.dateFormat(currentItem.ReturnDate)}}</span>
46 46
           </div>
47 47
         </div>
48 48
       </div>
@@ -53,6 +53,7 @@
53 53
 <script>
54 54
 import slideTabH from '../../../../components/slideTabH/index'
55 55
 import libraryListItem from '../../../../components/libraryListItem/index'
56
+import toolClass from '../../../../util/util'
56 57
 import { createNamespacedHelpers } from 'vuex'
57 58
 const { mapState: mapBookState, mapActions: mapBookAction } = createNamespacedHelpers('book')
58 59
 export default {
@@ -73,6 +74,27 @@ export default {
73 74
     this.getList('2')
74 75
   },
75 76
   computed: {
77
+    myBookStatus() {
78
+      let status = ''
79
+      switch(this.currentItem.BorrowStatus) {
80
+        case '4':
81
+          status = '已预约'
82
+          break
83
+        case '1':
84
+          status = '借阅中'
85
+          break
86
+        case '0':
87
+          status = '逾期未还'
88
+          break
89
+        case '3':
90
+          status = '逾期归还'
91
+          break
92
+        case '2':
93
+          status = '已归还'
94
+          break
95
+      }
96
+      return status
97
+    },
76 98
   },
77 99
   components: {
78 100
     libraryListItem,