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