|
@@ -307,11 +307,17 @@ const columns = [
|
|
}
|
|
}
|
|
}
|
|
}
|
|
]
|
|
]
|
|
-
|
|
|
|
-const { searchData, tableOpts, checkedColumns, activeColumns } = useTablePage(
|
|
|
|
|
|
+const curSelectionRows = ref([])
|
|
|
|
+const selectionChange = rows => {
|
|
|
|
+ console.error('rows...', rows)
|
|
|
|
+ curSelectionRows.value = rows
|
|
|
|
+}
|
|
|
|
+const { searchData, tableOpts, checkedColumns, activeColumns, updateParams } = useTablePage(
|
|
{
|
|
{
|
|
options: {
|
|
options: {
|
|
- showIndex: false
|
|
|
|
|
|
+ showIndex: false,
|
|
|
|
+ // 多选变更
|
|
|
|
+ onSelectionChange: selectionChange
|
|
},
|
|
},
|
|
// 需要展示的列
|
|
// 需要展示的列
|
|
columns,
|
|
columns,
|
|
@@ -343,9 +349,11 @@ const table_del = row => {
|
|
|
|
|
|
//批量删除
|
|
//批量删除
|
|
const batch_del = () => {
|
|
const batch_del = () => {
|
|
- console.log(tableOpts.curRow);
|
|
|
|
|
|
+ /* console.log(tableOpts.curRow);
|
|
debugger
|
|
debugger
|
|
- const id = tableOpts.curRow.map(item => item.id)
|
|
|
|
|
|
+ const id = tableOpts.curRow.map(item => item.id)*/
|
|
|
|
+ // 多选数据
|
|
|
|
+ console.log(curSelectionRows.value, 'curSelectionRows.value')
|
|
// deleteItem(id)
|
|
// deleteItem(id)
|
|
}
|
|
}
|
|
|
|
|
|
@@ -357,10 +365,12 @@ const submitHandler = async params => {
|
|
await user.userAddOrEditSaveApi(params)
|
|
await user.userAddOrEditSaveApi(params)
|
|
ElMessage.success(`${isCreate.value ? '新增' : '修改'}成功~`)
|
|
ElMessage.success(`${isCreate.value ? '新增' : '修改'}成功~`)
|
|
visible.value = false
|
|
visible.value = false
|
|
- tableOpts.searchParams = {
|
|
|
|
|
|
+ updateParams()
|
|
|
|
+ /*tableOpts.searchParams = {
|
|
...(tableOpts.searchParams as SearchParams),
|
|
...(tableOpts.searchParams as SearchParams),
|
|
page: 1
|
|
page: 1
|
|
- }
|
|
|
|
|
|
+ }*/
|
|
|
|
+ formOptions.value.formConfig.submitLoading = false
|
|
} catch (e) {
|
|
} catch (e) {
|
|
console.log(e)
|
|
console.log(e)
|
|
formOptions.value.formConfig.submitLoading = false
|
|
formOptions.value.formConfig.submitLoading = false
|