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
062c2498
Commit
062c2498
authored
Aug 27, 2024
by
songrui
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
包名称修改
parent
123fdba7
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
7 additions
and
591 deletions
+7
-591
Resident.vue
src/resident/Resident.vue
+1
-1
base.js
src/resident/api/base.js
+0
-0
IdCheck.vue
src/resident/screening/first/form/IdCheck.vue
+1
-1
Index.vue
src/resident/screening/first/form/Index.vue
+0
-0
index.js
src/resident/store/index.js
+0
-0
common.less
src/resident/utils/common.less
+0
-0
index.js
src/router/index.js
+5
-17
Tumour.vue
src/tumour/Tumour.vue
+0
-35
base.js
src/tumour/api/base.js
+0
-31
screening.js
src/tumour/api/screening.js
+0
-6
index.js
src/tumour/index.js
+0
-0
config.js
src/tumour/screening/simple/config.js
+0
-0
Index.vue
src/tumour/screening/simple/form/Index.vue
+0
-118
Question.vue
src/tumour/screening/simple/form/Question.vue
+0
-107
Result.vue
src/tumour/screening/simple/form/Result.vue
+0
-77
base.vue
src/tumour/screening/simple/form/base.vue
+0
-0
index.js
src/tumour/store/index.js
+0
-17
common.less
src/tumour/utils/common.less
+0
-14
dictionaries.js
src/tumour/utils/dictionaries.js
+0
-45
DocAddress.vue
src/tumour/utils/docAddress/DocAddress.vue
+0
-122
No files found.
src/
chronic/Chronic
.vue
→
src/
resident/Resident
.vue
View file @
062c2498
<
template
>
<div
class=
"h-full
chronic
-home"
>
<div
class=
"h-full
resident
-home"
>
<router-view
v-slot=
"
{ Component }">
<Transition
name=
"route"
mode=
"out-in"
>
<component
:is=
"Component"
v-if=
"visible"
/>
...
...
src/
chronic
/api/base.js
→
src/
resident
/api/base.js
View file @
062c2498
File moved
src/
chronic
/screening/first/form/IdCheck.vue
→
src/
resident
/screening/first/form/IdCheck.vue
View file @
062c2498
...
...
@@ -33,7 +33,7 @@
</
template
>
<
script
>
import
{
useStore
}
from
'@/
chronic
/store/index.js'
import
{
useStore
}
from
'@/
resident
/store/index.js'
import
{
idCardRule
}
from
'@/utils/commonReg.js'
export
default
{
...
...
src/
chronic
/screening/first/form/Index.vue
→
src/
resident
/screening/first/form/Index.vue
View file @
062c2498
File moved
src/
chronic
/store/index.js
→
src/
resident
/store/index.js
View file @
062c2498
File moved
src/
chronic
/utils/common.less
→
src/
resident
/utils/common.less
View file @
062c2498
File moved
src/router/index.js
View file @
062c2498
...
...
@@ -2,26 +2,14 @@ import { createRouter, createWebHashHistory } from 'vue-router'
const
routes
=
[
{
path
:
'/tumour'
,
name
:
'tumour'
,
component
:
()
=>
import
(
/* webpackChunkName: "page-tumour" */
'@/tumour/Tumour.vue'
),
children
:
[
{
path
:
'screening/simple/form'
,
name
:
'tumour-screening-simple-form'
,
component
:
()
=>
import
(
/* webpackChunkName: "page-tumour" */
'@/tumour/screening/simple/form/Index.vue'
)
}
]
},
{
path
:
'/chronic'
,
name
:
'chronic'
,
component
:
()
=>
import
(
/* webpackChunkName: "page-chronic" */
'@/chronic/Chronic.vue'
),
path
:
'/resident'
,
name
:
'resident'
,
component
:
()
=>
import
(
/* webpackChunkName: "page-resident" */
'@/resident/Resident.vue'
),
children
:
[
{
path
:
'screening/first/form'
,
name
:
'
chronic
-screening-first-form'
,
component
:
()
=>
import
(
/* webpackChunkName: "page-
chronic" */
'@/chronic
/screening/first/form/Index.vue'
)
name
:
'
resident
-screening-first-form'
,
component
:
()
=>
import
(
/* webpackChunkName: "page-
resident" */
'@/resident
/screening/first/form/Index.vue'
)
}
]
},
...
...
src/tumour/Tumour.vue
deleted
100644 → 0
View file @
123fdba7
<
template
>
<div
class=
"h-full tumour-home"
>
<router-view
v-slot=
"
{ Component }">
<Transition
name=
"route"
mode=
"out-in"
>
<component
:is=
"Component"
/>
</Transition>
</router-view>
</div>
</
template
>
<
script
>
import
{
getDict
}
from
'./api/base.js'
import
{
useStore
}
from
'./store/index.js'
export
default
{
created
()
{
this
.
init
()
},
setup
()
{
const
store
=
useStore
()
return
{
store
}
},
methods
:
{
init
()
{
getDict
().
then
(
res
=>
{
this
.
store
.
$patch
({
dict
:
res
.
data
})
})
}
}
}
</
script
>
<
style
lang=
"less"
scoped
>
</
style
>
src/tumour/api/base.js
deleted
100644 → 0
View file @
123fdba7
import
{
fetchBase
}
from
'@/utils/fetch.js'
import
{
setSessionStorage
,
getSessionStorage
}
from
'@/utils/common.js'
// 获取字典
export
function
getDict
()
{
return
fetchBase
({
url
:
`/tumour-admin/v1/h5-app/dict`
,
loading
:
true
})
}
// 区划编码查询下级
export
function
getAreaChild
(
parentCode
,
loading
=
true
)
{
const
key
=
'tumour-area-cache'
return
new
Promise
((
resolve
,
reject
)
=>
{
const
result
=
getSessionStorage
(
key
)
||
{}
if
(
result
[
parentCode
])
{
resolve
(
result
[
parentCode
])
return
}
fetchBase
({
url
:
`/tumour-admin/v1/h5-app/child-area/
${
parentCode
}
`
,
loading
}).
then
(
res
=>
{
result
[
parentCode
]
=
res
.
data
setSessionStorage
(
key
,
result
)
resolve
(
res
.
data
)
}).
catch
(
err
=>
{
reject
(
err
)
})
})
}
// 居民基本信息查询
export
function
getResidentInfo
(
idCard
)
{
return
fetchBase
({
url
:
`/tumour-admin/v1/h5-app/residents/
${
idCard
}
`
,
loading
:
true
})
}
src/tumour/api/screening.js
deleted
100644 → 0
View file @
123fdba7
import
{
fetchBase
}
from
'@/utils/fetch.js'
// 简易筛查 新增
export
function
addSimpleScreen
(
params
,
loading
=
true
)
{
return
fetchBase
({
url
:
`/tumour-admin/v1/h5-app/add-simple-screen`
,
body
:
params
,
loading
})
}
src/tumour/index.js
deleted
100644 → 0
View file @
123fdba7
src/tumour/screening/simple/config.js
deleted
100644 → 0
View file @
123fdba7
This diff is collapsed.
Click to expand it.
src/tumour/screening/simple/form/Index.vue
deleted
100644 → 0
View file @
123fdba7
<
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/simple/form/Question.vue
deleted
100644 → 0
View file @
123fdba7
<
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"
:key=
"i"
:label=
"q.title"
:rules=
"[
{ required: true, message: '请选择' }]">
<template
#
input
>
<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"
: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=
"item.remark && item.highRisk === 1"
>
{{ item.remark }}
</div>
</template>
</van-form>
</div>
</template>
<
script
>
import
{
getQuestion
}
from
'../config.js'
import
{
useStore
}
from
'@/tumour/store/index.js'
export
default
{
props
:
{
// 筛查癌种 获取对应的问卷
species
:
Array
},
data
()
{
return
{
formData
:
[],
}
},
setup
()
{
const
store
=
useStore
()
return
{
store
}
},
created
()
{
this
.
init
()
},
mounted
()
{
const
dom
=
this
.
$refs
[
'top'
]
if
(
!
dom
)
return
dom
.
scrollIntoView
()
},
methods
:
{
init
()
{
if
(
!
this
.
species
)
return
this
.
species
.
forEach
(
e
=>
{
this
.
formData
.
push
(
getQuestion
(
e
))
})
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
(
res
,
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
=>
{
console
.
warn
(
err
)
})
})
}
}
}
</
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;
}
</
style
>
src/tumour/screening/simple/form/Result.vue
deleted
100644 → 0
View file @
123fdba7
<
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"
v-if=
"item.status == 1"
>
备注:
{{
item
.
remark
}}
</div>
</div>
</div>
</
template
>
<
script
>
import
{
getDictValue
}
from
'@/tumour/utils/dictionaries.js'
import
{
getQuestion
}
from
'@/tumour//screening/simple/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/simple/form/base.vue
deleted
100644 → 0
View file @
123fdba7
This diff is collapsed.
Click to expand it.
src/tumour/store/index.js
deleted
100644 → 0
View file @
123fdba7
import
{
defineStore
}
from
'pinia'
export
const
useStore
=
defineStore
(
'tumour'
,
{
state
:
()
=>
{
return
{
// 字典
dict
:
[]
}
},
getters
:
{},
actions
:
{
getDict
(
val
)
{
if
(
!
val
)
return
[]
return
this
.
dict
[
val
]
||
[]
}
}
})
src/tumour/utils/common.less
deleted
100644 → 0
View file @
123fdba7
.title {
font-weight: 600;
display: flex;
align-items: center;
&::before {
content: '';
display: inline-block;
background: #1890FF;
height: 16px;
width: 4px;
margin-right: 4px;
}
}
\ No newline at end of file
src/tumour/utils/dictionaries.js
deleted
100644 → 0
View file @
123fdba7
import
{
useStore
}
from
'@/tumour/store/index.js'
/**
* 获取字典值
* @param {String | Array} dict
* @param {String} value
* @returns
*/
export
function
getDictValue
(
dict
,
value
)
{
const
store
=
useStore
()
let
array
=
[]
if
(
typeof
dict
===
'string'
)
{
array
=
store
.
getDict
(
dict
)
}
else
{
array
=
dict
}
if
(
!
array
||
!
array
.
length
)
{
return
''
}
let
temp
=
array
.
find
(
e
=>
e
.
value
==
value
)
||
{}
return
temp
.
name
||
''
}
/**
* 获取字典数组
* @param {String} dict
*/
export
function
getDict
(
dict
)
{
const
store
=
useStore
()
return
store
.
getDict
(
dict
)
||
myDict
()[
dict
]
||
[]
}
// 自定义字典
function
myDict
()
{
return
{
MY001
:
[
{
name
:
'-'
,
value
:
'-'
},
{
name
:
'±'
,
value
:
'±'
},
{
name
:
'+'
,
value
:
'+'
},
{
name
:
'++'
,
value
:
'++'
},
{
name
:
'+++'
,
value
:
'+++'
},
{
name
:
'++++'
,
value
:
'++++'
}
]
}
}
src/tumour/utils/docAddress/DocAddress.vue
deleted
100644 → 0
View file @
123fdba7
<
template
>
<van-cascader
class=
"address-select"
:closeable=
"false"
v-model=
"innerValue"
title=
"请选择所在地区"
:options=
"areaData"
@
change=
"onChange"
@
close=
"() => $emit('close')"
/>
</
template
>
<
script
>
import
{
getAreaChild
}
from
'@/tumour/api/base.js'
import
{
fetchDataHandle
}
from
'@/utils/common.js'
export
default
{
name
:
'DocAddress'
,
props
:
{
value
:
[
String
,
Number
],
viewData
:
Array
,
},
emits
:
[
'update:value'
,
'change'
,
'close'
],
data
()
{
return
{
innerValue
:
''
,
areaData
:
[]
}
},
created
()
{
this
.
init
()
},
methods
:
{
async
init
()
{
if
(
!
this
.
areaData
.
length
)
{
const
res
=
await
getAreaChild
(
'0'
)
this
.
areaData
=
this
.
dataField
(
res
||
[])
}
if
(
this
.
value
)
{
const
temp
=
fetchDataHandle
({
value
:
this
.
value
},
{
value
:
'addToArr'
})
await
this
.
viewHandle
(
temp
.
value
)
}
// console.log(this.areaData)
},
loadData
(
options
)
{
const
targetOption
=
options
[
options
.
length
-
1
]
targetOption
.
loading
=
true
getAreaChild
(
targetOption
.
value
).
then
(
res
=>
{
targetOption
.
children
=
this
.
dataField
(
res
||
[],
options
.
length
===
4
)
this
.
areaData
=
[...
this
.
areaData
]
}).
finally
(()
=>
{
targetOption
.
loading
=
false
})
},
dataField
(
data
,
last
=
false
)
{
return
data
.
map
(
e
=>
{
return
{
text
:
e
.
areaName
,
value
:
e
.
areaCode
,
id
:
e
.
id
,
isLeaf
:
last
}
})
},
// 回显处理
async
viewHandle
(
val
=
[])
{
try
{
const
length
=
val
.
length
let
current
=
this
.
areaData
.
find
(
e
=>
e
.
value
===
val
[
0
])
let
index
=
1
while
(
index
<
length
)
{
const
res
=
await
getAreaChild
(
current
.
value
)
const
result
=
res
||
[]
if
(
!
result
.
length
)
break
current
.
children
=
this
.
dataField
(
result
,
index
===
4
)
current
=
current
.
children
.
find
(
e
=>
e
.
value
===
val
[
index
])
this
.
areaData
=
[...
this
.
areaData
]
if
(
!
current
)
break
index
++
}
}
catch
(
err
)
{
console
.
warn
(
err
)
}
},
onChange
(
val
)
{
// console.log(val, this.areaData)
const
tabIndex
=
val
.
tabIndex
const
options
=
val
.
selectedOptions
const
targetOption
=
options
[
options
.
length
-
1
]
if
(
tabIndex
<
4
)
{
getAreaChild
(
val
.
value
).
then
(
res
=>
{
targetOption
.
children
=
this
.
dataField
(
res
||
[],
options
.
length
===
4
)
this
.
areaData
=
[...
this
.
areaData
]
})
}
this
.
$emit
(
'update:value'
,
val
.
value
)
this
.
$emit
(
'change'
,
val
)
if
(
tabIndex
===
4
)
{
this
.
$emit
(
'close'
)
}
}
},
watch
:
{
value
:
{
handler
(
val
)
{
this
.
innerValue
=
val
},
immediate
:
true
},
// 地址同步使用
viewData
(
val
)
{
this
.
viewHandle
(
val
)
}
}
}
</
script
>
<
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