handleChangeViewC.js 5.6 KB

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