Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
P
pica.cloud.web-education-admin
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
成员
成员
收起侧边栏
Close sidebar
动态
分支图
统计图
提交
打开侧边栏
com.pica.cloud.education.frontend
pica.cloud.web-education-admin
提交
f6fa9b7f
提交
f6fa9b7f
编写于
4月 20, 2019
作者:
tao.wu
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
no message
上级
538e3af9
变更
1
隐藏空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
80 行增加
和
53 行删除
+80
-53
stroke.vue
src/views/followup/record-manage/patient-scale/stroke.vue
+80
-53
未找到文件。
src/views/followup/record-manage/patient-scale/stroke.vue
浏览文件 @
f6fa9b7f
...
...
@@ -55,6 +55,7 @@
showModule
:
true
,
//是否隐藏表单模块
canRender
:
true
,
valid
:
false
,
moduleList
:
[],
//模块列表
planPatientsTimesId
:
''
,
scaleNo
:
''
,
doctorId
:
''
,
...
...
@@ -85,6 +86,50 @@
checkStart
:
Boolean
,
saveWay
:
Number
},
watch
:
{
checkStart
(
val
){
if
(
val
){
for
(
let
i
=
0
;
i
<
this
.
addComponents
.
length
;
i
++
){
let
formName
=
this
.
addComponents
[
i
].
formName
;
// 将每个模块的fornName对应后台的表名放到表单对象
this
.
formData
[
formName
]
=
this
.
addComponents
[
i
].
formObject
;
if
(
formName
===
'stroke_006'
||
formName
===
'stroke_014'
||
formName
===
'stroke_015'
){
this
.
setRuleToTrue
(
i
)
}
this
.
$nextTick
(()
=>
{
if
(
this
.
$refs
[
'form'
+
i
].
length
>
0
){
this
.
$refs
[
'form'
+
i
][
0
].
validate
((
valid
)
=>
{
this
.
valid
=
valid
;
});
}
})
}
this
.
$emit
(
'checkEnd'
,
false
);
this
.
dataSubmit
();
}
},
showModule
(
val
){
this
.
addComponents
.
forEach
((
item
,
index
)
=>
{
if
(
index
>=
3
){
this
.
addComponents
[
index
].
showModule
=
val
;
}
})
},
},
created
(){
this
.
planPatientsTimesId
=
this
.
$route
.
query
.
planPatientsTimesId
this
.
scaleNo
=
this
.
$route
.
query
.
scaleNo
this
.
doctorId
=
this
.
$route
.
query
.
doctorId
this
.
getFormModules
();
this
.
getFormDetail
();
},
methods
:
{
// 动态开启验证开关
setRuleToTrue
(
index
){
...
...
@@ -100,6 +145,41 @@
}
})
},
// 获取展示的模块
getFormModules
(){
axios
({
method
:
'get'
,
url
:
getFollowUpSC
(
`/scale/
${
this
.
scaleNo
}
/models`
),
data
:
{},
}).
then
(
res
=>
{
if
(
res
.
data
.
code
==
'000000'
){
this
.
moduleList
=
res
.
data
.
data
}
else
{
this
.
$message
({
message
:
res
.
data
.
message
,
type
:
'error'
});
}
})
},
// 获取量表详情
getFormDetail
(){
axios
({
method
:
'get'
,
url
:
getFollowUpSC
(
`/scale/
${
this
.
planPatientsTimesId
}
/
${
this
.
scaleNo
}
/info?type=2&isLine=2`
),
data
:
JSON
.
stringify
(
this
.
formData
),
}).
then
(
res
=>
{
this
.
formData
=
res
.
data
.
data
for
(
let
i
=
0
;
i
<
this
.
addComponents
.
length
;
i
++
){
let
formName
=
this
.
addComponents
[
i
].
formName
;
if
(
this
.
formData
[
formName
]){
this
.
addComponents
[
i
].
formObject
=
this
.
formData
[
formName
];
}
}
this
.
canRender
=
true
;
this
.
$forceUpdate
();
})
},
// 提交量表
dataSubmit
(){
if
(
this
.
valid
){
...
...
@@ -130,59 +210,6 @@
}
}
},
watch
:
{
checkStart
(
val
){
if
(
val
){
for
(
let
i
=
0
;
i
<
this
.
addComponents
.
length
;
i
++
){
let
formName
=
this
.
addComponents
[
i
].
formName
;
// 将每个模块的fornName对应后台的表名放到表单对象
this
.
formData
[
formName
]
=
this
.
addComponents
[
i
].
formObject
;
if
(
formName
===
'stroke_006'
||
formName
===
'stroke_014'
||
formName
===
'stroke_015'
){
this
.
setRuleToTrue
(
i
)
}
this
.
$nextTick
(()
=>
{
if
(
this
.
$refs
[
'form'
+
i
].
length
>
0
){
this
.
$refs
[
'form'
+
i
][
0
].
validate
((
valid
)
=>
{
this
.
valid
=
valid
;
});
}
})
}
this
.
$emit
(
'checkEnd'
,
false
);
// this.dataSubmit();
}
},
showModule
(
val
){
this
.
addComponents
.
forEach
((
item
,
index
)
=>
{
if
(
index
>=
3
){
this
.
addComponents
[
index
].
showModule
=
val
;
}
})
},
},
created
(){
this
.
planPatientsTimesId
=
this
.
$route
.
query
.
planPatientsTimesId
this
.
scaleNo
=
this
.
$route
.
query
.
scaleNo
this
.
doctorId
=
this
.
$route
.
query
.
doctorId
axios
({
method
:
'get'
,
url
:
getFollowUpSC
(
`/scale/
${
this
.
planPatientsTimesId
}
/
${
this
.
scaleNo
}
/info?type=2&isLine=2`
),
data
:
JSON
.
stringify
(
this
.
formData
),
}).
then
(
res
=>
{
this
.
formData
=
res
.
data
.
data
for
(
let
i
=
0
;
i
<
this
.
addComponents
.
length
;
i
++
){
let
formName
=
this
.
addComponents
[
i
].
formName
;
if
(
this
.
formData
[
formName
]){
this
.
addComponents
[
i
].
formObject
=
this
.
formData
[
formName
];
}
}
this
.
canRender
=
true
;
this
.
$forceUpdate
();
})
}
}
</
script
>
...
...
写
预览
Markdown
格式
0%
请重试
or
附加一个文件
附加文件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录