From 2fe776a3f62271f5dd417d81b362452edb32a2e5 Mon Sep 17 00:00:00 2001 From: z Date: Fri, 12 Jan 2024 18:21:07 +0800 Subject: [PATCH 1/6] init --- src/assets/images/map/50.png | Bin 0 -> 3265 bytes src/assets/images/map/h.png | Bin 0 -> 1491 bytes src/assets/js/asyncRouter.js | 73 +++++ src/assets/js/usePrint.js | 1 - src/components/ali-player/index.vue | 8 +- src/components/print_table_package/index.vue | 1 - src/components/video/index.vue | 1 + src/request/hazard_investigation.js | 19 ++ src/views/archives/corp/catalogue.vue | 1 - .../archives/corp/components/capital.vue | 1 - .../archives/corp/components/edumanager.vue | 1 - .../archives/corp/components/eduplan.vue | 1 - .../archives/corp/components/postman.vue | 1 - .../archives/corp/components/teacher.vue | 1 - .../archives/semester/components/result.vue | 1 - .../archives/semester/components/sign.vue | 1 - .../semester/components/training_schedule.vue | 1 - src/views/archives/semester/index.vue | 2 - src/views/archives/user/task_list.vue | 2 - src/views/confined_space/ledger/index.vue | 2 - .../industry_qualifications/add.vue | 1 - .../industry_qualifications/view.vue | 1 - .../information/components/map.vue | 111 +++++++ .../information/edit.vue | 84 +----- .../components/map.vue | 129 +++++++++ .../components/qualified.vue | 42 +++ .../hidden_danger_view.vue | 11 + .../hidden_view.vue | 270 ++++++++++++++++++ .../checklist_inspection_status/index.vue | 262 +++++++++++++++++ .../inspection_record.vue | 182 ++++++++++++ .../inspection_record_view.vue | 260 +++++++++++++++++ .../supplementary_recording.vue | 9 + .../inspection_record/index.vue | 185 ++++++++++++ .../inventory_troubleshooting/index.vue | 11 +- .../inventory_troubleshooting/inspect.vue | 88 ++++-- .../courseware/data/index.vue | 2 - .../courseware/question/question_list.vue | 2 - .../courseware/video/index.vue | 2 - .../courseware/data.vue | 6 - .../courseware/video.vue | 2 - .../courseware/view.vue | 2 - .../curriculum/list.vue | 2 - .../curriculum/view.vue | 1 - .../platform_resource_library/paper/list.vue | 2 - 44 files changed, 1638 insertions(+), 147 deletions(-) create mode 100644 src/assets/images/map/50.png create mode 100644 src/assets/images/map/h.png create mode 100644 src/views/enterprise_management/information/components/map.vue create mode 100644 src/views/hazard_investigation/checklist_inspection_status/components/map.vue create mode 100644 src/views/hazard_investigation/checklist_inspection_status/components/qualified.vue create mode 100644 src/views/hazard_investigation/checklist_inspection_status/hidden_danger_view.vue create mode 100644 src/views/hazard_investigation/checklist_inspection_status/hidden_view.vue create mode 100644 src/views/hazard_investigation/checklist_inspection_status/index.vue create mode 100644 src/views/hazard_investigation/checklist_inspection_status/inspection_record.vue create mode 100644 src/views/hazard_investigation/checklist_inspection_status/inspection_record_view.vue create mode 100644 src/views/hazard_investigation/checklist_inspection_status/supplementary_recording.vue create mode 100644 src/views/hazard_investigation/inspection_record/index.vue diff --git a/src/assets/images/map/50.png b/src/assets/images/map/50.png new file mode 100644 index 0000000000000000000000000000000000000000..e67c5d0f1f3e8d92891a685be738a3fb0f6c137e GIT binary patch literal 3265 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 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(); }; diff --git a/src/components/ali-player/index.vue b/src/components/ali-player/index.vue index 99d93ae..4e06b4a 100644 --- a/src/components/ali-player/index.vue +++ b/src/components/ali-player/index.vue @@ -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(); } }, { diff --git a/src/components/print_table_package/index.vue b/src/components/print_table_package/index.vue index 4b0fb71..400edde 100644 --- a/src/components/print_table_package/index.vue +++ b/src/components/print_table_package/index.vue @@ -22,7 +22,6 @@ + + diff --git a/src/views/enterprise_management/information/edit.vue b/src/views/enterprise_management/information/edit.vue index f317506..bc4ca6a 100644 --- a/src/views/enterprise_management/information/edit.vue +++ b/src/views/enterprise_management/information/edit.vue @@ -106,7 +106,7 @@ 地图定位 @@ -427,38 +427,16 @@ 确 定 - - - - - - - - - - - - - - - -
-
-
- - +
diff --git a/src/views/hazard_investigation/checklist_inspection_status/components/map.vue b/src/views/hazard_investigation/checklist_inspection_status/components/map.vue new file mode 100644 index 0000000..efc194a --- /dev/null +++ b/src/views/hazard_investigation/checklist_inspection_status/components/map.vue @@ -0,0 +1,129 @@ + + + + + diff --git a/src/views/hazard_investigation/checklist_inspection_status/components/qualified.vue b/src/views/hazard_investigation/checklist_inspection_status/components/qualified.vue new file mode 100644 index 0000000..80ce8e2 --- /dev/null +++ b/src/views/hazard_investigation/checklist_inspection_status/components/qualified.vue @@ -0,0 +1,42 @@ + + + + + diff --git a/src/views/hazard_investigation/checklist_inspection_status/hidden_danger_view.vue b/src/views/hazard_investigation/checklist_inspection_status/hidden_danger_view.vue new file mode 100644 index 0000000..c0a6fa5 --- /dev/null +++ b/src/views/hazard_investigation/checklist_inspection_status/hidden_danger_view.vue @@ -0,0 +1,11 @@ + + + + + diff --git a/src/views/hazard_investigation/checklist_inspection_status/hidden_view.vue b/src/views/hazard_investigation/checklist_inspection_status/hidden_view.vue new file mode 100644 index 0000000..b0a9b0a --- /dev/null +++ b/src/views/hazard_investigation/checklist_inspection_status/hidden_view.vue @@ -0,0 +1,270 @@ + + + + + diff --git a/src/views/hazard_investigation/checklist_inspection_status/index.vue b/src/views/hazard_investigation/checklist_inspection_status/index.vue new file mode 100644 index 0000000..d8ff747 --- /dev/null +++ b/src/views/hazard_investigation/checklist_inspection_status/index.vue @@ -0,0 +1,262 @@ + + + + + diff --git a/src/views/hazard_investigation/checklist_inspection_status/inspection_record.vue b/src/views/hazard_investigation/checklist_inspection_status/inspection_record.vue new file mode 100644 index 0000000..644c8dd --- /dev/null +++ b/src/views/hazard_investigation/checklist_inspection_status/inspection_record.vue @@ -0,0 +1,182 @@ + + + + + diff --git a/src/views/hazard_investigation/checklist_inspection_status/inspection_record_view.vue b/src/views/hazard_investigation/checklist_inspection_status/inspection_record_view.vue new file mode 100644 index 0000000..82061e0 --- /dev/null +++ b/src/views/hazard_investigation/checklist_inspection_status/inspection_record_view.vue @@ -0,0 +1,260 @@ + + + + + diff --git a/src/views/hazard_investigation/checklist_inspection_status/supplementary_recording.vue b/src/views/hazard_investigation/checklist_inspection_status/supplementary_recording.vue new file mode 100644 index 0000000..8fec285 --- /dev/null +++ b/src/views/hazard_investigation/checklist_inspection_status/supplementary_recording.vue @@ -0,0 +1,9 @@ + + + + + diff --git a/src/views/hazard_investigation/inspection_record/index.vue b/src/views/hazard_investigation/inspection_record/index.vue new file mode 100644 index 0000000..d633546 --- /dev/null +++ b/src/views/hazard_investigation/inspection_record/index.vue @@ -0,0 +1,185 @@ + + + + + diff --git a/src/views/hazard_investigation/inventory_troubleshooting/index.vue b/src/views/hazard_investigation/inventory_troubleshooting/index.vue index d34b8bd..d2e4dc7 100644 --- a/src/views/hazard_investigation/inventory_troubleshooting/index.vue +++ b/src/views/hazard_investigation/inventory_troubleshooting/index.vue @@ -36,15 +36,8 @@ - + + diff --git a/src/views/hazard_investigation/inventory_troubleshooting/inspect.vue b/src/views/hazard_investigation/inventory_troubleshooting/inspect.vue index de945f5..021bb53 100644 --- a/src/views/hazard_investigation/inventory_troubleshooting/inspect.vue +++ b/src/views/hazard_investigation/inventory_troubleshooting/inspect.vue @@ -47,11 +47,26 @@ 合格 + + + - + 不合格 - + 不涉及 @@ -60,7 +75,11 @@ 其他隐患
- + 添加
@@ -103,6 +122,7 @@ value-format="YYYY-MM-DD HH:mm:ss" type="datetime" placeholder="这里输入检查时间" + :disabled-date="fnDisabledDate" /> @@ -175,6 +195,11 @@ + + + + + { - 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 +330,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 +367,7 @@ const fnQualified = async (index, row) => { inspectionList.value[index].ISNORMAL = 0; }; const fnNotInvolved = (index, row) => { - if (row.HASHIDDEN > 0) return; + if (row.HASHIDDEN > 0 || type === "supplementaryRecording") return; fnRemoveUnqualified(index); inspectionList.value[index].ISNORMAL = 2; }; @@ -336,7 +375,7 @@ const fnRemoveUnqualified = (index) => { inspectionList.value[index].HIDDEN_ID = ""; }; const fnUnqualified = async (index, row) => { - if (row.HASHIDDEN > 0) return; + if (row.HASHIDDEN > 0 || type === "supplementaryRecording") return; data.unQualifiedDialog.visible = true; await nextTick(); if ( @@ -432,7 +471,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 +483,14 @@ const fnSubmit = debounce( OTHER: JSON.stringify(inspectedList), LONGITUDE: data.longitude, LATITUDE: data.latitude, - }); + }; + if (type === "supplementaryRecording") { + params.REASON = data.form.REASON; + params.CHECKRECORD_ID = CHECKRECORD_ID; + await setChecklistInspectionStatusRecordSupplementaryRecordingSubmit( + params + ); + } else await setInventoryTroubleshootingSubmit(params); ElMessage.success("操作成功"); router.back(); }, diff --git a/src/views/online_learn_exam/courseware/data/index.vue b/src/views/online_learn_exam/courseware/data/index.vue index 709a987..43f0ab8 100644 --- a/src/views/online_learn_exam/courseware/data/index.vue +++ b/src/views/online_learn_exam/courseware/data/index.vue @@ -218,7 +218,6 @@ diff --git a/src/views/hazard_investigation/checklist_inspection_status/inspection_record.vue b/src/views/hazard_investigation/checklist_inspection_status/inspection_record.vue index 644c8dd..b337385 100644 --- a/src/views/hazard_investigation/checklist_inspection_status/inspection_record.vue +++ b/src/views/hazard_investigation/checklist_inspection_status/inspection_record.vue @@ -115,7 +115,6 @@ DATESTART: row.DATESTART, DATEEND: row.DATEEND, LISTMANAGER_ID, - type: 'supplementaryRecording', }, }) " @@ -156,14 +155,14 @@ const { list, pagination, searchForm, fnGetData, fnResetPagination } = }); const fnGetDataTransfer = () => { fnGetData({ - STARTINSPECTTIME: searchForm.value.dates?.[0], - ENDINSPECTTIME: searchForm.value.dates?.[1], + STARTTIME: searchForm.value.dates?.[0], + ENDTIME: searchForm.value.dates?.[1], }); }; const fnResetPaginationTransfer = () => { fnResetPagination({ - STARTINSPECTTIME: searchForm.value.dates?.[0], - ENDINSPECTTIME: searchForm.value.dates?.[1], + STARTTIME: searchForm.value.dates?.[0], + ENDTIME: searchForm.value.dates?.[1], }); }; const buttonJurisdiction = await useButtonJurisdiction("checkrecord"); diff --git a/src/views/hazard_investigation/checklist_inspection_status/inspection_record_view.vue b/src/views/hazard_investigation/checklist_inspection_status/inspection_record_view.vue index 82061e0..93c2855 100644 --- a/src/views/hazard_investigation/checklist_inspection_status/inspection_record_view.vue +++ b/src/views/hazard_investigation/checklist_inspection_status/inspection_record_view.vue @@ -95,7 +95,7 @@ link @click=" router.push({ - path: '/hazard_investigation/checklist_inspection_status/inspection_record/view/hidden_danger', + path: hiddenPath[entrance], query: { HIDDEN_ID: row.HIDDEN_ID }, }) " @@ -161,7 +161,7 @@ link @click=" router.push({ - path: '/hazard_investigation/checklist_inspection_status/inspection_record/view/hidden_danger', + path: hiddenPath[entrance], query: { HIDDEN_ID: row.HIDDEN_ID }, }) " @@ -213,6 +213,18 @@ import { addingPrefixToFile } from "@/assets/js/utils.js"; import Qualified from "./components/qualified.vue"; import MapDialog from "./components/map.vue"; +defineProps({ + entrance: { + type: String, + default: "checklist_inspection_status", + }, +}); +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 route = useRoute(); const router = useRouter(); const { CHECKRECORD_ID } = route.query; diff --git a/src/views/hazard_investigation/checklist_inspection_status/supplementary_recording.vue b/src/views/hazard_investigation/checklist_inspection_status/supplementary_recording.vue index 8fec285..90c3e97 100644 --- a/src/views/hazard_investigation/checklist_inspection_status/supplementary_recording.vue +++ b/src/views/hazard_investigation/checklist_inspection_status/supplementary_recording.vue @@ -1,5 +1,5 @@ + + diff --git a/src/views/hazard_investigation/inspection_record/index.vue b/src/views/hazard_investigation/inspection_record/index.vue index d633546..b9e4f96 100644 --- a/src/views/hazard_investigation/inspection_record/index.vue +++ b/src/views/hazard_investigation/inspection_record/index.vue @@ -8,19 +8,28 @@ > - + + + + + + - + @@ -83,7 +92,7 @@ link @click=" router.push({ - path: '/hazard_investigation/checklist_inspection_status/inspection_record/view', + path: '/hazard_investigation/inspection_record/view', query: { CHECKRECORD_ID: row.CHECKRECORD_ID, }, @@ -109,13 +118,12 @@ link @click=" router.push({ - path: '/hazard_investigation/checklist_inspection_status/inspection_record/supplementary_recording', + path: '/hazard_investigation/inspection_record/supplementary_recording', query: { CHECKRECORD_ID: row.CHECKRECORD_ID, DATESTART: row.DATESTART, DATEEND: row.DATEEND, - LISTMANAGER_ID, - type: 'supplementaryRecording', + LISTMANAGER_ID: row.LISTMANAGER_ID, }, }) " @@ -151,6 +159,8 @@ const { list, pagination, searchForm, fnGetData, fnResetPagination } = useListData(getInspectionRecordList, { otherParams: { USER_ID: userStore.getUserInfo.USER_ID, + }, + defaultSearchForm: { TYPE: "1", }, callbackFn: (list, resData) => { @@ -159,14 +169,14 @@ const { list, pagination, searchForm, fnGetData, fnResetPagination } = }); const fnGetDataTransfer = () => { fnGetData({ - STARTINSPECTTIME: searchForm.value.dates?.[0], - ENDINSPECTTIME: searchForm.value.dates?.[1], + STARTTIME: searchForm.value.dates?.[0], + ENDTIME: searchForm.value.dates?.[1], }); }; const fnResetPaginationTransfer = () => { fnResetPagination({ - STARTINSPECTTIME: searchForm.value.dates?.[0], - ENDINSPECTTIME: searchForm.value.dates?.[1], + STARTTIME: searchForm.value.dates?.[0], + ENDTIME: searchForm.value.dates?.[1], }); }; const buttonJurisdiction = await useButtonJurisdiction("checkrecord"); diff --git a/src/views/hazard_investigation/inspection_record/supplementary_recording.vue b/src/views/hazard_investigation/inspection_record/supplementary_recording.vue new file mode 100644 index 0000000..90c3e97 --- /dev/null +++ b/src/views/hazard_investigation/inspection_record/supplementary_recording.vue @@ -0,0 +1,9 @@ + + + + + diff --git a/src/views/hazard_investigation/inspection_record/view.vue b/src/views/hazard_investigation/inspection_record/view.vue new file mode 100644 index 0000000..0ec62f0 --- /dev/null +++ b/src/views/hazard_investigation/inspection_record/view.vue @@ -0,0 +1,9 @@ + + + + + diff --git a/src/views/hazard_investigation/inventory_troubleshooting/inspect.vue b/src/views/hazard_investigation/inventory_troubleshooting/inspect.vue index 021bb53..14255d7 100644 --- a/src/views/hazard_investigation/inventory_troubleshooting/inspect.vue +++ b/src/views/hazard_investigation/inventory_troubleshooting/inspect.vue @@ -50,21 +50,21 @@ 不合格 不涉及 @@ -78,7 +78,7 @@ 添加 @@ -195,7 +195,7 @@ - + @@ -265,9 +265,14 @@ import { WarningFilled } from "@element-plus/icons-vue"; const route = useRoute(); const router = useRouter(); -const { LISTMANAGER_ID, type, CHECKRECORD_ID, DATEEND, DATESTART } = - route.query; -console.log(CHECKRECORD_ID); +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" }, @@ -367,7 +372,7 @@ const fnQualified = async (index, row) => { inspectionList.value[index].ISNORMAL = 0; }; const fnNotInvolved = (index, row) => { - if (row.HASHIDDEN > 0 || type === "supplementaryRecording") return; + if (row.HASHIDDEN > 0 || props.entrance === "supplementaryRecording") return; fnRemoveUnqualified(index); inspectionList.value[index].ISNORMAL = 2; }; @@ -375,7 +380,7 @@ const fnRemoveUnqualified = (index) => { inspectionList.value[index].HIDDEN_ID = ""; }; const fnUnqualified = async (index, row) => { - if (row.HASHIDDEN > 0 || type === "supplementaryRecording") return; + if (row.HASHIDDEN > 0 || props.entrance === "supplementaryRecording") return; data.unQualifiedDialog.visible = true; await nextTick(); if ( @@ -484,7 +489,7 @@ const fnSubmit = debounce( LONGITUDE: data.longitude, LATITUDE: data.latitude, }; - if (type === "supplementaryRecording") { + if (props.entrance === "supplementaryRecording") { params.REASON = data.form.REASON; params.CHECKRECORD_ID = CHECKRECORD_ID; await setChecklistInspectionStatusRecordSupplementaryRecordingSubmit( From a46297da57cd2590ef5336a5d8bb8f08a605c575 Mon Sep 17 00:00:00 2001 From: z Date: Sat, 13 Jan 2024 13:46:40 +0800 Subject: [PATCH 3/6] init --- src/assets/js/asyncRouter.js | 13 + src/request/hazard_investigation.js | 17 +- .../components/inspection_record_view.vue | 276 ++++++++++++++++++ .../inspection_record_view.vue | 257 +--------------- .../inspection_record/batch_printing.vue | 24 ++ .../inspection_record/index.vue | 24 +- .../inspection_record/view.vue | 4 +- .../components/un_qualified.vue | 21 +- .../inventory_troubleshooting/inspect.vue | 8 +- .../troubleshooting_plan/index.vue | 119 ++++++++ 10 files changed, 483 insertions(+), 280 deletions(-) create mode 100644 src/views/hazard_investigation/checklist_inspection_status/components/inspection_record_view.vue create mode 100644 src/views/hazard_investigation/inspection_record/batch_printing.vue create mode 100644 src/views/hazard_investigation/troubleshooting_plan/index.vue diff --git a/src/assets/js/asyncRouter.js b/src/assets/js/asyncRouter.js index a83bfbf..1d5578f 100644 --- a/src/assets/js/asyncRouter.js +++ b/src/assets/js/asyncRouter.js @@ -410,8 +410,21 @@ export default [ }, ], }, + { + 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", + }, ], }, { diff --git a/src/request/hazard_investigation.js b/src/request/hazard_investigation.js index 668322b..233159d 100644 --- a/src/request/hazard_investigation.js +++ b/src/request/hazard_investigation.js @@ -38,15 +38,11 @@ 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); // 清单排查提交 @@ -66,6 +62,7 @@ export const getChecklistInspectionStatusRecordViewOtherHiddenDangerList = ( ) => post("/hidden/getCheckHidden", params); // 清单检查情况检查记录查看其它隐患列表 export const getChecklistInspectionStatusRecordMap = (params) => post("/checkrecord/goMap", params); // 清单检查情况检查记录查看地图 -export const getHiddenDangerView = (params) => post("/hidden/goEdit", params); // 清单排查隐患查看 export const getInspectionRecordList = (params) => post("/checkrecord/allList", params); // 检查记录管理列表 +export const getTroubleshootingPlanList = (params) => + post("/listmanager/checkPlan", params); // 排查计划列表 diff --git a/src/views/hazard_investigation/checklist_inspection_status/components/inspection_record_view.vue b/src/views/hazard_investigation/checklist_inspection_status/components/inspection_record_view.vue new file mode 100644 index 0000000..949b787 --- /dev/null +++ b/src/views/hazard_investigation/checklist_inspection_status/components/inspection_record_view.vue @@ -0,0 +1,276 @@ + + + + + diff --git a/src/views/hazard_investigation/checklist_inspection_status/inspection_record_view.vue b/src/views/hazard_investigation/checklist_inspection_status/inspection_record_view.vue index 93c2855..25f2943 100644 --- a/src/views/hazard_investigation/checklist_inspection_status/inspection_record_view.vue +++ b/src/views/hazard_investigation/checklist_inspection_status/inspection_record_view.vue @@ -1,217 +1,20 @@ diff --git a/src/views/hazard_investigation/inspection_record/batch_printing.vue b/src/views/hazard_investigation/inspection_record/batch_printing.vue new file mode 100644 index 0000000..3c8e1ed --- /dev/null +++ b/src/views/hazard_investigation/inspection_record/batch_printing.vue @@ -0,0 +1,24 @@ + + + + + diff --git a/src/views/hazard_investigation/inspection_record/index.vue b/src/views/hazard_investigation/inspection_record/index.vue index b9e4f96..e72b659 100644 --- a/src/views/hazard_investigation/inspection_record/index.vue +++ b/src/views/hazard_investigation/inspection_record/index.vue @@ -43,6 +43,11 @@ + + + 批量打印 + + @@ -51,7 +56,10 @@ :data="list" @get-data="fnGetDataTransfer" v-model:pagination="pagination" + ref="tableRef" + row-key="CHECKRECORD_ID" > + - + diff --git a/src/views/hidden_danger_government/acceptance/acceptance.vue b/src/views/hidden_danger_government/acceptance/acceptance.vue new file mode 100644 index 0000000..44de4d6 --- /dev/null +++ b/src/views/hidden_danger_government/acceptance/acceptance.vue @@ -0,0 +1,125 @@ + + + + + diff --git a/src/views/hidden_danger_government/acceptance/index.vue b/src/views/hidden_danger_government/acceptance/index.vue new file mode 100644 index 0000000..9911271 --- /dev/null +++ b/src/views/hidden_danger_government/acceptance/index.vue @@ -0,0 +1,156 @@ + + + + + diff --git a/src/views/hidden_danger_government/acceptance/view.vue b/src/views/hidden_danger_government/acceptance/view.vue new file mode 100644 index 0000000..f7c6703 --- /dev/null +++ b/src/views/hidden_danger_government/acceptance/view.vue @@ -0,0 +1,9 @@ + + + + + diff --git a/src/views/hidden_danger_government/ledger/add.vue b/src/views/hidden_danger_government/ledger/add.vue new file mode 100644 index 0000000..4bf8287 --- /dev/null +++ b/src/views/hidden_danger_government/ledger/add.vue @@ -0,0 +1,75 @@ + + + + + diff --git a/src/views/hidden_danger_government/ledger/index.vue b/src/views/hidden_danger_government/ledger/index.vue new file mode 100644 index 0000000..6ee7b60 --- /dev/null +++ b/src/views/hidden_danger_government/ledger/index.vue @@ -0,0 +1,216 @@ + + + + + diff --git a/src/views/hidden_danger_government/ledger/view.vue b/src/views/hidden_danger_government/ledger/view.vue new file mode 100644 index 0000000..f7c6703 --- /dev/null +++ b/src/views/hidden_danger_government/ledger/view.vue @@ -0,0 +1,9 @@ + + + + + diff --git a/src/views/hidden_danger_government/major/index.vue b/src/views/hidden_danger_government/major/index.vue new file mode 100644 index 0000000..8dd95ce --- /dev/null +++ b/src/views/hidden_danger_government/major/index.vue @@ -0,0 +1,179 @@ + + + + + diff --git a/src/views/hidden_danger_government/major/view.vue b/src/views/hidden_danger_government/major/view.vue new file mode 100644 index 0000000..f46c38a --- /dev/null +++ b/src/views/hidden_danger_government/major/view.vue @@ -0,0 +1,41 @@ + + + + + diff --git a/src/views/hidden_danger_government/rectification/index.vue b/src/views/hidden_danger_government/rectification/index.vue new file mode 100644 index 0000000..8840aac --- /dev/null +++ b/src/views/hidden_danger_government/rectification/index.vue @@ -0,0 +1,162 @@ + + + + + diff --git a/src/views/hidden_danger_government/rectification/rectification.vue b/src/views/hidden_danger_government/rectification/rectification.vue new file mode 100644 index 0000000..c7813b6 --- /dev/null +++ b/src/views/hidden_danger_government/rectification/rectification.vue @@ -0,0 +1,538 @@ + + + + + diff --git a/src/views/hidden_danger_government/rectification/view.vue b/src/views/hidden_danger_government/rectification/view.vue new file mode 100644 index 0000000..f7c6703 --- /dev/null +++ b/src/views/hidden_danger_government/rectification/view.vue @@ -0,0 +1,9 @@ + + + + + From fee5d6f786c8bbe05785e82a0fb2f120394119ad Mon Sep 17 00:00:00 2001 From: z Date: Mon, 15 Jan 2024 13:51:54 +0800 Subject: [PATCH 5/6] init --- src/assets/js/asyncRouter.js | 35 ++++ src/assets/js/useDownloadBlob.js | 45 +++++ src/request/axios.js | 1 - src/request/hidden_danger_government.js | 2 + .../hazard_analysis/index.vue | 172 ++++++++++++++++++ .../hazard_analysis/view.vue | 9 + .../components/hidden_view.vue | 2 +- .../delete_inventory_management/view.vue | 2 - .../ledger/components/export_excel.vue | 169 +++++++++++++++++ .../hidden_danger_government/ledger/index.vue | 34 +++- .../hidden_danger_government/ledger/print.vue | 124 +++++++++++++ 11 files changed, 589 insertions(+), 6 deletions(-) create mode 100644 src/assets/js/useDownloadBlob.js create mode 100644 src/views/continuous_improvement/hazard_analysis/index.vue create mode 100644 src/views/continuous_improvement/hazard_analysis/view.vue create mode 100644 src/views/hidden_danger_government/ledger/components/export_excel.vue create mode 100644 src/views/hidden_danger_government/ledger/print.vue diff --git a/src/assets/js/asyncRouter.js b/src/assets/js/asyncRouter.js index 4ae4586..a39cdce 100644 --- a/src/assets/js/asyncRouter.js +++ b/src/assets/js/asyncRouter.js @@ -531,6 +531,41 @@ export default [ }, 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", + }, ], }, ], diff --git a/src/assets/js/useDownloadBlob.js b/src/assets/js/useDownloadBlob.js new file mode 100644 index 0000000..e2a0578 --- /dev/null +++ b/src/assets/js/useDownloadBlob.js @@ -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); + }); + }); +} diff --git a/src/request/axios.js b/src/request/axios.js index 46eb051..a33bb85 100644 --- a/src/request/axios.js +++ b/src/request/axios.js @@ -46,7 +46,6 @@ axios.interceptors.response.use( return config; }, (error) => { - console.log(error); if (error && error.response) { switch (error.response.status) { case 0: diff --git a/src/request/hidden_danger_government.js b/src/request/hidden_danger_government.js index 360534d..2af0331 100644 --- a/src/request/hidden_danger_government.js +++ b/src/request/hidden_danger_government.js @@ -13,3 +13,5 @@ export const setHiddenDangerCancelMajorHazards = (params) => post("/hidden/editHIDDENLEVEL", params); // 重大隐患管理取消重大隐患 export const setHiddenDangerConfirmMajorHazards = (params) => post("/hidden/editISCONFIRM", params); // 重大隐患管理确认重大隐患 +export const getHiddenDangerPrintList = (params) => + post("/hidden/listAllToPrint", params); // 隐患打印列表 diff --git a/src/views/continuous_improvement/hazard_analysis/index.vue b/src/views/continuous_improvement/hazard_analysis/index.vue new file mode 100644 index 0000000..4d8ea3e --- /dev/null +++ b/src/views/continuous_improvement/hazard_analysis/index.vue @@ -0,0 +1,172 @@ + + + + + diff --git a/src/views/continuous_improvement/hazard_analysis/view.vue b/src/views/continuous_improvement/hazard_analysis/view.vue new file mode 100644 index 0000000..f7c6703 --- /dev/null +++ b/src/views/continuous_improvement/hazard_analysis/view.vue @@ -0,0 +1,9 @@ + + + + + diff --git a/src/views/hazard_investigation/checklist_inspection_status/components/hidden_view.vue b/src/views/hazard_investigation/checklist_inspection_status/components/hidden_view.vue index 1ee2a45..2931929 100644 --- a/src/views/hazard_investigation/checklist_inspection_status/components/hidden_view.vue +++ b/src/views/hazard_investigation/checklist_inspection_status/components/hidden_view.vue @@ -194,7 +194,7 @@ - - - diff --git a/src/views/risk_control/identifying_parts/components/risk_add.vue b/src/views/risk_control/identifying_parts/components/risk_add.vue new file mode 100644 index 0000000..122079b --- /dev/null +++ b/src/views/risk_control/identifying_parts/components/risk_add.vue @@ -0,0 +1,91 @@ + + + + + diff --git a/src/views/risk_control/identifying_parts/resources_risk.vue b/src/views/risk_control/identifying_parts/resources_risk.vue index f5251f8..1407221 100644 --- a/src/views/risk_control/identifying_parts/resources_risk.vue +++ b/src/views/risk_control/identifying_parts/resources_risk.vue @@ -89,7 +89,7 @@
保存
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {{ form.LIKELIHOOD }} - - - - - - - - - - - - - - - - - {{ form.EXPOSURE }} - - - - - - - - - - - - - - - - - {{ form.CONSEQUENCE }} - - - - - {{ form.LEVEL_NAME }} - - - - - {{ form.DANGER }} - - - - - - - - - - - - - - - - - - - - - - +