new Vue({ el: '#app', data: { BP_D:'', BP_U:'', HEIGHT:'', WEIGHT:'', BMI:'', WEIGHT_EXP:'', BMI_EXP:'', HEART_RATE:'', POFDA_MARK:'', OTHER_POSITIVE_SIGNS:'', objData:'', readonly:false }, mounted: function() { var vm = this var Request = GetRequest(); recordAPI.getFollowupProjectData({id:Request["id"],followupProject:2}).then(function(res){ if(res.status==200){ var data = res.data; vm.objData = res.data // delete data["create_time"];delete data["followup_id"];delete data["followup_project"];delete data["id"]; for(var key in data){ vm[key] = data[key] } } }) }, methods:{ saveButton:function(){ var vm = this; params = {id: vm.objData.followup_id, followupProject:vm.objData.followup_project} var checkID = {}; checkID['BP_D'] =vm.BP_D checkID['BP_U'] =vm.BP_U checkID['HEIGHT'] =vm.HEIGHT checkID['WEIGHT'] =vm.WEIGHT checkID['BMI'] =vm.BMI checkID['WEIGHT_EXP'] =vm.WEIGHT_EXP checkID['BMI_EXP'] =vm.BMI_EXP checkID['HEART_RATE'] =vm.HEART_RATE checkID['POFDA_MARK'] =vm.POFDA_MARK checkID['OTHER_POSITIVE_SIGNS'] =vm.OTHER_POSITIVE_SIGNS console.log(checkID) params.followupProjectData = JSON.stringify(checkID); console.log(params.followupProjectData) console.log(params) recordAPI.ModifyFollowupResult(params).then(function(res){ if(res.status==200){ toastr.error("保存成功") }else{ toastr.error(res.msg) } }) } } })