Commit 537068d0 authored by 芮自成's avatar 芮自成

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

parents b772f0f3 92879cf9
...@@ -48,4 +48,9 @@ export function delDiagnose(params) { ...@@ -48,4 +48,9 @@ export function delDiagnose(params) {
// 报卡信息主键查询 // 报卡信息主键查询
export function fetchCurrencyByUuid(params) { export function fetchCurrencyByUuid(params) {
return fetchBase({ url: `/chronic-admin/v1/chronic-visit-record-crs/record-uuid`, body: params, loading: true }) return fetchBase({ url: `/chronic-admin/v1/chronic-visit-record-crs/record-uuid`, body: params, loading: true })
}
// 删除随访
export function deleteVisitRecord(params) {
return fetchBase({ url: `/chronic-admin/v1/chronic-visit-record/delete`, body:params, loading: true })
} }
\ No newline at end of file
import {fetchBase} from '@/api/doctor/doctorFetch'
// 保存主要慢病随访
export function saveHighMajorVisit(params) {
return fetchBase({ url: `/chronic-admin/v1/chronic-high-visit-major/save`,body: params})
}
// 修改主要慢病随访
export function updateHighMajorVisit(params) {
return fetchBase({ url: `/chronic-admin/v1/chronic-high-visit-major/update`,body: params})
}
//查询主要慢病随访
export function getHighMajorVisitId(id) {
return fetchBase({ url: `/chronic-admin/v1/chronic-high-visit-major/record`,body:{"id":id},loading: true})
}
//删除主要慢病随访
export function deleteHighMajorVisit(params) {
return fetchBase({ url: `/chronic-admin/v1/chronic-high-visit-major/delete`,body: params})
}
// 保存专病随访
export function saveHighSpecificVisit(params) {
return fetchBase({ url: `/chronic-admin/v1/chronic-high-visit-specific/save`,body: params})
}
// 修改专病随访
export function updateHighSpecificVisit(params) {
return fetchBase({ url: `/chronic-admin/v1/chronic-high-visit-specific/update`,body: params})
}
//查询专病随访
export function getHighSpecificVisitId(id) {
return fetchBase({ url: `/chronic-admin/v1/chronic-high-visit-specific/record`,body:{"id":id},loading: true})
}
//删除专病随访
export function deleteHighSpecificVisit(params) {
return fetchBase({ url: `/chronic-admin/v1/chronic-high-visit-specific/delete`,body: params})
}
//查询最近一次专病高危随访
export function getLastHighSpecificVisit(params) {
return fetchBase({ url: `/chronic-admin/v1/chronic-high-visit-specific/last-info`, body: params, loading: true})
}
//删除高危随访
export function delHighVisit(params) {
return fetchBase({ url: `/chronic-admin/v1/chronic-high-visit-collect/delete`,body: params})
}
\ No newline at end of file
...@@ -137,6 +137,8 @@ export default { ...@@ -137,6 +137,8 @@ export default {
addOptions: [ addOptions: [
{ name: '新增主要慢病高危筛查', value: 1, path: '/doctor/screening/firstForm' }, { name: '新增主要慢病高危筛查', value: 1, path: '/doctor/screening/firstForm' },
{ name: '新增专病高危筛查', value: 2, path: '/doctor/screening/secondForm' }, { name: '新增专病高危筛查', value: 2, path: '/doctor/screening/secondForm' },
{ name: '新增主要慢病高危随访', value: 8, path: '/doctor/screening/highVisit/firstForm' },
{ name: '新增专病高危随访', value: 9, path: '/doctor/screening/highVisit/secondForm' },
{ name: '新增慢病诊断', value: 3, path: '/doctor/diagnose/form' }, { name: '新增慢病诊断', value: 3, path: '/doctor/diagnose/form' },
{ name: '新增通用随访', value: 4, path: '/doctor/followUp/generalFU/add' }, { name: '新增通用随访', value: 4, path: '/doctor/followUp/generalFU/add' },
{ name: '新增死亡记录', value: 5, path: '/doctor/deathRecord/add' }, { name: '新增死亡记录', value: 5, path: '/doctor/deathRecord/add' },
......
...@@ -50,13 +50,13 @@ ...@@ -50,13 +50,13 @@
</div> </div>
<div class='divider'></div> <div class='divider'></div>
<div class='bt-group'> <div class='bt-group'>
<van-button round size='small' class='doc-btn-primary' @click='toDetail(item)'>详情 <van-button round size='small' class='doc-btn-primary' @click.stop='toDetail(item)'>详情
</van-button> </van-button>
<!-- <van-button round size="small" class="doc-btn-primary" v-if="item.allowUpdate == 1">转诊</van-button>--> <!-- <van-button round size="small" class="doc-btn-primary" v-if="item.allowUpdate == 1">转诊</van-button>-->
<van-button round size='small' class='doc-btn-primary' @click.stop='editBtn(item)' <van-button round size='small' class='doc-btn-primary' @click.stop='editBtn(item)'
v-if='!(item.allowUpdate !==1 || item.serveType == 5)'>修改 v-if='!(item.allowUpdate !==1 || item.serveType == 5)'>修改
</van-button> </van-button>
<van-button round size='small' class='doc-btn-red' @click='delBtn(item)' <van-button round size='small' class='doc-btn-red' @click.stop='delBtn(item)'
v-if='!(item.allowUpdate !==1 || item.serveType == 5)'>删除 v-if='!(item.allowUpdate !==1 || item.serveType == 5)'>删除
</van-button> </van-button>
</div> </div>
...@@ -72,9 +72,10 @@ ...@@ -72,9 +72,10 @@
</template> </template>
<script> <script>
import { delDiagnose, getVisitManageList } from '@/api/doctor/disease.js' import { delDiagnose, deleteVisitRecord, getVisitManageList } from '@/api/doctor/disease.js'
import { useStore } from '@/doctor/store' import { useStore } from '@/doctor/store'
import { showConfirmDialog } from 'vant' import { showConfirmDialog } from 'vant'
import { delHighVisit } from '@/api/doctor/highVisitApi'
export default { export default {
inject: ['residentInfo'], inject: ['residentInfo'],
...@@ -189,9 +190,19 @@ export default { ...@@ -189,9 +190,19 @@ export default {
}) })
} }
}, },
delBtn() { delBtn(record) {
showConfirmDialog({
message: '确定要删除吗?'
}).then(() => {
deleteVisitRecord({ id: record.id }).then(res => {
setTimeout(() => {
this.$message.info('删除成功')
}, 600)
this.list = this.list.filter(e => e.id !== record.id)
})
}).catch((err) => { console.warn('delBtn', err) })
} },
}, },
watch: { watch: {
diseaseType() { diseaseType() {
......
<template> <template>
<div class="h-full visit-list" ref='list'> <div class='h-full visit-list' ref='list'>
<van-pull-refresh v-model='loadingRefresh' @refresh='onRefresh' <van-pull-refresh v-model='loadingRefresh' @refresh='onRefresh'
:disabled='isRefreshDisable' style="min-height: 100%"> :disabled='isRefreshDisable' style='min-height: 100%'>
<van-list <van-list
v-model:loading='loading' v-model:loading='loading'
:finished='finished' :finished='finished'
...@@ -9,43 +9,46 @@ ...@@ -9,43 +9,46 @@
:immediate-check='false' :immediate-check='false'
@load='onMore' @load='onMore'
> >
<div class="flex flex-col"> <div class='flex flex-col'>
<div v-for='item in list' :key="item.id" <div v-for='item in list' :key='item.id'
:class="['mb-3', {'first-card': item.serveType == 1}, :class="['mb-3', {'first-card': item.serveType == 1},
{'second-card': item.serveType == 2}, {'second-card': item.serveType == 2},
{'general-card': item.serveType == 3}]"> {'general-card': item.serveType == 3}]">
<div class="title px-4 py-1">{{item.serveTypeName}}</div> <div class='title px-4 py-1'>{{ item.serveTypeName }}</div>
<div class="py-3 px-4 doc-list-card" @click="toDetail(item)"> <div class='py-3 px-4 doc-list-card'>
<div class="flex flex-col" style="row-gap: .04rem;line-height: 1.5;" <div class='flex flex-col' style='row-gap: .04rem;line-height: 1.5;'
@click="toDetail(item)"> @click='toDetail(item)'>
<div> <div>
<span class="label">随访日期</span> <span class='label'>随访日期</span>
<span>{{ item.visitDate }}</span> <span>{{ item.visitDate }}</span>
</div> </div>
<div> <div>
<span class="label">随访类型</span> <span class='label'>随访类型</span>
<span>{{ item.visitTypeName || '-' }}</span> <span>{{ item.visitTypeName || '-' }}</span>
</div> </div>
<div> <div>
<span class="label">随访方式</span> <span class='label'>随访方式</span>
<span>{{ item.visitWayName || '-' }}</span> <span>{{ item.visitWayName || '-' }}</span>
</div> </div>
<div class="text-ellipsis"> <div class='text-ellipsis'>
<span class="label">随访医生</span> <span class='label'>随访医生</span>
<span>{{ item.visitDoctorName || '-' }}</span> <span>{{ item.visitDoctorName || '-' }}</span>
</div> </div>
<div class="text-ellipsis"> <div class='text-ellipsis'>
<span class="label">随访机构</span> <span class='label'>随访机构</span>
<span>{{ item.visitUnitName || '-' }}</span> <span>{{ item.visitUnitName || '-' }}</span>
</div> </div>
</div> </div>
<div class="divider my-3" v-if="item.serveType == 3"></div> <div class='divider my-3'></div>
<div class="bt-group" v-if="item.serveType == 3"> <div class='bt-group'>
<van-button round size="small" class="doc-btn-primary" @click="toDetail(item)">详情</van-button> <van-button round size='small' class='doc-btn-primary' @click='toDetail(item)'>详情
<!-- <van-button round size="small" class="doc-btn-primary" @click='editBtn(item)' </van-button>
v-if="!(item.allowUpdate !==1 || item.serveType == 3)">修改</van-button> <van-button round size='small' class='doc-btn-primary' @click='editBtn(item)'
<van-button round size="small" class="doc-btn-red" @click="delBtn(item)" v-if='!(item.allowUpdate !==1 || item.serveType == 3)'>修改
v-if="!(item.allowUpdate !==1 || item.serveType == 3)">删除</van-button> --> </van-button>
<van-button round size='small' class='doc-btn-red' @click='delBtn(item)'
v-if='!(item.allowUpdate !==1 || item.serveType == 3)'>删除
</van-button>
</div> </div>
</div> </div>
</div> </div>
...@@ -62,6 +65,9 @@ ...@@ -62,6 +65,9 @@
<script> <script>
import { getHighVisitList } from '@/api/doctor/visit.js' import { getHighVisitList } from '@/api/doctor/visit.js'
import { useStore } from '@/doctor/store' import { useStore } from '@/doctor/store'
import { delHighVisit } from '@/api/doctor/highVisitApi'
import { showConfirmDialog } from 'vant'
import { deleteSecondScreening } from '@/api/doctor/screening'
export default { export default {
inject: ['residentInfo'], inject: ['residentInfo'],
...@@ -131,6 +137,24 @@ export default { ...@@ -131,6 +137,24 @@ export default {
this.$message.info('暂时无法查看 详情信息') this.$message.info('暂时无法查看 详情信息')
return return
} }
//主要慢病
if (record.serveType == 1) {
this.$router.push({
path: '/doctor/screening/highVisit/firstDetail',
query: {
id: record.relationId
}
})
}
//专病高危
if (record.serveType == 2) {
this.$router.push({
path: '/doctor/screening/highVisit/secondDetail',
query: {
id: record.relationId
}
})
}
if (record.serveType == 3) { if (record.serveType == 3) {
this.$router.push({ this.$router.push({
path: '/doctor/screening/highVisit/GeneralFUDetail', path: '/doctor/screening/highVisit/GeneralFUDetail',
...@@ -139,19 +163,44 @@ export default { ...@@ -139,19 +163,44 @@ export default {
} }
}) })
} }
// this.$router.push({
// path: '/doctor/patient-detail',
// query: {
// residentInfoId: record.residentInfoId
// }
// })
}, },
editBtn() { editBtn(record) {
if (!record) return
if (record.id == null) {
this.$message.info('暂时无法修改')
return
}
//主要慢病
if (record.serveType == 1) {
this.$router.push({
path: '/doctor/screening/highVisit/firstForm',
query: {
id: record.relationId
}
})
}
//专病高危
if (record.serveType == 2) {
this.$router.push({
path: '/doctor/screening/highVisit/secondForm',
query: {
id: record.relationId
}
})
}
},
delBtn(record) {
showConfirmDialog({
message: '确定要删除吗?'
}).then(() => {
delHighVisit({ id: record.id }).then(res => {
setTimeout(() => {
this.$message.info('删除成功')
}, 600)
this.list = this.list.filter(e => e.id !== record.id)
})
}).catch((err) => { console.warn('delBtn', err) })
}, },
delBtn() {
}
}, },
watch: { watch: {
'store.refreshMark'() { 'store.refreshMark'() {
...@@ -161,6 +210,6 @@ export default { ...@@ -161,6 +210,6 @@ export default {
} }
</script> </script>
<style lang="less" scoped> <style lang='less' scoped>
</style> </style>
This diff is collapsed.
This diff is collapsed.
<template>
<div class="doctor-info">
<div class="doc-form-label" required>随访单位</div>
<van-field is-link
v-model='form.visitUnitName'
readonly
placeholder='请选择'
name="visitUnitId"
@click="showUnit = true"
:rules="[{ required: true, message: '请选择' }]"
/>
<DocUnit v-model:show="showUnit"
v-model:value="form.visitUnitId"
:valueName="form?.visitUnitName"
@change="unitChange"
/>
<div class="doc-form-label" required>随访科室</div>
<van-field is-link
v-model='form.visitOfficeName'
readonly
placeholder='请选择'
name="visitOfficeId"
@click="showOffice = true"
:rules="[{ required: true, message: '请选择' }]"
/>
<DocOffice v-model:show="showOffice"
v-model:value="form.visitOfficeId"
:unitId="form.visitUnitId"
@change="officeChange"
/>
<div class="doc-form-label" required>随访医生</div>
<van-field is-link
v-model='form.visitDoctorName'
readonly
placeholder='请选择'
name="visitDoctorId"
@click="showDoctor = true"
:rules="[{ required: true, message: '请选择' }]"
/>
<DocOfficeDoctor v-model:show="showDoctor"
:allowClear="false"
v-model:value="form.visitDoctorId"
:unitId="form.visitUnitId"
:officeId="form.visitOfficeId"
@change="(option) => { form.visitDoctorName = option.staffName }"
/>
</div>
</template>
<script>
import { useStore } from '@/doctor/store'
import dayjs from 'dayjs'
import DocUnit from '@/doctor/components/docUnit/DocUnit.vue'
import DocOffice from '@/doctor/components/docOffice/DocOffice.vue'
import DocOfficeDoctor from '@/doctor/components/docOfficeDoctor/DocOfficeDoctor.vue'
const defaultForm = (info = {}) => {
const form = {
createDate: undefined,
// 随访单位
visitUnitId: undefined,
visitUnitName: undefined,
// 随访科室
visitOfficeId: undefined,
visitOfficeName: undefined,
// 随访医生
visitDoctorId: undefined,
visitDoctorName: undefined,
// 录入单位
createUnitId: undefined,
createUnitName: undefined,
// 录入科室
createOfficeId: undefined,
createOfficeName: undefined,
// 录入医生
createDoctorId: undefined,
createDoctorName: undefined
}
Reflect.ownKeys(form).forEach(key => {
if (info[key] != undefined) {
form[key] = info[key]
}
})
return form
}
export default {
components: {
DocUnit,
DocOffice,
DocOfficeDoctor
},
props: {
info: { default: () => ({}) }
},
data() {
return {
form: {},
store: useStore(),
showUnit: false,
showOffice: false,
showDoctor: false
}
},
computed: {
authInfo() {
return this.store.authInfo
}
},
methods: {
initForm() {
this.form.createDate = dayjs().format('YYYY-MM-DD')
// 随访单位
this.form.visitUnitId = this.authInfo.unitId
this.form.visitUnitName = this.authInfo.unitName
// 随访科室
this.form.visitOfficeId = this.authInfo.officeId
this.form.visitOfficeName = this.authInfo.officeName
// 随访医生
this.form.visitDoctorId = this.authInfo.relationId
this.form.visitDoctorName = this.authInfo.nickName
// 录入单位
this.form.createUnitId = this.authInfo.unitId
this.form.createUnitName = this.authInfo.unitName
// 录入科室
this.form.createOfficeId = this.authInfo.officeId
this.form.createOfficeName = this.authInfo.officeName
// 录入医生
this.form.createDoctorId = this.authInfo.relationId
this.form.createDoctorName = this.authInfo.nickName
},
unitChange(option = {}) {
this.form.visitUnitName = option.unitName
this.form.visitDoctorId = undefined
this.form.visitDoctorName = undefined
this.form.visitOfficeId = undefined
this.form.visitOfficeName = undefined
},
officeChange(option = {}) {
this.form.visitOfficeName = option.officeName
this.form.visitDoctorId = undefined
this.form.visitDoctorName = undefined
},
submit() {
return this.form
}
},
watch: {
info: {
handler(info) {
this.form = defaultForm(info)
if (!this.info.id) {
this.initForm()
}
},
immediate: true
}
}
}
</script>
<style lang="less" scoped></style>
<template>
<div class="h-full flex flex-col screening-first">
<DocNavBar :title="`${id ? '修改' : '新增'}主要慢病高危随访`" class="shrink-0"
:backFunc="onBack" :hideBack="step == 3"></DocNavBar>
<div class="p-4 overflow-y-auto grow" ref="all">
<archiveCommon :info="baseInfo" v-if="step == 1" ref="archiveCommon"></archiveCommon>
<FormCont :resident-info="baseInfo" :info="screenInfo" v-else-if="step == 2" ref="FormCont"/>
<Result v-else-if="step == 3" :info="resultInfo"/>
</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'
import { fetchDataHandle } from '@/utils/common.js'
import { useStore } from '@/doctor/store'
import { getHighMajorVisitId, saveHighMajorVisit, updateHighMajorVisit } from '@/api/doctor/highVisitApi'
export default {
components: {
DocNavBar,
archiveCommon,
FormCont,
Result
},
data() {
return {
store: useStore(),
step: 1,
// 患者基础信息
baseInfo: {},
// 随访信息
screenInfo: {},
// 结果
resultInfo: {}
}
},
computed: {
id() {
return this.$route.query.id
},
residentInfoId() {
return this.$route.query.residentInfoId
},
idCard() {
return this.$route.query.idCard
},
},
// 路由守卫
beforeRouteLeave(to, from) {
// showConfirmDialog({
// message: '已填写的表单不会保存,确定要离开吗?'})
// .then(() => {
// next()
// })
// .catch(() => {
// next(false)
// })
if (this.step === 2) {
this.onBack()
return false
}
return true
},
created() {
this.init()
},
methods: {
async init() {
if (this.id) {
const res = await getHighMajorVisitId(this.id)
const result = res.data || {}
this.screenInfo = fetchDataHandle(result, {
medicalHistory: 'strToArrNum',
familyHistory: 'strToArrNum',
highItem: 'strToArrNum'
})
this.baseInfo = this.screenInfo.residentsRecord
console.log(this.screenInfo)
} else {
if (this.residentInfoId) {
let res = await getChronicResidentsId(this.residentInfoId)
this.baseInfo = res.data || {}
this.screenInfo.currentAge = this.baseInfo.currentAge
this.screenInfo.residentInfoId = this.residentInfoId
} else if (this.idCard) {
// 新建用户
this.baseInfo.idCard = this.idCard
}
}
},
toNext(val) {
if (val == 2) {
// 基础信息
this.$refs.archiveCommon.onSubmit().then(res => {
this.baseInfo = res
this.step = val
this.$refs.all.scrollTo(0, 0)
})
} else if (val == 3) {
// 随访信息
this.$refs.FormCont.submit().then(res => {
if (!res) return
console.log('FormCont.submit', res)
const query = fetchDataHandle(res, {
familyHistory: 'arrToStr',
medicalHistory: 'arrToStr',
highItem: 'arrToStr'
})
query.residentsRecord = this.baseInfo
const func = query.id ? updateHighMajorVisit : saveHighMajorVisit
func(query).then(res => {
this.resultInfo = query
this.store.onRefreshMark()
this.step = val
})
})
} else {
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>
This diff is collapsed.
<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 v-if="info.screenResult == 2" class="text-red">高危人群</span>
<span v-else>一般人群</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: {
info: { default: () => ({}) }
},
computed: {
residentInfoId() {
return this.info.residentInfoId
}
},
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>
<van-form ref='form'>
<archive-common :info='info' ref='archive'></archive-common>
<div class='flex justify-between items-center mt-5 mb-20'>
<div class='title'>筛查信息</div>
<div>
<van-button plain size='small' type='primary' @click='toLast'>引入上一次筛查数据</van-button>
</div>
</div>
<div class='label-title mt-5'>筛查病种</div>
<van-field
v-model='form.diseaseArraysName'
readonly
is-link
placeholder='请选择'
class='input-back mt-2 form-input'
:rules='rules.diseaseArraysName'
@click='showGroupsArrays= true'
>
<template #input>
<span class='text-end' v-if='form.diseaseArraysName'>{{ form.diseaseArraysName }}</span>
<span class='text-end' v-if='!form.diseaseArraysName' style='color: #dfdfe1'>请选择</span>
</template>
</van-field>
<van-popup v-model:show='showGroupsArrays' position='bottom'>
<div class='p-4'>
<div class='flex justify-between items-center mb-4 pop-title'>
<div class='greyColor' @click='showGroupsArrays = false' style='font-weight: 400'>取消</div>
<div>筛查病种(可多选)</div>
<div class='blueColor' @click='groupsArraysConfirm'>确定</div>
</div>
<CheckBtn multiple
column-1
:options='groupArrList'
v-model:value='checkGroupsArrays'
:fieldNames="{text: 'name', value: 'value'}" />
</div>
</van-popup>
</van-form>
</div>
</template>
<script>
import ArchiveCommon from '@/doctor/components/archiveCommon/archiveCommon'
import { useStore } from '@/doctor/store'
import CheckBtn from '@/doctor/components/checkBtn/CheckBtn'
export default {
name: 'BaseInfo',
props: {
info: Object
},
components: { CheckBtn, ArchiveCommon },
data() {
return {
store: useStore(),
form: {
diseaseArrays: [],
diseaseArraysName: undefined
},
rules: {
diseaseArraysName: [{ required: true, message: '请选择' }]
},
showGroupsArrays: false,
//筛查病种组件双向绑定变量
checkGroupsArrays: []
}
},
computed: {
//筛查病种
groupArrList() {
let res = []
res = this.store.getDict('CP00117')
return res
}
},
watch: {
'info': {
handler() {
this.init()
},
immediate: true
}
},
methods: {
init() {
if (!this.info.id) {
//是否是引用上一次复筛数据
if (this.info.flag && this.info.flag == 'lastInfo') {
this.setDis(this.info.diseaseArrays)
} else {//新增时
this.setDis([1,2,3,4,5,6,7])
}
} else {
this.setDis(this.info.diseaseArrays)
}
},
setDis(diseaseArrays) {
if (diseaseArrays) {
this.form.diseaseArrays = diseaseArrays
this.checkGroupsArrays = this.form.diseaseArrays
let res = []
this.groupArrList.forEach(item => {
let list = this.form.diseaseArrays.filter(i => i == item.value)
if (list && list.length) {
res.push(item.name)
}
})
this.form.diseaseArraysName = res.join()
}
},
groupsArraysConfirm() {
let res = []
this.groupArrList.forEach(item => {
let selected = this.checkGroupsArrays.filter(i => i == item.value)
if (selected && selected.length) {
res.push(item.name)
}
})
if (this.checkGroupsArrays && this.checkGroupsArrays.length) {
this.form.diseaseArrays = this.checkGroupsArrays
this.form.diseaseArraysName = res.join()
} else {
this.form.diseaseArrays = []
this.form.diseaseArraysName = ''
}
this.showGroupsArrays = false
},
toLast() {
this.$emit('getLast', true)
},
async onSubmit() {
let baseInfo = {}
try {
baseInfo = await this.$refs.archive.onSubmit()
} catch (e) {
}
return new Promise((resolve, reject) => {
this.$refs.form.validate().then(() => {
let par = {
residentsRecord: {
// ...this.info,
...baseInfo,
id: this.info.personId
},
diseaseArrays: this.form.diseaseArrays
}
resolve(par)
}).catch((e) => {
console.warn('baseInfo error', e)
})
})
}
}
}
</script>
<style scoped lang='less'>
.title {
font-weight: bold;
}
.mb-20 {
margin-bottom: 20px;
}
.label-title {
font-size: 13px;
color: #595959;
font-weight: 500;
&::after {
content: "*";
color: red;
font-weight: bold;
margin-left: 4px;
}
}
.no-req-label {
font-size: 13px;
color: #595959;
font-weight: 500;
}
.form-input {
padding: 8px 12px;
border-radius: 8px;
}
.input-back {
background: #FAFAFA;
}
.pop-title {
color: #262626;
font-size: 16px;
line-height: 24px;
font-weight: bold;
}
:deep(.van-popup) {
min-height: 30% !important;
}
:deep(.van-cell-group--inset) {
overflow: visible;
}
:deep(.van-cell) {
overflow: visible;
}
:deep(.van-cell:after) {
border-bottom: 0px;
}
</style>
\ No newline at end of file
<template>
<div>
<van-form ref='form'>
<div :class="['label-title', 'mt-5']">随访单位</div>
<van-field
v-model='form.visitUnitName'
is-link
readonly
placeholder='随访单位'
class='input-back mt-2 form-input'
:rules='rules.visitUnitName'
@click='show1 = true'
/>
<DocUnit v-model:show='show1' v-model:value='form.visitUnitId' @change='changeUnit' />
<div class='label-title mt-5'>随访科室</div>
<van-field
v-model='form.visitOfficeName'
is-link
readonly
placeholder='随访科室'
class='input-back mt-2 form-input'
:rules='rules.visitOfficeName'
@click='show2 = true'
/>
<DocOffice v-model:show='show2' v-model:value='form.visitOfficeId' @change='changeOffice'
:unitId='form.visitUnitId' />
<div class='label-title mt-5'>随访医生</div>
<van-field
v-model='form.visitDoctorName'
is-link
readonly
placeholder='随访医生'
class='input-back mt-2 form-input'
:rules='rules.visitDoctorName'
@click='show3 = true'
/>
<DocOfficeDoctor v-model:show='show3' v-model:value='form.visitDoctorId' @change='changeDoctor'
:unitId='form.visitUnitId' :officeId='form.visitOfficeId' />
</van-form>
</div>
</template>
<script>
import dayjs from 'dayjs'
import { useStore } from '@/doctor/store'
import DocUnit from '@/doctor/components/docUnit/DocUnit'
import DocOffice from '@/doctor/components/docOffice/DocOffice'
import DocOfficeDoctor from '@/doctor/components/docOfficeDoctor/DocOfficeDoctor'
import CheckBtn from '@/doctor/components/checkBtn/CheckBtn'
import DocImageUpload from '@/doctor/components/docImageUpload/DocImageUpload'
export default {
name: 'CommonBottom',
components: { DocImageUpload, CheckBtn, DocOfficeDoctor, DocOffice, DocUnit },
props: {
info: {
default: () => {
return {}
}
},
},
data() {
return {
store: useStore(),
show1: false,
show2: false,
show3: false,
form: {
},
rules: {
}
}
},
watch: {
'info': {
handler() {
this.form = this.setForm(this.info)
},
immediate: true
},
},
computed: {
authInfo() {
return this.store.$state.authInfo
},
},
methods: {
setForm(info) {
const form = {
visitDate: new dayjs().format("YYYY-MM-DD"),
createDate: new dayjs().format("YYYY-MM-DD"),
// 随访单位
visitUnitId: this.authInfo.unitId,
visitUnitName: this.authInfo.unitName,
// 随访科室
visitOfficeId: this.authInfo.officeId,
visitOfficeName: this.authInfo.officeName,
// 随访医生
visitDoctorId: this.authInfo.relationId,
visitDoctorName: this.authInfo.nickName,
// 录入单位
createUnitId: this.authInfo.unitId,
createUnitName: this.authInfo.unitName,
// 录入科室
createOfficeId: this.authInfo.officeId,
createOfficeName: this.authInfo.officeName,
// 录入医生
createDoctorId: this.authInfo.relationId,
createDoctorName: this.authInfo.nickName,
}
Reflect.ownKeys(form).forEach(key => {
if (info[key] != undefined) {
form[key] = info[key]
}
})
return form
},
changeUnit(val) {
this.form.visitUnitName = val.unitName
this.form.visitUnitId = val.id
this.form.visitOfficeId = undefined
this.form.visitOfficeName = undefined
this.form.visitDoctorId = undefined
this.form.visitDoctorName = undefined
this.show1 = false
},
changeOffice(val) {
this.form.visitOfficeId = val.id
this.form.visitOfficeName = val.officeName
this.form.visitDoctorId = undefined
this.form.visitDoctorName = undefined
this.show2 = false
},
changeDoctor(val) {
this.form.visitDoctorId = val.id
this.form.visitDoctorName = val.staffName
this.show3 = false
},
onSubmit() {
return new Promise((resolve, reject) => {
this.$refs.form.validate().then(() => {
let par = {
...this.form,
}
resolve(par)
}).catch((e) => {
console.warn('error', e)
})
})
}
}
}
</script>
<style scoped lang='less'>
.title {
font-weight: bold;
margin-bottom: 20px;
}
.label-title {
font-size: 13px;
color: #595959;
font-weight: 500;
&::after {
content: "*";
color: red;
font-weight: bold;
margin-left: 4px;
}
}
.push-lab {
line-height: 20px;
color: #8C8C8C;
font-size: 12px
}
.no-req-label {
font-size: 13px;
color: #595959;
font-weight: 500;
}
.form-input {
padding: 8px 12px;
border-radius: 8px;
}
.input-back {
background: #FAFAFA;
}
.tel-back {
background: #F5F5F5;
padding: 8px;
border-radius: 0px 0px 8px 8px;
}
.tel {
background: #FFFFFF;
padding: 8px;
border-radius: 8px;
}
.tel-label {
color: #607FF0;
font-weight: bold;
}
.p-12-0 {
padding: 12px 0px;
}
.vx-cb {
position: absolute;
right: 10px;
top: 23px;
}
.ms-cb {
position: absolute;
right: 10px;
top: 97px;
}
:deep(.van-cell-group--inset) {
overflow: visible;
}
:deep(.van-cell) {
overflow: visible;
}
/*:deep(.van-field__error-message) {
position: absolute;
margin-top: 3px;
}*/
:deep(.van-cell:after) {
border-bottom: 0px;
}
</style>
\ No newline at end of file
<template>
<div class='disease-select'>
<div class='label-title mb-4'>请选择慢病类型</div>
<div v-for="(item, index) in store.getDict('CP00117')" :key='index'
:class="['flex justify-between items-center text-16 mb-3 disease-checked',
{ 'disease-checked-active': isSelect(item)},
]"
@click='onSelect(item)'>
<span>{{ item.name }}</span>
</div>
<div class='warn-error' v-if='showWarn'>请选择</div>
</div>
</template>
<script>
import { useStore } from '@/doctor/store/index.js'
export default {
props: {
infoValue: String
},
data() {
return {
store: useStore(),
// 选中的疾病类型
innerValue: [],
//显示校验
showWarn: false
}
},
watch: {
infoValue: {
handler(value) {
if (value) {
this.innerValue = value.split(',')
}
},
immediate: true
}
},
created() {
this.init()
},
methods: {
init() {
if (!(this.innerValue && this.innerValue.length)) {
this.innerValue = this.store.getDict('CP00117').map(e => e.value)
}
},
// 是否选中
isSelect(item) {
return this.innerValue.includes(item.value)
},
onSelect(val) {
if (this.innerValue.includes(val.value)) {
this.innerValue = this.innerValue.filter(e => e !== val.value)
} else {
this.innerValue.push(val.value)
}
if (this.innerValue && this.innerValue.length) {
this.showWarn = false
} else {
this.showWarn = true
}
},
onSubmit() {
return new Promise((resolve, reject) => {
if (!(this.innerValue && this.innerValue.length)) {
this.showWarn = true
return
}
resolve(this.innerValue)
})
}
}
}
</script>
<style lang='less' scoped>
.label-title {
font-size: 14px;
color: #262626;
font-weight: 500;
&::after {
content: "*";
color: red;
font-weight: bold;
margin-left: 4px;
}
}
.no-req-label {
font-size: 13px;
color: #595959;
font-weight: 500;
}
.disease-checked {
border: 1px solid #BFBFBF;
border-radius: 40px;
color: #595959;
background-color: #fff;
padding: 10px 16px;
line-height: 22.4px;
}
.disease-checked-active {
color: var(--van-primary-color);
border-color: var(--van-primary-color);
}
.disease-checked-disabled {
border-color: #EFF2F7;
background-color: #EFF2F7;
}
.warn-error {
color: #FF4D4F;
}
</style>
This diff is collapsed.
<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>
<div class="text-red mt-2" style='line-height: 24px'>{{specialScreenResultList.join("、")}}</div>
</div>
<div style="margin-top: .48rem">
<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,
specialScreenResultList: Array,
},
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' :backFunc='onBack'></DocNavBar>
<div class='p-4 overflow-y-auto grow' ref='all'>
<BaseInfo :info='info'
v-show='step ==1'
@getLast='getLastData'
ref='baseInfo'
></BaseInfo>
<form-cont :info='info'
:disease-arrays-info='diseaseArraysInfo'
v-show='step == 2'
ref='formInfo'
></form-cont>
<common-bottom
v-if='step == 3'
ref='commonBottom'
></common-bottom>
<result :residentInfoId='residentInfoId'
:specialScreenResultList='specialScreenResultList'
v-show='step == 4'
></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 == 3'>
<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 { getChronicResidentsId } from '@/api/doctor/generalFU'
import FormCont from '@/doctor/screening/highVisit/second/FormCont'
import Result from '@/doctor/screening/highVisit/second/Result'
import DiseaseSelect from '@/doctor/screening/highVisit/second/DiseaseSelect'
import BaseInfo from '@/doctor/screening/highVisit/second/BaseInfo'
import { fetchDataHandle } from '@/utils/common'
import { showToast } from 'vant'
import CommonBottom from '@/doctor/screening/highVisit/second/CommonBottom'
import { useStore } from '@/doctor/store'
import {
getHighSpecificVisitId,
getLastHighSpecificVisit,
saveHighSpecificVisit,
updateHighSpecificVisit
} from '@/api/doctor/highVisitApi'
export default {
components: {
CommonBottom,
BaseInfo,
DiseaseSelect,
Result,
FormCont,
ArchiveCommon,
DocNavBar
},
data() {
return {
store: useStore(),
step: 1,
info: {},
residentInfo: {},
diseaseArraysInfo: [],
specialScreenResultList: [],
}
},
computed: {
id() {
return this.$route.query.id
},
residentInfoId() {
return this.$route.query.residentInfoId
}
},
created() {
this.init()
},
methods: {
async init() {
this.info = {}
if (this.id) {
const res = await getHighSpecificVisitId(this.id)
let result = res.data || {}
const { residentsRecord = {} } = result
const { id, ...others } = residentsRecord
let obj = this.dataHandle(result)
this.info = {
...others,
personId: id,
...obj
}
this.residentInfo = {
...others,
personId: id,
}
} else {
const res = await getChronicResidentsId(this.residentInfoId)
const {
id,
createDate,
createDoctorId,
createDoctorName,
createOfficeId,
createOfficeName,
createUnitId,
createUnitName,
updated,
...others
} = res.data
this.residentInfo = {
personId: id,
...others
}
this.info = {
personId: id,
...others
}
}
},
//获取上一次随访数据
getLastData() {
let par = {
residentInfoId: this.residentInfoId
}
getLastHighSpecificVisit(par).then(res => {
let result = res.data || {}
if (Object.keys(result).length === 0) {
showToast('暂无上一次随访数据')
return
}
let obj = this.dataHandle(result)
this.info = {
...obj,
...this.residentInfo,
flag: 'lastInfo',
id: null
}
})
},
//数据处理
dataHandle(result) {
let obj = fetchDataHandle(result, {
diseaseArrays: 'strToArrNum',
medicalHistory: 'strToArrNum',
familyHistory: 'strToArrNum',
relativeType: 'strToArrNum',
femaleMedicalHistory: 'strToArrNum',
medicineHistory: 'strToArrNum',
touchHarmful: 'strToArrNum',
dietaryHabit: 'strToArrNum',
drinkKind: 'strToArrNum',
specialScreenResult: 'strToArrNum',
highItem: 'strToArrNum',
hypertensionHighItem: 'strToArrNum',
diabetesHighItem: 'strToArrNum',
coronaryHighItem: 'strToArrNum',
strokeHighItem: 'strToArrNum',
pulmonaryHighItem: 'strToArrNum',
nephrosisHighItem: 'strToArrNum',
dyslipemiaHighItem: 'strToArrNum',
})
return obj
},
async toNext(val) {
this.$refs.all.scrollTo(0, 0)
if (val == 2) {
let obj = await this.$refs.baseInfo.onSubmit()
this.diseaseArraysInfo = obj.diseaseArrays || []
}
if (val == 3) {
await this.$refs.formInfo.onSubmit()
}
this.step = val
},
//提交所有表单
async onsubmit() {
let baseInfo = await this.$refs.baseInfo.onSubmit()
let formInfo = await this.$refs.formInfo.onSubmit()
let commonBottom = await this.$refs.commonBottom.onSubmit()
let params = {
...formInfo,
...commonBottom,
...baseInfo,
diseaseArrays: baseInfo.diseaseArrays ? baseInfo.diseaseArrays.join() : '',
source: 2
}
if (formInfo.specialScreenResult) {
let list = formInfo.specialScreenResult.split(",")
list.forEach(item => {
let res = this.store.getDict(`CP00137`).filter(e => e.value == item)
if (res && res.length) {
this.specialScreenResultList.push(res[0].name)
}
})
}
if (!params.id) {
saveHighSpecificVisit(params).then(res => {
this.$message.success('新增成功')
this.store.onRefreshMark()
this.toNext(4)
})
} else {
updateHighSpecificVisit(params).then(res => {
this.$message.success('修改成功')
this.store.onRefreshMark()
this.toNext(4)
})
}
},
onBack() {
if (this.step == 1) {
this.$router.back()
} else {
this.step--
}
}
}
}
</script>
<style lang='less' scoped>
</style>
...@@ -2,24 +2,24 @@ ...@@ -2,24 +2,24 @@
<div> <div>
<van-form ref='form'> <van-form ref='form'>
<div :class="['label-title', 'mt-5']">随访单位</div> <div :class="['label-title', 'mt-5']">筛查单位</div>
<van-field <van-field
v-model='form.screenUnitName' v-model='form.screenUnitName'
is-link is-link
readonly readonly
placeholder='随访单位' placeholder='筛查单位'
class='input-back mt-2 form-input' class='input-back mt-2 form-input'
:rules='rules.screenUnitName' :rules='rules.screenUnitName'
@click='show1 = true' @click='show1 = true'
/> />
<DocUnit v-model:show='show1' v-model:value='form.screenUnitId' @change='changeUnit' /> <DocUnit v-model:show='show1' v-model:value='form.screenUnitId' @change='changeUnit' />
<div class='label-title mt-5'>随访科室</div> <div class='label-title mt-5'>筛查科室</div>
<van-field <van-field
v-model='form.screenOfficeName' v-model='form.screenOfficeName'
is-link is-link
readonly readonly
placeholder='随访科室' placeholder='筛查科室'
class='input-back mt-2 form-input' class='input-back mt-2 form-input'
:rules='rules.screenOfficeName' :rules='rules.screenOfficeName'
@click='show2 = true' @click='show2 = true'
...@@ -27,12 +27,12 @@ ...@@ -27,12 +27,12 @@
<DocOffice v-model:show='show2' v-model:value='form.screenOfficeId' @change='changeOffice' <DocOffice v-model:show='show2' v-model:value='form.screenOfficeId' @change='changeOffice'
:unitId='form.screenUnitId' /> :unitId='form.screenUnitId' />
<div class='label-title mt-5'>随访医生</div> <div class='label-title mt-5'>筛查医生</div>
<van-field <van-field
v-model='form.screenDoctorName' v-model='form.screenDoctorName'
is-link is-link
readonly readonly
placeholder='随访医生' placeholder='筛查医生'
class='input-back mt-2 form-input' class='input-back mt-2 form-input'
:rules='rules.screenDoctorName' :rules='rules.screenDoctorName'
@click='show3 = true' @click='show3 = true'
...@@ -94,13 +94,13 @@ export default { ...@@ -94,13 +94,13 @@ export default {
const form = { const form = {
screenDate: new dayjs().format("YYYY-MM-DD"), screenDate: new dayjs().format("YYYY-MM-DD"),
createDate: new dayjs().format("YYYY-MM-DD"), createDate: new dayjs().format("YYYY-MM-DD"),
// 随访单位 // 筛查单位
screenUnitId: this.authInfo.unitId, screenUnitId: this.authInfo.unitId,
screenUnitName: this.authInfo.unitName, screenUnitName: this.authInfo.unitName,
// 随访科室 // 筛查科室
screenOfficeId: this.authInfo.officeId, screenOfficeId: this.authInfo.officeId,
screenOfficeName: this.authInfo.officeName, screenOfficeName: this.authInfo.officeName,
// 随访医生 // 筛查医生
screenDoctorId: this.authInfo.relationId, screenDoctorId: this.authInfo.relationId,
screenDoctorName: this.authInfo.nickName, screenDoctorName: this.authInfo.nickName,
// 录入单位 // 录入单位
......
...@@ -212,11 +212,13 @@ export default { ...@@ -212,11 +212,13 @@ export default {
if (!params.id) { if (!params.id) {
saveSecondScreening(params).then(res => { saveSecondScreening(params).then(res => {
this.$message.success('新增成功') this.$message.success('新增成功')
this.store.onRefreshMark()
this.toNext(4) this.toNext(4)
}) })
} else { } else {
updateSecondScreening(params).then(res => { updateSecondScreening(params).then(res => {
this.$message.success('修改成功') this.$message.success('修改成功')
this.store.onRefreshMark()
this.toNext(4) this.toNext(4)
}) })
} }
......
...@@ -85,10 +85,31 @@ const routes = [ ...@@ -85,10 +85,31 @@ const routes = [
name: 'screening-secondDetail', name: 'screening-secondDetail',
component: () => import(/* webpackChunkName: "doctor" */ '@/doctor/screening/detail/SecondDetail.vue') component: () => import(/* webpackChunkName: "doctor" */ '@/doctor/screening/detail/SecondDetail.vue')
}, },
{
path: 'screening/highVisit/firstForm',
name: 'screening-highVisit-first-form',
component: () => import(/* webpackChunkName: "doctor" */ '@/doctor/screening/highVisit/first/FirstForm.vue')
},
{
path: 'screening/highVisit/firstDetail',
name: 'screening-highVisit-firstDetail',
component: () => import(/* webpackChunkName: "doctor" */ '@/doctor/screening/highVisit/detail/FirstDetail.vue')
},
{
path: 'screening/highVisit/secondForm',
name: 'screening-highVisit-second-form',
component: () => import(/* webpackChunkName: "doctor" */ '@/doctor/screening/highVisit/second/SecondForm.vue')
},
{
path: 'screening/highVisit/secondDetail',
name: 'screening-highVisit-secondDetail',
component: () => import(/* webpackChunkName: "doctor" */ '@/doctor/screening/highVisit/detail/SecondDetail.vue')
},
{ {
path: 'screening/highVisit/GeneralFUDetail', path: 'screening/highVisit/GeneralFUDetail',
name: 'screening-highVisit-GeneralFUDetail', name: 'screening-highVisit-GeneralFUDetail',
component: () => import(/* webpackChunkName: "doctor" */ '@/doctor/screening/detail/GeneralFUDetail') component: () => import(/* webpackChunkName: "doctor" */ '@/doctor/screening/highVisit/detail/GeneralFUDetail')
}, },
{ {
path: 'followUp/detail', path: 'followUp/detail',
......
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