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
9c3b4d5b
Commit
9c3b4d5b
authored
Jun 05, 2023
by
miaojiale
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加年龄字段,添加已增加调查时间,须检验其他需要的情况
parent
45bb256e
Changes
11
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
77 additions
and
36 deletions
+77
-36
date.vue
packages/config/date.vue
+6
-4
FormContent.vue
src/components/FormComponents/CustomForm/FormContent.vue
+19
-18
FormItemSelf.vue
src/components/FormComponents/CustomForm/FormItemSelf.vue
+24
-8
index.vue
src/components/FormComponents/CustomForm/index.vue
+6
-3
table.js
src/store/modules/table.js
+5
-0
DialogConfigForms.vue
src/views/followupentry/components/DialogConfigForms.vue
+1
-0
DraftBox.vue
src/views/screening/DraftBox.vue
+1
-0
ScreeningAdd.vue
src/views/screening/ScreeningAdd.vue
+10
-1
ConfigForms.vue
src/views/screening/components/ConfigForms.vue
+3
-2
FormTab.vue
src/views/screening/components/FormTab.vue
+1
-0
index.vue
src/views/screening/index.vue
+1
-0
No files found.
packages/config/date.vue
View file @
9c3b4d5b
...
...
@@ -67,14 +67,16 @@
<
script
>
let
checkAge
=
(
rule
,
value
,
callback
)
=>
{
if
(
!
value
)
{
return
callback
(
new
Error
(
"
请选择出生日期
"
))
return
callback
(
new
Error
(
""
))
}
let
sex
=
sessionStorage
.
getItem
(
"
addSex
"
)
if
(
!
sex
)
{
let
survey_time
=
sessionStorage
.
getItem
(
"
survey_time
"
)
let
birthday
=
sessionStorage
.
getItem
(
"
birthday
"
)
if
(
!
sex
||
!
survey_time
||
!
birthday
)
{
return
}
let
birthday
=
new
Date
(
value
.
replace
(
/-/g
,
"
/
"
))
let
d
=
new
Date
()
birthday
=
new
Date
(
birthday
.
replace
(
/-/g
,
"
/
"
))
let
d
=
new
Date
(
survey_time
.
replace
(
/-/g
,
"
/
"
)
)
let
age
=
d
.
getFullYear
()
-
birthday
.
getFullYear
()
-
...
...
src/components/FormComponents/CustomForm/FormContent.vue
View file @
9c3b4d5b
<
template
>
<el-row
:gutter=
"options.gutter"
class=
"form-content"
>
<template
v-for=
"(item, columnIndex) in columns.column || columns.children.column"
>
<el-row
:gutter=
"options.gutter"
class=
"form-content"
>
<template
v-for=
"(item, columnIndex) in columns.column || columns.children.column"
>
<div
v-if=
"item.type === 'dynamic'"
v-show=
"item.display"
...
...
@@ -96,10 +95,7 @@
:md=
"item.md || 24"
:lg=
"item.span || 12"
>
<div
class=
"form_title"
:style=
"item.styles"
>
<div
class=
"form_title"
:style=
"item.styles"
>
<span>
{{
item
.
value
}}
</span>
</div>
</el-col>
...
...
@@ -122,6 +118,7 @@
:item=
"item"
:columns=
"columns.column || columns.children.column"
:group=
"options.group"
:active-name=
"activeName"
@
formChange=
"formChange"
@
validateForm=
"validateForm"
@
validUpload=
"validUpload"
...
...
@@ -145,6 +142,7 @@ export default {
components
:
{
FormItemSelf
,
FormDynamic
,
DentalTabForm
,
DentalTabTjForm
},
props
:
{
activeName
:
{
type
:
String
},
form
:
{
type
:
Object
,
default
:
()
=>
{
...
...
@@ -171,38 +169,38 @@ export default {
default
:
false
,
},
},
data
()
{
data
()
{
return
{}
},
computed
:
{
isShowIm
()
{
isShowIm
()
{
return
function
(
val
)
{
return
!
this
.
isShowImportant
?
true
:
val
}
},
paddingLeft
()
{
paddingLeft
()
{
const
columns
=
this
.
columns
return
columns
.
labelWidth
?
`
${
columns
.
labelWidth
}
px`
:
""
},
},
methods
:
{
clearAge
()
{
clearAge
()
{
for
(
let
i
=
0
;
i
<
this
.
$refs
.
formSelf
.
length
;
i
++
)
{
this
.
$refs
.
formSelf
[
i
].
age
=
""
}
},
validateForm
()
{
validateForm
()
{
this
.
$emit
(
"
validateForm
"
)
},
validUpload
(
prop
)
{
validUpload
(
prop
)
{
this
.
$emit
(
"
validUpload
"
,
prop
)
},
handleChange
(
key
,
val
)
{
handleChange
(
key
,
val
)
{
if
(
this
.
form
.
hasOwnProperty
(
key
))
this
.
form
[
key
]
=
val
},
// 切换不符合筛查条件的显示
formChange
()
{
formChange
()
{
// 入选,排除标准,一个填写是就不符合筛查条件
let
arr
=
[
"
is_one_year
"
,
...
...
@@ -211,7 +209,7 @@ export default {
"
is_symptom
"
,
"
is_disease
"
,
"
is_tumour
"
,
"
is_Incomplete
"
"
is_Incomplete
"
,
]
let
flag
=
0
for
(
let
i
=
0
;
i
<
arr
.
length
;
i
++
)
{
...
...
@@ -229,6 +227,9 @@ export default {
}
},
},
mounted
()
{
// console.log(this.activeName)
},
}
</
script
>
...
...
src/components/FormComponents/CustomForm/FormItemSelf.vue
View file @
9c3b4d5b
...
...
@@ -327,7 +327,7 @@
@
change=
"handleChange"
></el-date-picker>
<span
v-if=
"item.prop == 'birthday'"
v-if=
"item.prop == 'birthday'
&& activeName == 'index0'
"
style=
"margin-left: 12px"
>
{{ age + (age ? "岁" : "") }}
</span
>
...
...
@@ -449,6 +449,7 @@
* @description 自定义单组件
*/
import
{
getMedicalunionList
}
from
"
@/api/medicalunion-management
"
import
{
mapGetters
}
from
"
vuex
"
import
ElUploadSelf
from
"
@/components/Upload
"
import
FormItemText
from
"
./FormItemText
"
import
DialogToothBit
from
"
./DialogToothBit
"
...
...
@@ -480,6 +481,7 @@ export default {
},
},
props
:
{
activeName
:
{},
item
:
{
type
:
Object
,
},
...
...
@@ -496,7 +498,7 @@ export default {
},
data
()
{
return
{
age
:
""
,
//
age: "",
pickerOptions
,
rangeOptions
,
unionList
:
[],
...
...
@@ -504,6 +506,9 @@ export default {
}
},
computed
:
{
...
mapGetters
({
age
:
[
"
table/age
"
],
}),
getVwForm
()
{
return
this
.
vwForm
()
},
...
...
@@ -555,6 +560,7 @@ export default {
},
mounted
()
{
this
.
showFormItem
()
console
.
log
(
this
.
activeName
)
},
beforeDestroy
()
{
this
.
$watch
(
...
...
@@ -710,10 +716,10 @@ export default {
},
// 根据生日设置年龄回显
getAge
()
{
if
(
this
.
form
.
birthday
)
{
if
(
this
.
form
.
birthday
&&
this
.
form
.
survey_time
)
{
var
birthday
=
new
Date
(
this
.
form
.
birthday
.
replace
(
/-/g
,
"
/
"
))
var
d
=
new
Date
(
)
var
age
=
let
d
=
new
Date
(
this
.
form
.
survey_time
.
replace
(
/-/g
,
"
/
"
)
)
let
age
=
d
.
getFullYear
()
-
birthday
.
getFullYear
()
-
(
d
.
getMonth
()
<
birthday
.
getMonth
()
||
...
...
@@ -721,11 +727,15 @@ export default {
d
.
getDate
()
<
birthday
.
getDate
())
?
1
:
0
)
this
.
age
=
age
+
""
this
.
$store
.
commit
(
"
table/setAge
"
,
age
)
this
.
form
.
age
=
this
.
age
console
.
log
(
this
.
form
.
age
,
"
---
"
,
age
)
}
else
{
this
.
age
=
""
let
age
=
""
this
.
$store
.
commit
(
"
table/setAge
"
,
age
)
this
.
form
.
age
=
this
.
age
console
.
log
(
this
.
form
.
age
,
"
---
"
,
age
)
}
this
.
form
.
age
=
this
.
age
},
// 获取prop prop 以{}包裹
getProp
(
value
)
{
...
...
@@ -957,6 +967,12 @@ export default {
this
.
handleAlgorithm
()
// !设置年龄
if
(
this
.
item
.
prop
==
"
birthday
"
)
{
sessionStorage
.
setItem
(
"
birthday
"
,
this
.
form
.
birthday
)
this
.
getAge
()
}
// ?survey_time 调查时间
if
(
this
.
item
.
prop
==
"
survey_time
"
)
{
sessionStorage
.
setItem
(
"
survey_time
"
,
this
.
form
.
survey_time
)
this
.
getAge
()
}
if
(
this
.
item
.
prop
==
"
sex
"
)
{
...
...
src/components/FormComponents/CustomForm/index.vue
View file @
9c3b4d5b
...
...
@@ -34,6 +34,7 @@
:form=
"form"
:columns=
"g"
:options=
"options"
:active-name=
"activeName"
:is-show-important=
"isShowImportant"
@
validateForm=
"validateForm"
></form-content>
...
...
@@ -60,6 +61,7 @@
ref=
"formContent"
:form=
"form"
:columns=
"g"
:active-name=
"activeName"
:options=
"options"
:is-show-important=
"isShowImportant"
@
showError=
"showError"
...
...
@@ -138,6 +140,7 @@ export default {
return
{}
},
},
activeName
:
{},
size
:
{
type
:
String
,
default
:
"
small
"
},
formStyle
:
{
type
:
Object
},
formEdit
:
{
...
...
@@ -164,7 +167,7 @@ export default {
data
()
{
return
{
collapseNames
:
[],
activeName
:
"
0
"
,
//
activeName: "0",
loading
:
false
,
isShowImportant
:
false
,
form
:
{},
...
...
@@ -209,7 +212,7 @@ export default {
methods
:
{
validateForm
()
{
// console.log(88845)
if
(
this
.
form
.
birthday
)
{
if
(
this
.
form
.
birthday
&&
this
.
form
.
survey_time
)
{
this
.
$refs
.
form
.
validateField
(
"
birthday
"
,
(
valid
)
=>
{
console
.
log
(
valid
)
})
...
...
@@ -245,7 +248,7 @@ export default {
if
(
next
>=
tabsLen
)
next
=
0
this
.
activeName
=
String
(
next
)
this
.
$emit
(
"
scrollTop
"
)
console
.
log
(
this
.
activeName
)
//
console.log(this.activeName)
},
imFieldChange
(
val
=
false
)
{
...
...
src/store/modules/table.js
View file @
9c3b4d5b
...
...
@@ -2,11 +2,13 @@ const state = {
fontSize
:
localStorage
.
getItem
(
"
fontSize
"
)
||
14
,
selectedIndex
:
sessionStorage
.
getItem
(
"
selectedIndex
"
)
||
""
,
refreshFlag
:
0
,
age
:
""
,
}
const
getters
=
{
fontSize
:
(
state
)
=>
state
.
fontSize
,
selectedIndex
:
(
state
)
=>
state
.
selectedIndex
,
refreshFlag
:
(
state
)
=>
state
.
refreshFlag
,
age
:
(
state
)
=>
state
.
age
,
}
const
mutations
=
{
setFontSize
(
state
,
fontSize
)
{
...
...
@@ -23,6 +25,9 @@ const mutations = {
setRefreshFlag
(
state
,
refreshFlag
)
{
state
.
refreshFlag
=
refreshFlag
},
setAge
(
state
,
age
)
{
state
.
age
=
age
},
}
const
actions
=
{}
export
default
{
...
...
src/views/followupentry/components/DialogConfigForms.vue
View file @
9c3b4d5b
...
...
@@ -82,6 +82,7 @@ export default {
let
data
=
{
birthday
:
v
.
form
.
birthday
,
sex
:
v
.
form
.
sex
,
survey_time
:
v
.
form
.
survey_time
,
}
sessionStorage
.
setItem
(
"
index1Data
"
,
JSON
.
stringify
(
data
))
}
...
...
src/views/screening/DraftBox.vue
View file @
9c3b4d5b
...
...
@@ -202,6 +202,7 @@ export default {
let
data
=
{
birthday
:
v
.
form
.
birthday
,
sex
:
v
.
form
.
sex
,
survey_time
:
v
.
form
.
survey_time
,
}
sessionStorage
.
setItem
(
"
index1Data
"
,
JSON
.
stringify
(
data
))
}
...
...
src/views/screening/ScreeningAdd.vue
View file @
9c3b4d5b
...
...
@@ -18,7 +18,12 @@ export default {
data
()
{
return
{}
},
created
()
{},
created
()
{
sessionStorage
.
removeItem
(
"
survey_time
"
)
sessionStorage
.
removeItem
(
"
birthday
"
)
sessionStorage
.
removeItem
(
"
addSex
"
)
this
.
$store
.
commit
(
"
table/setAge
"
,
""
)
},
methods
:
{
// 处理部分逻辑
addMethods
(
v
)
{
...
...
@@ -27,11 +32,15 @@ export default {
let
data
=
{
birthday
:
v
.
form
.
birthday
,
sex
:
v
.
form
.
sex
,
survey_time
:
v
.
form
.
survey_time
,
}
sessionStorage
.
setItem
(
"
index1Data
"
,
JSON
.
stringify
(
data
))
}
},
},
// beforeRouteEnter(to, from, next) {
// next()
// },
}
</
script
>
...
...
src/views/screening/components/ConfigForms.vue
View file @
9c3b4d5b
...
...
@@ -244,9 +244,9 @@ export default {
this
.
$nextTick
(()
=>
{
let
index1Data
=
sessionStorage
.
getItem
(
"
index1Data
"
)
if
(
index1Data
)
{
let
{
birthday
,
sex
}
=
JSON
.
parse
(
index1Data
)
let
{
birthday
,
sex
,
survey_time
}
=
JSON
.
parse
(
index1Data
)
let
date
=
new
Date
(
String
(
birthday
).
replace
(
/-/g
,
"
/
"
))
let
d
=
new
Date
()
let
d
=
new
Date
(
survey_time
.
replace
(
/-/g
,
"
/
"
)
)
let
age
=
d
.
getFullYear
()
-
date
.
getFullYear
()
-
...
...
@@ -259,6 +259,7 @@ export default {
birthday
,
age
,
sex
,
survey_time
,
}
}
})
...
...
src/views/screening/components/FormTab.vue
View file @
9c3b4d5b
...
...
@@ -63,6 +63,7 @@
<custom-form
ref=
"form"
:options=
"widgetFormPreview"
:active-name=
"activeName"
:form-edit=
"formData.formEdit"
@
scrollTop=
"scrollTop"
@
handleConfirm=
"handleConfirm"
...
...
src/views/screening/index.vue
View file @
9c3b4d5b
...
...
@@ -298,6 +298,7 @@ export default {
let
data
=
{
birthday
:
v
.
form
.
birthday
,
sex
:
v
.
form
.
sex
,
survey_time
:
v
.
form
.
survey_time
,
}
sessionStorage
.
setItem
(
"
index1Data
"
,
JSON
.
stringify
(
data
))
}
...
...
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