Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
F
frontend-h5
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
songrui
frontend-h5
Commits
01dd7a6c
Commit
01dd7a6c
authored
Jan 07, 2025
by
songrui
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'chronic-dev' of
http://gitlab.yiboshi.com/nightkis1995/frontend-h5
into chronic-dev
parents
ca004c6e
b3e2ebf3
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
859 additions
and
110 deletions
+859
-110
screening.js
src/api/doctor/screening.js
+5
-0
BaseInfo.vue
src/doctor/screening/second/BaseInfo.vue
+218
-0
FormCont.vue
src/doctor/screening/second/FormCont.vue
+561
-78
SecondForm.vue
src/doctor/screening/second/SecondForm.vue
+75
-32
No files found.
src/api/doctor/screening.js
View file @
01dd7a6c
...
...
@@ -10,6 +10,11 @@ export function secondScreenDetail(params) {
return
fetchBase
({
url
:
`/chronic-resident/v1/chronic-screening-record/rescreen-detail`
,
body
:
params
,
loading
:
true
})
}
//查询最近一次专病高危筛查
export
function
getLastScreen
(
params
)
{
return
fetchBase
({
url
:
`/chronic-admin/v1/chronic-screening-rescreen/last-info`
,
body
:
params
,
loading
:
true
})
}
// 保存初筛
export
function
saveFirstScreening
(
params
)
{
return
fetchBase
({
url
:
`/chronic-admin/v1/chronic-screening-record/save`
,
body
:
params
,
loading
:
true
})
...
...
src/doctor/screening/second/BaseInfo.vue
0 → 100644
View file @
01dd7a6c
<
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
src/doctor/screening/second/FormCont.vue
View file @
01dd7a6c
<
template
>
<div
class=
'screening-first-cont'
>
form
<van-form
ref=
'form'
>
<div
class=
'title'
>
筛查信息
</div>
<div
v-if=
'ageShow'
>
<div
class=
'no-req-label mt-5'
>
年龄
</div>
<van-field
v-model=
'form.currentAge'
readonly
placeholder=
'年龄'
class=
'input-back mt-2 form-input'
/>
</div>
<div
v-if=
'sexShow'
>
<div
class=
'no-req-label mt-5'
>
性别
</div>
<van-field
v-model=
'form.genderName'
readonly
placeholder=
'性别'
class=
'input-back mt-2 form-input'
/>
</div>
<div
v-if=
'medicalHistoryShow'
>
<div
class=
'label-title mt-5'
>
病史
</div>
<van-field
v-model=
'form.medicalHistoryName'
readonly
is-link
placeholder=
'请选择'
class=
'input-back mt-2 form-input'
:rules=
'rules.medicalHistoryName'
@
click=
'showMedicalHistory= true'
>
<template
#
input
>
<span
class=
'text-end'
v-if=
'form.medicalHistoryName'
>
{{
form
.
medicalHistoryName
}}
</span>
<span
class=
'text-end'
v-if=
'!form.medicalHistoryName'
style=
'color: #dfdfe1'
>
请选择
</span>
</
template
>
</van-field>
<van-popup
v-model:show=
'showMedicalHistory'
position=
'bottom'
>
<div
class=
'p-4'
style=
'height: 100%'
>
<div
class=
'flex justify-between items-center mb-4 pop-title'
>
<div
class=
'greyColor'
@
click=
'showMedicalHistory = false'
style=
'font-weight: 400'
>
取消
</div>
<div>
病史(可多选)
</div>
<div
class=
'blueColor'
@
click=
'medicalHistoryConfirm'
>
确定
</div>
</div>
<div
style=
'height: 80%;overflow: auto'
>
<CheckBtn
multiple
column-1
:options=
'medicalHistoryList'
v-model:value=
'form.medicalHistory'
:fieldNames=
"{text: 'name', value: 'value'}"
@
change=
'e => form.medicalHistory = checkboxReject(form.medicalHistory, [99])'
/>
</div>
</div>
</van-popup>
</div>
<div
v-if=
'familyHistoryShow'
>
<div
class=
'label-title mt-5'
>
家族史(可多选)
</div>
<van-field
class=
'checkbox-his'
>
<
template
#
input
>
<van-checkbox-group
v-model=
'form.familyHistory'
class=
'w-full'
>
<div
v-for=
'(item, index) in familyHistoryInfoList'
:key=
'item.value'
>
<div
@
click=
'toggle(index)'
class=
'form-input input-back mt-2 flex justify-between'
:style=
"
{borderRadius: form.familyHistory.includes(item.value)
&&
[1, 3, 5, 7].includes(item.value) ? '8px 8px 0px 0px ': '8px'}"
>
<div>
{{
item
.
name
}}
</div>
<div>
<van-checkbox
:name=
'item.value'
:ref=
'el => checkboxRefs[index] = el'
@
click
.
stop=
'toggle(index)'
/>
</div>
</div>
<div
v-for=
'(item2, index2) in familyHistoryList'
>
<div
v-if=
'form.familyHistory.includes(item.value) && item2.diseaseType == item.value'
class=
'relation-bis'
>
<div
class=
'top-title'
>
以下亲人若存在
{{
item2
.
diseaseTypeName
}}
病史,请填写发病年龄
</div>
<div
class=
'flex flex-wrap justify-between gap-x-2.5 gap-y-2.5'
>
<div
v-for=
'(item1,index1) in item2.relativeAgeList'
:key=
'index1'
style=
'width: 48%;'
>
<div>
<van-field
colon
label-width=
'42px'
v-model=
'item1.age'
:label=
'item1.relativeTypeName'
placeholder=
'请输入'
style=
'padding: 8px;border-radius: 4px'
>
<template
#
extra
>
<span
class=
'mr-2'
>
岁
</span>
</
template
>
</van-field>
</div>
</div>
</div>
</div>
</div>
</div>
</van-checkbox-group>
</template>
</van-field>
</div>
<div
v-if=
'highShow'
>
<div
class=
'label-title mt-5'
>
身高
</div>
<van-field
v-model=
'form.height'
clear-icon
placeholder=
'请输入10~300之间数字,允许1位小数'
class=
'input-back mt-2 form-input'
:rules=
'rules.height'
>
<
template
#
extra
>
<span
class=
'mr-2'
>
cm
</span>
</
template
>
</van-field>
</div>
<div
v-if=
'highShow'
>
<div
class=
'label-title mt-5'
>
体重
</div>
<van-field
v-model=
'form.weight'
clear-icon
placeholder=
'请输入20~500之间数字,允许2位小数'
class=
'input-back mt-2 form-input'
:rules=
'rules.weight'
>
<
template
#
extra
>
<span
class=
'mr-2'
>
kg
</span>
</
template
>
</van-field>
</div>
<div
v-if=
'highShow'
>
<div
class=
'no-req-label mt-5'
>
BMI
</div>
<van-field
v-model=
'form.bmi'
clear-icon
placeholder=
'请输入'
class=
'input-back mt-2 form-input'
>
<
template
#
extra
>
<span
class=
'mr-2'
>
kg/m²
</span>
</
template
>
</van-field>
</div>
<div
v-if=
'waistShow'
>
<div
class=
'label-title mt-5'
>
腰围
</div>
<van-field
v-model=
'form.waistline'
clear-icon
placeholder=
'请输入10~150之间数字,允许1位小数'
class=
'input-back mt-2 form-input'
:rules=
'rules.waistline'
>
<
template
#
extra
>
<span
class=
'mr-2'
>
cm
</span>
</
template
>
</van-field>
</div>
<div
v-if=
'womanMHShow'
>
<div
class=
'no-req-label mt-5'
>
女性病史
</div>
<van-field
v-model=
'form.femaleMedicalHistoryName'
readonly
is-link
placeholder=
'请选择'
class=
'input-back mt-2 form-input'
@
click=
'showFemaleMedicalHistory= true'
>
<
template
#
input
>
<span
class=
'text-end'
v-if=
'form.femaleMedicalHistoryName'
>
{{
form
.
femaleMedicalHistoryName
}}
</span>
<span
class=
'text-end'
v-if=
'!form.femaleMedicalHistoryName'
style=
'color: #dfdfe1'
>
请选择
</span>
</
template
>
</van-field>
<van-popup
v-model:show=
'showFemaleMedicalHistory'
position=
'bottom'
>
<div
class=
'p-4'
style=
'height: 100%'
>
<div
class=
'flex justify-between items-center mb-4 pop-title'
>
<div
class=
'greyColor'
@
click=
'showFemaleMedicalHistory = false'
style=
'font-weight: 400'
>
取消
</div>
<div>
女性病史(可多选)
</div>
<div
class=
'blueColor'
@
click=
'femaleMedicalHistoryConfirm'
>
确定
</div>
</div>
<div
style=
'height: 80%;overflow: auto'
>
<CheckBtn
multiple
column-1
:options=
"store.getDict('CP00127')"
v-model:value=
'form.femaleMedicalHistory'
:fieldNames=
"{text: 'name', value: 'value'}"
/>
</div>
</div>
</van-popup>
</div>
<div
v-if=
'medicationHShow'
>
<div
class=
'no-req-label mt-5'
>
用药史
</div>
<van-field
v-model=
'form.medicineHistoryName'
readonly
is-link
placeholder=
'请选择'
class=
'input-back mt-2 form-input'
@
click=
'showMedicineHistory= true'
>
<
template
#
input
>
<span
class=
'text-end'
v-if=
'form.medicineHistoryName'
>
{{
form
.
medicineHistoryName
}}
</span>
<span
class=
'text-end'
v-if=
'!form.medicineHistoryName'
style=
'color: #dfdfe1'
>
请选择
</span>
</
template
>
</van-field>
<van-popup
v-model:show=
'showMedicineHistory'
position=
'bottom'
>
<div
class=
'p-4'
style=
'height: 100%'
>
<div
class=
'flex justify-between items-center mb-4 pop-title'
>
<div
class=
'greyColor'
@
click=
'showMedicineHistory = false'
style=
'font-weight: 400'
>
取消
</div>
<div>
用药史(可多选)
</div>
<div
class=
'blueColor'
@
click=
'medicineHistoryConfirm'
>
确定
</div>
</div>
<div
style=
'height: 80%;overflow: auto'
>
<CheckBtn
multiple
column-1
:options=
"medicineHistoryList"
v-model:value=
'form.medicineHistory'
:fieldNames=
"{text: 'name', value: 'value'}"
/>
</div>
</div>
</van-popup>
</div>
<div
v-if=
'triglycerideShow'
>
<div
class=
'no-req-label mt-5'
>
高密度脂蛋白胆固醇
</div>
<van-field
v-model=
'form.hdlCholesterin'
clear-icon
placeholder=
'请输入'
class=
'input-back mt-2 form-input'
>
<
template
#
extra
>
<span
class=
'mr-2'
>
mmol/L
</span>
</
template
>
</van-field>
</div>
<div
v-if=
'triglycerideShow'
>
<div
class=
'no-req-label mt-5'
>
甘油三酯
</div>
<van-field
v-model=
'form.triglyceride'
clear-icon
placeholder=
'请输入'
class=
'input-back mt-2 form-input'
>
<
template
#
extra
>
<span
class=
'mr-2'
>
mmol/L
</span>
</
template
>
</van-field>
</div>
<div
v-if=
'triglycerideShow'
>
<div
class=
'no-req-label mt-5'
>
总胆固醇
</div>
<van-field
v-model=
'form.serumCholesterin'
clear-icon
placeholder=
'请输入'
class=
'input-back mt-2 form-input'
>
<
template
#
extra
>
<span
class=
'mr-2'
>
mmol/L
</span>
</
template
>
</van-field>
</div>
<div
v-if=
'babyMHShow'
>
<div
class=
'no-req-label mt-5'
>
有害物质接触或婴幼儿时期病史
</div>
<van-field
v-model=
'form.touchHarmfulName'
readonly
is-link
placeholder=
'请选择'
class=
'input-back mt-2 form-input'
@
click=
'showTouchHarmful= true'
>
<
template
#
input
>
<span
class=
'text-end'
v-if=
'form.touchHarmfulName'
>
{{
form
.
touchHarmfulName
}}
</span>
<span
class=
'text-end'
v-if=
'!form.touchHarmfulName'
style=
'color: #dfdfe1'
>
请选择
</span>
</
template
>
</van-field>
<van-popup
v-model:show=
'showTouchHarmful'
position=
'bottom'
>
<div
class=
'p-4'
style=
'height: 100%'
>
<div
class=
'flex justify-between items-center mb-4 pop-title'
>
<div
class=
'greyColor'
@
click=
'showTouchHarmful = false'
style=
'font-weight: 400'
>
取消
</div>
<div>
用药史(可多选)
</div>
<div
class=
'blueColor'
@
click=
'touchHarmfulConfirm'
>
确定
</div>
</div>
<div
style=
'height: 80%;overflow: auto'
>
<CheckBtn
multiple
column-1
:options=
"store.getDict('CP00130')"
v-model:value=
'form.touchHarmful'
:fieldNames=
"{text: 'name', value: 'value'}"
/>
</div>
</div>
</van-popup>
</div>
</van-form>
</div>
</template>
...
...
@@ -8,6 +316,7 @@
import
{
useStore
}
from
'@/doctor/store'
import
{
checkboxReject
}
from
'@/utils/common'
import
CheckBtn
from
'@/doctor/components/checkBtn/CheckBtn'
const
defaultForm
=
(
info
=
{})
=>
{
const
form
=
{
...
...
@@ -18,6 +327,7 @@ const defaultForm = (info = {}) => {
gender
:
undefined
,
genderName
:
undefined
,
medicalHistory
:
[],
medicalHistoryName
:
undefined
,
familyHistory
:
[],
relativeType
:
undefined
,
height
:
undefined
,
...
...
@@ -27,10 +337,12 @@ const defaultForm = (info = {}) => {
exerciseFrequency
:
undefined
,
everyExercise
:
undefined
,
femaleMedicalHistory
:
undefined
,
femaleMedicalHistoryName
:
undefined
,
hdlCholesterin
:
undefined
,
triglyceride
:
undefined
,
serumCholesterin
:
undefined
,
touchHarmful
:
undefined
,
touchHarmful
:
[],
touchHarmfulName
:
undefined
,
pressureOneSbp
:
undefined
,
pressureOneDbp
:
undefined
,
pressureTwoSbp
:
undefined
,
...
...
@@ -68,6 +380,7 @@ const defaultForm = (info = {}) => {
diseaseRelativeList
:
[],
mediumStrength
:
undefined
,
medicineHistory
:
[],
medicineHistoryName
:
undefined
,
informedConsent
:
undefined
,
isExerciseFive
:
undefined
}
...
...
@@ -79,6 +392,7 @@ const defaultForm = (info = {}) => {
return
form
}
export
default
{
components
:
{
CheckBtn
},
props
:
{
info
:
Object
,
diseaseArraysInfo
:
Array
...
...
@@ -86,6 +400,16 @@ export default {
data
()
{
return
{
store
:
useStore
(),
//病史弹窗
showMedicalHistory
:
false
,
//女性病史
showFemaleMedicalHistory
:
false
,
//用药史
showMedicineHistory
:
false
,
//有害物质接触或婴幼儿时期病史
showTouchHarmful
:
false
,
checkboxRefs
:
[],
form
:
{},
formRight
:
{
hypertensionHighItemSelect
:
[],
...
...
@@ -104,79 +428,82 @@ export default {
imageData
:
[],
rules
:
{
diseaseArrays
:
[{
required
:
true
,
message
:
'请选择'
}],
medicalHistory
:
[{
required
:
true
,
message
:
'请选择'
}],
medicalHistory
Name
:
[{
required
:
true
,
message
:
'请选择'
}],
familyHistory
:
[{
required
:
true
,
message
:
'请选择'
}],
height
:
[
{
required
:
true
,
message
:
'请输入'
},
{
validator
:
(
rule
,
value
,
callback
)
=>
{
// const regex = /^([1-9]\d{1}(?:\.\d{1})?|[1-2]\d{2}(?:\.\d{1})?|300)$/
validator
:
(
value
,
rule
)
=>
{
let
res
=
true
const
regex
=
/^
\d
+
(\.\d{1})?
$/
if
(
value
&&
!
(
Number
(
value
)
>=
10
&&
Number
(
value
)
<=
300
&&
regex
.
test
(
Number
(
value
))))
{
callback
(
'请输入10到300之间的数字,允许一位小数'
)
}
else
{
callback
()
}
res
=
false
}
return
res
},
message
:
`请输入10到300之间的数字,允许一位小数`
}
],
weight
:
[
{
required
:
true
,
message
:
'请输入'
},
{
validator
:
(
rule
,
value
,
callback
)
=>
{
// const regex = /^([2-9]\d{1}(?:\.\d{1,2})?|[1-4]\d{2}(?:\.\d{1,2})?|500)$/
validator
:
(
value
,
rule
)
=>
{
let
res
=
true
const
regex
=
/^
\d
+
(\.\d{1,2})?
$/
if
(
value
&&
!
(
Number
(
value
)
>=
20
&&
Number
(
value
)
<=
500
&&
regex
.
test
(
Number
(
value
))))
{
callback
(
'请输入20到500之间的数字,允许两位小数'
)
}
else
{
callback
()
}
res
=
false
}
return
res
},
message
:
`请输入20~500之间数字,允许2位小数`
}
],
waistline
:
[
{
required
:
true
,
message
:
'请输入'
},
{
validator
:
(
rule
,
value
,
callback
)
=>
{
// const regex = /^([1-9]\d{1}(?:\.\d{1})?|[1][0-4]\d(?:\.\d{1})?|150)$/
validator
:
(
value
,
rule
)
=>
{
let
res
=
true
const
regex
=
/^
\d
+
(\.\d{1})?
$/
if
(
value
&&
!
(
Number
(
value
)
>=
10
&&
Number
(
value
)
<=
150
&&
regex
.
test
(
Number
(
value
))))
{
callback
(
'请输入10到150之间的数字,允许一位小数'
)
}
else
{
callback
()
}
res
=
false
}
return
res
},
message
:
`请输入10~150之间数字,允许1位小数`
}
],
hdlCholesterin
:
[{
validator
:
(
rule
,
value
,
callback
)
=>
{
validator
:
(
value
,
rule
)
=>
{
const
regex
=
/^
\d
+
(\.\d{1,2})?
$/
let
res
=
true
if
(
value
&&
!
regex
.
test
(
value
))
{
callback
(
'请输入正确的数字'
)
}
else
{
callback
()
}
res
=
false
}
return
res
},
message
:
`请输入正确的数字`
}],
triglyceride
:
[{
validator
:
(
rule
,
value
,
callback
)
=>
{
validator
:
(
value
,
rule
)
=>
{
const
regex
=
/^
\d
+
(\.\d{1,2})?
$/
let
res
=
true
if
(
value
&&
!
regex
.
test
(
value
))
{
callback
(
'请输入正确的数字'
)
}
else
{
callback
()
}
res
=
false
}
return
res
},
message
:
`请输入正确的数字`
}],
serumCholesterin
:
[{
validator
:
(
rule
,
value
,
callback
)
=>
{
validator
:
(
value
,
rule
)
=>
{
const
regex
=
/^
\d
+
(\.\d{1,2})?
$/
let
res
=
true
if
(
value
&&
!
regex
.
test
(
value
))
{
callback
(
'请输入正确的数字'
)
}
else
{
callback
()
}
res
=
false
}
return
res
},
message
:
`请输入正确的数字`
}],
exerciseFrequency
:
[{
required
:
true
,
message
:
'请选择'
}],
dietaryHabit
:
[{
required
:
true
,
message
:
'请选择'
}],
...
...
@@ -386,7 +713,7 @@ export default {
//默认为无
let
result
=
[]
let
res
=
[
99
]
let
list
=
this
.
$d
ict
(
'CP00125'
)
let
list
=
this
.
store
.
getD
ict
(
'CP00125'
)
const
{
diseaseArrays
=
[]
}
=
this
.
form
if
(
diseaseArrays
.
includes
(
1
))
{
let
arr
=
[
1
,
2
,
7
]
...
...
@@ -452,7 +779,7 @@ export default {
//默认为无
let
result
=
[]
let
res
=
[
9
]
let
list
=
this
.
$d
ict
(
'CP00149'
)
let
list
=
this
.
store
.
getD
ict
(
'CP00149'
)
const
{
diseaseArrays
=
[]
}
=
this
.
form
if
(
diseaseArrays
.
includes
(
1
))
{
let
arr
=
[
2
]
...
...
@@ -518,7 +845,7 @@ export default {
//默认为无
let
result
=
[]
let
res
=
[]
let
list
=
this
.
$d
ict
(
'CP00129'
)
let
list
=
this
.
store
.
getD
ict
(
'CP00129'
)
const
{
diseaseArrays
=
[]
}
=
this
.
form
if
(
diseaseArrays
.
includes
(
2
))
{
let
arr
=
[
1
,
2
,
3
,
4
]
...
...
@@ -629,7 +956,7 @@ export default {
this
.
cleanMedicalHistory
()
this
.
cleanFamilyHistory
()
this
.
cleanMedicineHistory
()
this
.
changeFamilyHis
(
this
.
form
.
familyHistory
)
this
.
changeFamilyHis
()
},
immediate
:
true
}
...
...
@@ -830,8 +1157,8 @@ export default {
}
}
},
changeFamilyHis
(
e
=
[]
)
{
this
.
form
.
familyHistory
=
this
.
checkboxReject
(
this
.
form
.
familyHistory
,
e
,
[
9
])
changeFamilyHis
()
{
this
.
form
.
familyHistory
=
this
.
checkboxReject
(
this
.
form
.
familyHistory
,
[
9
])
let
temp
=
[]
this
.
form
.
familyHistory
.
forEach
((
item
,
index
)
=>
{
if
(
item
==
1
||
item
==
3
||
item
==
5
||
item
==
7
)
{
...
...
@@ -839,17 +1166,47 @@ export default {
let
base
=
this
.
familyHistoryList
.
filter
(
item1
=>
item1
.
diseaseType
==
item
)
||
[]
let
obj
=
{
id_
:
index
+
1
,
diseaseTypeName
:
`
${
name
}
-亲人类型
`
,
diseaseTypeName
:
`
${
name
}
`
,
diseaseType
:
item
,
selectRelativeType
:
[],
checkRequired
:
false
,
relativeAgeList
:
[
{
relativeTypeName
:
"父亲"
,
relativeType
:
1
,
gender
:
1
,
age
:
undefined
,
inputRequired
:
false
},
{
relativeTypeName
:
"母亲"
,
relativeType
:
2
,
gender
:
2
,
age
:
undefined
,
inputRequired
:
false
},
{
relativeTypeName
:
"兄弟"
,
relativeType
:
3
,
gender
:
1
,
age
:
undefined
,
inputRequired
:
false
},
{
relativeTypeName
:
"姐妹"
,
relativeType
:
4
,
gender
:
2
,
age
:
undefined
,
inputRequired
:
false
},
{
relativeTypeName
:
"儿子"
,
relativeType
:
5
,
gender
:
1
,
age
:
undefined
,
inputRequired
:
false
},
{
relativeTypeName
:
"女儿"
,
relativeType
:
6
,
gender
:
2
,
age
:
undefined
,
inputRequired
:
false
}
{
relativeTypeName
:
'父亲'
,
relativeType
:
1
,
gender
:
1
,
age
:
undefined
,
inputRequired
:
false
},
{
relativeTypeName
:
'母亲'
,
relativeType
:
2
,
gender
:
2
,
age
:
undefined
,
inputRequired
:
false
},
{
relativeTypeName
:
'兄弟'
,
relativeType
:
3
,
gender
:
1
,
age
:
undefined
,
inputRequired
:
false
},
{
relativeTypeName
:
'姐妹'
,
relativeType
:
4
,
gender
:
2
,
age
:
undefined
,
inputRequired
:
false
},
{
relativeTypeName
:
'儿子'
,
relativeType
:
5
,
gender
:
1
,
age
:
undefined
,
inputRequired
:
false
},
{
relativeTypeName
:
'女儿'
,
relativeType
:
6
,
gender
:
2
,
age
:
undefined
,
inputRequired
:
false
}
]
}
if
(
base
.
length
)
{
...
...
@@ -862,10 +1219,10 @@ export default {
},
calculateBMI
()
{
if
(
this
.
form
.
weight
&&
this
.
form
.
height
)
{
let
res
=
this
.
form
.
weight
/
(
this
.
form
.
height
*
this
.
form
.
height
/
100
/
100
)
;
this
.
form
.
bmi
=
parseFloat
(
res
.
toFixed
(
1
))
;
let
res
=
this
.
form
.
weight
/
(
this
.
form
.
height
*
this
.
form
.
height
/
100
/
100
)
this
.
form
.
bmi
=
parseFloat
(
res
.
toFixed
(
1
))
}
else
{
this
.
form
.
bmi
=
null
;
this
.
form
.
bmi
=
null
}
},
hypertensionHigh
()
{
...
...
@@ -890,8 +1247,8 @@ export default {
mentalTension
}
=
this
.
form
let
list
=
[]
if
(((
pressureOneSbp
>=
120
)
||
(
pressureTwoSbp
>=
120
))
||
((
pressureOneDbp
>=
80
)
||
(
pressureTwoDbp
>=
80
))
if
(((
pressureOneSbp
>=
120
)
||
(
pressureTwoSbp
>=
120
))
||
((
pressureOneDbp
>=
80
)
||
(
pressureTwoDbp
>=
80
))
)
{
list
.
push
(
1
)
}
...
...
@@ -1001,7 +1358,7 @@ export default {
//冠心病高危选择
coronaryHigh
()
{
let
list
=
[]
const
{
currentAge
,
gender
,
isSmoking
,
medicalHistory
=
[],
familyHistory
=
[]
}
=
this
.
form
const
{
currentAge
,
gender
,
isSmoking
,
medicalHistory
=
[],
familyHistory
=
[]
}
=
this
.
form
if
(
gender
==
1
)
{
list
.
push
(
2
)
if
(
currentAge
>=
45
)
{
...
...
@@ -1361,26 +1718,26 @@ export default {
//家族史 非空校验
familyHistoryReq
()
{
let
flag
=
0
this
.
familyHistoryList
.
forEach
(
item
=>
{
let
list
=
item
.
selectRelativeType
||
[]
if
(
!
item
.
selectRelativeType
.
length
)
{
item
.
checkRequired
=
true
flag
++
}
else
{
item
.
checkRequired
=
false
}
item
.
relativeAgeList
.
forEach
(
item1
=>
{
if
(
list
.
includes
(
item1
.
relativeType
)
&&
!
item1
.
age
)
{
item1
.
inputRequired
=
true
flag
++
}
else
{
item1
.
inputRequired
=
false
}
if
(
!
list
.
includes
(
item1
.
relativeType
))
{
item1
.
age
=
undefined
}
})
})
//
this.familyHistoryList.forEach(item => {
//
let list = item.selectRelativeType || []
//
if (!item.selectRelativeType.length) {
//
item.checkRequired = true
//
flag++
//
} else {
//
item.checkRequired = false
//
}
//
item.relativeAgeList.forEach(item1 => {
//
if (list.includes(item1.relativeType) && !item1.age) {
//
item1.inputRequired = true
//
flag++
//
} else {
//
item1.inputRequired = false
//
}
//
if (!list.includes(item1.relativeType)) {
//
item1.age = undefined
//
}
//
})
//
})
return
flag
},
// 饮酒种类变化
...
...
@@ -1390,7 +1747,7 @@ export default {
const
item
=
this
.
drinkKindCapacityList
.
find
(
i
=>
i
.
drinkKind
==
e
)
||
{}
return
{
drinkKind
:
e
,
drinkKindName
:
this
.
$d
ictValue
(
'CP00133'
,
e
),
drinkKindName
:
this
.
store
.
getD
ictValue
(
'CP00133'
,
e
),
drinkCapacity
:
item
.
drinkCapacity
||
0
}
})
...
...
@@ -1401,6 +1758,60 @@ export default {
this
.
drinkKindCapacityList
=
[]
}
},
//病史弹窗确认选择
medicalHistoryConfirm
()
{
let
res
=
[]
this
.
medicalHistoryList
.
forEach
(
item
=>
{
let
selected
=
this
.
form
.
medicalHistory
.
filter
(
i
=>
i
==
item
.
value
)
if
(
selected
&&
selected
.
length
)
{
res
.
push
(
item
.
name
)
}
})
this
.
form
.
medicalHistoryName
=
res
.
join
()
this
.
showMedicalHistory
=
false
},
//女性病史弹窗确认选择
femaleMedicalHistoryConfirm
()
{
let
res
=
[]
this
.
store
.
getDict
(
'CP00127'
).
forEach
(
item
=>
{
let
selected
=
this
.
form
.
femaleMedicalHistory
.
filter
(
i
=>
i
==
item
.
value
)
if
(
selected
&&
selected
.
length
)
{
res
.
push
(
item
.
name
)
}
})
this
.
form
.
femaleMedicalHistoryName
=
res
.
join
()
this
.
showFemaleMedicalHistory
=
false
},
//用药史弹窗确认选择
medicineHistoryConfirm
()
{
let
res
=
[]
this
.
medicineHistoryList
.
forEach
(
item
=>
{
let
selected
=
this
.
form
.
medicineHistory
.
filter
(
i
=>
i
==
item
.
value
)
if
(
selected
&&
selected
.
length
)
{
res
.
push
(
item
.
name
)
}
})
this
.
form
.
medicineHistoryName
=
res
.
join
()
this
.
showMedicineHistory
=
false
},
//有害物质接触或婴幼儿时期病史弹窗确认选择
touchHarmfulConfirm
()
{
let
res
=
[]
this
.
store
.
getDict
(
'CP00130'
).
forEach
(
item
=>
{
let
selected
=
this
.
form
.
touchHarmful
.
filter
(
i
=>
i
==
item
.
value
)
if
(
selected
&&
selected
.
length
)
{
res
.
push
(
item
.
name
)
}
})
this
.
form
.
touchHarmfulName
=
res
.
join
()
this
.
showTouchHarmful
=
false
},
//家族史多选
toggle
(
index
)
{
this
.
checkboxRefs
[
index
].
toggle
()
this
.
changeFamilyHis
()
},
//提交
submit
()
{
return
new
Promise
((
resolve
,
reject
)
=>
{
...
...
@@ -1447,7 +1858,7 @@ export default {
strokeHighItem
:
'arrToStr'
,
pulmonaryHighItem
:
'arrToStr'
,
nephrosisHighItem
:
'arrToStr'
,
dyslipemiaHighItem
:
'arrToStr'
,
dyslipemiaHighItem
:
'arrToStr'
})
)
}).
catch
((
e
)
=>
{
...
...
@@ -1455,7 +1866,7 @@ export default {
reject
(
e
)
})
})
}
,
}
}
...
...
@@ -1463,5 +1874,77 @@ export default {
</
script
>
<
style
lang=
'less'
scoped
>
.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;
}
}
.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;
}
.checkbox-his {
padding: 0px !important;
margin-top: 4px;
}
.relation-bis {
background: #F5F5F5;
padding: 8px 12px;
border-radius: 0px 0px 8px 8px;
.top-title {
color: #8C8C8C;
font-size: 12px;
line-height: 24px;
margin-bottom: 4px;
}
}
:deep(.van-popup) {
height: 50% !important;
}
:deep(.van-cell-group--inset) {
overflow: visible;
}
:deep(.van-cell) {
overflow: visible;
}
:deep(.van-cell:after) {
border-bottom: 0px;
}
</
style
>
src/doctor/screening/second/SecondForm.vue
View file @
01dd7a6c
<
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"
>
<
archive-common
:info=
'info'
<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'
></archive-common>
<DiseaseSelect
:infoValue=
'info.diseaseArrays'
v-show=
'step == 2'
ref=
'diseaseInfo'
></DiseaseSelect>
></BaseInfo>
<form-cont
:info=
'info'
:disease-arrays-info=
'diseaseArraysInfo'
v-show=
'step ==
3
'
v-show=
'step ==
2
'
ref=
'formInfo'
></form-cont>
<result
:residentInfoId=
"residentInfoId"
v-show=
'step ==
4
'
<result
:residentInfoId=
'residentInfoId'
v-show=
'step ==
3
'
></result>
</div>
<div
class=
'bottom-small-line'
></div>
...
...
@@ -36,16 +32,7 @@
@
click=
'toNext(3)'
>
下一步
</van-button>
</div>
<div
class=
'px-5 flex align-center justify-around'
v-if=
'step == 3'
>
<van-button
type=
'primary'
round
plain
style=
'width: 44%'
@
click=
'toNext(2)'
>
上一步
</van-button>
<van-button
type=
'primary'
round
style=
'width: 44%'
@
click=
'toNext(4)'
>
下一步
</van-button>
</div>
<div
class=
'px-5 grow flex flex-col justify-end'
v-if=
'step == 4'
>
<div
class=
'px-5 grow flex flex-col justify-end'
v-if=
'step == 3'
>
<van-button
type=
'primary'
block
round
@
click=
'onsubmit'
>
提交
</van-button>
...
...
@@ -61,9 +48,14 @@ import { fetchCurrencyById, getChronicResidentsId } from '@/api/doctor/generalFU
import
FormCont
from
'@/doctor/screening/second/FormCont'
import
Result
from
'@/doctor/screening/second/Result'
import
DiseaseSelect
from
'@/doctor/screening/second/DiseaseSelect'
import
BaseInfo
from
'@/doctor/screening/second/BaseInfo'
import
{
fetchDataHandle
}
from
'@/utils/common'
import
{
getLastScreen
,
secondScreenDetail
}
from
'@/api/doctor/screening'
import
{
showToast
}
from
'vant'
export
default
{
components
:
{
BaseInfo
,
DiseaseSelect
,
Result
,
FormCont
,
...
...
@@ -74,6 +66,7 @@ export default {
return
{
step
:
1
,
info
:
{},
residentInfo
:
{},
diseaseArraysInfo
:
[]
}
},
...
...
@@ -92,14 +85,19 @@ export default {
async
init
()
{
this
.
info
=
{}
if
(
this
.
id
)
{
const
res
=
await
fetchCurrencyById
({
id
:
this
.
id
})
const
res
=
await
secondScreenDetail
({
id
:
this
.
id
})
let
result
=
res
.
data
||
{}
const
{
residentsRecord
=
{}
}
=
result
const
{
id
,
...
others
}
=
residentsRecord
let
obj
=
this
.
dataHandle
(
result
)
this
.
info
=
{
...
others
,
personId
:
id
,
...
result
...
obj
}
this
.
residentInfo
=
{
...
others
,
personId
:
id
,
}
}
else
{
const
res
=
await
getChronicResidentsId
(
this
.
residentInfoId
)
...
...
@@ -115,21 +113,67 @@ export default {
updated
,
...
others
}
=
res
.
data
this
.
residentInfo
=
{
personId
:
id
,
...
others
}
this
.
info
=
{
personId
:
id
,
...
others
,
...
others
}
}
},
//获取上一次筛查数据
getLastData
()
{
let
par
=
{
residentInfoId
:
this
.
residentInfoId
}
getLastScreen
(
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
)
{
await
this
.
$refs
.
baseInfo
.
onSubmit
()
let
obj
=
await
this
.
$refs
.
baseInfo
.
onSubmit
()
this
.
diseaseArraysInfo
=
obj
.
diseaseArrays
||
[]
}
if
(
val
==
3
)
{
this
.
diseaseArraysInfo
=
await
this
.
$refs
.
diseaseInfo
.
onSubmit
()
||
[]
}
if
(
val
==
4
)
{
await
this
.
$refs
.
formInfo
.
onSubmit
()
}
this
.
step
=
val
...
...
@@ -138,7 +182,6 @@ export default {
onsubmit
()
{
},
onBack
()
{
if
(
this
.
step
==
1
)
{
this
.
$router
.
back
()
...
...
@@ -150,6 +193,6 @@ export default {
}
</
script
>
<
style
lang=
"less"
scoped
>
<
style
lang=
'less'
scoped
>
</
style
>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment