index.html 4.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  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. if (isAdd == '1') {//第一次肺结核
  78. version = lastedVersion
  79. location.replace('../../app/followup/' + version + '/html/fangshi-detail-9.html?id=' + followupId + "&version=" + version)
  80. } else {
  81. version = res.data.version
  82. location.replace('../../app/followup/' + version + '/html/fangshi-detail-10.html?id=' + followupId + "&version=" + version)
  83. }
  84. } else {
  85. top.toastr.error(res.msg);
  86. }
  87. })
  88. }
  89. </script>
  90. </body>
  91. </html>