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

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
......@@ -243,33 +243,41 @@
if(keysList.length > 0){
for(let i=0;i<this.addComponents.length;i++){
let formName = this.addComponents[i].formName;
if(this.formData[formName]){
let investigationState = this.formData[formName].investigationState;
let inTurn = this.formData[formName].inTurn;
if( ( investigationState === '失访' || investigationState === '死亡' ) ){
this.showModule = false;
}
// if(inTurn == '12个月'){
// this.needRule = false;
// }
if(formName == 'h_s_002'){
this.formData[formName].forEach((item) => {
this.formData[formName] = {};
if(item.medicineType == '1'){
this.medication.push(item);
}else if(item.medicineType == '2'){
this.formData[formName].medicineType = item.medicineType;
this.formData[formName].medicinesName = item.medicinesName;
this.formData[formName].dosageDay = item.dosageDay;
this.formData[formName].dosageNum = item.dosageNum;
if(this.formData[formName] && formName == 'h_s_002'){
this.medication = [];
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=='2'){
type3Obj = {
dosageDay: item.dosageDay,
dosageNum: item.dosageNum,
medicinesName: item.medicinesName,
medicineType: item.medicineType
}
this.formData[formName].arrList = this.medication;
})
}
}
})
this.addComponents[i].formObject = {
arrList: this.medication,
dosageDay: type3Obj.dosageDay,
dosageNum: type3Obj.dosageNum,
medicinesName: type3Obj.medicinesName
}
}else if(this.formData[formName] && formName == 'diabetes_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();
......@@ -289,12 +297,14 @@
this.formData.planPatientsTimesId = parseFloat(this.planPatientsTimesId);
this.formData.scaleNo = this.scaleNo;
this.formData.isLine = 2;
// this.formData.h_s_002 = this.medication.push({type: '2',medicinesName:this.formData.h_s_002.medicinesName,dosageDay: this.formData.h_s_002.dosageDay,dosageNum:this.formData.h_s_002.dosageNum});
this.formData.diabetes_001.symptom = JSON.stringify(this.formData.diabetes_001.symptom);
let arrNew = [];
arrNew.push({medicineType: '2', medicinesName:this.formData.h_s_002.medicinesName, dosageDay: this.formData.h_s_002.dosageDay, dosageNum:this.formData.h_s_002.dosageNum });
this.formData.h_s_002 = this.medication.concat(arrNew);
console.log('用药情况',this.formData.h_s_002)
// console.log(JSON.stringify(this.formData))
// if(this.formData.h_s_002.length <= 1){
// this.formData.h_s_002.push()
// }
// console.log('用药情况',this.formData.h_s_002)
postScale(this.domain,this.formData).then(res=>{
if(res.code=='000000'){
let doMsg = (this.saveWay==1) ? '提交成功' : '保存成功';
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册