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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
<template>
<div class="app-content" style="height: 65vh;overflow: auto;">
<a-spin :spinning="loading" style="width: 100%;height: 100%;">
<div style="height: calc(100% - 36px);overflow:auto;">
<info-edit :formData.sync="formData" @load="onLoad" @sub="save" ref="infoEdit" />
</div>
<div style="text-align:center;width:100%; height: 36px;">
<a-button type="primary" @click="submit">保存</a-button>
</div>
</a-spin>
</div>
</template>
<script>
import infoEdit from '@/views/basicSetting/unit/components/infoEdit'
import { getUnitComplete, setUnitComplete } from '@/views/utils/auth'
export default {
name: "unitInfoEdit2",
components: {
infoEdit
},
data () {
return {
formData: {
id: null,
unitName: null,
unitType: null,
unitAddress: null,
linkName: null,
telephone: null,
email: null,
fax: null,
organizationCode: null,
registeredAddress: null,
postCode: null,
legalPerson: null,
workforce: null,
specializedPersonnel: null,
researchPersonnel: null,
depositBank: null,
bankAccount: null,
depositBankAddress: null,
interbankNumber: null,
},
loading: false
}
},
created () {
this.getAppUnitInfo()
},
methods: {
getAppUnitInfo () {
this.loading = true
this.$api.unit.getAppUnitInfo().then(({ data = {} }) => {
if (data) {
this.formData = data.unit
if (data.isComplete) {
setUnitComplete(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>
<style scoped lang="less">
::v-deep .ant-spin-container {
width: 100%;
height: 100%;
}
</style>