target.js 2.0 KB

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