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
f409246a
Commit
f409246a
authored
Dec 08, 2022
by
miaojiale
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改form
parent
348fd501
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
288 additions
and
218 deletions
+288
-218
FormContent.vue
src/components/FormComponents/CustomForm/FormContent.vue
+25
-7
FormItemText.vue
src/components/FormComponents/CustomForm/FormItemText.vue
+25
-3
FormTab.vue
src/views/screening/components/FormTab.vue
+234
-206
mixin.js
src/views/screening/components/mixin.js
+3
-1
index.vue
src/views/screening/index.vue
+1
-1
No files found.
src/components/FormComponents/CustomForm/FormContent.vue
View file @
f409246a
<
template
>
<el-row
:gutter=
"options.gutter"
class=
"form-content"
>
<template
v-for=
"(item, columnIndex) in columns.column || columns.children.column"
>
<template
v-for=
"(item, columnIndex) in columns.column || columns.children.column"
>
<div
v-if=
"item.type === 'dynamic'"
v-show=
"item.display"
...
...
@@ -8,7 +10,11 @@
style=
"width: 100%"
class=
"dynamic-form-container"
>
<el-form-item
:prop=
"item.prop"
:label-width=
"'0px'"
style=
"display: none"
></el-form-item>
<el-form-item
:prop=
"item.prop"
:label-width=
"'0px'"
style=
"display: none"
></el-form-item>
<div
class=
"dynamic-form-container_lable"
>
{{
item
.
label
}}
</div>
<form-dynamic
v-model=
"form[item.prop]"
...
...
@@ -25,7 +31,11 @@
style=
"width: 100%"
>
<el-collapse
:value=
"item.collapse ? item.prop : ''"
>
<el-collapse-item
:title=
"item.label"
:name=
"item.prop"
:disabled=
"!item.arrow"
>
<el-collapse-item
:title=
"item.label"
:name=
"item.prop"
:disabled=
"!item.arrow"
>
<form-content
ref=
"form-content"
:form=
"form"
...
...
@@ -43,7 +53,11 @@
:key=
"columnIndex"
style=
"width: 100%"
>
<el-form-item
:prop=
"item.prop"
:label-width=
"'0px'"
style=
"display: none"
></el-form-item>
<el-form-item
:prop=
"item.prop"
:label-width=
"'0px'"
style=
"display: none"
></el-form-item>
<dental-tab-form
ref=
"dental"
v-model=
"form[item.prop]"
...
...
@@ -59,7 +73,11 @@
:key=
"columnIndex"
style=
"width: 100%"
>
<el-form-item
:prop=
"item.prop"
:label-width=
"'0px'"
style=
"display: none"
></el-form-item>
<el-form-item
:prop=
"item.prop"
:label-width=
"'0px'"
style=
"display: none"
></el-form-item>
<dental-tab-tj-form
ref=
"dental"
v-model=
"form[item.prop]"
...
...
@@ -168,7 +186,7 @@ export default {
},
// 切换不符合筛查条件的显示
formChange
()
{
// 入选,排除标准
// 入选,排除标准
,一个填写是就不符合筛查条件
console
.
log
(
this
.
form
)
let
arr
=
[
"
is_one_year
"
,
...
...
@@ -181,7 +199,7 @@ export default {
]
let
flag
=
0
for
(
let
i
=
0
;
i
<
arr
.
length
;
i
++
)
{
if
(
this
.
form
[
arr
[
i
]]
&&
this
.
form
[
arr
[
i
]]
==
0
)
{
if
(
this
.
form
[
arr
[
i
]]
&&
this
.
form
[
arr
[
i
]]
==
1
)
{
flag
++
}
}
...
...
src/components/FormComponents/CustomForm/FormItemText.vue
View file @
f409246a
...
...
@@ -2,13 +2,35 @@
<div
class=
"form-item-text"
>
<template
v-if=
"form[item.prop]"
>
<span
v-if=
"item.prepend"
>
{{
item
.
prepend
}}
</span>
<span
style=
"margin: 0 5px"
>
{{
form
[
item
.
prop
]
|
getItemText
(
item
.
dicData
,
item
.
type
)
}}
</span>
<span>
<span
v-if=
"item.prop == 'risk_rank'"
:style=
"
{
color:
form[item.prop] == '中危'
? '#FF9F33'
: form[item.prop] == '低危'
? 'green'
: '',
}"
>
{{
form
[
item
.
prop
]
}}
</span>
<span
v-else-if=
"item.prop == 'screening_advise'"
style=
"color: #4e68ff"
>
{{
form
[
item
.
prop
]
}}
</span>
<span
v-else
style=
"margin: 0 5px"
>
{{
form
[
item
.
prop
]
|
getItemText
(
item
.
dicData
,
item
.
type
)
}}
</span>
</span>
<span
v-if=
"item.append && !item.toothBit"
class=
"append"
>
{{
item
.
append
}}
</span>
</
template
>
<
template
v-else
>
--
</
template
>
</div>
</template>
...
...
src/views/screening/components/FormTab.vue
View file @
f409246a
...
...
@@ -42,8 +42,16 @@
</el-switch>-->
</div>
</el-row>
<div
class=
"my-form"
ref=
"my-form"
:class=
"externalScroll ? 'no-scroll' : ''"
>
<read-form
ref=
"form"
:options=
"survivalForm"
v-if=
"survivalFlag"
></read-form>
<div
class=
"my-form"
ref=
"my-form"
:class=
"externalScroll ? 'no-scroll' : ''"
>
<read-form
ref=
"form"
:options=
"survivalForm"
v-if=
"survivalFlag"
></read-form>
<custom-form
ref=
"form"
@
scrollTop=
"scrollTop"
...
...
@@ -81,9 +89,9 @@ export default {
patientId
:
String
,
patientStandbyId
:
String
,
getAll
:
Boolean
,
// 获取页面所有数据
survivalFlag
:
Boolean
,
//存活的显示
survivalFlag
:
Boolean
,
//存活的显示
},
components
:
{
CustomForm
,
TagsScrollBar
,
ReadForm
},
components
:
{
CustomForm
,
TagsScrollBar
,
ReadForm
},
provide
()
{
return
{
formId
:
this
.
form
.
formId
,
...
...
@@ -99,7 +107,11 @@ export default {
asideShow
:
false
,
widgetFormPreview
:
{},
formData
:
{
formEdit
:
{},
formEdit
:
{
risk_rank
:
"
中危
"
,
risk_score
:
"
5分
"
,
screening_advise
:
"
立刻住院
"
,
},
percent
:
{},
formRecordId
:
null
,
},
...
...
@@ -107,218 +119,232 @@ export default {
formloading
:
false
,
repeatedlyList
:
[],
formCacheList
:
[],
survivalForm
:{
survivalForm
:
{
column
:
[],
labelPosition
:
'
right
'
,
labelSuffix
:
'
:
'
,
labelPosition
:
"
right
"
,
labelSuffix
:
"
:
"
,
labelWidth
:
100
,
gutter
:
0
,
menuBtn
:
true
,
submitBtn
:
true
,
submitText
:
'
提交
'
,
submitText
:
"
提交
"
,
emptyBtn
:
true
,
emptyText
:
'
清空
'
,
emptyText
:
"
清空
"
,
nextTabBtn
:
true
,
nextTabText
:
'
下一页
'
,
menuPosition
:
'
center
'
,
nextTabText
:
"
下一页
"
,
menuPosition
:
"
center
"
,
group
:
[
{
label
:
'
个人信息
'
,
prop
:
'
1669858228269_22763
'
,
arrow
:
true
,
collapse
:
true
,
display
:
true
,
labelWidth
:
8
,
column
:
[{
type
:
'
input
'
,
display
:
true
,
importantField
:
true
,
styles
:
{},
autoRequired
:
0
,
personalRequired
:
0
,
prop
:
'
name
'
,
label
:
'
姓名
'
,
fieldType
:
'
varchar
'
,
fieldLength
:
'
50
'
,
tableName
:
'
存活情况
'
,
tableCode
:
'
gas_survival_situation
'
,
tableId
:
'
1598137567272861697
'
,
notFilter
:
false
,
cType
:
''
,
subfield
:
false
},
{
type
:
'
input
'
,
display
:
true
,
importantField
:
true
,
styles
:
{},
autoRequired
:
0
,
personalRequired
:
0
,
prop
:
'
contact_phone
'
,
label
:
'
手机号
'
,
fieldType
:
'
varchar
'
,
fieldLength
:
'
20
'
,
tableName
:
'
存活情况
'
,
tableCode
:
'
gas_survival_situation
'
,
tableId
:
'
1598137567272861697
'
,
notFilter
:
false
,
cType
:
''
,
subfield
:
false
},
{
type
:
'
input
'
,
display
:
true
,
importantField
:
true
,
styles
:
{},
autoRequired
:
0
,
personalRequired
:
0
,
prop
:
'
telephone
'
,
label
:
'
联系电话
'
,
fieldType
:
'
varchar
'
,
fieldLength
:
'
20
'
,
tableName
:
'
存活情况
'
,
tableCode
:
'
gas_survival_situation
'
,
tableId
:
'
1598137567272861697
'
,
notFilter
:
false
,
cType
:
''
,
subfield
:
false
},
{
type
:
'
input
'
,
display
:
true
,
importantField
:
true
,
styles
:
{},
autoRequired
:
0
,
personalRequired
:
0
,
prop
:
'
sex
'
,
label
:
'
性别
'
,
fieldType
:
'
tinyint
'
,
fieldLength
:
'
2
'
,
tableName
:
'
存活情况
'
,
tableCode
:
'
gas_survival_situation
'
,
tableId
:
'
1598137567272861697
'
,
notFilter
:
false
,
cType
:
''
,
subfield
:
false
},
{
type
:
'
input
'
,
display
:
true
,
importantField
:
true
,
styles
:
{},
autoRequired
:
0
,
personalRequired
:
0
,
prop
:
'
birthday
'
,
label
:
'
出生日期
'
,
fieldType
:
'
date
'
,
fieldLength
:
''
,
tableName
:
'
存活情况
'
,
tableCode
:
'
gas_survival_situation
'
,
tableId
:
'
1598137567272861697
'
,
notFilter
:
false
,
cType
:
''
,
subfield
:
false
},
{
type
:
'
input
'
,
label
:
"
个人信息
"
,
prop
:
"
1669858228269_22763
"
,
arrow
:
true
,
collapse
:
true
,
display
:
true
,
importantField
:
true
,
styles
:
{},
autoRequired
:
0
,
personalRequired
:
0
,
prop
:
'
age
'
,
label
:
'
年龄
'
,
fieldType
:
'
int
'
,
fieldLength
:
'
4
'
,
tableName
:
'
存活情况
'
,
tableCode
:
'
gas_survival_situation
'
,
tableId
:
'
1598137567272861697
'
,
notFilter
:
false
,
cType
:
''
,
subfield
:
false
}]
},
{
label
:
'
第一次随访计划
'
,
prop
:
'
1669858313508_15760
'
,
arrow
:
true
,
collapse
:
true
,
display
:
true
,
labelWidth
:
8
,
column
:
[{
type
:
'
radio
'
,
display
:
true
,
importantField
:
true
,
styles
:
{},
prop
:
'
is_continue_follow
'
,
label
:
'
是否随访
'
,
dicData
:
[{
label
:
'
是
'
,
value
:
'
1
'
,
id
:
'
1595347527757000705
'
,
parentId
:
''
},
{
label
:
'
否
'
,
value
:
'
0
'
,
id
:
'
1595347502595371010
'
,
parentId
:
''
}],
dynamicshSet
:
[],
dicType
:
'
d-sf
'
,
props
:
{
label
:
'
label
'
,
value
:
'
value
'
},
fieldType
:
'
tinyint
'
,
fieldLength
:
'
2
'
,
tableName
:
'
随访计划
'
,
tableCode
:
'
gas_follow
'
,
tableId
:
'
1597491580053323777
'
,
notFilter
:
false
,
cType
:
''
,
subfield
:
false
,
value
:
'
1
'
,
span
:
24
,
autoRequired
:
0
,
personalRequired
:
0
},
{
type
:
'
date
'
,
display
:
true
,
importantField
:
true
,
styles
:
{},
prop
:
'
first_follow_time
'
,
label
:
'
随访时间
'
,
format
:
'
yyyy-MM-dd
'
,
valueFormat
:
'
yyyy-MM-dd
'
,
dicType
:
''
,
fieldType
:
'
date
'
,
tableName
:
'
随访计划
'
,
tableCode
:
'
gas_follow
'
,
tableId
:
'
1597491580053323777
'
,
notFilter
:
false
,
cType
:
''
,
subfield
:
false
,
span
:
12
,
autoRequired
:
0
,
personalRequired
:
0
,
width
:
12
},
{
type
:
'
input
'
,
labelWidth
:
8
,
column
:
[
{
type
:
"
input
"
,
display
:
true
,
importantField
:
true
,
styles
:
{},
autoRequired
:
0
,
personalRequired
:
0
,
prop
:
"
name
"
,
label
:
"
姓名
"
,
fieldType
:
"
varchar
"
,
fieldLength
:
"
50
"
,
tableName
:
"
存活情况
"
,
tableCode
:
"
gas_survival_situation
"
,
tableId
:
"
1598137567272861697
"
,
notFilter
:
false
,
cType
:
""
,
subfield
:
false
,
},
{
type
:
"
input
"
,
display
:
true
,
importantField
:
true
,
styles
:
{},
autoRequired
:
0
,
personalRequired
:
0
,
prop
:
"
contact_phone
"
,
label
:
"
手机号
"
,
fieldType
:
"
varchar
"
,
fieldLength
:
"
20
"
,
tableName
:
"
存活情况
"
,
tableCode
:
"
gas_survival_situation
"
,
tableId
:
"
1598137567272861697
"
,
notFilter
:
false
,
cType
:
""
,
subfield
:
false
,
},
{
type
:
"
input
"
,
display
:
true
,
importantField
:
true
,
styles
:
{},
autoRequired
:
0
,
personalRequired
:
0
,
prop
:
"
telephone
"
,
label
:
"
联系电话
"
,
fieldType
:
"
varchar
"
,
fieldLength
:
"
20
"
,
tableName
:
"
存活情况
"
,
tableCode
:
"
gas_survival_situation
"
,
tableId
:
"
1598137567272861697
"
,
notFilter
:
false
,
cType
:
""
,
subfield
:
false
,
},
{
type
:
"
input
"
,
display
:
true
,
importantField
:
true
,
styles
:
{},
autoRequired
:
0
,
personalRequired
:
0
,
prop
:
"
sex
"
,
label
:
"
性别
"
,
fieldType
:
"
tinyint
"
,
fieldLength
:
"
2
"
,
tableName
:
"
存活情况
"
,
tableCode
:
"
gas_survival_situation
"
,
tableId
:
"
1598137567272861697
"
,
notFilter
:
false
,
cType
:
""
,
subfield
:
false
,
},
{
type
:
"
input
"
,
display
:
true
,
importantField
:
true
,
styles
:
{},
autoRequired
:
0
,
personalRequired
:
0
,
prop
:
"
birthday
"
,
label
:
"
出生日期
"
,
fieldType
:
"
date
"
,
fieldLength
:
""
,
tableName
:
"
存活情况
"
,
tableCode
:
"
gas_survival_situation
"
,
tableId
:
"
1598137567272861697
"
,
notFilter
:
false
,
cType
:
""
,
subfield
:
false
,
},
{
type
:
"
input
"
,
display
:
true
,
importantField
:
true
,
styles
:
{},
autoRequired
:
0
,
personalRequired
:
0
,
prop
:
"
age
"
,
label
:
"
年龄
"
,
fieldType
:
"
int
"
,
fieldLength
:
"
4
"
,
tableName
:
"
存活情况
"
,
tableCode
:
"
gas_survival_situation
"
,
tableId
:
"
1598137567272861697
"
,
notFilter
:
false
,
cType
:
""
,
subfield
:
false
,
},
],
},
{
label
:
"
第一次随访计划
"
,
prop
:
"
1669858313508_15760
"
,
arrow
:
true
,
collapse
:
true
,
display
:
true
,
importantField
:
true
,
styles
:
{},
prop
:
'
follow_contents
'
,
label
:
'
随访内容
'
,
fieldType
:
'
text
'
,
tableName
:
'
随访计划
'
,
tableCode
:
'
gas_follow
'
,
tableId
:
'
1597491580053323777
'
,
notFilter
:
false
,
cType
:
''
,
subfield
:
false
,
autoRequired
:
0
,
personalRequired
:
0
,
span
:
12
,
width
:
12
}]
},
]
}
labelWidth
:
8
,
column
:
[
{
type
:
"
radio
"
,
display
:
true
,
importantField
:
true
,
styles
:
{},
prop
:
"
is_continue_follow
"
,
label
:
"
是否随访
"
,
dicData
:
[
{
label
:
"
是
"
,
value
:
"
1
"
,
id
:
"
1595347527757000705
"
,
parentId
:
""
,
},
{
label
:
"
否
"
,
value
:
"
0
"
,
id
:
"
1595347502595371010
"
,
parentId
:
""
,
},
],
dynamicshSet
:
[],
dicType
:
"
d-sf
"
,
props
:
{
label
:
"
label
"
,
value
:
"
value
"
,
},
fieldType
:
"
tinyint
"
,
fieldLength
:
"
2
"
,
tableName
:
"
随访计划
"
,
tableCode
:
"
gas_follow
"
,
tableId
:
"
1597491580053323777
"
,
notFilter
:
false
,
cType
:
""
,
subfield
:
false
,
value
:
"
1
"
,
span
:
24
,
autoRequired
:
0
,
personalRequired
:
0
,
},
{
type
:
"
date
"
,
display
:
true
,
importantField
:
true
,
styles
:
{},
prop
:
"
first_follow_time
"
,
label
:
"
随访时间
"
,
format
:
"
yyyy-MM-dd
"
,
valueFormat
:
"
yyyy-MM-dd
"
,
dicType
:
""
,
fieldType
:
"
date
"
,
tableName
:
"
随访计划
"
,
tableCode
:
"
gas_follow
"
,
tableId
:
"
1597491580053323777
"
,
notFilter
:
false
,
cType
:
""
,
subfield
:
false
,
span
:
12
,
autoRequired
:
0
,
personalRequired
:
0
,
width
:
12
,
},
{
type
:
"
input
"
,
display
:
true
,
importantField
:
true
,
styles
:
{},
prop
:
"
follow_contents
"
,
label
:
"
随访内容
"
,
fieldType
:
"
text
"
,
tableName
:
"
随访计划
"
,
tableCode
:
"
gas_follow
"
,
tableId
:
"
1597491580053323777
"
,
notFilter
:
false
,
cType
:
""
,
subfield
:
false
,
autoRequired
:
0
,
personalRequired
:
0
,
span
:
12
,
width
:
12
,
},
],
},
],
},
}
},
// mixins: [resizeMixin],
...
...
@@ -400,6 +426,8 @@ export default {
obj
.
menuBtn
=
false
obj
.
disabled
=
true
obj
.
detail
=
true
}
else
if
(
res
.
data
.
name
==
"
风险评估
"
)
{
obj
.
detail
=
true
}
this
.
widgetFormPreview
=
obj
}
...
...
src/views/screening/components/mixin.js
View file @
f409246a
...
...
@@ -41,11 +41,13 @@ export default {
},
handleTabClick
({
index
,
name
})
{
const
{
formId
,
id
,
silent
}
=
this
.
formTabs
[
index
]
console
.
log
(
'
表单项
'
,
this
.
formTabs
)
console
.
log
(
"
表单项
"
,
this
.
formTabs
[
index
]
)
if
(
formId
&&
silent
)
{
this
.
formTabs
[
index
][
"
silent
"
]
=
false
//控制是否获取接口数据
return
}
if
(
this
.
formTabs
[
index
].
formName
==
"
风险评估
"
)
{
}
this
.
formTabs
.
splice
(
index
,
1
,
{
...
this
.
formTabsList
.
find
((
_
)
=>
_
.
id
===
id
),
})
...
...
src/views/screening/index.vue
View file @
f409246a
...
...
@@ -200,7 +200,7 @@ export default {
},
},
created
()
{
this
.
handleFormSearch
()
//
this.handleFormSearch()
},
}
</
script
>
...
...
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