forked from integrated_whb/integrated_whb_vue
init
parent
baca47e4cf
commit
eb43ac1e95
2
.env
2
.env
|
@ -1,4 +1,4 @@
|
|||
VITE_BASE_URL=http://192.168.0.42:8099/
|
||||
VITE_BASE_URL=http://192.168.0.49:8099/
|
||||
VITE_PROXY=/api/
|
||||
VITE_FILE_URL=https://file.zcloudchina.com/YTHFile
|
||||
VITE_TEMPLATE_URL=https://qaaq.qhdsafety.com/file/
|
||||
|
|
|
@ -997,6 +997,88 @@ export default [
|
|||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
path: "/safety_environmental_management/inspectors_verify_management",
|
||||
meta: { title: "检查人核实管理", isSubMenu: false },
|
||||
component: "children",
|
||||
children: [
|
||||
{
|
||||
path: "",
|
||||
component:
|
||||
"safety_environmental_management/inspectors_verify_management/index",
|
||||
},
|
||||
{
|
||||
path: "/safety_environmental_management/inspectors_verify_management/view",
|
||||
meta: {
|
||||
title: "查看",
|
||||
activeMenu:
|
||||
"/safety_environmental_management/inspectors_verify_management",
|
||||
},
|
||||
component:
|
||||
"safety_environmental_management/inspectors_verify_management/view",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
path: "/safety_environmental_management/inspected_person_confirm",
|
||||
meta: { title: "被检查人确认", isSubMenu: false },
|
||||
component: "children",
|
||||
children: [
|
||||
{
|
||||
path: "",
|
||||
component:
|
||||
"safety_environmental_management/inspected_person_confirm/index",
|
||||
},
|
||||
{
|
||||
path: "/safety_environmental_management/inspected_person_confirm/view",
|
||||
meta: {
|
||||
title: "查看",
|
||||
activeMenu:
|
||||
"/safety_environmental_management/inspected_person_confirm",
|
||||
},
|
||||
component:
|
||||
"safety_environmental_management/inspected_person_confirm/view",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
path: "/safety_environmental_management/hazard_assignment_acceptance",
|
||||
meta: { title: "隐患指派与验收", isSubMenu: false },
|
||||
component: "children",
|
||||
children: [
|
||||
{
|
||||
path: "",
|
||||
component:
|
||||
"safety_environmental_management/hazard_assignment_acceptance/index",
|
||||
},
|
||||
{
|
||||
path: "/safety_environmental_management/hazard_assignment_acceptance/view",
|
||||
meta: {
|
||||
title: "查看",
|
||||
activeMenu:
|
||||
"/safety_environmental_management/hazard_assignment_acceptance",
|
||||
},
|
||||
component:
|
||||
"safety_environmental_management/hazard_assignment_acceptance/view",
|
||||
},
|
||||
{
|
||||
path: "/safety_environmental_management/hazard_assignment_acceptance/assign",
|
||||
meta: {
|
||||
title: "指派",
|
||||
activeMenu:
|
||||
"/safety_environmental_management/hazard_assignment_acceptance",
|
||||
},
|
||||
component: "children",
|
||||
children: [
|
||||
{
|
||||
path: "",
|
||||
component:
|
||||
"safety_environmental_management/hazard_assignment_acceptance/hidden_list",
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
|
|
|
@ -273,6 +273,7 @@ const fnGetData = async () => {
|
|||
data.info = resData.pd;
|
||||
data.hs = resData.hs;
|
||||
data.checkList = resData.checkList;
|
||||
data.hImgs = [];
|
||||
for (let i = 0; i < resData.hImgs.length; i++) {
|
||||
if (getFileSuffix(resData.hImgs[i].FILEPATH) === "mp4") {
|
||||
data.videoDialog.src = resData.hImgs[i].FILEPATH;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { post } from "@/request/axios.js";
|
||||
import { post, upload } from "@/request/axios.js";
|
||||
|
||||
export const getSafetyEnvironmentalList = (params) =>
|
||||
post("/safetyenvironmental/list", params); // 安全环保管理列表
|
||||
|
@ -10,7 +10,25 @@ export const setSafetyEnvironmentalDefense = (params) =>
|
|||
post("/safetyenvironmental/explain", params); // 安全环保管理申辩
|
||||
export const setSafetyEnvironmentalAdd = (params) =>
|
||||
post("/safetyenvironmental/add", params); // 安全环保管理新增
|
||||
export const getSafetyEnvironmentalView = (params) =>
|
||||
export const setSafetyEnvironmentalEdit = (params) =>
|
||||
post("/safetyenvironmental/edit", params); // 安全环保管理编辑
|
||||
export const getSafetyEnvironmentalViewInfo = (params) =>
|
||||
post("/safetyenvironmental/goShow", params); // 安全环保管理查看
|
||||
export const getSafetyEnvironmentalView = (params) =>
|
||||
post("/safetyenvironmental/goEdit", params); // 安全环保管理查看
|
||||
export const getSafetyEnvironmentalViewFlowChart = (params) =>
|
||||
post("/safetyenvironmental/getFlowChart", params); // 安全环保管理查看流程图
|
||||
export const getInspectorsVerifyManagementList = (params) =>
|
||||
post("/safetyenvironmentalinspector/list", params); // 检查人核实列表
|
||||
export const setInspectorsVerifyManagementVerify = (params) =>
|
||||
post("/safetyenvironmentalinspector/verify", params); // 检查人核实管理核实
|
||||
export const getInspectedPersonConfirmList = (params) =>
|
||||
post("/safetyenvironmentalexplain/list", params); // 被检查人确认列表
|
||||
export const getInspectedPersonConfirmHiddenCount = (params) =>
|
||||
post("/safetyenvironmentalexplain/hiddencount", params); // 被检查人确认获取隐患数量
|
||||
export const setInspectedPersonConfirmSubmit = (params) =>
|
||||
upload("/safetyenvironmentalexplain/add", params); // 被检查人确认提交
|
||||
export const getHazardAssignmentAcceptanceList = (params) =>
|
||||
post("/safetyenvironmental/checkList", params); // 隐患指派与验收列表
|
||||
export const getHazardAssignmentAcceptanceHiddenList = (params) =>
|
||||
post("/hidden/listForAhZp", params); // 隐患指派与验收隐患列表
|
||||
|
|
|
@ -31,9 +31,9 @@
|
|||
<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"
|
||||
type="datetime"
|
||||
value-format="YYYY-MM-DD HH:mm"
|
||||
format="YYYY-MM-DD HH:mm"
|
||||
placeholder="选择日期"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
|
|
@ -62,9 +62,9 @@
|
|||
<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"
|
||||
value-format="YYYY-MM-DD HH:mm"
|
||||
format="YYYY-MM-DD HH:mm"
|
||||
type="datetime"
|
||||
placeholder="选择日期"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
|
|
@ -0,0 +1,97 @@
|
|||
<template>
|
||||
<div>
|
||||
<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="HIDDENDESCR" label="隐患描述" />
|
||||
<el-table-column label="隐患状态">
|
||||
<template v-slot="{ row }">
|
||||
{{ translationStatus(row.HIDDEN_STATUS, stateList) }}
|
||||
</template>
|
||||
</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>
|
||||
<el-button
|
||||
v-if="
|
||||
row.INSPECTED_SITEUSER_ID === USER_ID &&
|
||||
(row.HIDDEN_STATUS === '101' || row.HIDDEN_STATUS === '16')
|
||||
"
|
||||
type="primary"
|
||||
text
|
||||
link
|
||||
@click="goAssign(row, '-2')"
|
||||
>
|
||||
指派
|
||||
</el-button>
|
||||
<el-button
|
||||
v-if="
|
||||
row.CREATOR === USER_ID &&
|
||||
(row.HIDDEN_STATUS === '4' || row.HIDDEN_STATUS === '8') &&
|
||||
(!row.FINAL_CHECK || row.FINAL_CHECK === '2')
|
||||
"
|
||||
type="primary"
|
||||
text
|
||||
link
|
||||
@click="goAccept(row)"
|
||||
>
|
||||
验收
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</layout-table>
|
||||
</layout-card>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { useRoute, useRouter } from "vue-router";
|
||||
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";
|
||||
|
||||
const stateList = [
|
||||
{ ID: "101", NAME: "待整改" },
|
||||
{ ID: "1", NAME: "待整改" },
|
||||
{ ID: "2", NAME: "待验收" },
|
||||
{ ID: "10", NAME: "验收打回" },
|
||||
{ ID: "4", NAME: "已验收" },
|
||||
{ ID: "-2", NAME: "已指派确认人" },
|
||||
{ ID: "8", NAME: "特殊处置通过" },
|
||||
{ ID: "16", NAME: "确认打回" },
|
||||
];
|
||||
const router = useRouter();
|
||||
const route = useRoute();
|
||||
const { INSPECTION_ID } = route.query;
|
||||
const userStore = useUserStore();
|
||||
const USER_ID = userStore.getUserInfo.USER_ID;
|
||||
const { list, pagination, fnGetData } = useListData(
|
||||
getHazardAssignmentAcceptanceHiddenList,
|
||||
{
|
||||
otherParams: { INSPECTION_ID },
|
||||
}
|
||||
);
|
||||
</script>
|
||||
|
||||
<style scoped></style>
|
|
@ -0,0 +1,225 @@
|
|||
<template>
|
||||
<div>
|
||||
<el-card>
|
||||
<el-form
|
||||
:model="searchForm"
|
||||
label-width="100px"
|
||||
@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-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>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<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-form-item label="检查类型" prop="INSPECTION_TYPE">
|
||||
<layout-inspection-type v-model="searchForm.INSPECTION_TYPE" />
|
||||
</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="4">
|
||||
<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="4">
|
||||
<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="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="INSPECTED_DEPARTMENT_NAMES" label="被检查单位" />
|
||||
<el-table-column
|
||||
prop="INSPECTED_SITEUSER_NAME"
|
||||
label="被检查单位现场负责人"
|
||||
/>
|
||||
<el-table-column prop="INSPECTION_DEPARTMENT_NAME" label="检查部门" />
|
||||
<el-table-column
|
||||
prop="INSPECTION_ORIGINATOR_NAME"
|
||||
label="检查发起人"
|
||||
width="120"
|
||||
/>
|
||||
<el-table-column prop="INSPECTION_TYPE_NAME" label="检查类型" />
|
||||
<el-table-column label="检查时间" width="270">
|
||||
<template v-slot="{ row }">
|
||||
<span>
|
||||
自 {{ row.INSPECTION_TIME_START }} 至
|
||||
{{ row.INSPECTION_TIME_END }} 止
|
||||
</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="状态" width="120">
|
||||
<template v-slot="{ row }">
|
||||
{{ translationStatus(row.INSPECTION_STATUS, stateList) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="INSPECTION_SUBJECT" label="检查题目" />
|
||||
<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>
|
||||
<el-button
|
||||
v-if="
|
||||
(row.INSPECTION_STATUS === '3' ||
|
||||
row.INSPECTION_STATUS === '4') &&
|
||||
row.INSPECTED_SITEUSER_ID.includes(USER_ID)
|
||||
"
|
||||
type="primary"
|
||||
text
|
||||
link
|
||||
@click="
|
||||
router.push({
|
||||
path: '/safety_environmental_management/hazard_assignment_acceptance/assign',
|
||||
query: { INSPECTION_ID: row.INSPECTION_ID },
|
||||
})
|
||||
"
|
||||
>
|
||||
指派
|
||||
</el-button>
|
||||
<el-button
|
||||
v-if="
|
||||
(row.INSPECTION_STATUS === '6' ||
|
||||
row.INSPECTION_STATUS === '5' ||
|
||||
row.INSPECTION_STATUS === '7') &&
|
||||
row.checkout === 1
|
||||
"
|
||||
type="primary"
|
||||
text
|
||||
link
|
||||
@click="
|
||||
router.push({
|
||||
path: '/safety_environmental_management/hazard_assignment_acceptance/acceptance',
|
||||
query: { INSPECTION_ID: row.INSPECTION_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 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", 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: "安全" },
|
||||
{ ID: "环保", NAME: "环保" },
|
||||
{ ID: "综合", NAME: "综合" },
|
||||
];
|
||||
const router = useRouter();
|
||||
const userStore = useUserStore();
|
||||
const USER_ID = userStore.getUserInfo.USER_ID;
|
||||
const { list, pagination, searchForm, fnGetData, fnResetPagination } =
|
||||
useListData(getHazardAssignmentAcceptanceList, {
|
||||
otherParams: {
|
||||
ARCHIVE_USER_ID: USER_ID,
|
||||
INSPECTION_STATUS: "3-7",
|
||||
},
|
||||
});
|
||||
const fnGetDataTransfer = () => {
|
||||
fnGetData({
|
||||
INSPECTION_TIME_START: searchForm.value.dates?.[0],
|
||||
INSPECTION_TIME_END: searchForm.value.dates?.[1],
|
||||
});
|
||||
};
|
||||
const fnResetPaginationTransfer = () => {
|
||||
fnResetPagination({
|
||||
INSPECTION_TIME_START: searchForm.value.dates?.[0],
|
||||
INSPECTION_TIME_END: searchForm.value.dates?.[1],
|
||||
});
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped></style>
|
|
@ -0,0 +1,9 @@
|
|||
<template>
|
||||
<view-info />
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import ViewInfo from "../safety_environmental/view.vue";
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss"></style>
|
|
@ -0,0 +1,116 @@
|
|||
<template>
|
||||
<el-dialog v-model="visible" title="检查确认" :on-close="fnClose">
|
||||
<el-form ref="formRef" :rules="rules" :model="form" label-width="110px">
|
||||
<el-form-item label="是否申辩" prop="INSPECTION_STATUS">
|
||||
<el-radio v-model="form.INSPECTION_STATUS" label="3">否</el-radio>
|
||||
<el-radio
|
||||
v-if="hiddenCount === 1"
|
||||
v-model="form.INSPECTION_STATUS"
|
||||
label="-2"
|
||||
>
|
||||
是
|
||||
</el-radio>
|
||||
</el-form-item>
|
||||
<template v-if="form.INSPECTION_STATUS === '-2'">
|
||||
<el-form-item label="申辩内容" prop="INSPECTED_EXPLAIN">
|
||||
<el-input
|
||||
v-model="form.INSPECTED_EXPLAIN"
|
||||
:autosize="{ minRows: 3 }"
|
||||
type="textarea"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="附件" prop="file">
|
||||
<layout-upload v-model:file-list="form.file" accept=".pdf" />
|
||||
</el-form-item>
|
||||
</template>
|
||||
<el-form-item label="确认人" prop="INSPECTED_SITEUSER_SIGN_IMG">
|
||||
<layout-sign v-model="form.INSPECTED_SITEUSER_SIGN_IMG" />
|
||||
</el-form-item>
|
||||
</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 LayoutSign from "@/components/sign/index.vue";
|
||||
import { useVModel } from "@vueuse/core";
|
||||
import { 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 { setInspectedPersonConfirmSubmit } from "@/request/safety_environmental_management.js";
|
||||
import dayjs from "dayjs";
|
||||
|
||||
const props = defineProps({
|
||||
visible: {
|
||||
type: Boolean,
|
||||
required: true,
|
||||
default: false,
|
||||
},
|
||||
id: {
|
||||
type: String,
|
||||
required: true,
|
||||
default: "",
|
||||
},
|
||||
hiddenCount: {
|
||||
type: Number,
|
||||
required: true,
|
||||
default: 0,
|
||||
},
|
||||
});
|
||||
const emits = defineEmits(["update:visible", "get-data"]);
|
||||
const visible = useVModel(props, "visible", emits);
|
||||
const formRef = ref(null);
|
||||
const form = ref({
|
||||
INSPECTION_STATUS: "3",
|
||||
INSPECTED_EXPLAIN: "",
|
||||
file: [],
|
||||
INSPECTED_SITEUSER_SIGN_IMG: "",
|
||||
});
|
||||
const rules = {
|
||||
INSPECTION_STATUS: [
|
||||
{ required: true, message: "请选择是否申辩", trigger: "change" },
|
||||
],
|
||||
INSPECTED_EXPLAIN: [
|
||||
{ required: true, message: "请输入申辩内容", trigger: "blur" },
|
||||
],
|
||||
INSPECTED_SITEUSER_SIGN_IMG: [
|
||||
{ required: true, message: "请签名", trigger: "blur" },
|
||||
],
|
||||
};
|
||||
const fnClose = () => {
|
||||
formRef.value.resetFields();
|
||||
visible.value = false;
|
||||
};
|
||||
const fnSubmit = debounce(
|
||||
1000,
|
||||
async () => {
|
||||
await useFormValidate(formRef);
|
||||
const formData = new FormData();
|
||||
Object.keys(form.value).forEach((key) => {
|
||||
formData.append(key, form.value[key]);
|
||||
});
|
||||
formData.append("INSPECTION_ID", props.id);
|
||||
formData.append(
|
||||
"INSPECTED_SITEUSER_SIGN_TIME",
|
||||
dayjs().format("YYYY-MM-DD HH:mm")
|
||||
);
|
||||
formData.delete("file");
|
||||
if (form.value.file[0]?.raw) {
|
||||
formData.append("file", form.value.file[0].raw);
|
||||
formData.append("INSPECTED_EXPLAIN_FILENAME", form.value.file[0].name);
|
||||
}
|
||||
await setInspectedPersonConfirmSubmit(formData);
|
||||
fnClose();
|
||||
ElMessage.success("核实成功");
|
||||
emits("get-data");
|
||||
},
|
||||
{ atBegin: true }
|
||||
);
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss"></style>
|
|
@ -0,0 +1,223 @@
|
|||
<template>
|
||||
<div>
|
||||
<el-card>
|
||||
<el-form
|
||||
:model="searchForm"
|
||||
label-width="100px"
|
||||
@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-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>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<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-form-item label="检查类型" prop="INSPECTION_TYPE">
|
||||
<layout-inspection-type v-model="searchForm.INSPECTION_TYPE" />
|
||||
</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="4">
|
||||
<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="4">
|
||||
<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="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="INSPECTED_DEPARTMENT_NAMES" label="被检查单位" />
|
||||
<el-table-column
|
||||
prop="INSPECTED_SITEUSER_NAME"
|
||||
label="被检查单位现场负责人"
|
||||
/>
|
||||
<el-table-column prop="INSPECTION_DEPARTMENT_NAME" label="检查部门" />
|
||||
<el-table-column
|
||||
prop="INSPECTION_ORIGINATOR_NAME"
|
||||
label="检查发起人"
|
||||
width="120"
|
||||
/>
|
||||
<el-table-column prop="INSPECTION_TYPE_NAME" label="检查类型" />
|
||||
<el-table-column label="检查时间" width="270">
|
||||
<template v-slot="{ row }">
|
||||
<span>
|
||||
自 {{ row.INSPECTION_TIME_START }} 至
|
||||
{{ row.INSPECTION_TIME_END }} 止
|
||||
</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="状态" width="120">
|
||||
<template v-slot="{ row }">
|
||||
{{ translationStatus(row.INSPECTION_STATUS, stateList) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="INSPECTION_SUBJECT" label="检查题目" />
|
||||
<el-table-column label="操作" width="120">
|
||||
<template #default="{ row }">
|
||||
<el-button
|
||||
type="primary"
|
||||
text
|
||||
link
|
||||
@click="
|
||||
router.push({
|
||||
path: '/safety_environmental_management/inspected_person_confirm/view',
|
||||
query: { INSPECTION_ID: row.INSPECTION_ID },
|
||||
})
|
||||
"
|
||||
>
|
||||
查看
|
||||
</el-button>
|
||||
<el-button
|
||||
v-if="
|
||||
buttonJurisdiction.edit &&
|
||||
row.INSPECTION_STATUS === '2' &&
|
||||
row.INSPECTED_SITEUSER_ID === userStore.getUserInfo.USER_ID
|
||||
"
|
||||
type="primary"
|
||||
text
|
||||
link
|
||||
@click="fnConfirm(row.INSPECTION_ID)"
|
||||
>
|
||||
确认
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</layout-table>
|
||||
</layout-card>
|
||||
<confirm
|
||||
v-model:visible="data.confirmDialog.visible"
|
||||
:id="data.confirmDialog.INSPECTION_ID"
|
||||
:hidden-count="data.confirmDialog.hiddenCount"
|
||||
@get-data="fnResetPaginationTransfer"
|
||||
/>
|
||||
</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 LayoutDepartment from "@/components/department/index.vue";
|
||||
import LayoutInspectionType from "@/components/inspection_type/index.vue";
|
||||
import {
|
||||
getInspectedPersonConfirmHiddenCount,
|
||||
getInspectedPersonConfirmList,
|
||||
} from "@/request/safety_environmental_management.js";
|
||||
import { reactive } from "vue";
|
||||
import Confirm from "./components/confirm.vue";
|
||||
import { useUserStore } from "@/pinia/user.js";
|
||||
|
||||
const stateList = [
|
||||
{ ID: "0", NAME: "待检查人核实" },
|
||||
{ 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: "被检查人申辩" },
|
||||
];
|
||||
const inspectionQuestionList = [
|
||||
{ ID: "安全", NAME: "安全" },
|
||||
{ ID: "环保", NAME: "环保" },
|
||||
{ ID: "综合", NAME: "综合" },
|
||||
];
|
||||
const router = useRouter();
|
||||
const userStore = useUserStore();
|
||||
const { list, pagination, searchForm, fnGetData, fnResetPagination } =
|
||||
useListData(getInspectedPersonConfirmList);
|
||||
const data = reactive({
|
||||
confirmDialog: {
|
||||
visible: false,
|
||||
INSPECTION_ID: "",
|
||||
hiddenCount: 0,
|
||||
},
|
||||
});
|
||||
const fnGetDataTransfer = () => {
|
||||
fnGetData({
|
||||
INSPECTION_TIME_START: searchForm.value.dates?.[0],
|
||||
INSPECTION_TIME_END: searchForm.value.dates?.[1],
|
||||
});
|
||||
};
|
||||
const fnResetPaginationTransfer = () => {
|
||||
fnResetPagination({
|
||||
INSPECTION_TIME_START: searchForm.value.dates?.[0],
|
||||
INSPECTION_TIME_END: searchForm.value.dates?.[1],
|
||||
});
|
||||
};
|
||||
const buttonJurisdiction = await useButtonJurisdiction(
|
||||
"safetyenvironmentalinspector"
|
||||
);
|
||||
const fnConfirm = async (INSPECTION_ID) => {
|
||||
const resData = await getInspectedPersonConfirmHiddenCount({ INSPECTION_ID });
|
||||
data.confirmDialog.hiddenCount = +resData.hiddencount;
|
||||
data.confirmDialog.INSPECTION_ID = INSPECTION_ID;
|
||||
data.confirmDialog.visible = true;
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped></style>
|
|
@ -0,0 +1,9 @@
|
|||
<template>
|
||||
<view-info />
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import ViewInfo from "../safety_environmental/view.vue";
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss"></style>
|
|
@ -0,0 +1,88 @@
|
|||
<template>
|
||||
<el-dialog v-model="visible" title="核实" :on-close="fnClose">
|
||||
<el-form ref="formRef" :rules="rules" :model="form" label-width="110px">
|
||||
<el-form-item label="检查人意见" prop="INSPECTION_USER_OPINION">
|
||||
<el-input
|
||||
v-model="form.INSPECTION_USER_OPINION"
|
||||
:autosize="{ minRows: 3 }"
|
||||
type="textarea"
|
||||
placeholder="这里输入检查人意见(有异议时必填)..."
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="检查人" prop="INSPECTION_USER_SIGN_IMG">
|
||||
<layout-sign v-model="form.INSPECTION_USER_SIGN_IMG" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<template #footer>
|
||||
<el-button @click="fnClose">取 消</el-button>
|
||||
<el-button type="danger" @click="fnSubmit('-1')">不通过</el-button>
|
||||
<el-button type="primary" @click="fnSubmit('1')">通 过</el-button>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import LayoutSign from "@/components/sign/index.vue";
|
||||
import { useVModel } from "@vueuse/core";
|
||||
import { ref } from "vue";
|
||||
import { debounce } from "throttle-debounce";
|
||||
import useFormValidate from "@/assets/js/useFormValidate.js";
|
||||
import { ElMessage } from "element-plus";
|
||||
import { setInspectorsVerifyManagementVerify } from "@/request/safety_environmental_management.js";
|
||||
import dayjs from "dayjs";
|
||||
|
||||
const props = defineProps({
|
||||
visible: {
|
||||
type: Boolean,
|
||||
required: true,
|
||||
default: false,
|
||||
},
|
||||
info: {
|
||||
type: Object,
|
||||
required: true,
|
||||
default: () => ({}),
|
||||
},
|
||||
});
|
||||
const emits = defineEmits(["update:visible", "get-data"]);
|
||||
const visible = useVModel(props, "visible", emits);
|
||||
const formRef = ref(null);
|
||||
const form = ref({
|
||||
INSPECTION_USER_OPINION: "",
|
||||
INSPECTION_USER_SIGN_IMG: "",
|
||||
});
|
||||
const rules = {
|
||||
INSPECTION_USER_SIGN_IMG: [
|
||||
{ required: true, message: "请签名", trigger: "blur" },
|
||||
],
|
||||
};
|
||||
const fnClose = () => {
|
||||
formRef.value.resetFields();
|
||||
visible.value = false;
|
||||
};
|
||||
const fnSubmit = debounce(
|
||||
1000,
|
||||
async (INSPECTION_STATUS) => {
|
||||
await useFormValidate(formRef);
|
||||
if (INSPECTION_STATUS === "-1") {
|
||||
if (!form.value.INSPECTION_USER_OPINION) {
|
||||
ElMessage.warning("有异议时,检查人意见不能为空");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
await setInspectorsVerifyManagementVerify({
|
||||
...form.value,
|
||||
INSPECTION_INSPECTOR_ID: props.info.INSPECTION_INSPECTOR_ID,
|
||||
INSPECTION_ID: props.info.INSPECTION_ID,
|
||||
INSPECTION_USER_ID: props.info.INSPECTION_USER_ID,
|
||||
INSPECTION_USER_SIGN_TIME: dayjs().format("YYYY-MM-DD HH:mm"),
|
||||
INSPECTION_STATUS,
|
||||
});
|
||||
fnClose();
|
||||
ElMessage.success("核实成功");
|
||||
emits("get-data");
|
||||
},
|
||||
{ atBegin: true }
|
||||
);
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss"></style>
|
|
@ -0,0 +1,214 @@
|
|||
<template>
|
||||
<div>
|
||||
<el-card>
|
||||
<el-form
|
||||
:model="searchForm"
|
||||
label-width="100px"
|
||||
@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-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>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<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-form-item label="检查类型" prop="INSPECTION_TYPE">
|
||||
<layout-inspection-type v-model="searchForm.INSPECTION_TYPE" />
|
||||
</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="4">
|
||||
<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="4">
|
||||
<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="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="INSPECTED_DEPARTMENT_NAMES" label="被检查单位" />
|
||||
<el-table-column
|
||||
prop="INSPECTED_SITEUSER_NAME"
|
||||
label="被检查单位现场负责人"
|
||||
/>
|
||||
<el-table-column prop="INSPECTION_DEPARTMENT_NAME" label="检查部门" />
|
||||
<el-table-column
|
||||
prop="INSPECTION_ORIGINATOR_NAME"
|
||||
label="检查发起人"
|
||||
width="120"
|
||||
/>
|
||||
<el-table-column prop="INSPECTION_TYPE_NAME" label="检查类型" />
|
||||
<el-table-column label="检查时间" width="270">
|
||||
<template v-slot="{ row }">
|
||||
<span>
|
||||
自 {{ row.INSPECTION_TIME_START }} 至
|
||||
{{ row.INSPECTION_TIME_END }} 止
|
||||
</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="状态" width="120">
|
||||
<template v-slot="{ row }">
|
||||
{{ translationStatus(row.INSPECTION_STATUS, stateList) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="INSPECTION_SUBJECT" label="检查题目" />
|
||||
<el-table-column label="操作" width="120">
|
||||
<template #default="{ row }">
|
||||
<el-button
|
||||
type="primary"
|
||||
text
|
||||
link
|
||||
@click="
|
||||
router.push({
|
||||
path: '/safety_environmental_management/inspectors_verify_management/view',
|
||||
query: { INSPECTION_ID: row.INSPECTION_ID },
|
||||
})
|
||||
"
|
||||
>
|
||||
查看
|
||||
</el-button>
|
||||
<el-button
|
||||
v-if="
|
||||
buttonJurisdiction.edit &&
|
||||
!row.INSPECTION_USER_SIGN_TIME &&
|
||||
(row.INSPECTION_STATUS === '0' || row.INSPECTION_STATUS === '1')
|
||||
"
|
||||
type="primary"
|
||||
text
|
||||
link
|
||||
@click="fnVerify(row)"
|
||||
>
|
||||
核实
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</layout-table>
|
||||
</layout-card>
|
||||
<verify
|
||||
v-model:visible="data.verifyDialog.visible"
|
||||
:info="data.verifyDialog.info"
|
||||
@get-data="fnResetPaginationTransfer"
|
||||
/>
|
||||
</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 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";
|
||||
import Verify from "./components/verify.vue";
|
||||
|
||||
const stateList = [
|
||||
{ ID: "0", NAME: "待检查人核实" },
|
||||
{ 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: "被检查人申辩" },
|
||||
];
|
||||
const inspectionQuestionList = [
|
||||
{ ID: "安全", NAME: "安全" },
|
||||
{ ID: "环保", NAME: "环保" },
|
||||
{ ID: "综合", NAME: "综合" },
|
||||
];
|
||||
const router = useRouter();
|
||||
const { list, pagination, searchForm, fnGetData, fnResetPagination } =
|
||||
useListData(getInspectorsVerifyManagementList);
|
||||
const data = reactive({
|
||||
verifyDialog: {
|
||||
visible: false,
|
||||
info: {},
|
||||
},
|
||||
});
|
||||
const fnGetDataTransfer = () => {
|
||||
fnGetData({
|
||||
INSPECTION_TIME_START: searchForm.value.dates?.[0],
|
||||
INSPECTION_TIME_END: searchForm.value.dates?.[1],
|
||||
});
|
||||
};
|
||||
const fnResetPaginationTransfer = () => {
|
||||
fnResetPagination({
|
||||
INSPECTION_TIME_START: searchForm.value.dates?.[0],
|
||||
INSPECTION_TIME_END: searchForm.value.dates?.[1],
|
||||
});
|
||||
};
|
||||
const buttonJurisdiction = await useButtonJurisdiction(
|
||||
"safetyenvironmentalinspector"
|
||||
);
|
||||
const fnVerify = (row) => {
|
||||
data.verifyDialog.info = row;
|
||||
data.verifyDialog.visible = true;
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped></style>
|
|
@ -0,0 +1,9 @@
|
|||
<template>
|
||||
<view-info />
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import ViewInfo from "../safety_environmental/view.vue";
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss"></style>
|
|
@ -248,13 +248,19 @@ import { useUserStore } from "@/pinia/user.js";
|
|||
import { debounce } from "throttle-debounce";
|
||||
import useFormValidate from "@/assets/js/useFormValidate.js";
|
||||
import { ElMessage } from "element-plus";
|
||||
import { useRouter } from "vue-router";
|
||||
import { setSafetyEnvironmentalAdd } from "@/request/safety_environmental_management.js";
|
||||
import { useRoute, useRouter } from "vue-router";
|
||||
import {
|
||||
getSafetyEnvironmentalView,
|
||||
setSafetyEnvironmentalAdd,
|
||||
setSafetyEnvironmentalEdit,
|
||||
} from "@/request/safety_environmental_management.js";
|
||||
import { setUploadImg, setUploadVideo } from "@/request/api.js";
|
||||
import dayjs from "dayjs";
|
||||
|
||||
const route = useRoute();
|
||||
const router = useRouter();
|
||||
const userStore = useUserStore();
|
||||
const { INSPECTION_ID } = route.query;
|
||||
const rules = {
|
||||
INSPECTION_SUBJECT: [
|
||||
{ required: true, message: "请选择检查题目", trigger: "change" },
|
||||
|
@ -291,6 +297,8 @@ const rules = {
|
|||
const formRef = ref(null);
|
||||
const data = reactive({
|
||||
form: {
|
||||
INSPECTION_SOURCE: "5",
|
||||
INSPECTION_STATUS: "0",
|
||||
INSPECTION_SUBJECT: "安全",
|
||||
INSPECTED_DEPARTMENT_ID: "",
|
||||
INSPECTED_SITEUSER_ID: "",
|
||||
|
@ -318,14 +326,28 @@ const fnAddInspectorList = () => {
|
|||
id: Math.random(),
|
||||
});
|
||||
};
|
||||
fnAddInspectorList();
|
||||
const fnAddSituationList = () => {
|
||||
data.form.situationList.push({
|
||||
SITUATION: "",
|
||||
id: Math.random(),
|
||||
});
|
||||
};
|
||||
fnAddSituationList();
|
||||
const fnGetData = async () => {
|
||||
if (!INSPECTION_ID) {
|
||||
fnAddInspectorList();
|
||||
fnAddSituationList();
|
||||
return;
|
||||
}
|
||||
const resData = await getSafetyEnvironmentalView({ INSPECTION_ID });
|
||||
data.form = resData.pd;
|
||||
for (let i = 0; i < resData.pd.inspectorList.length; i++) {
|
||||
await fnGetInspectionSitUserList(
|
||||
resData.pd.inspectorList[i].INSPECTION_DEPARTMENT_ID,
|
||||
i
|
||||
);
|
||||
}
|
||||
};
|
||||
fnGetData();
|
||||
const fnInspectedDepartmentChange = () => {
|
||||
data.inspectedSiteUserList = [];
|
||||
data.form.INSPECTED_SITEUSER_ID = "";
|
||||
|
@ -375,15 +397,39 @@ const fnSubmit = debounce(
|
|||
1000,
|
||||
async () => {
|
||||
await useFormValidate(formRef);
|
||||
const resData = await setSafetyEnvironmentalAdd({
|
||||
...data.form,
|
||||
HIDDENFINDDEPT: userStore.getUserInfo.DEPARTMENT_ID,
|
||||
INSPECTORJSON: JSON.stringify(data.form.inspectorList),
|
||||
SITUATIONJSON: JSON.stringify(data.form.situationList),
|
||||
HIDDENJSON: JSON.stringify(data.form.hiddenList),
|
||||
CONFIRM_MESSAGE_TIME: dayjs().format("YYYY-MM-DD HH:mm"),
|
||||
});
|
||||
const hiddenList = resData.pd.hiddenList;
|
||||
const inspectorList = [...data.form.inspectorList];
|
||||
if (
|
||||
!inspectorList.some(
|
||||
(item) => userStore.getUserInfo.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,
|
||||
});
|
||||
}
|
||||
let hiddenList = [];
|
||||
if (!INSPECTION_ID) {
|
||||
const resData = await setSafetyEnvironmentalAdd({
|
||||
...data.form,
|
||||
HIDDENFINDDEPT: userStore.getUserInfo.DEPARTMENT_ID,
|
||||
INSPECTORJSON: JSON.stringify(inspectorList),
|
||||
SITUATIONJSON: JSON.stringify(data.form.situationList),
|
||||
HIDDENJSON: JSON.stringify(data.form.hiddenList),
|
||||
CONFIRM_MESSAGE_TIME: dayjs().format("YYYY-MM-DD HH:mm"),
|
||||
});
|
||||
hiddenList = resData.pd.hiddenList;
|
||||
} else {
|
||||
const resData = await setSafetyEnvironmentalEdit({
|
||||
...data.form,
|
||||
INSPECTORJSON: JSON.stringify(inspectorList),
|
||||
SITUATIONJSON: JSON.stringify(data.form.situationList),
|
||||
HIDDENJSON: JSON.stringify(data.form.hiddenList),
|
||||
CONFIRM_MESSAGE_TIME: dayjs().format("YYYY-MM-DD HH:mm"),
|
||||
});
|
||||
hiddenList = resData.pd.hiddenList;
|
||||
}
|
||||
for (let i = 0; i < hiddenList.length; i++) {
|
||||
await fnUploadImage(
|
||||
hiddenList[i].HIDDEN_ID,
|
||||
|
|
|
@ -43,7 +43,10 @@
|
|||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="隐患类型" prop="HIDDENTYPE">
|
||||
<layout-hidden-danger-type v-model="form.HIDDENTYPE" type="tree" />
|
||||
<layout-hidden-danger-type
|
||||
v-model="form.HIDDENTYPE"
|
||||
ref="hiddenDangerTypeRef"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
|
@ -133,12 +136,13 @@ const form = ref({
|
|||
DISCOVERYTIME: "",
|
||||
HIDDENPART: "",
|
||||
HIDDENLEVEL: "",
|
||||
HIDDENTYPE: "",
|
||||
HIDDENTYPE: [],
|
||||
hiddenImgs: [],
|
||||
videoFiles: [],
|
||||
CREATOR: "",
|
||||
});
|
||||
const formRef = ref(null);
|
||||
const hiddenDangerTypeRef = ref(null);
|
||||
const fnClose = () => {
|
||||
formRef.value.resetFields();
|
||||
visible.value = false;
|
||||
|
@ -158,7 +162,13 @@ const fnSubmit = async () => {
|
|||
if (form.value.videoFiles[i].raw)
|
||||
throwForm.videoFiles.push(form.value.videoFiles[i].raw);
|
||||
}
|
||||
emits("submit", throwForm);
|
||||
emits("submit", {
|
||||
...throwForm,
|
||||
HIDDENTYPE1: form.value.HIDDENTYPE[0],
|
||||
HIDDENTYPE2: form.value.HIDDENTYPE[1],
|
||||
HIDDENTYPE3: form.value.HIDDENTYPE[2],
|
||||
HIDDENTYPE_NAME: hiddenDangerTypeRef.value.getCheckedNodes(),
|
||||
});
|
||||
fnClose();
|
||||
};
|
||||
</script>
|
||||
|
|
|
@ -99,10 +99,7 @@
|
|||
:data="list"
|
||||
@get-data="fnGetDataTransfer"
|
||||
v-model:pagination="pagination"
|
||||
ref="tableRef"
|
||||
row-key="INSPECTION_ID"
|
||||
>
|
||||
<el-table-column reserve-selection type="selection" width="55" />
|
||||
<el-table-column label="序号" width="60">
|
||||
<template #default="{ $index }">
|
||||
{{ serialNumber(pagination, $index) }}
|
||||
|
@ -112,6 +109,7 @@
|
|||
<el-table-column
|
||||
prop="INSPECTED_SITEUSER_NAME"
|
||||
label="被检查单位现场负责人"
|
||||
width="150"
|
||||
/>
|
||||
<el-table-column prop="INSPECTION_DEPARTMENT_NAME" label="检查部门" />
|
||||
<el-table-column
|
||||
|
@ -159,7 +157,11 @@
|
|||
流程图
|
||||
</el-button>
|
||||
<el-button
|
||||
v-if="buttonJurisdiction.edit && row.INSPECTION_STATUS === '-1'"
|
||||
v-if="
|
||||
buttonJurisdiction.edit &&
|
||||
row.INSPECTION_ORIGINATOR_ID === USER_ID &&
|
||||
row.INSPECTION_STATUS === '-1'
|
||||
"
|
||||
type="primary"
|
||||
text
|
||||
link
|
||||
|
@ -269,7 +271,7 @@ const hiddenTotal = ref(0);
|
|||
const userStore = useUserStore();
|
||||
const USER_ID = userStore.getUserInfo.USER_ID;
|
||||
const router = useRouter();
|
||||
const { list, pagination, searchForm, fnGetData, fnResetPagination, tableRef } =
|
||||
const { list, pagination, searchForm, fnGetData, fnResetPagination } =
|
||||
useListData(getSafetyEnvironmentalList, {
|
||||
callbackFn: (list, resData) => {
|
||||
safetyTotal.value = resData.safetyTotal;
|
||||
|
|
|
@ -147,7 +147,7 @@
|
|||
|
||||
<script setup>
|
||||
import { useRoute } from "vue-router";
|
||||
import { getSafetyEnvironmentalView } from "@/request/safety_environmental_management.js";
|
||||
import { getSafetyEnvironmentalViewInfo } from "@/request/safety_environmental_management.js";
|
||||
import { reactive } from "vue";
|
||||
import dayjs from "dayjs";
|
||||
import FlowChart from "./components/flow_chart.vue";
|
||||
|
@ -169,7 +169,7 @@ const data = reactive({
|
|||
},
|
||||
});
|
||||
const fnGetData = async () => {
|
||||
const resData = await getSafetyEnvironmentalView({ INSPECTION_ID });
|
||||
const resData = await getSafetyEnvironmentalViewInfo({ INSPECTION_ID });
|
||||
data.info = resData.pd;
|
||||
};
|
||||
fnGetData();
|
||||
|
|
Loading…
Reference in New Issue