detail.vue
1.55 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
<template>
<div class="app-container">
<section class="qg-container">
<h4 class="qg-container__title">详情</h4>
<el-form :model="tshjInfo" class="qg-edit-form" label-width="120px">
<el-form-item label="图书" prop="bookId">
<span v-if="tshjInfo.bookId && tshjInfo.bookIdEntity">
{{ tshjInfo.bookIdEntity.code }}
</span>
<span v-else>--</span>
</el-form-item>
<el-form-item label="归还时间" prop="returnTime">
{{tshjInfo.returnTime && tshjInfo.returnTime.substring(0,10) || '--'}}
</el-form-item>
<el-form-item>
<el-button @click="goBack">返回</el-button>
</el-form-item>
</el-form>
</section>
</div>
</template>
<script>
import {tshj} from '@/api/moudles/zxm/tshj';
import {componentsData} from './config.js'
export default {
name:'TshjDetail',
data() {
const id = this.$route.query.id;
return {
componentsData,
id,
tshjInfo: {}
};
},
created() {
if (this.id) {
this.tshj(this.id);
}
},
methods: {
tshj(id) {
tshj(id).then(response => {
if (response.data) {
this.tshjInfo = response.data;
}
});
},
goBack() {
this.$router.back();
}
}
};
</script>