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

用药情况

上级 ffcc0c2d
...@@ -5,18 +5,13 @@ export default ($this) => { ...@@ -5,18 +5,13 @@ export default ($this) => {
{ {
formType: 'list', formType: 'list',
className: 'float-none', className: 'float-none',
arrList: [ // arrList: [
// {
// medicinesName: '阿司匹林',
// dosageDay: 3,
// dosageNum: 2,
// },
// { // {
// medicinesName: '吗丁啉', // medicinesName: '吗丁啉',
// dosageDay: 3, // dosageDay: 3,
// dosageNum: 1, // dosageNum: 1,
// } // }
], // ],
prop: 'arrList', prop: 'arrList',
model: 'arrList', model: 'arrList',
label: '', label: '',
......
...@@ -243,7 +243,6 @@ ...@@ -243,7 +243,6 @@
if(keysList.length > 0){ if(keysList.length > 0){
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]){ if(this.formData[formName]){
let investigationState = this.formData[formName].investigationState; let investigationState = this.formData[formName].investigationState;
let inTurn = this.formData[formName].inTurn; let inTurn = this.formData[formName].inTurn;
...@@ -253,6 +252,22 @@ ...@@ -253,6 +252,22 @@
// if(inTurn == '12个月'){ // if(inTurn == '12个月'){
// this.needRule = false; // 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;
}
this.formData[formName].arrList = this.medication;
})
}
this.addComponents[i].formObject = this.formData[formName]; this.addComponents[i].formObject = this.formData[formName];
} }
// 量表字段回显,会触发change校验,所以这里拿到数据渲染页面后,重置验证 // 量表字段回显,会触发change校验,所以这里拿到数据渲染页面后,重置验证
...@@ -274,6 +289,11 @@ ...@@ -274,6 +289,11 @@
this.formData.planPatientsTimesId = parseFloat(this.planPatientsTimesId); this.formData.planPatientsTimesId = parseFloat(this.planPatientsTimesId);
this.formData.scaleNo = this.scaleNo; this.formData.scaleNo = this.scaleNo;
this.formData.isLine = 2; 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});
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)) // console.log(JSON.stringify(this.formData))
postScale(this.domain,this.formData).then(res=>{ postScale(this.domain,this.formData).then(res=>{
if(res.code=='000000'){ if(res.code=='000000'){
...@@ -305,7 +325,7 @@ ...@@ -305,7 +325,7 @@
this.dialogFormVisible = val; this.dialogFormVisible = val;
}, },
setMedication(val){ setMedication(val){
this.medication.push({...val,type:'1'}); this.medication.push({...val,medicineType:'1'});
console.log('medication=>',this.medication) console.log('medication=>',this.medication)
} }
}, },
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册