|
@@ -32,6 +32,7 @@
|
|
ref="tableRef"
|
|
ref="tableRef"
|
|
v-model:searchParams="tableOpts.searchParams"
|
|
v-model:searchParams="tableOpts.searchParams"
|
|
v-bind="tableOpts"
|
|
v-bind="tableOpts"
|
|
|
|
+ v-model:curRow="tableOpts.curRow"
|
|
v-model:checked-options="checkedColumns"
|
|
v-model:checked-options="checkedColumns"
|
|
:columns="activeColumns"
|
|
:columns="activeColumns"
|
|
>
|
|
>
|
|
@@ -41,13 +42,13 @@
|
|
<Plus />
|
|
<Plus />
|
|
</el-icon>
|
|
</el-icon>
|
|
</el-button>
|
|
</el-button>
|
|
- <el-button type="danger">
|
|
|
|
|
|
+ <el-button type="danger" @click="batch_del">
|
|
<el-icon class="btn-icon">
|
|
<el-icon class="btn-icon">
|
|
<Delete />
|
|
<Delete />
|
|
</el-icon>
|
|
</el-icon>
|
|
</el-button>
|
|
</el-button>
|
|
- <el-button plain> 分配角色 </el-button>
|
|
|
|
- <el-button plain> 密码重置 </el-button>
|
|
|
|
|
|
+ <el-button plain :disabled="checkedColumns.length === 0"> 分配角色 </el-button>
|
|
|
|
+ <el-button plain :disabled="checkedColumns.length === 0"> 密码重置 </el-button>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<template #filterAvatarSlot="scope">
|
|
<template #filterAvatarSlot="scope">
|
|
@@ -324,8 +325,7 @@ const { searchData, tableOpts, checkedColumns, activeColumns } = useTablePage(
|
|
fetchImmediate: false
|
|
fetchImmediate: false
|
|
}
|
|
}
|
|
)
|
|
)
|
|
-// // 列接口请求后 进行赋值
|
|
|
|
-// checkedColumns.value = columns
|
|
|
|
|
|
+
|
|
// 删除
|
|
// 删除
|
|
const deleteItem = async ids => {
|
|
const deleteItem = async ids => {
|
|
try {
|
|
try {
|
|
@@ -343,8 +343,10 @@ const table_del = row => {
|
|
|
|
|
|
//批量删除
|
|
//批量删除
|
|
const batch_del = () => {
|
|
const batch_del = () => {
|
|
- const id = checkedColumns.value.map(item => item.id)
|
|
|
|
- deleteItem(id)
|
|
|
|
|
|
+ console.log(tableOpts.curRow);
|
|
|
|
+ debugger
|
|
|
|
+ const id = tableOpts.curRow.map(item => item.id)
|
|
|
|
+ // deleteItem(id)
|
|
}
|
|
}
|
|
|
|
|
|
// 弹窗事件
|
|
// 弹窗事件
|