提交 edc4ca9d 编写于 作者: tao.wu's avatar tao.wu

u

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