Commit 2b786f2c authored by songrui's avatar songrui

初筛表单对接

parent 43dbeb24
...@@ -5,12 +5,27 @@ export function getScreenAllList(residentInfoId, loading) { ...@@ -5,12 +5,27 @@ export function getScreenAllList(residentInfoId, loading) {
return fetchBase({ url: `/chronic-admin/v1/chronic-screening-record/screen-list`,body:{residentInfoId},loading}) return fetchBase({ url: `/chronic-admin/v1/chronic-screening-record/screen-list`,body:{residentInfoId},loading})
} }
// 慢病高危筛查详情
export function firstScreenDetail(params) {
return fetchBase({ url: `/chronic-resident/v1/chronic-screening-record/record`, body: params, loading: true })
}
// 慢病专病筛查详情 // 慢病专病筛查详情
export function secondScreenDetail(params) { export function secondScreenDetail(params) {
return fetchBase({ url: `/chronic-resident/v1/chronic-screening-record/rescreen-detail`, body: params, loading: true }) return fetchBase({ url: `/chronic-resident/v1/chronic-screening-record/rescreen-detail`, body: params, loading: true })
} }
// 保存初筛
export function saveFirstScreening(params) {
return fetchBase({ url: `/chronic-admin/v1/chronic-screening-record/save`,body: params,loading: true})
}
// 修改初筛
export function updateFirstScreening(params) {
return fetchBase({ url: `/chronic-admin/v1/chronic-screening-record/update`,body: params,loading: true})
}
// 删除初筛
export function deleteFirstScreening(params) {
return fetchBase({ url: `/chronic-admin/v1/chronic-screening-record/delete`,body: params,loading: true})
}
// 慢病高危筛查详情
export function firstScreenDetail(params) {
return fetchBase({ url: `/chronic-resident/v1/chronic-screening-record/screening-detail`, body: params, loading: true })
}
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<div class="px-3 py-3 flex items-center doc-nav-bar"> <div class="px-3 py-3 flex items-center doc-nav-bar">
<div class="shrink-0 left"> <div class="shrink-0 left">
<slot name="left"> <slot name="left">
<span class="back-btn" @click="goBack"> <span class="back-btn" @click="goBack" v-if="!hideBack">
<doc-icon type="doc-left-1" style="color: #262626"/> <doc-icon type="doc-left-1" style="color: #262626"/>
</span> </span>
</slot> </slot>
...@@ -27,7 +27,10 @@ export default { ...@@ -27,7 +27,10 @@ export default {
title: String, title: String,
// 是否首页 // 是否首页
home: Boolean, home: Boolean,
backFunc: Function // 替换返回函数
backFunc: Function,
// 隐藏返回按键
hideBack: Boolean
}, },
methods: { methods: {
goBack() { goBack() {
......
...@@ -102,7 +102,8 @@ ...@@ -102,7 +102,8 @@
<script> <script>
import { useStore } from '@/doctor/store' import { useStore } from '@/doctor/store'
import { getScreenAllList } from '@/api/doctor/screening.js' import { getScreenAllList, deleteFirstScreening } from '@/api/doctor/screening.js'
import { showConfirmDialog } from 'vant'
export default { export default {
inject: ['residentInfo'], inject: ['residentInfo'],
...@@ -181,6 +182,16 @@ export default { ...@@ -181,6 +182,16 @@ export default {
}) })
}, },
delFirstBtn(record) { delFirstBtn(record) {
showConfirmDialog({
message: '确定要删除吗?'
}).then(() => {
deleteFirstScreening({ id: record.id }).then(res => {
setTimeout(() => {
this.$message.info('删除成功')
}, 600)
this.firstScreenList = this.firstScreenList.filter(e => e.id !== record.id)
})
}).catch((err) => { console.warn('delFirstBtn', err) })
}, },
editSecondBtn(record) { editSecondBtn(record) {
......
...@@ -586,49 +586,49 @@ export default { ...@@ -586,49 +586,49 @@ export default {
this.form.screenDate = selectedValues.join('-') this.form.screenDate = selectedValues.join('-')
this.showScreenDate = false this.showScreenDate = false
}, },
resultHandle() { // resultHandle() {
const {currentAge, waistline, familyHistory = [], isSmoking, gender, // const {currentAge, waistline, familyHistory = [], isSmoking, gender,
pressureOneSbp, pressureOneDbp, pressureTwoSbp, pressureTwoDbp, // pressureOneSbp, pressureOneDbp, pressureTwoSbp, pressureTwoDbp,
fastingGlucose, ldlCholesterin, serumCholesterin} = this.form // fastingGlucose, ldlCholesterin, serumCholesterin} = this.form
let list = [] // let list = []
if (currentAge >= 50) { // if (currentAge >= 50) {
list.push(1) // list.push(1)
} // }
let bmi = parseFloat(this.bmi) // let bmi = parseFloat(this.bmi)
if ((bmi >= 24)|| // if ((bmi >= 24)||
(gender == 2 && waistline >=80) || // (gender == 2 && waistline >=80) ||
(gender == 1 && waistline >=85) ){ // (gender == 1 && waistline >=85) ){
list.push(2) // list.push(2)
} // }
if (isSmoking == 1) { // if (isSmoking == 1) {
list.push(3) // list.push(3)
} // }
if (familyHistory && familyHistory.length && (familyHistory.includes(1) || familyHistory.includes(2) || // if (familyHistory && familyHistory.length && (familyHistory.includes(1) || familyHistory.includes(2) ||
familyHistory.includes(3) || familyHistory.includes(4) || familyHistory.includes(5) || familyHistory.includes(6))) { // familyHistory.includes(3) || familyHistory.includes(4) || familyHistory.includes(5) || familyHistory.includes(6))) {
list.push(4) // list.push(4)
} // }
if ((pressureOneSbp >= 130 || pressureTwoSbp >= 130) || // if ((pressureOneSbp >= 130 || pressureTwoSbp >= 130) ||
(pressureOneDbp >= 85 || pressureTwoDbp >= 85) // (pressureOneDbp >= 85 || pressureTwoDbp >= 85)
) { // ) {
list.push(5) // list.push(5)
} // }
if (fastingGlucose >= 6.1) { // if (fastingGlucose >= 6.1) {
list.push(6) // list.push(6)
} // }
// if (ldlCholesterin >= 3.4) { // // if (ldlCholesterin >= 3.4) {
// // list.push(7)
// // }
// if (serumCholesterin >= 5.2) {
// list.push(7) // list.push(7)
// } // }
if (serumCholesterin >= 5.2) { // list = Array.from(new Set(list))
list.push(7) // this.form.highItem = list
} // if (list.length >= 3){
list = Array.from(new Set(list)) // this.form.screenResult = 2
this.form.highItem = list // }else {
if (list.length >= 3){ // this.form.screenResult = 1
this.form.screenResult = 2 // }
}else { // },
this.form.screenResult = 1
}
},
setPressureOne(val) { setPressureOne(val) {
if (!val) return if (!val) return
this.form.pressureOneSbp = val.systolicPressure this.form.pressureOneSbp = val.systolicPressure
...@@ -662,6 +662,7 @@ export default { ...@@ -662,6 +662,7 @@ export default {
this.form.screenResult = 1 this.form.screenResult = 1
} }
}, },
immediate: true
} }
} }
} }
......
<template> <template>
<div class="h-full flex flex-col screening-first"> <div class="h-full flex flex-col screening-first">
<DocNavBar :title="`${id ? '修改' : '新增'}主要慢病高危筛查`" class="shrink-0" <DocNavBar :title="`${id ? '修改' : '新增'}主要慢病高危筛查`" class="shrink-0"
:backFunc="onBack"></DocNavBar> :backFunc="onBack" :hideBack="step == 3"></DocNavBar>
<div class="p-4 overflow-y-auto grow" ref="all"> <div class="p-4 overflow-y-auto grow" ref="all">
<archiveCommon :info="baseInfo" v-if="step == 1"></archiveCommon> <archiveCommon :info="baseInfo" v-if="step == 1"></archiveCommon>
<FormCont :resident-info="baseInfo" :info="screenInfo" v-else-if="step == 2" ref="FormCont"/> <FormCont :resident-info="baseInfo" :info="screenInfo" v-else-if="step == 2" ref="FormCont"/>
<Result v-else-if="step == 3" :residentInfoId="residentInfoId"/> <Result v-else-if="step == 3" :info="resultInfo"/>
</div> </div>
<div class="shrink-0" v-if="step !== 3"> <div class="shrink-0" v-if="step !== 3">
<div class='bottom-small-line'></div> <div class='bottom-small-line'></div>
...@@ -29,8 +29,9 @@ import archiveCommon from '@/doctor/components/archiveCommon/archiveCommon.vue' ...@@ -29,8 +29,9 @@ import archiveCommon from '@/doctor/components/archiveCommon/archiveCommon.vue'
import FormCont from './FormCont.vue' import FormCont from './FormCont.vue'
import Result from './Result.vue' import Result from './Result.vue'
import { getChronicResidentsId } from '@/api/doctor/generalFU' import { getChronicResidentsId } from '@/api/doctor/generalFU'
import { firstScreenDetail } from '@/api/doctor/screening.js' import { firstScreenDetail, saveFirstScreening, updateFirstScreening } from '@/api/doctor/screening.js'
import { fetchDataHandle } from '@/utils/common.js' import { fetchDataHandle } from '@/utils/common.js'
import { useStore } from '@/doctor/store'
export default { export default {
components: { components: {
...@@ -41,11 +42,14 @@ export default { ...@@ -41,11 +42,14 @@ export default {
}, },
data() { data() {
return { return {
store: useStore(),
step: 1, step: 1,
// 患者基础信息 // 患者基础信息
baseInfo: {}, baseInfo: {},
// 筛查信息 // 筛查信息
screenInfo: {} screenInfo: {},
// 结果
resultInfo: {}
} }
}, },
computed: { computed: {
...@@ -81,7 +85,20 @@ export default { ...@@ -81,7 +85,20 @@ export default {
toNext(val) { toNext(val) {
if (val == 3) { if (val == 3) {
this.$refs.FormCont.submit().then(res => { this.$refs.FormCont.submit().then(res => {
if (!res) return
console.log('FormCont.submit', res) console.log('FormCont.submit', res)
const query = fetchDataHandle(res, {
familyHistory: 'arrToStr',
medicalHistory: 'arrToStr',
highItem: 'arrToStr'
})
query.residentsRecord = this.baseInfo
const func = query.id ? updateFirstScreening : saveFirstScreening
func(query).then(res => {
this.resultInfo = query
this.store.onRefreshMark()
this.step = val
})
}) })
return return
} }
......
...@@ -4,7 +4,8 @@ ...@@ -4,7 +4,8 @@
<div class="mt-3">筛查完成</div> <div class="mt-3">筛查完成</div>
<div class="text-start mt-5"> <div class="text-start mt-5">
<span style="color: #595959;">通过筛查,您的慢病高危评估结果为:</span> <span style="color: #595959;">通过筛查,您的慢病高危评估结果为:</span>
<span class="text-red">高危人群</span> <span v-if="info.screenResult == 2" class="text-red">高危人群</span>
<span v-else>一般人群</span>
</div> </div>
<div style="margin-top: .48rem"> <div style="margin-top: .48rem">
<van-button type='primary' block round plain <van-button type='primary' block round plain
...@@ -21,7 +22,12 @@ ...@@ -21,7 +22,12 @@
<script> <script>
export default { export default {
props: { props: {
residentInfoId: String info: { default: () => ({}) }
},
computed: {
residentInfoId() {
return this.info.residentInfoId
}
}, },
methods: { methods: {
toScreen() { toScreen() {
......
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