index.html 4.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  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. }else{
  51. version=version1||version2
  52. location.replace('../../app/followup/' + version + '/html/fangshi-detail-5,6.html?id=' + followupId + "&version=" + version)
  53. }
  54. }
  55. if (Request.type == '7') {
  56. fangshiAPI.getFollowupSevereMentalDisorder({ followupId: followupId || '1' }).then(function (res) {
  57. if (res.status == 200) {
  58. version = res.data != null ? res.data.version : lastedVersion
  59. location.replace('../../app/followup/' + version + '/html/fangshi-detail-7.html?id=' + followupId + "&version=" + version)
  60. } else {
  61. top.toastr.error(res.msg);
  62. }
  63. })
  64. } if (Request.type == '8') {
  65. fangshiAPI.getOlderPeopleHealthCheckRecord({ followupId: followupId || '1' }).then(function (res) {
  66. if (res.status == 200) {
  67. version = res.data != null ? res.data.version : lastedVersion
  68. location.replace('../../app/followup/' + version + '/html/fangshi-detail-8.html?id=' + followupId + "&version=" + version)
  69. } else {
  70. top.toastr.error(res.msg);
  71. }
  72. })
  73. } if (Request.type == '9') {
  74. fangshiAPI.getPhthisisFirstCheckRecord({ followupId: followupId }).then(function (res) {
  75. if (res.status == 200) {
  76. if (isAdd == '1') {//第一次肺结核
  77. version = lastedVersion
  78. location.replace('../../app/followup/' + version + '/html/fangshi-detail-9.html?id=' + followupId + "&version=" + version)
  79. } else {
  80. version = res.data.version
  81. location.replace('../../app/followup/' + version + '/html/fangshi-detail-10.html?id=' + followupId + "&version=" + version)
  82. }
  83. } else {
  84. top.toastr.error(res.msg);
  85. }
  86. })
  87. }
  88. </script>
  89. </body>
  90. </html>