handleChangeViewB.js 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123
  1. Vue.component('comB', {
  2. template: '<div class="tab2" >\
  3. <template>\
  4. <div class="content">\
  5. <span>就诊类型:</span> \
  6. <el-select v-model="value" 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. <span>机构等级:</span> \
  11. <el-select v-model="items" placeholder="请选择">\
  12. <el-option v-for="item in option" :key="item.value" :label="item.label" :value="item.value">\
  13. </el-option>\
  14. </el-select>\
  15. <el-select v-model="item" placeholder="请选择">\
  16. <el-option v-for="item in option" :key="item.value" :label="item.label" :value="item.value">\
  17. </el-option>\
  18. </el-select>\
  19. <span class="demonstration">时间:</span>\
  20. <el-date-picker\
  21. v-model="value4"\
  22. type="month"\
  23. placeholder="选择月">\
  24. </el-date-picker>\
  25. <div class="search">搜 索</div>\
  26. <div>\
  27. </template>\
  28. <span class="span">门急诊费>=999,000.00(999,000.00=上月门急诊次均费用*3)/住院费用>=999,000.00(999,000.00=上月住院次均费用*3)</span>\
  29. <el-table :data="tableData" border style="width: 100%" :data.native="tableData.slice((currentPage-1)*pageSize,currentPage*pageSize)">\
  30. <el-table-column prop="patient_name" label="姓名" width="140">\
  31. </el-table-column>\
  32. <el-table-column prop="demographic_id" label="身份证号" width="380">\
  33. </el-table-column>\
  34. <el-table-column label="性别">\
  35. <template slot-scope="scope">\
  36. <span v-if="scope.row.patient_sex == 1">男</span>\
  37. <span v-else>女</span>\
  38. </template>\
  39. </el-table-column>\
  40. <el-table-column prop="patient_age" label="年龄" width="140">\
  41. </el-table-column>\
  42. <el-table-column prop="EHR_000045" label="家庭地址" width="380">\
  43. </el-table-column>\
  44. <el-table-column fixed="right" label="操作" width="140">\
  45. <template slot-scope="scope">\
  46. <el-button @click="handleClick(scope.row)" type="text" size="small">查看详情</el-button>\
  47. </template>\
  48. </el-table-column>\
  49. </el-table>\
  50. <el-pagination \
  51. @size-change="handleSizeChange"\
  52. @current-change="handleCurrentChange" \
  53. :current-page="currentPage"\
  54. :page-sizes="pageSizeArr"\
  55. :page-size="pageSize" \
  56. layout="total,sizes,prev, pager, next, jumper"\
  57. :total="total">\
  58. </el-pagination>\
  59. </template>\
  60. </div> ',
  61. data: function () {
  62. return {
  63. currentPage: 1, //初始页
  64. pageSize: 10, // 每页的数据
  65. pageSizeArr: [10, 20, 30, 50],
  66. tableData: [],
  67. total: 0,
  68. value: '门急诊',
  69. item:'',
  70. items:'',
  71. hosLevel: '',
  72. option: [],
  73. options: [{
  74. value: '1',
  75. label: '门急诊'
  76. }, {
  77. value: '2',
  78. label: '住院'
  79. }],
  80. value4: '',
  81. }
  82. },
  83. mounted: function () {
  84. this.getData()
  85. },
  86. methods: {
  87. handleClick(row) {
  88. console.log(row);
  89. },
  90. handleCurrentChange: function (val) { //page 当前页
  91. this.currentPage = val;
  92. this.getData()
  93. },
  94. handleSizeChange: function (val) {// size 页面展示数据条数
  95. this.pageSize = val;
  96. this.initData()
  97. },
  98. initData: function () { //初始化数据
  99. this.currentPage = 1;
  100. this.getData()
  101. },
  102. getData: function () {
  103. var vm = this;
  104. var params = {
  105. month: '2018-08',
  106. eventType: 0,
  107. hosLevel: this.hosLevel,
  108. hosHierarchy: this.hosHierarchy,
  109. size: 15,
  110. page: 1,
  111. }
  112. debugger
  113. bigDataOutApi.getHighCostList(params).then(function (res) {
  114. console.log(res)
  115. vm.tableData = res.detailModelList;
  116. vm.total = res.totalCount;
  117. }).catch(function (err) {
  118. console.log(err)
  119. })
  120. }
  121. }
  122. })