sign.js 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. new Vue({
  2. el: '#app',
  3. data: {
  4. BP_D:'',
  5. BP_U:'',
  6. HEIGHT:'',
  7. WEIGHT:'',
  8. BMI:'',
  9. WEIGHT_EXP:'',
  10. BMI_EXP:'',
  11. HEART_RATE:'',
  12. POFDA_MARK:'',
  13. OTHER_POSITIVE_SIGNS:'',
  14. objData:'',
  15. readonly:false
  16. },
  17. mounted: function() {
  18. var vm = this
  19. var Request = GetRequest();
  20. recordAPI.getFollowupProjectData({id:Request["id"],followupProject:2}).then(function(res){
  21. if(res.status==200){
  22. var data = res.data;
  23. vm.objData = res.data
  24. // delete data["create_time"];delete data["followup_id"];delete data["followup_project"];delete data["id"];
  25. for(var key in data){
  26. vm[key] = data[key]
  27. }
  28. }
  29. })
  30. },
  31. methods:{
  32. saveButton:function(){
  33. var vm = this;
  34. params = {id: vm.objData.followup_id, followupProject:vm.objData.followup_project}
  35. var checkID = {};
  36. checkID['BP_D'] =vm.BP_D
  37. checkID['BP_U'] =vm.BP_U
  38. checkID['HEIGHT'] =vm.HEIGHT
  39. checkID['WEIGHT'] =vm.WEIGHT
  40. checkID['BMI'] =vm.BMI
  41. checkID['WEIGHT_EXP'] =vm.WEIGHT_EXP
  42. checkID['BMI_EXP'] =vm.BMI_EXP
  43. checkID['HEART_RATE'] =vm.HEART_RATE
  44. checkID['POFDA_MARK'] =vm.POFDA_MARK
  45. checkID['OTHER_POSITIVE_SIGNS'] =vm.OTHER_POSITIVE_SIGNS
  46. console.log(checkID)
  47. params.followupProjectData = JSON.stringify(checkID);
  48. console.log(params.followupProjectData)
  49. console.log(params)
  50. recordAPI.ModifyFollowupResult(params).then(function(res){
  51. if(res.status==200){
  52. toastr.error("保存成功")
  53. }else{
  54. toastr.error(res.msg)
  55. }
  56. })
  57. }
  58. }
  59. })