diff --git a/src/assets/js/asyncRouter.js b/src/assets/js/asyncRouter.js index cca0f7d..070ed2d 100644 --- a/src/assets/js/asyncRouter.js +++ b/src/assets/js/asyncRouter.js @@ -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", + }, ], }, { diff --git a/src/request/safety_environmental_management.js b/src/request/safety_environmental_management.js index 05c0951..1d65f11 100644 --- a/src/request/safety_environmental_management.js +++ b/src/request/safety_environmental_management.js @@ -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); // 隐患管理列表 diff --git a/src/views/hidden_danger_government/acceptance/index.vue b/src/views/hidden_danger_government/acceptance/index.vue index 8e43414..bbef8a4 100644 --- a/src/views/hidden_danger_government/acceptance/index.vue +++ b/src/views/hidden_danger_government/acceptance/index.vue @@ -89,7 +89,7 @@ 查看 隐患快报 隐患排查 隐患排查 + 安全环保检查 + 安全环保检查 隐患快报 隐患排查 隐患排查 + 安全环保检查 + 安全环保检查 { }; const fnRectificationDepartmentChange = async (event) => { data.form.RECTIFICATIONOR = ""; + data.rectifierUserList = []; const resData = await getUserListAll({ DEPARTMENT_ID: event, }); diff --git a/src/views/safety_environmental_management/hazard_assignment_acceptance/acceptance.vue b/src/views/safety_environmental_management/hazard_assignment_acceptance/acceptance.vue new file mode 100644 index 0000000..592ab42 --- /dev/null +++ b/src/views/safety_environmental_management/hazard_assignment_acceptance/acceptance.vue @@ -0,0 +1,113 @@ + + + + + diff --git a/src/views/safety_environmental_management/hazard_assignment_acceptance/assign.vue b/src/views/safety_environmental_management/hazard_assignment_acceptance/assign.vue new file mode 100644 index 0000000..bcafee2 --- /dev/null +++ b/src/views/safety_environmental_management/hazard_assignment_acceptance/assign.vue @@ -0,0 +1,108 @@ + + + + + diff --git a/src/views/safety_environmental_management/hazard_assignment_acceptance/hidden_list.vue b/src/views/safety_environmental_management/hazard_assignment_acceptance/hidden_list.vue index 9f13a3a..b18ab27 100644 --- a/src/views/safety_environmental_management/hazard_assignment_acceptance/hidden_list.vue +++ b/src/views/safety_environmental_management/hazard_assignment_acceptance/hidden_list.vue @@ -19,17 +19,7 @@ @@ -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; +}; diff --git a/src/views/safety_environmental_management/hazard_assignment_acceptance/index.vue b/src/views/safety_environmental_management/hazard_assignment_acceptance/index.vue index 3ad4f41..2e2ae5b 100644 --- a/src/views/safety_environmental_management/hazard_assignment_acceptance/index.vue +++ b/src/views/safety_environmental_management/hazard_assignment_acceptance/index.vue @@ -7,24 +7,22 @@ @submit.prevent="fnResetPaginationTransfer" > - - - + + + - - - + + + - + - + @@ -40,8 +38,8 @@ /> - - + + - + - + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 搜索 + + 重置 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + diff --git a/src/views/safety_environmental_management/inspected_person_confirm/index.vue b/src/views/safety_environmental_management/inspected_person_confirm/index.vue index a8d73e0..00b2ba4 100644 --- a/src/views/safety_environmental_management/inspected_person_confirm/index.vue +++ b/src/views/safety_environmental_management/inspected_person_confirm/index.vue @@ -7,24 +7,22 @@ @submit.prevent="fnResetPaginationTransfer" > - - - + + + - - - + + + - + - + @@ -40,7 +38,7 @@ /> - + - + - - + + - - + + @@ -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: "被检查人申辩" }, diff --git a/src/views/safety_environmental_management/safety_environmental/add.vue b/src/views/safety_environmental_management/safety_environmental/add.vue index c6ed018..c17cd54 100644 --- a/src/views/safety_environmental_management/safety_environmental/add.vue +++ b/src/views/safety_environmental_management/safety_environmental/add.vue @@ -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); -}; diff --git a/src/views/safety_environmental_management/safety_environmental/components/flow_chart.vue b/src/views/safety_environmental_management/safety_environmental/components/flow_chart.vue index 6a0cdbf..343dcf5 100644 --- a/src/views/safety_environmental_management/safety_environmental/components/flow_chart.vue +++ b/src/views/safety_environmental_management/safety_environmental/components/flow_chart.vue @@ -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, }); diff --git a/src/views/safety_environmental_management/safety_environmental/index.vue b/src/views/safety_environmental_management/safety_environmental/index.vue index c7c0f65..69cda81 100644 --- a/src/views/safety_environmental_management/safety_environmental/index.vue +++ b/src/views/safety_environmental_management/safety_environmental/index.vue @@ -215,7 +215,7 @@