Commit 74af489f authored by gengchunlei's avatar gengchunlei

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

 Conflicts:
	src/api/doctor/screening.js
	src/doctor/Doctor.vue
parents 84203878 2b786f2c
......@@ -5,11 +5,6 @@ export function getScreenAllList(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/screening-detail`, body: params, loading: true })
}
// 慢病专病筛查详情
export function secondScreenDetail(params) {
return fetchBase({ url: `/chronic-resident/v1/chronic-screening-record/rescreen-detail`, body: params, loading: true })
......@@ -18,4 +13,24 @@ export function secondScreenDetail(params) {
//查询最近一次专病高危筛查
export function getLastScreen(params) {
return fetchBase({ url: `/chronic-admin/v1/chronic-screening-rescreen/last-info`, body: params, loading: true})
}
\ No newline at end of file
}
// 保存初筛
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 })
}
......@@ -39,6 +39,7 @@
import DocImage from './DocImage.vue'
import { showToast } from 'vant'
import { fileUpload } from '@/api/base'
import { useCustomFieldValue } from '@vant/use';
export default {
name: 'DocImageUpload',
......@@ -84,6 +85,7 @@ export default {
init() {
if (this.imageData?.length) {
this.innerImage = [...this.imageData]
useCustomFieldValue(() => this.ids)
} else {
this.innerImage = [
// { fileType: 'pdf', id: 1, trueDownloadUrl: testUrl },
......@@ -115,6 +117,7 @@ export default {
this.addImage(result)
this.inputKey = Math.random().toString(16).substring(2, 6)
this.$emit('change', this.ids, this.innerImage)
useCustomFieldValue(() => this.ids)
}).finally(() => {
this.spinning = false
})
......@@ -145,6 +148,7 @@ export default {
if (!item) return
this.innerImage = this.innerImage.filter(e => e.id != item.id)
this.$emit('change', this.ids, this.innerImage)
useCustomFieldValue(() => this.ids)
},
//图片预览
toPreview(val) {
......
......@@ -2,7 +2,7 @@
<div class="px-3 py-3 flex items-center doc-nav-bar">
<div class="shrink-0 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"/>
</span>
</slot>
......@@ -27,7 +27,10 @@ export default {
title: String,
// 是否首页
home: Boolean,
backFunc: Function
// 替换返回函数
backFunc: Function,
// 隐藏返回按键
hideBack: Boolean
},
methods: {
goBack() {
......
......@@ -71,7 +71,6 @@
</template>
<script>
import { showToast } from 'vant'
import { getTemplateDetail } from '@/api/doctor/workbench'
import Mp3 from '@/doctor/components/mediaPlay/Mp3.vue'
import Mp4 from '@/doctor/components/mediaPlay/Mp4.vue'
......@@ -114,7 +113,7 @@ export default {
methods: {
async load() {
if (!this.id) {
showToast('未获取到信息')
this.$message.info('未获取到信息')
return
}
let par = {
......
......@@ -91,7 +91,6 @@
</template>
<script>
import { showToast } from 'vant'
import CheckBtn from '@/doctor/components/checkBtn/CheckBtn'
import { getTemplateByPage } from '@/api/doctor/workbench'
import { useStore } from '@/doctor/store'
......
<template>
<van-form ref='form' class="doc-form instpect-common" >
<div class="doc-form-label" required>检查项目</div>
<van-field is-link
:modelValue="checkName"
readonly
placeholder="请选择"
name="check"
@click="showCheck = true"
:rules="[{ required: true, message: '请选择' }]"
/>
<van-popup v-model:show="showCheck" position="bottom" style="height: 60%">
<div class="pt-4 h-full flex flex-col popup-checkbox">
<div class="flex justify-between shrink-0 pb-2">
<button class="van-picker__cancel van-haptics-feedback" @click="showCheck = false">取消</button>
<span class="text-16">请选择(可多选)</span>
<button class="van-picker__confirm van-haptics-feedback" @click="checkConfirm">确认</button>
</div>
<div class="bottom-small-line"></div>
<van-checkbox-group v-model="check" class="px-4 pb-4 pt-2 grow overflow-y-auto">
<van-checkbox v-for="(item, index) in store.getDict('CP00111')" :key="index"
:name="item.value"
class="mb-3">
<span :class="{'text-primary': adviseCheck.includes(item.value)}">{{ item.name }}</span>
</van-checkbox>
</van-checkbox-group>
</div>
</van-popup>
<div class="flex flex-col mt-3 check-list">
<div v-for="(row, index1) in viewData" :key="row.insType"
class="pt-3 px-2 mb-2 check-list-item"
:style="`order: ${row.insType}`">
<div class="required-mark mb-3">{{ row.insName }}</div>
<template v-for="(item, index2) in row.items">
<van-field
v-model="item.itemValue"
placeholder="请输入"
:maxLength="500"
:rules="[{ required: true, message: '请录入' }]"
:name="['viewData', index1, 'items', index2, 'itemValue'].join('.')"
class="no-back mb-2"
maxlength="100"
v-destory:itemValue="item"
v-if="item.itemType === 1"
/>
<van-field :name="['viewData', index1, 'items', index2, 'itemValue'].join('.')"
class="no-back mb-2"
label="图片上传"
label-align="top"
v-if="item.itemType === 5">
<template #input>
<DocImageUpload :imageData="item.imageData"
@change="(ids, option) => item.itemValue = ids"
:maxLength="3"
description="请上传JPG、PNG格式图片,文件大小不超过10M"
class="w-full"/>
</template>
</van-field>
</template>
</div>
</div>
</van-form>
</template>
<script>
import { checkDefault } from './config.js'
import { useStore } from '@/doctor/store/index.js'
import { getInspectCode } from '@/api/doctor/disease.js'
import DocImageUpload from '@/doctor/components/docImageUpload/DocImageUpload.vue'
export default {
name: 'CheckCommon',
components: {
DocImageUpload
},
props: {
// 初始化数据
info: { default: () => [] },
// 慢病
disease: [String, Number]
},
data() {
return {
store: useStore(),
check: [],
checkName: '',
viewData: [],
// 可显示的检验项
codeTable: [],
showCheck: false,
}
},
computed: {
// 推荐选中的项目
adviseCheck() {
return checkDefault(this.disease)
}
},
created() {
this.init()
},
methods: {
init() {
if (this.info.check) {
let check = this.info.check
this.check = typeof check === 'string' ? check.split(',') : check
}
getInspectCode(2).then(res => {
console.log(res)
const check = this.check
const data = this.info.items || []
this.codeTable = res.data || []
this.codeTable.forEach(e => {
const item = data.find(i => e.itemCode === i.itemCode) || {}
// 根据表单类型处理
if (item.itemType === 5) {
e.itemValue = item.inspectFile || ''
e.imageData = item.inspectFileList || []
} else {
e.itemValue = item.itemValue
}
})
this.viewData = check.map(val => {
const items = this.codeTable.filter(e => e.insType === val)
if (!items.length) return {}
return {
insName: items[0].insName,
insType: val,
items: [...items]
}
})
})
},
submit() {
return new Promise((resolve, reject) => {
this.$refs.form.validate().then(() => {
const check = this.check.join(',')
let data = []
this.viewData.forEach(e => {
data = data.concat(e.items)
})
data = data.map(e => {
// 根据表单类型处理
let value = e.itemValue
return {
...e,
itemValue: value
}
})
console.log(data, check)
resolve({ check, data })
}).catch((e) => {
reject(e)
})
})
},
checkConfirm() {
this.checkName = this.store.getDict('CP00111').map(e => {
return this.check.includes(e.value) ? e.name : ''
}).filter(e => e).join('、')
this.showCheck = false
this.checkChange(this.check)
setTimeout(() => {
this.$refs.form.resetValidation()
}, 0)
console.log('checkChange', this.viewData)
},
checkChange(val) {
const viewData = this.viewData
const addValue = val.filter(e => !viewData.find(i => i.insType === e))
const delValue = viewData.filter(i => !val.includes(i.insType)).map(e => e.insType)
if (delValue.length) {
this.viewData = this.viewData.filter(e => !delValue.includes(e.insType))
}
if (addValue.length) {
addValue.forEach(val => {
const items = this.codeTable.filter(e => e.insType === val)
if (!items.length) return {}
this.viewData.push({
insName: items[0].insName,
insType: val,
items: [...items]
})
})
}
}
},
}
</script>
<style lang="less" scoped>
.check-list {
.check-list-item {
background-color: #F5F5F5;
border-radius: 8px;
}
:deep(.van-field) {
border-radius: .08rem;
}
}
</style>
<template>
<van-form ref='form' class="instpect-common" >
<van-form ref='form' class="doc-form instpect-common" >
<div class='doc-form-label' required>检验项目</div>
<van-field is-link
:modelValue='inspectName'
......@@ -31,7 +31,7 @@
class="pt-3 px-2 mb-2 instpect-list-item"
:style="`order: ${row.insType}`">
<div class="required-mark mb-3">{{ row.insName }}</div>
<template v-for="(item, index2) in row.items" :key="item.itemCode">
<template v-for="(item, index2) in row.items">
<van-field :label="getItemName(item)"
v-model="item.itemValue"
placeholder="请输入"
......@@ -97,6 +97,19 @@
:dict="selectOption.dict"
@change="onSelectInputConfirm"></InputSelect>
</div>
<van-field name="imageData"
class="no-back mb-2"
label="图片上传"
label-align="top"
style="order: 99">
<template #input>
<DocImageUpload :imageData="imageData"
@change="(ids, option) => image = ids"
:maxLength="3"
description="请上传JPG、PNG格式图片,文件大小不超过10M"
class="w-full"/>
</template>
</van-field>
</van-form>
</template>
......@@ -105,11 +118,13 @@ import { inspectDefault } from './config.js'
import { getInspectCode } from '@/api/doctor/disease.js'
import { useStore } from '@/doctor/store/index.js'
import InputSelect from './InputSelect.vue'
import DocImageUpload from '@/doctor/components/docImageUpload/DocImageUpload.vue'
export default {
name: 'InstpectCommon',
components: {
InputSelect
InputSelect,
DocImageUpload
},
props: {
// 初始化数据
......@@ -224,6 +239,9 @@ export default {
})
})
}
setTimeout(() => {
this.$refs.form.resetValidation()
}, 0)
console.log('inspectChange', this.viewData)
},
getItemName(item) {
......
......@@ -17,7 +17,6 @@
<script>
import { useStore } from '@/doctor/store/index.js'
import { showToast } from 'vant'
export default {
props: {
......@@ -39,7 +38,7 @@ export default {
submit() {
return new Promise((resolve, reject) => {
if (!this.diseaseType) {
showToast('请选择慢病类型')
this.$message.info('请选择慢病类型')
reject('请选择慢病类型')
return
}
......
<template>
<div class="diagnose-form-cont">
<van-form ref='form' class="doc-form">
<InstpectCommon :disease="diseaseType"/>
</van-form>
<InstpectCommon :disease="diseaseType"/>
<CheckCommon :disease="diseaseType"/>
</div>
</template>
<script>
import InstpectCommon from '../common/Instpect.vue'
import CheckCommon from '../common/Check.vue'
export default {
components: {
InstpectCommon
InstpectCommon,
CheckCommon
},
props: {
diseaseType: [Number, String]
......
......@@ -248,7 +248,6 @@
</template>
<script>
import { showToast } from 'vant'
import Mp3 from '@/doctor/components/mediaPlay/Mp3.vue'
import Mp4 from '@/doctor/components/mediaPlay/Mp4.vue'
import ImagePreview from '@/residentWX/components/imagePreview/imagePreview'
......@@ -376,7 +375,7 @@ export default {
methods: {
async load() {
if (!this.routerDetail.relationId) {
showToast('未获取到信息')
this.$message.info('未获取到信息')
return
}
let par = {
......
......@@ -193,7 +193,7 @@
import { useStore } from '@/resident/store'
import dayjs from 'dayjs'
import DocIcon from '@/components/docIcon/DocIcon'
import { showFailToast, showToast } from 'vant'
import { showFailToast } from 'vant'
import { fetchDataHandle, uniqueArr } from '@/utils/common'
import DocImageUpload from '@/doctor/components/docImageUpload/DocImageUpload'
import TemList from '@/doctor/components/template/temList'
......
......@@ -93,7 +93,7 @@
<script>
import { queryResidentInfo } from '@/api/doctor/resident.js'
import { showNotify, showToast } from 'vant'
import { showNotify } from 'vant'
import DocNavBar from '@/doctor/components/docNavBar/DocNavBar.vue'
import ChronicTag from '@/doctor/components/chronicTag/ChronicTag.vue'
import CheckBtn from '@/doctor/components/checkBtn/CheckBtn.vue'
......@@ -195,7 +195,7 @@ export default {
onAddChange(val, option) {
console.log(val, option)
if (this.deathStatus === 9) {
showToast('该患者已死亡')
this.$message.info('该患者已死亡')
return
}
this.addVisible = false
......
......@@ -94,7 +94,7 @@ export default {
toDetail(record) {
if (!record) return
if (record.id == null) {
showToast('暂时无法查看 详情信息')
this.$message.info('暂时无法查看 详情信息')
return
}
}
......
......@@ -141,7 +141,7 @@ export default {
toDetail(record) {
if (!record) return
if (record.id == null) {
showToast('暂时无法查看 详情信息')
this.$message.info('暂时无法查看 详情信息')
return
}
if (record.serveType === 5) {
......
......@@ -57,7 +57,6 @@
<script>
import { fetchCurrencyList, delCurrencyById } from '@/api/doctor/generalFU.js'
import { showToast } from 'vant'
import { useStore } from '@/doctor/store'
export default {
......@@ -125,7 +124,7 @@ export default {
toDetail(record) {
if (!record) return
if (record.id == null) {
showToast('暂时无法查看 详情信息')
this.$message.info('暂时无法查看 详情信息')
return
}
this.$router.push({
......
......@@ -98,7 +98,7 @@ export default {
toDetail(record) {
if (!record) return
if (record.id == null) {
showToast('暂时无法查看 详情信息')
this.$message.info('暂时无法查看 详情信息')
return
}
}
......
......@@ -102,8 +102,8 @@
<script>
import { useStore } from '@/doctor/store'
import { getScreenAllList } from '@/api/doctor/screening.js'
import { showToast } from 'vant'
import { getScreenAllList, deleteFirstScreening } from '@/api/doctor/screening.js'
import { showConfirmDialog } from 'vant'
export default {
inject: ['residentInfo'],
......@@ -151,7 +151,7 @@ export default {
toFirstDetail(record) {
if (!record) return
if (record.id == null) {
showToast('暂时无法查看 详情信息')
this.$message.info('暂时无法查看 详情信息')
return
}
this.$router.push({
......@@ -165,7 +165,7 @@ export default {
toSecondDetail(record) {
if (!record) return
if (record.id == null) {
showToast('暂时无法查看 详情信息')
this.$message.info('暂时无法查看 详情信息')
return
}
this.$router.push({
......@@ -182,7 +182,17 @@ export default {
})
},
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) {
this.$router.push({
......
......@@ -128,7 +128,7 @@ export default {
toDetail(record) {
if (!record) return
if (record.id == null) {
showToast('暂时无法查看 详情信息')
this.$message.info('暂时无法查看 详情信息')
return
}
if (record.serveType == 3) {
......
......@@ -68,7 +68,7 @@
</van-popup>
<div class='doc-form-label'>年龄</div>
<van-field v-model="form.currentAge"
<van-field :modelValue="form.currentAge"
name="currentAge"
type="digit"
placeholder="请输入年龄"
......@@ -326,7 +326,7 @@
</template>
</van-field>
<DoctorInfo />
<DoctorInfo :info="info" ref="DoctorInfo"/>
<div class='doc-form-label' required>筛查日期</div>
<van-field
......@@ -417,7 +417,8 @@ export default {
BloodPressureBt
},
props: {
info: { default: () => ({}) }
info: { default: () => ({}) },
residentInfo: { default: () => ({}) },
},
inject: ['pressureObj'],
data() {
......@@ -490,8 +491,50 @@ export default {
result.push(e)
})
return result
},
// 筛查高危项目
highItem() {
const {currentAge, waistline, familyHistory = [], isSmoking, gender,
pressureOneSbp, pressureOneDbp, pressureTwoSbp, pressureTwoDbp,
fastingGlucose, ldlCholesterin, serumCholesterin} = this.form
let list = []
if (currentAge >= 50) {
list.push(1)
}
let bmi = parseFloat(this.bmi)
if ((bmi >= 24)||
(gender == 2 && waistline >=80) ||
(gender == 1 && waistline >=85) ){
list.push(2)
}
if (isSmoking == 1) {
list.push(3)
}
if (familyHistory && familyHistory.length && (familyHistory.includes(1) || familyHistory.includes(2) ||
familyHistory.includes(3) || familyHistory.includes(4) || familyHistory.includes(5) || familyHistory.includes(6))) {
list.push(4)
}
if ((pressureOneSbp >= 130 || pressureTwoSbp >= 130) ||
(pressureOneDbp >= 85 || pressureTwoDbp >= 85)
) {
list.push(5)
}
if (fastingGlucose >= 6.1) {
list.push(6)
}
// if (ldlCholesterin >= 3.4) {
// list.push(7)
// }
if (serumCholesterin >= 5.2) {
list.push(7)
}
list = Array.from(new Set(list))
return list
}
},
created() {
this.init()
},
methods: {
init() {
const date = dayjs()
......@@ -500,8 +543,23 @@ export default {
this.screenDateRange.max = new Date(date.year(), date.month(), date.date())
this.screenDateRange.min = new Date(date.year() - 20, date.month(), date.date())
},
submit() {
return this.$refs.form.validate()
async submit() {
try {
await this.$refs.form.validate()
const result = {
...this.form,
...this.$refs.DoctorInfo.submit()
}
return result
} catch (err) {
console.warn(err)
this.$message.info('表单校验不通过')
const array = err || []
if (array.length) {
this.$refs.form.scrollToField(array[0].name)
}
}
},
// 既往史
medicalConfirm() {
......@@ -528,48 +586,49 @@ export default {
this.form.screenDate = selectedValues.join('-')
this.showScreenDate = false
},
resultHandle() {
const {currentAge, height = 0, weight = 0, waistline, familyHistory = [], isSmoking, gender,
pressureOneSbp, pressureOneDbp, pressureTwoSbp, pressureTwoDbp, fastingGlucose, ldlCholesterin, serumCholesterin} = this.form
let list = []
if (currentAge >= 50) {
list.push(1)
}
let bmi = parseFloat(this.bmi)
if ((bmi >= 24)||
(gender == 2 && waistline >=80) ||
(gender == 1 && waistline >=85) ){
list.push(2)
}
if (isSmoking == 1) {
list.push(3)
}
if (familyHistory && familyHistory.length && (familyHistory.includes(1) || familyHistory.includes(2) ||
familyHistory.includes(3) || familyHistory.includes(4) || familyHistory.includes(5) || familyHistory.includes(6))) {
list.push(4)
}
if ((pressureOneSbp >= 130 || pressureTwoSbp >= 130) ||
(pressureOneDbp >= 85 || pressureTwoDbp >= 85)
) {
list.push(5)
}
if (fastingGlucose >= 6.1) {
list.push(6)
}
// if (ldlCholesterin >= 3.4) {
// list.push(7)
// }
if (serumCholesterin >= 5.2) {
list.push(7)
}
list = Array.from(new Set(list))
this.form.highItem = list
if (list.length >= 3){
this.form.screenResult = 2
}else {
this.form.screenResult = 1
}
},
// resultHandle() {
// const {currentAge, waistline, familyHistory = [], isSmoking, gender,
// pressureOneSbp, pressureOneDbp, pressureTwoSbp, pressureTwoDbp,
// fastingGlucose, ldlCholesterin, serumCholesterin} = this.form
// let list = []
// if (currentAge >= 50) {
// list.push(1)
// }
// let bmi = parseFloat(this.bmi)
// if ((bmi >= 24)||
// (gender == 2 && waistline >=80) ||
// (gender == 1 && waistline >=85) ){
// list.push(2)
// }
// if (isSmoking == 1) {
// list.push(3)
// }
// if (familyHistory && familyHistory.length && (familyHistory.includes(1) || familyHistory.includes(2) ||
// familyHistory.includes(3) || familyHistory.includes(4) || familyHistory.includes(5) || familyHistory.includes(6))) {
// list.push(4)
// }
// if ((pressureOneSbp >= 130 || pressureTwoSbp >= 130) ||
// (pressureOneDbp >= 85 || pressureTwoDbp >= 85)
// ) {
// list.push(5)
// }
// if (fastingGlucose >= 6.1) {
// list.push(6)
// }
// // if (ldlCholesterin >= 3.4) {
// // list.push(7)
// // }
// if (serumCholesterin >= 5.2) {
// list.push(7)
// }
// list = Array.from(new Set(list))
// this.form.highItem = list
// if (list.length >= 3){
// this.form.screenResult = 2
// }else {
// this.form.screenResult = 1
// }
// },
setPressureOne(val) {
if (!val) return
this.form.pressureOneSbp = val.systolicPressure
......@@ -593,6 +652,17 @@ export default {
this.form.bmi = this.bmi
},
immediate: true
},
highItem: {
handler(val) {
this.form.highItem = val
if (val.length >= 3){
this.form.screenResult = 2
}else {
this.form.screenResult = 1
}
},
immediate: true
}
}
}
......
<template>
<div class="h-full flex flex-col screening-first">
<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">
<archiveCommon :info="baseInfo" v-if="step == 1"></archiveCommon>
<FormCont v-else-if="step == 2" ref="FormCont"/>
<Result v-else-if="step == 3" :residentInfoId="residentInfoId"/>
<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>
......@@ -29,6 +29,9 @@ 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 { firstScreenDetail, saveFirstScreening, updateFirstScreening } from '@/api/doctor/screening.js'
import { fetchDataHandle } from '@/utils/common.js'
import { useStore } from '@/doctor/store'
export default {
components: {
......@@ -39,9 +42,14 @@ export default {
},
data() {
return {
store: useStore(),
step: 1,
// 患者基础信息
baseInfo: {}
baseInfo: {},
// 筛查信息
screenInfo: {},
// 结果
resultInfo: {}
}
},
computed: {
......@@ -58,15 +66,40 @@ export default {
methods: {
async init() {
if (this.id) {
const res = await firstScreenDetail({id: 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 {
let res = await getChronicResidentsId(this.residentInfoId)
this.baseInfo = res.data || {}
this.screenInfo.currentAge = this.baseInfo.currentAge
this.screenInfo.residentInfoId = this.residentInfoId
}
},
toNext(val) {
if (val == 3) {
this.$refs.FormCont.submit()
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 ? updateFirstScreening : saveFirstScreening
func(query).then(res => {
this.resultInfo = query
this.store.onRefreshMark()
this.step = val
})
})
return
}
this.step = val
......
......@@ -4,7 +4,8 @@
<div class="mt-3">筛查完成</div>
<div class="text-start mt-5">
<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 style="margin-top: .48rem">
<van-button type='primary' block round plain
......@@ -21,7 +22,12 @@
<script>
export default {
props: {
residentInfoId: String
info: { default: () => ({}) }
},
computed: {
residentInfoId() {
return this.info.residentInfoId
}
},
methods: {
toScreen() {
......
......@@ -14,7 +14,6 @@
<script>
import { useStore } from '@/doctor/store/index.js'
import { showToast } from 'vant'
export default {
props: {
......
......@@ -104,7 +104,6 @@ import { getBeSecondScreenByPage, addIgnoreRecord } from '@/api/doctor/workbench
import { useStore } from '@/doctor/store'
import CheckBtn from '@/doctor/components/checkBtn/CheckBtn.vue'
import IdCardScan from '@/doctor/components/idCardScan/IdCardScan.vue'
import { showToast } from 'vant'
const DefaultForm = {
// 数据来源,[DC00051]
......@@ -220,7 +219,7 @@ export default {
toDetail(record) {
if (!record) return
if (record.residentInfoId == null) {
showToast('暂时无法查看 详情信息')
this.$message.info('暂时无法查看 详情信息')
return
}
this.$router.push({
......@@ -232,7 +231,7 @@ export default {
},
toScreen(record) {
if (record.residentInfoId == null) {
showToast('暂时无法进行筛查')
this.$message.info('暂时无法进行筛查')
return
}
this.$router.push({
......@@ -250,7 +249,7 @@ export default {
addIgnoreRecord(params).then(() => {
this.list = this.list.filter(e => e.screenId !== record.screenId)
setTimeout(() => {
showToast('操作成功')
this.$message.info('操作成功')
}, 800);
})
}
......
......@@ -108,7 +108,6 @@ import { useStore } from '@/doctor/store'
import { getDiagnoseByPage, addIgnoreRecord } from '@/api/doctor/workbench.js'
import CheckBtn from '@/doctor/components/checkBtn/CheckBtn.vue'
import IdCardScan from '@/doctor/components/idCardScan/IdCardScan.vue'
import { showToast } from 'vant'
const DefaultForm = {
// 数据来源,[DC00051]
......@@ -250,7 +249,7 @@ export default {
toDetail(record) {
if (!record) return
if (record.residentInfoId == null) {
showToast('暂时无法查看 详情信息')
this.$message.info('暂时无法查看 详情信息')
return
}
this.$router.push({
......@@ -262,7 +261,7 @@ export default {
},
toDiagnose(record) {
if (record.residentInfoId == null) {
showToast('暂时无法进行诊断')
this.$message.info('暂时无法进行诊断')
return
}
this.$router.push({
......@@ -282,7 +281,7 @@ export default {
addIgnoreRecord(params).then(() => {
this.list = this.list.filter(e => e.id !== record.id)
setTimeout(() => {
showToast('操作成功')
this.$message.info('操作成功')
}, 800);
})
},
......
......@@ -116,7 +116,6 @@ import { useStore } from '@/doctor/store'
import CheckBtn from '@/doctor/components/checkBtn/CheckBtn.vue'
import IdCardScan from '@/doctor/components/idCardScan/IdCardScan.vue'
import DocUnit from '@/doctor/components/docUnit/DocUnit.vue'
import { showToast } from 'vant'
const DefaultForm = {
// 转出单位id
......@@ -235,7 +234,7 @@ export default {
toDetail(record) {
if (!record) return
if (record.residentInfoId == null) {
showToast('暂时无法查看 详情信息')
this.$message.info('暂时无法查看 详情信息')
return
}
this.$router.push({
......@@ -253,7 +252,7 @@ export default {
ignoreReceive(params).then(() => {
this.list = this.list.filter(e => e.id !== record.id)
setTimeout(() => {
showToast('操作成功')
this.$message.info('操作成功')
}, 800);
})
}
......
......@@ -125,7 +125,6 @@ import { getVisitByPage, delVisit } from '@/api/doctor/workbench.js'
import ChronicTag from '@/doctor/components/chronicTag/ChronicTag.vue'
import CheckBtn from '@/doctor/components/checkBtn/CheckBtn.vue'
import IdCardScan from '@/doctor/components/idCardScan/IdCardScan.vue'
import { showToast } from 'vant'
const DefaultForm = {
// 数据来源,[CP00124]
......@@ -267,7 +266,7 @@ export default {
toDetail(record) {
if (!record) return
if (record.residentInfoId == null) {
showToast('暂时无法查看 详情信息')
this.$message.info('暂时无法查看 详情信息')
return
}
this.$router.push({
......@@ -281,7 +280,7 @@ export default {
delVisit({ id: record.id }).then(() => {
this.list = this.list.filter(e => e.id !== record.id)
setTimeout(() => {
showToast('操作成功')
this.$message.info('操作成功')
}, 800);
})
},
......
......@@ -110,7 +110,6 @@ import { getWorkByPage } from '@/api/doctor/workbench.js'
import { useStore } from '@/doctor/store'
import CheckBtn from '@/doctor/components/checkBtn/CheckBtn.vue'
import IdCardScan from '@/doctor/components/idCardScan/IdCardScan.vue'
import { showToast } from 'vant'
const DefaultForm = {
// 数据来源,[DC00051]
......@@ -224,7 +223,7 @@ export default {
toDetail(record) {
if (!record) return
if (record.residentInfoId == null) {
showToast('暂时无法查看 详情信息')
this.$message.info('暂时无法查看 详情信息')
return
}
this.$router.push({
......
......@@ -3,7 +3,7 @@ import 'vant/es/toast/style/index'
import 'vant/es/notify/style/index'
import 'vant/es/dialog/style/index'
import 'vant/es/image-preview/style/index'
import { DatePicker } from 'vant'
import { DatePicker, showToast, showSuccessToast, showFailToast } from 'vant'
// 自定义svg 图标组件
import DocIcon from '@/components/docIcon/index'
......@@ -21,6 +21,11 @@ export function registe(app) {
app.config.globalProperties.$idCardHide = idCardHide
app.config.globalProperties.$phoneHide = phoneHide
app.config.globalProperties.$addrJoin = addrJoin
app.config.globalProperties.$message = {
info: showToast,
success: showSuccessToast,
fail: showFailToast
}
// 日期选择框默认选中当前日期
DatePicker.props.modelValue.default = () => {
......
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