diff --git a/src/request/hazard_investigation.js b/src/request/hazard_investigation.js
index 6810f9a..988e9d8 100644
--- a/src/request/hazard_investigation.js
+++ b/src/request/hazard_investigation.js
@@ -95,3 +95,10 @@ export const setCheckStandardSupplementaryRecordingSubmit = (params) =>
post("/customCheckrecord/recording", params); // 隐患排查清单检查情况检查记录补录提交
export const setCheckStandardSubmit = (params) =>
post("/customCheckrecord/add", params); // 清单排查提交
+
+export const getDeleteCustomList = (params) => post("/customStop/list", params); // 删除清单管理列表
+export const setDeleteCustomRecovery = (params) =>
+ post("/customStop/restore", params); // 删除清单管理恢复
+export const setCustomBatchDelete = (params) =>
+ post("/customStop/deleteAll", params); // 清单管理批量删除
+export const getCustomStopView = (params) => post("/customStop/goEdit", params); // 清单管理查看
diff --git a/src/views/hazard_investigation/delete_inventory_management/components/list.vue b/src/views/hazard_investigation/delete_inventory_management/components/list.vue
index 5dc791e..6f5176b 100644
--- a/src/views/hazard_investigation/delete_inventory_management/components/list.vue
+++ b/src/views/hazard_investigation/delete_inventory_management/components/list.vue
@@ -86,7 +86,7 @@
:data="list"
v-model:pagination="pagination"
@get-data="fnGetDataTransfer"
- row-key="LISTMANAGER_ID"
+ :row-key="name === 'risk' ? LISTMANAGER_ID : CUSTOM_ID"
>
@@ -140,7 +140,10 @@
@click="
router.push({
path: '/hazard_investigation/delete_inventory_management/view',
- query: { LISTMANAGER_ID: row.LISTMANAGER_ID },
+ query:
+ name === 'risk'
+ ? { ID: row.LISTMANAGER_ID, type: '1' }
+ : { ID: row.CUSTOM_ID, type: '2' },
})
"
>
@@ -150,7 +153,11 @@
type="primary"
text
link
- @click="fnRecovery(row.LISTMANAGER_ID)"
+ @click="
+ name === 'risk'
+ ? fnRecovery(row.LISTMANAGER_ID)
+ : fnRecovery(row.CUSTOM_ID)
+ "
>
启用
@@ -184,24 +191,29 @@ import {
import { SPECIAL_ENTERPRISES } from "@/assets/js/constant.js";
import { useUserStore } from "@/pinia/user.js";
import {
+ getDeleteCustomList,
getDeleteInventoryManagementList,
+ setCustomBatchDelete,
+ setDeleteCustomRecovery,
setDeleteInventoryManagementRecovery,
setInventoryManagementBatchDelete,
} from "@/request/hazard_investigation.js";
import { useRouter } from "vue-router";
-defineProps({
+const tabName = defineProps({
name: {
type: String,
required: true,
default: "",
},
});
+
const router = useRouter();
const { list, pagination, searchForm, fnGetData, fnResetPagination, tableRef } =
- useListData(getDeleteInventoryManagementList, {
- LIST_TYPE: name === "risk" ? "1" : "2",
- });
+ tabName.name === "risk"
+ ? useListData(getDeleteInventoryManagementList)
+ : useListData(getDeleteCustomList);
+
const userStore = useUserStore();
const CORPINFO_ID = userStore.getUserInfo.CORPINFO_ID;
const buttonJurisdiction = await useButtonJurisdiction("stoplistmanager");
@@ -220,9 +232,14 @@ const fnResetPaginationTransfer = () => {
};
const fnRecovery = debounce(
1000,
- async (LISTMANAGER_ID) => {
+ async (ID) => {
await ElMessageBox.confirm("确定要恢复吗?", { type: "warning" });
- await setDeleteInventoryManagementRecovery({ LISTMANAGER_ID });
+ if (tabName.name === "risk") {
+ await setDeleteInventoryManagementRecovery({ ID });
+ } else {
+ await setDeleteCustomRecovery({ ID });
+ }
+
ElMessage.success("恢复成功");
fnResetPaginationTransfer();
},
@@ -240,8 +257,15 @@ const fnBatchDelete = debounce(
"删除之后该清单无法恢复,确认要删除选中的数据吗?",
{ type: "warning" }
);
- const DATA_IDS = selectionData.map((item) => item.LISTMANAGER_ID).join(",");
- await setInventoryManagementBatchDelete({ DATA_IDS });
+ if (tabName.name === "risk") {
+ const DATA_IDS = selectionData
+ .map((item) => item.LISTMANAGER_ID)
+ .join(",");
+ await setInventoryManagementBatchDelete({ DATA_IDS });
+ } else {
+ const DATA_IDS = selectionData.map((item) => item.CUSTOM_ID).join(",");
+ await setCustomBatchDelete({ DATA_IDS });
+ }
ElMessage.success("删除成功");
fnResetPaginationTransfer();
},
diff --git a/src/views/hazard_investigation/delete_inventory_management/view.vue b/src/views/hazard_investigation/delete_inventory_management/view.vue
index aea83b3..1609923 100644
--- a/src/views/hazard_investigation/delete_inventory_management/view.vue
+++ b/src/views/hazard_investigation/delete_inventory_management/view.vue
@@ -53,19 +53,31 @@
diff --git a/src/views/hazard_investigation/inventory_management/components/list.vue b/src/views/hazard_investigation/inventory_management/components/list.vue
index 7aad582..812edbb 100644
--- a/src/views/hazard_investigation/inventory_management/components/list.vue
+++ b/src/views/hazard_investigation/inventory_management/components/list.vue
@@ -382,9 +382,9 @@ const fnDisable = debounce(
async (ID) => {
await ElMessageBox.confirm("确定要禁用吗?", { type: "warning" });
if (tabName.name === "risk") {
- await setInventoryManagementDisable({ ID });
+ await setInventoryManagementDisable({ LISTMANAGER_ID: ID });
} else {
- await setCustomDisable({ ID });
+ await setCustomDisable({ CUSTOM_ID: ID });
}
ElMessage.success("禁用成功");
fnResetPaginationTransfer();