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
93b539cf
Commit
93b539cf
authored
Dec 01, 2022
by
miaojiale
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提交表格基本样式
parent
48c9269f
Changes
5
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
130 additions
and
75 deletions
+130
-75
FormContent.vue
src/components/FormComponents/CustomForm/FormContent.vue
+27
-23
FormItemSelf.vue
src/components/FormComponents/CustomForm/FormItemSelf.vue
+69
-44
index.vue
src/components/FormComponents/CustomForm/index.vue
+25
-7
ScreeningAdd.vue
src/views/screening/ScreeningAdd.vue
+8
-1
FormTab.vue
src/views/screening/components/FormTab.vue
+1
-0
No files found.
src/components/FormComponents/CustomForm/FormContent.vue
View file @
93b539cf
<
template
>
<
template
>
<el-row
<el-row
:gutter=
"options.gutter"
class=
"form-content"
>
:gutter=
"options.gutter"
class=
"form-content"
:style=
"
{
paddingLeft,
}"
>
<template
<template
v-for=
"(item, columnIndex) in columns.column || columns.children.column"
v-for=
"(item, columnIndex) in columns.column || columns.children.column"
>
>
<div
<div
v-if=
"item.type === 'dynamic'"
v-if=
"item.type === 'dynamic'"
v-show=
"item.display"
:key=
"columnIndex"
:key=
"columnIndex"
style=
"width: 100%"
style=
"width: 100%"
v-show=
"item.display"
class=
"dynamic-form-container"
class=
"dynamic-form-container"
>
>
<el-form-item
<el-form-item
...
@@ -24,18 +18,18 @@
...
@@ -24,18 +18,18 @@
</el-form-item>
</el-form-item>
<div
class=
"dynamic-form-container_lable"
>
{{
item
.
label
}}
</div>
<div
class=
"dynamic-form-container_lable"
>
{{
item
.
label
}}
</div>
<form-dynamic
<form-dynamic
v-model=
"form[item.prop]"
:options=
"item.children"
:options=
"item.children"
:dynamic-data=
"item.dynamicData"
:dynamic-data=
"item.dynamicData"
:is-show-important=
"isShowImportant"
:is-show-important=
"isShowImportant"
v-model=
"form[item.prop]"
></form-dynamic>
></form-dynamic>
</div>
</div>
<div
<div
v-else-if=
"item.type === 'group'"
v-else-if=
"item.type === 'group'"
v-show=
"item.display"
:key=
"columnIndex"
:key=
"columnIndex"
style=
"width: 100%"
style=
"width: 100%"
v-show=
"item.display"
>
>
<el-collapse
:value=
"item.collapse ? item.prop : ''"
>
<el-collapse
:value=
"item.collapse ? item.prop : ''"
>
<el-collapse-item
<el-collapse-item
...
@@ -56,9 +50,9 @@
...
@@ -56,9 +50,9 @@
<div
<div
v-else-if=
"item.type === 'dental-tab'"
v-else-if=
"item.type === 'dental-tab'"
v-show=
"item.display && isShowIm(item.importantField)"
:key=
"columnIndex"
:key=
"columnIndex"
style=
"width: 100%"
style=
"width: 100%"
v-show=
"item.display && isShowIm(item.importantField)"
>
>
<el-form-item
<el-form-item
:prop=
"item.prop"
:prop=
"item.prop"
...
@@ -68,8 +62,8 @@
...
@@ -68,8 +62,8 @@
</el-form-item>
</el-form-item>
<dental-tab-form
<dental-tab-form
ref=
"dental"
ref=
"dental"
:item=
"item"
v-model=
"form[item.prop]"
v-model=
"form[item.prop]"
:item=
"item"
:disabled=
"options.disabled"
:disabled=
"options.disabled"
@
change=
"handleChange"
@
change=
"handleChange"
></dental-tab-form>
></dental-tab-form>
...
@@ -77,9 +71,9 @@
...
@@ -77,9 +71,9 @@
<div
<div
v-else-if=
"item.type === 'dental-tab-tj'"
v-else-if=
"item.type === 'dental-tab-tj'"
v-show=
"item.display && isShowIm(item.importantField)"
:key=
"columnIndex"
:key=
"columnIndex"
style=
"width: 100%"
style=
"width: 100%"
v-show=
"item.display && isShowIm(item.importantField)"
>
>
<el-form-item
<el-form-item
:prop=
"item.prop"
:prop=
"item.prop"
...
@@ -89,20 +83,21 @@
...
@@ -89,20 +83,21 @@
</el-form-item>
</el-form-item>
<dental-tab-tj-form
<dental-tab-tj-form
ref=
"dental"
ref=
"dental"
:item=
"item"
v-model=
"form[item.prop]"
v-model=
"form[item.prop]"
:item=
"item"
:disabled=
"options.disabled"
:disabled=
"options.disabled"
></dental-tab-tj-form>
></dental-tab-tj-form>
</div>
</div>
<el-col
<el-col
v-else-if=
"item.type === 'title'"
v-else-if=
"item.type === 'title'"
v-show=
"item.display"
:key=
"columnIndex"
class=
"row12"
:xs=
"item.xs || 24"
:xs=
"item.xs || 24"
:sm=
"item.sm || 24"
:sm=
"item.sm || 24"
:md=
"item.md || 24"
:md=
"item.md || 24"
:lg=
"item.span || 12"
:lg=
"item.span || 12"
:key=
"columnIndex"
v-show=
"item.display"
>
>
<div
class=
"form_title"
:style=
"item.styles"
>
<div
class=
"form_title"
:style=
"item.styles"
>
<span>
{{
item
.
value
}}
</span>
<span>
{{
item
.
value
}}
</span>
...
@@ -111,16 +106,18 @@
...
@@ -111,16 +106,18 @@
<el-col
<el-col
v-else
v-else
v-show=
"item.display && isShowIm(item.importantField)"
:key=
"columnIndex"
class=
"row24"
:xs=
"item.xs || 24"
:xs=
"item.xs || 24"
:sm=
"item.sm || 24"
:sm=
"item.sm || 24"
:md=
"item.md || 24"
:md=
"item.md || 24"
:lg=
"item.lg || item.span || 12"
:lg=
"item.lg || item.span || 12"
:xl=
"item.span || 12"
:xl=
"item.span || 12"
:key=
"columnIndex"
v-show=
"item.display && isShowIm(item.importantField)"
>
>
<form-item-self
<form-item-self
:form=
"form"
:form=
"form"
:column-index=
"columnIndex"
:item=
"item"
:item=
"item"
:columns=
"columns.column || columns.children.column"
:columns=
"columns.column || columns.children.column"
:group=
"options.group"
:group=
"options.group"
...
@@ -173,11 +170,6 @@ export default {
...
@@ -173,11 +170,6 @@ export default {
data
()
{
data
()
{
return
{}
return
{}
},
},
methods
:
{
handleChange
(
key
,
val
)
{
if
(
this
.
form
.
hasOwnProperty
(
key
))
this
.
form
[
key
]
=
val
},
},
computed
:
{
computed
:
{
isShowIm
()
{
isShowIm
()
{
...
@@ -190,10 +182,22 @@ export default {
...
@@ -190,10 +182,22 @@ export default {
return
columns
.
labelWidth
?
`
${
columns
.
labelWidth
}
px`
:
""
return
columns
.
labelWidth
?
`
${
columns
.
labelWidth
}
px`
:
""
},
},
},
},
methods
:
{
handleChange
(
key
,
val
)
{
if
(
this
.
form
.
hasOwnProperty
(
key
))
this
.
form
[
key
]
=
val
},
},
}
}
</
script
>
</
script
>
<
style
lang=
"scss"
scoped
>
<
style
lang=
"scss"
scoped
>
::v-deep
{
.row24.el-col-lg-12
{
&
:nth-child
(
2n
)
{
border-left
:
1px
solid
#ccc
;
}
}
}
.
form-content
:
:
v-deep
{
.
form-content
:
:
v-deep
{
display
:
flex
;
display
:
flex
;
flex-wrap
:
wrap
;
flex-wrap
:
wrap
;
...
...
src/components/FormComponents/CustomForm/FormItemSelf.vue
View file @
93b539cf
This diff is collapsed.
Click to expand it.
src/components/FormComponents/CustomForm/index.vue
View file @
93b539cf
...
@@ -109,7 +109,8 @@ export default {
...
@@ -109,7 +109,8 @@ export default {
name
:
"
CustomForm
"
,
name
:
"
CustomForm
"
,
components
:
{
FormContent
},
components
:
{
FormContent
},
props
:
{
props
:
{
options
:
{
//配置 数据
options
:
{
//配置 数据
type
:
Object
,
type
:
Object
,
default
:
()
=>
{
default
:
()
=>
{
return
{}
return
{}
...
@@ -318,19 +319,36 @@ export default {
...
@@ -318,19 +319,36 @@ export default {
<
style
lang=
"scss"
scoped
>
<
style
lang=
"scss"
scoped
>
.avue-form-self
{
.avue-form-self
{
padding
:
0
11px
;
padding
:
0
11px
;
::v-deep
.el-collapse
{
::v-deep
.el-collapse
{
border
:
none
;
border
:
none
;
.el-collapse-item
{
.el-collapse-item__header.is-active
{
&
:nth-child
(
1
)
{
border-bottom-color
:
#ebeef5
;
border-top
:
1px
solid
#e5e5e5
;
}
}
.el-collapse-item__content
{
padding-bottom
:
0px
;
}
.el-collapse-item__header
{
background
:
#fafafa
;
text-indent
:
20px
;
border
:
1px
solid
#e5e5e5
;
border-bottom-color
:
#ccc
;
border-top
:
0px
;
font-size
:
14px
;
font-family
:
AlibabaPuHuiTiM
;
color
:
#333333
;
}
}
.el-collapse-item__wrap
{
.el-collapse-item__wrap
{
border
:
none
;
border
:
none
;
padding
:
10px
;
padding
:
10px
;
border-left
:
1px
solid
#e5e5e5
;
border-right
:
1px
solid
#e5e5e5
;
// border-bottom: 1px solid #e5e5e5 !important;
padding
:
0px
;
&
:hover
{
&
:hover
{
background-color
:
#ecf8ff
;
//
background-color: #ecf8ff;
outline
:
1px
dashed
#ccc
;
//
outline: 1px dashed #ccc;
}
}
}
}
.el-collapse-item__header
{
.el-collapse-item__header
{
...
...
src/views/screening/ScreeningAdd.vue
View file @
93b539cf
...
@@ -9,11 +9,18 @@ export default {
...
@@ -9,11 +9,18 @@ export default {
components
:
{
components
:
{
ConfigForms
,
ConfigForms
,
},
},
provide
()
{
const
showIndex
=
true
return
{
showIndex
,
}
},
data
()
{
data
()
{
return
{}
return
{}
},
},
methods
:
{},
created
()
{},
created
()
{},
methods
:
{},
}
}
</
script
>
</
script
>
...
...
src/views/screening/components/FormTab.vue
View file @
93b539cf
...
@@ -306,6 +306,7 @@ export default {
...
@@ -306,6 +306,7 @@ export default {
.el-main
{
.el-main
{
position
:
relative
;
position
:
relative
;
padding
:
0
;
padding
:
0
;
.arrow
{
.arrow
{
position
:
absolute
;
position
:
absolute
;
right
:
0
;
right
:
0
;
...
...
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