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
54e2aca2
Commit
54e2aca2
authored
Nov 11, 2024
by
songrui
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
筛查修改
parent
bb9e40c3
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
345 additions
and
13 deletions
+345
-13
package-lock.json
package-lock.json
+21
-9
package.json
package.json
+1
-1
index.js
src/router/index.js
+1
-1
config.js
src/tumour/screening/simpleV2/config.js
+0
-0
Index.vue
src/tumour/screening/simpleV2/form/Index.vue
+118
-0
Question.vue
src/tumour/screening/simpleV2/form/Question.vue
+125
-0
Result.vue
src/tumour/screening/simpleV2/form/Result.vue
+77
-0
base.vue
src/tumour/screening/simpleV2/form/base.vue
+0
-0
vue.config.js
vue.config.js
+2
-2
No files found.
package-lock.json
View file @
54e2aca2
...
@@ -12,7 +12,7 @@
...
@@ -12,7 +12,7 @@
"core-js"
:
"^3.8.3"
,
"core-js"
:
"^3.8.3"
,
"dayjs"
:
"^1.11.11"
,
"dayjs"
:
"^1.11.11"
,
"pinia"
:
"^2.1.7"
,
"pinia"
:
"^2.1.7"
,
"vant"
:
"^4.9.
1
"
,
"vant"
:
"^4.9.
8
"
,
"vue"
:
"^3.2.13"
,
"vue"
:
"^3.2.13"
,
"vue-router"
:
"^4.0.3"
"vue-router"
:
"^4.0.3"
},
},
...
@@ -12765,18 +12765,23 @@
...
@@ -12765,18 +12765,23 @@
}
}
},
},
"node_modules/vant"
:
{
"node_modules/vant"
:
{
"version"
:
"4.9.
1
"
,
"version"
:
"4.9.
8
"
,
"resolved"
:
"https://registry.npmmirror.com/vant/-/vant-4.9.
1
.tgz"
,
"resolved"
:
"https://registry.npmmirror.com/vant/-/vant-4.9.
8
.tgz"
,
"integrity"
:
"sha512-
p7iAKJyACYVwrmrkf3COmbuvzjHrFJ+FAmlyOWbxTS2ovkRs+tNKYjX2iibAl4XnHXBQD+qpX0ogUqE3jE7Isg
=="
,
"integrity"
:
"sha512-
iP+jNzwxkCeEdTrlUjro3WoXgY32+1CldOtLSc2K8acY7hR7t1zCkjzXSR9zWjtWT7zgNL1LEXofL8O7mtkYdQ
=="
,
"dependencies"
:
{
"dependencies"
:
{
"@vant/popperjs"
:
"^1.3.0"
,
"@vant/popperjs"
:
"^1.3.0"
,
"@vant/use"
:
"^1.6.0"
,
"@vant/use"
:
"^1.6.0"
,
"@vue/shared"
:
"^3.
4.27
"
"@vue/shared"
:
"^3.
5.11
"
},
},
"peerDependencies"
:
{
"peerDependencies"
:
{
"vue"
:
"^3.0.0"
"vue"
:
"^3.0.0"
}
}
},
},
"node_modules/vant/node_modules/@vue/shared"
:
{
"version"
:
"3.5.12"
,
"resolved"
:
"https://registry.npmmirror.com/@vue/shared/-/shared-3.5.12.tgz"
,
"integrity"
:
"sha512-L2RPSAwUFbgZH20etwrXyVyCBu9OxRSi8T/38QsvnkJyvq2LufW2lDCOzm7t/U9C1mkhJGWYfCuFBCmIuNivrg=="
},
"node_modules/vary"
:
{
"node_modules/vary"
:
{
"version"
:
"1.1.2"
,
"version"
:
"1.1.2"
,
"resolved"
:
"https://registry.npmmirror.com/vary/-/vary-1.1.2.tgz"
,
"resolved"
:
"https://registry.npmmirror.com/vary/-/vary-1.1.2.tgz"
,
...
@@ -23029,13 +23034,20 @@
...
@@ -23029,13 +23034,20 @@
}
}
},
},
"vant"
:
{
"vant"
:
{
"version"
:
"4.9.
1
"
,
"version"
:
"4.9.
8
"
,
"resolved"
:
"https://registry.npmmirror.com/vant/-/vant-4.9.
1
.tgz"
,
"resolved"
:
"https://registry.npmmirror.com/vant/-/vant-4.9.
8
.tgz"
,
"integrity"
:
"sha512-
p7iAKJyACYVwrmrkf3COmbuvzjHrFJ+FAmlyOWbxTS2ovkRs+tNKYjX2iibAl4XnHXBQD+qpX0ogUqE3jE7Isg
=="
,
"integrity"
:
"sha512-
iP+jNzwxkCeEdTrlUjro3WoXgY32+1CldOtLSc2K8acY7hR7t1zCkjzXSR9zWjtWT7zgNL1LEXofL8O7mtkYdQ
=="
,
"requires"
:
{
"requires"
:
{
"@vant/popperjs"
:
"^1.3.0"
,
"@vant/popperjs"
:
"^1.3.0"
,
"@vant/use"
:
"^1.6.0"
,
"@vant/use"
:
"^1.6.0"
,
"@vue/shared"
:
"^3.4.27"
"@vue/shared"
:
"^3.5.11"
},
"dependencies"
:
{
"@vue/shared"
:
{
"version"
:
"3.5.12"
,
"resolved"
:
"https://registry.npmmirror.com/@vue/shared/-/shared-3.5.12.tgz"
,
"integrity"
:
"sha512-L2RPSAwUFbgZH20etwrXyVyCBu9OxRSi8T/38QsvnkJyvq2LufW2lDCOzm7t/U9C1mkhJGWYfCuFBCmIuNivrg=="
}
}
}
},
},
"vary"
:
{
"vary"
:
{
...
...
package.json
View file @
54e2aca2
...
@@ -11,7 +11,7 @@
...
@@ -11,7 +11,7 @@
"
core-js
"
:
"^3.8.3"
,
"
core-js
"
:
"^3.8.3"
,
"
dayjs
"
:
"^1.11.11"
,
"
dayjs
"
:
"^1.11.11"
,
"
pinia
"
:
"^2.1.7"
,
"
pinia
"
:
"^2.1.7"
,
"
vant
"
:
"^4.9.
1
"
,
"
vant
"
:
"^4.9.
8
"
,
"
vue
"
:
"^3.2.13"
,
"
vue
"
:
"^3.2.13"
,
"
vue-router
"
:
"^4.0.3"
"
vue-router
"
:
"^4.0.3"
},
},
...
...
src/router/index.js
View file @
54e2aca2
...
@@ -9,7 +9,7 @@ const routes = [
...
@@ -9,7 +9,7 @@ const routes = [
{
{
path
:
'screening/simple/form'
,
path
:
'screening/simple/form'
,
name
:
'tumour-screening-simple-form'
,
name
:
'tumour-screening-simple-form'
,
component
:
()
=>
import
(
/* webpackChunkName: "page-tumour" */
'@/tumour/screening/simple/form/Index.vue'
)
component
:
()
=>
import
(
/* webpackChunkName: "page-tumour" */
'@/tumour/screening/simple
V2
/form/Index.vue'
)
}
}
]
]
}
}
...
...
src/tumour/screening/simpleV2/config.js
0 → 100644
View file @
54e2aca2
This diff is collapsed.
Click to expand it.
src/tumour/screening/simpleV2/form/Index.vue
0 → 100644
View file @
54e2aca2
<
template
>
<div
class=
"h-full flex flex-col "
>
<div
class=
"p-3 text-16 text-black text-center shrink-0 top-bar"
>
<span
class=
"back-bt"
@
click=
"onBack"
v-if=
"setp === 2"
>
<doc-icon
type=
"doc-left"
/>
</span>
<span>
肿瘤风险评估
</span>
</div>
<div
class=
"grow overflow-y-auto pb-5"
>
<BaseForm
ref=
"base"
v-show=
"setp === 1"
/>
<QuestionForm
ref=
"question"
v-if=
"setp === 2"
:species=
"species"
/>
<Result
v-if=
"setp === 3"
:info=
"resultInfo"
/>
<div
class=
"bt-group"
>
<van-button
type=
"primary"
block
v-if=
"setp === 1"
@
click=
"onNext"
>
下一步
</van-button>
<van-button
type=
"primary"
block
v-else-if=
"setp === 2"
@
click=
"submit"
>
提交
</van-button>
</div>
</div>
<div
class=
"pb-5"
></div>
</div>
</
template
>
<
script
>
import
BaseForm
from
'./base.vue'
import
QuestionForm
from
'./Question.vue'
import
Result
from
'./Result.vue'
import
{
showNotify
}
from
'vant'
import
{
addSimpleScreen
}
from
'@/tumour/api/screening.js'
import
{
fetchDataHandle
}
from
'@/utils/common.js'
export
default
{
components
:
{
BaseForm
,
QuestionForm
,
Result
},
data
()
{
return
{
// 操作步骤
setp
:
1
,
// 步骤1中选中的癌种
species
:
[],
// 基础用户信息
baseInfo
:
{},
// 提交结果信息
resultInfo
:
{}
}
},
computed
:
{
routeQuery
()
{
return
this
.
$route
.
query
},
doctorId
()
{
return
this
.
routeQuery
.
doctorId
}
},
created
()
{
if
(
!
this
.
doctorId
)
{
showNotify
({
type
:
'warning'
,
message
:
'未获取到医生信息'
,
duration
:
0
})
}
},
methods
:
{
init
()
{
},
onBack
()
{
this
.
setp
=
1
},
onNext
()
{
if
(
!
this
.
doctorId
)
return
this
.
$refs
.
base
.
submit
().
then
(
res
=>
{
console
.
log
(
res
)
this
.
baseInfo
=
res
this
.
species
=
res
.
species
||
[]
this
.
setp
=
2
})
},
submit
()
{
this
.
$refs
.
question
.
submit
().
then
(
res
=>
{
const
result
=
{
...
this
.
baseInfo
,
details
:
res
,
createdUserId
:
this
.
doctorId
}
const
query
=
fetchDataHandle
(
result
,
{
species
:
'arrToStr'
})
console
.
log
(
query
)
addSimpleScreen
(
query
).
then
(
res
=>
{
this
.
resultInfo
=
{
species
:
result
.
species
,
details
:
result
.
details
,
unitName
:
res
.
data
}
this
.
setp
=
3
})
})
}
}
}
</
script
>
<
style
lang=
"less"
scoped
>
.top-bar {
position: relative;
border-bottom: 1px solid #0000001A;
.back-bt {
position: absolute;
left: .16rem;
}
}
.bt-group {
padding: 0 10%;
}
</
style
>
src/tumour/screening/simpleV2/form/Question.vue
0 → 100644
View file @
54e2aca2
<
template
>
<div
class=
"question-form"
>
<span
ref=
"top"
></span>
<van-form
label-width=
"100%"
ref=
"form"
>
<template
v-for=
"(item, index) in formData"
:key=
"index"
>
<div
class=
"px-4 py-2 title"
>
{{
item
.
title
}}
</div>
<van-field
:name=
"q.key"
v-for=
"(q, i) in item.issue.filter(e => e.title)"
:key=
"i"
:label=
"q.title.text"
:rules=
"[
{ required: !q.title.linkKey, message: '请选择' }]">
<template
#
input
>
<van-checkbox-group
v-model=
"q.titleExtend.value"
class=
"pl-2"
@
change=
"q.titleExtend.change(item)"
v-if=
"q.title.linkKey"
>
<van-checkbox
v-for=
"(item, index) in q.titleExtend.answer.cont"
:key=
"index"
:name=
"item.value"
shape=
"square"
class=
"mt-3"
>
{{
item
.
name
}}
</van-checkbox>
</van-checkbox-group>
<van-radio-group
v-model=
"q.value"
@
change=
"onChange($event, item)"
class=
"pl-2"
:disabled=
"q.answer.disabled"
v-else
>
<van-radio
v-for=
"a in q.answer.cont"
shape=
"dot"
class=
"mt-2"
:name=
"a.value"
:key=
"a.value"
>
{{
a
.
name
}}
</van-radio>
</van-radio-group>
</
template
>
</van-field>
<van-field
name=
"highRisk"
label=
"筛查结论"
label-width=
"4.5em"
>
<
template
#
input
>
<van-radio-group
v-model=
"item.highRisk"
direction=
"horizontal"
>
<van-radio
v-for=
"r in store.getDict('DC00071')"
shape=
"dot"
:name=
"r.value"
:key=
"r.value"
>
{{
r
.
name
}}
</van-radio>
</van-radio-group>
</
template
>
</van-field>
<div
class=
"remark"
v-if=
"[9, 10].includes(item.cancer)"
>
总分 {{ item.score || 0 }} 分
</div>
<div
class=
"remark"
v-if=
"item.remark"
>
{{ item.remark }}
</div>
</template>
</van-form>
</div>
</template>
<
script
>
import
{
getQuestion
}
from
'../config.js'
import
{
useStore
}
from
'@/tumour/store/index.js'
import
{
showToast
}
from
'vant'
export
default
{
props
:
{
// 筛查癌种 获取对应的问卷
species
:
Array
},
data
()
{
return
{
store
:
useStore
(),
formData
:
[],
}
},
created
()
{
this
.
init
()
},
mounted
()
{
const
dom
=
this
.
$refs
[
'top'
]
if
(
!
dom
)
return
dom
.
scrollIntoView
()
},
methods
:
{
init
()
{
if
(
!
this
.
species
)
return
this
.
species
.
forEach
(
e
=>
{
const
temp
=
getQuestion
(
e
,
this
.
$parent
.
baseInfo
)
temp
.
cancer
=
e
this
.
formData
.
push
(
temp
)
})
console
.
log
(
this
.
formData
)
},
onChange
(
val
,
item
)
{
// console.log(val, item)
// console.log('高危判断', item.check())
item
.
highRisk
=
item
.
check
()
?
1
:
2
},
submit
()
{
return
new
Promise
((
resolve
)
=>
{
this
.
$refs
.
form
.
validate
().
then
(
res
=>
{
console
.
log
(
'submit'
,
res
,
this
.
formData
)
const
result
=
{}
this
.
formData
.
forEach
(
e
=>
{
const
temp
=
{
highRisk
:
e
.
highRisk
}
e
.
issue
.
forEach
(
q
=>
{
const
value
=
q
.
value
temp
[
q
.
key
]
=
Array
.
isArray
(
value
)
?
value
.
join
(
','
)
:
value
})
if
(
e
.
score
)
{
temp
.
score
=
e
.
score
}
result
[
e
.
cancer
]
=
temp
})
resolve
(
result
)
}).
catch
(
err
=>
{
console
.
warn
(
err
)
showToast
(
'还有表单未填写'
)
if
(
Array
.
isArray
(
err
))
{
this
.
$refs
.
form
.
scrollToField
(
err
[
0
].
name
)
}
})
})
}
}
}
</
script
>
<
style
lang=
"less"
scoped
>
@import '@/tumour/utils/common.less';
.remark {
border: 1px solid #F0F0F0;
padding: 10px;
color: #595959;
background-color: #FAFAFA;
margin: 10px 16px;
line-height: 1.5;
white-space: pre-wrap;
}
</
style
>
src/tumour/screening/simpleV2/form/Result.vue
0 → 100644
View file @
54e2aca2
<
template
>
<div
class=
"p-4 form-result"
>
<div
v-for=
"item in list"
:key=
"item.key"
class=
"p-3 mb-4 list-item"
>
<div
class=
"mb-2"
>
<span
class=
"mr-2 font-semibold"
>
{{
item
.
title
}}
</span>
<span
v-if=
"item.status == 1"
class=
"tag-red"
>
高风险
</span>
<span
v-else
class=
"tag-green"
>
无高风险
</span>
</div>
<div
style=
"color: #8C8C8C;"
class=
"mb-2"
>
{{
item
.
date
}}
</div>
<div
class=
"mb-2 flex items-center tip"
v-if=
"item.status == 1"
>
<doc-icon
type=
"doc-exclamation-circle"
class=
"text-16"
/>
<span
class=
"ml-2"
>
建议到
{{
item
.
unitName
}}
进行检查
</span>
</div>
<div
style=
"line-height: 1.5;white-space: pre-wrap;"
>
{{
item
.
remark
}}
</div>
</div>
</div>
</
template
>
<
script
>
import
{
getDictValue
}
from
'@/tumour/utils/dictionaries.js'
import
{
getQuestion
}
from
'../config.js'
import
dayjs
from
'dayjs'
export
default
{
props
:
{
info
:
{
default
:
()
=>
({})
}
},
data
()
{
return
{
list
:
[]
}
},
created
()
{
const
{
species
=
[],
details
=
{},
unitName
=
'本单位'
}
=
this
.
info
// console.log(species, details, unitName)
species
.
forEach
(
e
=>
{
const
q
=
getQuestion
(
e
)
this
.
list
.
push
({
key
:
e
,
title
:
getDictValue
(
'DC00032'
,
e
)
+
'筛查结果'
,
status
:
details
[
e
].
highRisk
,
remark
:
q
.
remark
,
date
:
dayjs
().
format
(
'YYYY.MM.DD'
),
unitName
})
})
}
}
</
script
>
<
style
lang=
"less"
scoped
>
.list-item {
border: 1px solid #F0F0F0;
}
.font-12 {
font-size: 12px;
}
.tip {
background-color: #F8FAFC;
color: #768092;
padding: 4px 12px;
}
.tag-red {
color: #F5222D;
background-color: #FFF1F0;
padding: 4px 6px;
border-radius: 2px;
}
.tag-green {
color: #52C41A;
background-color: #D9F7BE;
padding: 4px 6px;
border-radius: 2px;
}
</
style
>
src/tumour/screening/simpleV2/form/base.vue
0 → 100644
View file @
54e2aca2
This diff is collapsed.
Click to expand it.
vue.config.js
View file @
54e2aca2
...
@@ -22,8 +22,8 @@ module.exports = defineConfig({
...
@@ -22,8 +22,8 @@ module.exports = defineConfig({
// 设置代理
// 设置代理
proxy
:
{
proxy
:
{
'/tumour-admin'
:
{
'/tumour-admin'
:
{
// target: 'http://192.168.1.7
:8081',
target
:
'http://192.168.1.118
:8081'
,
target
:
'https://beta-tumour.zmnyjk.com'
,
//
target: 'https://beta-tumour.zmnyjk.com',
changOrigin
:
true
,
changOrigin
:
true
,
pathRewrite
:
{
pathRewrite
:
{
'^/tumour-admin'
:
'/tumour-admin'
'^/tumour-admin'
:
'/tumour-admin'
...
...
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