diff --git a/src/doctor/components/archiveCommon/archiveCommon.vue b/src/doctor/components/archiveCommon/archiveCommon.vue index 1026c769c330eafcd8b7f05b4ece1579ac001232..15a30f551ef27bb35a823685689416c0f97dfc9d 100644 --- a/src/doctor/components/archiveCommon/archiveCommon.vue +++ b/src/doctor/components/archiveCommon/archiveCommon.vue @@ -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) }) diff --git a/src/doctor/screening/second/FormCont.vue b/src/doctor/screening/second/FormCont.vue new file mode 100644 index 0000000000000000000000000000000000000000..a6c1f9d5e9f83a76aaaa618275e450e3c09d24fe --- /dev/null +++ b/src/doctor/screening/second/FormCont.vue @@ -0,0 +1,21 @@ +<template> + <div class="screening-first-cont"> + form + </div> +</template> + +<script> +export default { + props: { + info:Object + }, + data() { + return {} + } + +} +</script> + +<style lang="less" scoped> + +</style> diff --git a/src/doctor/screening/second/Result.vue b/src/doctor/screening/second/Result.vue new file mode 100644 index 0000000000000000000000000000000000000000..ebfa295504729feca5fe2fd543163f44e010a606 --- /dev/null +++ b/src/doctor/screening/second/Result.vue @@ -0,0 +1,54 @@ +<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> diff --git a/src/doctor/screening/second/SecondForm.vue b/src/doctor/screening/second/SecondForm.vue index 5bb1e495126540eef6043a3915a128f18cbb0081..9d54029e435312ab8213074b168a811331bfb580 100644 --- a/src/doctor/screening/second/SecondForm.vue +++ b/src/doctor/screening/second/SecondForm.vue @@ -1,16 +1,65 @@ <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>