Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
P
pica.cloud.web-education-admin
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
成员
成员
收起侧边栏
Close sidebar
动态
分支图
统计图
提交
打开侧边栏
com.pica.cloud.education.frontend
pica.cloud.web-education-admin
提交
a20a5fc4
提交
a20a5fc4
编写于
5月 07, 2019
作者:
tao.wu
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
no message
上级
10dff8f8
变更
1
隐藏空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
29 行增加
和
64 行删除
+29
-64
hypertension.vue
...ews/followup/record-manage/patient-scale/hypertension.vue
+29
-64
未找到文件。
src/views/followup/record-manage/patient-scale/hypertension.vue
浏览文件 @
a20a5fc4
...
...
@@ -68,6 +68,7 @@
addComponentsSourceList
:
[],
formData
:
{},
//整个表单对象
medication
:
[],
// 用药情况
type3Obj
:
{}
}
},
components
:
{
...
...
@@ -165,7 +166,7 @@
{
name
:
'hypeDataSourceLifeMode'
,
formObject
:
{},
showModule
:
true
,
formName
:
'hypertension_003'
,
className
:
'obj-form-title'
,
dataSource
:
hypeDataSourceLifeMode
(
this
),
hideTitle
:
false
,
title
:
'生活方式指导'
},
{
name
:
'hypeDataSourceHelpChecking'
,
formObject
:
{},
showModule
:
true
,
formName
:
'hypertension_004'
,
className
:
'obj-form-title'
,
dataSource
:
hypeDataSourceHelpChecking
(
this
),
hideTitle
:
false
,
title
:
'辅助检查'
},
{
name
:
'hypeDataSourceMedicationUse'
,
formObject
:
{
arrList
:
this
.
medication
},
showModule
:
true
,
formName
:
'h_s_002'
,
className
:
'obj-form-title'
,
dataSource
:
hypeDataSourceMedicationUse
(
this
),
hideTitle
:
false
,
title
:
'用药情况'
},
{
name
:
'hypeDataSourceReferral'
,
formObject
:
{
reason
:
''
,
mechanism
:
''
},
showModule
:
true
,
formName
:
'h_s_003'
,
className
:
'obj-form-title'
,
dataSource
:
hypeDataSourceReferral
(
this
),
hideTitle
:
false
,
title
:
'转诊'
},
{
name
:
'hypeDataSourceReferral'
,
formObject
:
{
reason
:
''
,
mechanism
:
''
,
department
:
''
},
showModule
:
true
,
formName
:
'h_s_003'
,
className
:
'obj-form-title'
,
dataSource
:
hypeDataSourceReferral
(
this
),
hideTitle
:
false
,
title
:
'转诊'
},
{
name
:
'hypeDataSourceNextFollowDay'
,
formObject
:
{
nextFollowDay
:
''
},
showModule
:
true
,
formName
:
'h_s_004'
,
className
:
'obj-form-title'
,
dataSource
:
hypeDataSourceNextFollowDay
(
this
),
hideTitle
:
true
,
title
:
'下次随访日期'
},
]
},
...
...
@@ -227,6 +228,17 @@
}
})
},
// 处理获取用药情况详情数据
handleModuleMedicalUseDetai
(
obj
){
if
(
obj
.
medicineType
==
'1'
){
const
{
dosageDay
,
dosageNum
,
medicinesName
,
medicineType
}
=
obj
;
this
.
medication
.
push
({
dosageDay
,
dosageNum
,
medicinesName
,
medicineType
});
}
else
if
(
obj
.
medicineType
==
'3'
){
const
{
dosageDay
,
dosageNum
,
medicinesName
,
medicineType
}
=
obj
;
this
.
type3Obj
=
{
dosageDay
,
dosageNum
,
medicinesName
,
medicineType
}
}
},
// 获取量表详情
getFormDetail
(){
getScaleDetail
(
this
.
domain
,
this
.
planPatientsTimesId
,
this
.
scaleNo
).
then
(
res
=>
{
...
...
@@ -234,39 +246,26 @@
let
keysList
=
Object
.
keys
(
this
.
formData
);
if
(
keysList
.
length
>
0
){
this
.
medication
=
[];
// this.medication = [{
// medicinesName: '',
// dosageDay: '',
// dosageNum: '',
// medicineType: 'nullData'
// }];
for
(
let
i
=
0
;
i
<
this
.
addComponents
.
length
;
i
++
){
let
formName
=
this
.
addComponents
[
i
].
formName
;
if
(
this
.
formData
[
formName
]
&&
formName
==
'h_s_002'
&&
this
.
formData
.
h_s_002
.
length
>
1
){
let
type3Obj
=
{};
this
.
formData
.
h_s_002
.
forEach
((
item
,
index
)
=>
{
if
(
item
.
medicineType
==
'1'
){
this
.
medication
.
push
({
dosageDay
:
item
.
dosageDay
,
dosageNum
:
item
.
dosageNum
,
medicinesName
:
item
.
medicinesName
,
medicineType
:
item
.
medicineType
})
}
else
if
(
item
.
medicineType
==
'3'
){
type3Obj
=
{
dosageDay
:
item
.
dosageDay
,
dosageNum
:
item
.
dosageNum
,
medicinesName
:
item
.
medicinesName
,
medicineType
:
item
.
medicineType
}
}
})
if
(
this
.
formData
[
formName
]
&&
formName
==
'h_s_002'
){
let
h_s_002
=
this
.
formData
[
formName
];
let
isArr
=
Array
.
isArray
(
h_s_002
);
// 判断是否数组,数组是2条以上数据
if
(
isArr
){
h_s_002
.
forEach
((
item
,
index
)
=>
{
this
.
handleModuleMedicalUseDetai
(
item
);
})
}
else
{
// 如果是对象,则为一条数据
this
.
handleModuleMedicalUseDetai
(
h_s_002
);
}
this
.
addComponents
[
i
].
formObject
=
{
arrList
:
this
.
medication
,
dosageDay
:
type3Obj
.
dosageDay
,
dosageNum
:
type3Obj
.
dosageNum
,
medicinesName
:
type3Obj
.
medicinesName
...
this
.
type3Obj
}
// console.log(this.addComponents[i].formObject)
}
else
if
(
this
.
formData
[
formName
]
&&
formName
==
'hypertension_001'
){
this
.
addComponents
[
i
].
formObject
=
this
.
formData
[
formName
];
let
symptom
=
this
.
formData
[
formName
].
symptom
;
...
...
@@ -285,22 +284,9 @@
}
})
},
// 处理用药情况数据
// 处理
提交
用药情况数据
handleModuleMedicalUse
(){
let
otherMed
=
[];
// this.medication = [{
// medicinesName: '',
// dosageDay: '',
// dosageNum: '',
// medicineType: 'nullData'
// }];
this
.
medication
.
push
({
medicinesName
:
''
,
dosageDay
:
''
,
dosageNum
:
''
,
medicineType
:
'nullData'
});
console
.
log
(
'medication111'
,
this
.
medication
)
for
(
let
i
=
0
;
i
<
this
.
addComponents
.
length
;
i
++
){
if
(
this
.
addComponents
[
i
].
name
==
'hypeDataSourceMedicationUse'
){
const
formObject
=
this
.
addComponents
[
i
].
formObject
;
...
...
@@ -313,20 +299,6 @@
medicineType
:
'3'
})
}
// if(this.medication.length>0){
// this.medication = [...this.medication,...otherMed];
// this.formData.h_s_002 = this.medication;
// this.valid = true;
// }else{
// this.$message.warning('最少需要添加1种用药情况!');
// this.valid = false;
// this.$nextTick(() => {
// // 如果表单未完善,跳转到该表单模块
// document.querySelector(`#form${i}`).scrollIntoView(true);
// return;
// })
// }
this
.
medication
=
[...
this
.
medication
,...
otherMed
];
this
.
formData
.
h_s_002
=
this
.
medication
;
this
.
valid
=
true
;
...
...
@@ -335,7 +307,6 @@
}
let
flag
=
this
.
valid
;
this
.
$emit
(
'checkEnd'
,
false
);
console
.
log
(
'medication222'
,
this
.
medication
)
return
flag
;
},
// 提交量表
...
...
@@ -380,12 +351,6 @@
this
.
dialogFormVisible
=
val
;
},
setMedication
(
val
){
// this.medication.push( {
// medicinesName: '',
// dosageDay: '',
// dosageNum: '',
// medicineType: 'nullData'
// })
this
.
medication
.
push
({...
val
,
medicineType
:
'1'
});
console
.
log
(
'medication=>'
,
this
.
medication
)
}
...
...
写
预览
Markdown
格式
0%
请重试
or
附加一个文件
附加文件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录