index.html 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="UTF-8">
  5. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  6. <meta http-equiv="X-UA-Compatible" content="ie=edge">
  7. <title>Document</title>
  8. </head>
  9. <body>
  10. <script src="../../js/jquery-2.2.4.js" type="text/javascript" charset="utf-8"></script>
  11. <script src="../../js/es6-promise.js"></script>
  12. <script src="../../plugins/toastr/toastr.min.js"></script>
  13. <script src="../../js/util.js" type="text/javascript" charset="utf-8"></script>
  14. <script src="../../api/http-request.js" type="text/javascript" charset="utf-8"></script>
  15. <script src="../../api/fangshi-api.js"></script>
  16. <script>
  17. //随访类别,type多类别“,”分割【1.高血压 2.糖尿病 3.肿瘤 4.精神分裂症 5.产后 6.新生儿
  18. // 7.严重精神病 8.80岁以上老人 9.肺结核】
  19. // 多次肺结核-n
  20. var Request = GetRequest();
  21. var version;
  22. var isAdd = Request.isEdit//是否为新增 1新增 0查看
  23. var followupId = Request.id
  24. var lastedVersion = 'v1'//最新版本
  25. if (Request.userAgent) {
  26. window.localStorage.setItem(httpRequest.agentName, decodeURIComponent(Request.userAgent))
  27. }
  28. bindEvent()
  29. function bindEvent() {
  30. if (Request.type == '5') {
  31. fangshiAPI.getPostpartumVisitDetails({ followupId: followupId || '1' }).then(function (res) {
  32. if (res.status == 200) {
  33. version = res.data != null ? res.data.version : lastedVersion
  34. location.replace('../../app/followup/' + version + '/html/fangshi-detail-5.html?id=' + followupId + "&version=" + version)
  35. } else {
  36. top.toastr.error(res.msg);
  37. }
  38. })
  39. }
  40. if (Request.type == '6') {
  41. fangshiAPI.getNewbornFamilyVisitRecord({ followupId: followupId || '1' }).then(function (res) {
  42. if (res.status == 200) {
  43. version = res.data != null ? res.data.version : lastedVersion
  44. location.replace('../../app/followup/' + version + '/html/fangshi-detail-6.html?id=' + followupId + "&version=" + version)
  45. } else {
  46. top.toastr.error(res.msg);
  47. }
  48. })
  49. }
  50. if (Request.type == '7') {
  51. fangshiAPI.getFollowupSevereMentalDisorder({ followupId: followupId || '1' }).then(function (res) {
  52. if (res.status == 200) {
  53. version = res.data != null ? res.data.version : lastedVersion
  54. location.replace('../../app/followup/' + version + '/html/fangshi-detail-7.html?id=' + followupId + "&version=" + version)
  55. } else {
  56. top.toastr.error(res.msg);
  57. }
  58. })
  59. } if (Request.type == '8') {
  60. fangshiAPI.getOlderPeopleHealthCheckRecord({ followupId: followupId || '1' }).then(function (res) {
  61. if (res.status == 200) {
  62. version = res.data != null ? res.data.version : lastedVersion
  63. location.replace('../../app/followup/' + version + '/html/fangshi-detail-8.html?id=' + followupId + "&version=" + version)
  64. } else {
  65. top.toastr.error(res.msg);
  66. }
  67. })
  68. } if (Request.type == '9') {
  69. fangshiAPI.getPhthisisFirstCheckRecord({ followupId: followupId }).then(function (res) {
  70. if (res.status == 200) {
  71. version = isAdd != 1 ? res.data.version : lastedVersion
  72. location.replace('../../app/followup/' + version + '/html/fangshi-detail-9.html?id=' + followupId + "&version=" + version)
  73. } else {
  74. top.toastr.error(res.msg);
  75. }
  76. })
  77. } if (Request.type == '10') {
  78. fangshiAPI.getPhthisis({ followupId: followupId || '1' }).then(function (res) {
  79. if (res.status == 200) {
  80. version = isAdd != 1 ? res.data[0].version : lastedVersion
  81. location.replace('../../app/followup/' + version + '/html/fangshi-detail-10.html?id=' + followupId + "&version=" + version)
  82. } else {
  83. top.toastr.error(res.msg);
  84. }
  85. })
  86. }
  87. }
  88. </script>
  89. </body>
  90. </html>