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
<template>
<div class="app-content" style="height:480px;overflow:auto;">
<a-spin :spinning="loading" style="width: 100%;height: 100%;">
<info-edit :formData.sync="formData" @load="onLoad" @sub="save" ref="infoEdit" />
<a-row>
<a-col style="text-align: center;width:100%;margin-top: 12px;">
<a-button type="primary" style="width:80px;" @click="submit">提交</a-button>
</a-col>
</a-row>
</a-spin>
</div>
</template>
<script>
import { getType, getComplete, setComplete } from '@/views/utils/auth'
import infoEdit from '@/views/basicSetting/person/components/infoEdit'
export default {
name: "personInfoEdit2",
components: {
infoEdit
},
data () {
return {
formData: {
id: null,
personName: null,
nation: null,
title: null,
spec: null,
degree: null,
duty: null,
telephone: null,
fax: null,
email: null,
address: null,
},
loading: false
}
},
created () {
this.getAppPersonInfo()
},
methods: {
getAppPersonInfo () {
this.loading = true
this.$api.person.getAppPersonInfo().then(({ data = {} }) => {
if (data) {
this.formData = data.person
if (data.isComplete) {
setComplete(data.isComplete)
this.$emit('sub', data.isComplete)
}
}
this.loading = false
}).catch(() => { this.loading = false })
},
submit () {
this.$refs.infoEdit.submit()
},
onLoad (value) {
this.loading = value
},
save (value) {
this.$emit('sub', value)
},
}
}
</script>