|
@@ -440,23 +440,39 @@ const btnShowDel = () => {
|
|
|
*/
|
|
|
const btnBatchDel = () => {
|
|
|
|
|
|
- console.log(
|
|
|
- "开始批量删除处理", state.value.ids
|
|
|
- );
|
|
|
+ // console.log(
|
|
|
+ // "开始批量删除处理", state.value.ids
|
|
|
+ // );
|
|
|
|
|
|
- ElMessage({
|
|
|
- type: 'success',
|
|
|
- message: '删除成功',
|
|
|
- });
|
|
|
+ let delIdArray = [];
|
|
|
+ for (let i = 0; i < state.value.ids.length; i++) {
|
|
|
|
|
|
- // 重新查找分页数据
|
|
|
- pageUpdateEvent();
|
|
|
+ let thisIds = state.value.ids[i];
|
|
|
+ let addJson = { "id" : thisIds.id };
|
|
|
+ delIdArray.push(addJson);
|
|
|
|
|
|
- // 批量选中的列表重置
|
|
|
- state.value.ids = [];
|
|
|
- // 隐藏模态框
|
|
|
- state.value.showDel = false;
|
|
|
-
|
|
|
+ }
|
|
|
+
|
|
|
+ idDelAll(
|
|
|
+ delIdArray,
|
|
|
+ function() {
|
|
|
+
|
|
|
+ ElMessage({
|
|
|
+ type: 'success',
|
|
|
+ message: '批量删除成功',
|
|
|
+ });
|
|
|
+
|
|
|
+ // 重新查找分页数据
|
|
|
+ pageUpdateEvent();
|
|
|
+
|
|
|
+ // 批量选中的列表重置
|
|
|
+ state.value.ids = [];
|
|
|
+ // 隐藏模态框
|
|
|
+ state.value.showDel = false;
|
|
|
+
|
|
|
+ }
|
|
|
+ );
|
|
|
+
|
|
|
}
|
|
|
|
|
|
/**
|