Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
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
648767cb
You need to sign in or sign up before continuing.
Commit
648767cb
authored
Dec 02, 2022
by
miaojiale
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改部分内容
parent
93b539cf
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
222 additions
and
28 deletions
+222
-28
FormContent.vue
src/components/FormComponents/CustomForm/FormContent.vue
+2
-0
FormItemSelf.vue
src/components/FormComponents/CustomForm/FormItemSelf.vue
+38
-0
index.vue
src/components/FormComponents/CustomForm/index.vue
+28
-27
DraftBox.vue
src/views/screening/DraftBox.vue
+154
-1
No files found.
src/components/FormComponents/CustomForm/FormContent.vue
View file @
648767cb
...
@@ -210,6 +210,8 @@ export default {
...
@@ -210,6 +210,8 @@ export default {
.el-form-item__content
{
.el-form-item__content
{
margin-left
:
0
!
important
;
margin-left
:
0
!
important
;
flex
:
1
;
flex
:
1
;
display
:
flex
;
align-items
:
center
;
}
}
}
}
}
}
...
...
src/components/FormComponents/CustomForm/FormItemSelf.vue
View file @
648767cb
...
@@ -419,6 +419,27 @@ export default {
...
@@ -419,6 +419,27 @@ export default {
type
:
String
,
type
:
String
,
},
},
data
()
{
data
()
{
let
checkAge
=
(
rule
,
value
,
callback
)
=>
{
if
(
!
value
)
{
return
callback
(
new
Error
(
"
请选择出生日期
"
))
}
let
birthday
=
new
Date
(
value
.
replace
(
/-/g
,
"
/
"
))
let
d
=
new
Date
()
let
age
=
d
.
getFullYear
()
-
birthday
.
getFullYear
()
-
(
d
.
getMonth
()
<
birthday
.
getMonth
()
||
(
d
.
getMonth
()
==
birthday
.
getMonth
()
&&
d
.
getDate
()
<
birthday
.
getDate
())
?
1
:
0
)
console
.
log
(
age
)
if
(
age
<
18
)
{
callback
(
new
Error
(
"
必须年满18岁
"
))
}
else
{
callback
()
}
}
return
{
return
{
pickerOptions
,
pickerOptions
,
rangeOptions
,
rangeOptions
,
...
@@ -549,6 +570,23 @@ export default {
...
@@ -549,6 +570,23 @@ export default {
}
catch
{}
}
catch
{}
}
}
})
})
}
else
{
let
{
birthday
}
=
this
.
form
if
(
birthday
)
{
birthday
=
new
Date
(
birthday
.
replace
(
/-/g
,
"
/
"
))
let
d
=
new
Date
()
let
age
=
d
.
getFullYear
()
-
birthday
.
getFullYear
()
-
(
d
.
getMonth
()
<
birthday
.
getMonth
()
||
(
d
.
getMonth
()
==
birthday
.
getMonth
()
&&
d
.
getDate
()
<
birthday
.
getDate
())
?
1
:
0
)
console
.
log
(
age
)
if
(
age
==
0
)
{
}
}
}
}
},
},
// 自定义方法规则
// 自定义方法规则
...
...
src/components/FormComponents/CustomForm/index.vue
View file @
648767cb
...
@@ -2,13 +2,14 @@
...
@@ -2,13 +2,14 @@
<el-form
<el-form
ref=
"form"
ref=
"form"
:model=
"form"
:model=
"form"
inline-message
:disabled=
"options.disabled"
:disabled=
"options.disabled"
:label-position=
"options.labelPosition || 'left'"
:label-position=
"options.labelPosition || 'left'"
:label-width=
"(options.labelWidth || 100) + 'px'"
:label-width=
"(options.labelWidth || 100) + 'px'"
:size=
"size"
:size=
"size"
@
submit.native.prevent=
"handleConfirm()"
:style=
"formStyle"
:style=
"formStyle"
class=
"avue-form-self"
class=
"avue-form-self"
@
submit.native.prevent=
"handleConfirm()"
>
>
<template
v-if=
"options.column && options.column.length > 0"
>
<template
v-if=
"options.column && options.column.length > 0"
>
<form-content
<form-content
...
@@ -22,10 +23,10 @@
...
@@ -22,10 +23,10 @@
<
template
v-if=
"options.group && options.group.length > 0"
>
<
template
v-if=
"options.group && options.group.length > 0"
>
<el-tabs
v-if=
"options.tabs"
v-model=
"activeName"
type=
"card"
>
<el-tabs
v-if=
"options.tabs"
v-model=
"activeName"
type=
"card"
>
<el-tab-pane
<el-tab-pane
:label=
"g.label || `标签$
{gIndex + 1}`"
:name="`${gIndex}`"
v-for=
"(g, gIndex) in options.group"
v-for=
"(g, gIndex) in options.group"
:key=
"gIndex"
:key=
"gIndex"
:label=
"g.label || `标签$
{gIndex + 1}`"
:name="`${gIndex}`"
>
>
<form-content
<form-content
ref=
"form-content"
ref=
"form-content"
...
@@ -37,13 +38,13 @@
...
@@ -37,13 +38,13 @@
</el-tab-pane>
</el-tab-pane>
</el-tabs>
</el-tabs>
<el-collapse
v-
model=
"collapseNames"
v-else
>
<el-collapse
v-
else
v-model=
"collapseNames"
>
<template
v-for=
"(g, gIndex) in options.group"
>
<template
v-for=
"(g, gIndex) in options.group"
>
<el-collapse-item
<el-collapse-item
v-show=
"g.display"
:key=
"gIndex"
:title=
"g.label"
:title=
"g.label"
:name=
"g.prop"
:name=
"g.prop"
:key=
"gIndex"
v-show=
"g.display"
:disabled=
"!g.arrow"
:disabled=
"!g.arrow"
>
>
<form-content
<form-content
...
@@ -64,9 +65,9 @@
...
@@ -64,9 +65,9 @@
<el-button
<el-button
type=
"primary"
type=
"primary"
icon=
"el-icon-check"
icon=
"el-icon-check"
@
click=
"handleConfirm"
:loading=
"loading"
:loading=
"loading"
size=
"large"
size=
"large"
@
click=
"handleConfirm"
>
>
{{
options
.
submitText
||
"
提交
"
}}
{{
options
.
submitText
||
"
提交
"
}}
</el-button>
</el-button>
...
@@ -108,6 +109,7 @@ import { isObject } from "@/utils/validate"
...
@@ -108,6 +109,7 @@ import { isObject } from "@/utils/validate"
export
default
{
export
default
{
name
:
"
CustomForm
"
,
name
:
"
CustomForm
"
,
components
:
{
FormContent
},
components
:
{
FormContent
},
mixins
:
[
handleFormData
],
props
:
{
props
:
{
options
:
{
options
:
{
//配置 数据
//配置 数据
...
@@ -137,7 +139,6 @@ export default {
...
@@ -137,7 +139,6 @@ export default {
vwForm
,
vwForm
,
}
}
},
},
mixins
:
[
handleFormData
],
data
()
{
data
()
{
return
{
return
{
collapseNames
:
[],
collapseNames
:
[],
...
@@ -147,6 +148,25 @@ export default {
...
@@ -147,6 +148,25 @@ export default {
form
:
{},
form
:
{},
}
}
},
},
computed
:
{
nextTabBtnShow
()
{
const
{
nextTabBtn
,
tabs
,
group
}
=
this
.
options
return
tabs
&&
group
&&
group
.
length
>
1
&&
nextTabBtn
},
},
watch
:
{
formEdit
:
{
handler
()
{
this
.
initfields
(
this
.
formEdit
)
},
},
},
created
()
{
this
.
initforms
()
this
.
$nextTick
(()
=>
{
// this.setformWatch(this.options, "form")
})
},
methods
:
{
methods
:
{
nextTab
()
{
nextTab
()
{
...
@@ -294,25 +314,6 @@ export default {
...
@@ -294,25 +314,6 @@ export default {
}
}
},
},
},
},
computed
:
{
nextTabBtnShow
()
{
const
{
nextTabBtn
,
tabs
,
group
}
=
this
.
options
return
tabs
&&
group
&&
group
.
length
>
1
&&
nextTabBtn
},
},
watch
:
{
formEdit
:
{
handler
()
{
this
.
initfields
(
this
.
formEdit
)
},
},
},
created
()
{
this
.
initforms
()
this
.
$nextTick
(()
=>
{
// this.setformWatch(this.options, "form")
})
},
}
}
</
script
>
</
script
>
...
...
src/views/screening/DraftBox.vue
View file @
648767cb
<
template
>
<
template
>
<div>
2222
</div>
<div
class=
"dataCenter"
>
<div
class=
"header"
>
草稿箱
</div>
<div
class=
"content"
>
<customs-table
ref=
"table"
:table-data=
"tableData"
:columns=
"columns"
:header-class=
"'newHeader'"
:list-loading=
"listLoading"
:current-page=
"pageIndex"
:total-count=
"total"
:page-sizes=
"pageSizes"
:page-size=
"pageSize"
@
pageSizeChange=
"handleSizeChange"
@
currentPageChange=
"handleCurrentChange"
/>
</div>
</div>
</
template
>
</
template
>
<
script
>
import
CustomsTable
from
"
@/components/CustomsTable
"
import
paginationMixin
from
"
@/components/TabComponents/mixin
"
export
default
{
// 数据概览
name
:
""
,
components
:
{
CustomsTable
,
},
mixins
:
[
paginationMixin
],
data
()
{
return
{
listLoading
:
false
,
selectedIndex
:
sessionStorage
.
getItem
(
"
homeSelectedIndex
"
)
-
0
||
0
,
headList
:
[
"
社区筛查
"
,
"
医院筛查
"
,
"
体检筛查
"
],
columns
:
[
{
label
:
"
医联体
"
,
minWidth
:
120
,
value
:
"
groupName
"
,
},
{
label
:
"
姓名
"
,
minWidth
:
120
,
value
:
"
name
"
,
},
{
label
:
"
性别
"
,
minWidth
:
120
,
value
:
"
sex
"
,
},
{
label
:
"
身份证
"
,
minWidth
:
120
,
value
:
"
idCard
"
,
},
{
label
:
"
年龄
"
,
minWidth
:
120
,
value
:
"
age
"
,
},
{
label
:
"
筛查时间
"
,
minWidth
:
120
,
value
:
"
screenTime
"
,
},
{
label
:
"
风险评估结果
"
,
minWidth
:
120
,
value
:
"
result
"
,
},
{
label
:
"
上次随访时间
"
,
minWidth
:
120
,
value
:
"
targetFieldCode
"
,
},
{
label
:
"
筛查审核状态
"
,
minWidth
:
180
,
value
:
"
createTime
"
,
},
{
label
:
"
操作
"
,
width
:
220
,
fixed
:
"
right
"
,
operType
:
"
button
"
,
operations
:
[
{
func
:
this
.
rowOpration
,
formatter
(
row
)
{
return
{
label
:
"
编辑
"
,
type
:
"
text
"
,
}
},
},
{
func
:
this
.
rowOpration
,
formatter
(
row
)
{
return
{
label
:
"
删除
"
,
type
:
"
text
"
,
}
},
style
:
{
color
:
"
#FA6400
"
,
},
},
],
},
],
tableData
:
[
{
name
:
"
1
"
,
1
:
2
,
},
],
}
},
watch
:
{},
mounted
()
{},
methods
:
{
setSelectedIndex
(
i
)
{
console
.
log
(
this
.
selectedIndex
)
this
.
selectedIndex
=
i
sessionStorage
.
setItem
(
"
homeSelectedIndex
"
,
this
.
selectedIndex
)
},
},
}
</
script
>
<
style
lang=
"scss"
scoped
>
.dataCenter
{
padding
:
24px
0
;
height
:
100%
;
display
:
flex
;
flex-direction
:
column
;
.header
{
display
:
flex
;
text-indent
:
24px
;
margin-bottom
:
20px
;
height
:
50px
;
line-height
:
32px
;
font-size
:
14px
;
font-family
:
AlibabaPuHuiTiR
;
color
:
rgba
(
0
,
0
,
0
,
0
.8
);
border-bottom
:
1px
solid
#f3f3f3
;
}
.content
{
padding
:
0
24px
;
}
}
</
style
>
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