| | |
| | | <ul class="toolbar" v-permissions="['business:category:create', 'business:category:delete']"> |
| | | <li><el-button type="primary" @click="handleEdit()" icon="el-icon-plus" |
| | | v-permissions="['business:category:create']">新建</el-button></li> |
| | | <li v-permissions="['business:category:exportExcel']"><el-button type="primary" @click="exportExcel" |
| | | >导出</el-button></li> |
| | | <li v-permissions="['business:category:exportExcel']"><el-button type="primary" |
| | | @click="exportExcel">导出</el-button></li> |
| | | </ul> |
| | | <el-table row-key="id" :tree-props="{ children: 'childCategoryList' }" v-loading="isWorking.search" |
| | | :data="dataList" stripe @selection-change="handleSelectionChange"> |
| | |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | <pagination @size-change="handleSizeChange" @current-change="getList" :pagination="tableData.pagination"> |
| | | <pagination @size-change="handleSizeChange" @current-change="getList" :pagination="pagination"> |
| | | </pagination> |
| | | </template> |
| | | <!-- 新建/修改 --> |
| | |
| | | }, |
| | | created() { |
| | | this.config({ |
| | | module: '车辆信息表', |
| | | api: '/business/category', |
| | | 'field.id': 'id', |
| | | 'field.main': 'id' |
| | | }) |
| | | module: '车辆信息表', |
| | | api: '/business/category', |
| | | 'field.id': 'id', |
| | | 'field.main': 'id' |
| | | }) |
| | | this.getList() |
| | | }, |
| | | methods: { |
| | |
| | | }) |
| | | |
| | | }, |
| | | getList() { |
| | | getList(page) { |
| | | const { pagination, filters } = this |
| | | if (page) { |
| | | pagination.page = page |
| | | } |
| | | this.loading = true |
| | | fetchList({ |
| | | model: { ...filters }, |
| | |
| | | this.loading = false |
| | | }) |
| | | }, |
| | | handleSizeChange(val){ |
| | | this.pagination.pageSize = val |
| | | this.getList() |
| | | } |
| | | } |
| | | } |
| | | </script> |