target.js 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. new Vue({
  2. el: '#app',
  3. data: {
  4. CONTROL_DATE:'',
  5. CONTROL_CONSTITUTOR:'',
  6. CONTROL_BP_D:'',
  7. CONTROL_BP_U:'',
  8. CONTROL_BS_FPG:'',
  9. CONTROL_NO_BS_FPG:'',
  10. CONTROL_WEIGHT:'',
  11. CONTROL_GHB:'',
  12. CONTROL_TRIGLYCERIDE:'',
  13. CONTROL_TOTAL_CHOLESTEROL:'',
  14. CONTROL_LDL:'',
  15. CONTROL_EXERCISE_FREQ_CODE:'',
  16. CONTROL_EXERCISE_DURATION_MINS:'',
  17. objData:''
  18. },
  19. mounted: function() {
  20. var vm = this
  21. var Request = GetRequest();
  22. recordAPI.getFollowupProjectData({id:Request["id"],followupProject:7}).then(function(res){
  23. if(res.status==200){
  24. var data = res.data;
  25. vm.objData = res.data
  26. // delete data["create_time"];delete data["followup_id"];delete data["followup_project"];delete data["id"];
  27. for(var key in data){
  28. vm[key] = data[key]
  29. }
  30. }
  31. })
  32. },
  33. methods:{
  34. saveButton:function(){
  35. var vm = this;
  36. params = {id: vm.objData.followup_id, followupProject:vm.objData.followup_project}
  37. var checkID = {};
  38. checkID['CONTROL_DATE'] =vm.CONTROL_DATE
  39. checkID['CONTROL_CONSTITUTOR'] =vm.CONTROL_CONSTITUTOR
  40. checkID['CONTROL_BP_D'] =vm.CONTROL_BP_D
  41. checkID['CONTROL_BP_U'] =vm.CONTROL_BP_U
  42. checkID['CONTROL_BS_FPG'] =vm.CONTROL_BS_FPG
  43. checkID['CONTROL_NO_BS_FPG'] =vm.CONTROL_NO_BS_FPG
  44. checkID['CONTROL_WEIGHT'] =vm.CONTROL_WEIGHT
  45. checkID['CONTROL_GHB'] =vm.CONTROL_GHB
  46. checkID['CONTROL_TOTAL_CHOLESTEROL'] =vm.CONTROL_TOTAL_CHOLESTEROL
  47. checkID['CONTROL_LDL'] =vm.CONTROL_LDL
  48. checkID['CONTROL_EXERCISE_FREQ_CODE'] =vm.CONTROL_EXERCISE_FREQ_CODE
  49. checkID['CONTROL_EXERCISE_DURATION_MINS'] =vm.CONTROL_EXERCISE_DURATION_MINS
  50. console.log(checkID)
  51. params.followupProjectData = JSON.stringify(checkID);
  52. console.log(params.followupProjectData)
  53. console.log(params)
  54. recordAPI.ModifyFollowupResult(params).then(function(res){
  55. if(res.status==200){
  56. toastr.error("保存成功")
  57. }else{
  58. toastr.error(res.msg)
  59. }
  60. })
  61. }
  62. }
  63. })