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
87
88
<template>
<div class="h-full flex flex-col screening-first">
<DocNavBar :title="`${id ? '修改' : '新增'}主要慢病高危筛查`" class="shrink-0"
:backFunc="onBack"></DocNavBar>
<div class="p-4 overflow-y-auto grow" ref="all">
<archiveCommon :info="baseInfo" v-if="step == 1"></archiveCommon>
<FormCont v-else-if="step == 2" ref="FormCont"/>
<Result v-else-if="step == 3" :residentInfoId="residentInfoId"/>
</div>
<div class="shrink-0" v-if="step !== 3">
<div class='bottom-small-line'></div>
<div class='px-5 py-2 grow flex justify-between'>
<template v-if='step == 1'>
<van-button type='primary' block round
@click='toNext(2)'>下一步</van-button>
</template>
<template v-else>
<van-button type='primary' block round
@click='toNext(3)'>提交</van-button>
</template>
</div>
</div>
</div>
</template>
<script>
import DocNavBar from '@/doctor/components/docNavBar/DocNavBar.vue'
import archiveCommon from '@/doctor/components/archiveCommon/archiveCommon.vue'
import FormCont from './FormCont.vue'
import Result from './Result.vue'
import { getChronicResidentsId } from '@/api/doctor/generalFU'
export default {
components: {
DocNavBar,
archiveCommon,
FormCont,
Result
},
data() {
return {
step: 1,
// 患者基础信息
baseInfo: {}
}
},
computed: {
id() {
return this.$route.query.id
},
residentInfoId() {
return this.$route.query.residentInfoId
}
},
created() {
this.init()
},
methods: {
async init() {
if (this.id) {
} else {
let res = await getChronicResidentsId(this.residentInfoId)
this.baseInfo = res.data || {}
}
},
toNext(val) {
if (val == 3) {
this.$refs.FormCont.submit()
return
}
this.step = val
this.$refs.all.scrollTo(0, 0)
},
onBack() {
if (this.step == 1) {
this.$router.back()
} else {
this.step--
}
}
}
}
</script>
<style lang="less" scoped>
</style>