wbTable.vue 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  1. <!-- 设备清单的有select的表格 -->
  2. <template>
  3. <div class='wb-list'>
  4. <div class='eq-list-top'>
  5. <a-input-search placeholder style='width: 192px;margin-bottom:12px;height:32px;' @search='onSearch' />
  6. </div>
  7. <el-table :data='tableData' style='width: 100%'>
  8. <el-table-column type='index' label='序号' width='80'></el-table-column>
  9. <el-table-column prop='sbjc' label='设备名称' width='160'></el-table-column>
  10. <el-table-column prop='sbjbm' label='设备编码'></el-table-column>
  11. <el-table-column prop='matters' label='重要事项记录'></el-table-column>
  12. <el-table-column prop='description' label='描述'></el-table-column>
  13. <el-table-column label='更换配件信息'>
  14. <el-table-column prop='ischangepj' label='是/否更换' width='120'></el-table-column>
  15. <el-table-column prop='model' label='配件名称型号' width='120'></el-table-column>
  16. <el-table-column prop='address' label='数量' width='300'></el-table-column>
  17. <el-table-column prop='cost' label='费用(万元)' width='120'></el-table-column>
  18. <el-table-column prop='source' label='费用出处' width='120'></el-table-column>
  19. </el-table-column>
  20. <el-table-column prop='brand' label='现场照片'></el-table-column>
  21. <el-table-column prop='startDate' label='填报时间'></el-table-column>
  22. <el-table-column prop='enddate' label='验收时间'></el-table-column>
  23. <el-table-column prop='wonum' label='任务编号'></el-table-column>
  24. </el-table>
  25. <div class='foot'>
  26. <el-pagination
  27. background
  28. layout='prev, pager, next'
  29. :total='total/pageSize'
  30. :page-size='size'
  31. @prev-click='pageChanged'
  32. @next-click='pageChanged'
  33. @current-change='pageChanged'
  34. ></el-pagination>
  35. </div>
  36. </div>
  37. </template>
  38. <script>
  39. import { queryEquipmentList, queryWbsms } from '@/api/equipmentList.js'
  40. export default {
  41. data() {
  42. return {
  43. pageSize: 10,
  44. tableData: [],
  45. total: 0,
  46. currentPage: 1,
  47. size: 10
  48. }
  49. },
  50. props: ['major', 'systemName'],
  51. methods: {
  52. onSearch() {},
  53. pageChanged(page, size) {
  54. this.currentPage = page
  55. this.size = size
  56. this.getList()
  57. },
  58. getList() {
  59. // let postParams = {}
  60. // let data = {
  61. // page: this.currentPage,
  62. // size: this.size,
  63. // plazaId: this.$store.state.plazaId,
  64. // major: this.major,
  65. // }
  66. // queryEquipmentList({ data, postParams }).then(res => {
  67. // console.log(res)
  68. // this.tableData = res.data.data
  69. // this.total = res.data.count
  70. // })
  71. let getParams = {
  72. data: {
  73. system: this.systemName,
  74. tab: this.major,
  75. plazaId: this.$store.state.plazaId,
  76. page: this.currentPage,
  77. size: this.size
  78. }
  79. }
  80. queryWbsms(getParams).then(res => {
  81. this.tableData = res.data.data
  82. this.total = res.data.count
  83. })
  84. }
  85. },
  86. mounted() {
  87. this.getList()
  88. }
  89. }
  90. </script>
  91. <style lang="less" scoped>
  92. .wb-list {
  93. .eq-list-top {
  94. display: flex;
  95. }
  96. .foot {
  97. position: absolute;
  98. height: 32px;
  99. right: 26px;
  100. }
  101. td {
  102. overflow: hidden;
  103. text-overflow: ellipsis;
  104. white-space: nowrap;
  105. }
  106. }
  107. </style>