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
d56bbee8
Commit
d56bbee8
authored
Sep 06, 2024
by
gengchunlei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
慢综 医生端 随访表单接口对接
parent
cf6ad67a
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
130 additions
and
31 deletions
+130
-31
generalFU.js
src/api/doctor/generalFU.js
+27
-2
Doctor.vue
src/doctor/Doctor.vue
+1
-1
Detail.vue
src/doctor/followUp/generalFU/detail/Detail.vue
+2
-1
BaseInfo.vue
src/doctor/followUp/generalFU/form/BaseInfo.vue
+7
-1
GeneralFUForm.vue
src/doctor/followUp/generalFU/form/GeneralFUForm.vue
+13
-11
Index.vue
src/doctor/followUp/generalFU/form/Index.vue
+77
-12
vue.config.js
vue.config.js
+3
-3
No files found.
src/api/doctor/generalFU.js
View file @
d56bbee8
import
{
fetchBase
}
from
'@/api/doctor/doctorFetch'
import
{
fetchBase
}
from
'@/api/doctor/doctorFetch'
//获取登录信息
export
function
getAuthInfo
()
{
...
...
@@ -7,7 +7,11 @@ export function getAuthInfo() {
//查询居民信息
export
function
getChronicResidentsId
(
residentInfoId
)
{
return
fetchBase
({
url
:
`/chronic-admin/v1/chronic-residents-record/resident-info`
,
body
:{
"residentInfoId"
:
residentInfoId
},
loading
:
true
})
return
fetchBase
({
url
:
`/chronic-admin/v1/chronic-residents-record/resident-info`
,
body
:
{
'residentInfoId'
:
residentInfoId
},
loading
:
true
})
}
// 主键查询
...
...
@@ -38,4 +42,24 @@ export function getOfficeList(unitId) {
// 根据科室id查询医生
export
function
getOfficeDoctor
(
unitId
,
officeId
)
{
return
fetchBase
({
url
:
`/tumour-admin/v1/sys-user/org-office-doctors/
${
unitId
}
/
${
officeId
}
`
})
}
// 新增通用随访
export
function
addCurrency
(
params
)
{
return
fetchBase
({
url
:
`/chronic-admin/v1/chronic-visit-currency/save`
,
body
:
params
,
loading
:
true
})
}
//修改通用随访
export
function
updateCurrency
(
params
)
{
return
fetchBase
({
url
:
`/chronic-admin/v1/chronic-visit-currency/update`
,
body
:
params
,
loading
:
true
})
}
//图片上传
export
function
upLoadMultifile
(
params
)
{
return
fetchBase
({
url
:
`/chronic-admin/v1/pictures-info/multifile`
,
body
:
params
,
loading
:
false
,
contentType
:
'file'
})
}
\ No newline at end of file
src/doctor/Doctor.vue
View file @
d56bbee8
...
...
@@ -46,7 +46,7 @@ export default {
let
token
=
getQueryVariable
(
'token'
)
if
(
!
token
)
{
// token = sessionStorage.getItem('token')
token
=
'
842c7b77-9f98-43b7-bfe4-909d22472904
'
token
=
'
4a3719ad-a7d8-47ae-accc-3e332ac2117b
'
}
if
(
token
)
{
sessionStorage
.
setItem
(
'token'
,
token
)
...
...
src/doctor/followUp/generalFU/detail/Detail.vue
View file @
d56bbee8
...
...
@@ -135,6 +135,7 @@
<
script
>
import
{
fetchCurrencyById
}
from
'@/api/doctor/generalFU'
import
{
showToast
}
from
'vant'
export
default
{
name
:
'Detail'
,
...
...
@@ -205,7 +206,7 @@ export default {
methods
:
{
async
load
()
{
if
(
!
this
.
routerDetail
.
relationId
)
{
this
.
$message
.
info
(
'未获取到信息'
)
showToast
(
'未获取到信息'
);
return
}
let
par
=
{
...
...
src/doctor/followUp/generalFU/form/BaseInfo.vue
View file @
d56bbee8
...
...
@@ -453,6 +453,7 @@ import dayjs from 'dayjs'
const
defaultForm
=
(
info
=
{})
=>
{
const
form
=
{
id
:
undefined
,
personId
:
undefined
,
residentInfoId
:
undefined
,
// 年龄
currentAge
:
undefined
,
...
...
@@ -666,6 +667,7 @@ export default {
return
new
Promise
((
resolve
,
reject
)
=>
{
this
.
$refs
.
form
.
validate
().
then
(()
=>
{
const
{
personId
,
visitSituation
,
lossReason
,
deathReason
,
...
...
@@ -685,8 +687,12 @@ export default {
visitWay
,
isHealthGuide
,
screenTime
,
residentInfoId
:
this
.
form
.
residentInfoId
,
urgentInsContent
:
content
,
residentsRecord
:
{...
others
},
residentsRecord
:
{
...
others
,
id
:
this
.
form
.
personId
,
},
}
resolve
(
fetchDataHandle
(
par
,
{
...
...
src/doctor/followUp/generalFU/form/GeneralFUForm.vue
View file @
d56bbee8
...
...
@@ -64,7 +64,7 @@
<div>
<doc-icon
type=
'doc-remove'
class=
'remove'
@
click=
'delImg(item.indexF)'
></doc-icon>
</div>
<img
:src=
'item.
src
'
class=
'ml-2'
style=
'width: 95px;height: 95px;'
<img
:src=
'item.
trueDownloadUrl
'
class=
'ml-2'
style=
'width: 95px;height: 95px;'
@
click=
'toPreview(index)'
>
</div>
</div>
...
...
@@ -112,7 +112,7 @@
<div>
<doc-icon
type=
'doc-remove'
class=
'remove'
@
click=
'delImg2(item.indexF)'
></doc-icon>
</div>
<img
:src=
'item.
src
'
class=
'ml-2'
style=
'width: 95px;height: 95px;'
<img
:src=
'item.
trueDownloadUrl
'
class=
'ml-2'
style=
'width: 95px;height: 95px;'
@
click=
'toPreview(index)'
>
</div>
</div>
...
...
@@ -187,9 +187,6 @@ export default {
imgList
:
[],
imgList2
:
[],
showDate
:
false
,
showOne
:
false
,
showTwo
:
false
,
showThree
:
false
,
rules
:
{
nextVisitDate
:
[{
required
:
true
,
message
:
'请选择'
}]
}
...
...
@@ -199,6 +196,10 @@ export default {
'info'
:
{
handler
()
{
this
.
form
=
this
.
setForm
(
this
.
info
)
if
(
this
.
info
.
id
)
{
this
.
imgList
=
this
.
info
.
uploadVisitRecordImageList
||
[]
this
.
imgList2
=
this
.
info
.
sceneVisitImageList
||
[]
}
},
immediate
:
true
},
...
...
@@ -291,7 +292,7 @@ export default {
let
maxIndexF
=
Math
.
max
(...
this
.
imgList
.
map
(
item
=>
item
.
indexF
));
newFile
.
forEach
((
item
,
index
)
=>
{
item
[
'indexF'
]
=
maxIndexF
+
index
+
1
item
[
'
src
'
]
=
window
.
URL
.
createObjectURL
(
item
)
item
[
'
trueDownloadUrl
'
]
=
window
.
URL
.
createObjectURL
(
item
)
item
[
'imgFlag'
]
=
''
if
(
item
.
type
==
'application/pdf'
)
{
item
[
'imgFlag'
]
=
'pdf'
...
...
@@ -309,7 +310,7 @@ export default {
let
maxIndexF
=
Math
.
max
(...
this
.
imgList2
.
map
(
item
=>
item
.
indexF
));
newFile
.
forEach
((
item
,
index
)
=>
{
item
[
'indexF'
]
=
maxIndexF
+
index
+
1
item
[
'
src
'
]
=
window
.
URL
.
createObjectURL
(
item
)
item
[
'
trueDownloadUrl
'
]
=
window
.
URL
.
createObjectURL
(
item
)
item
[
'imgFlag'
]
=
''
if
(
item
.
type
==
'application/pdf'
)
{
item
[
'imgFlag'
]
=
'pdf'
...
...
@@ -324,7 +325,7 @@ export default {
toPreview
(
index
)
{
// let list = []
// this.imgList.forEach(item => {
// list.push(item.
src
)
// list.push(item.
trueDownloadUrl
)
// })
// showImagePreview({
// images: list,
...
...
@@ -335,7 +336,7 @@ export default {
},
//pdf预览
toPdf
(
item
)
{
// window.open(item.
src
)
// window.open(item.
trueDownloadUrl
)
},
delImg
(
index
)
{
this
.
imgList
=
this
.
imgList
.
filter
(
item
=>
item
.
indexF
!=
index
)
...
...
@@ -351,9 +352,10 @@ export default {
return
new
Promise
((
resolve
,
reject
)
=>
{
this
.
$refs
.
form
.
validate
().
then
(()
=>
{
let
par
=
{
img1
:
this
.
imgList
,
img2
:
this
.
imgList2
,
img1
:
this
.
imgList
||
[]
,
img2
:
this
.
imgList2
||
[]
,
...
this
.
form
,
healthGuideContent
:
JSON
.
stringify
(
this
.
form
.
visitHealthGuideList
)
}
resolve
(
par
)
}).
catch
((
e
)
=>
{
...
...
src/doctor/followUp/generalFU/form/Index.vue
View file @
d56bbee8
...
...
@@ -4,7 +4,8 @@
<div
class=
'p-4 h-overflow'
>
<base-info
:info=
'info'
v-show=
'step == 1'
ref=
'baseInfo'
@
changeVisitSituation=
'changeVisitSituation'
></base-info>
<general-f-u-form
:info=
'info'
:first-form=
'firstForm'
v-show=
'step == 2'
ref=
'generalFUForm'
></general-f-u-form>
<general-f-u-form
:info=
'info'
:first-form=
'firstForm'
v-show=
'step == 2'
ref=
'generalFUForm'
></general-f-u-form>
<common-bottom
:info=
'info'
v-show=
'step == 3'
ref=
'commonBottom'
></common-bottom>
</div>
<div
class=
'pt-2 pb-2'
>
...
...
@@ -37,7 +38,13 @@
<
script
>
import
BaseInfo
from
'@/doctor/followUp/generalFU/form/BaseInfo'
import
{
fetchCurrencyById
,
getChronicResidentsId
}
from
'@/api/doctor/generalFU'
import
{
addCurrency
,
fetchCurrencyById
,
getChronicResidentsId
,
updateCurrency
,
upLoadMultifile
}
from
'@/api/doctor/generalFU'
import
GeneralFUForm
from
'@/doctor/followUp/generalFU/form/GeneralFUForm'
import
CommonBottom
from
'@/doctor/followUp/generalFU/form/CommonBottom'
...
...
@@ -51,7 +58,7 @@ export default {
visitSituation
:
1
,
step
:
1
,
//第一步提交的表单
firstForm
:
{}
,
firstForm
:
{}
}
},
created
()
{
...
...
@@ -66,8 +73,20 @@ export default {
async
init
()
{
this
.
info
=
{}
const
res
=
await
getChronicResidentsId
(
this
.
routerDetail
.
residentInfoId
)
const
{
id
,
...
others
}
=
res
.
data
const
{
id
,
createDate
,
createDoctorId
,
createDoctorName
,
createOfficeId
,
createOfficeName
,
createUnitId
,
createUnitName
,
updated
,
...
others
}
=
res
.
data
this
.
info
=
{
personId
:
id
,
...
others
}
this
.
info
.
diseaseType
=
this
.
routerDetail
.
diseaseType
...
...
@@ -79,23 +98,69 @@ export default {
}
}
},
async
toNext
(
val
)
{
async
toNext
(
val
)
{
if
(
val
==
2
)
{
this
.
firstForm
=
await
this
.
$refs
.
baseInfo
.
onSubmit
()
}
if
(
val
==
3
)
{
if
(
val
==
3
)
{
await
this
.
$refs
.
generalFUForm
.
onSubmit
()
}
}
this
.
step
=
val
},
changeVisitSituation
(
val
)
{
this
.
visitSituation
=
val
},
async
onsubmit
()
{
let
baseInfo
=
await
this
.
$refs
.
baseInfo
.
onSubmit
()
let
generalFUForm
=
await
this
.
$refs
.
generalFUForm
.
onSubmit
()
let
commonBottom
=
await
this
.
$refs
.
commonBottom
.
onSubmit
()
},
//图片上传
async
upload
(
imgList
=
[])
{
let
list
=
[]
let
fileId
=
Math
.
random
().
toString
(
16
).
substring
(
2
,
8
)
let
data
=
new
FormData
()
data
.
append
(
'parentId'
,
fileId
)
imgList
.
forEach
(
item
=>
{
data
.
append
(
'files'
,
item
)
})
let
res
=
await
upLoadMultifile
(
data
)
let
result
=
res
.
data
||
[]
result
.
forEach
(
item
=>
{
list
.
push
(
item
.
id
)
})
return
list
.
join
()
},
async
onsubmit
()
{
debugger
let
baseInfo
=
await
this
.
$refs
.
baseInfo
.
onSubmit
()
let
generalFUForm
=
await
this
.
$refs
.
generalFUForm
.
onSubmit
()
let
commonBottom
=
await
this
.
$refs
.
commonBottom
.
onSubmit
()
let
uploadVisitRecord
=
''
let
sceneVisitImage
=
''
let
fileId2
=
Math
.
random
().
toString
(
16
).
substring
(
2
,
8
)
//图片上传
if
(
generalFUForm
.
img1
.
length
)
{
uploadVisitRecord
=
await
this
.
upload
(
generalFUForm
.
img1
)
}
if
(
generalFUForm
.
img2
.
length
)
{
sceneVisitImage
=
await
this
.
upload
(
generalFUForm
.
img2
)
}
let
params
=
{
...
baseInfo
,
...
generalFUForm
,
...
commonBottom
,
uploadVisitRecord
,
sceneVisitImage
}
if
(
this
.
info
.
id
)
{
params
.
visitRecordId
=
this
.
info
.
visitRecordId
}
if
(
params
.
visitSituation
==
2
)
{
params
.
visitWay
=
14
}
let
fun
=
this
.
info
.
id
?
updateCurrency
:
addCurrency
fun
(
params
,
true
).
then
(({
code
})
=>
{
if
(
code
==
'SUCCESS'
)
{
this
.
$router
.
back
()
}
})
},
toBack
()
{
if
(
this
.
visitSituation
==
1
)
{
if
(
this
.
step
!=
1
)
{
...
...
vue.config.js
View file @
d56bbee8
...
...
@@ -30,11 +30,11 @@ module.exports = defineConfig({
}
},
'/chronic-admin'
:
{
target
:
'https://beta-tumour.zmnyjk.com'
,
//
target: 'http://192.168.1.26:8900',
//
target: 'https://beta-tumour.zmnyjk.com',
target
:
'http://192.168.1.26:8900'
,
changOrigin
:
true
,
pathRewrite
:
{
'^/chronic-admin'
:
'/
chronic-admin
'
'^/chronic-admin'
:
'/'
}
},
'/chronic-resident'
:
{
...
...
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