statistics.js 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191
  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. layer.open({
  103. type: 2,
  104. // offset: ['100px'], //右下角弹出
  105. area: ['1000px', '100%'],
  106. shade: 0.5,
  107. title: '健康教育',
  108. fixed: true, //不固定
  109. maxmin: true,
  110. closeBtn:1,
  111. shift: 5,
  112. shadeClose: false, //点击遮罩关闭层
  113. content: "../../../../health-education/login.html?origin=jbsc"
  114. });
  115. // location.href="../../../../health-education/login.html?origin=jbsc"
  116. },
  117. view:function(data){
  118. layer.open({
  119. type: 2,
  120. // offset: ['100px'], //右下角弹出
  121. area: ['568px', '100%'],
  122. shade: 0.5,
  123. title: '查看筛选结果',
  124. fixed: true, //不固定
  125. maxmin: true,
  126. closeBtn:1,
  127. shift: 5,
  128. shadeClose: false, //点击遮罩关闭层
  129. content: 'view_screening_results.html?isView=true&resultCode='+data.code
  130. });
  131. },
  132. //筛查
  133. shaicha:function(data,isNew){
  134. var vm=this
  135. if(isNew){
  136. //再次筛查数+1
  137. vm.Statics.againCount++
  138. var vm=this
  139. layer.open({
  140. type: 2,
  141. area: ['820px', '648px'],
  142. shade: 0.5,
  143. id:"questionnaire",
  144. title: '筛选统计',
  145. fixed: true, //不固定
  146. maxmin: true,
  147. closeBtn:1,
  148. shift: 5,
  149. shadeClose: false, //点击遮罩关闭层
  150. content: 'questionnaire.html?fliter_code='+data.templateCode+'&fliter_title='+data.templateTitle+'&resident_code='+data.patientCode+'&resident_name='+data.patientName
  151. });
  152. return ;
  153. }
  154. layer.open({
  155. type: 2,
  156. offset: 'rb', //右下角弹出
  157. id:"filter_type",
  158. area: ['280px', '100%'],
  159. shade: 0.5,
  160. title: false,
  161. fixed: true, //不固定
  162. maxmin: false,
  163. closeBtn:0,
  164. shift: 5,
  165. shadeClose: true, //点击遮罩关闭层
  166. content: 'filter_type.html'
  167. });
  168. },
  169. //健康跟踪
  170. jkgz:function(data){
  171. var vm=this
  172. //跳转到筛查结果页面
  173. layer.open({
  174. type: 2,
  175. area: ['500px', '550px'],
  176. shade: 0.5,
  177. title: '家医建议',
  178. fixed: true, //不固定
  179. maxmin: false,
  180. closeBtn:1,
  181. shift: 5,
  182. shadeClose: false, //点击遮罩关闭层
  183. content: 'advice.html?resultCode='+data.code+'&filter_code='+data.templateCode
  184. });
  185. }
  186. }
  187. })