new Vue({ el: '#app', data: { ARCHIVE_TIME:'', ARCHIVE_OPERATOR_NAME:'', HEALTH_EDUCATE:'', EDUCATE_CONTENT:'', readonly:false, objData:'' }, mounted: function() { var vm = this var Request = GetRequest(); recordAPI.getFollowupProjectData({id:Request["id"],followupProject:8}).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] } } }) $("#textarea").slimScroll({width:'100%',height: '285px',color: '#666'}); }, methods:{ saveButton:function(){ var vm = this; params = {id: vm.objData.followup_id, followupProject:vm.objData.followup_project} var checkID = {}; checkID['ARCHIVE_TIME'] =vm.ARCHIVE_TIME checkID['ARCHIVE_OPERATOR_NAME'] =vm.ARCHIVE_OPERATOR_NAME checkID['HEALTH_EDUCATE'] =vm.HEALTH_EDUCATE checkID['EDUCATE_CONTENT'] =vm.EDUCATE_CONTENT 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) } }) } } })