statistics.js 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157
  1. toastr.options = {
  2. "closeButton": true,
  3. "positionClass": "toast-top-center"
  4. }
  5. function showSuccessMessage(msg) {
  6. toastr.success(msg)
  7. }
  8. function showErrorMessage(msg) {
  9. toastr.error(msg)
  10. }
  11. function showWarningMessage(msg) {
  12. toastr.warning(msg)
  13. }
  14. function showInfoMessage(msg) {
  15. toastr.info(msg)
  16. }
  17. new Vue({
  18. el: '#app',
  19. data: {
  20. modal:"",
  21. type:"",
  22. status:"",
  23. name:"",
  24. isDanger:"1",
  25. pagesize:10,
  26. total:"",
  27. pagetotal:'',//总页数
  28. currentPage:1,//当前页数
  29. tablelist:[],
  30. types:[],
  31. Statics:{},
  32. wujilu:false,
  33. },
  34. mounted(){
  35. var vm=this
  36. vm.getModal()
  37. vm.getDatas()
  38. vm.gettypes()
  39. },
  40. methods:{
  41. //获取筛查数据模型
  42. getModal:function(){
  43. var vm=this
  44. jbscAPI.screenStatics().then(function(res){
  45. if(res.status==200){
  46. vm.Statics=res.data;
  47. }else{
  48. showErrorMessage(res.msg);
  49. }
  50. })
  51. },
  52. //获取数据
  53. getDatas:function(){
  54. var vm=this
  55. var params={
  56. diseaseType: vm.type, //疾病类型
  57. dealType: vm.status, //处理方式(全部为空 1已预约 2已跟踪 3已接诊4待处理)
  58. patientName: vm.name, //搜索居民的姓名
  59. isDanger:vm.isDanger, //是否高危预警(0否 1是)
  60. pageNo: vm.currentPage,
  61. pageSize: vm.pagesize
  62. }
  63. jbscAPI.getResultList(params).then(function(res){
  64. if(res.status==200){
  65. vm.wujilu=false
  66. vm.total=res.data.num
  67. vm.pagetotal= Math.ceil(res.data.num/vm.pagesize)
  68. vm.tablelist=res.data.data;
  69. if(vm.tablelist.length==0){
  70. vm.wujilu=true
  71. }
  72. }else{
  73. showErrorMessage(res.msg);
  74. }
  75. })
  76. },
  77. gettypes:function(){
  78. var vm=this
  79. jbscAPI.getSpecialDisease().then(function(res){
  80. if(res.status==200){
  81. vm.types=res.data;
  82. }else{
  83. showErrorMessage(res.msg);
  84. }
  85. })
  86. },
  87. gettable:function(type){
  88. var vm=this
  89. vm.isDanger=type
  90. vm.search(1)
  91. },
  92. //页面跳转
  93. search:function(page){
  94. var vm=this
  95. vm.currentPage=page
  96. vm.getDatas()
  97. },
  98. //转诊
  99. zhuanzhen:function(){
  100. showInfoMessage("PC上暂不支持,请打开手机端疑似高危记录进行转诊预约!")
  101. },
  102. //健康教育
  103. jkjy:function(data){
  104. var receiver={"code":data.patientCode,name:data.patientName}
  105. sessionStorage.setItem("jbsc-jkwzreceiver",JSON.stringify(receiver))
  106. location.href="../../../../health-education/login.html?origin=jbsc"
  107. },
  108. //筛查
  109. shaicha:function(data,isNew){
  110. var vm=this
  111. if(isNew){
  112. //再次筛查数+1
  113. vm.Statics.againCount++
  114. var vm=this
  115. top.layer.open({
  116. type: 2,
  117. area: ['820px', '648px'],
  118. shade: 0.5,
  119. id:"questionnaire",
  120. title: '筛选统计',
  121. fixed: true, //不固定
  122. maxmin: true,
  123. closeBtn:1,
  124. shift: 5,
  125. shadeClose: false, //点击遮罩关闭层
  126. content: 'questionnaire.html?fliter_code='+data.templateCode+'&fliter_title='+data.templateTitle+'&resident_code='+data.patientCode+'&resident_name='+data.patientName
  127. });
  128. return ;
  129. }
  130. layer.open({
  131. type: 2,
  132. offset: 'rb', //右下角弹出
  133. id:"filter_type",
  134. area: ['280px', '100%'],
  135. shade: 0.5,
  136. title: false,
  137. fixed: true, //不固定
  138. maxmin: false,
  139. closeBtn:0,
  140. shift: 5,
  141. shadeClose: true, //点击遮罩关闭层
  142. content: 'filter_type.html'
  143. });
  144. },
  145. //健康跟踪
  146. jkgz:function(id){
  147. var vm=this
  148. //跳转到筛查结果页面
  149. showInfoMessage(id+"筛查结果")
  150. },
  151. }
  152. })