education.js 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. new Vue({
  2. el: '#app',
  3. data: {
  4. ARCHIVE_TIME:'',
  5. ARCHIVE_OPERATOR_NAME:'',
  6. HEALTH_EDUCATE:'',
  7. EDUCATE_CONTENT:'',
  8. readonly:false,
  9. objData:''
  10. },
  11. mounted: function() {
  12. var vm = this
  13. var Request = GetRequest();
  14. recordAPI.getFollowupProjectData({id:Request["id"],followupProject:8}).then(function(res){
  15. if(res.status==200){
  16. var data = res.data;
  17. vm.objData = res.data;
  18. // delete data["create_time"];delete data["followup_id"];delete data["followup_project"];delete data["id"];
  19. for(var key in data){
  20. vm[key] = data[key]
  21. }
  22. }
  23. })
  24. $("#textarea").slimScroll({width:'100%',height: '285px',color: '#666'});
  25. },
  26. methods:{
  27. saveButton:function(){
  28. var vm = this;
  29. params = {id: vm.objData.followup_id, followupProject:vm.objData.followup_project}
  30. var checkID = {};
  31. checkID['ARCHIVE_TIME'] =vm.ARCHIVE_TIME
  32. checkID['ARCHIVE_OPERATOR_NAME'] =vm.ARCHIVE_OPERATOR_NAME
  33. checkID['HEALTH_EDUCATE'] =vm.HEALTH_EDUCATE
  34. checkID['EDUCATE_CONTENT'] =vm.EDUCATE_CONTENT
  35. console.log(checkID)
  36. params.followupProjectData = JSON.stringify(checkID);
  37. console.log(params.followupProjectData)
  38. console.log(params)
  39. recordAPI.ModifyFollowupResult(params).then(function(res){
  40. if(res.status==200){
  41. toastr.error("保存成功")
  42. }else{
  43. toastr.error(res.msg)
  44. }
  45. })
  46. }
  47. }
  48. })