Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
agcs2.0-web
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
liang
agcs2.0-web
Commits
c41edeb9
Commit
c41edeb9
authored
Mar 13, 2023
by
miaojiale
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.处理登录
2.随访录入 3.随访风险评估 4.随访查询联动
parent
86be8412
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
317 additions
and
118 deletions
+317
-118
patient.js
src/api/patient.js
+9
-0
index.vue
src/components/layout/index.vue
+2
-1
index.vue
src/layouts/components/NavBar/index.vue
+5
-3
index.vue
src/views/followupentry/index.vue
+47
-7
index.vue
src/views/followupquery/index.vue
+99
-59
index.vue
src/views/followupresearch/index.vue
+6
-1
ConfigForms.vue
src/views/screening/components/ConfigForms.vue
+101
-30
FormTab.vue
src/views/screening/components/FormTab.vue
+46
-16
mixin.js
src/views/screening/components/mixin.js
+2
-1
No files found.
src/api/patient.js
View file @
c41edeb9
...
@@ -69,6 +69,15 @@ export function getPatientDetail(params = {}) {
...
@@ -69,6 +69,15 @@ export function getPatientDetail(params = {}) {
})
})
}
}
/* 随访患者数据详情 */
export
function
getFollowDetail
(
params
=
{})
{
return
request
({
url
:
"
/disease-data/data/patient/follow/info
"
,
method
:
"
get
"
,
params
,
})
}
/* 获取表单填报记录list*/
/* 获取表单填报记录list*/
export
function
getRecordList
(
params
=
{})
{
export
function
getRecordList
(
params
=
{})
{
return
request
({
return
request
({
...
...
src/components/layout/index.vue
View file @
c41edeb9
...
@@ -135,7 +135,7 @@ export default {
...
@@ -135,7 +135,7 @@ export default {
},
},
],
],
},
},
allianceToken
:
getAccessToken
()
,
allianceToken
:
""
,
currentRoute
:
this
.
$route
.
path
,
currentRoute
:
this
.
$route
.
path
,
userInfo
:
{},
userInfo
:
{},
}
}
...
@@ -152,6 +152,7 @@ export default {
...
@@ -152,6 +152,7 @@ export default {
// if (localStorage.getItem('allianceToken')) {
// if (localStorage.getItem('allianceToken')) {
// this.$router.push('/datacenter/home')
// this.$router.push('/datacenter/home')
// }
// }
this
.
allianceToken
=
getAccessToken
()
this
.
userInfo
=
JSON
.
parse
(
localStorage
.
getItem
(
"
userInfo
"
))
this
.
userInfo
=
JSON
.
parse
(
localStorage
.
getItem
(
"
userInfo
"
))
},
},
methods
:
{
methods
:
{
...
...
src/layouts/components/NavBar/index.vue
View file @
c41edeb9
...
@@ -174,9 +174,11 @@ export default {
...
@@ -174,9 +174,11 @@ export default {
// this.getMessage()
// this.getMessage()
},
},
mounted
()
{
mounted
()
{
document
if
(
document
.
querySelector
(
"
.messageBox
"
))
{
.
querySelector
(
"
.messageBox
"
)
document
.
addEventListener
(
"
scroll
"
,
this
.
scrolling
)
.
querySelector
(
"
.messageBox
"
)
.
addEventListener
(
"
scroll
"
,
this
.
scrolling
)
}
},
},
methods
:
{
methods
:
{
scrolling
()
{
scrolling
()
{
...
...
src/views/followupentry/index.vue
View file @
c41edeb9
...
@@ -2,10 +2,14 @@
...
@@ -2,10 +2,14 @@
<!-- 随访调查录入 -->
<!-- 随访调查录入 -->
<div>
<div>
<ConfigForms
<ConfigForms
v-if=
"refreshFlag"
form-type=
"2"
form-type=
"2"
formClass=
"follow-form"
form-class=
"follow-form"
:disabled=
"false"
:disabled=
"disabled"
:patientId=
"patientId"
:tab-disabled=
"tabDisabled"
:get-data=
"getData"
:patient-id=
"patientId"
@
refreshData=
"refreshData"
></ConfigForms>
></ConfigForms>
</div>
</div>
</
template
>
</
template
>
...
@@ -18,12 +22,48 @@ export default {
...
@@ -18,12 +22,48 @@ export default {
ConfigForms
,
ConfigForms
,
},
},
data
()
{
data
()
{
return
{
patientId
:
""
}
return
{
disabled
:
false
,
tabDisabled
:
true
,
refreshFlag
:
true
,
}
},
},
created
()
{
provide
()
{
this
.
patientId
=
this
.
$route
.
query
.
patientId
return
{
tabFollowId
:
()
=>
this
.
followId
,
}
},
computed
:
{
patientId
()
{
return
this
.
$route
.
query
.
patientId
},
model
()
{
return
this
.
$route
.
query
.
model
},
followId
()
{
return
this
.
$route
.
query
.
followId
},
getData
()
{
return
Boolean
(
this
.
$route
.
query
.
getData
-
0
)
},
},
mounted
()
{
if
(
this
.
model
==
"
view
"
)
{
this
.
disabled
=
true
this
.
tabDisabled
=
false
}
else
{
this
.
disabled
=
false
this
.
tabDisabled
=
true
}
},
methods
:
{
refreshData
(
data
)
{
// this.refreshFlag = false
// this.$nextTick(() => {
// this.refreshFlag = true
// })
},
},
},
methods
:
{},
}
}
</
script
>
</
script
>
...
...
src/views/followupquery/index.vue
View file @
c41edeb9
...
@@ -2,7 +2,11 @@
...
@@ -2,7 +2,11 @@
<!-- 随访查询 -->
<!-- 随访查询 -->
<div
class=
"screeningSearch"
>
<div
class=
"screeningSearch"
>
<div
class=
"top"
>
<div
class=
"top"
>
<form-components
:forms=
"formList"
:formEdit=
"formEdit"
@
handleSearch=
"onSearch"
></form-components>
<form-components
:forms=
"formList"
:form-edit=
"formEdit"
@
handleSearch=
"onSearch"
></form-components>
</div>
</div>
<div
class=
"bot"
>
<div
class=
"bot"
>
<el-table-self
<el-table-self
...
@@ -31,11 +35,12 @@ import { getDictDetail } from "@/api/dict.js"
...
@@ -31,11 +35,12 @@ import { getDictDetail } from "@/api/dict.js"
export
default
{
export
default
{
components
:
{
components
:
{
FormComponents
,
FormComponents
,
CustomsTable
,
//
CustomsTable,
},
},
mixins
:
[
paginationMixin
],
mixins
:
[
paginationMixin
],
data
()
{
data
()
{
return
{
return
{
followId
:
""
,
listLoading
:
false
,
listLoading
:
false
,
keyword
:
""
,
keyword
:
""
,
modifiedFlag
:
false
,
modifiedFlag
:
false
,
...
@@ -61,7 +66,10 @@ export default {
...
@@ -61,7 +66,10 @@ export default {
minWidth
:
80
,
minWidth
:
80
,
value
:
"
sex
"
,
value
:
"
sex
"
,
formatter
:
(
row
)
=>
{
formatter
:
(
row
)
=>
{
return
this
.
$handle
.
formatDicList
(
this
.
dictMap
[
"
d-sex
"
],
row
.
sex
+
""
)
return
this
.
$handle
.
formatDicList
(
this
.
dictMap
[
"
d-sex
"
],
row
.
sex
+
""
)
},
},
},
},
{
{
...
@@ -93,7 +101,10 @@ export default {
...
@@ -93,7 +101,10 @@ export default {
minWidth
:
120
,
minWidth
:
120
,
value
:
"
riskRank
"
,
value
:
"
riskRank
"
,
formatter
:
(
row
)
=>
{
formatter
:
(
row
)
=>
{
return
this
.
$handle
.
formatDicList
(
this
.
dictMap
[
"
risk_level
"
],
String
(
row
.
riskRank
))
return
this
.
$handle
.
formatDicList
(
this
.
dictMap
[
"
risk_level
"
],
String
(
row
.
riskRank
)
)
},
},
},
},
{
{
...
@@ -109,7 +120,10 @@ export default {
...
@@ -109,7 +120,10 @@ export default {
value
:
"
followBatch
"
,
value
:
"
followBatch
"
,
minWidth
:
120
,
minWidth
:
120
,
formatter
:
(
row
)
=>
{
formatter
:
(
row
)
=>
{
return
this
.
$handle
.
formatDicList
(
this
.
dictMap
[
"
follow_type
"
],
String
(
row
.
followBatch
))
return
this
.
$handle
.
formatDicList
(
this
.
dictMap
[
"
follow_type
"
],
String
(
row
.
followBatch
)
)
},
},
},
},
{
{
...
@@ -119,7 +133,7 @@ export default {
...
@@ -119,7 +133,7 @@ export default {
operType
:
"
button
"
,
operType
:
"
button
"
,
operations
:
[
operations
:
[
{
{
isIndex
:
true
,
isIndex
:
true
,
func
:
this
.
rowOpration
,
func
:
this
.
rowOpration
,
formatter
(
row
)
{
formatter
(
row
)
{
return
{
return
{
...
@@ -129,8 +143,8 @@ export default {
...
@@ -129,8 +143,8 @@ export default {
},
},
},
},
{
{
isIndex
:
true
,
isIndex
:
true
,
func
:
this
.
rowOpration
,
func
:
this
.
handleEdit
,
formatter
(
row
)
{
formatter
(
row
)
{
if
(
row
.
checkStatus
!=
3
&&
row
.
checkStatus
!=
4
)
{
if
(
row
.
checkStatus
!=
3
&&
row
.
checkStatus
!=
4
)
{
return
{
return
{
...
@@ -164,7 +178,7 @@ export default {
...
@@ -164,7 +178,7 @@ export default {
type
:
"
select
"
,
type
:
"
select
"
,
label
:
"
随访审核状态
"
,
label
:
"
随访审核状态
"
,
prop
:
"
checkStatus
"
,
prop
:
"
checkStatus
"
,
trans
:
"
checkStatus
"
,
trans
:
"
checkStatus
"
,
placeholder
:
"
请选择随访状态
"
,
placeholder
:
"
请选择随访状态
"
,
rules
:
[],
rules
:
[],
opts
:
[],
opts
:
[],
...
@@ -173,7 +187,7 @@ export default {
...
@@ -173,7 +187,7 @@ export default {
type
:
"
select
"
,
type
:
"
select
"
,
label
:
"
随访进度
"
,
label
:
"
随访进度
"
,
prop
:
"
followBatch
"
,
prop
:
"
followBatch
"
,
trans
:
'
follow_type
'
,
trans
:
"
follow_type
"
,
placeholder
:
"
请选择随访进度
"
,
placeholder
:
"
请选择随访进度
"
,
rules
:
[],
rules
:
[],
opts
:
[],
opts
:
[],
...
@@ -182,7 +196,7 @@ export default {
...
@@ -182,7 +196,7 @@ export default {
type
:
"
select
"
,
type
:
"
select
"
,
label
:
"
计划随访时间
"
,
label
:
"
计划随访时间
"
,
prop
:
"
nextFollowTime
"
,
prop
:
"
nextFollowTime
"
,
trans
:
'
next_follow_time
'
,
trans
:
"
next_follow_time
"
,
placeholder
:
"
请选择计划随访时间
"
,
placeholder
:
"
请选择计划随访时间
"
,
rules
:
[],
rules
:
[],
opts
:
[],
opts
:
[],
...
@@ -233,25 +247,43 @@ export default {
...
@@ -233,25 +247,43 @@ export default {
],
],
},
},
],
],
formEdit
:
{}
formEdit
:
{},
}
}
},
},
watch
:
{
watch
:
{
pageSize
(
val
){
pageSize
(
val
)
{
sessionStorage
.
setItem
(
'
followQuery-pageSize
'
,
val
)
sessionStorage
.
setItem
(
"
followQuery-pageSize
"
,
val
)
},
},
//当前页
//当前页
pageIndex
(
val
){
pageIndex
(
val
)
{
sessionStorage
.
setItem
(
'
followQuery-pageIndex
'
,
val
)
sessionStorage
.
setItem
(
"
followQuery-pageIndex
"
,
val
)
}
},
followId
(
v
)
{
if
(
v
)
{
this
.
listLoading
=
true
this
.
$nextTick
(()
=>
{
setTimeout
(()
=>
{
this
.
listLoading
=
false
let
query
=
{
...
this
.
$route
.
query
}
this
.
$router
.
replace
({
query
:
{}
})
this
.
$router
.
push
({
path
:
"
/followupentry
"
,
query
:
query
,
})
},
500
)
})
}
},
},
},
created
(){
created
()
{
this
.
initSearchForm
()
this
.
initSearchForm
()
},
},
mounted
()
{
mounted
()
{
this
.
followId
=
this
.
$route
.
query
.
followId
// this.formEdit = sessionStorage.getItem('followQuery-form') ? JSON.parse(sessionStorage.getItem('followQuery-form')) : {}
// this.formEdit = sessionStorage.getItem('followQuery-form') ? JSON.parse(sessionStorage.getItem('followQuery-form')) : {}
this
.
pageSize
=
Number
(
sessionStorage
.
getItem
(
'
followQuery-pageSize
'
))
||
10
this
.
pageSize
=
Number
(
sessionStorage
.
getItem
(
"
followQuery-pageSize
"
))
||
10
this
.
pageIndex
=
Number
(
sessionStorage
.
getItem
(
'
followQuery-pageIndex
'
))
||
1
this
.
pageIndex
=
Number
(
sessionStorage
.
getItem
(
"
followQuery-pageIndex
"
))
||
1
this
.
getCurrentFormByType
(
2
)
this
.
getCurrentFormByType
(
2
)
},
},
methods
:
{
methods
:
{
...
@@ -266,69 +298,77 @@ export default {
...
@@ -266,69 +298,77 @@ export default {
handleSizeChange
(
v
)
{
handleSizeChange
(
v
)
{
console
.
log
(
v
)
console
.
log
(
v
)
},
},
rowOpration
(
data
,
i
,
index
)
{
handleEdit
(
data
,
i
,
index
)
{
let
model
=
0
this
.
$router
.
push
({
switch
(
index
){
path
:
"
/followupentry
"
,
case
0
:
query
:
{
model
=
'
view
'
patientId
:
data
.
patientId
,
break
;
followId
:
data
.
id
,
case
1
:
model
:
"
edit
"
,
model
=
'
edit
'
getData
:
1
,
break
;
},
}
})
this
.
$router
.
push
({
path
:
"
/followupentry
"
,
query
:{
patientId
:
data
.
patientId
,
model
:
model
}})
},
rowOpration
(
data
,
i
,
index
)
{
this
.
$router
.
push
({
path
:
"
/followupentry
"
,
query
:
{
patientId
:
data
.
patientId
,
followId
:
data
.
id
,
model
:
"
view
"
,
getData
:
1
,
},
})
},
},
onSearch
(
form
)
{
onSearch
(
form
)
{
sessionStorage
.
setItem
(
'
followQuery-form
'
,
JSON
.
stringify
(
form
))
sessionStorage
.
setItem
(
"
followQuery-form
"
,
JSON
.
stringify
(
form
))
this
.
formEdit
=
form
this
.
formEdit
=
form
this
.
handleSearch
()
this
.
handleSearch
()
},
},
async
handleSearch
(){
async
handleSearch
()
{
this
.
listLoading
=
true
this
.
listLoading
=
true
let
params
=
{
let
params
=
{
pageSize
:
this
.
pageSize
,
pageSize
:
this
.
pageSize
,
pageNum
:
this
.
pageIndex
,
pageNum
:
this
.
pageIndex
,
formId
:
this
.
formId
,
formId
:
this
.
formId
,
patientFrom
:
sessionStorage
.
getItem
(
'
selectedIndex
'
)
//筛查场景
patientFrom
:
sessionStorage
.
getItem
(
"
selectedIndex
"
),
//筛查场景
}
}
if
(
this
.
formEdit
)
{
if
(
this
.
formEdit
)
{
params
=
Object
.
assign
(
this
.
formEdit
,
params
)
params
=
Object
.
assign
(
this
.
formEdit
,
params
)
}
}
let
res
=
await
getFollowSearch
(
params
)
let
res
=
await
getFollowSearch
(
params
)
if
(
res
.
code
==
1
)
{
if
(
res
.
code
==
1
)
{
//分页内容
//分页内容
const
d
=
res
.
data
const
d
=
res
.
data
this
.
total
=
d
.
total
this
.
total
=
d
.
total
this
.
tableData
=
d
[
'
records
'
]
this
.
tableData
=
d
[
"
records
"
]
}
}
this
.
listLoading
=
false
this
.
listLoading
=
false
},
},
//查询表单枚举值字典
//查询表单枚举值字典
initSearchForm
(){
initSearchForm
()
{
this
.
formList
.
forEach
((
item
,
index
)
=>
{
this
.
formList
.
forEach
((
item
,
index
)
=>
{
if
(
item
.
trans
){
if
(
item
.
trans
)
{
if
(
!
item
[
'
opts
'
]){
if
(
!
item
[
"
opts
"
])
{
item
[
'
opts
'
]
=
[]
item
[
"
opts
"
]
=
[]
}
}
else
{
else
{
item
[
"
opts
"
]
=
this
.
dictMap
[
item
.
trans
]
item
[
'
opts
'
]
=
this
.
dictMap
[
item
.
trans
]
}
}
}
}
})
})
this
.
$forceUpdate
()
;
this
.
$forceUpdate
()
},
},
//获取随访表单类型
//获取随访表单类型
getCurrentFormByType
(
type
)
{
getCurrentFormByType
(
type
)
{
getCurrentFormByType
({
getCurrentFormByType
({
type
,
type
,
groupId
:
this
.
$store
.
state
.
user
.
group
.
groupId
||
''
,
groupId
:
this
.
$store
.
state
.
user
.
group
.
groupId
||
""
,
}).
then
((
res
)
=>
{
if
(
res
.
code
===
1
)
{
this
.
formId
=
res
.
data
[
0
].
id
this
.
handleSearch
()
}
})
})
.
then
((
res
)
=>
{
if
(
res
.
code
===
1
)
{
this
.
formId
=
res
.
data
[
0
].
id
this
.
handleSearch
()
}
})
},
},
},
},
}
}
...
...
src/views/followupresearch/index.vue
View file @
c41edeb9
...
@@ -284,7 +284,12 @@ export default {
...
@@ -284,7 +284,12 @@ export default {
console
.
log
(
"
跳转
"
,
data
,
i
)
console
.
log
(
"
跳转
"
,
data
,
i
)
sessionStorage
.
setItem
(
"
formEdit
"
,
JSON
.
stringify
(
data
))
sessionStorage
.
setItem
(
"
formEdit
"
,
JSON
.
stringify
(
data
))
this
.
$router
.
push
({
this
.
$router
.
push
({
path
:
`/followupentry?patientId=
${
data
.
patientId
}
`
,
path
:
`/followupentry`
,
query
:
{
patientId
:
data
.
patientId
,
getData
:
0
,
model
:
"
add
"
,
},
})
})
},
},
async
handleSearch
()
{
async
handleSearch
()
{
...
...
src/views/screening/components/ConfigForms.vue
View file @
c41edeb9
...
@@ -40,15 +40,16 @@
...
@@ -40,15 +40,16 @@
:patient-standby-id=
"patientStandbyId"
:patient-standby-id=
"patientStandbyId"
:newform-record-id=
"newformRecordId"
:newform-record-id=
"newformRecordId"
:form=
"form"
:form=
"form"
:formType=
"formType"
:form-type=
"formType"
:get-data=
"getData"
:disabled=
"disabled"
:disabled=
"disabled"
:operation=
"operation"
:operation=
"operation"
:is
D
raft=
"isDraft"
:is
-d
raft=
"isDraft"
:active-name=
"activeName"
:active-name=
"activeName"
contrast
contrast
:form-initial=
"formInitial"
:form-initial=
"formInitial"
:survival-flag=
"survivalFlag"
:survival-flag=
"survivalFlag"
:follow
I
d=
"followId"
:follow
-i
d=
"followId"
@
setFormJson=
"setFormJson"
@
setFormJson=
"setFormJson"
@
handleConfirm=
"handleConfirm"
@
handleConfirm=
"handleConfirm"
@
onPrev=
"onPrev"
@
onPrev=
"onPrev"
...
@@ -61,6 +62,7 @@
...
@@ -61,6 +62,7 @@
</el-tabs>
</el-tabs>
</div>
</div>
<el-empty
v-else
description=
"暂无数据"
></el-empty>
<el-empty
v-else
description=
"暂无数据"
></el-empty>
<!-- 筛查提交弹窗 -->
<public-dialog
ref=
"showDialog"
:show-close=
"true"
>
<public-dialog
ref=
"showDialog"
:show-close=
"true"
>
<!-- 保存草稿 -->
<!-- 保存草稿 -->
<
template
v-if=
"dialogType == 'draft'"
slot=
"content"
>
<
template
v-if=
"dialogType == 'draft'"
slot=
"content"
>
...
@@ -100,6 +102,35 @@
...
@@ -100,6 +102,35 @@
</div>
</div>
</
template
>
</
template
>
</public-dialog>
</public-dialog>
<!-- 随访提交弹窗 -->
<public-dialog
ref=
"followDialog"
:show-close=
"true"
>
<!-- 保存提交 -->
<
template
slot=
"content"
>
<div
class=
"title center"
>
提交成功!
</div>
<div
class=
"content center"
>
<div
class=
"img"
>
<img
src=
"~@/assets/img/DataCenter/submit.png"
alt
/>
</div>
<div
class=
"showTips"
>
您可以在【随访查询】页面查询到该数据
</div>
</div>
<div
class=
"btn"
>
<el-button
type=
"primary"
:loading=
"loading"
class=
"textBtn"
@
click=
"viewJumpFollow"
>
查看
</el-button
>
<el-button
v-if=
"formType != 2"
type=
"primary"
:loading=
"loading"
@
click=
"continueSubmit"
>
继续添加
</el-button
>
</div>
</
template
>
</public-dialog>
</div>
</div>
</template>
</template>
...
@@ -107,7 +138,7 @@
...
@@ -107,7 +138,7 @@
import
mixin
from
"
./mixin
"
import
mixin
from
"
./mixin
"
import
CustomForm
from
"
@/components/FormComponents/CustomForm/index
"
import
CustomForm
from
"
@/components/FormComponents/CustomForm/index
"
import
publicDialog
from
"
../../audit-detail/components/publicDialog.vue
"
import
publicDialog
from
"
../../audit-detail/components/publicDialog.vue
"
import
{
getPatientDetail
}
from
"
@/api/patient.js
"
import
{
getPatientDetail
,
getFollowDetail
}
from
"
@/api/patient.js
"
export
default
{
export
default
{
name
:
"
ConfigForms
"
,
name
:
"
ConfigForms
"
,
...
@@ -121,6 +152,13 @@ export default {
...
@@ -121,6 +152,13 @@ export default {
formClass
:
String
,
formClass
:
String
,
operation
:
String
,
operation
:
String
,
isDraft
:
String
,
isDraft
:
String
,
getData
:
{
type
:
Boolean
,
default
:
true
},
},
inject
:
{
tabFollowId
:
{
type
:
String
,
default
:
""
,
},
},
},
data
()
{
data
()
{
return
{
return
{
...
@@ -133,6 +171,9 @@ export default {
...
@@ -133,6 +171,9 @@ export default {
}
}
},
},
computed
:
{
computed
:
{
getTabFollowId
()
{
return
this
.
tabFollowId
()
},
survivalFlag
()
{
survivalFlag
()
{
if
(
this
.
activeName
==
"
index0
"
&&
this
.
formClass
)
{
if
(
this
.
activeName
==
"
index0
"
&&
this
.
formClass
)
{
return
true
return
true
...
@@ -188,27 +229,35 @@ export default {
...
@@ -188,27 +229,35 @@ export default {
if
(
val
==
"
index3
"
)
{
if
(
val
==
"
index3
"
)
{
// 第四步风险评估
// 第四步风险评估
this
.
$nextTick
(()
=>
{
this
.
$nextTick
(()
=>
{
getPatientDetail
({
if
(
this
.
formType
==
2
)
{
formId
:
this
.
formId
,
// 每个大表单的id
// 随访回显
patientId
:
this
.
patientId
||
this
.
patientStandbyId
,
getFollowDetail
({
// formRecordId: this.newformRecordId,
formId
:
this
.
formId
,
// 每个大表单的id
})
followId
:
this
.
followId
||
this
.
getTabFollowId
,
.
then
((
res
)
=>
{
// formRecordId: this.newformRecordId,
const
data
=
res
.
data
.
data
this
.
formInitial
=
data
})
})
.
finally
(()
=>
{
.
then
((
res
)
=>
{
this
.
loading
=
false
const
data
=
res
.
data
.
data
this
.
formInitial
=
data
})
.
finally
(()
=>
{
this
.
loading
=
false
})
}
else
{
// 筛查回显
getPatientDetail
({
formId
:
this
.
formId
,
// 每个大表单的id
patientId
:
this
.
patientId
||
this
.
patientStandbyId
,
// formRecordId: this.newformRecordId,
})
})
this
.
$nextTick
(()
=>
{
.
then
((
res
)
=>
{
console
.
log
(
"
走了
"
)
const
data
=
res
.
data
.
data
//!
this
.
formInitial
=
data
// this.formInitial = {
})
// risk_rank: "中危",
.
finally
(()
=>
{
// risk_score: "5分",
this
.
loading
=
false
// screening_advise: "立刻住院",
})
// }
}
})
})
})
}
}
},
},
...
@@ -225,10 +274,6 @@ export default {
...
@@ -225,10 +274,6 @@ export default {
console
.
log
(
"
提交
"
,
this
.
formType
)
console
.
log
(
"
提交
"
,
this
.
formType
)
if
(
this
.
formType
==
"
2
"
)
{
if
(
this
.
formType
==
"
2
"
)
{
this
.
addFollowPatient
(
data
,
done
,
cb
)
this
.
addFollowPatient
(
data
,
done
,
cb
)
this
.
$emit
(
"
addMethods
"
,
{
activeName
:
this
.
activeName
,
form
:
data
.
data
,
})
}
else
{
}
else
{
this
.
addPatient
(
data
,
done
,
cb
)
this
.
addPatient
(
data
,
done
,
cb
)
this
.
$emit
(
"
addMethods
"
,
{
this
.
$emit
(
"
addMethods
"
,
{
...
@@ -260,9 +305,14 @@ export default {
...
@@ -260,9 +305,14 @@ export default {
formTab
.
temporarySave
()
formTab
.
temporarySave
()
// console.log(formTab)
// console.log(formTab)
}
else
if
(
type
==
3
)
{
}
else
if
(
type
==
3
)
{
//提交
//
筛查
提交
this
.
dialogType
=
"
submit
"
this
.
dialogType
=
"
submit
"
this
.
$refs
.
showDialog
.
dialogVisible
=
true
if
(
this
.
formType
==
2
)
{
this
.
$refs
.
followDialog
.
dialogVisible
=
true
}
else
{
this
.
$refs
.
showDialog
.
dialogVisible
=
true
}
this
.
loading
=
false
this
.
loading
=
false
}
else
{
}
else
{
// 返回
// 返回
...
@@ -279,7 +329,6 @@ export default {
...
@@ -279,7 +329,6 @@ export default {
}
}
// 清空红字:不符合筛查条件
// 清空红字:不符合筛查条件
this
.
$refs
.
showDialog
.
dialogVisible
=
false
this
.
$refs
.
showDialog
.
dialogVisible
=
false
//判断路径
if
(
this
.
$route
.
path
!=
"
/screening/add
"
)
{
if
(
this
.
$route
.
path
!=
"
/screening/add
"
)
{
this
.
$router
.
push
(
"
/screening/add
"
)
this
.
$router
.
push
(
"
/screening/add
"
)
}
}
...
@@ -300,6 +349,28 @@ export default {
...
@@ -300,6 +349,28 @@ export default {
this
.
$refs
.
showDialog
.
dialogVisible
=
false
this
.
$refs
.
showDialog
.
dialogVisible
=
false
// alert("跳转")
// alert("跳转")
},
},
viewJumpFollow
()
{
// this.activeName = "index0"
this
.
$router
.
push
({
path
:
"
/followupquery
"
,
query
:
{
patientId
:
this
.
patientId
,
followId
:
this
.
followId
||
this
.
tabFollowId
,
model
:
"
view
"
,
getData
:
1
,
},
})
this
.
$refs
.
followDialog
.
dialogVisible
=
false
// this.$emit(
// "refreshData",
// JSON.stringify({
// patientId: this.patientId,
// followId: this.followId || this.tabFollowId,
// model: "view",
// getData: 1,
// })
// )
},
},
},
provide
()
{
provide
()
{
return
{
return
{
...
...
src/views/screening/components/FormTab.vue
View file @
c41edeb9
...
@@ -81,7 +81,11 @@
...
@@ -81,7 +81,11 @@
</el-container>
</el-container>
</template>
</template>
<
script
>
<
script
>
import
{
getPatientDetail
,
getRecordList
}
from
"
@/api/patient.js
"
import
{
getPatientDetail
,
getRecordList
,
getFollowDetail
,
}
from
"
@/api/patient.js
"
import
{
getFormDetail
}
from
"
@/api/field
"
import
{
getFormDetail
}
from
"
@/api/field
"
import
CustomForm
from
"
@/components/FormComponents/CustomForm/index
"
import
CustomForm
from
"
@/components/FormComponents/CustomForm/index
"
import
ReadForm
from
"
@/components/FormComponents/ReadForm/index
"
import
ReadForm
from
"
@/components/FormComponents/ReadForm/index
"
...
@@ -93,6 +97,7 @@ export default {
...
@@ -93,6 +97,7 @@ export default {
activeName
:
String
,
activeName
:
String
,
externalScroll
:
Boolean
,
//外部滚动
externalScroll
:
Boolean
,
//外部滚动
disabled
:
Boolean
,
disabled
:
Boolean
,
getData
:
Boolean
,
contrast
:
Boolean
,
//同屏对照
contrast
:
Boolean
,
//同屏对照
form
:
Object
,
form
:
Object
,
formType
:
String
,
formType
:
String
,
...
@@ -118,6 +123,12 @@ export default {
...
@@ -118,6 +123,12 @@ export default {
},
},
}
}
},
},
inject
:
{
tabFollowId
:
{
type
:
Function
,
default
:
()
=>
{},
},
},
data
()
{
data
()
{
return
{
return
{
btnType
:
""
,
btnType
:
""
,
...
@@ -157,6 +168,9 @@ export default {
...
@@ -157,6 +168,9 @@ export default {
return
!
(
Object
.
keys
(
this
.
widgetFormPreview
)
||
this
.
widgetFormPreview
)
return
!
(
Object
.
keys
(
this
.
widgetFormPreview
)
||
this
.
widgetFormPreview
)
.
length
.
length
},
},
getTabFollowId
()
{
return
this
.
tabFollowId
()
},
sideWidth
()
{
sideWidth
()
{
return
this
.
asideShow
?
"
200px
"
:
"
0px
"
return
this
.
asideShow
?
"
200px
"
:
"
0px
"
},
},
...
@@ -203,8 +217,9 @@ export default {
...
@@ -203,8 +217,9 @@ export default {
{
immediate
:
true
}
{
immediate
:
true
}
)
)
}
else
{
}
else
{
console
.
log
(
206
,
this
.
getData
)
// 监听form.silent 获取当前tab页数据
// 监听form.silent 获取当前tab页数据
if
(
this
.
formType
!=
2
)
{
if
(
this
.
getData
)
{
this
.
$watch
(
this
.
$watch
(
"
form.silent
"
,
"
form.silent
"
,
()
=>
{
()
=>
{
...
@@ -236,7 +251,7 @@ export default {
...
@@ -236,7 +251,7 @@ export default {
this
.
$refs
.
form
.
clearAge
()
this
.
$refs
.
form
.
clearAge
()
},
},
initData
()
{
initData
()
{
console
.
log
(
'
初始化
'
,
this
.
formData
)
console
.
log
(
"
初始化
"
,
this
.
formData
)
this
.
formData
.
formRecordId
=
null
this
.
formData
.
formRecordId
=
null
this
.
formCacheList
=
[]
this
.
formCacheList
=
[]
this
.
getPatientDetail
()
this
.
getPatientDetail
()
...
@@ -293,8 +308,9 @@ export default {
...
@@ -293,8 +308,9 @@ export default {
if
(
this
.
isDraft
)
{
if
(
this
.
isDraft
)
{
params
.
statusMap
.
is_draft
=
this
.
isDraft
params
.
statusMap
.
is_draft
=
this
.
isDraft
}
}
// 处理followId 针对随访查询的列表数据的查询和修改操作
if
(
this
.
$route
.
path
==
"
/followupentry
"
&&
this
.
activeName
!=
"
index0
"
)
{
if
(
this
.
$route
.
path
==
"
/followupentry
"
&&
this
.
activeName
!=
"
index0
"
)
{
params
.
followId
=
this
.
followId
params
.
followId
=
this
.
followId
||
this
.
getTabFollowId
}
}
this
.
$emit
(
"
handleConfirm
"
,
params
,
done
,
(
res
)
=>
{
this
.
$emit
(
"
handleConfirm
"
,
params
,
done
,
(
res
)
=>
{
// 多次填写的表单新增时,获取最新数据
// 多次填写的表单新增时,获取最新数据
...
@@ -379,17 +395,31 @@ export default {
...
@@ -379,17 +395,31 @@ export default {
})
})
if
(
!
this
.
patientId
||
this
.
form
.
silent
)
return
if
(
!
this
.
patientId
||
this
.
form
.
silent
)
return
this
.
loading
=
true
this
.
loading
=
true
getPatientDetail
({
if
(
this
.
formType
==
2
)
{
patientId
:
this
.
patientId
,
getFollowDetail
({
formId
:
this
.
form
.
formId
,
followId
:
this
.
followId
||
this
.
getTabFollowId
,
formRecordId
:
this
.
formData
.
formRecordId
,
formId
:
this
.
form
.
formId
,
})
formRecordId
:
this
.
formData
.
formRecordId
,
.
then
((
res
)
=>
{
this
.
formatData
(
res
)
})
})
.
finally
(()
=>
{
.
then
((
res
)
=>
{
this
.
loading
=
false
this
.
formatData
(
res
)
})
.
finally
(()
=>
{
this
.
loading
=
false
})
}
else
{
getPatientDetail
({
patientId
:
this
.
patientId
,
formId
:
this
.
form
.
formId
,
formRecordId
:
this
.
formData
.
formRecordId
,
})
})
.
then
((
res
)
=>
{
this
.
formatData
(
res
)
})
.
finally
(()
=>
{
this
.
loading
=
false
})
}
},
},
formatData
(
res
,
cache
)
{
formatData
(
res
,
cache
)
{
const
d
=
res
.
data
||
{}
const
d
=
res
.
data
||
{}
...
@@ -402,7 +432,7 @@ export default {
...
@@ -402,7 +432,7 @@ export default {
if
(
form
[
"
YZZKJC
"
]
&&
typeof
form
[
"
YZZKJC
"
]
===
"
string
"
)
{
if
(
form
[
"
YZZKJC
"
]
&&
typeof
form
[
"
YZZKJC
"
]
===
"
string
"
)
{
form
[
"
YZZKJC
"
]
=
JSON
.
parse
(
form
[
"
YZZKJC
"
])
form
[
"
YZZKJC
"
]
=
JSON
.
parse
(
form
[
"
YZZKJC
"
])
}
}
console
.
log
(
'
form形成
'
,
form
,
this
.
formData
)
console
.
log
(
"
form形成
"
,
form
,
this
.
formData
)
if
(
!
cache
)
{
if
(
!
cache
)
{
this
.
formData
.
formEdit
=
form
this
.
formData
.
formEdit
=
form
}
}
...
@@ -418,7 +448,7 @@ export default {
...
@@ -418,7 +448,7 @@ export default {
}
}
},
},
// 表单数据转化
// 表单数据转化
formatString
(
form
){
formatString
(
form
)
{
for
(
const
key
in
form
)
{
for
(
const
key
in
form
)
{
Object
.
prototype
.
toString
.
call
(
form
[
key
])
==
"
[object Number]
"
Object
.
prototype
.
toString
.
call
(
form
[
key
])
==
"
[object Number]
"
?
(
form
[
key
]
=
String
(
form
[
key
]))
?
(
form
[
key
]
=
String
(
form
[
key
]))
...
@@ -427,7 +457,7 @@ export default {
...
@@ -427,7 +457,7 @@ export default {
this
.
formData
.
formEdit
=
form
this
.
formData
.
formEdit
=
form
},
},
getRecordList
(
formRecordId
)
{
getRecordList
(
formRecordId
)
{
console
.
log
(
'
获取表单id
'
,
formRecordId
)
console
.
log
(
"
获取表单id
"
,
formRecordId
)
if
(
!
this
.
patientId
)
return
if
(
!
this
.
patientId
)
return
getRecordList
({
getRecordList
({
patientId
:
this
.
patientId
,
patientId
:
this
.
patientId
,
...
...
src/views/screening/components/mixin.js
View file @
c41edeb9
...
@@ -13,6 +13,7 @@ export default {
...
@@ -13,6 +13,7 @@ export default {
newformRecordId
:
null
,
//记录Id
newformRecordId
:
null
,
//记录Id
formTabs
:
[],
formTabs
:
[],
formId
:
""
,
formId
:
""
,
followId
:
""
,
formTabsList
:
[],
formTabsList
:
[],
isUpdated
:
false
,
isUpdated
:
false
,
}
}
...
@@ -27,7 +28,7 @@ export default {
...
@@ -27,7 +28,7 @@ export default {
nextTab
()
{
nextTab
()
{
let
i
=
this
.
activeName
.
split
(
"
index
"
)[
1
]
-
0
let
i
=
this
.
activeName
.
split
(
"
index
"
)[
1
]
-
0
i
++
i
++
if
(
i
==
6
)
{
if
(
i
==
this
.
formTabs
.
length
)
{
this
.
onSubmit
(
3
)
this
.
onSubmit
(
3
)
return
return
}
else
{
}
else
{
...
...
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