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
5cfb7277
Commit
5cfb7277
authored
Jan 02, 2025
by
gengchunlei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
医生端小程序 v1.2 1、复筛表单
parent
11c470a7
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
151 additions
and
8 deletions
+151
-8
DiseaseSelect.vue
src/doctor/screening/second/DiseaseSelect.vue
+123
-0
FormCont.vue
src/doctor/screening/second/FormCont.vue
+0
-0
SecondForm.vue
src/doctor/screening/second/SecondForm.vue
+28
-8
No files found.
src/doctor/screening/second/DiseaseSelect.vue
0 → 100644
View file @
5cfb7277
<
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'
import
{
showToast
}
from
'vant'
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
>
src/doctor/screening/second/FormCont.vue
View file @
5cfb7277
This diff is collapsed.
Click to expand it.
src/doctor/screening/second/SecondForm.vue
View file @
5cfb7277
...
...
@@ -6,12 +6,18 @@
v-show=
'step ==1'
ref=
'baseInfo'
></archive-common>
<DiseaseSelect
:infoValue=
'info.diseaseArrays'
v-show=
'step == 2'
ref=
'diseaseInfo'
></DiseaseSelect>
<form-cont
:info=
'info'
v-show=
'step == 2'
:disease-arrays-info=
'diseaseArraysInfo'
v-show=
'step == 3'
ref=
'formInfo'
></form-cont>
<result
:residentInfoId=
"residentInfoId"
v-show=
'step ==
3
'
v-show=
'step ==
4
'
></result>
</div>
<div
class=
'bottom-small-line'
></div>
...
...
@@ -30,8 +36,16 @@
@
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 ==
2
'
>
<div
class=
'px-5 grow flex flex-col justify-end'
v-if=
'step ==
4
'
>
<van-button
type=
'primary'
block
round
@
click=
'onsubmit'
>
提交
</van-button>
...
...
@@ -46,9 +60,11 @@ import ArchiveCommon from '@/doctor/components/archiveCommon/archiveCommon'
import
{
fetchCurrencyById
,
getChronicResidentsId
,
getResidentWX
}
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'
export
default
{
components
:
{
DiseaseSelect
,
Result
,
FormCont
,
ArchiveCommon
,
...
...
@@ -57,7 +73,8 @@ export default {
data
()
{
return
{
step
:
1
,
info
:
{}
info
:
{},
diseaseArraysInfo
:
[]
}
},
computed
:
{
...
...
@@ -107,11 +124,14 @@ export default {
async
toNext
(
val
)
{
this
.
$refs
.
all
.
scrollTo
(
0
,
0
)
if
(
val
==
2
)
{
this
.
firstForm
=
await
this
.
$refs
.
baseInfo
.
onSubmit
()
await
this
.
$refs
.
baseInfo
.
onSubmit
()
}
if
(
val
==
3
)
{
this
.
diseaseArraysInfo
=
await
this
.
$refs
.
diseaseInfo
.
onSubmit
()
||
[]
}
if
(
val
==
4
)
{
await
this
.
$refs
.
formInfo
.
onSubmit
()
}
// if (val == 3) {
// await this.$refs.formInfo.onSubmit()
// }
this
.
step
=
val
},
//提交所有表单
...
...
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