education.js 1.4 KB

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