12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394 |
- <!-- 设备清单的有select的表格 -->
- <template>
- <div class='tj-list'>
- <div class='eq-list-top'>
- <a-input-search placeholder style='width: 192px;margin-left:12px;height:32px;' @search='onSearch' />
- </div>
- <el-table :data='tableData' style='width: 100%'>
- <el-table-column type='index' label='序号' width='80'></el-table-column>
- <el-table-column prop='lb' label='类别' width='160'></el-table-column>
- <el-table-column prop='sl' label='数量'></el-table-column>
- <el-table-column prop='unit' label='单位'></el-table-column>
- <el-table-column prop='brand' label='品牌'></el-table-column>
- </el-table>
- <div class='foot'>
- <el-pagination
- background
- layout='prev, pager, next'
- :total='total/pageSize'
- :page-size='size'
- @prev-click='pageChanged'
- @next-click='pageChanged'
- @current-change='pageChanged'
- ></el-pagination>
- </div>
- </div>
- </template>
- <script>
- import Select from '@/components/Select/Select.vue'
- import { queryEquipmentList } from '@/api/equipmentList.js'
- export default {
- components: { Select },
- data() {
- return {
- pageSize: 10,
- dataSelect2: [
- { id: 'test1', name: '选择项' },
- { id: 'test2', name: '单平米' },
- { id: 'test3', name: '下级分项' },
- { id: 'test4', name: '滑动平均滑动平均' }
- ],
- tableData: [],
- total: 0,
- currentPage: 1,
- size: 10
- }
- },
- props: [],
- methods: {
- handleChange() {},
- onSearch() {},
- pageChanged(page, size) {
- this.currentPage = page
- this.size = size
- this.getList()
- },
- getList() {
- let getParams = {
- page: this.currentPage,
- size: this.size,
- major: '弱电',
- system: 'MJ'
- // orderBy: 1,
- // keyword: ''
- }
- queryEquipmentList({ getParams }).then(res => {
- console.log(res)
- this.tableData = res.data
- this.total = res.count
- })
- }
- },
- mounted() {
- this.getList()
- }
- }
- </script>
- <style lang="less" scoped>
- .tj-list {
- .eq-list-top {
- display: flex;
- }
- .foot {
- position: absolute;
- height: 32px;
- right: 26px;
- bottom: 20px;
- }
- td {
- overflow: hidden;
- text-overflow: ellipsis;
- white-space: nowrap;
- }
- }
- </style>
|