| | |
| | | <el-button class="filter-item" type="success" @click="reset"> |
| | | {{ $t('table.reset') }} |
| | | </el-button> |
| | | <el-dropdown v-has-any-permission="['position:add','position:delete']" trigger="click" class="filter-item"> |
| | | <el-button> |
| | | {{ $t('table.more') }}<i class="el-icon-arrow-down el-icon--right" /> |
| | | </el-button> |
| | | <el-dropdown-menu slot="dropdown"> |
| | | <el-dropdown-item v-has-permission="['position:add']" @click.native="add">{{ $t('table.add') }}</el-dropdown-item> |
| | | </el-dropdown-menu> |
| | | </el-dropdown> |
| | | <el-button v-has-permission="['position:add']" class="filter-item" type="primary" @click.native="add"> |
| | | {{ $t('table.add') }} |
| | | </el-button> |
| | | <el-button v-has-permission="['position:delete']" class="el-icon-delete table-operation" style="color: #f50;" @click.native="batchDelete"> |
| | | {{ $t('table.delete') }} |
| | | </el-button> |
| | | </div> |
| | | <el-table |
| | | ref="table" |
| | |
| | | cancelButtonText: this.$t('common.cancel'), |
| | | type: 'warning' |
| | | }).then(() => { |
| | | debugger |
| | | const positionId = [] |
| | | this.selection.forEach((c) => { |
| | | positionId.push(c.positionId) |
| | |
| | | }) |
| | | }, |
| | | singleDelete(row) { |
| | | debugger |
| | | this.$refs.table.toggleRowSelection(row, true) |
| | | this.batchDelete() |
| | | this.delete(row.positionId) |
| | | }, |
| | | delete(positionId) { |
| | | delete(ids) { |
| | | this.loading = true |
| | | this.$delete(`system/position`, { positionId }).then(() => { |
| | | this.$delete(`system/position/${ids}`).then(() => { |
| | | this.$message({ |
| | | message: this.$t('tips.deleteSuccess'), |
| | | type: 'success' |