查看隐患信息报错

pull/1/head
zhangyanli 2024-02-20 11:12:06 +08:00
parent 450426dff8
commit a42da670f0
1 changed files with 6 additions and 17 deletions

View File

@ -9,7 +9,7 @@
<span v-else-if="data.info.SOURCE === '4'"> 安全环保检查 </span> <span v-else-if="data.info.SOURCE === '4'"> 安全环保检查 </span>
<span v-else-if="data.info.SOURCE === '5'"> 安全环保检查 </span> <span v-else-if="data.info.SOURCE === '5'"> 安全环保检查 </span>
</el-descriptions-item> </el-descriptions-item>
<template v-if="data.info.SOURCE === '2' && listType === '1'"> <template v-if="data.info.SOURCE === '2'">
<el-descriptions-item label="风险点(单元)"> <el-descriptions-item label="风险点(单元)">
{{ data.info.RISK_UNIT }} {{ data.info.RISK_UNIT }}
</el-descriptions-item> </el-descriptions-item>
@ -26,7 +26,7 @@
{{ data.info.CHECK_CONTENT }} {{ data.info.CHECK_CONTENT }}
</el-descriptions-item> </el-descriptions-item>
</template> </template>
<template v-if="data.info.SOURCE === '2' && listType === '2'"> <template v-if="data.info.SOURCE === '2'">
<el-descriptions-item label="检查类别"> <el-descriptions-item label="检查类别">
{{ data.info.CHECK_CATEGORY_NAME }} {{ data.info.CHECK_CATEGORY_NAME }}
</el-descriptions-item> </el-descriptions-item>
@ -260,10 +260,7 @@ import { reactive, watchEffect } from "vue";
import { getFileSuffix } from "@/assets/js/utils.js"; import { getFileSuffix } from "@/assets/js/utils.js";
import { VideoPlay } from "@element-plus/icons-vue"; import { VideoPlay } from "@element-plus/icons-vue";
import LayoutVideo from "@/components/video/index.vue"; import LayoutVideo from "@/components/video/index.vue";
import { import { getHiddenDangerView } from "@/request/hazard_investigation.js";
getHiddenDangerView,
getCustomHiddenDangerView,
} from "@/request/hazard_investigation.js";
defineOptions({ defineOptions({
name: "LayoutHiddenView", name: "LayoutHiddenView",
@ -275,11 +272,6 @@ const props = defineProps({
required: true, required: true,
default: "", default: "",
}, },
listType: {
type: String,
required: true,
default: "",
},
}); });
const emits = defineEmits(["throw-data"]); const emits = defineEmits(["throw-data"]);
const data = reactive({ const data = reactive({
@ -296,12 +288,9 @@ const data = reactive({
}, },
}); });
const fnGetData = async () => { const fnGetData = async () => {
const resData = const resData = await getHiddenDangerView({
props.listType === "1"
? await getHiddenDangerView({
HIDDEN_ID: props.hiddenId, HIDDEN_ID: props.hiddenId,
}) });
: await getCustomHiddenDangerView({ HIDDEN_ID: props.hiddenId });
data.info = resData.pd; data.info = resData.pd;
data.hs = resData.hs; data.hs = resData.hs;
data.checkList = resData.checkList; data.checkList = resData.checkList;