隐患排查批量删除

pull/1/head
zhangyanli 2024-02-01 16:41:45 +08:00
parent e24a7c48aa
commit 5ea9fb929d
1 changed files with 6 additions and 6 deletions

View File

@ -381,7 +381,7 @@ const fnDisable = debounce(
1000, 1000,
async (ID) => { async (ID) => {
await ElMessageBox.confirm("确定要禁用吗?", { type: "warning" }); await ElMessageBox.confirm("确定要禁用吗?", { type: "warning" });
if (name === "risk") { if (tabName.name === "risk") {
await setInventoryManagementDisable({ ID }); await setInventoryManagementDisable({ ID });
} else { } else {
await setCustomDisable({ ID }); await setCustomDisable({ ID });
@ -395,7 +395,7 @@ const fnEnable = debounce(
1000, 1000,
async (ID) => { async (ID) => {
await ElMessageBox.confirm("确定要启用吗?", { type: "warning" }); await ElMessageBox.confirm("确定要启用吗?", { type: "warning" });
if (name === "risk") { if (tabName.name === "risk") {
await setInventoryManagementEnable({ ID }); await setInventoryManagementEnable({ ID });
} else { } else {
await setCustomEnable({ ID }); await setCustomEnable({ ID });
@ -417,13 +417,13 @@ const fnBatchDelete = debounce(
const DATA_IDS2 = []; const DATA_IDS2 = [];
selectionData.forEach((item) => { selectionData.forEach((item) => {
if (item.TYPE === "listType0006") { if (item.TYPE === "listType0006") {
if (name === "risk") { if (tabName.name === "risk") {
DATA_IDS1.push(item.LISTMANAGER_ID); DATA_IDS1.push(item.LISTMANAGER_ID);
} else { } else {
DATA_IDS1.push(item.CUSTOM_ID); DATA_IDS1.push(item.CUSTOM_ID);
} }
} else { } else {
if (name === "risk") { if (tabName.name === "risk") {
DATA_IDS2.push(item.LISTMANAGER_ID); DATA_IDS2.push(item.LISTMANAGER_ID);
} else { } else {
DATA_IDS2.push(item.CUSTOM_ID); DATA_IDS2.push(item.CUSTOM_ID);
@ -435,7 +435,7 @@ const fnBatchDelete = debounce(
"临时清单会彻底被删除不可恢复,确定要删除吗?", "临时清单会彻底被删除不可恢复,确定要删除吗?",
{ type: "warning" } { type: "warning" }
); );
if (name === "risk") { if (tabName.name === "risk") {
await setInventoryManagementBatchDeleteTemporary({ await setInventoryManagementBatchDeleteTemporary({
DATA_IDS: DATA_IDS1.join(","), DATA_IDS: DATA_IDS1.join(","),
}); });
@ -449,7 +449,7 @@ const fnBatchDelete = debounce(
type: "warning", type: "warning",
}); });
} }
if (name === "risk") { if (tabName.name === "risk") {
await setInventoryManagementBatchDelete({ await setInventoryManagementBatchDelete({
DATA_IDS: DATA_IDS2.join(","), DATA_IDS: DATA_IDS2.join(","),
}); });