forked from integrated_whb/integrated_whb_vue
init
parent
2dfe2e9ee7
commit
55a5470adc
|
@ -1090,10 +1090,71 @@ export default [
|
|||
component:
|
||||
"safety_environmental_management/hazard_assignment_acceptance/hidden_list",
|
||||
},
|
||||
{
|
||||
path: "/safety_environmental_management/hazard_assignment_acceptance/assign/assign",
|
||||
meta: {
|
||||
title: "指派",
|
||||
activeMenu:
|
||||
"/safety_environmental_management/hazard_assignment_acceptance",
|
||||
},
|
||||
component:
|
||||
"safety_environmental_management/hazard_assignment_acceptance/assign",
|
||||
},
|
||||
{
|
||||
path: "/safety_environmental_management/hazard_assignment_acceptance/assign/acceptance",
|
||||
meta: {
|
||||
title: "验收",
|
||||
activeMenu:
|
||||
"/safety_environmental_management/hazard_assignment_acceptance",
|
||||
},
|
||||
component:
|
||||
"safety_environmental_management/hazard_assignment_acceptance/acceptance",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
path: "/safety_environmental_management/hazard_assignment_acceptance/acceptance",
|
||||
meta: {
|
||||
title: "验收",
|
||||
activeMenu:
|
||||
"/safety_environmental_management/hazard_assignment_acceptance",
|
||||
},
|
||||
component: "children",
|
||||
children: [
|
||||
{
|
||||
path: "",
|
||||
component:
|
||||
"safety_environmental_management/hazard_assignment_acceptance/hidden_list",
|
||||
},
|
||||
{
|
||||
path: "/safety_environmental_management/hazard_assignment_acceptance/acceptance/assign",
|
||||
meta: {
|
||||
title: "指派",
|
||||
activeMenu:
|
||||
"/safety_environmental_management/hazard_assignment_acceptance",
|
||||
},
|
||||
component:
|
||||
"safety_environmental_management/hazard_assignment_acceptance/acceptance",
|
||||
},
|
||||
{
|
||||
path: "/safety_environmental_management/hazard_assignment_acceptance/acceptance/acceptance",
|
||||
meta: {
|
||||
title: "验收",
|
||||
activeMenu:
|
||||
"/safety_environmental_management/hazard_assignment_acceptance",
|
||||
},
|
||||
component:
|
||||
"safety_environmental_management/hazard_assignment_acceptance/acceptance",
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
path: "/safety_environmental_management/hazard_management",
|
||||
meta: { title: "隐患管理", isSubMenu: false },
|
||||
component: "safety_environmental_management/hazard_management/index",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
|
|
|
@ -32,3 +32,9 @@ export const getHazardAssignmentAcceptanceList = (params) =>
|
|||
post("/safetyenvironmental/checkList", params); // 隐患指派与验收列表
|
||||
export const getHazardAssignmentAcceptanceHiddenList = (params) =>
|
||||
post("/hidden/listForAhZp", params); // 隐患指派与验收隐患列表
|
||||
export const setHazardAssignmentAcceptanceAssign = (params) =>
|
||||
post("/hidden/assign", params); // 隐患指派与验收隐患指派
|
||||
export const setHazardAssignmentAcceptanceAcceptance = (params) =>
|
||||
post("/hidden/finalcheck", params); // 隐患指派与验收隐患验收
|
||||
export const getHazardManagementList = (params) =>
|
||||
post("/hidden/listForSafetyEnvironmental", params); // 隐患管理列表
|
||||
|
|
|
@ -89,7 +89,7 @@
|
|||
查看
|
||||
</el-button>
|
||||
<el-button
|
||||
v-if="row.isUserself && buttonJurisdiction.del"
|
||||
v-if="row.isUserself && buttonJurisdiction.edit"
|
||||
type="primary"
|
||||
text
|
||||
link
|
||||
|
|
|
@ -50,6 +50,8 @@
|
|||
<span v-if="row.SOURCE === '1'">隐患快报</span>
|
||||
<span v-else-if="row.SOURCE === '2'">隐患排查</span>
|
||||
<span v-else-if="row.SOURCE === '3'">隐患排查</span>
|
||||
<span v-else-if="row.SOURCE === '4'"> 安全环保检查 </span>
|
||||
<span v-else-if="row.SOURCE === '5'"> 安全环保检查 </span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
|
|
|
@ -50,6 +50,8 @@
|
|||
<span v-if="row.SOURCE === '1'">隐患快报</span>
|
||||
<span v-else-if="row.SOURCE === '2'">隐患排查</span>
|
||||
<span v-else-if="row.SOURCE === '3'">隐患排查</span>
|
||||
<span v-else-if="row.SOURCE === '4'"> 安全环保检查 </span>
|
||||
<span v-else-if="row.SOURCE === '5'"> 安全环保检查 </span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
|
@ -97,7 +99,7 @@
|
|||
查看
|
||||
</el-button>
|
||||
<el-button
|
||||
v-if="buttonJurisdiction.del"
|
||||
v-if="buttonJurisdiction.edit"
|
||||
type="primary"
|
||||
text
|
||||
link
|
||||
|
|
|
@ -447,6 +447,7 @@ const fnInspectDepartmentChange = async (event, index) => {
|
|||
};
|
||||
const fnRectificationDepartmentChange = async (event) => {
|
||||
data.form.RECTIFICATIONOR = "";
|
||||
data.rectifierUserList = [];
|
||||
const resData = await getUserListAll({
|
||||
DEPARTMENT_ID: event,
|
||||
});
|
||||
|
|
|
@ -0,0 +1,113 @@
|
|||
<template>
|
||||
<layout-card>
|
||||
<layout-hidden-view :hidden-id="HIDDEN_ID" @throw-data="info = $event" />
|
||||
<el-divider content-position="left">安全环保检查验收</el-divider>
|
||||
<el-form ref="formRef" :model="form" :rules="rules" label-width="130px">
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="是否合格" prop="FINAL_CHECK">
|
||||
<el-radio-group ref="FINAL_CHECK" v-model="form.FINAL_CHECK">
|
||||
<el-radio label="1">是</el-radio>
|
||||
<el-radio label="2">否</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item prop="FINAL_CHECKTIME" label="验收时间">
|
||||
<el-date-picker
|
||||
v-model="form.FINAL_CHECKTIME"
|
||||
type="date"
|
||||
value-format="YYYY-MM-DD"
|
||||
format="YYYY-MM-DD"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item prop="FINAL_CHECKDESCR" label="验收意见">
|
||||
<el-input
|
||||
v-model="form.FINAL_CHECKDESCR"
|
||||
type="textarea"
|
||||
:autosize="{ minRows: 3 }"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item prop="file" label="验收图片">
|
||||
<layout-upload
|
||||
v-model:file-list="form.file"
|
||||
accept=".jpg,.jpeg,.png"
|
||||
list-type="picture-card"
|
||||
:limit="99"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<div class="mt-10 tc">
|
||||
<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 { ref } from "vue";
|
||||
import LayoutUpload from "@/components/upload/index.vue";
|
||||
import { debounce } from "throttle-debounce";
|
||||
import useFormValidate from "@/assets/js/useFormValidate.js";
|
||||
import { ElMessage } from "element-plus";
|
||||
import { setHazardAssignmentAcceptanceAcceptance } from "@/request/safety_environmental_management.js";
|
||||
import { setUploadImg } from "@/request/api.js";
|
||||
|
||||
const route = useRoute();
|
||||
const router = useRouter();
|
||||
const { HIDDEN_ID, INSPECTION_ID } = route.query;
|
||||
const rules = {
|
||||
FINAL_CHECK: [
|
||||
{ required: true, message: "请选择是否合格", trigger: "change" },
|
||||
],
|
||||
FINAL_CHECKTIME: [
|
||||
{ required: true, message: "请选择验收时间", trigger: "change" },
|
||||
],
|
||||
FINAL_CHECKDESCR: [
|
||||
{ required: true, message: "请输入验收意见", trigger: "blur" },
|
||||
],
|
||||
file: [{ required: true, message: "请上传验收图片", trigger: "change" }],
|
||||
};
|
||||
const info = ref({});
|
||||
const form = ref({
|
||||
FINAL_CHECK: "1",
|
||||
FINAL_CHECKTIME: "",
|
||||
FINAL_CHECKDESCR: "",
|
||||
file: [],
|
||||
});
|
||||
const formRef = ref(null);
|
||||
const fnSubmit = debounce(
|
||||
1000,
|
||||
async () => {
|
||||
await useFormValidate(formRef);
|
||||
await setHazardAssignmentAcceptanceAcceptance({
|
||||
...form.value,
|
||||
...info.value,
|
||||
INSPECTION_ID,
|
||||
});
|
||||
await fnUploadImage();
|
||||
ElMessage.success("提交成功");
|
||||
router.back();
|
||||
},
|
||||
{ atBegin: true }
|
||||
);
|
||||
const fnUploadImage = async () => {
|
||||
const formData = new FormData();
|
||||
for (let i = 0; i < form.value.file.length; i++) {
|
||||
if (form.value.file[i].raw)
|
||||
formData.append("FFILE", form.value.file[i].raw);
|
||||
}
|
||||
formData.append("FOREIGN_KEY", HIDDEN_ID);
|
||||
formData.append("TYPE", 50);
|
||||
await setUploadImg(formData);
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss"></style>
|
|
@ -0,0 +1,108 @@
|
|||
<template>
|
||||
<layout-card>
|
||||
<layout-hidden-view :hidden-id="HIDDEN_ID" @throw-data="info = $event" />
|
||||
<el-divider content-position="left">隐患整改</el-divider>
|
||||
<el-form ref="formRef" :model="form" :rules="rules" label-width="130px">
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="隐患级别" prop="HIDDENLEVELNAME">
|
||||
<el-input v-model="info.HIDDENLEVELNAME" disabled />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="整改完成期限" prop="RECTIFICATIONDEADLINE">
|
||||
<el-date-picker
|
||||
v-model="form.RECTIFICATIONDEADLINE"
|
||||
value-format="YYYY-MM-DD"
|
||||
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="fnRectificationDepartmentChange"
|
||||
/>
|
||||
</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 rectifierUserList"
|
||||
:key="item.USER_ID"
|
||||
:label="item.NAME"
|
||||
:value="item.USER_ID"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<div class="mt-10 tc">
|
||||
<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 { ref } from "vue";
|
||||
import LayoutDepartment from "@/components/department/index.vue";
|
||||
import { getUserListAll } from "@/request/data_dictionary.js";
|
||||
import { debounce } from "throttle-debounce";
|
||||
import useFormValidate from "@/assets/js/useFormValidate.js";
|
||||
import { ElMessage } from "element-plus";
|
||||
import { setHazardAssignmentAcceptanceAssign } from "@/request/safety_environmental_management.js";
|
||||
|
||||
const route = useRoute();
|
||||
const router = useRouter();
|
||||
const { HIDDEN_ID, INSPECTION_ID } = route.query;
|
||||
const rules = {
|
||||
RECTIFICATIONDEADLINE: [
|
||||
{ required: true, message: "请选择整改完成期限", trigger: "change" },
|
||||
],
|
||||
RECTIFICATIONDEPT: [
|
||||
{ required: true, message: "请选择整改负责人部门", trigger: "change" },
|
||||
],
|
||||
RECTIFICATIONOR: [
|
||||
{ required: true, message: "请选择整改人", trigger: "change" },
|
||||
],
|
||||
};
|
||||
const info = ref({});
|
||||
const form = ref({
|
||||
RECTIFICATIONDEADLINE: "",
|
||||
RECTIFICATIONDEPT: "",
|
||||
RECTIFICATIONOR: "",
|
||||
});
|
||||
const formRef = ref(null);
|
||||
const rectifierUserList = ref([]);
|
||||
const fnRectificationDepartmentChange = async (event) => {
|
||||
form.value.RECTIFICATIONOR = "";
|
||||
rectifierUserList.value = [];
|
||||
const resData = await getUserListAll({
|
||||
DEPARTMENT_ID: event,
|
||||
});
|
||||
rectifierUserList.value = resData.userList;
|
||||
};
|
||||
const fnSubmit = debounce(
|
||||
1000,
|
||||
async () => {
|
||||
await useFormValidate(formRef);
|
||||
await setHazardAssignmentAcceptanceAssign({
|
||||
HIDDEN_STATUS: "-2",
|
||||
INSPECTION_ID,
|
||||
...form.value,
|
||||
...info.value,
|
||||
});
|
||||
ElMessage.success("提交成功");
|
||||
router.back();
|
||||
},
|
||||
{ atBegin: true }
|
||||
);
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss"></style>
|
|
@ -19,17 +19,7 @@
|
|||
</el-table-column>
|
||||
<el-table-column label="操作" width="120">
|
||||
<template #default="{ row }">
|
||||
<el-button
|
||||
type="primary"
|
||||
text
|
||||
link
|
||||
@click="
|
||||
router.push({
|
||||
path: '/safety_environmental_management/hazard_assignment_acceptance/view',
|
||||
query: { INSPECTION_ID: row.INSPECTION_ID },
|
||||
})
|
||||
"
|
||||
>
|
||||
<el-button type="primary" text link @click="fnView(row.HIDDEN_ID)">
|
||||
查看
|
||||
</el-button>
|
||||
<el-button
|
||||
|
@ -40,7 +30,15 @@
|
|||
type="primary"
|
||||
text
|
||||
link
|
||||
@click="goAssign(row, '-2')"
|
||||
@click="
|
||||
router.push({
|
||||
path: `${route.path}/assign`,
|
||||
query: {
|
||||
HIDDEN_ID: row.HIDDEN_ID,
|
||||
INSPECTION_ID,
|
||||
},
|
||||
})
|
||||
"
|
||||
>
|
||||
指派
|
||||
</el-button>
|
||||
|
@ -53,7 +51,15 @@
|
|||
type="primary"
|
||||
text
|
||||
link
|
||||
@click="goAccept(row)"
|
||||
@click="
|
||||
router.push({
|
||||
path: `${route.path}/acceptance`,
|
||||
query: {
|
||||
HIDDEN_ID: row.HIDDEN_ID,
|
||||
INSPECTION_ID,
|
||||
},
|
||||
})
|
||||
"
|
||||
>
|
||||
验收
|
||||
</el-button>
|
||||
|
@ -61,6 +67,10 @@
|
|||
</el-table-column>
|
||||
</layout-table>
|
||||
</layout-card>
|
||||
<view-hidden
|
||||
v-model:visible="data.viewDialog.visible"
|
||||
:id="data.viewDialog.HIDDEN_ID"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
@ -70,6 +80,8 @@ import { serialNumber, translationStatus } from "@/assets/js/utils";
|
|||
import useListData from "@/assets/js/useListData.js";
|
||||
import { getHazardAssignmentAcceptanceHiddenList } from "@/request/safety_environmental_management.js";
|
||||
import { useUserStore } from "@/pinia/user.js";
|
||||
import ViewHidden from "../safety_environmental/components/view_hidden.vue";
|
||||
import { reactive } from "vue";
|
||||
|
||||
const stateList = [
|
||||
{ ID: "101", NAME: "待整改" },
|
||||
|
@ -83,15 +95,24 @@ const stateList = [
|
|||
];
|
||||
const router = useRouter();
|
||||
const route = useRoute();
|
||||
console.log(route);
|
||||
const { INSPECTION_ID } = route.query;
|
||||
const userStore = useUserStore();
|
||||
const USER_ID = userStore.getUserInfo.USER_ID;
|
||||
const { list, pagination, fnGetData } = useListData(
|
||||
getHazardAssignmentAcceptanceHiddenList,
|
||||
{
|
||||
otherParams: { INSPECTION_ID },
|
||||
}
|
||||
{ otherParams: { INSPECTION_ID } }
|
||||
);
|
||||
const data = reactive({
|
||||
viewDialog: {
|
||||
visible: false,
|
||||
HIDDEN_ID: "",
|
||||
},
|
||||
});
|
||||
const fnView = (HIDDEN_ID) => {
|
||||
data.viewDialog.visible = true;
|
||||
data.viewDialog.HIDDEN_ID = HIDDEN_ID;
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped></style>
|
||||
|
|
|
@ -7,24 +7,22 @@
|
|||
@submit.prevent="fnResetPaginationTransfer"
|
||||
>
|
||||
<el-row>
|
||||
<el-col :span="4">
|
||||
<el-form-item label="被检查单位" prop="INSPECTED_DEPARTMENT_ID">
|
||||
<layout-department v-model="searchForm.INSPECTED_DEPARTMENT_ID" />
|
||||
<el-col :span="6">
|
||||
<el-form-item label="被检查单位" prop="INSPECTED_DEPARTMENT_NAME">
|
||||
<el-input v-model="searchForm.INSPECTED_DEPARTMENT_NAME" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-form-item label="检查部门" prop="INSPECTION_DEPARTMENT_ID">
|
||||
<layout-department
|
||||
v-model="searchForm.INSPECTION_DEPARTMENT_ID"
|
||||
/>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="检查部门" prop="INSPECTION_DEPARTMENT_NAME">
|
||||
<el-input v-model="searchForm.INSPECTION_DEPARTMENT_NAME" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-col :span="6">
|
||||
<el-form-item label="检查发起人" prop="INSPECTION_ORIGINATOR_NAME">
|
||||
<el-input v-model="searchForm.INSPECTION_ORIGINATOR_NAME" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-col :span="6">
|
||||
<el-form-item label="检查类型" prop="INSPECTION_TYPE">
|
||||
<layout-inspection-type v-model="searchForm.INSPECTION_TYPE" />
|
||||
</el-form-item>
|
||||
|
@ -40,8 +38,8 @@
|
|||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-form-item label="检查状态" prop="INSPECTION_STATUS">
|
||||
<el-col :span="6">
|
||||
<el-form-item label="隐患处理状态" prop="INSPECTION_STATUS">
|
||||
<el-select v-model="searchForm.INSPECTION_STATUS">
|
||||
<el-option
|
||||
v-for="item in stateList"
|
||||
|
@ -52,7 +50,7 @@
|
|||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-col :span="6">
|
||||
<el-form-item label="检查题目" prop="INSPECTION_SUBJECT">
|
||||
<el-select v-model="searchForm.INSPECTION_SUBJECT">
|
||||
<el-option
|
||||
|
@ -86,7 +84,7 @@
|
|||
{{ serialNumber(pagination, $index) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="INSPECTED_DEPARTMENT_NAMES" label="被检查单位" />
|
||||
<el-table-column prop="INSPECTED_DEPARTMENT_NAME" label="被检查单位" />
|
||||
<el-table-column
|
||||
prop="INSPECTED_SITEUSER_NAME"
|
||||
label="被检查单位现场负责人"
|
||||
|
@ -175,23 +173,18 @@
|
|||
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 LayoutInspectionType from "@/components/inspection_type/index.vue";
|
||||
import { getHazardAssignmentAcceptanceList } from "@/request/safety_environmental_management.js";
|
||||
import { useUserStore } from "@/pinia/user.js";
|
||||
|
||||
const stateList = [
|
||||
{ ID: "0", NAME: "待检查人核实" },
|
||||
{ ID: "1", NAME: "检查人核实中" },
|
||||
{ ID: "2", NAME: "待被检查人确认" },
|
||||
{ ID: "3-7", NAME: "请选择" },
|
||||
{ ID: "3", NAME: "待指派整改人" },
|
||||
{ ID: "4", NAME: "指派中" },
|
||||
{ ID: "5", NAME: "指派完成" },
|
||||
{ ID: "6", NAME: "检查待验收" },
|
||||
{ ID: "7", NAME: "检查已验收" },
|
||||
{ ID: "8", NAME: "已归档" },
|
||||
{ ID: "-1", NAME: "检查人核实打回" },
|
||||
{ ID: "-2", NAME: "被检查人申辩" },
|
||||
];
|
||||
const inspectionQuestionList = [
|
||||
{ ID: "安全", NAME: "安全" },
|
||||
|
|
|
@ -0,0 +1,202 @@
|
|||
<template>
|
||||
<div>
|
||||
<el-card>
|
||||
<el-form
|
||||
:model="searchForm"
|
||||
label-width="100px"
|
||||
@submit.prevent="fnResetPagination"
|
||||
>
|
||||
<el-row>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="被检查单位" prop="INSPECTED_DEPARTMENT_NAME">
|
||||
<el-input v-model="searchForm.INSPECTED_DEPARTMENT_NAME" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="检查部门" prop="INSPECTION_DEPARTMENT_NAME">
|
||||
<el-input v-model="searchForm.INSPECTION_DEPARTMENT_NAME" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="隐患发现人" prop="CREATOR_NAME">
|
||||
<el-input v-model="searchForm.CREATOR_NAME" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="隐患描述" prop="HIDDENDESCR">
|
||||
<el-input v-model="searchForm.HIDDENDESCR" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="隐患状态" prop="HIDDEN_STATUS">
|
||||
<el-select v-model="searchForm.HIDDEN_STATUS">
|
||||
<el-option
|
||||
v-for="item in hiddenStatusList"
|
||||
:key="item.ID"
|
||||
:label="item.NAME"
|
||||
:value="item.ID"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="检查状态" prop="INSPECTION_STATUS">
|
||||
<el-select v-model="searchForm.INSPECTION_STATUS">
|
||||
<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="检查题目" prop="INSPECTION_SUBJECT">
|
||||
<el-select v-model="searchForm.INSPECTION_SUBJECT">
|
||||
<el-option
|
||||
v-for="item in inspectionQuestionList"
|
||||
: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="fnResetPagination">
|
||||
重置
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</el-card>
|
||||
<layout-card>
|
||||
<layout-table
|
||||
:data="list"
|
||||
@get-data="fnGetData"
|
||||
v-model:pagination="pagination"
|
||||
>
|
||||
<el-table-column label="序号" width="60">
|
||||
<template #default="{ $index }">
|
||||
{{ serialNumber(pagination, $index) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="INSPECTED_DEPARTMENT_NAMES" label="被检查单位" />
|
||||
<el-table-column prop="INSPECTION_DEPARTMENT_NAME" label="检查部门" />
|
||||
<el-table-column prop="HIDDENDESCR" label="隐患描述" />
|
||||
<el-table-column prop="CREATOR_NAME" label="隐患发现人" />
|
||||
<el-table-column label="隐患状态" width="120">
|
||||
<template v-slot="{ row }">
|
||||
{{ translationStatus(row.HIDDEN_STATUS, hiddenStatusList) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="检查状态" width="120">
|
||||
<template v-slot="{ row }">
|
||||
{{
|
||||
fnTranslateInspection(row.INSPECTION_STATUS, row.HIDDEN_STATUS)
|
||||
}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="INSPECTION_SUBJECT"
|
||||
label="检查题目"
|
||||
width="120"
|
||||
/>
|
||||
<el-table-column label="操作" width="120">
|
||||
<template #default="{ row }">
|
||||
<el-button type="primary" text link @click="fnView(row.HIDDEN_ID)">
|
||||
查看
|
||||
</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
text
|
||||
link
|
||||
@click="fnFlowChart(row.HIDDEN_ID)"
|
||||
>
|
||||
流程图
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</layout-table>
|
||||
</layout-card>
|
||||
<flow-chart
|
||||
v-model:visible="data.flowChartDialog.visible"
|
||||
:id="data.flowChartDialog.HIDDEN_ID"
|
||||
type="hidden"
|
||||
/>
|
||||
<view-hidden
|
||||
v-model:visible="data.viewDialog.visible"
|
||||
:id="data.viewDialog.HIDDEN_ID"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { serialNumber, translationStatus } from "@/assets/js/utils";
|
||||
import useListData from "@/assets/js/useListData.js";
|
||||
import { getHazardManagementList } from "@/request/safety_environmental_management.js";
|
||||
import FlowChart from "../safety_environmental/components/flow_chart.vue";
|
||||
import ViewHidden from "../safety_environmental/components/view_hidden.vue";
|
||||
import { reactive } from "vue";
|
||||
|
||||
const stateList = [
|
||||
{ ID: "3", NAME: "待指派整改人" },
|
||||
{ ID: "4", NAME: "指派中" },
|
||||
{ ID: "5", NAME: "指派完成" },
|
||||
{ ID: "6", NAME: "检查待验收" },
|
||||
{ ID: "7", NAME: "检查已验收" },
|
||||
{ ID: "8", NAME: "已归档" },
|
||||
];
|
||||
const inspectionQuestionList = [
|
||||
{ ID: "安全", NAME: "安全" },
|
||||
{ ID: "环保", NAME: "环保" },
|
||||
{ ID: "综合", NAME: "综合" },
|
||||
];
|
||||
const hiddenStatusList = [
|
||||
{ ID: "101", NAME: "待指派整改人" },
|
||||
{ ID: "-2", NAME: "待确认" },
|
||||
{ ID: "1", NAME: "未整改" },
|
||||
{ ID: "2", NAME: "已整改" },
|
||||
{ ID: "4", NAME: "已验收" },
|
||||
{ ID: "10", NAME: "验收打回" },
|
||||
{ ID: "7", NAME: "待处理的特殊隐患" },
|
||||
{ ID: "8", NAME: "已处理的特殊隐患" },
|
||||
{ ID: "-1", NAME: "已过期" },
|
||||
{ ID: "16", NAME: "确认打回" },
|
||||
];
|
||||
const { list, pagination, searchForm, fnGetData, fnResetPagination } =
|
||||
useListData(getHazardManagementList);
|
||||
const data = reactive({
|
||||
flowChartDialog: {
|
||||
visible: false,
|
||||
HIDDEN_ID: "",
|
||||
},
|
||||
viewDialog: {
|
||||
visible: false,
|
||||
HIDDEN_ID: "",
|
||||
},
|
||||
});
|
||||
const fnTranslateInspection = (INSPECTION_STATUS, HIDDEN_STATUS) => {
|
||||
for (let i = 0; i < stateList.length; i++) {
|
||||
if (stateList[i].ID === "6") {
|
||||
if (HIDDEN_STATUS === "4") {
|
||||
return "检查已验收";
|
||||
}
|
||||
} else if (stateList[i].ID === INSPECTION_STATUS) return stateList[i].NAME;
|
||||
}
|
||||
};
|
||||
const fnFlowChart = (HIDDEN_ID) => {
|
||||
data.flowChartDialog.visible = true;
|
||||
data.flowChartDialog.HIDDEN_ID = HIDDEN_ID;
|
||||
};
|
||||
const fnView = (HIDDEN_ID) => {
|
||||
data.viewDialog.visible = true;
|
||||
data.viewDialog.HIDDEN_ID = HIDDEN_ID;
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped></style>
|
|
@ -7,24 +7,22 @@
|
|||
@submit.prevent="fnResetPaginationTransfer"
|
||||
>
|
||||
<el-row>
|
||||
<el-col :span="4">
|
||||
<el-form-item label="被检查单位" prop="INSPECTED_DEPARTMENT_ID">
|
||||
<layout-department v-model="searchForm.INSPECTED_DEPARTMENT_ID" />
|
||||
<el-col :span="6">
|
||||
<el-form-item label="被检查单位" prop="INSPECTED_DEPARTMENT_NAME">
|
||||
<el-input v-model="searchForm.INSPECTED_DEPARTMENT_NAME" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-form-item label="检查部门" prop="INSPECTION_DEPARTMENT_ID">
|
||||
<layout-department
|
||||
v-model="searchForm.INSPECTION_DEPARTMENT_ID"
|
||||
/>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="检查部门" prop="INSPECTION_DEPARTMENT_NAME">
|
||||
<el-input v-model="searchForm.INSPECTION_DEPARTMENT_NAME" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-col :span="6">
|
||||
<el-form-item label="检查发起人" prop="INSPECTION_ORIGINATOR_NAME">
|
||||
<el-input v-model="searchForm.INSPECTION_ORIGINATOR_NAME" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-col :span="6">
|
||||
<el-form-item label="检查类型" prop="INSPECTION_TYPE">
|
||||
<layout-inspection-type v-model="searchForm.INSPECTION_TYPE" />
|
||||
</el-form-item>
|
||||
|
@ -40,7 +38,7 @@
|
|||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-col :span="6">
|
||||
<el-form-item label="检查状态" prop="INSPECTION_STATUS">
|
||||
<el-select v-model="searchForm.INSPECTION_STATUS">
|
||||
<el-option
|
||||
|
@ -52,7 +50,7 @@
|
|||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-col :span="6">
|
||||
<el-form-item label="检查题目" prop="INSPECTION_SUBJECT">
|
||||
<el-select v-model="searchForm.INSPECTION_SUBJECT">
|
||||
<el-option
|
||||
|
@ -158,7 +156,6 @@ 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 LayoutDepartment from "@/components/department/index.vue";
|
||||
import LayoutInspectionType from "@/components/inspection_type/index.vue";
|
||||
import {
|
||||
getInspectedPersonConfirmHiddenCount,
|
||||
|
@ -173,11 +170,6 @@ const stateList = [
|
|||
{ ID: "1", NAME: "检查人核实中" },
|
||||
{ ID: "2", NAME: "待被检查人确认" },
|
||||
{ ID: "3", NAME: "待指派整改人" },
|
||||
{ ID: "4", NAME: "指派中" },
|
||||
{ ID: "5", NAME: "指派完成" },
|
||||
{ ID: "6", NAME: "检查待验收" },
|
||||
{ ID: "7", NAME: "检查已验收" },
|
||||
{ ID: "8", NAME: "已归档" },
|
||||
{ ID: "-1", NAME: "检查人核实打回" },
|
||||
{ ID: "-2", NAME: "被检查人申辩" },
|
||||
];
|
||||
|
|
|
@ -8,15 +8,13 @@
|
|||
>
|
||||
<el-row>
|
||||
<el-col :span="4">
|
||||
<el-form-item label="被检查单位" prop="INSPECTED_DEPARTMENT_ID">
|
||||
<layout-department v-model="searchForm.INSPECTED_DEPARTMENT_ID" />
|
||||
<el-form-item label="被检查单位" prop="INSPECTED_DEPARTMENT_NAME">
|
||||
<el-input v-model="searchForm.INSPECTED_DEPARTMENT_NAME" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-form-item label="检查部门" prop="INSPECTION_DEPARTMENT_ID">
|
||||
<layout-department
|
||||
v-model="searchForm.INSPECTION_DEPARTMENT_ID"
|
||||
/>
|
||||
<el-form-item label="检查部门" prop="INSPECTION_DEPARTMENT_NAME">
|
||||
<el-input v-model="searchForm.INSPECTION_DEPARTMENT_NAME" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
|
@ -157,7 +155,6 @@ 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 LayoutDepartment from "@/components/department/index.vue";
|
||||
import LayoutInspectionType from "@/components/inspection_type/index.vue";
|
||||
import { getInspectorsVerifyManagementList } from "@/request/safety_environmental_management.js";
|
||||
import { reactive } from "vue";
|
||||
|
@ -170,8 +167,8 @@ const stateList = [
|
|||
{ ID: "3", NAME: "待指派整改人" },
|
||||
{ ID: "4", NAME: "指派中" },
|
||||
{ ID: "5", NAME: "指派完成" },
|
||||
{ ID: "6", NAME: "检查待验收" },
|
||||
{ ID: "7", NAME: "检查已验收" },
|
||||
{ ID: "6", NAME: "待验收" },
|
||||
{ ID: "7", NAME: "已验收" },
|
||||
{ ID: "8", NAME: "已归档" },
|
||||
{ ID: "-1", NAME: "检查人核实打回" },
|
||||
{ ID: "-2", NAME: "被检查人申辩" },
|
||||
|
|
|
@ -254,12 +254,15 @@ import {
|
|||
setSafetyEnvironmentalAdd,
|
||||
setSafetyEnvironmentalEdit,
|
||||
} from "@/request/safety_environmental_management.js";
|
||||
import { setUploadImg, setUploadVideo } from "@/request/api.js";
|
||||
import { setUploadImg } from "@/request/api.js";
|
||||
import dayjs from "dayjs";
|
||||
|
||||
const route = useRoute();
|
||||
const router = useRouter();
|
||||
const userStore = useUserStore();
|
||||
const USER_ID = userStore.getUserInfo.USER_ID;
|
||||
const NAME = userStore.getUserInfo.NAME;
|
||||
const DEPARTMENT_ID = userStore.getUserInfo.DEPARTMENT_ID;
|
||||
const { INSPECTION_ID } = route.query;
|
||||
const rules = {
|
||||
INSPECTION_SUBJECT: [
|
||||
|
@ -371,12 +374,7 @@ watchEffect(() => {
|
|||
});
|
||||
const fnAddHidden = () => {
|
||||
data.addHiddenDialog.visible = true;
|
||||
data.addHiddenDialog.hazardDiscovererList = [
|
||||
{
|
||||
NAME: userStore.getUserInfo.NAME,
|
||||
USER_ID: userStore.getUserInfo.USER_ID,
|
||||
},
|
||||
];
|
||||
data.addHiddenDialog.hazardDiscovererList = [];
|
||||
const inspectorList = data.form.inspectorList;
|
||||
for (let i = 0; i < inspectorList.length; i++) {
|
||||
const inspectionUserList = inspectorList[i].inspectionUserList;
|
||||
|
@ -389,6 +387,13 @@ const fnAddHidden = () => {
|
|||
}
|
||||
}
|
||||
}
|
||||
if (
|
||||
!data.addHiddenDialog.hazardDiscovererList.some(
|
||||
(item) => USER_ID === item.USER_ID
|
||||
)
|
||||
) {
|
||||
data.addHiddenDialog.hazardDiscovererList.unshift({ NAME, USER_ID });
|
||||
}
|
||||
};
|
||||
const fnAddHiddenSubmit = (item) => {
|
||||
data.form.hiddenList.push(item);
|
||||
|
@ -398,22 +403,18 @@ const fnSubmit = debounce(
|
|||
async () => {
|
||||
await useFormValidate(formRef);
|
||||
const inspectorList = [...data.form.inspectorList];
|
||||
if (
|
||||
!inspectorList.some(
|
||||
(item) => userStore.getUserInfo.USER_ID === item.INSPECTION_USER_ID
|
||||
)
|
||||
) {
|
||||
if (!inspectorList.some((item) => USER_ID === item.INSPECTION_USER_ID)) {
|
||||
inspectorList.push({
|
||||
INSPECTION_INSPECTOR_ID: "",
|
||||
INSPECTION_DEPARTMENT_ID: userStore.getUserInfo.DEPARTMENT_ID,
|
||||
INSPECTION_USER_ID: userStore.getUserInfo.USER_ID,
|
||||
INSPECTION_DEPARTMENT_ID: DEPARTMENT_ID,
|
||||
INSPECTION_USER_ID: USER_ID,
|
||||
});
|
||||
}
|
||||
let hiddenList = [];
|
||||
if (!INSPECTION_ID) {
|
||||
const resData = await setSafetyEnvironmentalAdd({
|
||||
...data.form,
|
||||
HIDDENFINDDEPT: userStore.getUserInfo.DEPARTMENT_ID,
|
||||
HIDDENFINDDEPT: DEPARTMENT_ID,
|
||||
INSPECTORJSON: JSON.stringify(inspectorList),
|
||||
SITUATIONJSON: JSON.stringify(data.form.situationList),
|
||||
HIDDENJSON: JSON.stringify(data.form.hiddenList),
|
||||
|
@ -435,7 +436,7 @@ const fnSubmit = debounce(
|
|||
hiddenList[i].HIDDEN_ID,
|
||||
data.form.hiddenList[i].hiddenImgs
|
||||
);
|
||||
await fnUploadVideo(
|
||||
await fnUploadImage(
|
||||
hiddenList[i].HIDDEN_ID,
|
||||
data.form.hiddenList[i].videoFiles
|
||||
);
|
||||
|
@ -454,15 +455,6 @@ const fnUploadImage = async (HIDDEN_ID, files) => {
|
|||
formData.append("TYPE", 3);
|
||||
await setUploadImg(formData);
|
||||
};
|
||||
const fnUploadVideo = async (HIDDEN_ID, files) => {
|
||||
const formData = new FormData();
|
||||
for (let i = 0; i < files.length; i++) {
|
||||
formData.append("FFILE", files[i]);
|
||||
}
|
||||
formData.append("FOREIGN_KEY", HIDDEN_ID);
|
||||
formData.append("TYPE", 102);
|
||||
await setUploadVideo(formData);
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss"></style>
|
||||
|
|
|
@ -71,12 +71,12 @@ const graphOptions = ref({
|
|||
defaultNodeWidth: 200,
|
||||
});
|
||||
const fnGetData = async () => {
|
||||
if (props.type === "list") {
|
||||
if (props.type === "inspect") {
|
||||
const { nodes, from } = await getSafetyEnvironmentalListFlowChart({
|
||||
INSPECTION_ID: props.id,
|
||||
});
|
||||
fnSeeksGraph(nodes, from);
|
||||
} else if (props.type === "view") {
|
||||
} else if (props.type === "hidden") {
|
||||
const { nodes, from } = await getSafetyEnvironmentalViewFlowChart({
|
||||
HIDDEN_ID: props.id,
|
||||
});
|
||||
|
|
|
@ -215,7 +215,7 @@
|
|||
<flow-chart
|
||||
v-model:visible="data.flowChartDialog.visible"
|
||||
:id="data.flowChartDialog.INSPECTION_ID"
|
||||
type="list"
|
||||
type="inspect"
|
||||
/>
|
||||
<defense
|
||||
v-model:visible="data.defenseDialog.visible"
|
||||
|
|
|
@ -136,7 +136,7 @@
|
|||
<flow-chart
|
||||
v-model:visible="data.flowChartDialog.visible"
|
||||
:id="data.flowChartDialog.HIDDEN_ID"
|
||||
type="view"
|
||||
type="hidden"
|
||||
/>
|
||||
<view-hidden
|
||||
v-model:visible="data.viewDialog.visible"
|
||||
|
|
Loading…
Reference in New Issue