Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
P
pica.cloud.web-education-admin
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
成员
成员
收起侧边栏
Close sidebar
动态
分支图
统计图
提交
打开侧边栏
com.pica.cloud.education.frontend
pica.cloud.web-education-admin
提交
538e3af9
提交
538e3af9
编写于
4月 19, 2019
作者:
tao.wu
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
no message
上级
b8df61d9
变更
3
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
52 行增加
和
49 行删除
+52
-49
index.vue
src/components/followup/form/index.vue
+2
-9
dataSourceBaseInfo.js
...ollowup/record-manage/models/stroke/dataSourceBaseInfo.js
+2
-0
stroke.vue
src/views/followup/record-manage/patient-scale/stroke.vue
+48
-40
未找到文件。
src/components/followup/form/index.vue
浏览文件 @
538e3af9
...
@@ -13,7 +13,7 @@
...
@@ -13,7 +13,7 @@
:label=
"item.label"
:label=
"item.label"
:rules=
"item.rules"
:rules=
"item.rules"
:label-width=
"item.labelWidth"
:label-width=
"item.labelWidth"
:required=
"
is
Rule"
:required=
"
need
Rule"
:class=
"item.className"
:class=
"item.className"
:error=
"item.error"
>
:error=
"item.error"
>
<!-- div文本 -->
<!-- div文本 -->
...
@@ -112,8 +112,7 @@
...
@@ -112,8 +112,7 @@
export
default
{
export
default
{
props
:
{
props
:
{
isRule
:
Boolean
,
needRule
:
Boolean
,
// formName: String,
dataSource
:
{
dataSource
:
{
type
:
Array
,
type
:
Array
,
default
:
()
=>
[]
default
:
()
=>
[]
...
@@ -124,19 +123,13 @@
...
@@ -124,19 +123,13 @@
}
}
},
},
watch
:
{
watch
:
{
isRule
(
val
){
this
.
needRule
=
val
this
.
$forceUpdate
();
},
form
(
val
){
form
(
val
){
this
.
form
=
val
this
.
form
=
val
// console.log(val)
this
.
$forceUpdate
()
this
.
$forceUpdate
()
}
}
},
},
data
()
{
data
()
{
return
{
return
{
needRule
:
true
,
spanNum
:
6
,
spanNum
:
6
,
// valueFormat: 'timestamp',
// valueFormat: 'timestamp',
// valueFormat: 'yyyy-MM-dd',
// valueFormat: 'yyyy-MM-dd',
...
...
src/views/followup/record-manage/models/stroke/dataSourceBaseInfo.js
浏览文件 @
538e3af9
...
@@ -52,6 +52,8 @@ export default ($this) => {
...
@@ -52,6 +52,8 @@ export default ($this) => {
console
.
log
(
e
)
console
.
log
(
e
)
if
(
e
==
'12个月'
){
if
(
e
==
'12个月'
){
$this
.
needRule
=
true
;
$this
.
needRule
=
true
;
}
else
{
$this
.
needRule
=
false
;
}
}
}
}
},
},
...
...
src/views/followup/record-manage/patient-scale/stroke.vue
浏览文件 @
538e3af9
...
@@ -14,7 +14,7 @@
...
@@ -14,7 +14,7 @@
<FormScale
<FormScale
:dataSource=
"item.dataSource"
:dataSource=
"item.dataSource"
:form=
"item.formObject"
:form=
"item.formObject"
:
isRule=
"is
Rule"
:
needRule=
"need
Rule"
:class=
"item.className"
:class=
"item.className"
/>
/>
</el-form>
</el-form>
...
@@ -54,6 +54,7 @@
...
@@ -54,6 +54,7 @@
needRule
:
false
,
//是否动态开启验证
needRule
:
false
,
//是否动态开启验证
showModule
:
true
,
//是否隐藏表单模块
showModule
:
true
,
//是否隐藏表单模块
canRender
:
true
,
canRender
:
true
,
valid
:
false
,
planPatientsTimesId
:
''
,
planPatientsTimesId
:
''
,
scaleNo
:
''
,
scaleNo
:
''
,
doctorId
:
''
,
doctorId
:
''
,
...
@@ -75,7 +76,6 @@
...
@@ -75,7 +76,6 @@
{
name
:
'CheckLab'
,
formObject
:
{},
showModule
:
true
,
formName
:
'stroke_015'
,
className
:
'obj-form-title'
,
dataSource
:
dataSourceCheckLab
(
this
),
title
:
'六、实验室检查(高危人群12个月随访必填)'
},
{
name
:
'CheckLab'
,
formObject
:
{},
showModule
:
true
,
formName
:
'stroke_015'
,
className
:
'obj-form-title'
,
dataSource
:
dataSourceCheckLab
(
this
),
title
:
'六、实验室检查(高危人群12个月随访必填)'
},
],
],
formData
:
{},
//整个表单对象
formData
:
{},
//整个表单对象
isRule
:
false
,
//验证的依赖关系
}
}
},
},
components
:
{
components
:
{
...
@@ -89,11 +89,45 @@
...
@@ -89,11 +89,45 @@
// 动态开启验证开关
// 动态开启验证开关
setRuleToTrue
(
index
){
setRuleToTrue
(
index
){
this
.
addComponents
[
index
].
dataSource
.
forEach
((
item
,
k
)
=>
{
this
.
addComponents
[
index
].
dataSource
.
forEach
((
item
,
k
)
=>
{
// console.log(this.addComponents[index].dataSource[k].rules)
if
(
item
.
rules
&&
item
.
rules
.
length
>
0
){
if
(
this
.
addComponents
[
index
].
dataSource
[
k
].
rules
&&
this
.
addComponents
[
index
].
dataSource
[
k
].
rules
.
length
>
0
){
if
(
!
this
.
needRule
){
this
.
addComponents
[
index
].
dataSource
[
k
].
rules
[
0
].
required
=
true
;
this
.
addComponents
[
index
].
dataSource
[
k
].
rules
[
0
].
required
=
false
;
// this.addComponents[index].dataSource[k].rules.push(item)
// this.addComponents[index].dataSource[k].rules = item.rules.splice(0,1);
// this.$forceUpdate()
}
// console.log(this.addComponents[index].dataSource[k].rules)
}
}
})
})
},
// 提交量表
dataSubmit
(){
if
(
this
.
valid
){
// console.log(this.formData)
this
.
formData
.
doctorId
=
parseFloat
(
this
.
doctorId
);
this
.
formData
.
saveWay
=
parseFloat
(
this
.
saveWay
);
this
.
formData
.
planPatientsTimesId
=
parseFloat
(
this
.
planPatientsTimesId
);
this
.
formData
.
scaleNo
=
this
.
scaleNo
;
this
.
formData
.
isLine
=
2
;
// console.log(JSON.stringify(this.formData))
axios
({
method
:
'post'
,
url
:
getFollowUpSC
(
'/scale/save'
),
data
:
JSON
.
stringify
(
this
.
formData
),
}).
then
(
res
=>
{
if
(
res
.
data
.
code
==
'000000'
){
this
.
$message
({
message
:
'录入成功'
,
type
:
'success'
});
setTimeout
(()
=>
{
this
.
$router
.
push
({
path
:
'/followup/record-manage/record-list'
})
},
1000
)
}
});
}
}
}
},
},
watch
:
{
watch
:
{
...
@@ -105,49 +139,23 @@
...
@@ -105,49 +139,23 @@
this
.
formData
[
formName
]
=
this
.
addComponents
[
i
].
formObject
;
this
.
formData
[
formName
]
=
this
.
addComponents
[
i
].
formObject
;
if
(
formName
===
'stroke_006'
||
formName
===
'stroke_014'
||
formName
===
'stroke_015'
){
if
(
formName
===
'stroke_006'
||
formName
===
'stroke_014'
||
formName
===
'stroke_015'
){
if
(
this
.
needRule
){
this
.
setRuleToTrue
(
i
)
this
.
setRuleToTrue
(
i
)
}
}
}
if
(
this
.
$refs
[
'form'
+
i
].
length
>
0
){
this
.
$nextTick
(()
=>
{
this
.
$refs
[
'form'
+
i
][
0
].
validate
((
valid
)
=>
{
if
(
this
.
$refs
[
'form'
+
i
].
length
>
0
){
this
.
valid
=
valid
;
this
.
$refs
[
'form'
+
i
][
0
].
validate
((
valid
)
=>
{
});
this
.
valid
=
valid
;
}
}
// console.log(this.formData)
this
.
formData
.
doctorId
=
parseFloat
(
this
.
doctorId
);
this
.
formData
.
saveWay
=
parseFloat
(
this
.
saveWay
);
this
.
formData
.
planPatientsTimesId
=
parseFloat
(
this
.
planPatientsTimesId
);
this
.
formData
.
scaleNo
=
this
.
scaleNo
;
this
.
formData
.
isLine
=
2
;
// console.log(JSON.stringify(this.formData))
if
(
this
.
valid
){
axios
({
method
:
'post'
,
url
:
getFollowUpSC
(
'/scale/save'
),
data
:
JSON
.
stringify
(
this
.
formData
),
}).
then
(
res
=>
{
if
(
res
.
data
.
code
==
'000000'
){
this
.
$message
({
message
:
'录入成功'
,
type
:
'success'
});
});
setTimeout
(()
=>
{
this
.
$router
.
push
({
path
:
'/followup/record-manage/record-list'
})
},
1000
)
}
}
});
})
}
}
this
.
$emit
(
'checkEnd'
,
false
);
this
.
$emit
(
'checkEnd'
,
false
);
// this.dataSubmit();
}
}
},
},
showModule
(
val
){
showModule
(
val
){
console
.
log
(
val
)
this
.
addComponents
.
forEach
((
item
,
index
)
=>
{
this
.
addComponents
.
forEach
((
item
,
index
)
=>
{
if
(
index
>=
3
){
if
(
index
>=
3
){
this
.
addComponents
[
index
].
showModule
=
val
;
this
.
addComponents
[
index
].
showModule
=
val
;
...
...
写
预览
Markdown
格式
0%
请重试
or
附加一个文件
附加文件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录