Commit 0723fc54 authored by songrui's avatar songrui

Merge branch 'chronic-dev' of http://gitlab.yiboshi.com/nightkis1995/frontend-h5 into chronic-dev

parents 04fdfada 11f35ee5
......@@ -374,7 +374,7 @@ export default {
onSubmit() {
return new Promise((resolve, reject) => {
this.$refs.form.validate().then(() => {
resolve(...this.form)
resolve(this.form)
}).catch((e) => {
console.warn('ArchiveCommon error', e)
})
......
<template>
<div class="screening-first-cont">
form
</div>
</template>
<script>
export default {
props: {
info:Object
},
data() {
return {}
}
}
</script>
<style lang="less" scoped>
</style>
<template>
<div class="screening-first-result text-center pt-3 px-3">
<doc-icon type="doc-check-circle" style="font-size: .46rem;"/>
<div class="mt-3">筛查完成</div>
<div class="text-start mt-5">
<span style="color: #595959;">通过筛查,您的慢病高危评估结果为:</span>
<span class="text-red">高危人群</span>
</div>
<div style="margin-top: .48rem">
<van-button type='primary' block round plain
@click='toScreen'>专病高危筛查</van-button>
<div class="pt-3"></div>
<van-button type='primary' block round plain
@click='toDetail'>查看居民详情</van-button>
<div class="text-16 pt-5" style="color: #8c8c8c;"
@click="toWorkbench">返回工作台</div>
</div>
</div>
</template>
<script>
export default {
props: {
residentInfoId: String
},
methods: {
toScreen() {
this.$router.replace({
path: '/doctor/screening/secondForm',
query: {
residentInfoId: this.residentInfoId
}
})
},
toDetail() {
this.$router.replace({
path: '/doctor/patient-detail',
query: {
residentInfoId: this.residentInfoId
}
})
},
toWorkbench() {
this.$router.replace({
path: '/doctor/workbench'
})
}
}
}
</script>
<style lang="less" scoped>
</style>
<template>
<div class="h-full flex flex-col screening-second">
<DocNavBar :title="`${id ? '修改' : '新增'}专病高危筛查`" class="shrink-0"></DocNavBar>
<DocNavBar :title="`${id ? '修改' : '新增'}专病高危筛查`" class="shrink-0" :backFunc="onBack"></DocNavBar>
<div class="p-4 overflow-y-auto grow" ref="all">
<archive-common :info='info'
v-show='step ==1'
ref='baseInfo'
></archive-common>
<form-cont :info='info'
v-show='step == 2'
ref='formInfo'
></form-cont>
<result :residentInfoId="residentInfoId"
v-show='step == 3'
></result>
</div>
<div class='bottom-small-line'></div>
<div class='pt-2 pb-2'>
<div class='px-5 grow flex flex-col justify-end' v-if='step == 1'>
<van-button type='primary' block round
@click='toNext(2)'>下一步
</van-button>
</div>
<!-- <div class='px-5 flex align-center justify-around' v-if='step == 2'>
<van-button type='primary' round plain style='width: 44%'
@click='toNext(1)'>上一步
</van-button>
<van-button type='primary' round style='width: 44%'
@click='toNext(3)'>下一步
</van-button>
</div>-->
<div class='px-5 grow flex flex-col justify-end' v-if='step == 2'>
<van-button type='primary' block round
@click='onsubmit'>提交
</van-button>
</div>
</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'
import FormCont from '@/doctor/screening/second/FormCont'
import Result from '@/doctor/screening/second/Result'
export default {
components: {
Result,
FormCont,
ArchiveCommon,
DocNavBar
},
data() {
return {
step: 1,
info: {}
}
},
computed: {
id() {
return this.$route.query.id
......@@ -18,6 +67,65 @@ 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.residentInfoId)
const {
id,
createDate,
createDoctorId,
createDoctorName,
createOfficeId,
createOfficeName,
createUnitId,
createUnitName,
updated,
...others
} = res.data
this.info = {
personId: id,
...others,
}
}
},
async toNext(val) {
this.$refs.all.scrollTo(0, 0)
if (val == 2) {
this.firstForm = await this.$refs.baseInfo.onSubmit()
}
// if (val == 3) {
// await this.$refs.formInfo.onSubmit()
// }
this.step = val
},
//提交所有表单
onsubmit() {
},
onBack() {
if (this.step == 1) {
this.$router.back()
} else {
this.step--
}
}
}
}
</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