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
41f28548
Commit
41f28548
authored
Jan 14, 2025
by
gengchunlei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
医生端小程序 v1.2 1、死亡记录
parent
6bf3658d
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
244 additions
and
19 deletions
+244
-19
death.js
src/api/doctor/death.js
+7
-0
Doctor.vue
src/doctor/Doctor.vue
+1
-1
archiveCommon.vue
src/doctor/components/archiveCommon/archiveCommon.vue
+0
-1
DeathRecordForm.vue
src/doctor/deathRecord/form/DeathRecordForm.vue
+119
-12
DiseasePicker.vue
src/doctor/deathRecord/form/DiseasePicker.vue
+101
-0
Index.vue
src/doctor/deathRecord/form/Index.vue
+16
-5
No files found.
src/api/doctor/death.js
0 → 100644
View file @
41f28548
import
{
fetchBase
}
from
'@/api/doctor/doctorFetch'
// 保存死亡记录
export
function
saveResidentsDeath
(
params
)
{
return
fetchBase
({
url
:
`/chronic-admin/v1/chronic-residents-death/save`
,
body
:
params
,
loading
:
true
})
}
\ No newline at end of file
src/doctor/Doctor.vue
View file @
41f28548
...
@@ -66,7 +66,7 @@ export default {
...
@@ -66,7 +66,7 @@ export default {
if
(
!
token
)
{
if
(
!
token
)
{
token
=
sessionStorage
.
getItem
(
'token'
)
token
=
sessionStorage
.
getItem
(
'token'
)
if
(
process
.
env
.
NODE_ENV
!==
'production'
)
{
if
(
process
.
env
.
NODE_ENV
!==
'production'
)
{
token
=
'
1b8515e3-66a8-458b-b4d9-0cef6f73b8c1
'
token
=
'
59c9fee7-10ef-45d7-af4a-b3d65c93c30e
'
}
}
}
}
if
(
token
)
{
if
(
token
)
{
...
...
src/doctor/components/archiveCommon/archiveCommon.vue
View file @
41f28548
...
@@ -374,7 +374,6 @@ export default {
...
@@ -374,7 +374,6 @@ export default {
this
.
$refs
.
form
.
validate
().
then
(()
=>
{
this
.
$refs
.
form
.
validate
().
then
(()
=>
{
resolve
(
this
.
form
)
resolve
(
this
.
form
)
}).
catch
((
e
)
=>
{
}).
catch
((
e
)
=>
{
reject
(
'档案信息校验失败'
)
console
.
warn
(
'档案信息校验失败'
,
e
)
console
.
warn
(
'档案信息校验失败'
,
e
)
const
array
=
e
||
[]
const
array
=
e
||
[]
if
(
array
.
length
)
{
if
(
array
.
length
)
{
...
...
src/doctor/deathRecord/form/DeathRecordForm.vue
View file @
41f28548
...
@@ -7,7 +7,6 @@
...
@@ -7,7 +7,6 @@
v-model=
'form.deathDate'
v-model=
'form.deathDate'
is-link
is-link
readonly
readonly
name=
'deathDate'
placeholder=
'死亡日期'
placeholder=
'死亡日期'
class=
'input-back mt-2 form-input'
class=
'input-back mt-2 form-input'
:rules=
'rules.deathDate'
:rules=
'rules.deathDate'
...
@@ -23,13 +22,13 @@
...
@@ -23,13 +22,13 @@
<van-field
<van-field
class=
'no-back form-input mt-2'
class=
'no-back form-input mt-2'
style=
'padding: 0'
style=
'padding: 0'
:rules=
'rules.reasonItem'
>
>
<template
#
input
>
<template
#
input
>
<van-radio-group
v-model=
'form.reasonItem'
<van-radio-group
v-model=
'form.reasonItem'
shape=
"dot"
shape=
'dot'
direction=
'horizontal'
direction=
'horizontal'
class=
'w-full doc-radio-group'
class=
'w-full doc-radio-group'
:rules=
'rules.reasonItem'
>
>
<van-radio
v-for=
"item in store.getDict('CP00169')"
<van-radio
v-for=
"item in store.getDict('CP00169')"
:key=
'item.value'
:name=
'item.value'
:key=
'item.value'
:name=
'item.value'
...
@@ -40,6 +39,42 @@
...
@@ -40,6 +39,42 @@
</
template
>
</
template
>
</van-field>
</van-field>
<div
class=
'mt-3 more-bg flex flex-col gap-y-2.5'
v-if=
'form.reasonItem == 1'
>
<div
v-for=
'(item,index) in form.deathReasonList'
class=
'bg-white'
>
<div
class=
'label-title'
>
名称
</div>
<van-field
v-model=
'item.diseaseName'
is-link
readonly
placeholder=
'请选择'
@
click=
'getSelect(index)'
:rules=
'rules.diseaseName'
class=
'input-back form-input mt-2'
/>
<DiseasePicker
v-model:show=
'showIcd'
@
change=
'icdChange'
></DiseasePicker>
<div
class=
'no-req-label mt-5'
>
ICD编码
</div>
<van-field
v-model=
'item.icdCode'
readonly
name=
'icdCode'
placeholder=
'请输入'
class=
'input-back form-input mt-2'
/>
<div
class=
'mt-2 text-center'
v-if=
'this.form.deathReasonList.length > 1'
>
<van-button
class=
'del-btn'
size=
'small'
color=
'#BFBFBF'
plain
@
click=
'onDel(index)'
>
删除
</van-button>
</div>
</div>
<div>
<van-button
plain
type=
'primary'
class=
'w-full'
@
click=
'plusDiagnosis'
>
增加疾病原因
</van-button>
</div>
</div>
<van-field
<van-field
...
@@ -59,38 +94,85 @@
...
@@ -59,38 +94,85 @@
<
script
>
<
script
>
import
dayjs
from
'dayjs'
import
dayjs
from
'dayjs'
import
{
useStore
}
from
'@/doctor/store'
import
{
useStore
}
from
'@/doctor/store'
import
DiseasePicker
from
'@/doctor/deathRecord/form/DiseasePicker'
export
default
{
export
default
{
name
:
'DeathRecordForm'
,
name
:
'DeathRecordForm'
,
components
:
{
DiseasePicker
},
data
()
{
data
()
{
return
{
return
{
store
:
useStore
(),
store
:
useStore
(),
showDate
:
false
,
showDate
:
false
,
showIcd
:
false
,
//被选中的疾病名称下标
selectedIndex
:
undefined
,
// 筛查日期可选范围
// 筛查日期可选范围
deathDateRange
:
{
deathDateRange
:
{
min
:
undefined
,
min
:
undefined
,
max
:
undefined
max
:
undefined
},
},
form
:
{},
form
:
{
deathReasonList
:
[{
diseaseName
:
undefined
,
icdCode
:
undefined
}]
},
rules
:
{
rules
:
{
deathDate
:
[{
required
:
true
,
message
:
"请选择"
}],
deathDate
:
[{
required
:
true
,
message
:
'请选择'
}],
reasonItem
:
[{
required
:
true
,
message
:
"请选择"
}],
reasonItem
:
[{
required
:
true
,
message
:
'请选择'
}],
diseaseName
:
[{
required
:
true
,
message
:
'请选择'
}],
}
}
}
}
},
},
created
()
{
created
()
{
const
date
=
dayjs
()
this
.
init
()
this
.
deathDateRange
.
max
=
new
Date
(
date
.
year
(),
date
.
month
(),
date
.
date
())
// this.deathDateRange.min = new Date(date.year() - 10)
this
.
form
.
_deathDate
=
[
date
.
year
(),
date
.
month
(),
date
.
date
()]
this
.
form
.
deathDate
=
dayjs
().
format
(
'YYYY-MM-DD'
)
},
},
methods
:
{
methods
:
{
init
()
{
const
date
=
dayjs
()
this
.
deathDateRange
.
max
=
new
Date
(
date
.
year
(),
date
.
month
(),
date
.
date
())
// this.deathDateRange.min = new Date(date.year() - 10)
this
.
form
.
_deathDate
=
[
date
.
year
(),
date
.
month
(),
date
.
date
()]
// this.form.deathDate = dayjs().format('YYYY-MM-DD')
},
dataConfirm
({
selectedValues
})
{
dataConfirm
({
selectedValues
})
{
this
.
form
.
deathDate
=
selectedValues
.
join
(
'-'
)
this
.
form
.
deathDate
=
selectedValues
.
join
(
'-'
)
this
.
showDate
=
false
this
.
showDate
=
false
},
},
//
getSelect
(
index
)
{
this
.
selectedIndex
=
index
this
.
showIcd
=
true
},
// 疾病名称
icdChange
(
option
)
{
this
.
form
.
deathReasonList
[
this
.
selectedIndex
].
diseaseName
=
option
.
name
this
.
form
.
deathReasonList
[
this
.
selectedIndex
].
icdCode
=
option
.
icdCode
},
plusDiagnosis
()
{
this
.
form
.
deathReasonList
.
push
({})
},
onDel
(
index
)
{
this
.
form
.
deathReasonList
.
splice
(
index
,
1
)
},
onSubmit
()
{
debugger
return
new
Promise
((
resolve
,
reject
)
=>
{
debugger
this
.
$refs
.
form
.
validate
().
then
(()
=>
{
let
par
=
{
...
this
.
form
,
// operateType=1 新增死亡 3-撤销删除
operateType
:
1
}
resolve
(
par
)
}).
catch
((
e
)
=>
{
debugger
const
array
=
e
||
[]
if
(
array
.
length
)
{
this
.
$refs
.
form
.
scrollToField
(
array
[
0
].
name
)
}
})
})
}
}
}
}
}
</
script
>
</
script
>
...
@@ -115,6 +197,12 @@ export default {
...
@@ -115,6 +197,12 @@ export default {
}
}
}
}
.no-req-label {
font-size: 13px;
color: #595959;
font-weight: 500;
}
.form-input {
.form-input {
padding: 8px 12px;
padding: 8px 12px;
border-radius: 8px;
border-radius: 8px;
...
@@ -128,6 +216,25 @@ export default {
...
@@ -128,6 +216,25 @@ export default {
//line-height: 24px;
//line-height: 24px;
}
}
.more-bg {
background: #F5F5F5;
padding: 8px;
border-radius: 0px 0px 8px 8px;
}
.bg-white {
background: #FFFFFF;
padding: 8px;
border-radius: 8px;
}
.del-btn {
border-radius: 38px;
padding: 4px 8px;
width: 112px;
}
:deep(.van-cell:after) {
:deep(.van-cell:after) {
border-bottom: 0px;
border-bottom: 0px;
}
}
...
...
src/doctor/deathRecord/form/DiseasePicker.vue
0 → 100644
View file @
41f28548
<
template
>
<van-popup
:show=
'show'
position=
'bottom'
:teleport=
'teleport'
class=
'diagnose-picker'
>
<van-picker
title=
'请选择'
:columns=
'array'
:columns-field-names=
'fieldNames'
v-model=
'innerValue'
@
confirm=
'onConfirm'
@
cancel=
'onCancel'
>
<template
#
columns-top
>
<div
class=
'px-3'
>
<van-field
v-model=
'searchValue'
placeholder=
'请输入'
clearable
maxlength=
'100'
/>
</div>
</
template
>
</van-picker>
</van-popup>
</template>
<
script
>
import
{
queryDiseaseCode
}
from
'@/api/doctor/disease.js'
export
default
{
props
:
{
show
:
Boolean
,
value
:
[
String
,
Number
],
fieldNames
:
{
type
:
Object
,
default
:
()
=>
{
return
{
text
:
'name'
,
value
:
'icdCode'
}
}
},
// 疾病类型
diseaseType
:
[
String
,
Number
],
teleport
:
[
String
,
Element
]
},
emits
:
[
'update:show'
,
'update:value'
,
'change'
],
data
()
{
return
{
innerValue
:
undefined
,
searchValue
:
''
,
diagnoseNameList
:
[]
}
},
computed
:
{
array
()
{
const
array
=
this
.
diagnoseNameList
||
[]
return
array
.
filter
(
e
=>
e
.
name
.
startsWith
(
this
.
searchValue
))
}
},
methods
:
{
load
()
{
queryDiseaseCode
({}).
then
(
res
=>
{
const
result
=
[]
for
(
let
item
of
res
.
data
)
{
item
.
name
=
item
.
diseaseName
+
'('
+
item
.
icdCode
+
')'
result
.
push
(
item
)
}
this
.
diagnoseNameList
=
result
})
},
onConfirm
({
selectedValues
,
selectedOptions
})
{
this
.
$emit
(
'update:value'
,
selectedValues
[
0
])
this
.
$emit
(
'change'
,
selectedOptions
[
0
]
||
{})
this
.
$emit
(
'update:show'
,
false
)
this
.
searchValue
=
''
},
onCancel
()
{
this
.
$emit
(
'update:show'
,
false
)
}
},
watch
:
{
value
:
{
handler
(
value
)
{
if
(
value
==
null
)
return
this
.
innerValue
=
[
value
]
},
immediate
:
true
},
diseaseType
:
{
handler
()
{
this
.
load
()
},
immediate
:
true
}
}
}
</
script
>
<
style
lang=
'less'
scoped
>
:deep(.van-field) {
background-color: #FAFAFA;
padding: 8px 12px;
border-radius: 8px;
&::after {
display: none;
}
}
</
style
>
src/doctor/deathRecord/form/Index.vue
View file @
41f28548
...
@@ -4,12 +4,11 @@
...
@@ -4,12 +4,11 @@
@
click-left=
'toBack'
></van-nav-bar>
@
click-left=
'toBack'
></van-nav-bar>
<div
class=
'p-4 h-overflow'
ref=
'all'
>
<div
class=
'p-4 h-overflow'
ref=
'all'
>
<archive-common
:info=
'info'
<archive-common
:info=
'info'
v-
if
=
'step == 1'
v-
show
=
'step == 1'
ref=
'baseInfo'
ref=
'baseInfo'
></archive-common>
></archive-common>
<death-record-form
<death-record-form
v-if=
'step == 2'
v-show=
'step == 2'
:info=
'info'
ref=
'deathRecordForm'
ref=
'deathRecordForm'
></death-record-form>
></death-record-form>
</div>
</div>
...
@@ -36,6 +35,7 @@ import { useStore } from '@/doctor/store'
...
@@ -36,6 +35,7 @@ import { useStore } from '@/doctor/store'
import
ArchiveCommon
from
'@/doctor/components/archiveCommon/archiveCommon'
import
ArchiveCommon
from
'@/doctor/components/archiveCommon/archiveCommon'
import
DeathRecordForm
from
'@/doctor/deathRecord/form/DeathRecordForm'
import
DeathRecordForm
from
'@/doctor/deathRecord/form/DeathRecordForm'
import
{
getChronicResidentsId
}
from
'@/api/doctor/generalFU'
import
{
getChronicResidentsId
}
from
'@/api/doctor/generalFU'
import
{
saveResidentsDeath
}
from
'@/api/doctor/death'
export
default
{
export
default
{
name
:
'deathRecordIndex'
,
name
:
'deathRecordIndex'
,
...
@@ -74,7 +74,7 @@ export default {
...
@@ -74,7 +74,7 @@ export default {
}
=
res
.
data
}
=
res
.
data
this
.
info
=
{
this
.
info
=
{
personId
:
id
,
personId
:
id
,
...
others
,
...
others
}
}
},
},
async
toNext
(
val
)
{
async
toNext
(
val
)
{
...
@@ -84,7 +84,18 @@ export default {
...
@@ -84,7 +84,18 @@ export default {
}
}
this
.
step
=
val
this
.
step
=
val
},
},
onsubmit
()
{
async
onsubmit
()
{
debugger
let
baseInfo
=
await
this
.
$refs
.
baseInfo
.
onSubmit
()
let
deathRecordForm
=
await
this
.
$refs
.
deathRecordForm
.
onSubmit
()
let
params
=
{
residentsRecord
:
baseInfo
,
...
deathRecordForm
}
saveResidentsDeath
(
params
).
then
(
res
=>
{
this
.
$message
.
success
(
'新增成功'
)
this
.
$router
.
back
()
})
},
},
toBack
()
{
toBack
()
{
...
...
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