feat(user): added batch delete button for user management
parent
ee43a2773c
commit
afa5864717
|
@ -33,6 +33,14 @@ export function DelObj (id) {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function BatchDel (keys) {
|
||||||
|
return request({
|
||||||
|
url: urlPrefix + 'multiple_delete/',
|
||||||
|
method: 'delete',
|
||||||
|
data: { keys }
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 重置密码
|
* 重置密码
|
||||||
* @param obj
|
* @param obj
|
||||||
|
|
|
@ -9,7 +9,12 @@ export const crudOptions = (vm) => {
|
||||||
options: {
|
options: {
|
||||||
height: '100%',
|
height: '100%',
|
||||||
tableType: 'vxe-table',
|
tableType: 'vxe-table',
|
||||||
rowKey: true // 必须设置,true or false
|
rowKey: true,
|
||||||
|
rowId: 'id'
|
||||||
|
},
|
||||||
|
selectionRow: {
|
||||||
|
align: 'center',
|
||||||
|
width: 46
|
||||||
},
|
},
|
||||||
rowHandle: {
|
rowHandle: {
|
||||||
width: 240,
|
width: 240,
|
||||||
|
|
|
@ -21,9 +21,12 @@
|
||||||
>
|
>
|
||||||
<i class="el-icon-plus" /> 新增
|
<i class="el-icon-plus" /> 新增
|
||||||
</el-button>
|
</el-button>
|
||||||
|
<el-button size="small" type="danger" @click="batchDelete">
|
||||||
|
<i class="el-icon-delete"></i> 批量删除
|
||||||
|
</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
size="small"
|
size="small"
|
||||||
type="danger"
|
type="warning"
|
||||||
@click="onExport"
|
@click="onExport"
|
||||||
v-permission="'Export'"
|
v-permission="'Export'"
|
||||||
><i class="el-icon-download" /> 导出
|
><i class="el-icon-download" /> 导出
|
||||||
|
@ -42,6 +45,16 @@
|
||||||
@columns-filter-changed="handleColumnsFilterChanged"
|
@columns-filter-changed="handleColumnsFilterChanged"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
<span slot="PaginationPrefixSlot" class="prefix">
|
||||||
|
<el-button
|
||||||
|
class="square"
|
||||||
|
size="mini"
|
||||||
|
title="批量删除"
|
||||||
|
@click="batchDelete"
|
||||||
|
icon="el-icon-delete"
|
||||||
|
:disabled="!multipleSelection || multipleSelection.length == 0"
|
||||||
|
/>
|
||||||
|
</span>
|
||||||
</d2-crud-x>
|
</d2-crud-x>
|
||||||
<el-dialog
|
<el-dialog
|
||||||
title="密码重置"
|
title="密码重置"
|
||||||
|
@ -149,6 +162,9 @@ export default {
|
||||||
delRequest (row) {
|
delRequest (row) {
|
||||||
return api.DelObj(row.id)
|
return api.DelObj(row.id)
|
||||||
},
|
},
|
||||||
|
batchDelRequest (ids) {
|
||||||
|
return api.BatchDel(ids)
|
||||||
|
},
|
||||||
onExport () {
|
onExport () {
|
||||||
this.$confirm('是否确认导出所有数据项?', '警告', {
|
this.$confirm('是否确认导出所有数据项?', '警告', {
|
||||||
confirmButtonText: '确定',
|
confirmButtonText: '确定',
|
||||||
|
|
Loading…
Reference in New Issue