index.html 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  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. var version1;
  29. var version2;
  30. if (Request.type == '5' || Request.type == '6') {
  31. fangshiAPI.getPostpartumVisitDetails({ followupId: followupId || '3' }).then(function (res) {
  32. if (res.status == 200) {
  33. version1 = res.data ? res.data.version : ''
  34. bindEvent()
  35. } else {
  36. top.toastr.error(res.msg);
  37. }
  38. })
  39. fangshiAPI.getNewbornFamilyVisitRecord({ followupId: followupId || '2' }).then(function (res) {
  40. if (res.status == 200) {
  41. version2 = res.data ? res.data.version : ''
  42. bindEvent()
  43. } else {
  44. top.toastr.error(res.msg);
  45. }
  46. })
  47. }
  48. function bindEvent() {
  49. if (isAdd == 1) {
  50. version = lastedVersion
  51. location.replace('../../app/followup/' + version + '/html/fangshi-detail-5,6.html?id=' + followupId + "&version=" + version)
  52. } else {
  53. version = version1 || version2
  54. location.replace('../../app/followup/' + version + '/html/fangshi-detail-5,6.html?id=' + followupId + "&version=" + version)
  55. }
  56. }
  57. if (Request.type == '7') {
  58. fangshiAPI.getFollowupSevereMentalDisorder({ followupId: followupId || '1' }).then(function (res) {
  59. if (res.status == 200) {
  60. version = res.data != null ? res.data.version : lastedVersion
  61. location.replace('../../app/followup/' + version + '/html/fangshi-detail-7.html?id=' + followupId + "&version=" + version)
  62. } else {
  63. top.toastr.error(res.msg);
  64. }
  65. })
  66. } if (Request.type == '8') {
  67. fangshiAPI.getOlderPeopleHealthCheckRecord({ followupId: followupId || '1' }).then(function (res) {
  68. if (res.status == 200) {
  69. version = res.data != null ? res.data.version : lastedVersion
  70. location.replace('../../app/followup/' + version + '/html/fangshi-detail-8.html?id=' + followupId + "&version=" + version)
  71. } else {
  72. top.toastr.error(res.msg);
  73. }
  74. })
  75. } if (Request.type == '9') {
  76. fangshiAPI.getPhthisisFirstCheckRecord({ followupId: followupId }).then(function (res) {
  77. if (res.status == 200) {
  78. version = isAdd!=1? res.data.version : lastedVersion
  79. location.replace('../../app/followup/' + version + '/html/fangshi-detail-9.html?id=' + followupId + "&version=" + version)
  80. } else {
  81. top.toastr.error(res.msg);
  82. }
  83. })
  84. } if (Request.type == '10') {
  85. fangshiAPI.getPhthisis({ followupId: followupId || '1' }).then(function (res) {
  86. if (res.status == 200) {
  87. version = isAdd!=1 ? res.data[0].version : lastedVersion
  88. location.replace('../../app/followup/' + version + '/html/fangshi-detail-10.html?id=' + followupId + "&version=" + version)
  89. } else {
  90. top.toastr.error(res.msg);
  91. }
  92. })
  93. }
  94. </script>
  95. </body>
  96. </html>