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
<template>
<div class="app_content from-table">
<a-spin :spinning="loading" style="width: 100%;height: 100%;">
<user-info :data="personInfo" />
</a-spin>
</div>
</template>
<script>
import userInfo from '@/views/manager/user/components/userInfo'
export default {
name: "userView",
components: {
userInfo
},
data () {
return {
personInfo: { personName: null, sex: null, certId: null, mobile: null, specName: null, titleName: null, educationName: null, unitName: null },
loading: false,
}
},
props: {
value: {
type: String,
default: () => {
return null
}
},
},
created () {
this.getPersonById()
},
methods: {
getPersonById () {
this.loading = true
this.$api.person.getPersonById({ id: this.value }).then(({ data = {} }) => {
if (data) {
this.personInfo = data
}
this.loading = false
}).catch(() => { this.loading = false })
}
}
}
</script>