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
0abc7c96
Commit
0abc7c96
authored
Jan 06, 2025
by
songrui
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
诊断 接口对接
parent
90fe4509
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
246 additions
and
16 deletions
+246
-16
disease.js
src/api/doctor/disease.js
+6
-0
Doctor.vue
src/doctor/Doctor.vue
+1
-1
CheckBtn.vue
src/doctor/components/checkBtn/CheckBtn.vue
+4
-0
Instpect.vue
src/doctor/diagnose/common/Instpect.vue
+2
-2
DiagnoseForm.vue
src/doctor/diagnose/form/DiagnoseForm.vue
+28
-6
DiseaseSelect.vue
src/doctor/diagnose/form/DiseaseSelect.vue
+14
-1
DoctorInfo.vue
src/doctor/diagnose/form/DoctorInfo.vue
+161
-0
FormCont.vue
src/doctor/diagnose/form/FormCont.vue
+0
-0
FirstForm.vue
src/doctor/screening/first/FirstForm.vue
+13
-5
index.js
src/doctor/store/index.js
+6
-0
register.js
src/register.js
+11
-1
No files found.
src/api/doctor/disease.js
View file @
0abc7c96
...
...
@@ -18,4 +18,9 @@ export function getInspectCode(configType) {
//查询疾病编码(诊断名称)
export
function
queryDiseaseCode
(
params
)
{
return
fetchBase
({
url
:
`/chronic-admin/v1/chronic-disease-code/icd-list`
,
body
:
params
,
loading
:
true
})
}
//获取诊断详细信息
export
function
getDiagnoseDetail
(
id
){
return
fetchBase
({
url
:
`/chronic-admin/v1/chronic-diagnose-record/record`
,
body
:{
id
:
id
},
loading
:
true
})
}
\ No newline at end of file
src/doctor/Doctor.vue
View file @
0abc7c96
...
...
@@ -66,7 +66,7 @@ export default {
if
(
!
token
)
{
token
=
sessionStorage
.
getItem
(
'token'
)
if
(
process
.
env
.
NODE_ENV
!==
'production'
)
{
token
=
'
0d1698ec-49a1-40db-bbfa-bcdf5b16d13
b'
token
=
'
f44efca7-3c9b-4638-b8b0-8e35c6fbb54
b'
}
}
if
(
token
)
{
...
...
src/doctor/components/checkBtn/CheckBtn.vue
View file @
0abc7c96
...
...
@@ -45,6 +45,9 @@ export default {
methods
:
{
init
()
{
this
.
innerValue
=
this
.
value
this
.
multipleCheck
()
},
multipleCheck
()
{
if
(
this
.
multiple
)
{
if
(
this
.
value
!=
null
&&
!
Array
.
isArray
(
this
.
value
))
{
console
.
warn
(
'CheckBtn: multiple must be Array type'
)
...
...
@@ -92,6 +95,7 @@ export default {
value
:
{
handler
(
value
)
{
this
.
innerValue
=
value
this
.
multipleCheck
()
},
immediate
:
true
},
...
...
src/doctor/diagnose/common/Instpect.vue
View file @
0abc7c96
...
...
@@ -98,10 +98,10 @@
@
change=
"onSelectInputConfirm"
></InputSelect>
</div>
<van-field
name=
"imageData"
class=
"no-back
mb-2
"
class=
"no-back"
label=
"图片上传"
label-align=
"top"
style=
"
order: 99
"
>
style=
"
padding: 0
"
>
<
template
#
input
>
<DocImageUpload
:imageData=
"imageData"
@
change=
"(ids, option) => image = ids"
...
...
src/doctor/diagnose/form/DiagnoseForm.vue
View file @
0abc7c96
...
...
@@ -3,9 +3,12 @@
<DocNavBar
:title=
"`$
{id ? '修改' : '新增'}慢病诊断`" class="shrink-0"
:backFunc="onBack">
</DocNavBar>
<div
class=
"p-4 overflow-y-auto grow"
ref=
"all"
>
<DiseaseSelect
v-if=
"step == 1"
:excludeType=
"excludeType"
ref=
"DiseaseSelect"
/>
<DiseaseSelect
v-if=
"step == 1"
:excludeType=
"excludeType"
:value=
"diseaseType"
ref=
"DiseaseSelect"
/>
<archiveCommon
:info=
"baseInfo"
v-else-if=
"step == 2"
></archiveCommon>
<FormCont
:diseaseType=
"innerDiseaseType"
v-else-if=
"step == 3"
/>
<FormCont
:
info=
"diagnoseInfo"
:
diseaseType=
"innerDiseaseType"
v-else-if=
"step == 3"
/>
</div>
<div
class=
"shrink-0"
>
<div
class=
'bottom-small-line'
></div>
...
...
@@ -36,8 +39,10 @@ import DocNavBar from '@/doctor/components/docNavBar/DocNavBar.vue'
import
archiveCommon
from
'@/doctor/components/archiveCommon/archiveCommon.vue'
import
DiseaseSelect
from
'./DiseaseSelect.vue'
import
FormCont
from
'./FormCont.vue'
import
{
fetchDataHandle
}
from
'@/utils/common.js'
import
{
getChronicResidentsId
}
from
'@/api/doctor/generalFU'
import
{
showSuccessToast
}
from
'vant'
import
{
getDiagnoseDetail
}
from
'@/api/doctor/disease.js'
export
default
{
components
:
{
...
...
@@ -51,6 +56,8 @@ export default {
step
:
1
,
// 患者基础信息
baseInfo
:
{},
// 诊断信息
diagnoseInfo
:
{},
innerDiseaseType
:
null
}
},
...
...
@@ -59,11 +66,15 @@ export default {
return
this
.
$route
.
query
.
id
},
diseaseType
()
{
return
this
.
$route
.
query
.
diseaseType
const
val
=
this
.
$route
.
query
.
diseaseType
return
val
?
+
val
:
undefined
},
residentInfoId
()
{
return
this
.
$route
.
query
.
residentInfoId
},
idCard
()
{
return
this
.
$route
.
query
.
idCard
},
excludeType
()
{
const
excludeType
=
this
.
$route
.
query
.
excludeType
return
excludeType
&&
excludeType
.
split
(
','
).
map
(
e
=>
Number
(
e
))
...
...
@@ -75,10 +86,21 @@ export default {
methods
:
{
async
init
()
{
if
(
this
.
id
)
{
const
res
=
await
getDiagnoseDetail
(
this
.
id
)
const
result
=
res
.
data
||
{}
this
.
diagnoseInfo
=
fetchDataHandle
(
result
,
{
diagnoseResult
:
'strToArrNum'
})
this
.
baseInfo
=
result
.
residentsRecord
||
{}
}
else
{
let
res
=
await
getChronicResidentsId
(
this
.
residentInfoId
)
this
.
baseInfo
=
res
.
data
||
{}
if
(
this
.
residentInfoId
)
{
let
res
=
await
getChronicResidentsId
(
this
.
residentInfoId
)
this
.
baseInfo
=
res
.
data
||
{}
this
.
diagnoseInfo
.
residentInfoId
=
this
.
residentInfoId
}
else
if
(
this
.
idCard
)
{
// 新建用户
this
.
baseInfo
.
idCard
=
this
.
idCard
}
}
},
submit
()
{
...
...
src/doctor/diagnose/form/DiseaseSelect.vue
View file @
0abc7c96
...
...
@@ -21,7 +21,8 @@ import { useStore } from '@/doctor/store/index.js'
export
default
{
props
:
{
// 排除已选择的疾病
excludeType
:
{
default
:
()
=>
[]
}
excludeType
:
{
default
:
()
=>
[]
},
value
:
{
default
:
()
=>
[]
}
},
data
()
{
return
{
...
...
@@ -33,6 +34,10 @@ export default {
methods
:
{
onSelect
(
item
)
{
if
(
this
.
excludeType
.
includes
(
item
.
value
))
return
if
(
this
.
value
)
{
this
.
$message
.
info
(
'编辑状态下 慢病类型 无法修改'
)
return
}
this
.
diseaseType
=
item
.
value
},
submit
()
{
...
...
@@ -45,6 +50,14 @@ export default {
resolve
(
this
.
diseaseType
)
})
}
},
watch
:
{
value
:
{
handler
(
val
)
{
this
.
diseaseType
=
val
},
immediate
:
true
}
}
}
</
script
>
...
...
src/doctor/diagnose/form/DoctorInfo.vue
0 → 100644
View file @
0abc7c96
<
template
>
<van-form
ref=
'form'
class=
"doc-form doctor-info"
>
<div
class=
"doc-form-label"
required
>
筛查单位
</div>
<van-field
is-link
v-model=
'form.diseaseUnitName'
readonly
placeholder=
'请选择'
name=
"diseaseUnitId"
/>
<div
class=
"doc-form-label"
required
>
筛查科室
</div>
<van-field
is-link
v-model=
'form.diseaseOfficeName'
readonly
placeholder=
'请选择'
name=
"diseaseOfficeId"
@
click=
"showOffice = true"
:rules=
"[
{ required: true, message: '请选择' }]"
/>
<DocOffice
v-model:show=
"showOffice"
v-model:value=
"form.diseaseOfficeId"
:unitId=
"form.diseaseUnitId"
@
change=
"officeChange"
/>
<div
class=
"doc-form-label"
required
>
筛查医生
</div>
<van-field
is-link
v-model=
'form.diseaseDoctorName'
readonly
placeholder=
'请选择'
name=
"diseaseDoctorId"
@
click=
"showDoctor = true"
:rules=
"[
{ required: true, message: '请选择' }]"
/>
<DocOfficeDoctor
v-model:show=
"showDoctor"
:allowClear=
"false"
v-model:value=
"form.diseaseDoctorId"
:unitId=
"form.diseaseUnitId"
:officeId=
"form.diseaseOfficeId"
@
change=
"(option) =>
{ form.diseaseDoctorName = option.staffName }"
/>
</van-form>
</
template
>
<
script
>
import
{
useStore
}
from
'@/doctor/store'
import
dayjs
from
'dayjs'
import
DocOffice
from
'@/doctor/components/docOffice/DocOffice.vue'
import
DocOfficeDoctor
from
'@/doctor/components/docOfficeDoctor/DocOfficeDoctor.vue'
const
defaultForm
=
(
info
=
{})
=>
{
const
form
=
{
createDate
:
undefined
,
// 诊断单位
diseaseUnitId
:
undefined
,
diseaseUnitName
:
undefined
,
// 诊断科室
diseaseOfficeId
:
undefined
,
diseaseOfficeName
:
undefined
,
// 诊断医生
diseaseDoctorId
:
undefined
,
diseaseDoctorName
:
undefined
,
// 录入单位
createUnitId
:
undefined
,
createUnitName
:
undefined
,
// 录入科室
createOfficeId
:
undefined
,
createOfficeName
:
undefined
,
// 录入医生
createDoctorId
:
undefined
,
createDoctorName
:
undefined
}
Reflect
.
ownKeys
(
form
).
forEach
(
key
=>
{
if
(
info
[
key
]
!=
undefined
)
{
form
[
key
]
=
info
[
key
]
}
})
return
form
}
export
default
{
components
:
{
DocOffice
,
DocOfficeDoctor
},
props
:
{
info
:
{
default
:
()
=>
({})
}
},
data
()
{
return
{
form
:
{},
store
:
useStore
(),
showUnit
:
false
,
showOffice
:
false
,
showDoctor
:
false
}
},
computed
:
{
authInfo
()
{
return
this
.
store
.
authInfo
}
},
methods
:
{
initForm
()
{
this
.
form
.
createDate
=
dayjs
().
format
(
'YYYY-MM-DD'
)
// 诊断单位
this
.
form
.
diseaseUnitId
=
this
.
authInfo
.
unitId
this
.
form
.
diseaseUnitName
=
this
.
authInfo
.
unitName
// 诊断科室
this
.
form
.
diseaseOfficeId
=
this
.
authInfo
.
officeId
this
.
form
.
diseaseOfficeName
=
this
.
authInfo
.
officeName
// 诊断医生
this
.
form
.
diseaseDoctorId
=
this
.
authInfo
.
relationId
this
.
form
.
diseaseDoctorName
=
this
.
authInfo
.
nickName
// 录入单位
this
.
form
.
createUnitId
=
this
.
authInfo
.
unitId
this
.
form
.
createUnitName
=
this
.
authInfo
.
unitName
// 录入科室
this
.
form
.
createOfficeId
=
this
.
authInfo
.
officeId
this
.
form
.
createOfficeName
=
this
.
authInfo
.
officeName
// 录入医生
this
.
form
.
createDoctorId
=
this
.
authInfo
.
relationId
this
.
form
.
createDoctorName
=
this
.
authInfo
.
nickName
},
unitChange
(
option
=
{})
{
this
.
form
.
diseaseUnitName
=
option
.
unitName
this
.
form
.
diseaseDoctorId
=
undefined
this
.
form
.
diseaseDoctorName
=
undefined
this
.
form
.
diseaseOfficeId
=
undefined
this
.
form
.
diseaseOfficeName
=
undefined
},
officeChange
(
option
=
{})
{
this
.
form
.
diseaseOfficeName
=
option
.
officeName
this
.
form
.
diseaseDoctorId
=
undefined
this
.
form
.
diseaseDoctorName
=
undefined
},
submit
()
{
return
new
Promise
((
resolve
,
reject
)
=>
{
this
.
$refs
.
form
.
validate
().
then
(()
=>
{
resolve
(
this
.
form
)
}).
catch
((
e
)
=>
{
reject
(
e
)
})
})
}
},
watch
:
{
info
:
{
handler
(
info
)
{
this
.
form
=
defaultForm
(
info
)
if
(
!
this
.
info
.
id
)
{
this
.
initForm
()
}
},
immediate
:
true
}
}
}
</
script
>
<
style
lang=
"less"
scoped
></
style
>
src/doctor/diagnose/form/FormCont.vue
View file @
0abc7c96
This diff is collapsed.
Click to expand it.
src/doctor/screening/first/FirstForm.vue
View file @
0abc7c96
...
...
@@ -58,7 +58,10 @@ export default {
},
residentInfoId
()
{
return
this
.
$route
.
query
.
residentInfoId
}
},
idCard
()
{
return
this
.
$route
.
query
.
idCard
},
},
created
()
{
this
.
init
()
...
...
@@ -76,10 +79,15 @@ export default {
this
.
baseInfo
=
this
.
screenInfo
.
residentsRecord
console
.
log
(
this
.
screenInfo
)
}
else
{
let
res
=
await
getChronicResidentsId
(
this
.
residentInfoId
)
this
.
baseInfo
=
res
.
data
||
{}
this
.
screenInfo
.
currentAge
=
this
.
baseInfo
.
currentAge
this
.
screenInfo
.
residentInfoId
=
this
.
residentInfoId
if
(
this
.
residentInfoId
)
{
let
res
=
await
getChronicResidentsId
(
this
.
residentInfoId
)
this
.
baseInfo
=
res
.
data
||
{}
this
.
screenInfo
.
currentAge
=
this
.
baseInfo
.
currentAge
this
.
screenInfo
.
residentInfoId
=
this
.
residentInfoId
}
else
if
(
this
.
idCard
)
{
// 新建用户
this
.
baseInfo
.
idCard
=
this
.
idCard
}
}
},
toNext
(
val
)
{
...
...
src/doctor/store/index.js
View file @
0abc7c96
...
...
@@ -29,6 +29,12 @@ export const useStore = defineStore('chronic', {
if
(
!
array
||
!
array
.
length
)
{
return
''
}
if
(
value
instanceof
Array
)
{
return
value
.
map
(
v
=>
{
let
temp
=
array
.
find
(
e
=>
e
.
value
==
v
)
||
{}
return
temp
.
name
||
''
}).
filter
(
e
=>
e
).
join
(
'、'
)
}
let
temp
=
array
.
find
(
e
=>
e
.
value
==
value
)
||
{}
return
temp
.
name
||
''
},
...
...
src/register.js
View file @
0abc7c96
...
...
@@ -64,8 +64,18 @@ function setDirective(app) {
app
.
directive
(
'destory'
,
{
beforeUnmount
(
el
,
binding
,
vnode
,
prevVnod
)
{
const
field
=
binding
.
arg
const
form
=
binding
.
value
const
value
=
binding
.
value
const
modifiers
=
binding
.
modifiers
if
(
value
instanceof
Array
)
{
const
form
=
value
[
0
]
for
(
let
i
=
1
;
i
<
value
.
length
;
i
++
)
{
if
(
form
[
value
[
i
]]
!=
null
)
{
form
[
value
[
i
]]
=
modifiers
.
string
?
''
:
undefined
}
}
return
}
const
form
=
value
if
(
form
&&
field
&&
form
[
field
]
!=
null
)
{
form
[
field
]
=
modifiers
.
string
?
''
:
undefined
}
...
...
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