var Request = GetRequest(); new Vue({ el: '#app', data: { type:'', HYP_COMPLICATION_DETAIL:'', DIA_COMPLICATION_DETAIL:'', HYP_FOLLOWUP_TYPE_CODE:'', DIA_FOLLOWUP_TYPE_CODE:'', readonly:false, objData:'' }, mounted: function() { var vm = this var Request = GetRequest(); var follow = JSON.parse(window.localStorage.getItem('serveFollowupDate')) vm.type = follow.followupClass; recordAPI.getFollowupProjectData({id:Request["id"],followupProject:5}).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: Request["id"], followupProject:5} var checkID = {}; checkID['HYP_COMPLICATION_DETAIL'] =vm.HYP_COMPLICATION_DETAIL checkID['DIA_COMPLICATION_DETAIL'] =vm.DIA_COMPLICATION_DETAIL checkID['HYP_FOLLOWUP_TYPE_CODE'] =vm.HYP_FOLLOWUP_TYPE_CODE checkID['DIA_FOLLOWUP_TYPE_CODE'] =vm.DIA_FOLLOWUP_TYPE_CODE 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.info("保存成功") }else{ toastr.error(res.msg) } }) } } })