forked from integrated_whb/integrated_whb_vue
清单排查
parent
2da5e720d3
commit
07f2a683b5
|
@ -9,7 +9,7 @@
|
|||
<span v-else-if="data.info.SOURCE === '4'"> 安全环保检查 </span>
|
||||
<span v-else-if="data.info.SOURCE === '5'"> 安全环保检查 </span>
|
||||
</el-descriptions-item>
|
||||
<template v-if="data.info.SOURCE === '2'">
|
||||
<template v-if="data.info.SOURCE === '2' && listType === '1'">
|
||||
<el-descriptions-item label="风险点(单元)">
|
||||
{{ data.info.RISK_UNIT }}
|
||||
</el-descriptions-item>
|
||||
|
@ -26,6 +26,23 @@
|
|||
{{ data.info.CHECK_CONTENT }}
|
||||
</el-descriptions-item>
|
||||
</template>
|
||||
<template v-if="data.info.SOURCE === '2' && listType === '2'">
|
||||
<el-descriptions-item label="检查类别">
|
||||
{{ data.info.BR_CHECK_CATEGORY_NAME }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="检查项目">
|
||||
{{ data.info.BR_CHECK_ITEM_NAME }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="检查内容">
|
||||
{{ data.info.BR_CHECK_CONTENT }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="检查标准">
|
||||
{{ data.info.BR_CHECK_STANDARD }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="参考依据">
|
||||
{{ data.info.BR_REFERENCE_BASIS }}
|
||||
</el-descriptions-item>
|
||||
</template>
|
||||
<el-descriptions-item label="隐患级别">
|
||||
{{ data.info.HIDDENLEVELNAME }}
|
||||
</el-descriptions-item>
|
||||
|
@ -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({
|
||||
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;
|
||||
|
|
|
@ -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); // 隐患清单检查情况检查记录查看其它隐患列表
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -116,7 +116,7 @@
|
|||
DATESTART: row.DATESTART,
|
||||
DATEEND: row.DATEEND,
|
||||
LIST_TYPE: LIST_TYPE,
|
||||
LIST_ID,
|
||||
ID: LIST_ID,
|
||||
},
|
||||
})
|
||||
"
|
||||
|
|
|
@ -1,9 +1,19 @@
|
|||
<template>
|
||||
<inspection entrance="supplementaryRecording" />
|
||||
<inspection entrance="supplementaryRecording" v-if="LIST_TYPE === '1'" />
|
||||
<inspection-custom
|
||||
entrance="supplementaryRecording"
|
||||
v-if="LIST_TYPE === '2'"
|
||||
/>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import Inspection from "../inventory_troubleshooting/inspect.vue";
|
||||
import InspectionCustom from "../inventory_troubleshooting/inspect_custom.vue";
|
||||
|
||||
import { useRoute } from "vue-router";
|
||||
const route = useRoute();
|
||||
const { LIST_TYPE } = route.query;
|
||||
</script>
|
||||
|
||||
<style scoped></style>
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<template>
|
||||
<layout-card>
|
||||
<layout-hidden-view :hidden-id="HIDDEN_ID" />
|
||||
<layout-hidden-view :hidden-id="HIDDEN_ID" :list-type="LIST_TYPE" />
|
||||
</layout-card>
|
||||
</template>
|
||||
|
||||
|
@ -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;
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss"></style>
|
||||
|
|
|
@ -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,
|
||||
},
|
||||
})
|
||||
"
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -55,10 +55,18 @@
|
|||
<el-icon><warning-filled /></el-icon>
|
||||
</el-tooltip>
|
||||
</el-radio>
|
||||
<el-radio :label="1" @click.prevent="fnUnqualified($index, row)">
|
||||
<el-radio
|
||||
:label="1"
|
||||
:disabled="entrance === 'supplementaryRecording'"
|
||||
@click.prevent="fnUnqualified($index, row)"
|
||||
>
|
||||
不合格
|
||||
</el-radio>
|
||||
<el-radio :label="2" @click.prevent="fnNotInvolved($index, row)">
|
||||
<el-radio
|
||||
:label="2"
|
||||
:disabled="entrance === 'supplementaryRecording'"
|
||||
@click.prevent="fnNotInvolved($index, row)"
|
||||
>
|
||||
不涉及
|
||||
</el-radio>
|
||||
</el-radio-group>
|
||||
|
@ -67,7 +75,11 @@
|
|||
</layout-table>
|
||||
<el-divider content-position="left">其他隐患</el-divider>
|
||||
<div class="tr mb-10">
|
||||
<el-button type="primary" @click="fnAddOrEditOtherHidden({}, 'add')">
|
||||
<el-button
|
||||
:disabled="entrance === 'supplementaryRecording'"
|
||||
type="primary"
|
||||
@click="fnAddOrEditOtherHidden({}, 'add')"
|
||||
>
|
||||
添加
|
||||
</el-button>
|
||||
</div>
|
||||
|
@ -167,7 +179,6 @@
|
|||
<el-col :span="2">
|
||||
<el-form-item label-width="10px">
|
||||
<el-button
|
||||
:disabled="!data.canDoCheck"
|
||||
type="primary"
|
||||
v-if="index === 0"
|
||||
@click="fnAddInspectedList"
|
||||
|
@ -175,7 +186,6 @@
|
|||
添加
|
||||
</el-button>
|
||||
<el-button
|
||||
:disabled="!data.canDoCheck"
|
||||
type="danger"
|
||||
v-if="index !== 0"
|
||||
@click="data.form.inspectedList.splice(index, 1)"
|
||||
|
@ -223,6 +233,7 @@
|
|||
:info="{ ...data.unQualifiedDialog.info, ...info.value }"
|
||||
:longitude="data.longitude"
|
||||
:latitude="data.latitude"
|
||||
:list-type="2"
|
||||
@submit="fnHiddenSubmit"
|
||||
/>
|
||||
</layout-card>
|
||||
|
@ -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(
|
||||
|
|
Loading…
Reference in New Issue