Commit ef5144e9 authored by gengchunlei's avatar gengchunlei

医生端小程序 v1.2 1、push

parent ca5588e9
<template>
<div class="h-full flex flex-col screening-second">
<DocNavBar :title="`${id ? '修改' : '新增'}专病高危筛查`" class="shrink-0"></DocNavBar>
<div>
<archive-common :info='info'></archive-common>
</div>
</div>
</template>
<script>
import DocNavBar from '@/doctor/components/docNavBar/DocNavBar.vue'
import ArchiveCommon from '@/doctor/components/archiveCommon/archiveCommon'
import { fetchCurrencyById, getChronicResidentsId, getResidentWX } from '@/api/doctor/generalFU'
export default {
components: {
ArchiveCommon,
DocNavBar
},
data() {
return {
info: {}
}
},
computed: {
id() {
return this.$route.query.id
......@@ -18,6 +29,43 @@ export default {
residentInfoId() {
return this.$route.query.residentInfoId
}
},
created() {
this.init()
},
methods: {
async init() {
this.info = {}
if (this.id) {
const res = await fetchCurrencyById({ id: this.id })
let result = res.data || {}
const { residentsRecord = {} } = result
const { id, ...others } = residentsRecord
this.info = {
...others,
personId: id,
...result
}
} else {
const res = await getChronicResidentsId(this.routerDetail.residentInfoId)
const {
id,
createDate,
createDoctorId,
createDoctorName,
createOfficeId,
createOfficeName,
createUnitId,
createUnitName,
updated,
...others
} = res.data
this.info = {
personId: id,
...others,
}
}
},
}
}
</script>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment