Vue.filter('dateString', function (value) { return value?value.substr(0,16):'' }) new Vue({ el:"#app", data: { date1:'', radio: '1', value:'', id:'',//1888849 status:false,//2计划中,可编辑 queryData:{}, objData:{}, //症状 checkList:[],//症状体现 symptoms:[ {key:"NO_SYMPTOM",name:'无症状',value:'',code:'0'}, {key:"HEADACHE",name:'头痛头晕',value:'',code:'1'}, {key:"NAUSEA",name:'恶心呕吐',value:'',code:'1'}, {key:"VERTIGO_TINNITUS",name:'眼花耳鸣',value:'',code:'1'}, {key:"DIFFICULTY_BREATHING",name:'呼吸困难',value:'',code:'1'}, {key:"PALPITATIONS",name:'心悸胸闷',value:'',code:'1'}, {key:"EPISTAXIS_BLEEDING",name:'鼻衄出血不止',value:'',code:'1'}, {key:"LIMBS_NUMB",name:'四肢发麻',value:'',code:'1'}, {key:"EXTREMITY_EDEMA",name:'下肢水肿',value:'',code:'1'}, {key:"POLYDIPSIA",name:'多饮',value:'',code:'1'}, {key:"MORE_FOOD",name:'多食',value:'',code:'1'}, {key:"MORE_URINE",name:'多尿',value:'',code:'1'}, {key:"BLURRED_VISION",name:'视力模糊',value:'',code:'1'}, {key:"INFECTION",name:'感染',value:'',code:'1'}, {key:"NUMB_HANDS",name:'四肢麻痹',value:'',code:'1'}, {key:"WEIGHT_LOSS",name:'体重下降',value:'',code:'1'} ],//症状 frequency_dict:recipe_frequency_dict,//频次 unit_dict:measure_unit_dict, //单位 hasInsulin:[],//胰岛素药 noInsulin:[],//其他药 allDrugs:[],//所有药品 // remark:'' //其他, }, mounted:function(){ var vm = this var Request = GetRequest(); vm.id = Request["id"] this.initData() }, methods: { getDrugs(data,val){ var drug = this.allDrugs.find(item=>{ return item.drugCode == val }) data = Object.assign(data,{ drugsName:drug.drugName, drugsGroup:'normal', drugsCode:drug.drugCode }) console.log(data) }, initData:function(){ var vm = this //获取随访登记数据 recordAPI.getFollowup({id:this.id}).then(function(res){ if(res.status==200){ var data = res.data data.followupDate = data.followupDate?data.followupDate.substr(0,10):'' vm.queryData = data window.localStorage.setItem('serveFollowupDate',JSON.stringify(data));//储存数据,后续页面需要调用 console.log(vm.queryData.followupDate) if(data.status=='2'){ vm.status=false }else{ vm.status=true } }else{ toastr.error(res.msg) } }) //获取数据 recordAPI.getFollowupProjectData({id:this.id}).then(function(res){ if(res.status==200){ var data = res.data; console.log(data.EXAM_DATE) vm.objData = res.data delete data["create_time"];delete data["followup_id"];delete data["followup_project"];delete data["id"]; var allData = vm.symptoms,checkList=[] for(var key in data){ for(var j=0;j0){ vm.hasInsulin.push({ drugsName:'', dose:'', unit:'', frequency:'', drugsGroup:"", drugsCode:"" }) vm.noInsulin.push({ drugsName:'', dose:'', unit:'', frequency:'', drugsGroup:"", drugsCode:"" }) k-- } } if(vm.hasInsulin.length<6){ while((6-vm.hasInsulin.length)>0){ vm.hasInsulin.push({ drugsName:'', dose:'', unit:'', frequency:'', drugsGroup:"", drugsCode:"" }) } } if(vm.noInsulin.length<6){ while((6-vm.noInsulin.length)>0){ vm.noInsulin.push({ drugsName:'', dose:'', unit:'', frequency:'', drugsGroup:"", drugsCode:"" }) } } }else{ toastr.error('获取数据失败') while((6-vm.hasInsulin.length)>0){ vm.hasInsulin.push({ drugsName:'', dose:'', unit:'', frequency:'', drugsGroup:"", drugsCode:"" }) } while((6-vm.noInsulin.length)>0){ vm.noInsulin.push({ drugsName:'', dose:'', unit:'', frequency:'', drugsGroup:"", drugsCode:"" }) } } }) //获取所有药品数据 recordAPI.findDictByName({name:''}).then(function(res){ if(res.status==200){ vm.allDrugs = res.data } }) }, submitData(){ var vm = this,params={ id: this.id, //随访记录ID date:this.queryData.followupDate+" 00:00:00", //随访时间 followupType:this.queryData.followupType,//随访方式 followupClass:this.queryData.followupClass, //随访类别【1.高血压 2.糖尿病】 followupManagerStatus:this.queryData.followupManagerStatus, //随访管理状态 followupNo:this.queryData.followupNo, //随访记录编码 plandate: this.queryData.followupNextDate,//下次随访时间 // prescriptioncode:'',//续方CODE followupProjectData:{} //随访项目数据 },symptom,sign={},inspect={},guidance={},evaluate={},medication={},target={},education={},referral={},drugs var checkList = Array.from(vm.checkList, (data) => [data,1]) symptom = Object.fromEntries(checkList) symptom["HYPOG_REACT_CODE"]=this.objData.HYPOG_REACT_CODE symptom["SYMPTOM_OTHER"]=this.objData.SYMPTOM_OTHER sign["BP_D"]=this.objData.BP_D sign["BP_U"]=this.objData.BP_U sign["HEIGHT"]=this.objData.HEIGHT sign["WEIGHT"]=this.objData.WEIGHT sign["BMI"]=this.objData.BMI sign["WEIGHT_EXP"]=this.objData.WEIGHT_EXP sign["BMI_EXP"]=this.objData.BMI_EXP sign["HEART_RATE"]=this.objData.HEART_RATE sign["POFDA_MARK"]=this.objData.POFDA_MARK sign["OTHER_POSITIVE_SIGNS"]=this.objData.OTHER_POSITIVE_SIGNS inspect["BS_FPG"]=this.objData.BS_FPG inspect["NO_BS_FPG"]=this.objData.NO_BS_FPG inspect["GHB"]=this.objData.GHB inspect["RANDOM_BLOOD_SUGAR"]=this.objData.RANDOM_BLOOD_SUGAR inspect["EXAM_DATE"]=this.objData.EXAM_DATE inspect["BLOOD_FAT_TRIGLYCERIDE"]=this.objData.BLOOD_FAT_TRIGLYCERIDE inspect["BLOOD_FAT_TC"]=this.objData.BLOOD_FAT_TC inspect["BLOOD_FAT_LDLC"]=this.objData.BLOOD_FAT_LDLC inspect["RENAL_FUNCTION_CREATININE"]=this.objData.RENAL_FUNCTION_CREATININE inspect["RENAL_FUNCTION_BUN"]=this.objData.RENAL_FUNCTION_BUN inspect["MICROALBUMINURIA"]=this.objData.MICROALBUMINURIA guidance["DAILY_SMOKING"]=this.objData.DAILY_SMOKING guidance["DAILY_DRINKING"]=this.objData.DAILY_DRINKING guidance["EXERCISE_FREQ_CODE"]=this.objData.EXERCISE_FREQ_CODE guidance["EXERCISE_DURATION_MINS"]=this.objData.EXERCISE_DURATION_MINS guidance["SOMKING_EXP"]=this.objData.SOMKING_EXP guidance["DRINK_EXP"]=this.objData.DRINK_EXP guidance["EXERCISE_FREQ_CODE_EXP"]=this.objData.EXERCISE_FREQ_CODE_EXP guidance["EXERCISE_DURATION_MINS_EXP"]=this.objData.EXERCISE_DURATION_MINS_EXP guidance["COMPLIANCE_RESULT_CODE"]=this.objData.COMPLIANCE_RESULT_CODE guidance["PSY_ADJUST_RESULT_CODE"]=this.objData.PSY_ADJUST_RESULT_CODE guidance["DAILY_STAPLE"]=this.objData.DAILY_STAPLE guidance["SALT_TAKEN_LEVEL_CODE"]=this.objData.SALT_TAKEN_LEVEL_CODE guidance["SALT_TAKEN_LEVEL_EXP"]=this.objData.SALT_TAKEN_LEVEL_EXP evaluate["HYP_FOLLOWUP_TYPE_CODE"] = this.objData.HYP_FOLLOWUP_TYPE_CODE //高血压 evaluate["HYP_COMPLICATION_DETAIL"] = this.objData.HYP_COMPLICATION_DETAIL evaluate["DIA_FOLLOWUP_TYPE_CODE"] = "" //糖尿病 evaluate["DIA_COMPLICATION_DETAIL"] = "" drugs={ DRUG_COMPLIANCE_CODE:this.objData.DRUG_COMPLIANCE_CODE } medication["drugsData"] = [] for(let k=0;k{ let data = item return { drugsName:data.drugsName, dose:data.dose, unit:data.unit, frequency:data.frequency, drugsGroup:data.drugsGroup, drugsCode:data.drugsCode } }) target["CONTROL_DATE"]=this.objData.CONTROL_DATE target["CONTROL_CONSTITUTOR"]=this.objData.CONTROL_CONSTITUTOR target["CONTROL_BP_D"]=this.objData.CONTROL_BP_D target["CONTROL_BP_U"]=this.objData.CONTROL_BP_U target["CONTROL_BS_FPG"]=this.objData.CONTROL_BS_FPG target["CONTROL_NO_BS_FPG"]=this.objData.CONTROL_NO_BS_FPG target["CONTROL_GHB"]=this.objData.CONTROL_GHB target["CONTROL_TRIGLYCERIDE"]=this.objData.CONTROL_TRIGLYCERIDE target["CONTROL_TOTAL_CHOLESTEROL"]=this.objData.CONTROL_TOTAL_CHOLESTEROL target["CONTROL_LDL"]=this.objData.CONTROL_LDL target["CONTROL_WEIGHT"]=this.objData.CONTROL_WEIGHT target["CONTROL_EXERCISE_FREQ_CODE"]=this.objData.CONTROL_EXERCISE_FREQ_CODE target["CONTROL_EXERCISE_DURATION_MINS"]=this.objData.CONTROL_EXERCISE_DURATION_MINS education["ARCHIVE_TIME"]=this.objData.ARCHIVE_TIME education["ARCHIVE_OPERATOR_NAME"]=this.objData.ARCHIVE_OPERATOR_NAME education["HEALTH_EDUCATE"]=this.objData.HEALTH_EDUCATE education["EDUCATE_CONTENT"]=this.objData.EDUCATE_CONTENT referral["DRUG_ADVERSE_MARK"]=this.objData.DRUG_ADVERSE_MARK referral["ADR_REMARK"]=this.objData.ADR_REMARK referral["REFUSE_REFERRAL"]=this.objData.REFUSE_REFERRAL referral["REFUSE_REFERRAL_WHY"]=this.objData.REFUSE_REFERRAL_WHY referral["TRANSFER_RESON"]=this.objData.TRANSFER_RESON referral["TRANSFER_ORG_DEPT"]=this.objData.TRANSFER_ORG_DEPT var obj = {} Object.assign(obj,symptom,sign,inspect,guidance,evaluate,target,education,referral,drugs) params.followupProjectData["followupProjectData"] = obj params.followupProjectData["drugsData"]=medication["drugsData"] console.log(params) params.followupProjectData = JSON.stringify(params.followupProjectData) recordAPI.saveAllFollowupProjectData(params).then(function(res){ if(res.status==200){ toastr.info("保存成功") }else{ toastr.error(res.msg) } }) } }, })