forked from integrated_whb/integrated_whb_vue
Merge remote-tracking branch 'origin/dev' into dev
commit
ae9707dc6c
Binary file not shown.
After Width: | Height: | Size: 3.2 KiB |
Binary file not shown.
After Width: | Height: | Size: 1.5 KiB |
|
@ -307,6 +307,267 @@ export default [
|
|||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
path: "/hazard_investigation/checklist_inspection_status",
|
||||
meta: { title: "清单检查情况", isSubMenu: false },
|
||||
component: "children",
|
||||
children: [
|
||||
{
|
||||
path: "",
|
||||
component: "hazard_investigation/checklist_inspection_status/index",
|
||||
},
|
||||
{
|
||||
path: "/hazard_investigation/checklist_inspection_status/inspection_record",
|
||||
meta: {
|
||||
title: "检查记录",
|
||||
activeMenu: "/hazard_investigation/checklist_inspection_status",
|
||||
},
|
||||
component: "children",
|
||||
children: [
|
||||
{
|
||||
path: "",
|
||||
component:
|
||||
"hazard_investigation/checklist_inspection_status/inspection_record",
|
||||
},
|
||||
{
|
||||
path: "/hazard_investigation/checklist_inspection_status/inspection_record/supplementary_recording",
|
||||
meta: {
|
||||
title: "补录",
|
||||
activeMenu:
|
||||
"/hazard_investigation/checklist_inspection_status",
|
||||
},
|
||||
component:
|
||||
"hazard_investigation/checklist_inspection_status/supplementary_recording",
|
||||
},
|
||||
{
|
||||
path: "/hazard_investigation/checklist_inspection_status/inspection_record/view",
|
||||
meta: {
|
||||
title: "详情",
|
||||
activeMenu:
|
||||
"/hazard_investigation/checklist_inspection_status",
|
||||
},
|
||||
component: "children",
|
||||
children: [
|
||||
{
|
||||
path: "",
|
||||
component:
|
||||
"hazard_investigation/checklist_inspection_status/inspection_record_view",
|
||||
},
|
||||
{
|
||||
path: "/hazard_investigation/checklist_inspection_status/inspection_record/view/hidden_danger",
|
||||
meta: {
|
||||
title: "隐患信息",
|
||||
activeMenu:
|
||||
"/hazard_investigation/checklist_inspection_status",
|
||||
},
|
||||
component:
|
||||
"hazard_investigation/checklist_inspection_status/hidden_danger_view",
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
path: "/hazard_investigation/inspection_record",
|
||||
meta: { title: "检查记录管理", isSubMenu: false },
|
||||
component: "children",
|
||||
children: [
|
||||
{
|
||||
path: "",
|
||||
component: "hazard_investigation/inspection_record/index",
|
||||
},
|
||||
{
|
||||
path: "/hazard_investigation/inspection_record/supplementary_recording",
|
||||
meta: {
|
||||
title: "补录",
|
||||
activeMenu: "/hazard_investigation/inspection_record",
|
||||
},
|
||||
component:
|
||||
"hazard_investigation/inspection_record/supplementary_recording",
|
||||
},
|
||||
{
|
||||
path: "/hazard_investigation/inspection_record/view",
|
||||
meta: {
|
||||
title: "检查记录",
|
||||
activeMenu: "/hazard_investigation/inspection_record",
|
||||
},
|
||||
component: "children",
|
||||
children: [
|
||||
{
|
||||
path: "",
|
||||
component: "hazard_investigation/inspection_record/view",
|
||||
},
|
||||
{
|
||||
path: "/hazard_investigation/inspection_record/view/hidden_danger",
|
||||
meta: {
|
||||
title: "隐患信息",
|
||||
activeMenu: "/hazard_investigation/inspection_record",
|
||||
},
|
||||
component:
|
||||
"hazard_investigation/inspection_record/hidden_danger",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
path: "/hazard_investigation/inspection_record/batch_printing",
|
||||
meta: {
|
||||
title: "批量打印",
|
||||
activeMenu: "/hazard_investigation/inspection_record",
|
||||
},
|
||||
component: "hazard_investigation/inspection_record/batch_printing",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
path: "/hazard_investigation/troubleshooting_plan",
|
||||
meta: { title: "排查计划", isSubMenu: false },
|
||||
component: "hazard_investigation/troubleshooting_plan/index",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
path: "/hidden_danger_government",
|
||||
redirect: "/hidden_danger_government/rectification",
|
||||
meta: { title: "隐患治理", model: MODEL["1"] },
|
||||
component: "children",
|
||||
children: [
|
||||
{
|
||||
path: "/hidden_danger_government/rectification",
|
||||
meta: { title: "隐患整改", isSubMenu: false },
|
||||
component: "children",
|
||||
children: [
|
||||
{
|
||||
path: "",
|
||||
component: "hidden_danger_government/rectification/index",
|
||||
},
|
||||
{
|
||||
path: "/hidden_danger_government/rectification/view",
|
||||
meta: {
|
||||
title: "查看",
|
||||
activeMenu: "/hidden_danger_government/rectification",
|
||||
},
|
||||
component: "hidden_danger_government/rectification/view",
|
||||
},
|
||||
{
|
||||
path: "/hidden_danger_government/rectification/rectification",
|
||||
meta: {
|
||||
title: "整改",
|
||||
activeMenu: "/hidden_danger_government/rectification",
|
||||
},
|
||||
component: "hidden_danger_government/rectification/rectification",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
path: "/hidden_danger_government/acceptance",
|
||||
meta: { title: "隐患验收", isSubMenu: false },
|
||||
component: "children",
|
||||
children: [
|
||||
{
|
||||
path: "",
|
||||
component: "hidden_danger_government/acceptance/index",
|
||||
},
|
||||
{
|
||||
path: "/hidden_danger_government/acceptance/view",
|
||||
meta: {
|
||||
title: "查看",
|
||||
activeMenu: "/hidden_danger_government/acceptance",
|
||||
},
|
||||
component: "hidden_danger_government/acceptance/view",
|
||||
},
|
||||
{
|
||||
path: "/hidden_danger_government/acceptance/acceptance",
|
||||
meta: {
|
||||
title: "验收",
|
||||
activeMenu: "/hidden_danger_government/acceptance",
|
||||
},
|
||||
component: "hidden_danger_government/acceptance/acceptance",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
path: "/hidden_danger_government/major",
|
||||
meta: { title: "重大隐患", isSubMenu: false },
|
||||
component: "children",
|
||||
children: [
|
||||
{
|
||||
path: "",
|
||||
component: "hidden_danger_government/major/index",
|
||||
},
|
||||
{
|
||||
path: "/hidden_danger_government/major/view",
|
||||
meta: {
|
||||
title: "查看",
|
||||
activeMenu: "/hidden_danger_government/major",
|
||||
},
|
||||
component: "hidden_danger_government/major/view",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
path: "/hidden_danger_government/ledger",
|
||||
meta: { title: "隐患台账", isSubMenu: false },
|
||||
component: "children",
|
||||
children: [
|
||||
{
|
||||
path: "",
|
||||
component: "hidden_danger_government/ledger/index",
|
||||
},
|
||||
{
|
||||
path: "/hidden_danger_government/ledger/add",
|
||||
meta: {
|
||||
title: "新增",
|
||||
activeMenu: "/hidden_danger_government/ledger",
|
||||
},
|
||||
component: "hidden_danger_government/ledger/add",
|
||||
},
|
||||
{
|
||||
path: "/hidden_danger_government/ledger/view",
|
||||
meta: {
|
||||
title: "查看",
|
||||
activeMenu: "/hidden_danger_government/ledger",
|
||||
},
|
||||
component: "hidden_danger_government/ledger/view",
|
||||
},
|
||||
{
|
||||
path: "/hidden_danger_government/ledger/print",
|
||||
meta: {
|
||||
title: "打印",
|
||||
activeMenu: "/hidden_danger_government/ledger",
|
||||
},
|
||||
component: "hidden_danger_government/ledger/print",
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
path: "/continuous_improvement",
|
||||
redirect: "/continuous_improvement/hazard_analysis",
|
||||
meta: { title: "持续改进", model: MODEL["1"] },
|
||||
component: "children",
|
||||
children: [
|
||||
{
|
||||
path: "/continuous_improvement/hazard_analysis",
|
||||
meta: { title: "隐患分析", isSubMenu: false },
|
||||
component: "children",
|
||||
children: [
|
||||
{
|
||||
path: "",
|
||||
component: "continuous_improvement/hazard_analysis/index",
|
||||
},
|
||||
{
|
||||
path: "/continuous_improvement/hazard_analysis/view",
|
||||
meta: {
|
||||
title: "查看",
|
||||
activeMenu: "/continuous_improvement/hazard_analysis",
|
||||
},
|
||||
component: "continuous_improvement/hazard_analysis/view",
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
|
|
|
@ -0,0 +1,45 @@
|
|||
import { ElLoading, ElMessage } from "element-plus";
|
||||
import dayjs from "dayjs";
|
||||
import axios from "axios";
|
||||
|
||||
export default function useDownloadBlob(
|
||||
url,
|
||||
option = {
|
||||
name: dayjs().format("YYYY-MM-DD HH:mm:ss"),
|
||||
type: "application/vnd.ms-excel",
|
||||
}
|
||||
) {
|
||||
return new Promise((resolve, reject) => {
|
||||
const loading = ElLoading.service({
|
||||
lock: true,
|
||||
text: "加载中...",
|
||||
background: "rgba(0, 0, 0, 0.5)",
|
||||
});
|
||||
axios
|
||||
.get(url, { responseType: "blob" })
|
||||
.then((resData) => {
|
||||
if (resData.data.type === "application/json") {
|
||||
throw new Error("导出失败");
|
||||
}
|
||||
const blob = new Blob([resData.data], {
|
||||
type: option.type,
|
||||
});
|
||||
const downloadElement = document.createElement("a");
|
||||
const href = window.URL.createObjectURL(blob);
|
||||
downloadElement.style.display = "none";
|
||||
downloadElement.href = href;
|
||||
downloadElement.download = option.name;
|
||||
document.body.appendChild(downloadElement);
|
||||
downloadElement.click();
|
||||
document.body.removeChild(downloadElement);
|
||||
window.URL.revokeObjectURL(href);
|
||||
loading.close();
|
||||
resolve(resData);
|
||||
})
|
||||
.catch((err) => {
|
||||
ElMessage.error("导出失败");
|
||||
loading.close();
|
||||
reject(err);
|
||||
});
|
||||
});
|
||||
}
|
|
@ -3,9 +3,10 @@ import { getDataType } from "@/assets/js/utils.js";
|
|||
|
||||
/**
|
||||
* @param api {Function} 接口函数
|
||||
* @param options {Object?: {callbackFn, otherParams, immediate, usePagination, key}} 配置项
|
||||
* @param options {Object?: {callbackFn, otherParams, defaultSearchForm, immediate, usePagination, key}} 配置项
|
||||
* @param options.callbackFn {Function?} 回调函数(返回值【第一个参数表格数据,第二个参数后台返回的所有数据】)
|
||||
* @param options.otherParams {Object?} 其它接口参数
|
||||
* @param options.defaultSearchForm {Object?} searchForm默认值
|
||||
* @param options.immediate {Boolean?} 是否立即执行接口函数(默认是)
|
||||
* @param options.usePagination {Boolean?} 是否使用分页(默认是)
|
||||
* @param options.key {String?} 返回的存放数组的key(默认varList)
|
||||
|
@ -22,26 +23,30 @@ export default function useListData(api, options = {}) {
|
|||
throw new Error("options.usePagination必须是一个布尔值");
|
||||
if (options.key && getDataType(options.key) !== "String")
|
||||
throw new Error("options.key必须是一个字符串");
|
||||
if (options.callbackFn && getDataType(options.callbackFn) !== "Function")
|
||||
throw new Error("options.callbackFn必须是一个函数");
|
||||
if (
|
||||
options.defaultSearchForm &&
|
||||
getDataType(options.defaultSearchForm) !== "Object"
|
||||
)
|
||||
throw new Error("options.defaultSearchForm必须是一个对象");
|
||||
const immediate = options.immediate ?? true;
|
||||
const usePagination = options.usePagination ?? true;
|
||||
const key = options.key ?? "varList";
|
||||
if (!immediate && options.otherParams)
|
||||
throw new Error("options.otherParams只有在immediate为true时才有效");
|
||||
const defaultSearchForm = options.defaultSearchForm ?? {};
|
||||
if (
|
||||
immediate &&
|
||||
options.otherParams &&
|
||||
getDataType(options.otherParams) !== "Object"
|
||||
)
|
||||
throw new Error("options.otherParams必须是一个对象");
|
||||
if (options.callbackFn && getDataType(options.callbackFn) !== "Function")
|
||||
throw new Error("options.callbackFn必须是一个函数");
|
||||
const list = ref([]);
|
||||
const pagination = ref({
|
||||
currentPage: 1,
|
||||
pageSize: 10,
|
||||
total: 0,
|
||||
});
|
||||
const searchForm = ref({});
|
||||
const searchForm = ref(defaultSearchForm);
|
||||
const tableRef = ref(null);
|
||||
const fnGetData = async (otherParams = {}) => {
|
||||
const resData = await api({
|
||||
|
|
|
@ -17,7 +17,6 @@ export default function usePrint() {
|
|||
elements = document.querySelectorAll("#printContent > table > tr");
|
||||
const thead = document.querySelector("#printContent > table thead");
|
||||
if (thead) A4_HEIGHT_PX = A4_HEIGHT_PX - thead.offsetHeight;
|
||||
else A4_HEIGHT_PX = A4_HEIGHT_PX + thead.offsetHeight;
|
||||
fnIsPaging();
|
||||
buttonRef.value.$el.click();
|
||||
};
|
||||
|
|
|
@ -35,6 +35,10 @@ const props = defineProps({
|
|||
type: String,
|
||||
default: "600px",
|
||||
},
|
||||
visible: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
});
|
||||
const visibility = useDocumentVisibility();
|
||||
onMounted(() => {
|
||||
|
@ -51,9 +55,9 @@ onMounted(() => {
|
|||
() => visibility.value,
|
||||
() => {
|
||||
if (visibility.value === "hidden") {
|
||||
pause();
|
||||
props.visible && pause();
|
||||
} else {
|
||||
play();
|
||||
props.visible && play();
|
||||
}
|
||||
},
|
||||
{
|
||||
|
|
|
@ -0,0 +1,351 @@
|
|||
<template>
|
||||
<el-row :gutter="24">
|
||||
<el-col
|
||||
:span="
|
||||
hiddenType === 'unqualified' || hiddenType === 'otherHidden' ? 12 : 24
|
||||
"
|
||||
>
|
||||
<el-form ref="formRef" :model="form" :rules="rules" label-width="100px">
|
||||
<el-row>
|
||||
<el-col :span="24" v-if="hiddenType === 'unqualified'">
|
||||
<el-form-item label="检查内容" prop="CHECK_CONTENT">
|
||||
<el-input
|
||||
:model-value="info.CHECK_CONTENT"
|
||||
disabled
|
||||
type="textarea"
|
||||
autosize
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="隐患部位" prop="HIDDENPART">
|
||||
<el-input
|
||||
v-model="form.HIDDENPART"
|
||||
placeholder="请输入内容"
|
||||
@blur="fnGetHiddenDangerDatabaseList"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="隐患描述" prop="HIDDENDESCR">
|
||||
<el-input
|
||||
v-model="form.HIDDENDESCR"
|
||||
placeholder="请输入内容"
|
||||
type="textarea"
|
||||
:autosize="{ minRows: 3 }"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="隐患级别" prop="HIDDENLEVEL">
|
||||
<el-select
|
||||
v-model="form.HIDDENLEVEL"
|
||||
@change="
|
||||
form.HIDDENLEVEL === 'hiddenLevel0002'
|
||||
? (form.RECTIFICATIONTYPE = '2')
|
||||
: null
|
||||
"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in hazardLevelList"
|
||||
:key="item.BIANMA"
|
||||
:label="item.NAME"
|
||||
:value="item.BIANMA"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24" v-if="info.BAO_BAO_TYPE === '1'">
|
||||
<el-form-item label="隐患类别" prop="HIDDEN_CATEGORY">
|
||||
<el-select v-model="form.HIDDEN_CATEGORY">
|
||||
<el-option
|
||||
v-for="item in hazardCategoriesList"
|
||||
:key="item.DICTIONARIES_ID"
|
||||
:label="item.NAME"
|
||||
:value="item.DICTIONARIES_ID"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="隐患类型" prop="HIDDENTYPE">
|
||||
<layout-hidden-danger-type
|
||||
v-model="form.HIDDENTYPE"
|
||||
ref="hiddenDangerTypeRef"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="隐患图片" prop="hiddenImgs">
|
||||
<layout-upload
|
||||
v-model:file-list="form.hiddenImgs"
|
||||
list-type="picture-card"
|
||||
accept=".jpg,.jpeg,.png"
|
||||
:limit="99"
|
||||
delete-to-server
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="隐患视频" prop="videoFiles">
|
||||
<layout-upload
|
||||
v-model:file-list="form.videoFiles"
|
||||
accept=".mp4"
|
||||
:size="50"
|
||||
@preview="fnVideoPreview"
|
||||
>
|
||||
<template #tip>只能上传mp4文件,且不超过50M</template>
|
||||
</layout-upload>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="隐患处置" prop="RECTIFICATIONTYPE">
|
||||
<el-radio-group v-model="form.RECTIFICATIONTYPE">
|
||||
<el-radio
|
||||
:disabled="form.HIDDENLEVEL === 'hiddenLevel0002'"
|
||||
label="1"
|
||||
>
|
||||
立即整改
|
||||
</el-radio>
|
||||
<el-radio label="2">限期整改</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<template v-if="form.RECTIFICATIONTYPE === '1'">
|
||||
<el-col :span="24">
|
||||
<el-form-item prop="RECTIFYDESCR" label="整改描述">
|
||||
<el-input
|
||||
v-model="form.RECTIFYDESCR"
|
||||
placeholder="请输入内容"
|
||||
type="textarea"
|
||||
:autosize="{ minRows: 3 }"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="整改后图片" prop="rectifyImgs">
|
||||
<layout-upload
|
||||
v-model:file-list="form.rectifyImgs"
|
||||
list-type="picture-card"
|
||||
accept=".jpg,.jpeg,.png"
|
||||
:limit="99"
|
||||
delete-to-server
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</template>
|
||||
<template v-if="form.RECTIFICATIONTYPE === '2'">
|
||||
<el-col :span="24">
|
||||
<el-form-item prop="RECTIFICATIONDEADLINE" label="整改期限">
|
||||
<el-date-picker
|
||||
v-model="form.RECTIFICATIONDEADLINE"
|
||||
format="YYYY-MM-DD"
|
||||
value-format="YYYY-MM-DD"
|
||||
type="date"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="整改部门" prop="RECTIFICATIONDEPT">
|
||||
<layout-department
|
||||
v-model="form.RECTIFICATIONDEPT"
|
||||
@update:model-value="form.RECTIFICATIONOR = ''"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="整改人" prop="RECTIFICATIONOR">
|
||||
<el-select v-model="form.RECTIFICATIONOR">
|
||||
<el-option
|
||||
v-for="item in data.rectifyUserList"
|
||||
:key="item.USER_ID"
|
||||
:label="item.NAME"
|
||||
:value="item.USER_ID"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</template>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</el-col>
|
||||
<el-col
|
||||
:span="12"
|
||||
v-if="hiddenType === 'unqualified' || hiddenType === 'otherHidden'"
|
||||
>
|
||||
<div
|
||||
v-for="item in data.list"
|
||||
:key="item.HIDDEN_LIBRARY_ID"
|
||||
class="item"
|
||||
@click="fnChoice(item)"
|
||||
>
|
||||
<el-descriptions :column="1" border>
|
||||
<el-descriptions-item label="风险单元名称">
|
||||
{{ item.RISK_UNIT_NAME }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="隐患部位">
|
||||
{{ item.HIDDEN_PART }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="隐患描述">
|
||||
{{ item.INSPECTION_BASIS }}
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<layout-video
|
||||
v-model:visible="data.videoDialog.visible"
|
||||
:src="data.videoDialog.src"
|
||||
/>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import LayoutDepartment from "@/components/department/index.vue";
|
||||
import LayoutHiddenDangerType from "@/components/hazard_type/index.vue";
|
||||
import LayoutUpload from "@/components/upload/index.vue";
|
||||
import LayoutVideo from "@/components/video/index.vue";
|
||||
import { reactive, ref, watchEffect } from "vue";
|
||||
import { useVModel } from "@vueuse/core";
|
||||
import { getHiddenDangerDatabaseList } from "@/request/hazard_investigation.js";
|
||||
import {
|
||||
layoutFnGetHazardCategories,
|
||||
layoutFnGetHazardLevel,
|
||||
} from "@/assets/js/data_dictionary.js";
|
||||
import { getUserListAll } from "@/request/data_dictionary.js";
|
||||
import useFormValidate from "@/assets/js/useFormValidate.js";
|
||||
|
||||
defineOptions({
|
||||
name: "LayoutHiddenAdd",
|
||||
});
|
||||
const props = defineProps({
|
||||
form: {
|
||||
type: Object,
|
||||
required: true,
|
||||
default: () => ({}),
|
||||
},
|
||||
info: {
|
||||
type: Object,
|
||||
default: () => ({}),
|
||||
},
|
||||
// unqualified 清单检查不合格隐患
|
||||
// otherHidden 清单检查其他隐患
|
||||
// ledger 隐患台账
|
||||
hiddenType: {
|
||||
type: String,
|
||||
required: true,
|
||||
default: "",
|
||||
},
|
||||
});
|
||||
const emits = defineEmits(["update:form"]);
|
||||
const form = useVModel(props, "form", emits);
|
||||
const rules = {
|
||||
HIDDENPART: [{ required: true, message: "请输入隐患部位", trigger: "blur" }],
|
||||
HIDDENDESCR: [{ required: true, message: "请输入隐患描述", trigger: "blur" }],
|
||||
HIDDENLEVEL: [
|
||||
{ required: true, message: "请选择隐患级别", trigger: "change" },
|
||||
],
|
||||
HIDDEN_CATEGORY: [
|
||||
{ required: true, message: "请选择隐患类别", trigger: "change" },
|
||||
],
|
||||
HIDDENTYPE: [
|
||||
{ required: true, message: "请选择隐患类型", trigger: "change" },
|
||||
],
|
||||
hiddenImgs: [
|
||||
{ required: true, message: "请上传隐患图片", trigger: "change" },
|
||||
],
|
||||
RECTIFICATIONTYPE: [
|
||||
{ required: true, message: "请选择隐患处置", trigger: "change" },
|
||||
],
|
||||
RECTIFYDESCR: [
|
||||
{ required: true, message: "请输入整改描述", trigger: "blur" },
|
||||
],
|
||||
rectifyImgs: [
|
||||
{ required: true, message: "请上传整改后图片", trigger: "change" },
|
||||
],
|
||||
RECTIFICATIONDEADLINE: [
|
||||
{ required: true, message: "请选择整改期限", trigger: "change" },
|
||||
],
|
||||
RECTIFICATIONDEPT: [
|
||||
{ required: true, message: "请选择整改部门", trigger: "change" },
|
||||
],
|
||||
RECTIFICATIONOR: [
|
||||
{ required: true, message: "请选择整改人", trigger: "change" },
|
||||
],
|
||||
};
|
||||
const formRef = ref(null);
|
||||
const hiddenDangerTypeRef = ref(null);
|
||||
const data = reactive({
|
||||
list: [],
|
||||
rectifyUserList: [],
|
||||
videoDialog: {
|
||||
visible: false,
|
||||
src: "",
|
||||
},
|
||||
});
|
||||
const fnVideoPreview = (event) => {
|
||||
if (event.url) {
|
||||
data.videoDialog.visible = true;
|
||||
data.videoDialog.src = event.url;
|
||||
}
|
||||
};
|
||||
const fnGetHiddenDangerDatabaseList = async () => {
|
||||
if (props.hiddenType !== "unqualified" && props.hiddenType !== "otherHidden")
|
||||
return;
|
||||
if (!form.value.HIDDENPART) return;
|
||||
const resData = await getHiddenDangerDatabaseList({
|
||||
RISK_UNIT_NAME: props.info.RISKUNITNAME,
|
||||
HIDDEN_PART: form.value.HIDDENPART,
|
||||
});
|
||||
data.list = resData.varList;
|
||||
};
|
||||
const fnChoice = (item) => {
|
||||
form.value.HIDDENPART = item.HIDDEN_PART;
|
||||
form.value.HIDDENDESCR = item.INSPECTION_BASIS;
|
||||
form.value.HIDDENLEVEL = "hiddenLevel0001";
|
||||
form.value.HIDDENTYPE = [
|
||||
item.HIDDEN_TYPE_ONE,
|
||||
item.HIDDEN_TYPE_TWO,
|
||||
item.HIDDEN_TYPE_THREE,
|
||||
];
|
||||
};
|
||||
const fnRectificationDepartmentChange = async (event) => {
|
||||
const resData = await getUserListAll({
|
||||
DEPARTMENT_ID: event,
|
||||
});
|
||||
data.rectifyUserList = resData.userList;
|
||||
};
|
||||
const fnReset = () => {
|
||||
formRef.value.resetFields();
|
||||
data.list = [];
|
||||
data.rectifyUserList = [];
|
||||
};
|
||||
const fnFormValidate = async () => {
|
||||
await useFormValidate(formRef);
|
||||
};
|
||||
const fnHiddenDangerTypeLabel = () => {
|
||||
return hiddenDangerTypeRef.value.getCheckedNodes();
|
||||
};
|
||||
defineExpose({
|
||||
reset: fnReset,
|
||||
formValidate: fnFormValidate,
|
||||
hiddenDangerTypeLabel: fnHiddenDangerTypeLabel,
|
||||
});
|
||||
const hazardLevelList = await layoutFnGetHazardLevel();
|
||||
const hazardCategoriesList = await layoutFnGetHazardCategories();
|
||||
watchEffect(() => {
|
||||
if (form.value.RECTIFICATIONDEPT)
|
||||
fnRectificationDepartmentChange(form.value.RECTIFICATIONDEPT);
|
||||
});
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.item {
|
||||
cursor: pointer;
|
||||
border-bottom: 1px dashed #ccc;
|
||||
padding: 10px 0;
|
||||
|
||||
&:first-child {
|
||||
padding-top: 0;
|
||||
}
|
||||
}
|
||||
</style>
|
|
@ -0,0 +1,289 @@
|
|||
<template>
|
||||
<div>
|
||||
<el-divider content-position="left">隐患信息</el-divider>
|
||||
<el-descriptions :column="1" border>
|
||||
<el-descriptions-item label="隐患来源">
|
||||
<span v-if="data.info.SOURCE === '1'"> 隐患快报 </span>
|
||||
<span v-else-if="data.info.SOURCE === '2'"> 隐患排查 </span>
|
||||
<span v-else-if="data.info.SOURCE === '3'"> 隐患排查 </span>
|
||||
</el-descriptions-item>
|
||||
<template v-if="data.info.SOURCE === '2'">
|
||||
<el-descriptions-item label="风险点(单元)">
|
||||
{{ data.info.RISK_UNIT }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="辨识部位">
|
||||
{{ data.info.IDENTIFICATION }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="存在风险">
|
||||
{{ data.info.RISK_DESCR }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="风险分级">
|
||||
{{ data.info.LEVEL }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="检查内容">
|
||||
{{ data.info.CHECK_CONTENT }}
|
||||
</el-descriptions-item>
|
||||
</template>
|
||||
<el-descriptions-item label="隐患级别">
|
||||
{{ data.info.HIDDENLEVELNAME }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="隐患类型">
|
||||
{{ data.info.HIDDENTYPE_NAME }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="隐患状态">
|
||||
<span v-if="data.info.STATE === '1'"> 未整改 </span>
|
||||
<span v-else-if="data.info.STATE === '3'"> 已整改 </span>
|
||||
<span v-else-if="data.info.STATE === '4'"> 已验收 </span>
|
||||
<span v-else-if="data.info.STATE === '-1'"> 已超期 </span>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="隐患描述">
|
||||
{{ data.info.HIDDENDESCR }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="隐患部位">
|
||||
{{ data.info.HIDDENPART }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="隐患发现部门">
|
||||
{{ data.info.HIDDENFINDDEPTNAME }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="发现人">
|
||||
{{ data.info.CREATORNAME }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="发现时间">
|
||||
{{ data.info.CREATTIME }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="整改类型">
|
||||
<span v-if="data.info.RECTIFICATIONTYPE === '1'"> 立即整改 </span>
|
||||
<span v-else-if="data.info.RECTIFICATIONTYPE === '2'"> 限期整改 </span>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item
|
||||
label="整改期限"
|
||||
v-if="data.info.RECTIFICATIONTYPE === '2'"
|
||||
>
|
||||
{{ data.info.RECTIFICATIONDEADLINE }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="隐患类别" v-if="data.info.HIDDEN_CATEGORY">
|
||||
{{ data.info.HIDDEN_CATEGORY_NAME }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="隐患图片">
|
||||
<img
|
||||
v-viewer
|
||||
v-for="item in data.hImgs"
|
||||
:key="item.IMGFILES_ID"
|
||||
:src="VITE_FILE_URL + item.FILEPATH"
|
||||
alt=""
|
||||
width="100"
|
||||
height="100"
|
||||
class="ml-10"
|
||||
/>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item
|
||||
label="隐患视频"
|
||||
v-if="data.videoDialog.src"
|
||||
class-name="print_no_use"
|
||||
label-class-name="print_no_use"
|
||||
>
|
||||
<el-icon
|
||||
size="30px"
|
||||
@click="data.videoDialog.visible = true"
|
||||
style="cursor: pointer"
|
||||
>
|
||||
<video-play />
|
||||
</el-icon>
|
||||
<layout-video
|
||||
v-model:visible="data.videoDialog.visible"
|
||||
:src="data.videoDialog.src"
|
||||
/>
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
<template v-if="data.info.STATE >= 2">
|
||||
<el-divider content-position="left">整改信息</el-divider>
|
||||
<el-descriptions :column="1" border>
|
||||
<el-descriptions-item label="整改描述">
|
||||
{{ data.info.RECTIFYDESCR }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="整改部门">
|
||||
{{ data.info.RECTIFICATIONDEPTNAME }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="整改人">
|
||||
{{ data.info.RECTIFICATIONORNAME }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="整改时间">
|
||||
{{ data.info.RECTIFICATIONTIME }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="整改后图片">
|
||||
<img
|
||||
v-viewer
|
||||
v-for="item in data.rImgs"
|
||||
:key="item.IMGFILES_ID"
|
||||
:src="VITE_FILE_URL + item.FILEPATH"
|
||||
alt=""
|
||||
width="100"
|
||||
height="100"
|
||||
class="ml-10"
|
||||
/>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="整改计划">
|
||||
{{ data.info.HAVEPLAN === "0" ? "无" : "" }}
|
||||
{{ data.info.HAVEPLAN === "1" ? "有" : "" }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item
|
||||
label="计划图片"
|
||||
v-if="data.info.HAVEPLAN === '1'"
|
||||
>
|
||||
<img
|
||||
v-viewer
|
||||
v-for="item in data.pImgs"
|
||||
:key="item.IMGFILES_ID"
|
||||
:src="VITE_FILE_URL + item.FILEPATH"
|
||||
alt=""
|
||||
width="100"
|
||||
height="100"
|
||||
class="ml-10"
|
||||
/>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item
|
||||
label="整改方案"
|
||||
v-if="data.info.RECTIFICATIONTYPE === '2'"
|
||||
>
|
||||
{{ data.info.HAVESCHEME === "0" ? "无" : "" }}
|
||||
{{ data.info.HAVESCHEME === "1" ? "有" : "" }}
|
||||
</el-descriptions-item>
|
||||
<template v-if="data.hs && data.info.HAVESCHEME === '1'">
|
||||
<el-descriptions-item label="排查日期">
|
||||
{{ data.hs.SCREENINGDATE }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="隐患清单">
|
||||
{{ data.hs.LISTNAME }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="治理标准要求">
|
||||
{{ data.hs.GOVERNSTANDARDS }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="治理方法">
|
||||
{{ data.hs.GOVERNMETHOD }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="经费和物资的落实">
|
||||
{{ data.hs.EXPENDITURE }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="负责治理人员">
|
||||
{{ data.hs.PRINCIPAL }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="工时安排">
|
||||
{{ data.hs.PROGRAMMING }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="时限要求">
|
||||
{{ data.hs.TIMELIMITFOR }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="工作要求">
|
||||
{{ data.hs.JOBREQUIREMENT }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="其他事项">
|
||||
{{ data.hs.OTHERBUSINESS }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="方案图片">
|
||||
<img
|
||||
v-viewer
|
||||
v-for="item in data.sImgs"
|
||||
:key="item.IMGFILES_ID"
|
||||
:src="VITE_FILE_URL + item.FILEPATH"
|
||||
alt=""
|
||||
width="100"
|
||||
height="100"
|
||||
class="ml-10"
|
||||
/>
|
||||
</el-descriptions-item>
|
||||
</template>
|
||||
</el-descriptions>
|
||||
</template>
|
||||
<template v-if="data.info.STATE >= 4 && data.checkList.length > 0">
|
||||
<el-divider content-position="left">验收信息</el-divider>
|
||||
<template v-for="(item, index) in data.checkList" :key="index">
|
||||
<el-descriptions :column="1" border class="mt-10">
|
||||
<el-descriptions-item label="验收描述">
|
||||
{{ item.CHECKDESCR }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="是否合格">
|
||||
<span v-if="item.STATUS === '1'"> 是 </span>
|
||||
<span v-else-if="item.STATUS === '0'"> 否 </span>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="验收部门">
|
||||
{{ item.CHECKDEPTNAME }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="验收人">
|
||||
{{ item.CHECKORNAME }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="验收时间">
|
||||
{{ item.CHECK_TIME }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="验收图片">
|
||||
<img
|
||||
v-viewer
|
||||
v-for="item1 in item.cImgs"
|
||||
:key="item1.IMGFILES_ID"
|
||||
:src="VITE_FILE_URL + item1.FILEPATH"
|
||||
alt=""
|
||||
width="100"
|
||||
height="100"
|
||||
class="ml-10"
|
||||
/>
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
</template>
|
||||
</template>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { reactive } 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";
|
||||
|
||||
defineOptions({
|
||||
name: "LayoutHiddenView",
|
||||
});
|
||||
const VITE_FILE_URL = import.meta.env.VITE_FILE_URL;
|
||||
const props = defineProps({
|
||||
hiddenId: {
|
||||
type: String,
|
||||
required: true,
|
||||
default: "",
|
||||
},
|
||||
});
|
||||
const emits = defineEmits(["throw-data"]);
|
||||
const data = reactive({
|
||||
info: {},
|
||||
hs: {},
|
||||
hImgs: [],
|
||||
rImgs: [],
|
||||
sImgs: [],
|
||||
pImgs: [],
|
||||
checkList: [],
|
||||
videoDialog: {
|
||||
src: "",
|
||||
visible: false,
|
||||
},
|
||||
});
|
||||
const fnGetData = async () => {
|
||||
const resData = await getHiddenDangerView({
|
||||
HIDDEN_ID: props.hiddenId,
|
||||
});
|
||||
data.info = resData.pd;
|
||||
data.hs = resData.hs;
|
||||
data.checkList = resData.checkList;
|
||||
for (let i = 0; i < resData.hImgs.length; i++) {
|
||||
if (getFileSuffix(resData.hImgs[i].FILEPATH) === "mp4") {
|
||||
data.videoDialog.src = VITE_FILE_URL + resData.hImgs[i].FILEPATH;
|
||||
} else {
|
||||
data.hImgs.push(resData.hImgs[i]);
|
||||
}
|
||||
}
|
||||
data.rImgs = resData.rImgs;
|
||||
data.sImgs = resData.sImgs;
|
||||
data.pImgs = resData.pImgs;
|
||||
emits("throw-data", data.info);
|
||||
};
|
||||
fnGetData();
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss"></style>
|
|
@ -22,7 +22,6 @@
|
|||
</template>
|
||||
|
||||
<script setup>
|
||||
import LayoutCard from "@/components/card/index.vue";
|
||||
import usePrint from "@/assets/js/usePrint.js";
|
||||
|
||||
defineOptions({
|
||||
|
|
|
@ -0,0 +1,387 @@
|
|||
<template>
|
||||
<el-form ref="formRef" :rules="rules" :model="form" label-width="240px">
|
||||
<el-row>
|
||||
<el-col :span="24" v-if="!infoIsEmpty">
|
||||
<el-form-item label="管控部门" prop="DEPTNAME">
|
||||
<el-input :model-value="info.DEPTNAME" disabled />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24" v-if="infoIsEmpty">
|
||||
<el-form-item label="管控部门" prop="DEPARTMENT_ID">
|
||||
<layout-department
|
||||
v-model="form.DEPARTMENT_ID"
|
||||
@update:model-value="fnDepartmentChange"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="管控责任人" prop="USER_ID">
|
||||
<el-input v-model="form.USER_ID" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<template v-if="!infoIsEmpty">
|
||||
<el-col :span="24">
|
||||
<el-form-item label="风险点(单元)" prop="RISKUNITNAME">
|
||||
<el-input :model-value="info.RISKUNITNAME" disabled />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="辨识部位" prop="PARTSNAME">
|
||||
<el-input :model-value="info.PARTSNAME" disabled />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</template>
|
||||
<template v-if="infoIsEmpty">
|
||||
<el-col :span="24">
|
||||
<el-form-item label="风险点(单元)" prop="RISK_UNIT_ID">
|
||||
<el-select v-model="form.RISK_UNIT_ID" @change="fnRiskUnitChange">
|
||||
<el-option
|
||||
v-for="item in unitList"
|
||||
:key="item.RISKUNIT_ID"
|
||||
:label="item.DEPT_NAME + '-' + item.RISKUNITNAME"
|
||||
:value="item.RISKUNIT_ID"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="辨识部位" prop="IDENTIFICATION_ID">
|
||||
<el-select v-model="form.IDENTIFICATION_ID">
|
||||
<el-option
|
||||
v-for="item in partsList"
|
||||
:key="item.IDENTIFICATIONPARTS_ID"
|
||||
:label="item.PARTSNAME"
|
||||
:value="item.IDENTIFICATIONPARTS_ID"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</template>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="存在风险" prop="RISK_DESCR">
|
||||
<el-input
|
||||
v-model="form.RISK_DESCR"
|
||||
type="textarea"
|
||||
:autosize="{
|
||||
minRows: 3,
|
||||
}"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="事故发生的可能性" prop="LIKELIHOOD">
|
||||
<el-select v-model="form.LIKELIHOOD">
|
||||
<el-option :value="10" label="完全可以预料" />
|
||||
<el-option :value="6" label="相当可能" />
|
||||
<el-option :value="3" label="可能,但不经常" />
|
||||
<el-option :value="1" label="可能性小,完全意外" />
|
||||
<el-option :value="0.5" label="很不可能,可以设想" />
|
||||
<el-option :value="0.2" label="极不可能" />
|
||||
<el-option :value="0.1" label="实际不可能" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="分值">
|
||||
{{ form.LIKELIHOOD }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="人员暴露于危险环境中的频繁程度" prop="EXPOSURE">
|
||||
<el-select v-model="form.EXPOSURE">
|
||||
<el-option :value="10" label="连续暴露" />
|
||||
<el-option :value="6" label="每天工作时间内暴露" />
|
||||
<el-option :value="3" label="每周一次或偶然暴露" />
|
||||
<el-option :value="2" label="每月一次暴露,完全意外" />
|
||||
<el-option :value="1" label="每年几次暴露" />
|
||||
<el-option :value="0.5" label="非常罕见暴露" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="分值">
|
||||
{{ form.EXPOSURE }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="一旦发生事故可能造成的后果" prop="CONSEQUENCE">
|
||||
<el-select v-model="form.CONSEQUENCE">
|
||||
<el-option :value="100" label="10人以上死亡" />
|
||||
<el-option :value="40" label="3~9人死亡" />
|
||||
<el-option :value="15" label="1~2人死亡" />
|
||||
<el-option :value="7" label="严重" />
|
||||
<el-option :value="3" label="重大,伤残" />
|
||||
<el-option :value="1" label="引人注意" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="分值">
|
||||
{{ form.CONSEQUENCE }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="风险分级" prop="LEVEL_NAME">
|
||||
{{ form.LEVEL_NAME }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="总分值" prop="DANGER">
|
||||
{{ form.DANGER }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="管控措施" prop="MEASURES">
|
||||
<el-input
|
||||
v-model="form.MEASURES"
|
||||
type="textarea"
|
||||
:autosize="{
|
||||
minRows: 3,
|
||||
}"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="事故类型" prop="ACCIDENTS">
|
||||
<el-select v-model="form.ACCIDENTS" multiple>
|
||||
<el-option
|
||||
v-for="item in accidentTypeList"
|
||||
:key="item.BIANMA"
|
||||
:label="item.NAME"
|
||||
:value="item.BIANMA"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="应急处置措施" prop="EME_MEASURES">
|
||||
<el-input
|
||||
v-model="form.EME_MEASURES"
|
||||
type="textarea"
|
||||
:autosize="{
|
||||
minRows: 3,
|
||||
}"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<template v-if="control">
|
||||
<el-col :span="24">
|
||||
<el-form-item label="管控措施分类1" prop="MANAGEMENT_CONTROL_ONE">
|
||||
<el-select
|
||||
v-model="form.MANAGEMENT_CONTROL_ONE"
|
||||
@change="form.MANAGEMENT_CONTROL_TWO = ''"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in controlList1"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="管控措施分类2" prop="MANAGEMENT_CONTROL_TWO">
|
||||
<el-select v-model="form.MANAGEMENT_CONTROL_TWO">
|
||||
<el-option
|
||||
v-for="item in controlList2"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="管控措施分类3" prop="MANAGEMENT_CONTROL_THREE">
|
||||
<el-input
|
||||
v-model="form.MANAGEMENT_CONTROL_THREE"
|
||||
type="textarea"
|
||||
:autosize="{
|
||||
minRows: 3,
|
||||
}"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</template>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref, watch, watchEffect } from "vue";
|
||||
import { useVModel } from "@vueuse/core";
|
||||
import {
|
||||
layoutFnGetAccidentType,
|
||||
layoutFnGetControlMeasures1,
|
||||
layoutFnGetControlMeasures2,
|
||||
} from "@/assets/js/data_dictionary.js";
|
||||
import useFormValidate from "@/assets/js/useFormValidate.js";
|
||||
import LayoutDepartment from "@/components/department/index.vue";
|
||||
import { isEmpty } from "lodash-es";
|
||||
import {
|
||||
getIdentifyingPartsListAll,
|
||||
getRiskPointListAllById,
|
||||
} from "@/request/risk_control.js";
|
||||
|
||||
defineOptions({
|
||||
name: "LayoutRiskAdd",
|
||||
});
|
||||
const props = defineProps({
|
||||
form: {
|
||||
type: Object,
|
||||
required: true,
|
||||
default: () => ({}),
|
||||
},
|
||||
info: {
|
||||
type: Object,
|
||||
default: () => ({}),
|
||||
},
|
||||
control: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
});
|
||||
const emits = defineEmits(["update:form"]);
|
||||
const form = useVModel(props, "form", emits);
|
||||
const rules = {
|
||||
USER_ID: [{ required: true, message: "管控责任人不能为空", trigger: "blur" }],
|
||||
RISK_DESCR: [
|
||||
{ required: true, message: "存在风险不能为空", trigger: "blur" },
|
||||
],
|
||||
LIKELIHOOD: [
|
||||
{ required: true, message: "事故发生的可能性不能为空", trigger: "change" },
|
||||
],
|
||||
EXPOSURE: [
|
||||
{
|
||||
required: true,
|
||||
message: "人员暴露于危险环境中的频繁程度不能为空",
|
||||
trigger: "change",
|
||||
},
|
||||
],
|
||||
CONSEQUENCE: [
|
||||
{
|
||||
required: true,
|
||||
message: "一旦发生事故可能造成的后果不能为空",
|
||||
trigger: "change",
|
||||
},
|
||||
],
|
||||
LEVEL_NAME: [
|
||||
{ required: true, message: "风险分级不能为空", trigger: "change" },
|
||||
],
|
||||
MEASURES: [{ required: true, message: "管控措施不能为空", trigger: "blur" }],
|
||||
EME_MEASURES: [
|
||||
{ required: true, message: "应急处置措施不能为空", trigger: "blur" },
|
||||
],
|
||||
ACCIDENTS: [
|
||||
{ required: true, message: "事故类型不能为空", trigger: "change" },
|
||||
],
|
||||
DEPARTMENT_ID: [
|
||||
{ required: true, message: "部门不能为空", trigger: "change" },
|
||||
],
|
||||
RISK_UNIT_ID: [
|
||||
{ required: true, message: "风险点(单元)不能为空", trigger: "change" },
|
||||
],
|
||||
IDENTIFICATION_ID: [
|
||||
{ required: true, message: "辨识部位不能为空", trigger: "change" },
|
||||
],
|
||||
};
|
||||
const formRef = ref(null);
|
||||
const infoIsEmpty = ref(isEmpty(props.info));
|
||||
const unitList = ref([]);
|
||||
const partsList = ref([]);
|
||||
const controlList2 = ref([]);
|
||||
const fnGetLevelName = (LIKELIHOOD, EXPOSURE, CONSEQUENCE) => {
|
||||
const DANGER = (LIKELIHOOD * EXPOSURE * CONSEQUENCE).toFixed(2);
|
||||
if (DANGER > 320) {
|
||||
form.value.LEVELID = "levelA";
|
||||
form.value.LEVEL_NAME = "重大风险/A级";
|
||||
} else if (DANGER > 160) {
|
||||
form.value.LEVELID = "levelB";
|
||||
form.value.LEVEL_NAME = "较大风险/B级";
|
||||
} else if (DANGER > 70) {
|
||||
form.value.LEVELID = "levelC";
|
||||
form.value.LEVEL_NAME = "一般风险/C级";
|
||||
} else {
|
||||
form.value.LEVELID = "levelD";
|
||||
form.value.LEVEL_NAME = "低风险/D级";
|
||||
}
|
||||
form.value.DANGER = DANGER;
|
||||
};
|
||||
watch(
|
||||
[
|
||||
() => props.form.LIKELIHOOD,
|
||||
() => props.form.EXPOSURE,
|
||||
() => props.form.CONSEQUENCE,
|
||||
],
|
||||
([LIKELIHOOD, EXPOSURE, CONSEQUENCE]) => {
|
||||
if (!LIKELIHOOD || !EXPOSURE || !CONSEQUENCE) return;
|
||||
fnGetLevelName(LIKELIHOOD, EXPOSURE, CONSEQUENCE);
|
||||
}
|
||||
);
|
||||
const fnGetUnitList = async () => {
|
||||
const resData = await getRiskPointListAllById({
|
||||
DEPARTMENT_ID: form.value.DEPARTMENT_ID,
|
||||
});
|
||||
unitList.value = resData.unitList;
|
||||
};
|
||||
const fnGetPartsList = async () => {
|
||||
const resData = await getIdentifyingPartsListAll({
|
||||
RISK_UNIT_ID: form.value.RISK_UNIT_ID,
|
||||
});
|
||||
partsList.value = resData.partsList;
|
||||
};
|
||||
const fnControlList1Change = () => {
|
||||
controlList2.value = [];
|
||||
const id = form.value.MANAGEMENT_CONTROL_ONE;
|
||||
let BZ = "";
|
||||
for (let i = 0; i < controlList1.value.length; i++) {
|
||||
if (controlList1.value[i].id === id) {
|
||||
BZ = controlList1.value[i].BZ;
|
||||
break;
|
||||
}
|
||||
}
|
||||
for (let i = 0; i < controlList2All.value.length; i++) {
|
||||
if (controlList2All.value[i].TBFIELD === BZ) {
|
||||
controlList2.value.push(controlList2All.value[i]);
|
||||
}
|
||||
}
|
||||
};
|
||||
const fnDepartmentChange = () => {
|
||||
form.value.RISK_UNIT_ID = "";
|
||||
form.value.IDENTIFICATION_ID = "";
|
||||
unitList.value = [];
|
||||
partsList.value = [];
|
||||
};
|
||||
const fnRiskUnitChange = () => {
|
||||
form.value.IDENTIFICATION_ID = "";
|
||||
partsList.value = [];
|
||||
};
|
||||
watchEffect(() => {
|
||||
if (form.value.DEPARTMENT_ID) fnGetUnitList();
|
||||
if (form.value.RISK_UNIT_ID) fnGetPartsList();
|
||||
if (form.value.MANAGEMENT_CONTROL_ONE) fnControlList1Change();
|
||||
});
|
||||
const fnReset = () => {
|
||||
formRef.value.resetFields();
|
||||
};
|
||||
const fnFormValidate = async () => {
|
||||
await useFormValidate(formRef);
|
||||
};
|
||||
const fnAccidentsName = () => {
|
||||
return accidentTypeList.value
|
||||
.filter((item) => form.value.ACCIDENTS.includes(item.BIANMA))
|
||||
.map((item) => item.NAME)
|
||||
.join(",");
|
||||
};
|
||||
defineExpose({
|
||||
reset: fnReset,
|
||||
formValidate: fnFormValidate,
|
||||
accidentsName: fnAccidentsName,
|
||||
});
|
||||
const accidentTypeList = await layoutFnGetAccidentType();
|
||||
const controlList1 = props.control && (await layoutFnGetControlMeasures1());
|
||||
const controlList2All = props.control && (await layoutFnGetControlMeasures2());
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss"></style>
|
|
@ -5,6 +5,7 @@
|
|||
:vid="vid"
|
||||
:play-auth="playAuth"
|
||||
ref="playerRef"
|
||||
:visible="visible"
|
||||
/>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
|
|
@ -114,7 +114,7 @@ const fnGetInfo = async () => {
|
|||
data.avatar = FILE_URL + resData.userPhoto;
|
||||
} catch {
|
||||
data.avatar = new URL(
|
||||
"../../../assets/images/public/tx.png",
|
||||
"../../assets/images/public/tx.png",
|
||||
import.meta.url
|
||||
).href;
|
||||
}
|
|
@ -32,9 +32,9 @@
|
|||
</template>
|
||||
|
||||
<script setup>
|
||||
import LayoutBreadcrumb from "@/components/layout/breadcrumb/index";
|
||||
import LayoutHeader from "@/components/layout/header/index";
|
||||
import LayoutMenu from "@/components/layout/menu/index";
|
||||
import LayoutBreadcrumb from "./breadcrumb/index";
|
||||
import LayoutHeader from "./header/index";
|
||||
import LayoutMenu from "./menu/index";
|
||||
import { computed } from "vue";
|
||||
import { useMenuStore } from "@/pinia/menu";
|
||||
import { useRoute } from "vue-router";
|
|
@ -46,7 +46,6 @@ axios.interceptors.response.use(
|
|||
return config;
|
||||
},
|
||||
(error) => {
|
||||
console.log(error);
|
||||
if (error && error.response) {
|
||||
switch (error.response.status) {
|
||||
case 0:
|
||||
|
|
|
@ -38,15 +38,31 @@ export const getInventoryTroubleshootingOtherHiddenList = (params) =>
|
|||
post("/hidden/getOtherHidden", params); // 清单排查其它隐患列表
|
||||
export const getHiddenDangerDatabaseList = (params) =>
|
||||
post("/hiddenLibrary/list", params); // 隐患数据库列表
|
||||
export const setInventoryTroubleshootingOtherHiddenDangerAdd = (params) =>
|
||||
post("/hidden/add", params); // 清单排查其它隐患添加
|
||||
export const getInventoryTroubleshootingOtherHiddenDangerView = (params) =>
|
||||
post("/hidden/goEdit", params); // 清单排查其它隐患查看
|
||||
export const setInventoryTroubleshootingOtherHiddenDangerDelete = (params) =>
|
||||
post("/hidden/delete", params); // 清单排查其它隐患删除
|
||||
export const setInventoryTroubleshootingOtherHiddenDangerEdit = (params) =>
|
||||
post("/hidden/edit", params); // 清单排查其它隐患修改
|
||||
export const setInventoryTroubleshootingOtherHiddenDangerListAdd = (params) =>
|
||||
export const setHiddenDangerAdd = (params) => post("/hidden/add", params); // 清单排查其它隐患添加
|
||||
export const getHiddenDangerView = (params) => post("/hidden/goEdit", params); // 清单排查其它隐患查看
|
||||
export const setHiddenDangerDelete = (params) => post("/hidden/delete", params); // 清单排查其它隐患删除
|
||||
export const setHiddenDangerEdit = (params) => post("/hidden/edit", params); // 清单排查其它隐患修改
|
||||
export const setHiddenDangerListAdd = (params) =>
|
||||
post("/hidden/listAdd", params); // 清单排查其它隐患添加
|
||||
export const setInventoryTroubleshootingSubmit = (params) =>
|
||||
post("/checkrecord/add", params); // 清单排查提交
|
||||
export const getChecklistInspectionStatusList = (params) =>
|
||||
post("/listmanager/recordList", params); // 清单检查情况列表
|
||||
export const getChecklistInspectionStatusRecordList = (params) =>
|
||||
post("/checkrecord/list", params); // 清单检查情况检查记录列表
|
||||
export const setChecklistInspectionStatusRecordDelete = (params) =>
|
||||
post("/checkrecord/delete", params); // 清单检查情况检查记录删除
|
||||
export const setChecklistInspectionStatusRecordSupplementaryRecordingSubmit = (
|
||||
params
|
||||
) => post("/checkrecord/recording", params); // 清单检查情况检查记录补录提交
|
||||
export const getChecklistInspectionStatusRecordView = (params) =>
|
||||
post("/checkrecord/goEdit", params); // 清单检查情况检查记录查看
|
||||
export const getChecklistInspectionStatusRecordViewOtherHiddenDangerList = (
|
||||
params
|
||||
) => post("/hidden/getCheckHidden", params); // 清单检查情况检查记录查看其它隐患列表
|
||||
export const getChecklistInspectionStatusRecordMap = (params) =>
|
||||
post("/checkrecord/goMap", params); // 清单检查情况检查记录查看地图
|
||||
export const getInspectionRecordList = (params) =>
|
||||
post("/checkrecord/allList", params); // 检查记录管理列表
|
||||
export const getTroubleshootingPlanList = (params) =>
|
||||
post("/listmanager/checkPlan", params); // 排查计划列表
|
||||
|
|
|
@ -0,0 +1,17 @@
|
|||
import { post, upload } from "@/request/axios.js";
|
||||
|
||||
export const getHiddenDangerList = (params) => post("/hidden/list", params); // 隐患列表
|
||||
export const getHiddenDangerRectificationWhy = (params) =>
|
||||
post("/app/corpinfo/goqyzzh", params); // 隐患整改不知道在获取什么
|
||||
export const setHiddenDangerRectificationNormalSubmit = (params) =>
|
||||
upload("/hidden/rectify", params); // 隐患整改正常整改提交
|
||||
export const setHiddenDangerRectificationAbnormalSubmit = (params) =>
|
||||
post("/hidden/editRec", params); // 隐患整改不正常整改提交
|
||||
export const setHiddenDangerAcceptSubmit = (params) =>
|
||||
post("/hidden/check", params); // 隐患验证提交
|
||||
export const setHiddenDangerCancelMajorHazards = (params) =>
|
||||
post("/hidden/editHIDDENLEVEL", params); // 重大隐患管理取消重大隐患
|
||||
export const setHiddenDangerConfirmMajorHazards = (params) =>
|
||||
post("/hidden/editISCONFIRM", params); // 重大隐患管理确认重大隐患
|
||||
export const getHiddenDangerPrintList = (params) =>
|
||||
post("/hidden/listAllToPrint", params); // 隐患打印列表
|
|
@ -1,5 +1,5 @@
|
|||
import { createRouter, createWebHashHistory } from "vue-router";
|
||||
import layout from "../components/layout/index.vue";
|
||||
import layout from "../layout/index.vue";
|
||||
// import children from "../components/children/index.vue";
|
||||
|
||||
const routes = [
|
||||
|
|
|
@ -22,7 +22,6 @@
|
|||
</layout-card>
|
||||
</template>
|
||||
<script setup>
|
||||
import LayoutTable from "@/components/table/index.vue";
|
||||
import ArchivesPdf from "./components/archives_pdf.vue";
|
||||
import Capital from "./components/capital.vue";
|
||||
import Edumanager from "./components/edumanager.vue";
|
||||
|
|
|
@ -155,7 +155,6 @@ import {
|
|||
import { reactive } from "vue";
|
||||
import { useVModels } from "@vueuse/core";
|
||||
import { useUserStore } from "@/pinia/user.js";
|
||||
import LayoutTable from "@/components/table/index.vue";
|
||||
import { serialNumber } from "@/assets/js/utils.js";
|
||||
import CapitalForm from "./capital_form.vue";
|
||||
import { ElMessageBox } from "element-plus";
|
||||
|
|
|
@ -124,7 +124,6 @@ import {
|
|||
import { reactive } from "vue";
|
||||
import { useVModels } from "@vueuse/core";
|
||||
import { useUserStore } from "@/pinia/user.js";
|
||||
import LayoutTable from "@/components/table/index.vue";
|
||||
import { serialNumber } from "@/assets/js/utils.js";
|
||||
import EdumanagerForm from "./edumanager_form.vue";
|
||||
import { ElMessageBox } from "element-plus";
|
||||
|
|
|
@ -127,7 +127,6 @@ import {
|
|||
import { reactive } from "vue";
|
||||
import { useVModels } from "@vueuse/core";
|
||||
import { useUserStore } from "@/pinia/user.js";
|
||||
import LayoutTable from "@/components/table/index.vue";
|
||||
import { serialNumber } from "@/assets/js/utils.js";
|
||||
import EduplanForm from "./eduplan_form.vue";
|
||||
import { ElMessageBox } from "element-plus";
|
||||
|
|
|
@ -104,7 +104,6 @@ import {
|
|||
import { reactive } from "vue";
|
||||
import { useVModels } from "@vueuse/core";
|
||||
import { useUserStore } from "@/pinia/user.js";
|
||||
import LayoutTable from "@/components/table/index.vue";
|
||||
import { serialNumber } from "@/assets/js/utils.js";
|
||||
import PostmanForm from "./postman_form.vue";
|
||||
import { ElMessageBox } from "element-plus";
|
||||
|
|
|
@ -119,7 +119,6 @@ import {
|
|||
import { reactive } from "vue";
|
||||
import { useVModels } from "@vueuse/core";
|
||||
import { useUserStore } from "@/pinia/user.js";
|
||||
import LayoutTable from "@/components/table/index.vue";
|
||||
import { serialNumber } from "@/assets/js/utils.js";
|
||||
import TeacherForm from "./teacher_form.vue";
|
||||
import { ElMessageBox } from "element-plus";
|
||||
|
|
|
@ -175,7 +175,6 @@ import {
|
|||
} from "@/request/archives.js";
|
||||
import { computed, reactive } from "vue";
|
||||
import { useVModels } from "@vueuse/core";
|
||||
import LayoutTable from "@/components/table/index.vue";
|
||||
import { useUserStore } from "@/pinia/user.js";
|
||||
import { serialNumber } from "@/assets/js/utils.js";
|
||||
import { PRINT_STYLE } from "@/assets/js/constant.js";
|
||||
|
|
|
@ -88,7 +88,6 @@ import {
|
|||
} from "@/request/archives.js";
|
||||
import { computed, reactive } from "vue";
|
||||
import { useVModels } from "@vueuse/core";
|
||||
import LayoutTable from "@/components/table/index.vue";
|
||||
import { PRINT_STYLE } from "@/assets/js/constant.js";
|
||||
|
||||
const props = defineProps({
|
||||
|
|
|
@ -135,7 +135,6 @@ import {
|
|||
import { reactive } from "vue";
|
||||
import { useVModels } from "@vueuse/core";
|
||||
import { useUserStore } from "@/pinia/user.js";
|
||||
import LayoutTable from "@/components/table/index.vue";
|
||||
import { serialNumber } from "@/assets/js/utils.js";
|
||||
import TrainingScheduleForm from "./training_schedule_form.vue";
|
||||
import { ElMessageBox } from "element-plus";
|
||||
|
|
|
@ -117,8 +117,6 @@
|
|||
import { reactive } from "vue";
|
||||
import useListData from "@/assets/js/useListData.js";
|
||||
import { getTaskList } from "@/request/archives.js";
|
||||
import LayoutCard from "@/components/card/index.vue";
|
||||
import LayoutTable from "@/components/table/index.vue";
|
||||
import { serialNumber } from "@/assets/js/utils.js";
|
||||
import { useRouter } from "vue-router";
|
||||
|
||||
|
|
|
@ -152,8 +152,6 @@
|
|||
</template>
|
||||
|
||||
<script setup>
|
||||
import LayoutTable from "@/components/table/index.vue";
|
||||
import LayoutCard from "@/components/card/index.vue";
|
||||
import { getTaskListByUser } from "@/request/archives.js";
|
||||
import useListData from "@/assets/js/useListData.js";
|
||||
import { reactive } from "vue";
|
||||
|
|
|
@ -95,9 +95,7 @@
|
|||
|
||||
<script setup>
|
||||
import { nextTick, reactive } from "vue";
|
||||
import LayoutTable from "@/components/table/index";
|
||||
import { serialNumber } from "@/assets/js/utils";
|
||||
import LayoutCard from "@/components/card/index.vue";
|
||||
import {
|
||||
getLedgerList,
|
||||
setLedgerDelete,
|
||||
|
|
|
@ -0,0 +1,172 @@
|
|||
<template>
|
||||
<div>
|
||||
<el-card>
|
||||
<el-form
|
||||
:model="searchForm"
|
||||
label-width="100px"
|
||||
@submit.prevent="fnResetPaginationTransfer"
|
||||
>
|
||||
<el-row>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="隐患描述" prop="KEYWORDS">
|
||||
<el-input v-model="searchForm.KEYWORDS" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="发现日期" prop="dates">
|
||||
<el-date-picker
|
||||
v-model="searchForm.dates"
|
||||
type="daterange"
|
||||
value-format="YYYY-MM-DD"
|
||||
format="YYYY-MM-DD"
|
||||
range-separator="至"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="隐患发现人" prop="CREATORNAME">
|
||||
<el-input v-model="searchForm.CREATORNAME" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="部门" prop="DEPTIDS">
|
||||
<layout-department
|
||||
v-model="searchForm.DEPTIDS"
|
||||
multiple
|
||||
show-checkbox
|
||||
collapse-tags
|
||||
root-disabled="Y"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="隐患级别" prop="HIDDENLEVEL">
|
||||
<el-select v-model="searchForm.HIDDENLEVEL">
|
||||
<el-option
|
||||
v-for="item in hazardLevelList"
|
||||
:key="item.BIANMA"
|
||||
:label="item.NAME"
|
||||
:value="item.BIANMA"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label-width="10px">
|
||||
<el-button type="primary" native-type="submit">搜索</el-button>
|
||||
<el-button native-type="reset" @click="fnResetPaginationTransfer">
|
||||
重置
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</el-card>
|
||||
<layout-card>
|
||||
<layout-table
|
||||
:data="list"
|
||||
@get-data="fnGetDataTransfer"
|
||||
v-model:pagination="pagination"
|
||||
>
|
||||
<el-table-column label="序号" width="60">
|
||||
<template #default="{ $index }">
|
||||
{{ serialNumber(pagination, $index) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="HIDDENDESCR"
|
||||
label="隐患描述"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column label="隐患处置" width="100">
|
||||
<template v-slot="{ row }">
|
||||
<span v-if="row.RECTIFICATIONTYPE === '1'">立即整改</span>
|
||||
<span v-else-if="row.RECTIFICATIONTYPE === '2'">限期整改</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="HIDDENLEVELNAME" label="隐患级别" width="120" />
|
||||
<el-table-column label="隐患状态" width="100">
|
||||
<template v-slot="{ row }">
|
||||
{{ translationStatus(row.STATE, stateList) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="CREATTIME" label="发现时间" width="160" />
|
||||
<el-table-column prop="CREATORNAME" label="发现人" width="100" />
|
||||
<el-table-column
|
||||
prop="RECTIFICATIONTIME"
|
||||
label="整改时间"
|
||||
width="160"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="RECTIFICATIONORNAME"
|
||||
label="整改人"
|
||||
width="100"
|
||||
/>
|
||||
<el-table-column label="验收人" width="100">
|
||||
<template v-slot="{ row }">
|
||||
<span v-if="row.RECTIFICATIONTYPE === '2'">
|
||||
{{ row.CHECKNAME }}
|
||||
</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" width="100">
|
||||
<template #default="{ row }">
|
||||
<el-button
|
||||
type="primary"
|
||||
text
|
||||
link
|
||||
@click="
|
||||
router.push({
|
||||
path: '/continuous_improvement/hazard_analysis/view',
|
||||
query: { HIDDEN_ID: row.HIDDEN_ID },
|
||||
})
|
||||
"
|
||||
>
|
||||
查看
|
||||
</el-button>
|
||||
<el-button type="primary" text link> 分析 </el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</layout-table>
|
||||
</layout-card>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { useRouter } from "vue-router";
|
||||
import { serialNumber, translationStatus } from "@/assets/js/utils";
|
||||
import useListData from "@/assets/js/useListData.js";
|
||||
import LayoutDepartment from "@/components/department/index.vue";
|
||||
import { getHiddenDangerList } from "@/request/hidden_danger_government.js";
|
||||
import { layoutFnGetHazardLevel } from "@/assets/js/data_dictionary.js";
|
||||
|
||||
const stateList = [
|
||||
{ NAME: "未整改", ID: "1" },
|
||||
{ NAME: "已整改", ID: "2" },
|
||||
{ NAME: "已整改", ID: "3" },
|
||||
{ NAME: "已验收", ID: "4" },
|
||||
{ NAME: "已过期", ID: "-1" },
|
||||
];
|
||||
const router = useRouter();
|
||||
const { list, pagination, searchForm, fnGetData, fnResetPagination } =
|
||||
useListData(getHiddenDangerList, {
|
||||
otherParams: { STATE: 4, DISPOSESTATE: "-1", ANALYSIS: 1 },
|
||||
});
|
||||
const fnGetDataTransfer = () => {
|
||||
fnGetData({
|
||||
STARTTIME: searchForm.value.dates?.[0],
|
||||
ENDTIME: searchForm.value.dates?.[1],
|
||||
DEPTIDS: searchForm.value.DEPTIDS?.join(","),
|
||||
});
|
||||
};
|
||||
const fnResetPaginationTransfer = () => {
|
||||
fnResetPagination({
|
||||
STARTTIME: searchForm.value.dates?.[0],
|
||||
ENDTIME: searchForm.value.dates?.[1],
|
||||
DEPTIDS: searchForm.value.DEPTIDS?.join(","),
|
||||
});
|
||||
};
|
||||
const hazardLevelList = await layoutFnGetHazardLevel();
|
||||
</script>
|
||||
|
||||
<style scoped></style>
|
|
@ -0,0 +1,9 @@
|
|||
<template>
|
||||
<hidden-view print />
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import HiddenView from "@/views/hazard_investigation/checklist_inspection_status/hidden_danger_view.vue";
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss"></style>
|
|
@ -45,7 +45,6 @@
|
|||
</template>
|
||||
|
||||
<script setup>
|
||||
import LayoutCard from "@/components/card/index.vue";
|
||||
import LayoutUpload from "@/components/upload/index.vue";
|
||||
import { reactive, ref } from "vue";
|
||||
import {
|
||||
|
|
|
@ -29,7 +29,6 @@
|
|||
</template>
|
||||
|
||||
<script setup>
|
||||
import LayoutCard from "@/components/card/index.vue";
|
||||
import { getIndustryQualificationsView } from "@/request/enterprise_management.js";
|
||||
import { ref } from "vue";
|
||||
import { useRoute } from "vue-router";
|
||||
|
|
|
@ -0,0 +1,111 @@
|
|||
<template>
|
||||
<el-dialog title="请选择位置" v-model="visible">
|
||||
<el-form label-position="right" label-width="50px">
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="坐标">
|
||||
<el-input disabled :model-value="currentLongitude || longitude" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label-width="10px">
|
||||
<el-input disabled :model-value="currentLatitude || latitude" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<div
|
||||
v-loading="loading"
|
||||
element-loading-text="地图正在加载中..."
|
||||
element-loading-background="rgba(0, 0, 0, 0.5)"
|
||||
>
|
||||
<div style="width: 100%; height: 500px" id="map_container" />
|
||||
</div>
|
||||
<template #footer>
|
||||
<el-button @click="fnClose">取消</el-button>
|
||||
<el-button type="primary" @click="fnConfirm">确定</el-button>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { useVModels } from "@vueuse/core";
|
||||
import { nextTick, onBeforeUnmount, ref, watch } from "vue";
|
||||
|
||||
let mapInstance;
|
||||
const props = defineProps({
|
||||
visible: {
|
||||
type: Boolean,
|
||||
required: true,
|
||||
default: false,
|
||||
},
|
||||
longitude: {
|
||||
type: [Number, String],
|
||||
required: true,
|
||||
default: "",
|
||||
},
|
||||
latitude: {
|
||||
type: [Number, String],
|
||||
required: true,
|
||||
default: "",
|
||||
},
|
||||
});
|
||||
const emits = defineEmits([
|
||||
"update:visible",
|
||||
"update:longitude",
|
||||
"update:latitude",
|
||||
]);
|
||||
const { visible, longitude, latitude } = useVModels(props, emits);
|
||||
const loading = ref(false);
|
||||
const currentLongitude = ref("");
|
||||
const currentLatitude = ref("");
|
||||
const fnMapInit = async () => {
|
||||
loading.value = true;
|
||||
await nextTick();
|
||||
mapInstance = new window.BMapGL.Map("map_container");
|
||||
mapInstance.centerAndZoom(
|
||||
new window.BMapGL.Point(
|
||||
props.longitude || "116.3972282409668",
|
||||
props.latitude || "39.90960456049752"
|
||||
),
|
||||
16
|
||||
);
|
||||
mapInstance.enableScrollWheelZoom(true);
|
||||
mapInstance.setMapStyleV2({
|
||||
styleId: "6f501abeb2a0cc0d961d110b9407b127",
|
||||
});
|
||||
loading.value = false;
|
||||
mapInstance.addEventListener("click", function (event) {
|
||||
currentLatitude.value = event.latlng.lat;
|
||||
currentLongitude.value = event.latlng.lng;
|
||||
});
|
||||
};
|
||||
const fnClose = () => {
|
||||
visible.value = false;
|
||||
};
|
||||
const fnConfirm = () => {
|
||||
latitude.value = currentLatitude.value;
|
||||
longitude.value = currentLongitude.value;
|
||||
fnClose();
|
||||
};
|
||||
const stop = watch(
|
||||
() => props.visible,
|
||||
(val) => {
|
||||
if (val && !mapInstance) {
|
||||
fnMapInit();
|
||||
stop && stop();
|
||||
}
|
||||
},
|
||||
{
|
||||
immediate: true,
|
||||
}
|
||||
);
|
||||
onBeforeUnmount(() => {
|
||||
if (mapInstance) {
|
||||
mapInstance.destroy();
|
||||
mapInstance = null;
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss"></style>
|
|
@ -106,7 +106,7 @@
|
|||
<el-button
|
||||
type="primary"
|
||||
class="ml-10"
|
||||
@click="fnMapDialogVisible"
|
||||
@click="data.mapDialogVisible = true"
|
||||
>
|
||||
地图定位
|
||||
</el-button>
|
||||
|
@ -427,38 +427,16 @@
|
|||
<el-button type="primary" @click="fnSubmit">确 定</el-button>
|
||||
</div>
|
||||
</layout-card>
|
||||
<el-dialog title="请选择位置" v-model="data.mapDialog.visible">
|
||||
<el-form label-position="right" label-width="50px">
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="坐标">
|
||||
<el-input disabled v-model="data.mapDialog.lng" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label-width="10px">
|
||||
<el-input disabled v-model="data.mapDialog.lat" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<div
|
||||
v-loading="data.mapDialog.loading"
|
||||
element-loading-text="地图正在加载中..."
|
||||
element-loading-background="rgba(0, 0, 0, 0.5)"
|
||||
>
|
||||
<div style="width: 100%; height: 500px" id="map_container" />
|
||||
</div>
|
||||
<template #footer>
|
||||
<el-button @click="fnMapDialogVisible">取消</el-button>
|
||||
<el-button type="primary" @click="fnMapDialogConfirm">确定</el-button>
|
||||
</template>
|
||||
</el-dialog>
|
||||
<map-dialog
|
||||
v-model:visible="data.mapDialogVisible"
|
||||
v-model:latitude="data.form.LATITUDE"
|
||||
v-model:longitude="data.form.LONGITUDE"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { nextTick, onBeforeUnmount, reactive, ref } from "vue";
|
||||
import { reactive, ref } from "vue";
|
||||
import LayoutTerritory from "@/components/territory/index.vue";
|
||||
import LayoutRegulatoryType from "@/components/regulatory_type/index.vue";
|
||||
import LayoutIndustry from "@/components/industry/index.vue";
|
||||
|
@ -479,8 +457,8 @@ import {
|
|||
setEnterpriseInfo,
|
||||
} from "@/request/enterprise_management.js";
|
||||
import { addingPrefixToFile } from "@/assets/js/utils.js";
|
||||
import MapDialog from "./components/map.vue";
|
||||
|
||||
let mapInstance;
|
||||
const router = useRouter();
|
||||
const formRef = ref(null);
|
||||
const territoryCascaderRef = ref(null);
|
||||
|
@ -608,12 +586,7 @@ const data = reactive({
|
|||
WHETHER_LIQUIDAMMONIA: "",
|
||||
WHETHER_PIPELINE: "",
|
||||
},
|
||||
mapDialog: {
|
||||
visible: false,
|
||||
loading: true,
|
||||
lat: "",
|
||||
lng: "",
|
||||
},
|
||||
mapDialogVisible: false,
|
||||
});
|
||||
const fnGetData = async () => {
|
||||
const resData = await getEnterpriseInfo();
|
||||
|
@ -627,39 +600,6 @@ fnGetData();
|
|||
const enterpriseStatus = await layoutFnGetEnterpriseStatus();
|
||||
const subordination = await layoutFnGetSubordination();
|
||||
const enterpriseScale = await layoutFnGetEnterpriseScale();
|
||||
const fnMapInit = () => {
|
||||
mapInstance = new window.BMapGL.Map("map_container");
|
||||
mapInstance.centerAndZoom(
|
||||
new window.BMapGL.Point(
|
||||
data.form.LONGITUDE || "116.3972282409668",
|
||||
data.form.LATITUDE || "39.90960456049752"
|
||||
),
|
||||
16
|
||||
);
|
||||
mapInstance.enableScrollWheelZoom(true);
|
||||
mapInstance.setMapStyleV2({
|
||||
styleId: "6f501abeb2a0cc0d961d110b9407b127",
|
||||
});
|
||||
data.mapDialog.loading = false;
|
||||
mapInstance.addEventListener("click", function (event) {
|
||||
data.mapDialog.lat = event.latlng.lat;
|
||||
data.mapDialog.lng = event.latlng.lng;
|
||||
});
|
||||
};
|
||||
const fnMapDialogVisible = async () => {
|
||||
data.mapDialog.visible = !data.mapDialog.visible;
|
||||
data.mapDialog.lat = data.form.LATITUDE;
|
||||
data.mapDialog.lng = data.form.LONGITUDE;
|
||||
if (!mapInstance) {
|
||||
await nextTick();
|
||||
fnMapInit();
|
||||
}
|
||||
};
|
||||
const fnMapDialogConfirm = () => {
|
||||
data.form.LATITUDE = data.mapDialog.lat;
|
||||
data.form.LONGITUDE = data.mapDialog.lng;
|
||||
fnMapDialogVisible();
|
||||
};
|
||||
const fnProhibitSelect = () => {
|
||||
ElMessage.error("请联系管理员制作3D图");
|
||||
data.form.FOURTYPE = 1;
|
||||
|
@ -708,12 +648,6 @@ const fnSubmit = debounce(
|
|||
},
|
||||
{ atBegin: true }
|
||||
);
|
||||
onBeforeUnmount(() => {
|
||||
if (mapInstance) {
|
||||
mapInstance.destroy();
|
||||
mapInstance = null;
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss"></style>
|
||||
|
|
|
@ -0,0 +1,276 @@
|
|||
<template>
|
||||
<div>
|
||||
<el-divider content-position="left">清单信息</el-divider>
|
||||
<el-descriptions border :column="2">
|
||||
<el-descriptions-item label="清单名称">
|
||||
{{ info.LIST_NAME }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="排查清单类型">
|
||||
{{ info.SCREENTYPENAME }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item
|
||||
:label="info.BAO_BAO_TYPE === '1' ? '包保责任人' : '检查人'"
|
||||
>
|
||||
{{ info.USERS }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="检查时间">
|
||||
{{ info.CHECK_TIME }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item
|
||||
:label="info.BAO_BAO_TYPE === '1' ? '包保责任人部门' : '所属部门'"
|
||||
>
|
||||
{{ info.DEPARTMENT_NAME }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item
|
||||
:label="info.BAO_BAO_TYPE === '1' ? '包保责任人岗位' : '所属岗位'"
|
||||
>
|
||||
{{ info.POST_NAME }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="排查周期">
|
||||
{{ info.PERIODNAME }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="清单类型">
|
||||
{{ info.TYPENAME }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item
|
||||
label="排查日期"
|
||||
v-if="info.LISTTYPE === 'listType0006'"
|
||||
>
|
||||
{{ info.START_DATE }} - {{ info.END_DATE }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="补录原因" :span="2" v-if="info.REASON">
|
||||
{{ info.REASON }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item
|
||||
label="地图"
|
||||
:span="2"
|
||||
class-name="print_no_use"
|
||||
label-class-name="print_no_use"
|
||||
v-if="entrance"
|
||||
>
|
||||
<el-button @click="data.mapDialogVisible = true">
|
||||
<icon-international
|
||||
theme="outline"
|
||||
size="18"
|
||||
fill="#0694f4"
|
||||
:strokeWidth="3"
|
||||
/>
|
||||
</el-button>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="签字" :span="2">
|
||||
<img
|
||||
v-if="qianming"
|
||||
:src="qianming"
|
||||
style="width: 200px; height: 97px"
|
||||
/>
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
<el-divider content-position="left">检查内容</el-divider>
|
||||
<div class="print_no_use">
|
||||
<layout-table :data="inspectionList" :show-pagination="false">
|
||||
<el-table-column label="序号" width="70" type="index" />
|
||||
<el-table-column prop="RISKUNITNAME" label="风险点(单元)" />
|
||||
<el-table-column prop="PARTSNAME" label="辨识部位" />
|
||||
<el-table-column prop="RISK_DESCR" label="存在风险" />
|
||||
<el-table-column prop="DNAME5" label="风险分级" />
|
||||
<el-table-column prop="CHECK_CONTENT" label="检查内容" />
|
||||
<el-table-column label="状态" width="100">
|
||||
<template v-slot="{ row }">
|
||||
<template v-if="row.ISNORMAL === 0">
|
||||
<el-button
|
||||
v-if="row.IMGCOUNT > 0"
|
||||
type="primary"
|
||||
text
|
||||
link
|
||||
@click="entrance && fnQualified(row.RECORDITEM_ID)"
|
||||
>
|
||||
合格
|
||||
</el-button>
|
||||
<div v-else>合格</div>
|
||||
</template>
|
||||
<el-button
|
||||
v-else-if="row.ISNORMAL === 1"
|
||||
type="primary"
|
||||
text
|
||||
link
|
||||
@click="
|
||||
entrance &&
|
||||
router.push({
|
||||
path: hiddenPath[entrance],
|
||||
query: { HIDDEN_ID: row.HIDDEN_ID },
|
||||
})
|
||||
"
|
||||
>
|
||||
不合格
|
||||
</el-button>
|
||||
<div v-else-if="row.ISNORMAL === 2">不涉及</div>
|
||||
<div v-else>存在未整改隐患</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</layout-table>
|
||||
</div>
|
||||
<table class="print_use">
|
||||
<tr>
|
||||
<th width="55">序号</th>
|
||||
<th width="125">风险点(单元)</th>
|
||||
<th width="100">辨识部位</th>
|
||||
<th>存在风险</th>
|
||||
<th width="120">风险分级</th>
|
||||
<th>检查内容</th>
|
||||
<th width="100">状态</th>
|
||||
</tr>
|
||||
<tr v-for="(item, index) in inspectionList" :key="index">
|
||||
<td>{{ index + 1 }}</td>
|
||||
<td>{{ item.RISKUNITNAME }}</td>
|
||||
<td>{{ item.PARTSNAME }}</td>
|
||||
<td>{{ item.RISK_DESCR }}</td>
|
||||
<td>{{ item.LEVEL_NAME }}</td>
|
||||
<td>{{ item.CHECK_CONTENT }}</td>
|
||||
<template v-if="item.ISNORMAL === 0">
|
||||
<template v-if="item.IMGCOUNT > 0">
|
||||
<td>
|
||||
<el-button type="primary" text link> 合格 </el-button>
|
||||
</td>
|
||||
</template>
|
||||
<template v-else>
|
||||
<td>合格</td>
|
||||
</template>
|
||||
</template>
|
||||
<template v-else-if="item.ISNORMAL === 1">
|
||||
<td>
|
||||
<el-button type="primary" text link> 不合格 </el-button>
|
||||
</td>
|
||||
</template>
|
||||
<template v-else-if="item.ISNORMAL === 2">
|
||||
<td>不涉及</td>
|
||||
</template>
|
||||
<template v-else>
|
||||
<td>存在未整改隐患</td>
|
||||
</template>
|
||||
</tr>
|
||||
</table>
|
||||
<el-divider content-position="left">其他隐患</el-divider>
|
||||
<div class="print_no_use">
|
||||
<layout-table :data="otherHiddenList" :show-pagination="false">
|
||||
<el-table-column label="序号" width="70" type="index" />
|
||||
<el-table-column prop="HIDDENDESCR" label="隐患描述" />
|
||||
<el-table-column label="操作" width="100" v-if="entrance">
|
||||
<template v-slot="{ row }">
|
||||
<el-button
|
||||
type="primary"
|
||||
text
|
||||
link
|
||||
@click="
|
||||
router.push({
|
||||
path: hiddenPath[entrance],
|
||||
query: { HIDDEN_ID: row.HIDDEN_ID },
|
||||
})
|
||||
"
|
||||
>
|
||||
查看
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</layout-table>
|
||||
</div>
|
||||
<table class="print_use">
|
||||
<tr>
|
||||
<th width="55">序号</th>
|
||||
<th>隐患描述</th>
|
||||
</tr>
|
||||
<tr v-for="(item, index) in otherHiddenList" :key="index">
|
||||
<td>{{ index + 1 }}</td>
|
||||
<td>{{ item.HIDDENDESCR }}</td>
|
||||
</tr>
|
||||
</table>
|
||||
<qualified
|
||||
v-model:visible="data.qualifiedDialog.visible"
|
||||
:file="data.qualifiedDialog.file"
|
||||
/>
|
||||
<map-dialog
|
||||
v-model:visible="data.mapDialogVisible"
|
||||
:id="checkRecordId"
|
||||
:list="inspectionList"
|
||||
/>
|
||||
<div v-html="PRINT_STYLE" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { useRouter } from "vue-router";
|
||||
import { reactive, ref } from "vue";
|
||||
import {
|
||||
getChecklistInspectionStatusRecordView,
|
||||
getChecklistInspectionStatusRecordViewOtherHiddenDangerList,
|
||||
} from "@/request/hazard_investigation.js";
|
||||
import { getViewImg } from "@/request/api.js";
|
||||
import { PRINT_STYLE } from "@/assets/js/constant.js";
|
||||
import useListData from "@/assets/js/useListData.js";
|
||||
import { addingPrefixToFile } from "@/assets/js/utils.js";
|
||||
import Qualified from "./qualified.vue";
|
||||
import MapDialog from "./map.vue";
|
||||
|
||||
// entrance:
|
||||
// checklist_inspection_status 清单检查情况
|
||||
// inspection_record 检查记录管理
|
||||
// 空为批量打印
|
||||
const props = defineProps({
|
||||
entrance: {
|
||||
type: String,
|
||||
default: "",
|
||||
},
|
||||
checkRecordId: {
|
||||
type: String,
|
||||
required: true,
|
||||
default: "",
|
||||
},
|
||||
});
|
||||
const hiddenPath = {
|
||||
checklist_inspection_status:
|
||||
"/hazard_investigation/checklist_inspection_status/inspection_record/view/hidden_danger",
|
||||
inspection_record:
|
||||
"/hazard_investigation/inspection_record/view/hidden_danger",
|
||||
};
|
||||
const router = useRouter();
|
||||
const VITE_FILE_URL = import.meta.env.VITE_FILE_URL;
|
||||
const info = ref({});
|
||||
const qianming = ref("");
|
||||
const data = reactive({
|
||||
qualifiedDialog: {
|
||||
visible: false,
|
||||
file: [],
|
||||
},
|
||||
mapDialogVisible: false,
|
||||
});
|
||||
const { list: inspectionList } = useListData(
|
||||
getChecklistInspectionStatusRecordView,
|
||||
{
|
||||
otherParams: { CHECKRECORD_ID: props.checkRecordId },
|
||||
usePagination: false,
|
||||
callbackFn: (list, resData) => {
|
||||
info.value = resData.pd;
|
||||
if (resData.qianming && resData.qianming.length > 0) {
|
||||
qianming.value = VITE_FILE_URL + resData.qianming[0].FILEPATH;
|
||||
}
|
||||
},
|
||||
}
|
||||
);
|
||||
const { list: otherHiddenList } = useListData(
|
||||
getChecklistInspectionStatusRecordViewOtherHiddenDangerList,
|
||||
{
|
||||
otherParams: { CHECKRECORD_ID: props.checkRecordId },
|
||||
usePagination: false,
|
||||
key: "hiddenList",
|
||||
}
|
||||
);
|
||||
const fnQualified = async (RECORDITEM_ID) => {
|
||||
const resData = await getViewImg({
|
||||
FOREIGN_KEY: RECORDITEM_ID,
|
||||
TYPE: "14",
|
||||
});
|
||||
data.qualifiedDialog.file = addingPrefixToFile(resData.imgs);
|
||||
data.qualifiedDialog.visible = true;
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss"></style>
|
|
@ -0,0 +1,129 @@
|
|||
<template>
|
||||
<el-dialog v-model="visible" title="地图">
|
||||
<div
|
||||
v-loading="loading"
|
||||
element-loading-text="地图正在加载中..."
|
||||
element-loading-background="rgba(0, 0, 0, 0.5)"
|
||||
>
|
||||
<div id="map_container" style="width: 100%; height: 500px" />
|
||||
</div>
|
||||
<template #footer>
|
||||
<el-button @click="visible = false">关闭</el-button>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { useVModel } from "@vueuse/core";
|
||||
import { nextTick, onBeforeUnmount, ref, watch } from "vue";
|
||||
import { getChecklistInspectionStatusRecordMap } from "@/request/hazard_investigation.js";
|
||||
|
||||
const aPng = new URL("/src/assets/images/map/h.png", import.meta.url).href;
|
||||
const bPng = new URL("/src/assets/images/map/50.png", import.meta.url).href;
|
||||
let mapInstance;
|
||||
const props = defineProps({
|
||||
visible: {
|
||||
type: Boolean,
|
||||
required: true,
|
||||
default: false,
|
||||
},
|
||||
id: {
|
||||
type: String,
|
||||
required: true,
|
||||
default: "",
|
||||
},
|
||||
list: {
|
||||
type: Array,
|
||||
required: true,
|
||||
default: () => [],
|
||||
},
|
||||
});
|
||||
const emits = defineEmits(["update:visible"]);
|
||||
const visible = useVModel(props, "visible", emits);
|
||||
const loading = ref(false);
|
||||
|
||||
const fnMapInit = async () => {
|
||||
loading.value = true;
|
||||
await nextTick();
|
||||
const resData = await getChecklistInspectionStatusRecordMap({
|
||||
CHECKRECORD_ID: props.id,
|
||||
});
|
||||
mapInstance = new window.BMapGL.Map("map_container");
|
||||
mapInstance.centerAndZoom(
|
||||
new window.BMapGL.Point(
|
||||
resData.cinfo.LONGITUDE || "116.3972282409668",
|
||||
resData.cinfo.LATITUDE || "39.90960456049752"
|
||||
),
|
||||
16
|
||||
);
|
||||
mapInstance.enableScrollWheelZoom(true);
|
||||
mapInstance.setMapStyleV2({
|
||||
styleId: "6f501abeb2a0cc0d961d110b9407b127",
|
||||
});
|
||||
loading.value = false;
|
||||
mapInstance && mapInstance.clearOverlays();
|
||||
fnAddPoint(resData);
|
||||
};
|
||||
const fnAddPoint = (info) => {
|
||||
for (let i = 0; i < info.varList.length; i++) {
|
||||
const point = new window.BMapGL.Point(
|
||||
props.list[i].LONGITUDE,
|
||||
props.list[i].LATITUDE
|
||||
);
|
||||
const deviceSize = new window.BMapGL.Size(23, 24);
|
||||
const deviceIcon = new window.BMapGL.Icon(bPng, deviceSize, {
|
||||
imageSize: deviceSize,
|
||||
});
|
||||
const marker = new window.BMapGL.Marker(point, {
|
||||
icon: deviceIcon,
|
||||
});
|
||||
mapInstance.addOverlay(marker);
|
||||
}
|
||||
for (let i = 0; i < info.hdList.length; i++) {
|
||||
const point = new window.BMapGL.Point(
|
||||
info.hdList[i].LONGITUDE,
|
||||
info.hdList[i].LATITUDE
|
||||
);
|
||||
const deviceSize = new window.BMapGL.Size(23, 24);
|
||||
const deviceIcon = new window.BMapGL.Icon(aPng, deviceSize, {
|
||||
imageSize: deviceSize,
|
||||
});
|
||||
const marker = new window.BMapGL.Marker(point, {
|
||||
icon: deviceIcon,
|
||||
});
|
||||
mapInstance.addOverlay(marker);
|
||||
}
|
||||
const point = new window.BMapGL.Point(
|
||||
info.checkrecord.LONGITUDE,
|
||||
info.checkrecord.LATITUDE
|
||||
);
|
||||
const deviceSize = new window.BMapGL.Size(23, 24);
|
||||
const deviceIcon = new window.BMapGL.Icon(aPng, deviceSize, {
|
||||
imageSize: deviceSize,
|
||||
});
|
||||
const marker = new window.BMapGL.Marker(point, {
|
||||
icon: deviceIcon,
|
||||
});
|
||||
mapInstance.addOverlay(marker);
|
||||
};
|
||||
const stop = watch(
|
||||
() => props.visible,
|
||||
(val) => {
|
||||
if (val && !mapInstance) {
|
||||
fnMapInit();
|
||||
stop && stop();
|
||||
}
|
||||
},
|
||||
{
|
||||
immediate: true,
|
||||
}
|
||||
);
|
||||
onBeforeUnmount(() => {
|
||||
if (mapInstance) {
|
||||
mapInstance.destroy();
|
||||
mapInstance = null;
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss"></style>
|
|
@ -0,0 +1,42 @@
|
|||
<template>
|
||||
<el-dialog v-model="visible" title="检查照片">
|
||||
<el-descriptions border :column="1">
|
||||
<el-descriptions-item label="检查照片">
|
||||
<img
|
||||
v-viewer
|
||||
v-for="item in file"
|
||||
:key="item.url"
|
||||
:src="item.url"
|
||||
alt=""
|
||||
class="ml-10"
|
||||
width="100"
|
||||
height="100"
|
||||
/>
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
<template #footer>
|
||||
<el-button @click="visible = false">关闭</el-button>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { useVModel } from "@vueuse/core";
|
||||
|
||||
const props = defineProps({
|
||||
visible: {
|
||||
type: Boolean,
|
||||
required: true,
|
||||
default: false,
|
||||
},
|
||||
file: {
|
||||
type: Array,
|
||||
required: true,
|
||||
default: () => [],
|
||||
},
|
||||
});
|
||||
const emits = defineEmits(["update:visible"]);
|
||||
const visible = useVModel(props, "visible", emits);
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss"></style>
|
|
@ -0,0 +1,26 @@
|
|||
<template>
|
||||
<layout-card>
|
||||
<div id="printContent">
|
||||
<layout-hidden-view :hidden-id="HIDDEN_ID" />
|
||||
</div>
|
||||
<div class="tc mt-10" v-if="print">
|
||||
<el-button type="primary" v-print="'#printContent'">打印</el-button>
|
||||
</div>
|
||||
</layout-card>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import LayoutHiddenView from "@/components/hidden_view/index.vue";
|
||||
import { useRoute } from "vue-router";
|
||||
|
||||
const route = useRoute();
|
||||
const { HIDDEN_ID } = route.query;
|
||||
defineProps({
|
||||
print: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
});
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss"></style>
|
|
@ -0,0 +1,262 @@
|
|||
<template>
|
||||
<div>
|
||||
<el-card>
|
||||
<el-form
|
||||
:model="searchForm"
|
||||
label-width="130px"
|
||||
@submit.prevent="fnResetPaginationTransfer"
|
||||
>
|
||||
<el-row>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="清单名称" prop="KEYWORDS">
|
||||
<el-input
|
||||
v-model="searchForm.KEYWORDS"
|
||||
placeholder="请输入关键字"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="周期内检查状态" prop="STATUS">
|
||||
<el-select v-model="searchForm.STATUS">
|
||||
<el-option label="未检查" value="0" />
|
||||
<el-option label="已检查" value="1" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="是否存在隐患项" prop="HASHIDDEN">
|
||||
<el-select v-model="searchForm.HASHIDDEN">
|
||||
<el-option label="无隐患" value="0" />
|
||||
<el-option label="有隐患" value="1" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="是否有超期记录" prop="OVERTIME">
|
||||
<el-select v-model="searchForm.OVERTIME">
|
||||
<el-option label="无超期" value="0" />
|
||||
<el-option label="有超期" value="1" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="人员" prop="USERNAME">
|
||||
<el-input
|
||||
v-model="searchForm.USERNAME"
|
||||
placeholder="请输入关键字"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="清单类型" prop="TYPE">
|
||||
<el-select v-model="searchForm.TYPE">
|
||||
<el-option
|
||||
v-for="item in inventoryTypeList"
|
||||
:key="item.BIANMA"
|
||||
:label="item.NAME"
|
||||
:value="item.BIANMA"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="排查周期" prop="PERIOD">
|
||||
<el-select v-model="searchForm.PERIOD">
|
||||
<el-option
|
||||
v-for="item in troubleshootingCycleList"
|
||||
:key="item.BIANMA"
|
||||
:label="item.NAME"
|
||||
:value="item.BIANMA"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="清单级别" prop="LISTINGLEVEL">
|
||||
<el-select v-model="searchForm.LISTINGLEVEL">
|
||||
<el-option
|
||||
v-for="item in [
|
||||
{ BIANMA: '1', NAME: '公司' },
|
||||
...inventoryLevelList,
|
||||
]"
|
||||
:key="item.BIANMA"
|
||||
:label="item.NAME"
|
||||
:value="item.BIANMA"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="部门" prop="DEPTIDS">
|
||||
<layout-department
|
||||
v-model="searchForm.DEPTIDS"
|
||||
multiple
|
||||
show-checkbox
|
||||
collapse-tags
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="清单状态" prop="ISDELETE">
|
||||
<el-select v-model="searchForm.ISDELETE">
|
||||
<el-option label="启用" value="0" />
|
||||
<el-option label="禁用" value="1" />
|
||||
<el-option label="已删除" value="2" />
|
||||
<el-option label="彻底删除" value="-1" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="在岗状态" prop="WORKSTATUS">
|
||||
<el-select v-model="searchForm.WORKSTATUS">
|
||||
<el-option label="在岗" value="0" />
|
||||
<el-option label="离岗" value="1" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label-width="10px">
|
||||
<el-button type="primary" native-type="submit">搜索</el-button>
|
||||
<el-button native-type="reset" @click="fnResetPaginationTransfer">
|
||||
重置
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</el-card>
|
||||
<layout-card>
|
||||
<layout-table
|
||||
:data="list"
|
||||
v-model:pagination="pagination"
|
||||
@get-data="fnGetDataTransfer"
|
||||
>
|
||||
<el-table-column label="序号" width="70">
|
||||
<template v-slot="{ $index }">
|
||||
{{ serialNumber(pagination, $index) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="NAME" label="清单名称" />
|
||||
<el-table-column prop="DEPARTMENT_NAME_ALL" label="部门" />
|
||||
<el-table-column prop="POST_NAME" label="岗位" />
|
||||
<el-table-column
|
||||
prop="USER_NAME"
|
||||
label="人员"
|
||||
width="90"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column label="在岗状态" width="90">
|
||||
<template v-slot="{ row }">
|
||||
{{ fnGetStatus(row.STARTTIME, row.ENDTIME, row.WORKSTATUS) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="PERIODNAME" label="排查周期" width="90" />
|
||||
<el-table-column label="周期" width="260">
|
||||
<template v-slot="{ row }">
|
||||
<span v-if="row.DATESTART && row.DATEEND">
|
||||
{{ row.DATESTART }}-{{ row.DATEEND }}
|
||||
</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="count" label="检查次数" width="90" />
|
||||
<el-table-column prop="hiddenCount" label="隐患数" width="90" />
|
||||
<el-table-column label="周期内次数" width="120" show-overflow-tooltip>
|
||||
<template v-slot="{ row }">
|
||||
<span :class="{ 'text-red': row.checkCount === 0 }">
|
||||
{{ row.checkCount }}/1
|
||||
</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="TYPENAME" label="清单类型" width="90" />
|
||||
<el-table-column
|
||||
v-if="SPECIAL_ENTERPRISES.includes(CORPINFO_ID)"
|
||||
label="是否包保责任人任务"
|
||||
width="90"
|
||||
>
|
||||
<template v-slot="{ row }">
|
||||
<span v-if="row.BAO_BAO_TYPE !== '1'"> 否 </span>
|
||||
<span v-if="row.BAO_BAO_TYPE === '1'"> 是 </span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="清单状态" width="90">
|
||||
<template v-slot="{ row }">
|
||||
<span class="text-green" v-if="row.ISDELETE === '0'">启用</span>
|
||||
<span class="text-red" v-else-if="row.ISDELETE === '1'">禁用</span>
|
||||
<span v-else-if="row.ISDELETE === '2'"> 已删除 </span>
|
||||
<span v-else-if="row.ISDELETE === '-1'"> 彻底删除 </span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" width="100">
|
||||
<template v-slot="{ row }">
|
||||
<el-button
|
||||
type="primary"
|
||||
text
|
||||
link
|
||||
@click="
|
||||
router.push({
|
||||
path: '/hazard_investigation/checklist_inspection_status/inspection_record',
|
||||
query: {
|
||||
LISTMANAGER_ID: row.LISTMANAGER_ID,
|
||||
},
|
||||
})
|
||||
"
|
||||
>
|
||||
检查记录
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</layout-table>
|
||||
</layout-card>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { serialNumber } from "@/assets/js/utils.js";
|
||||
import useListData from "@/assets/js/useListData.js";
|
||||
import LayoutDepartment from "@/components/department/index.vue";
|
||||
import {
|
||||
layoutFnGetInventoryLevel,
|
||||
layoutFnGetInventoryType,
|
||||
layoutFnGetTroubleshootingCycle,
|
||||
} from "@/assets/js/data_dictionary.js";
|
||||
import { getChecklistInspectionStatusList } from "@/request/hazard_investigation.js";
|
||||
import { useRouter } from "vue-router";
|
||||
import { SPECIAL_ENTERPRISES } from "@/assets/js/constant.js";
|
||||
import { useUserStore } from "@/pinia/user.js";
|
||||
import dayjs from "dayjs";
|
||||
|
||||
const router = useRouter();
|
||||
const userStore = useUserStore();
|
||||
const CORPINFO_ID = userStore.getUserInfo.CORPINFO_ID;
|
||||
const { list, pagination, searchForm, fnGetData, fnResetPagination } =
|
||||
useListData(getChecklistInspectionStatusList);
|
||||
const troubleshootingCycleList = await layoutFnGetTroubleshootingCycle();
|
||||
const inventoryLevelList = await layoutFnGetInventoryLevel();
|
||||
const inventoryTypeList = await layoutFnGetInventoryType();
|
||||
const fnGetDataTransfer = () => {
|
||||
fnGetData({
|
||||
DEPTIDS: searchForm.value.DEPTIDS?.join(","),
|
||||
});
|
||||
};
|
||||
const fnResetPaginationTransfer = () => {
|
||||
fnResetPagination({
|
||||
DEPTIDS: searchForm.value.DEPTIDS?.join(","),
|
||||
});
|
||||
};
|
||||
const fnGetStatus = (STARTTIME, ENDTIME, WORKSTATUS) => {
|
||||
if (!STARTTIME || !ENDTIME) {
|
||||
return "在岗";
|
||||
}
|
||||
if (
|
||||
dayjs(dayjs().format("YYYY-MM-DD")).diff(dayjs(STARTTIME), "days") >= 0 &&
|
||||
dayjs(dayjs().format("YYYY-MM-DD")).diff(dayjs(ENDTIME), "days") <= 0
|
||||
) {
|
||||
return "离岗";
|
||||
} else {
|
||||
if (WORKSTATUS === 2) return "离岗";
|
||||
return "在岗";
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped></style>
|
|
@ -0,0 +1,181 @@
|
|||
<template>
|
||||
<div>
|
||||
<el-card>
|
||||
<el-form
|
||||
:model="searchForm"
|
||||
label-width="80px"
|
||||
@submit.prevent="fnResetPaginationTransfer"
|
||||
>
|
||||
<el-row>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="检查周期" prop="dates">
|
||||
<el-date-picker
|
||||
v-model="searchForm.dates"
|
||||
type="daterange"
|
||||
value-format="YYYY-MM-DD"
|
||||
format="YYYY-MM-DD"
|
||||
range-separator="至"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="检查状态" prop="TYPE">
|
||||
<el-select v-model="searchForm.TYPE">
|
||||
<el-option label="已检查" value="1" />
|
||||
<el-option label="超期未检查" value="2" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-form-item label-width="10px">
|
||||
<el-button type="primary" native-type="submit">搜索</el-button>
|
||||
<el-button native-type="reset" @click="fnResetPaginationTransfer">
|
||||
重置
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</el-card>
|
||||
<layout-card>
|
||||
<layout-table
|
||||
:data="list"
|
||||
@get-data="fnGetDataTransfer"
|
||||
v-model:pagination="pagination"
|
||||
>
|
||||
<el-table-column label="序号" width="60">
|
||||
<template #default="{ $index }">
|
||||
{{ serialNumber(pagination, $index) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="LIST_NAME" label="清单名称">
|
||||
<template v-slot="{ row }">
|
||||
{{ row.LIST_NAME ? row.LIST_NAME : info.NAME }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="PRINCIPALNAME"
|
||||
label="人员"
|
||||
width="90"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column prop="DATESTART" label="检查周期">
|
||||
<template v-slot="{ row }">
|
||||
<template v-if="row.DATESTART && row.DATEEND">
|
||||
{{ row.DATESTART }}-{{ row.DATEEND }}
|
||||
</template>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="CHECK_USERS" label="检查人" width="90" />
|
||||
<el-table-column prop="CHECK_TIME" label="检查时间" />
|
||||
<el-table-column label="检查状态" width="120">
|
||||
<template v-slot="{ row }">
|
||||
<div v-if="row.TYPE === '2'">超期未检查</div>
|
||||
<div v-else>已检查</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" width="140">
|
||||
<template #default="{ row }">
|
||||
<template v-if="row.TYPE === '1'">
|
||||
<el-button
|
||||
type="primary"
|
||||
text
|
||||
link
|
||||
@click="
|
||||
router.push({
|
||||
path: '/hazard_investigation/checklist_inspection_status/inspection_record/view',
|
||||
query: {
|
||||
CHECKRECORD_ID: row.CHECKRECORD_ID,
|
||||
},
|
||||
})
|
||||
"
|
||||
>
|
||||
检查记录
|
||||
</el-button>
|
||||
<el-button
|
||||
v-if="buttonJurisdiction.del"
|
||||
type="primary"
|
||||
text
|
||||
link
|
||||
@click="fnDelete(row.CHECKRECORD_ID)"
|
||||
>
|
||||
删除
|
||||
</el-button>
|
||||
</template>
|
||||
<template v-else>
|
||||
<el-button
|
||||
type="primary"
|
||||
text
|
||||
link
|
||||
@click="
|
||||
router.push({
|
||||
path: '/hazard_investigation/checklist_inspection_status/inspection_record/supplementary_recording',
|
||||
query: {
|
||||
CHECKRECORD_ID: row.CHECKRECORD_ID,
|
||||
DATESTART: row.DATESTART,
|
||||
DATEEND: row.DATEEND,
|
||||
LISTMANAGER_ID,
|
||||
},
|
||||
})
|
||||
"
|
||||
>
|
||||
补录
|
||||
</el-button>
|
||||
</template>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</layout-table>
|
||||
</layout-card>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref } from "vue";
|
||||
import { useRouter, useRoute } from "vue-router";
|
||||
import { serialNumber } from "@/assets/js/utils";
|
||||
import {
|
||||
getChecklistInspectionStatusRecordList,
|
||||
setChecklistInspectionStatusRecordDelete,
|
||||
} from "@/request/hazard_investigation.js";
|
||||
import { debounce } from "throttle-debounce";
|
||||
import { ElMessage, ElMessageBox } from "element-plus";
|
||||
import useButtonJurisdiction from "@/assets/js/useButtonJurisdiction.js";
|
||||
import useListData from "@/assets/js/useListData.js";
|
||||
|
||||
const route = useRoute();
|
||||
const router = useRouter();
|
||||
const { LISTMANAGER_ID } = route.query;
|
||||
const info = ref({});
|
||||
const { list, pagination, searchForm, fnGetData, fnResetPagination } =
|
||||
useListData(getChecklistInspectionStatusRecordList, {
|
||||
otherParams: { LISTMANAGER_ID },
|
||||
callbackFn: (list, resData) => {
|
||||
info.value = resData.ls;
|
||||
},
|
||||
});
|
||||
const fnGetDataTransfer = () => {
|
||||
fnGetData({
|
||||
STARTTIME: searchForm.value.dates?.[0],
|
||||
ENDTIME: searchForm.value.dates?.[1],
|
||||
});
|
||||
};
|
||||
const fnResetPaginationTransfer = () => {
|
||||
fnResetPagination({
|
||||
STARTTIME: searchForm.value.dates?.[0],
|
||||
ENDTIME: searchForm.value.dates?.[1],
|
||||
});
|
||||
};
|
||||
const buttonJurisdiction = await useButtonJurisdiction("checkrecord");
|
||||
const fnDelete = debounce(
|
||||
1000,
|
||||
async (CHECKRECORD_ID) => {
|
||||
await ElMessageBox.confirm("确定要删除吗?", { type: "warning" });
|
||||
await setChecklistInspectionStatusRecordDelete({ CHECKRECORD_ID });
|
||||
ElMessage.success("删除成功");
|
||||
fnResetPaginationTransfer();
|
||||
},
|
||||
{ atBegin: true }
|
||||
);
|
||||
</script>
|
||||
|
||||
<style scoped></style>
|
|
@ -0,0 +1,29 @@
|
|||
<template>
|
||||
<layout-card>
|
||||
<div id="printContent">
|
||||
<inspection-record-view
|
||||
:entrance="entrance"
|
||||
:checkRecordId="CHECKRECORD_ID"
|
||||
/>
|
||||
</div>
|
||||
<div class="tc mt-10">
|
||||
<el-button v-print="'#printContent'" type="primary">打印</el-button>
|
||||
</div>
|
||||
</layout-card>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import InspectionRecordView from "./components/inspection_record_view.vue";
|
||||
import { useRoute } from "vue-router";
|
||||
|
||||
defineProps({
|
||||
entrance: {
|
||||
type: String,
|
||||
default: "checklist_inspection_status",
|
||||
},
|
||||
});
|
||||
const route = useRoute();
|
||||
const { CHECKRECORD_ID } = route.query;
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss"></style>
|
|
@ -0,0 +1,9 @@
|
|||
<template>
|
||||
<inspection entrance="supplementaryRecording" />
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import Inspection from "../inventory_troubleshooting/inspect.vue";
|
||||
</script>
|
||||
|
||||
<style scoped></style>
|
|
@ -66,8 +66,6 @@ const { list } = useListData(getInventoryManagementView, {
|
|||
info.value = resData.pd;
|
||||
},
|
||||
});
|
||||
console.log(list);
|
||||
console.log(info);
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss"></style>
|
||||
|
|
|
@ -0,0 +1,24 @@
|
|||
<template>
|
||||
<layout-card>
|
||||
<div id="printContent">
|
||||
<div class="page_break" v-for="item in id" :key="item">
|
||||
<inspection-record-view :checkRecordId="item" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="tc mt-10">
|
||||
<el-button v-print="'#printContent'" type="primary">打印</el-button>
|
||||
</div>
|
||||
</layout-card>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import InspectionRecordView from "../checklist_inspection_status/components/inspection_record_view.vue";
|
||||
import { useRoute } from "vue-router";
|
||||
import { ref } from "vue";
|
||||
|
||||
const route = useRoute();
|
||||
const { DATA_IDS } = route.query;
|
||||
const id = ref(DATA_IDS.split(","));
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss"></style>
|
|
@ -0,0 +1,15 @@
|
|||
<template>
|
||||
<layout-card>
|
||||
<layout-hidden-view :hiddenId="HIDDEN_ID" />
|
||||
</layout-card>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import LayoutHiddenView from "@/components/hidden_view/index.vue";
|
||||
import { useRoute } from "vue-router";
|
||||
|
||||
const route = useRoute();
|
||||
const { HIDDEN_ID } = route.query;
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss"></style>
|
|
@ -0,0 +1,217 @@
|
|||
<template>
|
||||
<div>
|
||||
<el-card>
|
||||
<el-form
|
||||
:model="searchForm"
|
||||
label-width="80px"
|
||||
@submit.prevent="fnResetPaginationTransfer"
|
||||
>
|
||||
<el-row>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="清单名称" prop="KEYWORDS">
|
||||
<el-input v-model="searchForm.KEYWORDS" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="检查时间" prop="dates">
|
||||
<el-date-picker
|
||||
v-model="searchForm.dates"
|
||||
type="daterange"
|
||||
value-format="YYYY-MM-DD"
|
||||
format="YYYY-MM-DD"
|
||||
range-separator="至"
|
||||
:disabled="searchForm.TYPE === '2'"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="检查状态" prop="TYPE">
|
||||
<el-select
|
||||
v-model="searchForm.TYPE"
|
||||
@change="searchForm.dates = []"
|
||||
>
|
||||
<el-option label="已检查" value="1" />
|
||||
<el-option label="超期未检查" value="2" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-form-item label-width="10px">
|
||||
<el-button type="primary" native-type="submit">搜索</el-button>
|
||||
<el-button native-type="reset" @click="fnResetPaginationTransfer">
|
||||
重置
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="2">
|
||||
<el-form-item label-width="10px" class="end">
|
||||
<el-button @click="fnBatchPrinting"> 批量打印 </el-button>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</el-card>
|
||||
<layout-card>
|
||||
<layout-table
|
||||
:data="list"
|
||||
@get-data="fnGetDataTransfer"
|
||||
v-model:pagination="pagination"
|
||||
ref="tableRef"
|
||||
row-key="CHECKRECORD_ID"
|
||||
>
|
||||
<el-table-column reserve-selection type="selection" width="55" />
|
||||
<el-table-column label="序号" width="60">
|
||||
<template #default="{ $index }">
|
||||
{{ serialNumber(pagination, $index) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="LIST_NAME" label="清单名称">
|
||||
<template v-slot="{ row }">
|
||||
{{ row.LIST_NAME ? row.LIST_NAME : info.NAME }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="PRINCIPALNAME"
|
||||
label="人员"
|
||||
width="90"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column prop="DATESTART" label="检查周期">
|
||||
<template v-slot="{ row }">
|
||||
<template v-if="row.DATESTART && row.DATEEND">
|
||||
{{ row.DATESTART }}-{{ row.DATEEND }}
|
||||
</template>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="CHECK_USERS" label="检查人" width="90" />
|
||||
<el-table-column prop="CHECK_TIME" label="检查时间" />
|
||||
<el-table-column label="检查状态" width="120">
|
||||
<template v-slot="{ row }">
|
||||
<div v-if="row.TYPE === '2'">超期未检查</div>
|
||||
<div v-else>已检查</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" width="140">
|
||||
<template #default="{ row }">
|
||||
<template v-if="row.TYPE === '1'">
|
||||
<el-button
|
||||
type="primary"
|
||||
text
|
||||
link
|
||||
@click="
|
||||
router.push({
|
||||
path: '/hazard_investigation/inspection_record/view',
|
||||
query: {
|
||||
CHECKRECORD_ID: row.CHECKRECORD_ID,
|
||||
},
|
||||
})
|
||||
"
|
||||
>
|
||||
检查记录
|
||||
</el-button>
|
||||
<el-button
|
||||
v-if="buttonJurisdiction.del"
|
||||
type="primary"
|
||||
text
|
||||
link
|
||||
@click="fnDelete(row.CHECKRECORD_ID)"
|
||||
>
|
||||
删除
|
||||
</el-button>
|
||||
</template>
|
||||
<template v-else>
|
||||
<el-button
|
||||
type="primary"
|
||||
text
|
||||
link
|
||||
@click="
|
||||
router.push({
|
||||
path: '/hazard_investigation/inspection_record/supplementary_recording',
|
||||
query: {
|
||||
CHECKRECORD_ID: row.CHECKRECORD_ID,
|
||||
DATESTART: row.DATESTART,
|
||||
DATEEND: row.DATEEND,
|
||||
LISTMANAGER_ID: row.LISTMANAGER_ID,
|
||||
},
|
||||
})
|
||||
"
|
||||
>
|
||||
补录
|
||||
</el-button>
|
||||
</template>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</layout-table>
|
||||
</layout-card>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref } from "vue";
|
||||
import { useRouter } from "vue-router";
|
||||
import { serialNumber } from "@/assets/js/utils";
|
||||
import {
|
||||
getInspectionRecordList,
|
||||
setChecklistInspectionStatusRecordDelete,
|
||||
} from "@/request/hazard_investigation.js";
|
||||
import { debounce } from "throttle-debounce";
|
||||
import { ElMessage, ElMessageBox } from "element-plus";
|
||||
import useButtonJurisdiction from "@/assets/js/useButtonJurisdiction.js";
|
||||
import useListData from "@/assets/js/useListData.js";
|
||||
import { useUserStore } from "@/pinia/user.js";
|
||||
|
||||
const router = useRouter();
|
||||
const userStore = useUserStore();
|
||||
const info = ref({});
|
||||
const { list, pagination, searchForm, fnGetData, fnResetPagination, tableRef } =
|
||||
useListData(getInspectionRecordList, {
|
||||
otherParams: {
|
||||
USER_ID: userStore.getUserInfo.USER_ID,
|
||||
},
|
||||
defaultSearchForm: {
|
||||
TYPE: "1",
|
||||
},
|
||||
callbackFn: (list, resData) => {
|
||||
info.value = resData.ls;
|
||||
},
|
||||
});
|
||||
const fnGetDataTransfer = () => {
|
||||
fnGetData({
|
||||
STARTTIME: searchForm.value.dates?.[0],
|
||||
ENDTIME: searchForm.value.dates?.[1],
|
||||
});
|
||||
};
|
||||
const fnResetPaginationTransfer = () => {
|
||||
fnResetPagination({
|
||||
STARTTIME: searchForm.value.dates?.[0],
|
||||
ENDTIME: searchForm.value.dates?.[1],
|
||||
});
|
||||
};
|
||||
const buttonJurisdiction = await useButtonJurisdiction("checkrecord");
|
||||
const fnDelete = debounce(
|
||||
1000,
|
||||
async (CHECKRECORD_ID) => {
|
||||
await ElMessageBox.confirm("确定要删除吗?", { type: "warning" });
|
||||
await setChecklistInspectionStatusRecordDelete({ CHECKRECORD_ID });
|
||||
ElMessage.success("删除成功");
|
||||
fnResetPaginationTransfer();
|
||||
},
|
||||
{ atBegin: true }
|
||||
);
|
||||
const fnBatchPrinting = () => {
|
||||
const selectionData = tableRef.value.getSelectionRows();
|
||||
if (selectionData.length === 0) {
|
||||
ElMessage.warning("请选择要打印的数据");
|
||||
return;
|
||||
}
|
||||
const DATA_IDS = selectionData.map((item) => item.CHECKRECORD_ID).join(",");
|
||||
router.push({
|
||||
path: "/hazard_investigation/inspection_record/batch_printing",
|
||||
query: {
|
||||
DATA_IDS,
|
||||
},
|
||||
});
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped></style>
|
|
@ -0,0 +1,9 @@
|
|||
<template>
|
||||
<inspection entrance="supplementaryRecording" />
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import Inspection from "../inventory_troubleshooting/inspect.vue";
|
||||
</script>
|
||||
|
||||
<style scoped></style>
|
|
@ -0,0 +1,9 @@
|
|||
<template>
|
||||
<inspection-record-view entrance="inspection_record" />
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import InspectionRecordView from "../checklist_inspection_status/inspection_record_view.vue";
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss"></style>
|
|
@ -217,7 +217,6 @@
|
|||
type="add"
|
||||
v-model:visible="data.addOrEditDialog.visible"
|
||||
v-model:form="data.addOrEditDialog.form"
|
||||
:control="false"
|
||||
@get-data="fnAddRiskSubmit"
|
||||
/>
|
||||
<select-risk
|
||||
|
|
|
@ -5,219 +5,31 @@
|
|||
:on-close="fnClose"
|
||||
width="1200"
|
||||
>
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="12">
|
||||
<el-form ref="formRef" :model="form" :rules="rules" label-width="100px">
|
||||
<el-row>
|
||||
<el-col :span="24" v-if="hiddenType === 'unqualified'">
|
||||
<el-form-item label="检查内容" prop="CHECK_CONTENT">
|
||||
<el-input
|
||||
:model-value="info.CHECK_CONTENT"
|
||||
disabled
|
||||
type="textarea"
|
||||
autosize
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="隐患部位" prop="HIDDENPART">
|
||||
<el-input
|
||||
v-model="form.HIDDENPART"
|
||||
placeholder="请输入内容"
|
||||
@blur="fnGetHiddenDangerDatabaseList"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="隐患描述" prop="HIDDENDESCR">
|
||||
<el-input v-model="form.HIDDENDESCR" placeholder="请输入内容" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="隐患级别" prop="HIDDENLEVEL">
|
||||
<el-select
|
||||
v-model="form.HIDDENLEVEL"
|
||||
@change="
|
||||
form.HIDDENLEVEL === 'hiddenLevel0002'
|
||||
? (form.RECTIFICATIONTYPE = '2')
|
||||
: null
|
||||
"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in hazardLevelList"
|
||||
:key="item.BIANMA"
|
||||
:label="item.NAME"
|
||||
:value="item.BIANMA"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24" v-if="info.BAO_BAO_TYPE === '1'">
|
||||
<el-form-item label="隐患类别" prop="HIDDEN_CATEGORY">
|
||||
<el-select v-model="form.HIDDEN_CATEGORY">
|
||||
<el-option
|
||||
v-for="item in hazardCategoriesList"
|
||||
:key="item.DICTIONARIES_ID"
|
||||
:label="item.NAME"
|
||||
:value="item.DICTIONARIES_ID"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="隐患类型" prop="HIDDENTYPE">
|
||||
<layout-hidden-danger-type
|
||||
v-model="form.HIDDENTYPE"
|
||||
ref="hiddenDangerTypeRef"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="隐患图片" prop="hiddenImgs">
|
||||
<layout-upload
|
||||
v-model:file-list="form.hiddenImgs"
|
||||
list-type="picture-card"
|
||||
accept=".jpg,.jpeg,.png"
|
||||
:limit="99"
|
||||
delete-to-server
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="隐患视频" prop="videoFiles">
|
||||
<layout-upload
|
||||
v-model:file-list="form.videoFiles"
|
||||
accept=".mp4"
|
||||
:size="50"
|
||||
@preview="fnVideoPreview"
|
||||
>
|
||||
<template #tip>只能上传mp4文件,且不超过50M</template>
|
||||
</layout-upload>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="隐患处置" prop="RECTIFICATIONTYPE">
|
||||
<el-radio-group v-model="form.RECTIFICATIONTYPE">
|
||||
<el-radio
|
||||
:disabled="form.HIDDENLEVEL === 'hiddenLevel0002'"
|
||||
label="1"
|
||||
>
|
||||
立即整改
|
||||
</el-radio>
|
||||
<el-radio label="2">限期整改</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<template v-if="form.RECTIFICATIONTYPE === '1'">
|
||||
<el-col :span="24">
|
||||
<el-form-item prop="RECTIFYDESCR" label="整改描述">
|
||||
<el-input
|
||||
v-model="form.RECTIFYDESCR"
|
||||
placeholder="请输入内容"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="整改后图片" prop="rectifyImgs">
|
||||
<layout-upload
|
||||
v-model:file-list="form.rectifyImgs"
|
||||
list-type="picture-card"
|
||||
accept=".jpg,.jpeg,.png"
|
||||
:limit="99"
|
||||
delete-to-server
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</template>
|
||||
<template v-if="form.RECTIFICATIONTYPE === '2'">
|
||||
<el-col :span="24">
|
||||
<el-form-item prop="RECTIFICATIONDEADLINE" label="整改期限">
|
||||
<el-date-picker
|
||||
v-model="form.RECTIFICATIONDEADLINE"
|
||||
format="YYYY-MM-DD"
|
||||
value-format="YYYY-MM-DD"
|
||||
type="date"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="整改部门" prop="RECTIFICATIONDEPT">
|
||||
<layout-department
|
||||
v-model="form.RECTIFICATIONDEPT"
|
||||
@update:model-value="form.RECTIFICATIONOR = ''"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="整改人" prop="RECTIFICATIONOR">
|
||||
<el-select v-model="form.RECTIFICATIONOR">
|
||||
<el-option
|
||||
v-for="item in data.rectifyUserList"
|
||||
:key="item.USER_ID"
|
||||
:label="item.NAME"
|
||||
:value="item.USER_ID"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</template>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<div
|
||||
v-for="item in data.list"
|
||||
:key="item.HIDDEN_LIBRARY_ID"
|
||||
class="item"
|
||||
@click="fnChoice(item)"
|
||||
>
|
||||
<el-descriptions :column="1" border>
|
||||
<el-descriptions-item label="风险单元名称">
|
||||
{{ item.RISK_UNIT_NAME }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="隐患部位">
|
||||
{{ item.HIDDEN_PART }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="隐患描述">
|
||||
{{ item.INSPECTION_BASIS }}
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<layout-hidden-add
|
||||
:hidden-type="hiddenType"
|
||||
:info="info"
|
||||
v-model:form="form"
|
||||
ref="hiddenAddRef"
|
||||
/>
|
||||
<template #footer>
|
||||
<el-button @click="fnClose">取消</el-button>
|
||||
<el-button type="primary" @click="fnSubmit">确定</el-button>
|
||||
</template>
|
||||
</el-dialog>
|
||||
<layout-video
|
||||
v-model:visible="data.videoDialog.visible"
|
||||
:src="data.videoDialog.src"
|
||||
/>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { reactive, ref, watchEffect } from "vue";
|
||||
import LayoutUpload from "@/components/upload/index.vue";
|
||||
import { useVModels } from "@vueuse/core";
|
||||
import { debounce } from "throttle-debounce";
|
||||
import { ElMessage } from "element-plus";
|
||||
import {
|
||||
getHiddenDangerDatabaseList,
|
||||
setInventoryTroubleshootingOtherHiddenDangerAdd,
|
||||
setInventoryTroubleshootingOtherHiddenDangerEdit,
|
||||
setInventoryTroubleshootingOtherHiddenDangerListAdd,
|
||||
setHiddenDangerAdd,
|
||||
setHiddenDangerEdit,
|
||||
setHiddenDangerListAdd,
|
||||
} from "@/request/hazard_investigation.js";
|
||||
import {
|
||||
layoutFnGetHazardCategories,
|
||||
layoutFnGetHazardLevel,
|
||||
} from "@/assets/js/data_dictionary.js";
|
||||
import LayoutHiddenDangerType from "@/components/hazard_type/index.vue";
|
||||
import LayoutVideo from "@/components/video/index.vue";
|
||||
import LayoutDepartment from "@/components/department/index.vue";
|
||||
import { getUserListAll } from "@/request/data_dictionary.js";
|
||||
import useFormValidate from "@/assets/js/useFormValidate.js";
|
||||
import { setUploadImg } from "@/request/api.js";
|
||||
import LayoutHiddenAdd from "@/components/hidden_add/index.vue";
|
||||
import { ref } from "vue";
|
||||
|
||||
const props = defineProps({
|
||||
visible: {
|
||||
|
@ -263,96 +75,15 @@ const props = defineProps({
|
|||
});
|
||||
const emits = defineEmits(["update:visible", "update:form", "submit"]);
|
||||
const { visible, form } = useVModels(props, emits);
|
||||
const rules = {
|
||||
HIDDENPART: [{ required: true, message: "请输入隐患部位", trigger: "blur" }],
|
||||
HIDDENDESCR: [{ required: true, message: "请输入隐患描述", trigger: "blur" }],
|
||||
HIDDENLEVEL: [
|
||||
{ required: true, message: "请选择隐患级别", trigger: "change" },
|
||||
],
|
||||
HIDDEN_CATEGORY: [
|
||||
{ required: true, message: "请选择隐患类别", trigger: "change" },
|
||||
],
|
||||
HIDDENTYPE: [
|
||||
{ required: true, message: "请选择隐患类型", trigger: "change" },
|
||||
],
|
||||
hiddenImgs: [
|
||||
{ required: true, message: "请上传隐患图片", trigger: "change" },
|
||||
],
|
||||
RECTIFICATIONTYPE: [
|
||||
{ required: true, message: "请选择隐患处置", trigger: "change" },
|
||||
],
|
||||
RECTIFYDESCR: [
|
||||
{ required: true, message: "请输入整改描述", trigger: "blur" },
|
||||
],
|
||||
rectifyImgs: [
|
||||
{ required: true, message: "请上传整改后图片", trigger: "change" },
|
||||
],
|
||||
RECTIFICATIONDEADLINE: [
|
||||
{ required: true, message: "请选择整改期限", trigger: "change" },
|
||||
],
|
||||
RECTIFICATIONDEPT: [
|
||||
{ required: true, message: "请选择整改部门", trigger: "change" },
|
||||
],
|
||||
RECTIFICATIONOR: [
|
||||
{ required: true, message: "请选择整改人", trigger: "change" },
|
||||
],
|
||||
};
|
||||
const formRef = ref(null);
|
||||
const hiddenDangerTypeRef = ref(null);
|
||||
const data = reactive({
|
||||
list: [],
|
||||
rectifyUserList: [],
|
||||
videoDialog: {
|
||||
visible: false,
|
||||
src: "",
|
||||
},
|
||||
});
|
||||
const hazardLevelList = await layoutFnGetHazardLevel();
|
||||
const hazardCategoriesList = await layoutFnGetHazardCategories();
|
||||
const fnGetHiddenDangerDatabaseList = async () => {
|
||||
if (!form.value.HIDDENPART) return;
|
||||
const resData = await getHiddenDangerDatabaseList({
|
||||
RISK_UNIT_NAME: props.info.RISKUNITNAME,
|
||||
HIDDEN_PART: form.value.HIDDENPART,
|
||||
});
|
||||
data.list = resData.varList;
|
||||
};
|
||||
const fnChoice = (item) => {
|
||||
form.value.HIDDENPART = item.HIDDEN_PART;
|
||||
form.value.HIDDENDESCR = item.INSPECTION_BASIS;
|
||||
form.value.HIDDENLEVEL = "hiddenLevel0001";
|
||||
form.value.HIDDENTYPE = [
|
||||
item.HIDDEN_TYPE_ONE,
|
||||
item.HIDDEN_TYPE_TWO,
|
||||
item.HIDDEN_TYPE_THREE,
|
||||
];
|
||||
};
|
||||
const fnVideoPreview = (event) => {
|
||||
if (event.url) {
|
||||
data.videoDialog.visible = true;
|
||||
data.videoDialog.src = event.url;
|
||||
}
|
||||
};
|
||||
const fnRectificationDepartmentChange = async (event) => {
|
||||
const resData = await getUserListAll({
|
||||
DEPARTMENT_ID: event,
|
||||
});
|
||||
data.rectifyUserList = resData.userList;
|
||||
};
|
||||
watchEffect(() => {
|
||||
if (form.value.RECTIFICATIONDEPT)
|
||||
fnRectificationDepartmentChange(form.value.RECTIFICATIONDEPT);
|
||||
});
|
||||
const hiddenAddRef = ref(null);
|
||||
const fnClose = () => {
|
||||
formRef.value.resetFields();
|
||||
data.list = [];
|
||||
data.rectifyUserList = [];
|
||||
hiddenAddRef.value.reset();
|
||||
visible.value = false;
|
||||
};
|
||||
const fnSubmit = debounce(
|
||||
1000,
|
||||
async () => {
|
||||
await useFormValidate(formRef);
|
||||
await hiddenAddRef.value.formValidate();
|
||||
let currentHiddenId = "";
|
||||
let params = {
|
||||
...form.value,
|
||||
|
@ -360,7 +91,7 @@ const fnSubmit = debounce(
|
|||
HIDDENTYPE1: form.value.HIDDENTYPE[0],
|
||||
HIDDENTYPE2: form.value.HIDDENTYPE[1],
|
||||
HIDDENTYPE3: form.value.HIDDENTYPE[2],
|
||||
HIDDENTYPE_NAME: hiddenDangerTypeRef.value.getCheckedNodes(),
|
||||
HIDDENTYPE_NAME: hiddenAddRef.value.hiddenDangerTypeLabel(),
|
||||
LISTMANAGER_ID: props.listManagerId,
|
||||
};
|
||||
if (props.hiddenType === "unqualified") {
|
||||
|
@ -382,9 +113,7 @@ const fnSubmit = debounce(
|
|||
LONGITUDE: props.longitude,
|
||||
LATITUDE: props.latitude,
|
||||
};
|
||||
const resData = await setInventoryTroubleshootingOtherHiddenDangerAdd(
|
||||
params
|
||||
);
|
||||
const resData = await setHiddenDangerAdd(params);
|
||||
currentHiddenId = resData.pd.HIDDEN_ID;
|
||||
}
|
||||
if (props.hiddenType === "otherHidden") {
|
||||
|
@ -395,14 +124,11 @@ const fnSubmit = debounce(
|
|||
HAVESCHEME: 0,
|
||||
};
|
||||
if (props.type === "add") {
|
||||
const resData =
|
||||
await setInventoryTroubleshootingOtherHiddenDangerListAdd(params);
|
||||
const resData = await setHiddenDangerListAdd(params);
|
||||
currentHiddenId = resData.pd.HIDDEN_ID;
|
||||
}
|
||||
if (props.type === "edit") {
|
||||
const resData = await setInventoryTroubleshootingOtherHiddenDangerEdit(
|
||||
params
|
||||
);
|
||||
const resData = await setHiddenDangerEdit(params);
|
||||
currentHiddenId = resData.pd.HIDDEN_ID;
|
||||
}
|
||||
}
|
||||
|
@ -433,14 +159,4 @@ const fnUploadImage = async (HIDDEN_ID, FFILE, TYPE) => {
|
|||
};
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.item {
|
||||
cursor: pointer;
|
||||
border-bottom: 1px dashed #ccc;
|
||||
padding: 10px 0;
|
||||
|
||||
&:first-child {
|
||||
padding-top: 0;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
<style scoped lang="scss"></style>
|
||||
|
|
|
@ -36,15 +36,8 @@
|
|||
<el-col :span="6">
|
||||
<el-form-item label="检查状态" prop="STATUS">
|
||||
<el-select v-model="searchForm.STATUS">
|
||||
<el-option
|
||||
v-for="item in [
|
||||
{ ID: '0', NAME: '未检查' },
|
||||
{ ID: '1', NAME: '已检查' },
|
||||
]"
|
||||
:key="item.ID"
|
||||
:label="item.NAME"
|
||||
:value="item.ID"
|
||||
/>
|
||||
<el-option label="未检查" value="0" />
|
||||
<el-option label="已检查" value="1" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
|
|
@ -47,11 +47,26 @@
|
|||
<el-radio-group :disabled="row.HASHIDDEN > 0" v-model="row.ISNORMAL">
|
||||
<el-radio :label="0" @click.prevent="fnQualified($index, row)">
|
||||
合格
|
||||
<el-tooltip
|
||||
content="注意:补录时,不允许添加隐患"
|
||||
placement="top"
|
||||
v-if="entrance === 'supplementaryRecording'"
|
||||
>
|
||||
<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>
|
||||
|
@ -60,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
|
||||
type="primary"
|
||||
@click="fnAddOrEditOtherHidden({}, 'add')"
|
||||
:disabled="entrance === 'supplementaryRecording'"
|
||||
>
|
||||
添加
|
||||
</el-button>
|
||||
</div>
|
||||
|
@ -103,6 +122,7 @@
|
|||
value-format="YYYY-MM-DD HH:mm:ss"
|
||||
type="datetime"
|
||||
placeholder="这里输入检查时间"
|
||||
:disabled-date="fnDisabledDate"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
@ -175,6 +195,11 @@
|
|||
</el-form-item>
|
||||
</el-col>
|
||||
</template>
|
||||
<el-col :span="24" v-if="entrance === 'supplementaryRecording'">
|
||||
<el-form-item label="补录原因" prop="REASON">
|
||||
<el-input v-model="data.form.REASON" type="textarea" autosize />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="备注" prop="DESCR">
|
||||
<el-input
|
||||
|
@ -215,9 +240,10 @@ import { nextTick, onMounted, reactive, ref } from "vue";
|
|||
import {
|
||||
getInventoryManagementView,
|
||||
getInventoryTroubleshootingOtherHiddenList,
|
||||
getInventoryTroubleshootingOtherHiddenDangerView,
|
||||
setInventoryTroubleshootingOtherHiddenDangerDelete,
|
||||
getHiddenDangerView,
|
||||
setHiddenDangerDelete,
|
||||
setInventoryTroubleshootingSubmit,
|
||||
setChecklistInspectionStatusRecordSupplementaryRecordingSubmit,
|
||||
} from "@/request/hazard_investigation.js";
|
||||
import { useRoute, useRouter } from "vue-router";
|
||||
import useListData from "@/assets/js/useListData.js";
|
||||
|
@ -235,14 +261,23 @@ import { ElMessage, ElMessageBox } from "element-plus";
|
|||
import Qualified from "./components/qualified.vue";
|
||||
import UnQualified from "./components/un_qualified.vue";
|
||||
import { cloneDeep } from "lodash-es";
|
||||
import { WarningFilled } from "@element-plus/icons-vue";
|
||||
|
||||
const route = useRoute();
|
||||
const router = useRouter();
|
||||
const { LISTMANAGER_ID } = route.query;
|
||||
const { LISTMANAGER_ID, CHECKRECORD_ID, DATEEND, DATESTART } = route.query;
|
||||
// entrance: supplementaryRecording是补录,空值是正常录入
|
||||
const props = defineProps({
|
||||
entrance: {
|
||||
type: String,
|
||||
default: "",
|
||||
},
|
||||
});
|
||||
const rules = {
|
||||
CHECK_TIME: [
|
||||
{ required: true, message: "请选择检查时间", trigger: "change" },
|
||||
],
|
||||
REASON: [{ required: true, message: "请输入补录原因", trigger: "blur" }],
|
||||
};
|
||||
const formRef = ref(null);
|
||||
const info = ref({});
|
||||
|
@ -251,6 +286,7 @@ const data = reactive({
|
|||
latitude: 0,
|
||||
form: {
|
||||
CHECK_TIME: "",
|
||||
REASON: "",
|
||||
inspectedList: [],
|
||||
},
|
||||
qualifiedDialog: {
|
||||
|
@ -281,19 +317,6 @@ const data = reactive({
|
|||
},
|
||||
},
|
||||
});
|
||||
onMounted(() => {
|
||||
const geolocation = new window.BMapGL.Geolocation();
|
||||
geolocation.getCurrentPosition(async (r) => {
|
||||
if (!r) {
|
||||
await ElMessageBox.alert("获取位置信息失败,请刷新重试", {
|
||||
type: "warning",
|
||||
});
|
||||
window.location.reload();
|
||||
}
|
||||
data.longitude = r.longitude;
|
||||
data.latitude = r.latitude;
|
||||
});
|
||||
});
|
||||
const { list: inspectionList } = useListData(getInventoryManagementView, {
|
||||
otherParams: { LISTMANAGER_ID },
|
||||
usePagination: false,
|
||||
|
@ -312,6 +335,27 @@ const { list: otherHiddenList, fnGetData: fnGetOtherHidden } = useListData(
|
|||
key: "hiddenList",
|
||||
}
|
||||
);
|
||||
onMounted(() => {
|
||||
const geolocation = new window.BMapGL.Geolocation();
|
||||
geolocation.getCurrentPosition(async (r) => {
|
||||
if (!r) {
|
||||
await ElMessageBox.alert("获取位置信息失败,请刷新重试", {
|
||||
type: "warning",
|
||||
});
|
||||
window.location.reload();
|
||||
}
|
||||
data.longitude = r.longitude;
|
||||
data.latitude = r.latitude;
|
||||
});
|
||||
});
|
||||
const fnDisabledDate = (time) => {
|
||||
if (DATEEND && DATESTART)
|
||||
return (
|
||||
time.getTime() > new Date(DATEEND).getTime() ||
|
||||
time.getTime() < new Date(DATESTART).getTime()
|
||||
);
|
||||
else return false;
|
||||
};
|
||||
const fnQualified = async (index, row) => {
|
||||
if (row.HASHIDDEN > 0) return;
|
||||
data.qualifiedDialog.visible = true;
|
||||
|
@ -328,7 +372,7 @@ const fnQualified = async (index, row) => {
|
|||
inspectionList.value[index].ISNORMAL = 0;
|
||||
};
|
||||
const fnNotInvolved = (index, row) => {
|
||||
if (row.HASHIDDEN > 0) return;
|
||||
if (row.HASHIDDEN > 0 || props.entrance === "supplementaryRecording") return;
|
||||
fnRemoveUnqualified(index);
|
||||
inspectionList.value[index].ISNORMAL = 2;
|
||||
};
|
||||
|
@ -336,7 +380,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 (
|
||||
|
@ -353,7 +397,7 @@ const fnUnqualified = async (index, row) => {
|
|||
data.unQualifiedDialog.hiddenType = "unqualified";
|
||||
};
|
||||
const fnGetHiddenDangerView = async (HIDDEN_ID) => {
|
||||
const resData = await getInventoryTroubleshootingOtherHiddenDangerView({
|
||||
const resData = await getHiddenDangerView({
|
||||
HIDDEN_ID,
|
||||
});
|
||||
data.unQualifiedDialog.form = resData.pd;
|
||||
|
@ -404,7 +448,7 @@ const fnDeleteOtherHidden = async (HIDDEN_ID) => {
|
|||
await ElMessageBox.confirm("确定要删除吗?", {
|
||||
type: "warning",
|
||||
});
|
||||
await setInventoryTroubleshootingOtherHiddenDangerDelete({ HIDDEN_ID });
|
||||
await setHiddenDangerDelete({ HIDDEN_ID });
|
||||
fnGetOtherHidden();
|
||||
};
|
||||
const fnAddOrEditOtherHidden = async (row, type) => {
|
||||
|
@ -432,7 +476,7 @@ const fnSubmit = debounce(
|
|||
}
|
||||
const inspectedList = cloneDeep(data.form.inspectedList);
|
||||
if (inspectedList.length > 0) inspectedList.splice(0, 1);
|
||||
await setInventoryTroubleshootingSubmit({
|
||||
const params = {
|
||||
LISTMANAGER_ID,
|
||||
LIST_NAME: info.value.NAME,
|
||||
CHECK_TIME: data.form.CHECK_TIME,
|
||||
|
@ -444,7 +488,14 @@ const fnSubmit = debounce(
|
|||
OTHER: JSON.stringify(inspectedList),
|
||||
LONGITUDE: data.longitude,
|
||||
LATITUDE: data.latitude,
|
||||
});
|
||||
};
|
||||
if (props.entrance === "supplementaryRecording") {
|
||||
params.REASON = data.form.REASON;
|
||||
params.CHECKRECORD_ID = CHECKRECORD_ID;
|
||||
await setChecklistInspectionStatusRecordSupplementaryRecordingSubmit(
|
||||
params
|
||||
);
|
||||
} else await setInventoryTroubleshootingSubmit(params);
|
||||
ElMessage.success("操作成功");
|
||||
router.back();
|
||||
},
|
||||
|
|
|
@ -0,0 +1,119 @@
|
|||
<template>
|
||||
<div>
|
||||
<el-card>
|
||||
<el-form
|
||||
:model="searchForm"
|
||||
label-width="60px"
|
||||
@submit.prevent="fnGetData"
|
||||
>
|
||||
<el-row>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="年份" prop="YEAR">
|
||||
<el-select v-model="searchForm.YEAR" @change="fnGetData">
|
||||
<el-option
|
||||
v-for="item in yearList"
|
||||
:key="item"
|
||||
:label="item"
|
||||
:value="item"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</el-card>
|
||||
<layout-card>
|
||||
<h3 class="tc mb-10">{{ searchForm.YEAR }}年隐患排查计划</h3>
|
||||
<layout-table :data="list" :show-pagination="false">
|
||||
<el-table-column
|
||||
prop="type_name"
|
||||
label="检查类型【清单类型】"
|
||||
width="150"
|
||||
/>
|
||||
<el-table-column prop="level_name" label="排查级别" width="100" />
|
||||
<el-table-column
|
||||
prop="period_name"
|
||||
label="排查频次【排查周期】"
|
||||
width="150"
|
||||
/>
|
||||
<el-table-column label="隐患排查要求">
|
||||
<template v-slot="{ row }">
|
||||
{{ dictionary[row.type_name].require }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="check_count" label="排查任务数" width="100" />
|
||||
<el-table-column prop="list_count" label="涉及排查清单数" width="120" />
|
||||
<el-table-column prop="dept_count" label="涉及部门数" width="100" />
|
||||
<el-table-column label="排查目的">
|
||||
<template v-slot="{ row }">
|
||||
{{ dictionary[row.type_name].purpose }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</layout-table>
|
||||
</layout-card>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import useListData from "@/assets/js/useListData.js";
|
||||
import { getTroubleshootingPlanList } from "@/request/hazard_investigation.js";
|
||||
import dayjs from "dayjs";
|
||||
import { ref } from "vue";
|
||||
|
||||
const year = dayjs().year();
|
||||
const dictionary = {
|
||||
节假日: {
|
||||
require: "按节假日检查表内容实施检查,保存检查记录、隐患通知及整改记录",
|
||||
purpose: "保证节日期间各种应急物资及备用设施充足相关事项明确落实。",
|
||||
},
|
||||
综合: {
|
||||
require: "按综合性检查表内容实施检查。保存检查记录、隐患通知及整改记录",
|
||||
purpose: "以检查各级人员安全责任的落实情况为重点",
|
||||
},
|
||||
专业: {
|
||||
require:
|
||||
"按各专业性检查表内容实施检查,有问题向领导汇报。保存检查记录、隐患通知及整改记录",
|
||||
purpose: "主要排查各专业正常运行情况",
|
||||
},
|
||||
季节性: {
|
||||
require: "按各季节性检查表检查",
|
||||
purpose: "根据季节特点进行预防性检查",
|
||||
},
|
||||
日常: {
|
||||
require:
|
||||
"检查人员按各自负责部门进行检查,保存检查记录、隐患通知及整改记录。",
|
||||
purpose: "履行本身安全工作职责,及时发现三违行为",
|
||||
},
|
||||
};
|
||||
const yearList = ref([]);
|
||||
const fnInitYearList = () => {
|
||||
for (let i = 2021; i <= year; i++) {
|
||||
yearList.value.push(i);
|
||||
}
|
||||
};
|
||||
fnInitYearList();
|
||||
const { list, searchForm, fnGetData } = useListData(
|
||||
getTroubleshootingPlanList,
|
||||
{
|
||||
usePagination: false,
|
||||
defaultSearchForm: {
|
||||
YEAR: year,
|
||||
},
|
||||
key: "planList",
|
||||
callbackFn: (list) => {
|
||||
for (let i = 0; i < list.length; i++) {
|
||||
if (
|
||||
list[i].check_count === 0 ||
|
||||
list[i].list_count === 0 ||
|
||||
list[i].dept_count === 0
|
||||
) {
|
||||
list.splice(i, 1);
|
||||
i--;
|
||||
}
|
||||
}
|
||||
},
|
||||
}
|
||||
);
|
||||
</script>
|
||||
|
||||
<style scoped></style>
|
|
@ -0,0 +1,125 @@
|
|||
<template>
|
||||
<layout-card>
|
||||
<layout-hidden-view :hidden-id="HIDDEN_ID" />
|
||||
<el-divider content-position="left">隐患验收</el-divider>
|
||||
<el-form
|
||||
ref="formRef"
|
||||
:model="data.form"
|
||||
:rules="rules"
|
||||
label-width="100px"
|
||||
>
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="是否合格" prop="ISQUALIFIED">
|
||||
<el-radio-group :model-value="data.form.ISQUALIFIED">
|
||||
<el-radio label="1">是</el-radio>
|
||||
<el-radio label="2">否</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<template v-if="data.form.ISQUALIFIED === '1'">
|
||||
<el-col :span="24">
|
||||
<el-form-item prop="CHECKDESCR" label="验收描述">
|
||||
<el-input
|
||||
v-model="data.form.CHECKDESCR"
|
||||
type="textarea"
|
||||
:autosize="{ minRows: 3 }"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item prop="CHECK_TIME" label="验收时间">
|
||||
<el-date-picker
|
||||
v-model="data.form.CHECK_TIME"
|
||||
type="date"
|
||||
value-format="YYYY-MM-DD"
|
||||
format="YYYY-MM-DD"
|
||||
placeholder="选择日期"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="验收图片" prop="acceptFile">
|
||||
<layout-upload
|
||||
v-model:file-list="data.form.acceptFile"
|
||||
:limit="4"
|
||||
accept=".jpg,.jpeg,.png"
|
||||
list-type="picture-card"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</template>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<div class="tc mt">
|
||||
<el-button type="primary" @click="fnSubmit">提交</el-button>
|
||||
</div>
|
||||
</layout-card>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import LayoutHiddenView from "@/components/hidden_view/index.vue";
|
||||
import { useRoute, useRouter } from "vue-router";
|
||||
import { reactive, ref } from "vue";
|
||||
import { debounce } from "throttle-debounce";
|
||||
import useFormValidate from "@/assets/js/useFormValidate.js";
|
||||
import { ElMessage } from "element-plus";
|
||||
import LayoutUpload from "@/components/upload/index.vue";
|
||||
import { setHiddenDangerAcceptSubmit } from "@/request/hidden_danger_government.js";
|
||||
import { setUploadImg } from "@/request/api.js";
|
||||
|
||||
const route = useRoute();
|
||||
const router = useRouter();
|
||||
const { HIDDEN_ID } = route.query;
|
||||
const formRef = ref(null);
|
||||
const rules = {
|
||||
ISQUALIFIED: [
|
||||
{ required: true, message: "请选择是否合格", trigger: "change" },
|
||||
],
|
||||
CHECKDESCR: [{ required: true, message: "请输入验收描述", trigger: "blur" }],
|
||||
CHECK_TIME: [
|
||||
{ required: true, message: "请选择验收时间", trigger: "change" },
|
||||
],
|
||||
acceptFile: [
|
||||
{ required: true, message: "请上传验收图片", trigger: "change" },
|
||||
],
|
||||
};
|
||||
const data = reactive({
|
||||
form: {
|
||||
ISQUALIFIED: "1",
|
||||
CHECKDESCR: "",
|
||||
CHECK_TIME: "",
|
||||
acceptFile: [],
|
||||
},
|
||||
});
|
||||
const fnSubmit = debounce(
|
||||
1000,
|
||||
async () => {
|
||||
await useFormValidate(formRef);
|
||||
const resData = await setHiddenDangerAcceptSubmit({
|
||||
HIDDEN_ID,
|
||||
...data.form,
|
||||
});
|
||||
for (let i = 0; i < data.form.acceptFile.length; i++) {
|
||||
if (data.form.acceptFile[i].raw)
|
||||
await fnUploadImage(
|
||||
resData.check.HIDDENCHECK_ID,
|
||||
data.form.acceptFile[i].raw,
|
||||
5
|
||||
);
|
||||
}
|
||||
ElMessage.success("保存成功");
|
||||
router.back();
|
||||
},
|
||||
{ atBegin: true }
|
||||
);
|
||||
const fnUploadImage = async (HIDDENCHECK_ID, FFILE, TYPE) => {
|
||||
const formData = new FormData();
|
||||
formData.append("FOREIGN_KEY", HIDDENCHECK_ID);
|
||||
formData.append("TYPE", TYPE);
|
||||
formData.append("FFILE", FFILE);
|
||||
await setUploadImg(formData);
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss"></style>
|
|
@ -0,0 +1,156 @@
|
|||
<template>
|
||||
<div>
|
||||
<el-card>
|
||||
<el-form
|
||||
:model="searchForm"
|
||||
label-width="100px"
|
||||
@submit.prevent="fnResetPaginationTransfer"
|
||||
>
|
||||
<el-row>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="隐患描述" prop="KEYWORDS">
|
||||
<el-input v-model="searchForm.KEYWORDS" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="发现日期" prop="dates">
|
||||
<el-date-picker
|
||||
v-model="searchForm.dates"
|
||||
type="daterange"
|
||||
value-format="YYYY-MM-DD"
|
||||
format="YYYY-MM-DD"
|
||||
range-separator="至"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label-width="10px">
|
||||
<el-button type="primary" native-type="submit">搜索</el-button>
|
||||
<el-button native-type="reset" @click="fnResetPaginationTransfer">
|
||||
重置
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</el-card>
|
||||
<layout-card>
|
||||
<layout-table
|
||||
:data="list"
|
||||
@get-data="fnGetDataTransfer"
|
||||
v-model:pagination="pagination"
|
||||
>
|
||||
<el-table-column label="序号" width="60">
|
||||
<template #default="{ $index }">
|
||||
{{ serialNumber(pagination, $index) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="HIDDENDESCR"
|
||||
label="隐患描述"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column label="隐患处置" width="100">
|
||||
<template v-slot="{ row }">
|
||||
<span v-if="row.RECTIFICATIONTYPE === '1'">立即整改</span>
|
||||
<span v-else-if="row.RECTIFICATIONTYPE === '2'">限期整改</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="HIDDENLEVELNAME" label="隐患级别" width="120" />
|
||||
<el-table-column label="隐患状态" width="100">
|
||||
<template v-slot="{ row }">
|
||||
{{ translationStatus(row.STATE, stateList) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="RECTIFICATIONTIME"
|
||||
label="整改时间"
|
||||
width="160"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="RECTIFICATIONORNAME"
|
||||
label="整改人"
|
||||
width="100"
|
||||
/>
|
||||
<el-table-column prop="CHECKNAME" label="验收人" width="150" />
|
||||
<el-table-column label="操作" width="100">
|
||||
<template #default="{ row }">
|
||||
<el-button
|
||||
type="primary"
|
||||
text
|
||||
link
|
||||
@click="
|
||||
router.push({
|
||||
path: '/hidden_danger_government/acceptance/view',
|
||||
query: { HIDDEN_ID: row.HIDDEN_ID },
|
||||
})
|
||||
"
|
||||
>
|
||||
查看
|
||||
</el-button>
|
||||
<el-button
|
||||
v-if="row.isUserself && buttonJurisdiction.del"
|
||||
type="primary"
|
||||
text
|
||||
link
|
||||
@click="
|
||||
router.push({
|
||||
path: '/hidden_danger_government/acceptance/acceptance',
|
||||
query: { HIDDEN_ID: row.HIDDEN_ID },
|
||||
})
|
||||
"
|
||||
>
|
||||
验收
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</layout-table>
|
||||
</layout-card>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { useRouter } from "vue-router";
|
||||
import { serialNumber, translationStatus } from "@/assets/js/utils";
|
||||
import useButtonJurisdiction from "@/assets/js/useButtonJurisdiction.js";
|
||||
import useListData from "@/assets/js/useListData.js";
|
||||
import { getHiddenDangerList } from "@/request/hidden_danger_government.js";
|
||||
import { useUserStore } from "@/pinia/user.js";
|
||||
|
||||
const stateList = [
|
||||
{ NAME: "未整改", ID: "1" },
|
||||
{ NAME: "已整改", ID: "3" },
|
||||
{ NAME: "已验收", ID: "4" },
|
||||
{ NAME: "已过期", ID: "-1" },
|
||||
];
|
||||
const router = useRouter();
|
||||
const userStore = useUserStore();
|
||||
const USER_ID = userStore.getUserInfo.USER_ID;
|
||||
const { list, pagination, searchForm, fnGetData, fnResetPagination } =
|
||||
useListData(getHiddenDangerList, {
|
||||
otherParams: {
|
||||
HIDDENLEVEL: "hiddenLevel0001",
|
||||
DISPOSESTATE: "3",
|
||||
},
|
||||
callbackFn: (list) => {
|
||||
for (let i = 0; i < list.length; i++) {
|
||||
list[i].isUserself = list[i].UNCHECKUSERS.indexOf(USER_ID) !== -1;
|
||||
}
|
||||
},
|
||||
});
|
||||
const fnGetDataTransfer = () => {
|
||||
fnGetData({
|
||||
STARTTIME: searchForm.value.dates?.[0],
|
||||
ENDTIME: searchForm.value.dates?.[1],
|
||||
});
|
||||
};
|
||||
const fnResetPaginationTransfer = () => {
|
||||
fnResetPagination({
|
||||
STARTTIME: searchForm.value.dates?.[0],
|
||||
ENDTIME: searchForm.value.dates?.[1],
|
||||
});
|
||||
};
|
||||
const buttonJurisdiction = await useButtonJurisdiction("hidden");
|
||||
</script>
|
||||
|
||||
<style scoped></style>
|
|
@ -0,0 +1,9 @@
|
|||
<template>
|
||||
<hidden-view print />
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import HiddenView from "@/views/hazard_investigation/checklist_inspection_status/hidden_danger_view.vue";
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss"></style>
|
|
@ -0,0 +1,79 @@
|
|||
<template>
|
||||
<layout-card>
|
||||
<layout-hidden-add
|
||||
hidden-type="ledger"
|
||||
v-model:form="form"
|
||||
ref="hiddenAddRef"
|
||||
/>
|
||||
<div class="tc mt-10">
|
||||
<el-button type="primary" @click="fnSubmit">确定</el-button>
|
||||
</div>
|
||||
</layout-card>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import LayoutHiddenAdd from "@/components/hidden_add/index.vue";
|
||||
import { ref } from "vue";
|
||||
import { debounce } from "throttle-debounce";
|
||||
import { setHiddenDangerAdd } from "@/request/hazard_investigation.js";
|
||||
import { setUploadImg } from "@/request/api.js";
|
||||
import { ElMessage } from "element-plus";
|
||||
import { useRouter } from "vue-router";
|
||||
|
||||
const router = useRouter();
|
||||
const hiddenAddRef = ref(null);
|
||||
const form = ref({
|
||||
HIDDENPART: "",
|
||||
HIDDENDESCR: "",
|
||||
HIDDENLEVEL: "",
|
||||
HIDDENTYPE: [],
|
||||
hiddenImgs: [],
|
||||
videoFiles: [],
|
||||
RECTIFICATIONTYPE: "2",
|
||||
RECTIFYDESCR: "",
|
||||
rectifyImgs: [],
|
||||
RECTIFICATIONDEADLINE: "",
|
||||
RECTIFICATIONDEPT: "",
|
||||
RECTIFICATIONOR: "",
|
||||
});
|
||||
const fnSubmit = debounce(
|
||||
1000,
|
||||
async () => {
|
||||
await hiddenAddRef.value.formValidate();
|
||||
const resData = await setHiddenDangerAdd({
|
||||
...form.value,
|
||||
SOURCE: "1",
|
||||
HAVESCHEME: 0,
|
||||
HIDDENTYPE1: form.value.HIDDENTYPE[0],
|
||||
HIDDENTYPE2: form.value.HIDDENTYPE[1],
|
||||
HIDDENTYPE3: form.value.HIDDENTYPE[2],
|
||||
HIDDENTYPE_NAME: hiddenAddRef.value.hiddenDangerTypeLabel(),
|
||||
});
|
||||
const currentHiddenId = resData.pd.HIDDEN_ID;
|
||||
for (let i = 0; i < form.value.hiddenImgs.length; i++) {
|
||||
if (form.value.hiddenImgs[i].raw)
|
||||
await fnUploadImage(currentHiddenId, form.value.hiddenImgs[i].raw, 3);
|
||||
}
|
||||
for (let i = 0; i < form.value.videoFiles.length; i++) {
|
||||
if (form.value.videoFiles[i].raw)
|
||||
await fnUploadImage(currentHiddenId, form.value.videoFiles[i].raw, 3);
|
||||
}
|
||||
for (let i = 0; i < form.value.rectifyImgs.length; i++) {
|
||||
if (form.value.rectifyImgs[i].raw)
|
||||
await fnUploadImage(currentHiddenId, form.value.rectifyImgs[i].raw, 4);
|
||||
}
|
||||
ElMessage.success("保存成功");
|
||||
router.back();
|
||||
},
|
||||
{ atBegin: true }
|
||||
);
|
||||
const fnUploadImage = async (HIDDEN_ID, FFILE, TYPE) => {
|
||||
const formData = new FormData();
|
||||
formData.append("FOREIGN_KEY", HIDDEN_ID);
|
||||
formData.append("TYPE", TYPE);
|
||||
formData.append("FFILE", FFILE);
|
||||
await setUploadImg(formData);
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss"></style>
|
|
@ -0,0 +1,169 @@
|
|||
<template>
|
||||
<el-dialog v-model="visible" title="导出" :on-close="fnClose">
|
||||
<el-checkbox
|
||||
:indeterminate="isIndeterminate"
|
||||
v-model="checkAll"
|
||||
@change="fnCheckAllChange"
|
||||
>
|
||||
全选
|
||||
</el-checkbox>
|
||||
<el-checkbox v-model="havePicture">
|
||||
导出带图片的excel(最多10条)
|
||||
</el-checkbox>
|
||||
<el-divider />
|
||||
<el-checkbox-group v-model="checkOptions" @change="fnCheckedChange">
|
||||
<el-row>
|
||||
<el-col v-for="(item, index) in options" :span="4" :key="index">
|
||||
<el-checkbox :label="item" :value="item" />
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-checkbox-group>
|
||||
<template #footer>
|
||||
<el-button @click="fnClose">取 消</el-button>
|
||||
<el-button type="primary" @click="fnSubmit">导 出</el-button>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { useVModel } from "@vueuse/core";
|
||||
import { ref } from "vue";
|
||||
import { debounce } from "throttle-debounce";
|
||||
import dayjs from "dayjs";
|
||||
import { ElMessage } from "element-plus";
|
||||
import useDownloadBlob from "@/assets/js/useDownloadBlob.js";
|
||||
import QS from "qs";
|
||||
|
||||
const props = defineProps({
|
||||
visible: {
|
||||
type: Boolean,
|
||||
required: true,
|
||||
default: false,
|
||||
},
|
||||
searchForm: {
|
||||
type: Object,
|
||||
required: true,
|
||||
default: () => {},
|
||||
},
|
||||
ids: {
|
||||
type: Array,
|
||||
required: true,
|
||||
default: () => [],
|
||||
},
|
||||
});
|
||||
const emits = defineEmits(["update:visible"]);
|
||||
const visible = useVModel(props, "visible", emits);
|
||||
const options = [
|
||||
"隐患来源",
|
||||
"风险点(单元)",
|
||||
"辨识部位",
|
||||
"存在风险",
|
||||
"风险分级",
|
||||
"检查内容",
|
||||
"隐患级别",
|
||||
"隐患状态",
|
||||
"隐患描述",
|
||||
"隐患部位",
|
||||
"隐患发现部门",
|
||||
"发现人",
|
||||
"发现时间",
|
||||
"整改类型",
|
||||
"整改期限",
|
||||
"隐患图片",
|
||||
"整改描述",
|
||||
"整改部门",
|
||||
"整改人",
|
||||
"整改时间",
|
||||
"整改后图片",
|
||||
"整改方案",
|
||||
"排查日期",
|
||||
"隐患清单",
|
||||
"治理标准要求",
|
||||
"治理方法",
|
||||
"经费和物资的落实",
|
||||
"负责治理人员",
|
||||
"工时安排",
|
||||
"时限要求",
|
||||
"工作要求",
|
||||
"其他事项",
|
||||
"方案图片",
|
||||
"验收描述",
|
||||
"是否合格",
|
||||
"验收部门",
|
||||
"验收人",
|
||||
"验收时间",
|
||||
"验收图片",
|
||||
];
|
||||
const checkAll = ref(true);
|
||||
const isIndeterminate = ref(false);
|
||||
const checkOptions = ref(options);
|
||||
const havePicture = ref(false);
|
||||
const fnCheckAllChange = (val) => {
|
||||
checkOptions.value = val ? options : [];
|
||||
isIndeterminate.value = false;
|
||||
};
|
||||
const fnCheckedChange = (value) => {
|
||||
const checkedCount = value.length;
|
||||
checkAll.value = checkedCount === options.length;
|
||||
isIndeterminate.value = checkedCount > 0 && checkedCount < options.length;
|
||||
};
|
||||
const fnClose = () => {
|
||||
visible.value = false;
|
||||
checkOptions.value = options;
|
||||
isIndeterminate.value = false;
|
||||
checkAll.value = true;
|
||||
havePicture.value = false;
|
||||
};
|
||||
const fnSubmit = debounce(
|
||||
1000,
|
||||
() => {
|
||||
let data = {
|
||||
havePicture: havePicture.value ? "1" : "0",
|
||||
options: JSON.stringify(checkOptions.value),
|
||||
};
|
||||
if (havePicture.value) {
|
||||
const ids = props.ids;
|
||||
if (ids.length === 0) {
|
||||
ElMessage.warning("请选择要导出的数据");
|
||||
return;
|
||||
}
|
||||
if (ids.length > 10) {
|
||||
ElMessage.warning("选择的数据超过10条");
|
||||
return;
|
||||
}
|
||||
data = {
|
||||
...data,
|
||||
hiddenIds: ids.join(","),
|
||||
};
|
||||
} else {
|
||||
const searchForm = props.searchForm;
|
||||
if (!searchForm.dates || searchForm.dates.length < 2) {
|
||||
ElMessage.warning("请选择发现日期");
|
||||
return;
|
||||
}
|
||||
if (
|
||||
dayjs(searchForm.dates[1]).diff(dayjs(searchForm.dates[0]), "days") > 30
|
||||
) {
|
||||
ElMessage.warning("开始日期与结束日期间最多间隔30天");
|
||||
return;
|
||||
}
|
||||
data = {
|
||||
...data,
|
||||
KEYWORDS: searchForm.KEYWORDS,
|
||||
DISPOSESTATE: "-1",
|
||||
STATE: searchForm.STATE,
|
||||
STARTTIME: searchForm.dates[0],
|
||||
ENDTIME: searchForm.dates[1],
|
||||
DEPTIDS: searchForm.DEPTIDS,
|
||||
ISQUALIFIED: searchForm.ISQUALIFIED,
|
||||
HIDDENLEVEL: "hiddenLevel0001",
|
||||
IS_SELF: "0",
|
||||
};
|
||||
}
|
||||
useDownloadBlob("/hidden/excel" + "?" + QS.stringify(data));
|
||||
},
|
||||
{ atBegin: true }
|
||||
);
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss"></style>
|
|
@ -0,0 +1,246 @@
|
|||
<template>
|
||||
<div>
|
||||
<el-card>
|
||||
<el-form
|
||||
:model="searchForm"
|
||||
label-width="100px"
|
||||
@submit.prevent="fnResetPaginationTransfer"
|
||||
>
|
||||
<el-row>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="隐患描述" prop="KEYWORDS">
|
||||
<el-input v-model="searchForm.KEYWORDS" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="发现日期" prop="dates">
|
||||
<el-date-picker
|
||||
v-model="searchForm.dates"
|
||||
type="daterange"
|
||||
value-format="YYYY-MM-DD"
|
||||
format="YYYY-MM-DD"
|
||||
range-separator="至"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="隐患发现人" prop="CREATORNAME">
|
||||
<el-input v-model="searchForm.CREATORNAME" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="部门" prop="DEPTIDS">
|
||||
<layout-department
|
||||
v-model="searchForm.DEPTIDS"
|
||||
multiple
|
||||
show-checkbox
|
||||
collapse-tags
|
||||
root-disabled="Y"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="隐患状态" prop="STATE">
|
||||
<el-select v-model="searchForm.STATE">
|
||||
<el-option
|
||||
v-for="item in stateList"
|
||||
:key="item.ID"
|
||||
:label="item.NAME"
|
||||
:value="item.ID"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label-width="10px">
|
||||
<el-button type="primary" native-type="submit">搜索</el-button>
|
||||
<el-button native-type="reset" @click="fnResetPaginationTransfer">
|
||||
重置
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label-width="10px" class="end">
|
||||
<el-button @click="fnPrint">打印</el-button>
|
||||
<el-button @click="fnExport">导出</el-button>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</el-card>
|
||||
<layout-card>
|
||||
<layout-table
|
||||
:data="list"
|
||||
@get-data="fnGetDataTransfer"
|
||||
v-model:pagination="pagination"
|
||||
ref="tableRef"
|
||||
row-key="HIDDEN_ID"
|
||||
>
|
||||
<el-table-column reserve-selection type="selection" width="55" />
|
||||
<el-table-column label="序号" width="60">
|
||||
<template #default="{ $index }">
|
||||
{{ serialNumber(pagination, $index) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="HIDDENDESCR"
|
||||
label="隐患描述"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column label="隐患处置" width="100">
|
||||
<template v-slot="{ row }">
|
||||
<span v-if="row.RECTIFICATIONTYPE === '1'">立即整改</span>
|
||||
<span v-else-if="row.RECTIFICATIONTYPE === '2'">限期整改</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="HIDDENLEVELNAME" label="隐患级别" width="120" />
|
||||
<el-table-column label="隐患状态" width="100">
|
||||
<template v-slot="{ row }">
|
||||
{{ translationStatus(row.STATE, stateList) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="CREATTIME" label="发现时间" width="160" />
|
||||
<el-table-column prop="CREATORNAME" label="发现人" width="100" />
|
||||
<el-table-column
|
||||
prop="RECTIFICATIONTIME"
|
||||
label="整改时间"
|
||||
width="160"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="RECTIFICATIONORNAME"
|
||||
label="整改人"
|
||||
width="100"
|
||||
/>
|
||||
<el-table-column label="验收人" width="100">
|
||||
<template v-slot="{ row }">
|
||||
<span v-if="row.RECTIFICATIONTYPE === '2'">
|
||||
{{ row.CHECKNAME }}
|
||||
</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" width="100">
|
||||
<template #default="{ row }">
|
||||
<el-button
|
||||
type="primary"
|
||||
text
|
||||
link
|
||||
@click="
|
||||
router.push({
|
||||
path: '/hidden_danger_government/ledger/view',
|
||||
query: { HIDDEN_ID: row.HIDDEN_ID },
|
||||
})
|
||||
"
|
||||
>
|
||||
查看
|
||||
</el-button>
|
||||
<el-button
|
||||
v-if="buttonJurisdiction.del"
|
||||
type="primary"
|
||||
text
|
||||
link
|
||||
@click="fnDelete(row.HIDDEN_ID)"
|
||||
>
|
||||
删除
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<template #button>
|
||||
<el-button
|
||||
v-if="buttonJurisdiction.add"
|
||||
type="primary"
|
||||
@click="
|
||||
router.push({ path: '/hidden_danger_government/ledger/add' })
|
||||
"
|
||||
>
|
||||
新增
|
||||
</el-button>
|
||||
</template>
|
||||
</layout-table>
|
||||
</layout-card>
|
||||
<export-excel
|
||||
v-model:visible="data.exportExcelDialog.visible"
|
||||
:search-form="searchForm"
|
||||
:ids="data.exportExcelDialog.ids"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { useRouter } from "vue-router";
|
||||
import { serialNumber, translationStatus } from "@/assets/js/utils";
|
||||
import { setHiddenDangerDelete } from "@/request/hazard_investigation.js";
|
||||
import { debounce } from "throttle-debounce";
|
||||
import { ElMessage, ElMessageBox } from "element-plus";
|
||||
import useButtonJurisdiction from "@/assets/js/useButtonJurisdiction.js";
|
||||
import useListData from "@/assets/js/useListData.js";
|
||||
import LayoutDepartment from "@/components/department/index.vue";
|
||||
import { getHiddenDangerList } from "@/request/hidden_danger_government.js";
|
||||
import ExportExcel from "./components/export_excel.vue";
|
||||
import { reactive } from "vue";
|
||||
|
||||
const stateList = [
|
||||
{ NAME: "未整改", ID: "1" },
|
||||
{ NAME: "已整改", ID: "3" },
|
||||
{ NAME: "已验收", ID: "4" },
|
||||
{ NAME: "已过期", ID: "-1" },
|
||||
];
|
||||
const router = useRouter();
|
||||
const data = reactive({
|
||||
exportExcelDialog: {
|
||||
visible: false,
|
||||
ids: [],
|
||||
},
|
||||
});
|
||||
const { list, pagination, searchForm, fnGetData, fnResetPagination, tableRef } =
|
||||
useListData(getHiddenDangerList, {
|
||||
otherParams: {
|
||||
HIDDENLEVEL: "hiddenLevel0001",
|
||||
DISPOSESTATE: "-1",
|
||||
IS_SELF: "0",
|
||||
},
|
||||
});
|
||||
const fnGetDataTransfer = () => {
|
||||
fnGetData({
|
||||
STARTTIME: searchForm.value.dates?.[0],
|
||||
ENDTIME: searchForm.value.dates?.[1],
|
||||
DEPTIDS: searchForm.value.DEPTIDS?.join(","),
|
||||
});
|
||||
};
|
||||
const fnResetPaginationTransfer = () => {
|
||||
fnResetPagination({
|
||||
STARTTIME: searchForm.value.dates?.[0],
|
||||
ENDTIME: searchForm.value.dates?.[1],
|
||||
DEPTIDS: searchForm.value.DEPTIDS?.join(","),
|
||||
});
|
||||
};
|
||||
const buttonJurisdiction = await useButtonJurisdiction("hidden");
|
||||
const fnDelete = debounce(
|
||||
1000,
|
||||
async (HIDDEN_ID) => {
|
||||
await ElMessageBox.confirm("确定要删除吗?", { type: "warning" });
|
||||
await setHiddenDangerDelete({ HIDDEN_ID });
|
||||
ElMessage.success("删除成功");
|
||||
fnResetPaginationTransfer();
|
||||
},
|
||||
{ atBegin: true }
|
||||
);
|
||||
const fnPrint = () => {
|
||||
const selectionData = tableRef.value.getSelectionRows();
|
||||
if (selectionData.length === 0) {
|
||||
ElMessage.warning("请选择需要打印的数据");
|
||||
return;
|
||||
}
|
||||
const DATA_IDS = selectionData.map((item) => item.HIDDEN_ID).join(",");
|
||||
router.push({
|
||||
path: "/hidden_danger_government/ledger/print",
|
||||
query: { DATA_IDS },
|
||||
});
|
||||
};
|
||||
const fnExport = () => {
|
||||
const selectionData = tableRef.value.getSelectionRows();
|
||||
data.exportExcelDialog.ids = selectionData.map((item) => item.HIDDEN_ID);
|
||||
data.exportExcelDialog.visible = true;
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped></style>
|
|
@ -0,0 +1,124 @@
|
|||
<template>
|
||||
<layout-card>
|
||||
<div id="printContent">
|
||||
<el-divider content-position="left">隐患台账</el-divider>
|
||||
<div class="print_no_use">
|
||||
<layout-table :data="list" :show-pagination="false">
|
||||
<el-table-column type="index" label="序号" width="60" />
|
||||
<el-table-column prop="CREATTIME" label="排查时间" width="90" />
|
||||
<el-table-column prop="CREATORNAME" label="检查人" width="80" />
|
||||
<el-table-column
|
||||
prop="HIDDENFINDDEPTNAME"
|
||||
label="责任部门"
|
||||
width="90"
|
||||
/>
|
||||
<el-table-column prop="HIDDENDESCR" label="事故隐患" width="90" />
|
||||
<el-table-column prop="HIDDENLEVELNAME" label="隐患等级" width="90" />
|
||||
<el-table-column prop="RECTIFYDESCR" label="治理措施" />
|
||||
<el-table-column label="完成时限" width="90">
|
||||
<template v-slot="{ row }">
|
||||
{{
|
||||
row.RECTIFICATIONTYPE === "1"
|
||||
? dayjs(row.CREATTIME).format("YYYY-MM-DD")
|
||||
: row.RECTIFICATIONDEADLINE
|
||||
}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="RECTIFICATIONORNAME"
|
||||
label="整改责任人"
|
||||
width="110"
|
||||
/>
|
||||
<el-table-column label="验收人员" width="90">
|
||||
<template v-slot="{ row }">
|
||||
{{ row.RECTIFICATIONTYPE === "1" ? "立即整改" : row.CHECKNAME }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="验收时间" width="90">
|
||||
<template v-slot="{ row }">
|
||||
{{
|
||||
row.RECTIFICATIONTYPE === "1"
|
||||
? dayjs(row.CREATTIME).format("YYYY-MM-DD")
|
||||
: row.CHECK_TIME
|
||||
}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="验收结果" width="90">
|
||||
<template v-slot="{ row }">
|
||||
{{ row.STATE === "4" ? "验收通过" : "" }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</layout-table>
|
||||
</div>
|
||||
<table class="print_use">
|
||||
<thead>
|
||||
<tr>
|
||||
<th width="60">序号</th>
|
||||
<th width="90">排查时间</th>
|
||||
<th width="80">检查人</th>
|
||||
<th width="90">责任部门</th>
|
||||
<th width="90">事故隐患</th>
|
||||
<th width="90">隐患等级</th>
|
||||
<th>治理措施</th>
|
||||
<th width="90">完成时限</th>
|
||||
<th width="110">整改责任人</th>
|
||||
<th width="90">验收人员</th>
|
||||
<th width="90">验收时间</th>
|
||||
<th width="90">验收结果</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr v-for="(item, index) in list" :key="index">
|
||||
<td>{{ index + 1 }}</td>
|
||||
<td>{{ item.CREATTIME }}</td>
|
||||
<td>{{ item.CREATORNAME }}</td>
|
||||
<td>{{ item.HIDDENFINDDEPTNAME }}</td>
|
||||
<td>{{ item.HIDDENDESCR }}</td>
|
||||
<td>{{ item.HIDDENLEVELNAME }}</td>
|
||||
<td>{{ item.RECTIFYDESCR }}</td>
|
||||
<td>
|
||||
{{
|
||||
item.RECTIFICATIONTYPE === "1"
|
||||
? dayjs(item.CREATTIME).format("YYYY-MM-DD")
|
||||
: item.RECTIFICATIONDEADLINE
|
||||
}}
|
||||
</td>
|
||||
<td>{{ item.RECTIFICATIONORNAME }}</td>
|
||||
<td>
|
||||
{{ item.RECTIFICATIONTYPE === "1" ? "立即整改" : item.CHECKNAME }}
|
||||
</td>
|
||||
<td>
|
||||
{{
|
||||
item.RECTIFICATIONTYPE === "1"
|
||||
? dayjs(item.CREATTIME).format("YYYY-MM-DD")
|
||||
: item.CHECK_TIME
|
||||
}}
|
||||
</td>
|
||||
<td>{{ item.STATE === "4" ? "验收通过" : "" }}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="tc mt-10">
|
||||
<el-button type="primary" v-print="'#printContent'">打印</el-button>
|
||||
</div>
|
||||
<div v-html="PRINT_STYLE" />
|
||||
</layout-card>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import useListData from "@/assets/js/useListData.js";
|
||||
import { getHiddenDangerPrintList } from "@/request/hidden_danger_government.js";
|
||||
import { useRoute } from "vue-router";
|
||||
import dayjs from "dayjs";
|
||||
import { PRINT_STYLE } from "@/assets/js/constant.js";
|
||||
|
||||
const route = useRoute();
|
||||
const { DATA_IDS } = route.query;
|
||||
const { list } = useListData(getHiddenDangerPrintList, {
|
||||
otherParams: { ids: DATA_IDS },
|
||||
usePagination: false,
|
||||
});
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss"></style>
|
|
@ -0,0 +1,9 @@
|
|||
<template>
|
||||
<hidden-view print />
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import HiddenView from "@/views/hazard_investigation/checklist_inspection_status/hidden_danger_view.vue";
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss"></style>
|
|
@ -0,0 +1,179 @@
|
|||
<template>
|
||||
<div>
|
||||
<el-card>
|
||||
<el-form
|
||||
:model="searchForm"
|
||||
label-width="100px"
|
||||
@submit.prevent="fnResetPaginationTransfer"
|
||||
>
|
||||
<el-row>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="隐患描述" prop="KEYWORDS">
|
||||
<el-input v-model="searchForm.KEYWORDS" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="发现日期" prop="dates">
|
||||
<el-date-picker
|
||||
v-model="searchForm.dates"
|
||||
type="daterange"
|
||||
value-format="YYYY-MM-DD"
|
||||
format="YYYY-MM-DD"
|
||||
range-separator="至"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label-width="10px">
|
||||
<el-button type="primary" native-type="submit">搜索</el-button>
|
||||
<el-button native-type="reset" @click="fnResetPaginationTransfer">
|
||||
重置
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</el-card>
|
||||
<layout-card>
|
||||
<layout-table
|
||||
:data="list"
|
||||
@get-data="fnGetDataTransfer"
|
||||
v-model:pagination="pagination"
|
||||
>
|
||||
<el-table-column label="序号" width="60">
|
||||
<template #default="{ $index }">
|
||||
{{ serialNumber(pagination, $index) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="隐患来源" width="100">
|
||||
<template v-slot="{ row }">
|
||||
<span v-if="row.SOURCE === '1'">隐患快报</span>
|
||||
<span v-else-if="row.SOURCE === '2'">隐患排查</span>
|
||||
<span v-else-if="row.SOURCE === '3'">隐患排查</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="HIDDENDESCR"
|
||||
label="隐患描述"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column label="隐患处置" width="100">
|
||||
<template v-slot="{ row }">
|
||||
<span v-if="row.RECTIFICATIONTYPE === '1'">立即整改</span>
|
||||
<span v-else-if="row.RECTIFICATIONTYPE === '2'">限期整改</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="HIDDENLEVELNAME" label="隐患级别" width="120" />
|
||||
<el-table-column label="隐患状态" width="100">
|
||||
<template v-slot="{ row }">
|
||||
{{ translationStatus(row.STATE, stateList) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="CREATTIME" label="发现时间" width="160" />
|
||||
<el-table-column prop="CREATORNAME" label="发现人" width="100" />
|
||||
<el-table-column
|
||||
prop="RECTIFICATIONTIME"
|
||||
label="整改时间"
|
||||
width="160"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="RECTIFICATIONORNAME"
|
||||
label="整改人"
|
||||
width="100"
|
||||
/>
|
||||
<el-table-column label="操作" width="100">
|
||||
<template #default="{ row }">
|
||||
<el-button
|
||||
type="primary"
|
||||
text
|
||||
link
|
||||
@click="
|
||||
router.push({
|
||||
path: '/hidden_danger_government/major/view',
|
||||
query: { HIDDEN_ID: row.HIDDEN_ID },
|
||||
})
|
||||
"
|
||||
>
|
||||
查看
|
||||
</el-button>
|
||||
<el-button
|
||||
v-if="ISMAIN === '1' && row.ISCONFIRM === '0'"
|
||||
type="primary"
|
||||
text
|
||||
link
|
||||
@click="fnConfirm(row.HIDDEN_ID)"
|
||||
>
|
||||
确定
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</layout-table>
|
||||
</layout-card>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { useRouter } from "vue-router";
|
||||
import { serialNumber, translationStatus } from "@/assets/js/utils";
|
||||
import useListData from "@/assets/js/useListData.js";
|
||||
import {
|
||||
getHiddenDangerList,
|
||||
setHiddenDangerCancelMajorHazards,
|
||||
} from "@/request/hidden_danger_government.js";
|
||||
import { useUserStore } from "@/pinia/user.js";
|
||||
import { ElMessage, ElMessageBox } from "element-plus";
|
||||
|
||||
const stateList = [
|
||||
{ NAME: "未整改", ID: "1" },
|
||||
{ NAME: "已整改", ID: "3" },
|
||||
{ NAME: "已验收", ID: "4" },
|
||||
{ NAME: "已过期", ID: "-1" },
|
||||
];
|
||||
const router = useRouter();
|
||||
const userStore = useUserStore();
|
||||
const ISMAIN = userStore.getUserInfo.ISMAIN;
|
||||
const { list, pagination, searchForm, fnGetData, fnResetPagination } =
|
||||
useListData(getHiddenDangerList, {
|
||||
otherParams: {
|
||||
HIDDENLEVEL: "hiddenLevel0002",
|
||||
DISPOSESTATE: "1",
|
||||
},
|
||||
});
|
||||
const fnGetDataTransfer = () => {
|
||||
fnGetData({
|
||||
STARTTIME: searchForm.value.dates?.[0],
|
||||
ENDTIME: searchForm.value.dates?.[1],
|
||||
});
|
||||
};
|
||||
const fnResetPaginationTransfer = () => {
|
||||
fnResetPagination({
|
||||
STARTTIME: searchForm.value.dates?.[0],
|
||||
ENDTIME: searchForm.value.dates?.[1],
|
||||
});
|
||||
};
|
||||
const fnConfirm = async (HIDDEN_ID) => {
|
||||
try {
|
||||
await ElMessageBox.confirm("请确认该隐患是否为重大隐患?", {
|
||||
type: "warning",
|
||||
confirmButtonText: "确定为重大隐患",
|
||||
cancelButtonText: "取消重大隐患",
|
||||
distinguishCancelAndClose: true,
|
||||
});
|
||||
await router.push({
|
||||
path: "/hidden_danger_government/major/view",
|
||||
query: { HIDDEN_ID, type: "confirm" },
|
||||
});
|
||||
} catch (event) {
|
||||
if (event === "cancel") {
|
||||
await setHiddenDangerCancelMajorHazards({
|
||||
HIDDEN_ID,
|
||||
HIDDENLEVEL: "hiddenLevel0001",
|
||||
});
|
||||
ElMessage.success("取消成功");
|
||||
fnResetPaginationTransfer();
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped></style>
|
|
@ -0,0 +1,41 @@
|
|||
<template>
|
||||
<layout-card>
|
||||
<div id="printContent">
|
||||
<layout-hidden-view :hidden-id="HIDDEN_ID" />
|
||||
</div>
|
||||
<div class="tc mt-10">
|
||||
<el-button type="primary" @click="fnConfirm" v-if="type === 'confirm'">
|
||||
确认为重大隐患
|
||||
</el-button>
|
||||
<el-button type="primary" v-print="'#printContent'" v-else>
|
||||
打印
|
||||
</el-button>
|
||||
</div>
|
||||
</layout-card>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import LayoutHiddenView from "@/components/hidden_view/index.vue";
|
||||
import { useRoute, useRouter } from "vue-router";
|
||||
import { debounce } from "throttle-debounce";
|
||||
import { ElMessage } from "element-plus";
|
||||
import { setHiddenDangerConfirmMajorHazards } from "@/request/hidden_danger_government.js";
|
||||
|
||||
const route = useRoute();
|
||||
const router = useRouter();
|
||||
const { HIDDEN_ID, type } = route.query;
|
||||
const fnConfirm = debounce(
|
||||
1000,
|
||||
async () => {
|
||||
await setHiddenDangerConfirmMajorHazards({
|
||||
ISCONFIRM: "1",
|
||||
HIDDEN_ID,
|
||||
});
|
||||
ElMessage.success("确认成功");
|
||||
router.back();
|
||||
},
|
||||
{ atBegin: true }
|
||||
);
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss"></style>
|
|
@ -0,0 +1,162 @@
|
|||
<template>
|
||||
<div>
|
||||
<el-card>
|
||||
<el-form
|
||||
:model="searchForm"
|
||||
label-width="100px"
|
||||
@submit.prevent="fnResetPaginationTransfer"
|
||||
>
|
||||
<el-row>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="隐患描述" prop="KEYWORDS">
|
||||
<el-input v-model="searchForm.KEYWORDS" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="发现日期" prop="dates">
|
||||
<el-date-picker
|
||||
v-model="searchForm.dates"
|
||||
type="daterange"
|
||||
value-format="YYYY-MM-DD"
|
||||
format="YYYY-MM-DD"
|
||||
range-separator="至"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label-width="10px">
|
||||
<el-button type="primary" native-type="submit">搜索</el-button>
|
||||
<el-button native-type="reset" @click="fnResetPaginationTransfer">
|
||||
重置
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</el-card>
|
||||
<layout-card>
|
||||
<layout-table
|
||||
:data="list"
|
||||
@get-data="fnGetDataTransfer"
|
||||
v-model:pagination="pagination"
|
||||
>
|
||||
<el-table-column label="序号" width="60">
|
||||
<template #default="{ $index }">
|
||||
{{ serialNumber(pagination, $index) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="隐患来源" width="100">
|
||||
<template v-slot="{ row }">
|
||||
<span v-if="row.SOURCE === '1'">隐患快报</span>
|
||||
<span v-else-if="row.SOURCE === '2'">隐患排查</span>
|
||||
<span v-else-if="row.SOURCE === '3'">隐患排查</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="HIDDENDESCR"
|
||||
label="隐患描述"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column label="隐患处置" width="100">
|
||||
<template v-slot="{ row }">
|
||||
<span v-if="row.RECTIFICATIONTYPE === '1'">立即整改</span>
|
||||
<span v-else-if="row.RECTIFICATIONTYPE === '2'">限期整改</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="HIDDENLEVELNAME" label="隐患级别" width="120" />
|
||||
<el-table-column label="隐患状态" width="100">
|
||||
<template v-slot="{ row }">
|
||||
{{ translationStatus(row.STATE, stateList) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="CREATTIME" label="发现时间" width="160" />
|
||||
<el-table-column prop="CREATORNAME" label="发现人" width="100" />
|
||||
<el-table-column
|
||||
prop="RECTIFICATIONDEADLINE"
|
||||
label="整改期限"
|
||||
width="160"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="RECTIFICATIONORNAME"
|
||||
label="整改人"
|
||||
width="100"
|
||||
/>
|
||||
<el-table-column label="操作" width="100">
|
||||
<template #default="{ row }">
|
||||
<el-button
|
||||
type="primary"
|
||||
text
|
||||
link
|
||||
@click="
|
||||
router.push({
|
||||
path: '/hidden_danger_government/rectification/view',
|
||||
query: { HIDDEN_ID: row.HIDDEN_ID },
|
||||
})
|
||||
"
|
||||
>
|
||||
查看
|
||||
</el-button>
|
||||
<el-button
|
||||
v-if="buttonJurisdiction.del"
|
||||
type="primary"
|
||||
text
|
||||
link
|
||||
@click="fnRectification(row)"
|
||||
>
|
||||
整改
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</layout-table>
|
||||
</layout-card>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { useRouter } from "vue-router";
|
||||
import { serialNumber, translationStatus } from "@/assets/js/utils";
|
||||
import useButtonJurisdiction from "@/assets/js/useButtonJurisdiction.js";
|
||||
import useListData from "@/assets/js/useListData.js";
|
||||
import { getHiddenDangerList } from "@/request/hidden_danger_government.js";
|
||||
import { ElMessage } from "element-plus";
|
||||
|
||||
const stateList = [
|
||||
{ NAME: "未整改", ID: "1" },
|
||||
{ NAME: "已整改", ID: "3" },
|
||||
{ NAME: "已验收", ID: "4" },
|
||||
{ NAME: "已过期", ID: "-1" },
|
||||
];
|
||||
const router = useRouter();
|
||||
const { list, pagination, searchForm, fnGetData, fnResetPagination } =
|
||||
useListData(getHiddenDangerList, {
|
||||
otherParams: {
|
||||
HIDDENLEVEL: "hiddenLevel0001",
|
||||
DISPOSESTATE: "2",
|
||||
},
|
||||
});
|
||||
const fnGetDataTransfer = () => {
|
||||
fnGetData({
|
||||
STARTTIME: searchForm.value.dates?.[0],
|
||||
ENDTIME: searchForm.value.dates?.[1],
|
||||
});
|
||||
};
|
||||
const fnResetPaginationTransfer = () => {
|
||||
fnResetPagination({
|
||||
STARTTIME: searchForm.value.dates?.[0],
|
||||
ENDTIME: searchForm.value.dates?.[1],
|
||||
});
|
||||
};
|
||||
const buttonJurisdiction = await useButtonJurisdiction("hidden");
|
||||
const fnRectification = (row) => {
|
||||
if (row.HIDDENLEVEL === "hiddenLevel0002" && row.ISCONFIRM === "0") {
|
||||
ElMessage.warning("管理人员未确认该隐患");
|
||||
return;
|
||||
}
|
||||
router.push({
|
||||
path: "/hidden_danger_government/rectification/rectification",
|
||||
query: { HIDDEN_ID: row.HIDDEN_ID },
|
||||
});
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped></style>
|
|
@ -0,0 +1,541 @@
|
|||
<template>
|
||||
<layout-card>
|
||||
<layout-hidden-view
|
||||
:hidden-id="HIDDEN_ID"
|
||||
@throw-data="data.info = $event"
|
||||
/>
|
||||
<el-divider content-position="left">隐患整改</el-divider>
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="12">
|
||||
<el-form
|
||||
ref="formRef"
|
||||
:model="data.form"
|
||||
:rules="rules"
|
||||
label-width="100px"
|
||||
>
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="正常整改" prop="IS_NORMAL">
|
||||
<el-radio-group
|
||||
:model-value="data.form.IS_NORMAL"
|
||||
@change="fnIsNormalChange"
|
||||
>
|
||||
<el-radio label="1">是</el-radio>
|
||||
<el-radio label="2">否</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<template v-if="data.form.IS_NORMAL === '2'">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="整改部门" prop="RECTIFICATIONDEPT">
|
||||
<layout-department
|
||||
v-model="data.form.RECTIFICATIONDEPT"
|
||||
@update:model-value="fnRectificationDepartmentChange"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="整改人" prop="RECTIFICATIONOR">
|
||||
<el-select v-model="data.form.RECTIFICATIONOR">
|
||||
<el-option
|
||||
v-for="item in data.rectifierUserList"
|
||||
:disabled="item.USER_ID === USER_ID"
|
||||
:key="item.USER_ID"
|
||||
:label="item.NAME"
|
||||
:value="item.USER_ID"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</template>
|
||||
<template v-if="data.form.IS_NORMAL === '1'">
|
||||
<el-col :span="24">
|
||||
<el-form-item prop="RECTIFYDESCR" label="整改描述">
|
||||
<el-input
|
||||
v-model="data.form.RECTIFYDESCR"
|
||||
type="textarea"
|
||||
:autosize="{ minRows: 3 }"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="整改时间" prop="RECTIFICATIONTIME">
|
||||
<el-date-picker
|
||||
v-model="data.form.RECTIFICATIONTIME"
|
||||
value-format="YYYY-MM-DD"
|
||||
format="YYYY-MM-DD"
|
||||
type="date"
|
||||
placeholder="选择日期"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="整改后图片" prop="afterRectificationFile">
|
||||
<layout-upload
|
||||
v-model:file-list="data.form.afterRectificationFile"
|
||||
:limit="4"
|
||||
accept=".jpg,.jpeg,.png"
|
||||
list-type="picture-card"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<template v-if="data.info.ISCONFIRM === '0'">
|
||||
<template
|
||||
v-for="(item, index) in data.form.acceptanceList"
|
||||
:key="item.id"
|
||||
>
|
||||
<el-col :span="11">
|
||||
<el-form-item
|
||||
label="验收部门"
|
||||
:prop="'acceptanceList.' + index + '.DEPARTMENT_ID'"
|
||||
:rules="{
|
||||
required: true,
|
||||
message: '请选择验收部门',
|
||||
trigger: 'change',
|
||||
}"
|
||||
>
|
||||
<layout-department
|
||||
v-model="item.DEPARTMENT_ID"
|
||||
@update:model-value="
|
||||
fnInspectDepartmentChange($event, index)
|
||||
"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="11">
|
||||
<el-form-item
|
||||
label="验收人"
|
||||
:prop="'acceptanceList.' + index + '.USER_ID'"
|
||||
:rules="{
|
||||
required: true,
|
||||
message: '请选择验收人',
|
||||
trigger: 'change',
|
||||
}"
|
||||
>
|
||||
<el-select
|
||||
:model-value="item.USER_ID"
|
||||
@change="
|
||||
verifyDuplicateSelection(
|
||||
data.form.acceptanceList,
|
||||
index,
|
||||
'USER_ID',
|
||||
$event
|
||||
)
|
||||
"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in item.userList"
|
||||
:key="item.USER_ID"
|
||||
:label="item.NAME"
|
||||
:value="item.USER_ID"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="2">
|
||||
<el-form-item label-width="10px">
|
||||
<el-button
|
||||
type="primary"
|
||||
v-if="index === 0"
|
||||
@click="fnAddInspectedList"
|
||||
>
|
||||
添加
|
||||
</el-button>
|
||||
<el-button
|
||||
type="danger"
|
||||
v-if="index !== 0"
|
||||
@click="data.form.acceptanceList.splice(index, 1)"
|
||||
>
|
||||
删除
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</template>
|
||||
</template>
|
||||
<template v-if="data.info.ISCONFIRM === '1'">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="验收部门">
|
||||
<el-input disabled v-model="data.form.DEPARTMENT_NAME" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="验收人">
|
||||
<el-input disabled v-model="data.form.USER_NAME" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</template>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="整改方案" prop="HAVESCHEME">
|
||||
<el-radio-group v-model="data.form.HAVESCHEME">
|
||||
<el-radio label="1" value="1">有</el-radio>
|
||||
<el-radio :disabled="data.info.ISCONFIRM === '1'" label="0">
|
||||
无
|
||||
</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<template v-if="data.form.HAVESCHEME === '1'">
|
||||
<el-col :span="24">
|
||||
<el-form-item prop="SCREENINGDATE" label="排查日期">
|
||||
<el-date-picker
|
||||
v-model="data.form.SCREENINGDATE"
|
||||
value-format="YYYY-MM-DD"
|
||||
format="YYYY-MM-DD"
|
||||
type="date"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item prop="LIST_NAME" label="隐患清单">
|
||||
<el-input v-model="data.form.LIST_NAME" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="治理标准" prop="GOVERNSTANDARDS">
|
||||
<el-input v-model="data.form.GOVERNSTANDARDS" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="治理方法" prop="GOVERNMETHOD">
|
||||
<el-input v-model="data.form.GOVERNMETHOD" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="经费落实" prop="EXPENDITURE">
|
||||
<el-input v-model="data.form.EXPENDITURE" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="负责人员" prop="PRINCIPAL">
|
||||
<el-input v-model="data.form.PRINCIPAL" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="工时安排" prop="PROGRAMMING">
|
||||
<el-input v-model="data.form.PROGRAMMING" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="时限要求" prop="TIMELIMITFOR">
|
||||
<el-input v-model="data.form.TIMELIMITFOR" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="工作要求" prop="JOBREQUIREMENT">
|
||||
<el-input v-model="data.form.JOBREQUIREMENT" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="其他事项" prop="OTHERBUSINESS">
|
||||
<el-input v-model="data.form.OTHERBUSINESS" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="方案图片" prop="programmeFile">
|
||||
<layout-upload
|
||||
v-model:file-list="data.form.programmeFile"
|
||||
:limit="99"
|
||||
accept=".jpg,.jpeg,.png"
|
||||
list-type="picture-card"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</template>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="整改计划" prop="HAVEPLAN">
|
||||
<el-radio-group v-model="data.form.HAVEPLAN">
|
||||
<el-radio label="1" value="1">有</el-radio>
|
||||
<el-radio :disabled="data.info.ISCONFIRM === '1'" label="0">
|
||||
无
|
||||
</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24" v-if="data.form.HAVEPLAN === '1'">
|
||||
<el-form-item label="计划图片" prop="planFile">
|
||||
<layout-upload
|
||||
v-model:file-list="data.form.planFile"
|
||||
:limit="99"
|
||||
accept=".jpg,.jpeg,.png"
|
||||
list-type="picture-card"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</template>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<div
|
||||
v-for="item in data.recordLibraryList"
|
||||
:key="item.HIDDEN_LIBRARY_ID"
|
||||
class="item"
|
||||
@click="fnChoice(item)"
|
||||
>
|
||||
<el-descriptions :column="1" border>
|
||||
<el-descriptions-item label="风险单元名称">
|
||||
{{ item.RISK_UNIT_NAME }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="隐患部位">
|
||||
{{ item.HIDDEN_PART }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="隐患描述">
|
||||
{{ item.INSPECTION_BASIS }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="整改意见">
|
||||
{{ item.RECTIFYDESCR }}
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<div class="tc mt">
|
||||
<el-button type="primary" @click="fnSubmit">提交</el-button>
|
||||
</div>
|
||||
</layout-card>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import LayoutHiddenView from "@/components/hidden_view/index.vue";
|
||||
import { useRoute, useRouter } from "vue-router";
|
||||
import { reactive, ref, watch } from "vue";
|
||||
import LayoutDepartment from "@/components/department/index.vue";
|
||||
import LayoutUpload from "@/components/upload/index.vue";
|
||||
import { useUserStore } from "@/pinia/user.js";
|
||||
import {
|
||||
getHiddenDangerRectificationWhy,
|
||||
setHiddenDangerRectificationAbnormalSubmit,
|
||||
setHiddenDangerRectificationNormalSubmit,
|
||||
} from "@/request/hidden_danger_government.js";
|
||||
import { verifyDuplicateSelection } from "@/assets/js/utils.js";
|
||||
import { getUserListAll } from "@/request/data_dictionary.js";
|
||||
import { debounce } from "throttle-debounce";
|
||||
import useFormValidate from "@/assets/js/useFormValidate.js";
|
||||
import { cloneDeep } from "lodash-es";
|
||||
import { ElMessage } from "element-plus";
|
||||
import { getHiddenDangerDatabaseList } from "@/request/hazard_investigation.js";
|
||||
|
||||
const route = useRoute();
|
||||
const router = useRouter();
|
||||
const userStore = useUserStore();
|
||||
const USER_ID = userStore.getUserInfo.USER_ID;
|
||||
const CORPINFO_ID = userStore.getUserInfo.CORPINFO_ID;
|
||||
const { HIDDEN_ID } = route.query;
|
||||
const formRef = ref(null);
|
||||
const rules = {
|
||||
IS_NORMAL: [
|
||||
{ required: true, message: "正常整改不能为空", trigger: "change" },
|
||||
],
|
||||
RECTIFICATIONDEPT: [
|
||||
{ required: true, message: "整改部门不能为空", trigger: "change" },
|
||||
],
|
||||
RECTIFICATIONOR: [
|
||||
{ required: true, message: "整改人不能为空", trigger: "change" },
|
||||
],
|
||||
RECTIFYDESCR: [
|
||||
{ required: true, message: "整改描述不能为空", trigger: "blur" },
|
||||
],
|
||||
RECTIFICATIONTIME: [
|
||||
{ required: true, message: "整改时间不能为空", trigger: "change" },
|
||||
],
|
||||
afterRectificationFile: [
|
||||
{ required: true, message: "整改后图片不能为空", trigger: "change" },
|
||||
],
|
||||
HAVESCHEME: [
|
||||
{ required: true, message: "整改方案不能为空", trigger: "change" },
|
||||
],
|
||||
SCREENINGDATE: [
|
||||
{ required: true, message: "排查日期不能为空", trigger: "change" },
|
||||
],
|
||||
LIST_NAME: [{ required: true, message: "隐患清单不能为空", trigger: "blur" }],
|
||||
GOVERNSTANDARDS: [
|
||||
{ required: true, message: "治理标准不能为空", trigger: "blur" },
|
||||
],
|
||||
GOVERNMETHOD: [
|
||||
{ required: true, message: "治理方法不能为空", trigger: "blur" },
|
||||
],
|
||||
EXPENDITURE: [
|
||||
{ required: true, message: "经费落实不能为空", trigger: "blur" },
|
||||
],
|
||||
PRINCIPAL: [{ required: true, message: "负责人员不能为空", trigger: "blur" }],
|
||||
PROGRAMMING: [
|
||||
{ required: true, message: "工时安排不能为空", trigger: "blur" },
|
||||
],
|
||||
TIMELIMITFOR: [
|
||||
{ required: true, message: "时限要求不能为空", trigger: "blur" },
|
||||
],
|
||||
JOBREQUIREMENT: [
|
||||
{ required: true, message: "工作要求不能为空", trigger: "blur" },
|
||||
],
|
||||
OTHERBUSINESS: [
|
||||
{ required: true, message: "其他事项不能为空", trigger: "blur" },
|
||||
],
|
||||
programmeFile: [
|
||||
{ required: true, message: "方案图片不能为空", trigger: "change" },
|
||||
],
|
||||
HAVEPLAN: [
|
||||
{ required: true, message: "整改计划不能为空", trigger: "change" },
|
||||
],
|
||||
planFile: [
|
||||
{ required: true, message: "计划图片不能为空", trigger: "change" },
|
||||
],
|
||||
};
|
||||
const data = reactive({
|
||||
info: {},
|
||||
form: {
|
||||
IS_NORMAL: "1",
|
||||
RECTIFICATIONDEPT: "",
|
||||
RECTIFICATIONOR: "",
|
||||
RECTIFYDESCR: "",
|
||||
RECTIFICATIONTIME: "",
|
||||
afterRectificationFile: [],
|
||||
HAVESCHEME: "0",
|
||||
SCREENINGDATE: "",
|
||||
LIST_NAME: "",
|
||||
GOVERNSTANDARDS: "",
|
||||
GOVERNMETHOD: "",
|
||||
EXPENDITURE: "",
|
||||
PRINCIPAL: "",
|
||||
PROGRAMMING: "",
|
||||
TIMELIMITFOR: "",
|
||||
JOBREQUIREMENT: "",
|
||||
OTHERBUSINESS: "",
|
||||
programmeFile: [],
|
||||
HAVEPLAN: "0",
|
||||
planFile: [],
|
||||
acceptanceList: [
|
||||
{
|
||||
id: Math.random(),
|
||||
DEPARTMENT_ID: "",
|
||||
USER_ID: "",
|
||||
userList: [],
|
||||
},
|
||||
],
|
||||
},
|
||||
rectifierUserList: [],
|
||||
recordLibraryList: [],
|
||||
defaultDepartmentId: "",
|
||||
defaultUserId: "",
|
||||
});
|
||||
const fnGetData = async () => {
|
||||
const resData = await getHiddenDangerRectificationWhy({
|
||||
CORPINFO_ID,
|
||||
});
|
||||
data.defaultDepartmentId = resData.deppd.DEPARTMENT_ID;
|
||||
data.defaultUserId = resData.userpd.USER_ID;
|
||||
data.form.DEPARTMENT_NAME = resData.deppd.NAME;
|
||||
data.form.USER_NAME = resData.userpd.USERNAME;
|
||||
await fnInspectDepartmentChange(data.defaultDepartmentId, 0);
|
||||
data.form.acceptanceList[0].DEPARTMENT_ID = data.defaultDepartmentId;
|
||||
data.form.acceptanceList[0].USER_ID = data.defaultUserId;
|
||||
};
|
||||
fnGetData();
|
||||
const fnAddInspectedList = () => {
|
||||
data.form.acceptanceList.push({
|
||||
id: Math.random(),
|
||||
DEPARTMENT_ID: "",
|
||||
USER_ID: "",
|
||||
userList: [],
|
||||
});
|
||||
};
|
||||
const fnInspectDepartmentChange = async (event, index) => {
|
||||
data.form.acceptanceList[index].USER_ID = "";
|
||||
const resData = await getUserListAll({
|
||||
DEPARTMENT_ID: event,
|
||||
});
|
||||
data.form.acceptanceList[index].userList = resData.userList;
|
||||
};
|
||||
const fnRectificationDepartmentChange = async (event) => {
|
||||
data.form.RECTIFICATIONOR = "";
|
||||
const resData = await getUserListAll({
|
||||
DEPARTMENT_ID: event,
|
||||
});
|
||||
data.rectifierUserList = resData.userList;
|
||||
};
|
||||
const fnIsNormalChange = async (event) => {
|
||||
formRef.value.resetFields();
|
||||
data.form.acceptanceList = [];
|
||||
fnAddInspectedList();
|
||||
await fnInspectDepartmentChange(data.defaultDepartmentId, 0);
|
||||
data.form.acceptanceList[0].DEPARTMENT_ID = data.defaultDepartmentId;
|
||||
data.form.acceptanceList[0].USER_ID = data.defaultUserId;
|
||||
data.rectifierUserList = [];
|
||||
data.form.IS_NORMAL = event;
|
||||
};
|
||||
const fnGetHiddenDangerDatabaseList = async () => {
|
||||
const resData = await getHiddenDangerDatabaseList({
|
||||
RISK_UNIT_NAME: data.info.RISK_UNIT,
|
||||
HIDDEN_PART: data.info.HIDDENPART,
|
||||
});
|
||||
data.recordLibraryList = resData.varList;
|
||||
};
|
||||
watch(
|
||||
() => data.info,
|
||||
() => {
|
||||
fnGetHiddenDangerDatabaseList();
|
||||
}
|
||||
);
|
||||
const fnChoice = (item) => {
|
||||
data.RECTIFYDESCR = item.RECTIFYDESCR;
|
||||
};
|
||||
const fnSubmit = debounce(
|
||||
1000,
|
||||
async () => {
|
||||
await useFormValidate(formRef);
|
||||
if (data.form.IS_NORMAL === "1") {
|
||||
const formData = new FormData();
|
||||
Object.keys(data.form).forEach((key) => {
|
||||
formData.append(key, data.form[key]);
|
||||
});
|
||||
formData.append("HIDDEN_ID", HIDDEN_ID);
|
||||
formData.append(
|
||||
"LISTNAME",
|
||||
data.form.LIST_NAME ? data.form.LIST_NAME : ""
|
||||
);
|
||||
for (let i = 0; i < data.form.programmeFile.length; i++) {
|
||||
formData.append("scheme_files", data.form.programmeFile[i].raw);
|
||||
}
|
||||
for (let i = 0; i < data.form.afterRectificationFile.length; i++) {
|
||||
formData.append(
|
||||
"rectify_files",
|
||||
data.form.afterRectificationFile[i].raw
|
||||
);
|
||||
}
|
||||
for (let i = 0; i < data.form.planFile.length; i++) {
|
||||
formData.append("plan_files", data.form.planFile[i].raw);
|
||||
}
|
||||
formData.append("CHECKDEPT", data.form.acceptanceList[0].DEPARTMENT_ID);
|
||||
formData.append("CHECKOR", data.form.acceptanceList[0].USER_ID);
|
||||
const acceptanceList = cloneDeep(data.form.acceptanceList);
|
||||
if (acceptanceList.length > 0) acceptanceList.splice(0, 1);
|
||||
formData.append("OTHER", JSON.stringify(acceptanceList));
|
||||
formData.delete("afterRectificationFile");
|
||||
formData.delete("programmeFile");
|
||||
formData.delete("planFile");
|
||||
formData.delete("acceptanceList");
|
||||
await setHiddenDangerRectificationNormalSubmit(formData);
|
||||
} else {
|
||||
await setHiddenDangerRectificationAbnormalSubmit({
|
||||
HIDDEN_ID,
|
||||
RECTIFICATIONOR: data.form.RECTIFICATIONOR,
|
||||
RECTIFICATIONDEPT: data.form.RECTIFICATIONDEPT,
|
||||
});
|
||||
}
|
||||
ElMessage.success("保存成功");
|
||||
router.back();
|
||||
},
|
||||
{ atBegin: true }
|
||||
);
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.item {
|
||||
cursor: pointer;
|
||||
border-bottom: 1px dashed #ccc;
|
||||
padding: 10px 0;
|
||||
|
||||
&:first-child {
|
||||
padding-top: 0;
|
||||
}
|
||||
}
|
||||
</style>
|
|
@ -0,0 +1,9 @@
|
|||
<template>
|
||||
<hidden-view print />
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import HiddenView from "@/views/hazard_investigation/checklist_inspection_status/hidden_danger_view.vue";
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss"></style>
|
|
@ -218,7 +218,6 @@
|
|||
</template>
|
||||
|
||||
<script setup>
|
||||
import LayoutCard from "@/components/card/index.vue";
|
||||
import LayoutLearningTrainType from "@/components/learning_train_type/index.vue";
|
||||
import {
|
||||
getDataCoursewareList,
|
||||
|
@ -228,7 +227,6 @@ import {
|
|||
import useListData from "@/assets/js/useListData.js";
|
||||
import { reactive } from "vue";
|
||||
import { interceptTheSuffix, serialNumber } from "@/assets/js/utils.js";
|
||||
import LayoutTable from "@/components/table/index.vue";
|
||||
import { ArrowDown, ArrowUp } from "@element-plus/icons-vue";
|
||||
import useButtonJurisdiction from "@/assets/js/useButtonJurisdiction.js";
|
||||
import { ElMessage, ElMessageBox } from "element-plus";
|
||||
|
|
|
@ -140,8 +140,6 @@
|
|||
</template>
|
||||
|
||||
<script setup>
|
||||
import LayoutTable from "@/components/table/index.vue";
|
||||
import LayoutCard from "@/components/card/index.vue";
|
||||
import {
|
||||
importQuestion,
|
||||
deleteQuestion,
|
||||
|
|
|
@ -235,7 +235,6 @@
|
|||
</template>
|
||||
|
||||
<script setup>
|
||||
import LayoutCard from "@/components/card/index.vue";
|
||||
import LayoutLearningTrainType from "@/components/learning_train_type/index.vue";
|
||||
import {
|
||||
getVideoCoursewareList,
|
||||
|
@ -245,7 +244,6 @@ import {
|
|||
import useListData from "@/assets/js/useListData.js";
|
||||
import { reactive } from "vue";
|
||||
import { serialNumber } from "@/assets/js/utils.js";
|
||||
import LayoutTable from "@/components/table/index.vue";
|
||||
import LayoutVideo from "@/components/video/index.vue";
|
||||
import { getVideoAuth, getVideoSource } from "@/request/api.js";
|
||||
import { ArrowDown, ArrowUp } from "@element-plus/icons-vue";
|
||||
|
|
|
@ -139,7 +139,6 @@
|
|||
</template>
|
||||
|
||||
<script setup>
|
||||
import LayoutCard from "@/components/card/index.vue";
|
||||
import LayoutLearningTrainType from "@/components/learning_train_type/index.vue";
|
||||
import {
|
||||
getDataCoursewareList,
|
||||
|
@ -148,8 +147,6 @@ import {
|
|||
import useListData from "@/assets/js/useListData.js";
|
||||
import { reactive } from "vue";
|
||||
import { interceptTheSuffix, serialNumber } from "@/assets/js/utils.js";
|
||||
import LayoutTable from "@/components/table/index.vue";
|
||||
// import useButtonJurisdiction from "@/assets/js/useButtonJurisdiction.js";
|
||||
import { debounce } from "throttle-debounce";
|
||||
import { ElMessage, ElMessageBox } from "element-plus";
|
||||
import { useRouter } from "vue-router";
|
||||
|
@ -169,9 +166,6 @@ const data = reactive({
|
|||
visible: false,
|
||||
},
|
||||
});
|
||||
|
||||
// const buttonJurisdiction = await useButtonJurisdiction("courseware"); 原项目没找到在哪用
|
||||
|
||||
const fnAdd = debounce(1000, async (DATACOURSEWARE_ID) => {
|
||||
await ElMessageBox.confirm("确定要添加吗?", { type: "warning" });
|
||||
await joinMyDataCourseware({ COURSEWARE_ID: DATACOURSEWARE_ID });
|
||||
|
|
|
@ -156,7 +156,6 @@
|
|||
</template>
|
||||
|
||||
<script setup>
|
||||
import LayoutCard from "@/components/card/index.vue";
|
||||
import LayoutLearningTrainType from "@/components/learning_train_type/index.vue";
|
||||
import {
|
||||
getVideoCoursewareList,
|
||||
|
@ -165,7 +164,6 @@ import {
|
|||
import useListData from "@/assets/js/useListData.js";
|
||||
import { reactive } from "vue";
|
||||
import { serialNumber } from "@/assets/js/utils.js";
|
||||
import LayoutTable from "@/components/table/index.vue";
|
||||
import { debounce } from "throttle-debounce";
|
||||
import { ElMessage, ElMessageBox } from "element-plus";
|
||||
import { useRouter } from "vue-router";
|
||||
|
|
|
@ -65,8 +65,6 @@
|
|||
</template>
|
||||
|
||||
<script setup>
|
||||
import LayoutTable from "@/components/table/index.vue";
|
||||
import LayoutCard from "@/components/card/index.vue";
|
||||
import { getQuestionListByCoursewareIdAndType } from "@/request/platform_resource_library.js";
|
||||
import useListData from "@/assets/js/useListData.js";
|
||||
import { reactive } from "vue";
|
||||
|
|
|
@ -104,7 +104,6 @@
|
|||
</template>
|
||||
|
||||
<script setup>
|
||||
import LayoutCard from "@/components/card/index.vue";
|
||||
import LayoutLearningTrainType from "@/components/learning_train_type/index.vue";
|
||||
import {
|
||||
getCurriculumList,
|
||||
|
@ -112,7 +111,6 @@ import {
|
|||
} from "@/request/platform_resource_library.js";
|
||||
import useListData from "@/assets/js/useListData.js";
|
||||
import { serialNumber } from "@/assets/js/utils.js";
|
||||
import LayoutTable from "@/components/table/index.vue";
|
||||
import { debounce } from "throttle-debounce";
|
||||
import { ElMessage, ElMessageBox } from "element-plus";
|
||||
import { useRouter } from "vue-router";
|
||||
|
|
|
@ -139,7 +139,6 @@
|
|||
</template>
|
||||
|
||||
<script setup>
|
||||
import LayoutTable from "@/components/table/index.vue";
|
||||
import { reactive } from "vue";
|
||||
import { useRoute } from "vue-router";
|
||||
import { getCurriculumInfo } from "@/request/platform_resource_library.js";
|
||||
|
|
|
@ -111,7 +111,6 @@
|
|||
</div>
|
||||
</template>
|
||||
<script setup>
|
||||
import LayoutCard from "@/components/card/index.vue";
|
||||
import LayoutLearningTrainType from "@/components/learning_train_type/index.vue";
|
||||
import {
|
||||
getPaperList,
|
||||
|
@ -119,7 +118,6 @@ import {
|
|||
} from "@/request/platform_resource_library.js";
|
||||
import useListData from "@/assets/js/useListData.js";
|
||||
import { serialNumber } from "@/assets/js/utils.js";
|
||||
import LayoutTable from "@/components/table/index.vue";
|
||||
import { debounce } from "throttle-debounce";
|
||||
import { ElMessage, ElMessageBox } from "element-plus";
|
||||
import { useRouter } from "vue-router";
|
||||
|
|
|
@ -1,288 +0,0 @@
|
|||
<template>
|
||||
<el-dialog v-model="visible" :title="title" :before-close="fnClose">
|
||||
<el-form ref="formRef" :rules="rules" :model="form" label-width="240px">
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="管控部门" prop="DEPTNAME">
|
||||
<el-input :model-value="info.DEPTNAME" disabled />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="管控责任人" prop="USER_ID">
|
||||
<el-input v-model="form.USER_ID" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="风险点(单元)" prop="RISKUNITNAME">
|
||||
<el-input :model-value="info.RISKUNITNAME" disabled />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="辨识部位" prop="PARTSNAME">
|
||||
<el-input :model-value="info.PARTSNAME" disabled />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="存在风险" prop="RISK_DESCR">
|
||||
<el-input
|
||||
v-model="form.RISK_DESCR"
|
||||
type="textarea"
|
||||
:autosize="{
|
||||
minRows: 3,
|
||||
}"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="事故发生的可能性" prop="LIKELIHOOD">
|
||||
<el-select v-model="form.LIKELIHOOD">
|
||||
<el-option :value="10" label="完全可以预料" />
|
||||
<el-option :value="6" label="相当可能" />
|
||||
<el-option :value="3" label="可能,但不经常" />
|
||||
<el-option :value="1" label="可能性小,完全意外" />
|
||||
<el-option :value="0.5" label="很不可能,可以设想" />
|
||||
<el-option :value="0.2" label="极不可能" />
|
||||
<el-option :value="0.1" label="实际不可能" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="分值">
|
||||
{{ form.LIKELIHOOD }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="人员暴露于危险环境中的频繁程度" prop="EXPOSURE">
|
||||
<el-select v-model="form.EXPOSURE">
|
||||
<el-option :value="10" label="连续暴露" />
|
||||
<el-option :value="6" label="每天工作时间内暴露" />
|
||||
<el-option :value="3" label="每周一次或偶然暴露" />
|
||||
<el-option :value="2" label="每月一次暴露,完全意外" />
|
||||
<el-option :value="1" label="每年几次暴露" />
|
||||
<el-option :value="0.5" label="非常罕见暴露" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="分值">
|
||||
{{ form.EXPOSURE }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="一旦发生事故可能造成的后果" prop="CONSEQUENCE">
|
||||
<el-select v-model="form.CONSEQUENCE">
|
||||
<el-option :value="100" label="10人以上死亡" />
|
||||
<el-option :value="40" label="3~9人死亡" />
|
||||
<el-option :value="15" label="1~2人死亡" />
|
||||
<el-option :value="7" label="严重" />
|
||||
<el-option :value="3" label="重大,伤残" />
|
||||
<el-option :value="1" label="引人注意" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="分值">
|
||||
{{ form.CONSEQUENCE }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="风险分级" prop="LEVEL_NAME">
|
||||
{{ form.LEVEL_NAME }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="总分值" prop="DANGER">
|
||||
{{ form.DANGER }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="管控措施" prop="MEASURES">
|
||||
<el-input
|
||||
v-model="form.MEASURES"
|
||||
type="textarea"
|
||||
:autosize="{
|
||||
minRows: 3,
|
||||
}"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="事故类型" prop="ACCIDENTS">
|
||||
<el-select v-model="form.ACCIDENTS" multiple>
|
||||
<el-option
|
||||
v-for="item in accidentTypeList"
|
||||
:key="item.BIANMA"
|
||||
:label="item.NAME"
|
||||
:value="item.BIANMA"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="应急处置措施" prop="EME_MEASURES">
|
||||
<el-input
|
||||
v-model="form.EME_MEASURES"
|
||||
type="textarea"
|
||||
:autosize="{
|
||||
minRows: 3,
|
||||
}"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<template #footer>
|
||||
<el-button @click="fnClose">取消</el-button>
|
||||
<el-button type="primary" @click="fnSubmit"> 确定 </el-button>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref, watch } from "vue";
|
||||
import { useVModels } from "@vueuse/core";
|
||||
import { debounce } from "throttle-debounce";
|
||||
import useFormValidate from "@/assets/js/useFormValidate.js";
|
||||
import { ElMessage } from "element-plus";
|
||||
import { layoutFnGetAccidentType } from "@/assets/js/data_dictionary.js";
|
||||
import {
|
||||
setIdentifyingPartsRiskAdd,
|
||||
setIdentifyingPartsRiskEdit,
|
||||
} from "@/request/risk_control.js";
|
||||
|
||||
const props = defineProps({
|
||||
visible: {
|
||||
type: Boolean,
|
||||
required: true,
|
||||
default: false,
|
||||
},
|
||||
form: {
|
||||
type: Object,
|
||||
required: true,
|
||||
default: () => ({}),
|
||||
},
|
||||
info: {
|
||||
type: Object,
|
||||
required: true,
|
||||
default: () => ({}),
|
||||
},
|
||||
type: {
|
||||
type: Number,
|
||||
required: true,
|
||||
default: 0,
|
||||
},
|
||||
title: {
|
||||
type: String,
|
||||
required: true,
|
||||
default: "",
|
||||
},
|
||||
id: {
|
||||
type: String,
|
||||
required: true,
|
||||
default: "",
|
||||
},
|
||||
time: {
|
||||
type: Number,
|
||||
required: true,
|
||||
default: 0,
|
||||
},
|
||||
});
|
||||
const emits = defineEmits(["update:visible", "update:form", "get-data"]);
|
||||
const { visible, form } = useVModels(props, emits);
|
||||
const rules = {
|
||||
USER_ID: [{ required: true, message: "管控责任人不能为空", trigger: "blur" }],
|
||||
RISK_DESCR: [
|
||||
{ required: true, message: "存在风险不能为空", trigger: "blur" },
|
||||
],
|
||||
LIKELIHOOD: [
|
||||
{ required: true, message: "事故发生的可能性不能为空", trigger: "change" },
|
||||
],
|
||||
EXPOSURE: [
|
||||
{
|
||||
required: true,
|
||||
message: "人员暴露于危险环境中的频繁程度不能为空",
|
||||
trigger: "change",
|
||||
},
|
||||
],
|
||||
CONSEQUENCE: [
|
||||
{
|
||||
required: true,
|
||||
message: "一旦发生事故可能造成的后果不能为空",
|
||||
trigger: "change",
|
||||
},
|
||||
],
|
||||
LEVEL_NAME: [
|
||||
{ required: true, message: "风险分级不能为空", trigger: "change" },
|
||||
],
|
||||
MEASURES: [{ required: true, message: "管控措施不能为空", trigger: "blur" }],
|
||||
EME_MEASURES: [
|
||||
{ required: true, message: "应急处置措施不能为空", trigger: "blur" },
|
||||
],
|
||||
ACCIDENTS: [
|
||||
{ required: true, message: "事故类型不能为空", trigger: "change" },
|
||||
],
|
||||
};
|
||||
const formRef = ref(null);
|
||||
const accidentTypeList = await layoutFnGetAccidentType();
|
||||
const fnGetLevelName = (LIKELIHOOD, EXPOSURE, CONSEQUENCE) => {
|
||||
const DANGER = (LIKELIHOOD * EXPOSURE * CONSEQUENCE).toFixed(2);
|
||||
if (DANGER > 320) {
|
||||
form.value.LEVELID = "levelA";
|
||||
form.value.LEVEL_NAME = "重大风险/A级";
|
||||
} else if (DANGER > 160) {
|
||||
form.value.LEVELID = "levelB";
|
||||
form.value.LEVEL_NAME = "较大风险/B级";
|
||||
} else if (DANGER > 70) {
|
||||
form.value.LEVELID = "levelC";
|
||||
form.value.LEVEL_NAME = "一般风险/C级";
|
||||
} else {
|
||||
form.value.LEVELID = "levelD";
|
||||
form.value.LEVEL_NAME = "低风险/D级";
|
||||
}
|
||||
form.value.DANGER = DANGER;
|
||||
};
|
||||
watch(
|
||||
[
|
||||
() => props.form.LIKELIHOOD,
|
||||
() => props.form.EXPOSURE,
|
||||
() => props.form.CONSEQUENCE,
|
||||
],
|
||||
([LIKELIHOOD, EXPOSURE, CONSEQUENCE]) => {
|
||||
if (!LIKELIHOOD || !EXPOSURE || !CONSEQUENCE) return;
|
||||
fnGetLevelName(LIKELIHOOD, EXPOSURE, CONSEQUENCE);
|
||||
}
|
||||
);
|
||||
const fnClose = () => {
|
||||
formRef.value.resetFields();
|
||||
visible.value = false;
|
||||
};
|
||||
const fnSubmit = debounce(
|
||||
1000,
|
||||
async () => {
|
||||
await useFormValidate(formRef);
|
||||
const ACCIDENTS_NAME = accidentTypeList.value
|
||||
.filter((item) => form.value.ACCIDENTS.includes(item.BIANMA))
|
||||
.map((item) => item.NAME)
|
||||
.join(",");
|
||||
const params = {
|
||||
...form.value,
|
||||
RISK_UNIT_ID: props.info.RISK_UNIT_ID,
|
||||
DEPARTMENT_ID: props.info.DEPARTMENT_ID,
|
||||
IDENTIFICATION_ID: props.id,
|
||||
CHECK_CONTENT: form.value.MEASURES,
|
||||
ACCIDENTS: form.value.ACCIDENTS.join(","),
|
||||
ACCIDENTS_NAME,
|
||||
SETUPTIME: props.time,
|
||||
TYPE: props.type,
|
||||
};
|
||||
if (!props.type) await setIdentifyingPartsRiskAdd(params);
|
||||
else await setIdentifyingPartsRiskEdit(params);
|
||||
ElMessage.success("操作成功");
|
||||
fnClose();
|
||||
emits("get-data");
|
||||
},
|
||||
{ atBegin: true }
|
||||
);
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss"></style>
|
|
@ -0,0 +1,91 @@
|
|||
<template>
|
||||
<el-dialog v-model="visible" :title="title" :before-close="fnClose">
|
||||
<layout-risk-add v-model:form="form" :info="info" ref="riskAddRef" />
|
||||
<template #footer>
|
||||
<el-button @click="fnClose">取消</el-button>
|
||||
<el-button type="primary" @click="fnSubmit"> 确定 </el-button>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { useVModels } from "@vueuse/core";
|
||||
import { debounce } from "throttle-debounce";
|
||||
import { ElMessage } from "element-plus";
|
||||
import {
|
||||
setIdentifyingPartsRiskAdd,
|
||||
setIdentifyingPartsRiskEdit,
|
||||
} from "@/request/risk_control.js";
|
||||
import LayoutRiskAdd from "@/components/risk_add/index.vue";
|
||||
import { ref } from "vue";
|
||||
|
||||
const props = defineProps({
|
||||
visible: {
|
||||
type: Boolean,
|
||||
required: true,
|
||||
default: false,
|
||||
},
|
||||
form: {
|
||||
type: Object,
|
||||
required: true,
|
||||
default: () => ({}),
|
||||
},
|
||||
info: {
|
||||
type: Object,
|
||||
required: true,
|
||||
default: () => ({}),
|
||||
},
|
||||
type: {
|
||||
type: Number,
|
||||
required: true,
|
||||
default: 0,
|
||||
},
|
||||
title: {
|
||||
type: String,
|
||||
required: true,
|
||||
default: "",
|
||||
},
|
||||
id: {
|
||||
type: String,
|
||||
required: true,
|
||||
default: "",
|
||||
},
|
||||
time: {
|
||||
type: Number,
|
||||
required: true,
|
||||
default: 0,
|
||||
},
|
||||
});
|
||||
const emits = defineEmits(["update:visible", "update:form", "get-data"]);
|
||||
const { visible, form } = useVModels(props, emits);
|
||||
const riskAddRef = ref(null);
|
||||
const fnClose = () => {
|
||||
riskAddRef.value.reset();
|
||||
visible.value = false;
|
||||
};
|
||||
const fnSubmit = debounce(
|
||||
1000,
|
||||
async () => {
|
||||
await riskAddRef.value.formValidate();
|
||||
const params = {
|
||||
...form.value,
|
||||
RISK_UNIT_ID: props.info.RISK_UNIT_ID,
|
||||
DEPARTMENT_ID: props.info.DEPARTMENT_ID,
|
||||
IDENTIFICATION_ID: props.id,
|
||||
CHECK_CONTENT: form.value.MEASURES,
|
||||
ACCIDENTS: form.value.ACCIDENTS.join(","),
|
||||
ACCIDENTS_NAME: riskAddRef.value.accidentsName(),
|
||||
SETUPTIME: props.time,
|
||||
TYPE: props.type,
|
||||
};
|
||||
if (!props.type) await setIdentifyingPartsRiskAdd(params);
|
||||
else await setIdentifyingPartsRiskEdit(params);
|
||||
ElMessage.success("操作成功");
|
||||
fnClose();
|
||||
emits("get-data");
|
||||
},
|
||||
{ atBegin: true }
|
||||
);
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss"></style>
|
|
@ -89,7 +89,7 @@
|
|||
<div class="tc mt-10">
|
||||
<el-button type="primary" @click="fnSubmit">保存</el-button>
|
||||
</div>
|
||||
<add-risk
|
||||
<risk-add
|
||||
v-model:visible="data.addDialog.visible"
|
||||
v-model:form="data.addDialog.form"
|
||||
:type="data.addDialog.type"
|
||||
|
@ -112,7 +112,7 @@ import {
|
|||
getIdentifyingPartsRiskView3,
|
||||
} from "@/request/risk_control.js";
|
||||
import { useRoute, useRouter } from "vue-router";
|
||||
import AddRisk from "./components/add_risk.vue";
|
||||
import RiskAdd from "./components/risk_add.vue";
|
||||
import { debounce } from "throttle-debounce";
|
||||
import { ElMessage } from "element-plus";
|
||||
|
||||
|
|
|
@ -4,194 +4,7 @@
|
|||
:title="title ? title : type === 'add' ? '新增' : '修改'"
|
||||
:before-close="fnClose"
|
||||
>
|
||||
<el-form ref="formRef" :rules="rules" :model="form" label-width="240px">
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="管控部门" prop="DEPARTMENT_ID">
|
||||
<layout-department
|
||||
v-model="form.DEPARTMENT_ID"
|
||||
@update:model-value="fnDepartmentChange"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="管控责任人" prop="USER_ID">
|
||||
<el-input v-model="form.USER_ID" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="风险点(单元)" prop="RISK_UNIT_ID">
|
||||
<el-select v-model="form.RISK_UNIT_ID" @change="fnRiskUnitChange">
|
||||
<el-option
|
||||
v-for="item in unitList"
|
||||
:key="item.RISKUNIT_ID"
|
||||
:label="item.DEPT_NAME + '-' + item.RISKUNITNAME"
|
||||
:value="item.RISKUNIT_ID"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="辨识部位" prop="IDENTIFICATION_ID">
|
||||
<el-select v-model="form.IDENTIFICATION_ID">
|
||||
<el-option
|
||||
v-for="item in partsList"
|
||||
:key="item.IDENTIFICATIONPARTS_ID"
|
||||
:label="item.PARTSNAME"
|
||||
:value="item.IDENTIFICATIONPARTS_ID"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="存在风险" prop="RISK_DESCR">
|
||||
<el-input
|
||||
v-model="form.RISK_DESCR"
|
||||
type="textarea"
|
||||
:autosize="{
|
||||
minRows: 3,
|
||||
}"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="事故发生的可能性" prop="LIKELIHOOD">
|
||||
<el-select v-model="form.LIKELIHOOD">
|
||||
<el-option :value="10" label="完全可以预料" />
|
||||
<el-option :value="6" label="相当可能" />
|
||||
<el-option :value="3" label="可能,但不经常" />
|
||||
<el-option :value="1" label="可能性小,完全意外" />
|
||||
<el-option :value="0.5" label="很不可能,可以设想" />
|
||||
<el-option :value="0.2" label="极不可能" />
|
||||
<el-option :value="0.1" label="实际不可能" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="分值">
|
||||
{{ form.LIKELIHOOD }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="人员暴露于危险环境中的频繁程度" prop="EXPOSURE">
|
||||
<el-select v-model="form.EXPOSURE">
|
||||
<el-option :value="10" label="连续暴露" />
|
||||
<el-option :value="6" label="每天工作时间内暴露" />
|
||||
<el-option :value="3" label="每周一次或偶然暴露" />
|
||||
<el-option :value="2" label="每月一次暴露,完全意外" />
|
||||
<el-option :value="1" label="每年几次暴露" />
|
||||
<el-option :value="0.5" label="非常罕见暴露" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="分值">
|
||||
{{ form.EXPOSURE }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="一旦发生事故可能造成的后果" prop="CONSEQUENCE">
|
||||
<el-select v-model="form.CONSEQUENCE">
|
||||
<el-option :value="100" label="10人以上死亡" />
|
||||
<el-option :value="40" label="3~9人死亡" />
|
||||
<el-option :value="15" label="1~2人死亡" />
|
||||
<el-option :value="7" label="严重" />
|
||||
<el-option :value="3" label="重大,伤残" />
|
||||
<el-option :value="1" label="引人注意" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="分值">
|
||||
{{ form.CONSEQUENCE }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="风险分级" prop="LEVEL_NAME">
|
||||
{{ form.LEVEL_NAME }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="总分值" prop="DANGER">
|
||||
{{ form.DANGER }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="管控措施" prop="MEASURES">
|
||||
<el-input
|
||||
v-model="form.MEASURES"
|
||||
type="textarea"
|
||||
:autosize="{
|
||||
minRows: 3,
|
||||
}"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="事故类型" prop="ACCIDENTS">
|
||||
<el-select v-model="form.ACCIDENTS" multiple>
|
||||
<el-option
|
||||
v-for="item in accidentTypeList"
|
||||
:key="item.BIANMA"
|
||||
:label="item.NAME"
|
||||
:value="item.BIANMA"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="应急处置措施" prop="EME_MEASURES">
|
||||
<el-input
|
||||
v-model="form.EME_MEASURES"
|
||||
type="textarea"
|
||||
:autosize="{
|
||||
minRows: 3,
|
||||
}"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<template v-if="control">
|
||||
<el-col :span="24">
|
||||
<el-form-item label="管控措施分类1" prop="MANAGEMENT_CONTROL_ONE">
|
||||
<el-select
|
||||
v-model="form.MANAGEMENT_CONTROL_ONE"
|
||||
@change="form.MANAGEMENT_CONTROL_TWO = ''"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in controlList1"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="管控措施分类2" prop="MANAGEMENT_CONTROL_TWO">
|
||||
<el-select v-model="form.MANAGEMENT_CONTROL_TWO">
|
||||
<el-option
|
||||
v-for="item in controlList2"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="管控措施分类3" prop="MANAGEMENT_CONTROL_THREE">
|
||||
<el-input
|
||||
v-model="form.MANAGEMENT_CONTROL_THREE"
|
||||
type="textarea"
|
||||
:autosize="{
|
||||
minRows: 3,
|
||||
}"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</template>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<layout-risk-add v-model:form="form" :control="control" ref="riskAddRef" />
|
||||
<template #footer>
|
||||
<el-button @click="fnClose">取消</el-button>
|
||||
<el-button type="primary" @click="fnSubmit"> 确定 </el-button>
|
||||
|
@ -200,23 +13,15 @@
|
|||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref, watch, watchEffect } from "vue";
|
||||
import { ref } from "vue";
|
||||
import { useVModels } from "@vueuse/core";
|
||||
import { debounce } from "throttle-debounce";
|
||||
import useFormValidate from "@/assets/js/useFormValidate.js";
|
||||
import { ElMessage } from "element-plus";
|
||||
import {
|
||||
layoutFnGetAccidentType,
|
||||
layoutFnGetControlMeasures1,
|
||||
layoutFnGetControlMeasures2,
|
||||
} from "@/assets/js/data_dictionary.js";
|
||||
import {
|
||||
getIdentifyingPartsListAll,
|
||||
getRiskPointListAllById,
|
||||
setRiskControlLedgerAdd,
|
||||
setRiskControlLedgerEdit,
|
||||
} from "@/request/risk_control.js";
|
||||
import LayoutDepartment from "@/components/department/index.vue";
|
||||
import LayoutRiskAdd from "@/components/risk_add/index.vue";
|
||||
|
||||
const props = defineProps({
|
||||
visible: {
|
||||
|
@ -236,7 +41,7 @@ const props = defineProps({
|
|||
},
|
||||
control: {
|
||||
type: Boolean,
|
||||
default: true,
|
||||
default: false,
|
||||
},
|
||||
title: {
|
||||
type: String,
|
||||
|
@ -245,141 +50,20 @@ const props = defineProps({
|
|||
});
|
||||
const emits = defineEmits(["update:visible", "update:form", "get-data"]);
|
||||
const { visible, form } = useVModels(props, emits);
|
||||
const rules = {
|
||||
DEPARTMENT_ID: [
|
||||
{ required: true, message: "部门不能为空", trigger: "change" },
|
||||
],
|
||||
USER_ID: [{ required: true, message: "管控责任人不能为空", trigger: "blur" }],
|
||||
RISK_UNIT_ID: [
|
||||
{ required: true, message: "风险点(单元)不能为空", trigger: "change" },
|
||||
],
|
||||
IDENTIFICATION_ID: [
|
||||
{ required: true, message: "辨识部位不能为空", trigger: "change" },
|
||||
],
|
||||
RISK_DESCR: [
|
||||
{ required: true, message: "存在风险不能为空", trigger: "blur" },
|
||||
],
|
||||
LIKELIHOOD: [
|
||||
{ required: true, message: "事故发生的可能性不能为空", trigger: "change" },
|
||||
],
|
||||
EXPOSURE: [
|
||||
{
|
||||
required: true,
|
||||
message: "人员暴露于危险环境中的频繁程度不能为空",
|
||||
trigger: "change",
|
||||
},
|
||||
],
|
||||
CONSEQUENCE: [
|
||||
{
|
||||
required: true,
|
||||
message: "一旦发生事故可能造成的后果不能为空",
|
||||
trigger: "change",
|
||||
},
|
||||
],
|
||||
LEVELID: [{ required: true, message: "风险分级不能为空", trigger: "blur" }],
|
||||
MEASURES: [{ required: true, message: "管控措施不能为空", trigger: "blur" }],
|
||||
EME_MEASURES: [
|
||||
{ required: true, message: "应急处置措施不能为空", trigger: "blur" },
|
||||
],
|
||||
ACCIDENTS: [
|
||||
{ required: true, message: "事故类型不能为空", trigger: "change" },
|
||||
],
|
||||
};
|
||||
const formRef = ref(null);
|
||||
const unitList = ref([]);
|
||||
const partsList = ref([]);
|
||||
const controlList2 = ref([]);
|
||||
const controlList1 = await layoutFnGetControlMeasures1();
|
||||
const controlList2All = await layoutFnGetControlMeasures2();
|
||||
const fnGetUnitList = async () => {
|
||||
const resData = await getRiskPointListAllById({
|
||||
DEPARTMENT_ID: form.value.DEPARTMENT_ID,
|
||||
});
|
||||
unitList.value = resData.unitList;
|
||||
};
|
||||
const fnGetPartsList = async () => {
|
||||
const resData = await getIdentifyingPartsListAll({
|
||||
RISK_UNIT_ID: form.value.RISK_UNIT_ID,
|
||||
});
|
||||
partsList.value = resData.partsList;
|
||||
};
|
||||
const fnDepartmentChange = () => {
|
||||
form.value.RISK_UNIT_ID = "";
|
||||
form.value.IDENTIFICATION_ID = "";
|
||||
unitList.value = [];
|
||||
partsList.value = [];
|
||||
};
|
||||
const fnRiskUnitChange = () => {
|
||||
form.value.IDENTIFICATION_ID = "";
|
||||
partsList.value = [];
|
||||
};
|
||||
const accidentTypeList = await layoutFnGetAccidentType();
|
||||
const fnGetLevelName = (LIKELIHOOD, EXPOSURE, CONSEQUENCE) => {
|
||||
const DANGER = (LIKELIHOOD * EXPOSURE * CONSEQUENCE).toFixed(2);
|
||||
if (DANGER > 320) {
|
||||
form.value.LEVELID = "levelA";
|
||||
form.value.LEVEL_NAME = "重大风险/A级";
|
||||
} else if (DANGER > 160) {
|
||||
form.value.LEVELID = "levelB";
|
||||
form.value.LEVEL_NAME = "较大风险/B级";
|
||||
} else if (DANGER > 70) {
|
||||
form.value.LEVELID = "levelC";
|
||||
form.value.LEVEL_NAME = "一般风险/C级";
|
||||
} else {
|
||||
form.value.LEVELID = "levelD";
|
||||
form.value.LEVEL_NAME = "低风险/D级";
|
||||
}
|
||||
form.value.DANGER = DANGER;
|
||||
};
|
||||
watch(
|
||||
[
|
||||
() => props.form.LIKELIHOOD,
|
||||
() => props.form.EXPOSURE,
|
||||
() => props.form.CONSEQUENCE,
|
||||
],
|
||||
([LIKELIHOOD, EXPOSURE, CONSEQUENCE]) => {
|
||||
if (!LIKELIHOOD || !EXPOSURE || !CONSEQUENCE) return;
|
||||
fnGetLevelName(LIKELIHOOD, EXPOSURE, CONSEQUENCE);
|
||||
}
|
||||
);
|
||||
watchEffect(() => {
|
||||
if (form.value.DEPARTMENT_ID) fnGetUnitList();
|
||||
if (form.value.RISK_UNIT_ID) fnGetPartsList();
|
||||
if (form.value.MANAGEMENT_CONTROL_ONE) fnControlList1Change();
|
||||
});
|
||||
const fnControlList1Change = () => {
|
||||
controlList2.value = [];
|
||||
const id = form.value.MANAGEMENT_CONTROL_ONE;
|
||||
let BZ = "";
|
||||
for (let i = 0; i < controlList1.value.length; i++) {
|
||||
if (controlList1.value[i].id === id) {
|
||||
BZ = controlList1.value[i].BZ;
|
||||
break;
|
||||
}
|
||||
}
|
||||
for (let i = 0; i < controlList2All.value.length; i++) {
|
||||
if (controlList2All.value[i].TBFIELD === BZ) {
|
||||
controlList2.value.push(controlList2All.value[i]);
|
||||
}
|
||||
}
|
||||
};
|
||||
const riskAddRef = ref(null);
|
||||
const fnClose = () => {
|
||||
formRef.value.resetFields();
|
||||
riskAddRef.value.reset();
|
||||
visible.value = false;
|
||||
};
|
||||
const fnSubmit = debounce(
|
||||
1000,
|
||||
async () => {
|
||||
await useFormValidate(formRef);
|
||||
const ACCIDENTS_NAME = accidentTypeList.value
|
||||
.filter((item) => form.value.ACCIDENTS.includes(item.BIANMA))
|
||||
.map((item) => item.NAME)
|
||||
.join(",");
|
||||
await riskAddRef.value.formValidate();
|
||||
const params = {
|
||||
...form.value,
|
||||
CHECK_CONTENT: form.value.MEASURES,
|
||||
ACCIDENTS: form.value.ACCIDENTS.join(","),
|
||||
ACCIDENTS_NAME,
|
||||
ACCIDENTS_NAME: riskAddRef.value.accidentsName(),
|
||||
};
|
||||
let resData = {};
|
||||
if (props.type === "add") resData = await setRiskControlLedgerAdd(params);
|
||||
|
|
|
@ -172,6 +172,7 @@
|
|||
<add
|
||||
v-model:visible="data.addOrEditDialog.visible"
|
||||
v-model:form="data.addOrEditDialog.form"
|
||||
control
|
||||
:type="data.addOrEditDialog.type"
|
||||
@get-data="fnResetPaginationTransfer"
|
||||
/>
|
||||
|
|
Loading…
Reference in New Issue