提交 b9ce7f6d 编写于 作者: yi.li's avatar yi.li

Merge branch 'dev-scaleHype-20190428' of...

Merge branch 'dev-scaleHype-20190428' of 192.168.110.53:com.pica.cloud.education.frontend/pica.cloud.web-education-admin into dev-scaleHype-20190428
...@@ -165,7 +165,7 @@ ...@@ -165,7 +165,7 @@
{name: 'hypeDataSourceSign',formObject: {bmi: 0,nextBmi: 0},showModule: true,formName: 'hypertension_002',className: 'obj-form-title',dataSource: hypeDataSourceSign(this), hideTitle: false, title: '体征'}, {name: 'hypeDataSourceSign',formObject: {bmi: 0,nextBmi: 0},showModule: true,formName: 'hypertension_002',className: 'obj-form-title',dataSource: hypeDataSourceSign(this), hideTitle: false, title: '体征'},
{name: 'hypeDataSourceLifeMode',formObject: {},showModule: true,formName: 'hypertension_003',className: 'obj-form-title',dataSource: hypeDataSourceLifeMode(this), hideTitle: false, title: '生活方式指导'}, {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: '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: 'hypeDataSourceMedicationUse',formObject: {arrList:this.medication,dosageDay:'',dosageNum:'',medicinesName:'',medicineType:''},showModule: true,formName: 'h_s_002',className: 'obj-form-title',dataSource: hypeDataSourceMedicationUse(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: '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: '下次随访日期'}, {name: 'hypeDataSourceNextFollowDay',formObject: {nextFollowDay:''},showModule: true,formName: 'h_s_004',className: 'obj-form-title',dataSource: hypeDataSourceNextFollowDay(this), hideTitle: true, title: '下次随访日期'},
] ]
...@@ -179,10 +179,7 @@ ...@@ -179,10 +179,7 @@
// 获取量表模块 // 获取量表模块
this.getFormModules(); this.getFormModules();
if(this.showBtn!='0'){
// 获取量表详情
this.getFormDetail();
}
}else{ }else{
this.$message({ this.$message({
message: res.message, message: res.message,
...@@ -194,18 +191,6 @@ ...@@ -194,18 +191,6 @@
// 目前先默认写死 // 目前先默认写死
setFormData(){ setFormData(){
this.addComponents = this.addComponentsSourceList this.addComponents = this.addComponentsSourceList
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];
}
// 量表字段回显,会触发change校验,所以这里拿到数据渲染页面后,重置验证
// if(this.$refs['form' + i].length > 0){
// this.$refs['form' + i][0].resetFields();
// }
}
this.canRender = true;
this.$forceUpdate();
}, },
// 获取展示的模块 // 获取展示的模块
...@@ -220,12 +205,19 @@ ...@@ -220,12 +205,19 @@
} }
} }
} }
if(this.showBtn!='0'){
// 获取量表详情
this.getFormDetail();
}
}else{ }else{
this.$message({ this.$message({
message: res.message, message: res.message,
type: 'error' type: 'error'
}); });
} }
}) })
}, },
// 处理获取用药情况详情数据 // 处理获取用药情况详情数据
...@@ -245,7 +237,6 @@ ...@@ -245,7 +237,6 @@
this.formData = res.data this.formData = res.data
let keysList = Object.keys(this.formData); let keysList = Object.keys(this.formData);
if(keysList.length > 0){ if(keysList.length > 0){
this.medication = [];
for(let i=0;i<this.addComponents.length;i++){ for(let i=0;i<this.addComponents.length;i++){
let formName = this.addComponents[i].formName; let formName = this.addComponents[i].formName;
if(this.formData[formName] && formName=='h_s_002'){ if(this.formData[formName] && formName=='h_s_002'){
...@@ -265,22 +256,19 @@ ...@@ -265,22 +256,19 @@
...this.type3Obj ...this.type3Obj
} }
// console.log(this.addComponents[i].formObject) // console.log(this.addComponents[i].formObject)
}else if(this.formData[formName] && formName=='hypertension_001'){ }else if(this.formData[formName] && formName=='hypertension_001'){
this.addComponents[i].formObject = this.formData[formName]; this.addComponents[i].formObject = this.formData[formName];
let symptom = this.formData[formName].symptom; let symptom = this.formData[formName].symptom;
this.addComponents[i].formObject.symptom = JSON.parse(symptom); this.addComponents[i].formObject.symptom = JSON.parse(symptom);
}else{ }else{
// 判断是否有数据,没有就用初始化
if(this.formData[formName]){
this.addComponents[i].formObject = this.formData[formName]; this.addComponents[i].formObject = this.formData[formName];
}else{
this.addComponents[i] = this.addComponentsSourceList[i];
} }
// 量表字段回显,会触发change校验,所以这里拿到数据渲染页面后,重置验证
if(this.$refs['form' + i].length > 0){
this.$refs['form' + i][0].resetFields();
} }
} }
this.canRender = true;
this.$forceUpdate();
} }
}) })
}, },
...@@ -353,6 +341,7 @@ ...@@ -353,6 +341,7 @@
setMedication(val){ setMedication(val){
this.medication.push({...val,medicineType: '1'}); this.medication.push({...val,medicineType: '1'});
console.log('medication=>',this.medication) console.log('medication=>',this.medication)
console.log(this.addComponents)
} }
}, },
} }
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册