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
2a5b3437
Commit
2a5b3437
authored
Jan 02, 2025
by
songrui
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
初筛 多选组件修改
parent
828bc0fc
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
75 additions
and
11 deletions
+75
-11
CheckBtn.vue
src/doctor/components/checkBtn/CheckBtn.vue
+10
-1
Instpect.vue
src/doctor/diagnose/common/Instpect.vue
+18
-2
FormCont.vue
src/doctor/screening/first/FormCont.vue
+47
-8
No files found.
src/doctor/components/checkBtn/CheckBtn.vue
View file @
2a5b3437
<
template
>
<div
class=
"
flex flex-wrap
check-btn"
>
<div
class=
"check-btn"
>
<div
v-for=
"item in options"
:key=
"item[fieldNames.value]"
@
click=
"onClick(item)"
:class=
"['py-2 px-3 shrink-0 check-btn-item',
...
...
@@ -103,6 +103,8 @@ export default {
<
style
lang=
"less"
scoped
>
.check-btn {
display: flex;
flex-wrap: wrap;
row-gap: 10px;
column-gap: 10px;
.check-btn-item {
...
...
@@ -145,7 +147,14 @@ export default {
color: var(--van-primary-color);
}
}
// 圆角
.check-btn[round] {
.check-btn-item {
border-radius: 30px;
}
}
// 每行排列个数
.check-btn[column-3] {
.check-btn-item {
width: calc(33.3% - 6.6px);
...
...
src/doctor/diagnose/common/Instpect.vue
View file @
2a5b3437
<
template
>
<
div
class=
"instpect-common"
>
<
van-form
ref=
'form'
class=
"instpect-common"
>
<div
class=
'doc-form-label'
required
>
检验项目
</div>
<van-field
is-link
:modelValue=
'inspectName'
...
...
@@ -97,7 +97,7 @@
:dict=
"selectOption.dict"
@
change=
"onSelectInputConfirm"
></InputSelect>
</div>
</
div
>
</
van-form
>
</template>
<
script
>
...
...
@@ -183,6 +183,22 @@ export default {
console
.
log
(
this
.
viewData
)
})
},
submit
()
{
return
new
Promise
((
resolve
,
reject
)
=>
{
this
.
$refs
.
form
.
validate
().
then
(()
=>
{
const
inspect
=
this
.
inspect
.
join
(
','
)
const
image
=
this
.
image
let
data
=
[]
this
.
viewData
.
forEach
(
e
=>
{
data
=
data
.
concat
(
e
.
items
)
})
console
.
log
(
data
,
inspect
,
image
)
resolve
({
inspect
,
data
,
image
})
}).
catch
((
e
)
=>
{
reject
(
e
)
})
})
},
inspectConfirm
()
{
this
.
inspectName
=
this
.
store
.
getDict
(
'CP00100'
).
map
(
e
=>
{
return
this
.
inspect
.
includes
(
e
.
value
)
?
e
.
name
:
''
...
...
src/doctor/screening/first/FormCont.vue
View file @
2a5b3437
...
...
@@ -12,18 +12,24 @@
@
click=
"showMedical = true"
/>
<van-popup
v-model:show=
"showMedical"
position=
"bottom"
>
<div
class=
"pt-4 popup-checkbox"
>
<div
class=
"pt-4 p
b-4 p
opup-checkbox"
>
<div
class=
"flex justify-between pb-2"
>
<button
class=
"van-picker__cancel van-haptics-feedback"
@
click=
"showMedical = false"
>
取消
</button>
<span
class=
"text-16"
>
既往史(可多选)
</span>
<button
class=
"van-picker__confirm van-haptics-feedback"
@
click=
"medicalConfirm"
>
确认
</button>
</div>
<div
class=
"bottom-small-line"
></div>
<van-checkbox-group
v-model=
"form.medicalHistory"
class=
"px-4 pb-4 pt-2"
>
<
!--
<
van-checkbox-group
v-model=
"form.medicalHistory"
class=
"px-4 pb-4 pt-2"
>
<van-checkbox
v-for=
"(item, index) in store.getDict('CP00118')"
:key=
"index"
@
click=
"medicalChange"
:name=
"item.value"
class=
"mb-3"
>
{{
item
.
name
}}
</van-checkbox>
</van-checkbox-group>
</van-checkbox-group>
-->
<CheckBtn
v-model:value=
"form.medicalHistory"
:options=
"medicalHistoryArray"
multiple
round
column-1
class=
"py-3 px-4"
@
change=
"medicalChange"
/>
</div>
</van-popup>
...
...
@@ -40,17 +46,24 @@
@
click=
"showFamily = true"
/>
<van-popup
v-model:show=
"showFamily"
position=
"bottom"
>
<div
class=
"pt-4 popup-checkbox"
>
<div
class=
"flex justify-between"
>
<div
class=
"pt-4 p
b-4 p
opup-checkbox"
>
<div
class=
"flex justify-between
pb-2
"
>
<button
class=
"van-picker__cancel van-haptics-feedback"
@
click=
"showFamily = false"
>
取消
</button>
<span
class=
"text-16"
>
家族史(可多选)
</span>
<button
class=
"van-picker__confirm van-haptics-feedback"
@
click=
"familyConfirm"
>
确认
</button>
</div>
<van-checkbox-group
v-model=
"form.familyHistory"
class=
"p-4"
>
<div
class=
"bottom-small-line"
></div>
<!--
<van-checkbox-group
v-model=
"form.familyHistory"
class=
"p-4"
>
<van-checkbox
v-for=
"(item, index) in store.getDict('CP00167').filter(e => e.value != 7)"
:key=
"index"
@
click=
"familyChange"
:name=
"item.value"
class=
"mb-3"
>
{{
item
.
name
}}
</van-checkbox>
</van-checkbox-group>
</van-checkbox-group>
-->
<CheckBtn
v-model:value=
"form.familyHistory"
:options=
"familyHistoryArray"
multiple
round
column-1
class=
"py-3 px-4"
@
change=
"familyChange"
/>
</div>
</van-popup>
...
...
@@ -340,6 +353,7 @@ import { useStore } from '@/doctor/store'
import
{
checkboxReject
,
fetchDataHandle
}
from
'@/utils/common.js'
import
dayjs
from
'dayjs'
import
DoctorInfo
from
'./DoctorInfo.vue'
import
CheckBtn
from
'@/doctor/components/checkBtn/CheckBtn.vue'
import
{
BloodPressurePanel
,
BloodPressureBt
}
from
'@/doctor/components/bloodPressure/index.js'
const
defaultForm
=
(
info
=
{})
=>
{
...
...
@@ -397,6 +411,7 @@ const defaultForm = (info = {}) => {
}
export
default
{
components
:
{
CheckBtn
,
DoctorInfo
,
BloodPressurePanel
,
BloodPressureBt
...
...
@@ -451,6 +466,30 @@ export default {
bmi
()
{
const
{
height
,
weight
}
=
this
.
form
return
height
&&
weight
?
(
weight
/
(
height
/
100
*
height
/
100
)).
toFixed
(
2
)
:
undefined
},
// 既往史
medicalHistoryArray
()
{
const
result
=
[]
this
.
store
.
getDict
(
'CP00118'
).
forEach
(
e
=>
{
if
(
e
.
value
==
9
)
{
result
.
unshift
(
e
)
return
}
result
.
push
(
e
)
})
return
result
},
// 家族史
familyHistoryArray
()
{
const
result
=
[]
this
.
store
.
getDict
(
'CP00167'
).
forEach
(
e
=>
{
if
(
e
.
value
==
9
)
{
result
.
unshift
(
e
)
return
}
result
.
push
(
e
)
})
return
result
}
},
methods
:
{
...
...
@@ -471,7 +510,7 @@ export default {
}).
filter
(
e
=>
e
).
join
(
'、'
)
this
.
showMedical
=
false
},
medicalChange
(
e
)
{
medicalChange
(
val
)
{
this
.
form
.
medicalHistory
=
checkboxReject
(
this
.
form
.
medicalHistory
,
[
9
])
},
// 家族史
...
...
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