statistics.js 4.0 KB

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