lookPageTable.vue 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  1. <!-- 查看图纸-->
  2. <template>
  3. <div class='look-page'>
  4. <div class='eq-list-top'>
  5. <el-input
  6. placeholder='搜索生产厂商'
  7. size='small'
  8. @change='getList'
  9. prefix-icon='el-icon-search'
  10. v-model='keyword'
  11. style='width:192px;margin-right:12px'
  12. ></el-input>
  13. <Select @change='getList' v-model='floor' style='margin-right:12px;' width='120' tipPlace='top' caption='楼层 :' :selectdata='floorSelect'></Select>
  14. <Select @change='getList' v-model='floor' width='120' tipPlace='top' caption='文件类型 :' :selectdata='floorSelect'></Select>
  15. </div>
  16. <el-table :data='tableData' style='width: 100%'>
  17. <el-table-column type='index' label='序号' width='80'></el-table-column>
  18. <el-table-column prop='lb' label='分类' width='160'>
  19. <template slot-scope='{row}'>{{row.assetnum || '--'}}</template>
  20. </el-table-column>
  21. <el-table-column prop='sl' label='文件名称'>
  22. <template slot-scope='{row}'>{{row.assetnum || '--'}}</template>
  23. </el-table-column>
  24. <el-table-column prop='unit' label='文件类型'>
  25. <template slot-scope='{row}'>{{row.assetnum || '--'}}</template>
  26. </el-table-column>
  27. <el-table-column prop='brand' label='文件大小(M)'>
  28. <template slot-scope='{row}'>{{row.assetnum || '--'}}</template>
  29. </el-table-column>
  30. <el-table-column prop='brand' label='操作'>
  31. <template slot-scope='{row}'>
  32. <el-button type='text' size='mini' @click='handleDown(row)'>
  33. <i class='el-icon-download'></i>下载
  34. </el-button>
  35. </template>
  36. </el-table-column>
  37. </el-table>
  38. <div class='foot'>
  39. <el-pagination
  40. background
  41. layout='prev, pager, next'
  42. :total='total'
  43. :page-size='size'
  44. @prev-click='pageChanged'
  45. @next-click='pageChanged'
  46. @current-change='pageChanged'
  47. ></el-pagination>
  48. </div>
  49. </div>
  50. </template>
  51. <script>
  52. import { queryEquipmentList } from '@/api/equipmentList.js'
  53. export default {
  54. data() {
  55. return {
  56. tableData: [{ index: 1 }],
  57. total: 0,
  58. currentPage: 1,
  59. size: 11,
  60. keyword: '',
  61. floor: ''
  62. }
  63. },
  64. props: ['major'],
  65. methods: {
  66. pageChanged(page, size) {
  67. this.currentPage = page
  68. this.getList()
  69. },
  70. getList() {
  71. let postParams = {}
  72. let data = {
  73. page: this.currentPage,
  74. size: this.size,
  75. plazaId: this.$store.state.plazaId,
  76. major: this.major
  77. }
  78. queryEquipmentList({ data, postParams }).then(res => {
  79. console.log(res)
  80. this.tableData = res.data.data
  81. this.total = res.data.count
  82. })
  83. },
  84. handleDown() {}
  85. },
  86. mounted() {
  87. // this.getList()
  88. }
  89. }
  90. </script>
  91. <style lang="less" scoped>
  92. .look-page {
  93. .eq-list-top {
  94. display: flex;
  95. margin-bottom: 12px;
  96. }
  97. td {
  98. overflow: hidden;
  99. text-overflow: ellipsis;
  100. white-space: nowrap;
  101. }
  102. .foot {
  103. height: 32px;
  104. display: flex;
  105. justify-content: flex-end;
  106. margin-top: 28px;
  107. }
  108. }
  109. </style>