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
84392f34
Commit
84392f34
authored
Feb 03, 2023
by
刘予佳
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'remotes/origin/dev' into dev_lyj
parents
5c0f6e5d
b080ebee
Changes
11
Show whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
181 additions
and
86 deletions
+181
-86
input.vue
packages/config/input.vue
+31
-7
App.vue
src/App.vue
+1
-0
问卷调查JSON.js
src/components/FormComponents/CustomForm/问卷调查JSON.js
+2
-0
SideBarItem.vue
...layouts/components/zx-side-bar/components/SideBarItem.vue
+18
-18
index.vue
src/layouts/components/zx-side-bar/index.vue
+3
-0
index.js
src/router/index.js
+1
-0
ScreeningAdd.vue
src/views/screening/ScreeningAdd.vue
+13
-2
ConfigForms.vue
src/views/screening/components/ConfigForms.vue
+87
-48
FormTab.vue
src/views/screening/components/FormTab.vue
+13
-7
mixin.js
src/views/screening/components/mixin.js
+9
-2
层级关系.md
层级关系.md
+3
-2
No files found.
packages/config/input.vue
View file @
84392f34
...
@@ -35,6 +35,9 @@
...
@@ -35,6 +35,9 @@
<el-form-item
label=
"是否只读"
>
<el-form-item
label=
"是否只读"
>
<el-switch
v-model=
"data.readonly"
></el-switch>
<el-switch
v-model=
"data.readonly"
></el-switch>
</el-form-item>
</el-form-item>
<el-form-item
label=
"是否禁用"
>
<el-switch
v-model=
"data.disabled"
></el-switch>
</el-form-item>
<el-form-item
label=
"是否可见"
>
<el-form-item
label=
"是否可见"
>
<el-switch
v-model=
"data.display"
></el-switch>
<el-switch
v-model=
"data.display"
></el-switch>
</el-form-item>
</el-form-item>
...
@@ -50,6 +53,18 @@
...
@@ -50,6 +53,18 @@
</
template
>
</
template
>
<
script
>
<
script
>
let
checkTel
=
(
rule
,
value
,
callback
)
=>
{
if
(
!
value
)
{
return
callback
(
new
Error
(
"
请输入手机号
"
))
}
const
reg
=
/^1
[
3,4,5,6,7,8,9
][
0-9
]{9}
$/
reg
.
test
(
value
)
if
(
!
reg
.
test
(
value
))
{
callback
(
new
Error
(
"
请输入正确的手机号
"
))
}
else
{
callback
()
}
}
export
default
{
export
default
{
name
:
"
config-input
"
,
name
:
"
config-input
"
,
props
:
[
"
data
"
],
props
:
[
"
data
"
],
...
@@ -71,6 +86,9 @@ export default {
...
@@ -71,6 +86,9 @@ export default {
})
})
this
.
data
.
rules
=
rules
this
.
data
.
rules
=
rules
},
},
telRule
()
{
this
.
data
.
rules
[
1
]
=
{
validator
:
checkTel
,
trigger
:
"
blur
"
}
},
},
},
watch
:
{
watch
:
{
"
data.required
"
:
function
(
val
)
{
"
data.required
"
:
function
(
val
)
{
...
@@ -84,15 +102,21 @@ export default {
...
@@ -84,15 +102,21 @@ export default {
this
.
generateRule
()
this
.
generateRule
()
},
},
"
data.pattern
"
:
function
(
val
)
{
"
data.pattern
"
:
function
(
val
)
{
if
(
val
)
if
(
val
)
{
if
(
val
==
"
checkTel
"
)
{
this
.
telRule
()
}
else
{
this
.
validator
.
pattern
=
{
this
.
validator
.
pattern
=
{
pattern
:
new
RegExp
(
val
),
pattern
:
new
RegExp
(
val
),
message
:
`
${
this
.
data
.
label
}
格式不匹配`
,
message
:
`
${
this
.
data
.
label
}
格式不匹配`
,
}
}
else
this
.
validator
.
pattern
=
null
// delete this.data.pattern
this
.
generateRule
()
this
.
generateRule
()
}
}
else
{
this
.
validator
.
pattern
=
null
this
.
generateRule
()
}
// delete this.data.pattern
},
},
},
},
}
}
...
...
src/App.vue
View file @
84392f34
...
@@ -19,6 +19,7 @@ export default {
...
@@ -19,6 +19,7 @@ export default {
#vue-admin-beautiful
{
#vue-admin-beautiful
{
height
:
100vh
;
height
:
100vh
;
min-width
:
1400px
;
overflow
:
auto
;
overflow
:
auto
;
margin-right
:
calc
(
100%
-
100vw
);
margin-right
:
calc
(
100%
-
100vw
);
}
}
...
...
src/components/FormComponents/CustomForm/问卷调查JSON.js
0 → 100644
View file @
84392f34
let
formJson
=
{
column
:[],
labelPosition
:
'
left
'
,
labelSuffix
:
'
:
'
,
labelWidth
:
180
,
gutter
:
0
,
menuBtn
:
true
,
submitBtn
:
true
,
submitText
:
'
下一步
'
,
emptyBtn
:
false
,
emptyText
:
'
上一步
'
,
nextTabBtn
:
true
,
nextTabText
:
'
下一页
'
,
menuPosition
:
'
center
'
,
prevBtn
:
true
,
group
:[{
label
:
'
个人信息
'
,
prop
:
'
1669708504829_2651
'
,
arrow
:
true
,
collapse
:
true
,
display
:
true
,
labelWidth
:
8
,
column
:[{
type
:
'
input
'
,
display
:
true
,
importantField
:
false
,
styles
:{},
prop
:
'
name
'
,
label
:
'
姓名
'
,
fieldType
:
'
varchar
'
,
fieldLength
:
'
15
'
,
tableName
:
'
患者信息
'
,
tableCode
:
'
gas_patient_info
'
,
tableId
:
'
1595347991491833857
'
,
notFilter
:
false
,
cType
:
''
,
subfield
:
false
,
autoRequired
:
0
,
personalRequired
:
0
,
lg
:
12
,
span
:
12
,
width
:
24
,
xs
:
12
,
sm
:
12
,
md
:
12
,
readonly
:
false
,
required
:
true
,
rules
:[{
required
:
true
,
message
:
'
姓名必须填写
'
}]},{
type
:
'
date
'
,
display
:
true
,
importantField
:
false
,
styles
:{},
format
:
'
yyyy-MM-dd
'
,
valueFormat
:
'
yyyy-MM-dd
'
,
prop
:
'
survey_time
'
,
dicType
:
''
,
label
:
'
调查时间
'
,
fieldType
:
'
datetime
'
,
tableName
:
'
问卷调查
'
,
tableCode
:
'
gas_question
'
,
tableId
:
'
1597462007689347074
'
,
notFilter
:
false
,
cType
:
''
,
subfield
:
false
,
span
:
12
,
xs
:
12
,
sm
:
12
,
md
:
12
,
lg
:
12
,
required
:
true
,
rules
:[{
required
:
true
,
message
:
'
调查时间必须填写
'
}],
personalRequired
:
0
},{
type
:
'
input
'
,
display
:
true
,
importantField
:
false
,
styles
:{},
prop
:
'
phone
'
,
label
:
'
手机号
'
,
fieldType
:
'
varchar
'
,
fieldLength
:
'
15
'
,
tableName
:
'
患者信息
'
,
tableCode
:
'
gas_patient_info
'
,
tableId
:
'
1595347991491833857
'
,
notFilter
:
false
,
cType
:
''
,
subfield
:
false
,
span
:
12
,
xs
:
12
,
sm
:
12
,
md
:
12
,
lg
:
12
,
required
:
true
,
rules
:[{
required
:
true
,
message
:
'
手机号必须填写
'
},{
validator
:
function
checkTel
(
rule
,
value
,
callback
)
{
\
n
if
(
!
value
)
{
\
n
return
callback
(
new
Error
(
\
"
请输入手机号
\"
));
\n
}
\n\n
var reg = /^1[3,4,5,6,7,8,9][0-9]{9}$/;
\n
reg.test(value);
\n\n
if (!reg.test(value)) {
\n
callback(new Error(
\"
请输入正确的手机号
\"
));
\n
} else {
\n
callback();
\n
}
\n
},trigger:'change'}],pattern:'checkTel'},{type:'input',display:true,importantField:false,styles:{},prop:'link_phone',label:'联系号码',fieldType:'varchar',fieldLength:'128',tableName:'患者信息',tableCode:'gas_patient_info',tableId:'1595347991491833857',notFilter:false,cType:'',subfield:false,span:12,xs:12,sm:12,md:12,lg:12,width:24,rules:[{required:true,message:'联系号码必须填写'}],required:true},{type:'date',display:true,importantField:false,styles:{},prop:'birthday',label:'出生日期',fieldType:'date',fieldLength:'',format:'yyyy-MM-dd',valueFormat:'yyyy-MM-dd',dicType:'',tableName:'患者信息',tableCode:'gas_patient_info',tableId:'1595347991491833857',notFilter:false,cType:'',subfield:false,span:12,xs:12,sm:12,md:12,lg:12,required:true,rules:[{required:true,message:'出生日期必须填写'}],disabled:true,value:' '},{type:'input',display:true,importantField:false,styles:{},prop:'age',label:'年龄',fieldType:'int',fieldLength:'11',tableName:'患者信息',tableCode:'gas_patient_info',tableId:'1595347991491833857',notFilter:false,cType:'',subfield:false,span:12,xs:12,sm:12,md:12,lg:12,required:true,rules:[{required:true,message:'年龄必须填写'}],readonly:false,disabled:true},{type:'radio',display:true,importantField:false,styles:{},autoRequired:0,personalRequired:0,prop:'sex',dicData:[{label:'女',value:'2',id:'1595351964546281474',parentId:''},{label:'男',value:'1',id:'1595351940139626497',parentId:''}],dynamicshSet:[],dicType:'d-sex',props:{label:'label',value:'value'},label:'性别',fieldType:'varchar',fieldLength:'20',tableName:'患者信息',tableCode:'gas_patient_info',tableId:'1595347991491833857',notFilter:false,cType:'',subfield:false,span:24,xs:24,sm:24,md:24,lg:24,required:true,rules:[{required:true,message:'请选择性别'}]}]},{label:'家族史',prop:'1669708827460_97007',arrow:true,collapse:true,display:true,labelWidth:8,column:[{type:'radio',display:true,importantField:false,styles:{},prop:'is_first_degree',label:'一级亲属(父母、子女、兄弟姐妹)罹患胃癌情况',dicData:[{label:'是',value:'1',id:'1595347527757000705',parentId:''},{label:'否',value:'0',id:'1595347502595371010',parentId:''}],dynamicshSet:[{value:'1',target:'family_count'},{value:'1',target:'min_age'}],dicType:'d-sf',props:{label:'label',value:'value'},fieldType:'tinyint',fieldLength:'2',tableName:'问卷调查',tableCode:'gas_question',tableId:'1597462007689347074',notFilter:false,cType:'',subfield:false,autoRequired:0,personalRequired:0,span:24,xs:24,sm:24,md:24,lg:24,required:true,rules:[{required:true,message:'请选择一级亲属(父母、子女、兄弟姐妹)罹患胃癌情况'}]},{type:'input',display:true,importantField:false,styles:{},prop:'family_count',label:'数量',fieldType:'int',fieldLength:'11',tableName:'问卷调查',tableCode:'gas_question',tableId:'1597462007689347074',notFilter:false,cType:'',subfield:false,span:24,labelSuffix:'(1)',xs:24,sm:24,md:24,lg:24,required:true,rules:[{required:true,message:'数量必须填写'}]},{type:'input',display:true,importantField:false,styles:{},prop:'min_age',label:'诊断时最小年龄',fieldType:'int',fieldLength:'11',tableName:'问卷调查',tableCode:'gas_question',tableId:'1597462007689347074',notFilter:false,cType:'',subfield:false,autoRequired:0,personalRequired:0,span:24,labelSuffix:'(2)',xs:24,sm:24,md:24,lg:24,width:24,rules:[{required:true,message:'诊断时最小年龄必须填写'}],required:true},{type:'radio',display:true,importantField:false,styles:{},prop:'is_other_sickness',label:'一级亲属罹患其他恶性肿瘤情况',fieldType:'tinyint',fieldLength:'2',dicData:[{label:'是',value:'1',id:'1595347527757000705',parentId:''},{label:'否',value:'0',id:'1595347502595371010',parentId:''}],dynamicshSet:[{value:'1',target:'family_other_count'},{value:'1',target:'other_sickness'}],dicType:'d-sf',props:{label:'label',value:'value'},tableName:'问卷调查',tableCode:'gas_question',tableId:'1597462007689347074',notFilter:false,cType:'',subfield:false,xs:24,sm:24,md:24,lg:24,span:24,width:24,rules:[{required:true,message:'请选择一级亲属罹患其他恶性肿瘤情况'}],required:true,autoRequired:0,personalRequired:0,labelSuffix:'2'},{type:'input',display:true,importantField:false,styles:{},prop:'family_other_count',label:'一级亲属罹患其他恶性肿瘤数量',fieldType:'int',fieldLength:'11',dicData:[{label:'是',value:'1',id:'1595347527757000705',parentId:''},{label:'否',value:'0',id:'1595347502595371010',parentId:''}],dynamicshSet:[],dicOption:'static',dicType:'',props:{label:'label',value:'value'},tableName:'问卷调查',tableCode:'gas_question',tableId:'1597462007689347074',notFilter:false,cType:'',subfield:false,lg:24,xs:24,sm:24,md:24,autoRequired:0,personalRequired:0,span:24,width:24,labelSuffix:'(1)',required:true,rules:[{required:true,message:'一级亲属罹患其他恶性肿瘤数量必须填写'}]},{type:'input',display:true,importantField:false,styles:{},prop:'other_sickness',label:'一级亲属罹患其它恶性肿瘤名称',fieldType:'varchar',fieldLength:'255',tableName:'问卷调查',tableCode:'gas_question',tableId:'1597462007689347074',notFilter:false,cType:'',subfield:false,autoRequired:0,personalRequired:0,span:24,labelSuffix:'(2)',xs:24,sm:24,md:24,lg:24,width:24,rules:[{required:true,message:'一级亲属罹患其它恶性肿瘤名称必须填写'}],required:true}]}]}
src/layouts/components/zx-side-bar/components/SideBarItem.vue
View file @
84392f34
...
@@ -63,9 +63,9 @@
...
@@ -63,9 +63,9 @@
</template>
</template>
<
script
>
<
script
>
import
path
from
"
path
"
;
import
path
from
"
path
"
import
{
isExternal
}
from
"
@/utils/validate
"
;
import
{
isExternal
}
from
"
@/utils/validate
"
import
AppLink
from
"
@/layouts/components/Link
"
;
import
AppLink
from
"
@/layouts/components/Link
"
export
default
{
export
default
{
name
:
"
SideBarItem
"
,
name
:
"
SideBarItem
"
,
...
@@ -85,22 +85,22 @@ export default {
...
@@ -85,22 +85,22 @@ export default {
},
},
},
},
data
()
{
data
()
{
this
.
onlyOneChild
=
null
;
this
.
onlyOneChild
=
null
return
{}
;
return
{}
},
},
methods
:
{
methods
:
{
handleChildren
(
children
=
[],
parent
)
{
handleChildren
(
children
=
[],
parent
)
{
if
(
children
===
null
)
children
=
[]
;
if
(
children
===
null
)
children
=
[]
const
showChildren
=
children
.
filter
((
item
)
=>
{
const
showChildren
=
children
.
filter
((
item
)
=>
{
if
(
item
.
hidden
)
{
if
(
item
.
hidden
)
{
return
false
;
return
false
}
else
{
}
else
{
this
.
onlyOneChildren
=
item
;
this
.
onlyOneChildren
=
item
return
true
;
return
true
}
}
})
;
})
if
(
showChildren
.
length
===
1
)
{
if
(
showChildren
.
length
===
1
)
{
return
true
;
return
true
}
}
if
(
showChildren
.
length
===
0
)
{
if
(
showChildren
.
length
===
0
)
{
...
@@ -108,22 +108,22 @@ export default {
...
@@ -108,22 +108,22 @@ export default {
...
parent
,
...
parent
,
path
:
""
,
path
:
""
,
notShowChildren
:
true
,
notShowChildren
:
true
,
};
return
true
;
}
}
return
false
;
return
true
}
return
false
},
},
handlePath
(
routePath
)
{
handlePath
(
routePath
)
{
if
(
isExternal
(
routePath
))
{
if
(
isExternal
(
routePath
))
{
return
routePath
;
return
routePath
}
}
if
(
isExternal
(
this
.
basePath
))
{
if
(
isExternal
(
this
.
basePath
))
{
return
this
.
basePath
;
return
this
.
basePath
}
}
return
path
.
resolve
(
this
.
basePath
,
routePath
)
;
return
path
.
resolve
(
this
.
basePath
,
routePath
)
},
},
},
},
}
;
}
</
script
>
</
script
>
<
style
lang=
"scss"
scoped
>
<
style
lang=
"scss"
scoped
>
...
...
src/layouts/components/zx-side-bar/index.vue
View file @
84392f34
...
@@ -63,6 +63,9 @@ export default {
...
@@ -63,6 +63,9 @@ export default {
return
variables
return
variables
},
},
},
},
// mounted() {
// console.log(this.routes)
// },
}
}
</
script
>
</
script
>
<
style
lang=
"scss"
scoped
>
<
style
lang=
"scss"
scoped
>
...
...
src/router/index.js
View file @
84392f34
...
@@ -10,6 +10,7 @@ export const constantRoutes = [
...
@@ -10,6 +10,7 @@ export const constantRoutes = [
path
:
"
/home
"
,
path
:
"
/home
"
,
name
:
"
Home
"
,
name
:
"
Home
"
,
// redirect: "/home",
// redirect: "/home",
hidden
:
true
,
component
:
layout
,
component
:
layout
,
children
:
[
children
:
[
{
{
...
...
src/views/screening/ScreeningAdd.vue
View file @
84392f34
<
template
>
<
template
>
<ConfigForms
form-type=
"1"
:prods=
"'add'
"
></ConfigForms>
<ConfigForms
form-type=
"1"
@
addMethods=
"addMethods
"
></ConfigForms>
</
template
>
</
template
>
<
script
>
<
script
>
...
@@ -20,7 +20,18 @@ export default {
...
@@ -20,7 +20,18 @@ export default {
return
{}
return
{}
},
},
created
()
{},
created
()
{},
methods
:
{},
methods
:
{
// 处理部分逻辑
addMethods
(
v
)
{
console
.
log
(
v
)
if
(
v
.
activeName
==
"
index0
"
)
{
let
data
=
{
birthday
:
v
.
form
.
birthday
,
}
sessionStorage
.
setItem
(
"
index1Data
"
,
JSON
.
stringify
(
data
))
}
},
},
}
}
</
script
>
</
script
>
...
...
src/views/screening/components/ConfigForms.vue
View file @
84392f34
...
@@ -7,38 +7,40 @@
...
@@ -7,38 +7,40 @@
<el-button
<el-button
v-if=
"!disabled"
v-if=
"!disabled"
class=
"draftButton"
class=
"draftButton"
@
click=
"onSubmit(formType)"
:loading=
"loading"
:loading=
"loading"
@
click=
"onSubmit(formType)"
>
{{
formType
==
1
?
"
临时保存
"
:
"
返回
"
}}
</el-button
>
{{
formType
==
1
?
"
临时保存
"
:
"
返回
"
}}
</el-button
>
>
<el-tabs
<el-tabs
v-model=
"activeName"
v-model=
"activeName"
v-loading=
"fromLoading"
type=
"card"
type=
"card"
:style=
"
{ width: formType == 1 ? '100%' : 'calc(100% - 200px)' }"
:style=
"
{ width: formType == 1 ? '100%' : 'calc(100% - 200px)' }"
class="publicTab"
class="publicTab"
v-loading="fromLoading"
@tab-click="handleTabClick"
@tab-click="handleTabClick"
>
>
<el-tab-pane
<el-tab-pane
:label=
"form.label"
:name=
"'index' + index"
v-for=
"(form, index) in formTabs"
v-for=
"(form, index) in formTabs"
:key=
"form.id"
:key=
"form.id"
:label=
"form.label"
:name=
"'index' + index"
>
>
<transition
mode=
"out-in"
name=
"fade-transform"
>
<transition
mode=
"out-in"
name=
"fade-transform"
>
<div
v-show=
"activeName === 'index' + index"
>
<div
v-show=
"activeName === 'index' + index"
>
<template
v-if=
"form.formId"
>
<template
v-if=
"form.formId"
>
<form-tab
<form-tab
ref=
"formTabs"
:patient-id=
"patientId"
:patient-id=
"patientId"
:patient-standby-id=
"patientStandbyId"
:patient-standby-id=
"patientStandbyId"
:newform-record-id=
"newformRecordId"
:form=
"form"
:form=
"form"
:disabled=
"disabled"
:disabled=
"disabled"
contrast
contrast
:form-initial=
"formInitial"
:survival-flag=
"survivalFlag"
@
setFormJson=
"setFormJson"
@
setFormJson=
"setFormJson"
@
handleConfirm=
"handleConfirm"
@
handleConfirm=
"handleConfirm"
@
onPrev=
"onPrev"
@
onPrev=
"onPrev"
:formInitial=
"formInitial"
:survivalFlag=
"survivalFlag"
></form-tab>
></form-tab>
</
template
>
</
template
>
</div>
</div>
...
@@ -80,8 +82,8 @@
...
@@ -80,8 +82,8 @@
<el-button
<el-button
type=
"primary"
type=
"primary"
:loading=
"loading"
:loading=
"loading"
@
click=
"view"
class=
"textBtn"
class=
"textBtn"
@
click=
"view"
>
查看
</el-button
>
查看
</el-button
>
>
<el-button
type=
"primary"
:loading=
"loading"
@
click=
"continueSubmit"
<el-button
type=
"primary"
:loading=
"loading"
@
click=
"continueSubmit"
...
@@ -97,17 +99,17 @@
...
@@ -97,17 +99,17 @@
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
"
export
default
{
export
default
{
components
:
{
publicDialog
},
name
:
"
ConfigForms
"
,
name
:
"
ConfigForms
"
,
components
:
{
publicDialog
},
mixins
:
[
mixin
],
mixins
:
[
mixin
],
props
:
{
props
:
{
disabled
:
Boolean
,
disabled
:
Boolean
,
formType
:
String
,
formType
:
String
,
patientId
:
String
,
patientId
:
String
,
formClass
:
String
,
formClass
:
String
,
prods
:
String
,
},
},
data
()
{
data
()
{
return
{
return
{
...
@@ -118,41 +120,41 @@ export default {
...
@@ -118,41 +120,41 @@ export default {
formInitial
:
{},
// 第四步的数据
formInitial
:
{},
// 第四步的数据
}
}
},
},
methods
:
{
computed
:
{
view
()
{},
survivalFlag
()
{
handleConfirm
(
data
,
done
,
cb
)
{
if
(
this
.
activeName
==
"
index0
"
&&
this
.
formClass
)
{
this
.
addPatient
(
data
,
done
,
cb
)
return
true
},
onPrev
(
done
)
{
this
.
prevTab
(
done
)
},
onSubmit
(
type
)
{
this
.
loading
=
true
if
(
type
==
1
)
{
// 临时保存草稿
this
.
dialogType
=
"
draft
"
this
.
$refs
.
showDialog
.
dialogVisible
=
true
this
.
loading
=
false
}
else
{
}
else
{
// 返回
return
false
this
.
$router
.
back
()
}
}
},
},
dialogSubmit
()
{},
showIndex
()
{
dialogCancel
()
{},
if
(
this
.
activeName
==
"
index0
"
&&
this
.
formClass
)
{
continueSubmit
()
{},
return
false
}
else
{
return
true
}
},
},
created
()
{
// 字典formType 1 筛查表单
// console.log('回显2',this.formEdit)
this
.
getCurrentFormByType
(
this
.
formType
)
},
},
watch
:
{
watch
:
{
activeName
(
val
)
{
activeName
(
val
)
{
console
.
log
(
this
.
formId
)
if
(
val
==
"
index3
"
)
{
if
(
val
==
"
index3
"
)
{
// 第四步风险评估
// 第四步风险评估
this
.
$nextTick
(()
=>
{
this
.
$nextTick
(()
=>
{
getPatientDetail
({
formId
:
this
.
formId
,
// 每个大表单的id
patientId
:
this
.
patientId
||
this
.
patientStandbyId
,
formRecordId
:
this
.
newformRecordId
,
})
.
then
((
res
)
=>
{
console
.
log
(
res
)
})
.
finally
(()
=>
{
this
.
loading
=
false
})
this
.
$nextTick
(()
=>
{
console
.
log
(
"
走了
"
)
//!
//!
// this.formInitial = {
// this.formInitial = {
// risk_rank: "中危",
// risk_rank: "中危",
...
@@ -160,26 +162,63 @@ export default {
...
@@ -160,26 +162,63 @@ export default {
// screening_advise: "立刻住院",
// screening_advise: "立刻住院",
// }
// }
})
})
})
}
else
if
(
val
==
"
index1
"
)
{
// 第二步问卷调查
this
.
$nextTick
(()
=>
{
let
{
birthday
}
=
JSON
.
parse
(
sessionStorage
.
getItem
(
"
index1Data
"
))
let
date
=
new
Date
(
String
(
birthday
).
replace
(
/-/g
,
"
/
"
))
let
d
=
new
Date
()
let
age
=
d
.
getFullYear
()
-
date
.
getFullYear
()
-
(
d
.
getMonth
()
<
date
.
getMonth
()
||
(
d
.
getMonth
()
==
date
.
getMonth
()
&&
d
.
getDate
()
<
date
.
getDate
())
?
1
:
0
)
//!
this
.
formInitial
=
{
birthday
,
age
,
}
})
}
else
{
}
else
{
this
.
formInitial
=
false
this
.
formInitial
=
false
}
}
},
},
},
},
computed
:
{
created
()
{
survivalFlag
()
{
// 字典formType 1 筛查表单
if
(
this
.
activeName
==
"
index0
"
&&
this
.
formClass
)
{
// console.log('回显2',this.formEdit)
return
true
this
.
getCurrentFormByType
(
this
.
formType
)
}
else
{
return
false
}
},
},
showIndex
()
{
methods
:
{
if
(
this
.
activeName
==
"
index0
"
&&
this
.
formClass
)
{
handleConfirm
(
data
,
done
,
cb
)
{
return
false
this
.
addPatient
(
data
,
done
,
cb
)
this
.
$emit
(
"
addMethods
"
,
{
activeName
:
this
.
activeName
,
form
:
data
.
data
,
})
},
onPrev
(
done
)
{
this
.
prevTab
(
done
)
},
onSubmit
(
type
)
{
this
.
loading
=
true
if
(
type
==
1
)
{
// 临时保存草稿
this
.
dialogType
=
"
draft
"
this
.
$refs
.
showDialog
.
dialogVisible
=
true
this
.
loading
=
false
}
else
{
}
else
{
return
true
// 返回
this
.
$router
.
back
()
}
}
},
},
dialogSubmit
()
{},
dialogCancel
()
{},
continueSubmit
()
{},
},
},
provide
()
{
provide
()
{
return
{
return
{
...
...
src/views/screening/components/FormTab.vue
View file @
84392f34
...
@@ -85,6 +85,7 @@ export default {
...
@@ -85,6 +85,7 @@ export default {
form
:
Object
,
form
:
Object
,
patientId
:
String
,
patientId
:
String
,
patientStandbyId
:
String
,
patientStandbyId
:
String
,
newformRecordId
:
String
,
getAll
:
Boolean
,
// 获取页面所有数据
getAll
:
Boolean
,
// 获取页面所有数据
survivalFlag
:
Boolean
,
//存活的显示
survivalFlag
:
Boolean
,
//存活的显示
formEdit
:
{},
formEdit
:
{},
...
@@ -146,7 +147,6 @@ export default {
...
@@ -146,7 +147,6 @@ export default {
},
},
methods
:
{
methods
:
{
initData
()
{
initData
()
{
console
.
log
(
"
有patientId,获取数据
"
)
this
.
formData
.
formRecordId
=
null
this
.
formData
.
formRecordId
=
null
this
.
formCacheList
=
[]
this
.
formCacheList
=
[]
this
.
getPatientDetail
()
this
.
getPatientDetail
()
...
@@ -162,6 +162,7 @@ export default {
...
@@ -162,6 +162,7 @@ export default {
},
},
handleAdd
()
{
handleAdd
()
{
console
.
log
(
"
触发新增
"
,
this
.
form
)
this
.
$refs
.
form
&&
this
.
$refs
.
form
.
resetForm
()
this
.
$refs
.
form
&&
this
.
$refs
.
form
.
resetForm
()
this
.
formData
=
{
this
.
formData
=
{
formEdit
:
{},
formEdit
:
{},
...
@@ -227,16 +228,15 @@ export default {
...
@@ -227,16 +228,15 @@ export default {
"
handleConfirm
"
,
"
handleConfirm
"
,
{
{
data
,
data
,
formId
:
this
.
form
.
formId
,
formId
:
this
.
form
.
formId
,
// 每个大表单的id
patientId
:
this
.
patientId
||
this
.
patientStandbyId
,
patientId
:
this
.
patientId
||
this
.
patientStandbyId
,
formRecordId
:
this
.
formData
.
formRecordId
,
formRecordId
:
this
.
formData
.
formRecordId
||
this
.
newformRecordId
,
// 是否为编辑的表单id
statusMap
:
{
statusMap
:
{
patientFrom
:
this
.
$store
.
getters
[
"
table/selectedIndex
"
],
patientFrom
:
this
.
$store
.
getters
[
"
table/selectedIndex
"
],
is_draft
:
1
,
is_draft
:
1
,
//是否为草稿
check_status
:
1
,
check_status
:
1
,
// 审核状态
},
},
},
},
done
,
done
,
(
res
)
=>
{
(
res
)
=>
{
// 多次填写的表单新增时,获取最新数据
// 多次填写的表单新增时,获取最新数据
...
@@ -358,7 +358,13 @@ export default {
...
@@ -358,7 +358,13 @@ export default {
}
}
},
},
mounted
()
{
mounted
()
{
// console.log()
//! 设置新增判断
if
(
this
.
$route
.
path
==
"
/screening/add
"
)
{
// this.handleAdd()
if
(
!
this
.
formData
.
formRecordId
)
{
this
.
handleAdd
()
}
}
},
},
}
}
</
script
>
</
script
>
...
...
src/views/screening/components/mixin.js
View file @
84392f34
...
@@ -10,7 +10,9 @@ export default {
...
@@ -10,7 +10,9 @@ export default {
activeName
:
"
index0
"
,
activeName
:
"
index0
"
,
fromLoading
:
false
,
fromLoading
:
false
,
patientStandbyId
:
null
,
// 备用id
patientStandbyId
:
null
,
// 备用id
newformRecordId
:
null
,
//记录Id
formTabs
:
[],
formTabs
:
[],
formId
:
""
,
formTabsList
:
[],
formTabsList
:
[],
isUpdated
:
false
,
isUpdated
:
false
,
}
}
...
@@ -41,6 +43,7 @@ export default {
...
@@ -41,6 +43,7 @@ export default {
},
},
handleTabClick
({
index
,
name
})
{
handleTabClick
({
index
,
name
})
{
const
{
formId
,
id
,
silent
}
=
this
.
formTabs
[
index
]
const
{
formId
,
id
,
silent
}
=
this
.
formTabs
[
index
]
this
.
formId
=
this
.
formTabsList
[
index
].
formId
console
.
log
(
"
表单项
"
,
this
.
formTabs
[
index
])
console
.
log
(
"
表单项
"
,
this
.
formTabs
[
index
])
if
(
formId
&&
silent
)
{
if
(
formId
&&
silent
)
{
this
.
formTabs
[
index
][
"
silent
"
]
=
false
//控制是否获取接口数据
this
.
formTabs
[
index
][
"
silent
"
]
=
false
//控制是否获取接口数据
...
@@ -55,11 +58,15 @@ export default {
...
@@ -55,11 +58,15 @@ export default {
async
addPatient
(
data
,
done
,
cb
,
type
)
{
async
addPatient
(
data
,
done
,
cb
,
type
)
{
addPatient
(
data
,
type
)
addPatient
(
data
,
type
)
.
then
((
res
)
=>
{
.
then
((
res
)
=>
{
this
.
$message
.
success
(
"
操作成功
"
)
//
this.$message.success("操作成功")
if
(
res
.
data
)
{
if
(
res
.
data
)
{
this
.
isUpdated
=
true
this
.
isUpdated
=
true
this
.
patientStandbyId
=
res
.
data
.
patientId
this
.
patientStandbyId
=
res
.
data
.
patientId
if
(
cb
&&
Object
.
prototype
.
toString
.
call
(
cb
)
===
"
[object Function]
"
)
{
this
.
newformRecordId
=
res
.
data
.
formRecordId
if
(
cb
&&
Object
.
prototype
.
toString
.
call
(
cb
)
===
"
[object Function]
"
)
{
cb
(
res
)
cb
(
res
)
}
}
}
}
...
...
src/components/FormComponents/CustomForm/
层级关系.md
→
层级关系.md
View file @
84392f34
...
@@ -11,9 +11,10 @@
...
@@ -11,9 +11,10 @@
上一步下一步提交按钮触发
:
在
CustomForm
/
index
最终处理实在
ConfigForms
以及同级中的
mixin
上一步下一步提交按钮触发
:
在
CustomForm
/
index
最终处理实在
ConfigForms
以及同级中的
mixin
formId
:
表单
id
formRecordId
:记录数
数据在
ConfigForms
处理
...
...
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