|
|
@@ -183,7 +183,7 @@ const gridOptions = reactive({
|
|
|
pageSize: config.pageSize,
|
|
|
total: 0,
|
|
|
slots: {
|
|
|
- left: params => props.batchDel && h(pagerBatchDel, { params, onSuccess: ids => table_batch_del(ids) })
|
|
|
+ left: params => props.batchDel && h(pagerBatchDel, { params, onSuccess: table_batch_del })
|
|
|
},
|
|
|
...props.pagerConfig
|
|
|
},
|
|
|
@@ -309,13 +309,14 @@ const getTableData = () => xGrid.value.getTableData();
|
|
|
|
|
|
const reloadData = data => xGrid.value.reloadData(data);
|
|
|
|
|
|
-const table_batch_del = ids => {
|
|
|
- ElMessageBox.confirm("是否确认删除已选择的数据?", "删除警告", {
|
|
|
+const table_batch_del = () => {
|
|
|
+ const deleteIdList = XEUtils.map(getSelectRows(), item => item.id);
|
|
|
+ ElMessageBox.confirm("是否确认删除所有已选数据(不局限本页)?", "删除警告", {
|
|
|
type: "warning",
|
|
|
confirmButtonText: "确定",
|
|
|
cancelButtonText: "取消"
|
|
|
}).then(() => {
|
|
|
- props.apiObj.batchDel({ deleteIdList: ids }).then(() => {
|
|
|
+ props.apiObj.batchDel({ deleteIdList }).then(() => {
|
|
|
ElMessage.success("操作成功");
|
|
|
getData();
|
|
|
});
|