statistics.js 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184
  1. toastr.options = {
  2. "closeButton": true,
  3. "positionClass": "toast-top-center"
  4. }
  5. function showSuccessMessage(msg) {
  6. layer.msg(msg,{icon:1})
  7. }
  8. function showErrorMessage(msg) {
  9. layer.msg(msg,{icon:5})
  10. }
  11. function showWarningMessage(msg) {
  12. layer.msg(msg,{icon:2})
  13. }
  14. function showInfoMessage(msg) {
  15. layer.msg(msg,{icon:6})
  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. view:function(data){
  109. top.layer.open({
  110. type: 2,
  111. // offset: ['100px'], //右下角弹出
  112. area: ['568px', '100%'],
  113. shade: 0.5,
  114. title: '查看筛选结果',
  115. fixed: true, //不固定
  116. maxmin: true,
  117. closeBtn:1,
  118. shift: 5,
  119. shadeClose: false, //点击遮罩关闭层
  120. content: 'view_screening_results.html?isView=true&resultCode='+data.code
  121. });
  122. },
  123. //筛查
  124. shaicha:function(data,isNew){
  125. var vm=this
  126. if(isNew){
  127. //再次筛查数+1
  128. vm.Statics.againCount++
  129. var vm=this
  130. layer.open({
  131. type: 2,
  132. area: ['820px', '648px'],
  133. shade: 0.5,
  134. id:"questionnaire",
  135. title: '筛选统计',
  136. fixed: true, //不固定
  137. maxmin: true,
  138. closeBtn:1,
  139. shift: 5,
  140. shadeClose: false, //点击遮罩关闭层
  141. content: 'questionnaire.html?fliter_code='+data.templateCode+'&fliter_title='+data.templateTitle+'&resident_code='+data.patientCode+'&resident_name='+data.patientName
  142. });
  143. return ;
  144. }
  145. layer.open({
  146. type: 2,
  147. offset: 'rb', //右下角弹出
  148. id:"filter_type",
  149. area: ['280px', '100%'],
  150. shade: 0.5,
  151. title: false,
  152. fixed: true, //不固定
  153. maxmin: false,
  154. closeBtn:0,
  155. shift: 5,
  156. shadeClose: true, //点击遮罩关闭层
  157. content: 'filter_type.html'
  158. });
  159. },
  160. //健康跟踪
  161. jkgz:function(data){
  162. var vm=this
  163. //跳转到筛查结果页面
  164. layer.open({
  165. type: 2,
  166. // offset: ['100px'], //右下角弹出
  167. area: ['568px', '100%'],
  168. shade: 0.5,
  169. title: '查看筛选结果',
  170. fixed: true, //不固定
  171. maxmin: true,
  172. closeBtn:1,
  173. shift: 5,
  174. shadeClose: false, //点击遮罩关闭层
  175. content: 'advice.html?resultCode='+data.code+'&filter_code='+data.templateCode
  176. });
  177. }
  178. }
  179. })