From 07f2a683b5b06a0bcb37eed47df908f5c33cd38d Mon Sep 17 00:00:00 2001
From: dearlin <1261008090@qq.com>
Date: Sun, 4 Feb 2024 17:00:00 +0800
Subject: [PATCH] =?UTF-8?q?=E6=B8=85=E5=8D=95=E6=8E=92=E6=9F=A5?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/components/hidden_view/index.vue | 38 ++++++++++++++++---
src/request/hazard_investigation.js | 13 +++++++
.../components/inspection_record_view.vue | 13 ++++---
.../inspection_record.vue | 2 +-
.../supplementary_recording.vue | 12 +++++-
.../inspection_record/hidden_danger.vue | 4 +-
.../inspection_record/index.vue | 4 +-
.../components/un_qualified.vue | 29 ++++++++++++--
.../inspect_custom.vue | 35 ++++++++++++-----
9 files changed, 121 insertions(+), 29 deletions(-)
diff --git a/src/components/hidden_view/index.vue b/src/components/hidden_view/index.vue
index 7c7a12e..94bf8c8 100644
--- a/src/components/hidden_view/index.vue
+++ b/src/components/hidden_view/index.vue
@@ -9,7 +9,7 @@
安全环保检查
安全环保检查
-
+
{{ data.info.RISK_UNIT }}
@@ -26,6 +26,23 @@
{{ data.info.CHECK_CONTENT }}
+
+
+ {{ data.info.BR_CHECK_CATEGORY_NAME }}
+
+
+ {{ data.info.BR_CHECK_ITEM_NAME }}
+
+
+ {{ data.info.BR_CHECK_CONTENT }}
+
+
+ {{ data.info.BR_CHECK_STANDARD }}
+
+
+ {{ data.info.BR_REFERENCE_BASIS }}
+
+
{{ data.info.HIDDENLEVELNAME }}
@@ -242,7 +259,10 @@ import { reactive, watchEffect } from "vue";
import { getFileSuffix } from "@/assets/js/utils.js";
import { VideoPlay } from "@element-plus/icons-vue";
import LayoutVideo from "@/components/video/index.vue";
-import { getHiddenDangerView } from "@/request/hazard_investigation.js";
+import {
+ getHiddenDangerView,
+ getCustomHiddenDangerView,
+} from "@/request/hazard_investigation.js";
defineOptions({
name: "LayoutHiddenView",
@@ -254,6 +274,11 @@ const props = defineProps({
required: true,
default: "",
},
+ listType: {
+ type: String,
+ required: true,
+ default: "",
+ },
});
const emits = defineEmits(["throw-data"]);
const data = reactive({
@@ -270,9 +295,12 @@ const data = reactive({
},
});
const fnGetData = async () => {
- const resData = await getHiddenDangerView({
- HIDDEN_ID: props.hiddenId,
- });
+ const resData =
+ props.listType === "1"
+ ? await getHiddenDangerView({
+ HIDDEN_ID: props.hiddenId,
+ })
+ : await getCustomHiddenDangerView({ HIDDEN_ID: props.hiddenId });
data.info = resData.pd;
data.hs = resData.hs;
data.checkList = resData.checkList;
diff --git a/src/request/hazard_investigation.js b/src/request/hazard_investigation.js
index ecc2d81..8d0c4af 100644
--- a/src/request/hazard_investigation.js
+++ b/src/request/hazard_investigation.js
@@ -109,9 +109,22 @@ export const getCustomCheckRecordList = (params) =>
post("/customCheckrecord/list", params); // 隐患清单排查列表
export const getCustomCheckRecordView = (params) =>
post("/customCheckrecord/goEdit", params); // 隐患清单排查查询单个
+
+export const setCustomHiddenDangerAdd = (params) =>
+ post("/customHidden/add", params); // 隐患清单其它隐患添加
+export const getCustomHiddenDangerView = (params) =>
+ post("/customHidden/goEdit", params); // 隐患清单排查其它隐患查看
+export const setCustomHiddenDangerDelete = (params) =>
+ post("/customHidden/delete", params); // 隐患清单排查其它隐患删除
+export const setCustomHiddenDangerEdit = (params) =>
+ post("/customHidden/edit", params); // 隐患清单排查其它隐患修改
+export const setCustomHiddenDangerListAdd = (params) =>
+ post("/customHidden/listAdd", params); // 清单排查其它隐患添加
export const setDeleteCustommCheckrecord = (params) =>
post("/customCheckrecord/delete", params); // 删除隐患清单排查记录
export const setCustomInsuranceCoverageList = (params) =>
post("/customLabelFactory/termList", params); // 隐患排查清单管理设置包保责任类型选择列表
export const setCustomInsuranceCoverageSave = (params) =>
post("/hiddenstandardCustom/saveBaoBaoType", params); // 清单管理设置包保责任类型提交
+export const getCustomCheckListOtherHiddenList = (params) =>
+ post("/customHidden/getCheckHidden", params); // 隐患清单检查情况检查记录查看其它隐患列表
diff --git a/src/views/hazard_investigation/checklist_inspection_status/components/inspection_record_view.vue b/src/views/hazard_investigation/checklist_inspection_status/components/inspection_record_view.vue
index ab06845..c177161 100644
--- a/src/views/hazard_investigation/checklist_inspection_status/components/inspection_record_view.vue
+++ b/src/views/hazard_investigation/checklist_inspection_status/components/inspection_record_view.vue
@@ -98,7 +98,7 @@
entrance &&
router.push({
path: hiddenPath[entrance],
- query: { HIDDEN_ID: row.HIDDEN_ID },
+ query: { HIDDEN_ID: row.HIDDEN_ID, LIST_TYPE: listType },
})
"
>
@@ -187,7 +187,7 @@
entrance &&
router.push({
path: hiddenPath[entrance],
- query: { HIDDEN_ID: row.HIDDEN_ID },
+ query: { HIDDEN_ID: row.HIDDEN_ID, LIST_TYPE: listType },
})
"
>
@@ -259,7 +259,7 @@
@click="
router.push({
path: hiddenPath[entrance],
- query: { HIDDEN_ID: row.HIDDEN_ID },
+ query: { HIDDEN_ID: row.HIDDEN_ID, LIST_TYPE: listType },
})
"
>
@@ -303,6 +303,7 @@ import {
getChecklistInspectionStatusRecordView,
getCustomCheckRecordView,
getChecklistInspectionStatusRecordViewOtherHiddenDangerList,
+ getCustomCheckListOtherHiddenList,
} from "@/request/hazard_investigation.js";
import { getViewImg } from "@/request/api.js";
import { PRINT_STYLE } from "@/assets/js/constant.js";
@@ -349,7 +350,7 @@ const data = reactive({
mapDialogVisible: false,
});
const { list: inspectionList } = useListData(
- props.listType === 1
+ props.listType === "1"
? getChecklistInspectionStatusRecordView
: getCustomCheckRecordView,
{
@@ -364,7 +365,9 @@ const { list: inspectionList } = useListData(
}
);
const { list: otherHiddenList } = useListData(
- getChecklistInspectionStatusRecordViewOtherHiddenDangerList,
+ props.listType === "1"
+ ? getChecklistInspectionStatusRecordViewOtherHiddenDangerList
+ : getCustomCheckListOtherHiddenList,
{
otherParams: { CHECKRECORD_ID: props.checkRecordId },
usePagination: false,
diff --git a/src/views/hazard_investigation/checklist_inspection_status/inspection_record.vue b/src/views/hazard_investigation/checklist_inspection_status/inspection_record.vue
index 85bb6f7..d9dfa0f 100644
--- a/src/views/hazard_investigation/checklist_inspection_status/inspection_record.vue
+++ b/src/views/hazard_investigation/checklist_inspection_status/inspection_record.vue
@@ -116,7 +116,7 @@
DATESTART: row.DATESTART,
DATEEND: row.DATEEND,
LIST_TYPE: LIST_TYPE,
- LIST_ID,
+ ID: LIST_ID,
},
})
"
diff --git a/src/views/hazard_investigation/checklist_inspection_status/supplementary_recording.vue b/src/views/hazard_investigation/checklist_inspection_status/supplementary_recording.vue
index 90c3e97..d986a42 100644
--- a/src/views/hazard_investigation/checklist_inspection_status/supplementary_recording.vue
+++ b/src/views/hazard_investigation/checklist_inspection_status/supplementary_recording.vue
@@ -1,9 +1,19 @@
-
+
+
+
diff --git a/src/views/hazard_investigation/inspection_record/hidden_danger.vue b/src/views/hazard_investigation/inspection_record/hidden_danger.vue
index f9daf46..3938551 100644
--- a/src/views/hazard_investigation/inspection_record/hidden_danger.vue
+++ b/src/views/hazard_investigation/inspection_record/hidden_danger.vue
@@ -1,6 +1,6 @@
-
+
@@ -9,7 +9,7 @@ import LayoutHiddenView from "@/components/hidden_view/index.vue";
import { useRoute } from "vue-router";
const route = useRoute();
-const { HIDDEN_ID } = route.query;
+const { HIDDEN_ID, LIST_TYPE } = route.query;
diff --git a/src/views/hazard_investigation/inspection_record/index.vue b/src/views/hazard_investigation/inspection_record/index.vue
index b6f7046..f2ff64f 100644
--- a/src/views/hazard_investigation/inspection_record/index.vue
+++ b/src/views/hazard_investigation/inspection_record/index.vue
@@ -132,8 +132,8 @@
CHECKRECORD_ID: row.CHECKRECORD_ID,
DATESTART: row.DATESTART,
DATEEND: row.DATEEND,
- LISTMANAGER_ID: row.LISTMANAGER_ID,
- LIST_TYPE,
+ ID: row.LISTMANAGER_ID,
+ LIST_TYPE:row.LIST_TYPE,
},
})
"
diff --git a/src/views/hazard_investigation/inventory_troubleshooting/components/un_qualified.vue b/src/views/hazard_investigation/inventory_troubleshooting/components/un_qualified.vue
index c4e08a8..256fe8c 100644
--- a/src/views/hazard_investigation/inventory_troubleshooting/components/un_qualified.vue
+++ b/src/views/hazard_investigation/inventory_troubleshooting/components/un_qualified.vue
@@ -24,8 +24,11 @@ import { debounce } from "throttle-debounce";
import { ElMessage } from "element-plus";
import {
setHiddenDangerAdd,
+ setCustomHiddenDangerAdd,
setHiddenDangerEdit,
+ setCustomHiddenDangerEdit,
setHiddenDangerListAdd,
+ setCustomHiddenDangerListAdd,
} from "@/request/hazard_investigation.js";
import { setUploadImg } from "@/request/api.js";
import LayoutHiddenAdd from "@/components/hidden_add/index.vue";
@@ -47,11 +50,18 @@ const props = defineProps({
required: true,
default: () => ({}),
},
+ // 新增或者修改 title展示
type: {
type: String,
required: true,
default: "",
},
+ // 清单类型 1风险清单 2隐患清单
+ listType: {
+ type: Number,
+ required: false,
+ default: 1,
+ },
hiddenType: {
type: String,
required: true,
@@ -92,7 +102,9 @@ const fnSubmit = debounce(
HIDDENTYPE2: form.value.HIDDENTYPE[1],
HIDDENTYPE3: form.value.HIDDENTYPE[2],
HIDDENTYPE_NAME: hiddenAddRef.value.hiddenDangerTypeLabel(),
+ // 根据不同id 存到不同的表里
LISTMANAGER_ID: props.listManagerId,
+ CUSTOM_ID: props.listManagerId,
};
if (props.hiddenType === "unqualified") {
if (!props.longitude && !props.latitude) {
@@ -101,6 +113,7 @@ const fnSubmit = debounce(
}
params = {
...params,
+ // 来源 2风险清单 隐患清单
SOURCE: "2",
RISK_UNIT: props.info.RISKUNITNAME,
IDENTIFICATION: props.info.PARTSNAME,
@@ -113,7 +126,10 @@ const fnSubmit = debounce(
LONGITUDE: props.longitude,
LATITUDE: props.latitude,
};
- const resData = await setHiddenDangerAdd(params);
+ const resData =
+ props.listType === 1
+ ? await setHiddenDangerAdd(params)
+ : await setCustomHiddenDangerAdd(params);
currentHiddenId = resData.pd.HIDDEN_ID;
}
if (props.hiddenType === "otherHidden") {
@@ -124,11 +140,18 @@ const fnSubmit = debounce(
HAVESCHEME: 0,
};
if (props.type === "add") {
- const resData = await setHiddenDangerListAdd(params);
+ console.log(props.listType);
+ const resData =
+ props.listType === 1
+ ? await setHiddenDangerListAdd(params)
+ : await setCustomHiddenDangerListAdd(params);
currentHiddenId = resData.pd.HIDDEN_ID;
}
if (props.type === "edit") {
- const resData = await setHiddenDangerEdit(params);
+ const resData =
+ props.listType === 1
+ ? await setHiddenDangerEdit(params)
+ : await setCustomHiddenDangerEdit(params);
currentHiddenId = resData.pd.HIDDEN_ID;
}
}
diff --git a/src/views/hazard_investigation/inventory_troubleshooting/inspect_custom.vue b/src/views/hazard_investigation/inventory_troubleshooting/inspect_custom.vue
index 1b61746..975aa7a 100644
--- a/src/views/hazard_investigation/inventory_troubleshooting/inspect_custom.vue
+++ b/src/views/hazard_investigation/inventory_troubleshooting/inspect_custom.vue
@@ -55,10 +55,18 @@
-
+
不合格
-
+
不涉及
@@ -67,7 +75,11 @@
其他隐患
-
+
添加
@@ -167,7 +179,6 @@
@@ -232,8 +243,8 @@
import { nextTick, onMounted, reactive, ref } from "vue";
import {
getCheckStandardOtherHiddenList,
- getHiddenDangerView,
- setHiddenDangerDelete,
+ getCustomHiddenDangerView,
+ setCustomHiddenDangerDelete,
getCheckStandardManagementView,
setCheckStandardSupplementaryRecordingSubmit,
setCheckStandardSubmit,
@@ -317,6 +328,9 @@ const { list: inspectionList } = useListData(getCheckStandardManagementView, {
usePagination: false,
callbackFn: (list, resData) => {
for (let i = 0; i < list.length; i++) {
+ if (props.entrance === "supplementaryRecording") {
+ continue;
+ }
list[i].CHECK_RESULT = "不涉及";
if (list[i].HASHIDDEN <= 0) list[i].ISNORMAL = 2;
}
@@ -407,7 +421,7 @@ const fnRemoveUnqualified = (index) => {
inspectionList.value[index].HIDDEN_ID = "";
};
const fnUnqualified = async (index, row) => {
- if (row.HASHIDDEN > 0) return;
+ if (row.HASHIDDEN > 0 || props.entrance === "supplementaryRecording") return;
data.unQualifiedDialog.visible = true;
await nextTick();
if (
@@ -425,7 +439,7 @@ const fnUnqualified = async (index, row) => {
data.unQualifiedDialog.hiddenType = "unqualified";
};
const fnGetHiddenDangerView = async (HIDDEN_ID) => {
- const resData = await getHiddenDangerView({
+ const resData = await getCustomHiddenDangerView({
HIDDEN_ID,
});
data.unQualifiedDialog.form = resData.pd;
@@ -476,7 +490,7 @@ const fnDeleteOtherHidden = async (HIDDEN_ID) => {
await ElMessageBox.confirm("确定要删除吗?", {
type: "warning",
});
- await setHiddenDangerDelete({ HIDDEN_ID });
+ await setCustomHiddenDangerDelete({ HIDDEN_ID });
fnGetOtherHidden();
};
const fnAddOrEditOtherHidden = async (row, type) => {
@@ -485,6 +499,7 @@ const fnAddOrEditOtherHidden = async (row, type) => {
data.unQualifiedDialog.type = type;
data.unQualifiedDialog.info = row;
data.unQualifiedDialog.hiddenType = "otherHidden";
+ data.unQualifiedDialog.form.HIDDENDESCR = "";
if (type === "edit") await fnGetHiddenDangerView(row.HIDDEN_ID);
};
const fnSubmit = debounce(