handleChangeViewC.js 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135
  1. Vue.component('comC',{
  2. template:' <div class="tab3">\
  3. <template>\
  4. <span>检查/检验:</span> \
  5. <div class="modelSearch" >\
  6. <el-input paceholder="请输入药品名称" v-model="inspect">\
  7. </el-input>\
  8. </div>\
  9. </el-select> <a href="#" @click="handleZidian">查看字典</a>\
  10. <el-date-picker v-model="value4" type="month" placeholder="选择时间">\
  11. </el-date-picker>\
  12. <div class="search" @click="searchClick">搜索</div>\
  13. </template>\
  14. <span class="span">一周内同种检查/检验项目的次数>=3</span>\
  15. <el-table :data="tableData" border style="width: 100%" :data.native="tableData.slice((currentPage-1)*pageSize,currentPage*pageSize)">\
  16. <el-table-column prop="patient_name" label="姓名">\
  17. </el-table-column>\
  18. <el-table-column prop="result" label="就医次数">\
  19. </el-table-column>\
  20. <el-table-column prop="demographic_id" label="身份证号">\
  21. </el-table-column>\
  22. <el-table-column label="性别" >\
  23. <template slot-scope="scope">\
  24. <span v-if="scope.row.patient_sex == 1">男</span>\
  25. <span v-else>女</span>\
  26. </template>\
  27. </el-table-column>\
  28. <el-table-column prop="patient_age" label="年龄">\
  29. </el-table-column>\
  30. <el-table-column prop="address" label="地址">\
  31. </el-table-column>\
  32. <el-table-column fixed="right" label="操作">\
  33. <template slot-scope="scope">\
  34. <el-button @click="handleClick(scope.row)" type="text" size="small">查看详情</el-button>\
  35. </template>\
  36. </el-table-column>\
  37. </el-table>\
  38. <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="currentPage"\
  39. :page-sizes="[2,10, 20, 40]" :page-size="pageSize" layout="total,sizes,prev, pager, next, jumper"\
  40. :total="tableData.length">\
  41. </el-pagination>\
  42. </template>\
  43. </div>',
  44. data: function () {
  45. return {
  46. currentPage: 1, //初始页
  47. pageSize: 10, // 每页的数据
  48. tableData: [],
  49. pageSizeArr: [10, 20, 30, 50],
  50. total: 0,
  51. value4:new Date(),
  52. inspect:''
  53. }
  54. },
  55. mounted: function () {
  56. this.getData()
  57. },
  58. methods: {
  59. handleCurrentChange: function (val) {
  60. this.currentPage = val;
  61. this.getData()
  62. },
  63. handleSizeChange: function (val) {
  64. this.pageSize = val;
  65. this.initData()
  66. },
  67. initData: function () { //初始化
  68. this.currentPage = 1;
  69. this.getData()
  70. },
  71. searchClick: function () {
  72. this.initData()
  73. },
  74. getData: function () {
  75. var vm = this;
  76. var params = {
  77. month:this.value4.format('yyyy-MM'),
  78. size: 15,
  79. page: 1,
  80. inspect:this.inspect,
  81. }
  82. GlobalEventBus.$emit('setLoading', {
  83. loading: true
  84. }); //等待效果
  85. bigDataOutApi.getRepeateInspectList(params).then(function (res) {
  86. console.log(res)
  87. GlobalEventBus.$emit('setLoading');
  88. vm.tableData = res.detailModelList;
  89. vm.total = res.totalCount;
  90. }).catch(function (err) {
  91. console.log(err)
  92. GlobalEventBus.$emit('setLoading');
  93. })
  94. },
  95. handleClick:function(row) {
  96. demographic_id=row.demographic_id,
  97. blurry_type='',
  98. searchParam=''
  99. var url = httpRequest.server+'/profile/app/medication/html/jiuzhen-item.html?'+
  100. 'healthProblemName='+'&demographic_id='+demographic_id+'&blurry_type='+blurry_type+'&searchParam='+searchParam
  101. console.log(url)
  102. // window.open(url)
  103. var width=(0.5212*window.screen.width)+'px';
  104. var height=(0.7878*window.screen.height)+'px';
  105. top.layer.open({
  106. id:'Lay_xiangqingC',
  107. type:2,
  108. title:false,
  109. closeBtn:0,
  110. shade:0.5,
  111. shadeClose:true,
  112. area:[width,height],
  113. content:url
  114. })
  115. },
  116. handleZidian:function(){
  117. var url ='../html/zidian.html'
  118. console.log(url)
  119. var width=(0.5212*window.screen.width)+'px';
  120. var height=(0.6528*window.screen.height)+'px';
  121. top.layer.open({
  122. id:'Lay_zidian',
  123. type:2,
  124. title:false,
  125. closeBtn:0,
  126. shade:0.5,
  127. shadeClose:true,
  128. area:[width,height],
  129. content:url
  130. })
  131. }
  132. }
  133. })