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
8fa86e09
Commit
8fa86e09
authored
Jul 12, 2024
by
songrui
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
简易筛查表单接口对接
parent
b186fe49
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
31 additions
and
9 deletions
+31
-9
screening.js
src/tumour/api/screening.js
+4
-0
config.js
src/tumour/screening/simple/config.js
+3
-2
Index.vue
src/tumour/screening/simple/form/Index.vue
+8
-2
Question.vue
src/tumour/screening/simple/form/Question.vue
+15
-4
base.vue
src/tumour/screening/simple/form/base.vue
+1
-1
No files found.
src/tumour/api/screening.js
View file @
8fa86e09
import
{
fetchBase
}
from
'./fetch.js'
import
{
fetchBase
}
from
'./fetch.js'
// 简易筛查 新增
export
function
addSimpleScreen
(
params
,
loading
=
true
)
{
return
fetchBase
({
url
:
`/v1/h5-app/add-simple-screen`
,
body
:
params
,
loading
})
}
src/tumour/screening/simple/config.js
View file @
8fa86e09
...
@@ -455,8 +455,9 @@ export function getQuestion(key, info) {
...
@@ -455,8 +455,9 @@ export function getQuestion(key, info) {
remark
:
'建议进一步检查前列腺特异性抗原、前列腺特异性抗原正常—定期复查、前列腺特异性抗原升—高前列腺磁共振及穿刺活检'
remark
:
'建议进一步检查前列腺特异性抗原、前列腺特异性抗原正常—定期复查、前列腺特异性抗原升—高前列腺磁共振及穿刺活检'
}
}
}
}
const
result
=
questions
[
'q'
+
key
]
const
q
=
questions
[
'q'
+
key
]
return
result
?
new
Question
(
result
,
info
)
:
{}
const
result
=
q
?
new
Question
(
q
,
info
)
:
{}
return
{
...
result
,
key
}
}
}
class
Question
{
class
Question
{
...
...
src/tumour/screening/simple/form/Index.vue
View file @
8fa86e09
...
@@ -35,7 +35,8 @@ export default {
...
@@ -35,7 +35,8 @@ export default {
// 操作步骤
// 操作步骤
setp
:
1
,
setp
:
1
,
// 步骤1中选中的癌种
// 步骤1中选中的癌种
species
:
[]
species
:
[],
baseInfo
:
{}
}
}
},
},
computed
:
{
computed
:
{
...
@@ -53,13 +54,18 @@ export default {
...
@@ -53,13 +54,18 @@ export default {
onNext
()
{
onNext
()
{
this
.
$refs
.
base
.
submit
().
then
(
res
=>
{
this
.
$refs
.
base
.
submit
().
then
(
res
=>
{
console
.
log
(
res
)
console
.
log
(
res
)
this
.
baseInfo
=
res
this
.
species
=
res
.
species
||
[]
this
.
species
=
res
.
species
||
[]
this
.
setp
=
2
this
.
setp
=
2
})
})
},
},
submit
()
{
submit
()
{
this
.
$refs
.
question
.
submit
().
then
(
res
=>
{
this
.
$refs
.
question
.
submit
().
then
(
res
=>
{
console
.
log
(
res
)
const
result
=
{
...
this
.
baseInfo
,
details
:
res
}
console
.
log
(
result
)
})
})
}
}
...
...
src/tumour/screening/simple/form/Question.vue
View file @
8fa86e09
...
@@ -8,7 +8,7 @@
...
@@ -8,7 +8,7 @@
:label=
"q.title"
:label=
"q.title"
:rules=
"[
{ required: true, message: '请选择' }]">
:rules=
"[
{ required: true, message: '请选择' }]">
<template
#
input
>
<template
#
input
>
<van-radio-group
v-model=
"q.value"
@
change=
"onChange($event, item)"
>
<van-radio-group
v-model=
"q.value"
@
change=
"onChange($event, item)"
class=
"pl-2"
>
<van-radio
v-for=
"a in q.answer.cont"
shape=
"dot"
class=
"mt-2"
<van-radio
v-for=
"a in q.answer.cont"
shape=
"dot"
class=
"mt-2"
:name=
"a.value"
:key=
"a.value"
>
{{
a
.
name
}}
</van-radio>
:name=
"a.value"
:key=
"a.value"
>
{{
a
.
name
}}
</van-radio>
</van-radio-group>
</van-radio-group>
...
@@ -65,15 +65,26 @@ export default {
...
@@ -65,15 +65,26 @@ export default {
console
.
log
(
this
.
formData
)
console
.
log
(
this
.
formData
)
},
},
onChange
(
val
,
item
)
{
onChange
(
val
,
item
)
{
console
.
log
(
val
,
item
)
//
console.log(val, item)
console
.
log
(
'高危判断'
,
item
.
check
())
//
console.log('高危判断', item.check())
item
.
highRisk
=
item
.
check
()
?
1
:
2
item
.
highRisk
=
item
.
check
()
?
1
:
2
},
},
submit
()
{
submit
()
{
return
new
Promise
((
resolve
)
=>
{
return
new
Promise
((
resolve
)
=>
{
this
.
$refs
.
form
.
validate
().
then
(
res
=>
{
this
.
$refs
.
form
.
validate
().
then
(
res
=>
{
console
.
log
(
res
,
this
.
formData
)
console
.
log
(
res
,
this
.
formData
)
resolve
(
this
.
formData
)
const
result
=
{}
this
.
formData
.
forEach
(
e
=>
{
const
issue
=
{}
e
.
issue
.
forEach
(
i
=>
{
issue
[
i
.
key
]
=
i
.
value
})
result
[
e
.
key
]
=
{
highRisk
:
e
.
highRisk
,
...
issue
}
})
resolve
(
result
)
}).
catch
(
err
=>
{
}).
catch
(
err
=>
{
console
.
warn
(
err
)
console
.
warn
(
err
)
})
})
...
...
src/tumour/screening/simple/form/base.vue
View file @
8fa86e09
...
@@ -176,7 +176,7 @@
...
@@ -176,7 +176,7 @@
label-width=
"100%"
label-width=
"100%"
:rules=
"rules.species"
>
:rules=
"rules.species"
>
<
template
#
input
>
<
template
#
input
>
<van-checkbox-group
v-model=
"form.species"
class=
"pt-2"
>
<van-checkbox-group
v-model=
"form.species"
class=
"pt-2
pl-2
"
>
<van-checkbox
v-for=
"(item, index) in cancerArray"
:key=
"index"
<van-checkbox
v-for=
"(item, index) in cancerArray"
:key=
"index"
:name=
"item.value"
shape=
"square"
:name=
"item.value"
shape=
"square"
class=
"mb-3"
>
{{
item
.
name
}}
</van-checkbox>
class=
"mb-3"
>
{{
item
.
name
}}
</van-checkbox>
...
...
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