From cc94d3e3e93a9e25fe21a73b71a9810c98829a20 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E7=8E=8B=E5=88=A9=E5=BC=BA?= <18394468624@163.com>
Date: Sun, 21 Jun 2026 16:30:12 +0800
Subject: [PATCH] =?UTF-8?q?=E9=9A=90=E6=82=A3=E8=AF=A6=E6=83=85=E9=87=8D?=
=?UTF-8?q?=E6=96=B0=E8=AE=BE=E8=AE=A1=EF=BC=8C=E6=A3=80=E6=9F=A5=E8=AE=A1?=
=?UTF-8?q?=E5=88=92=E9=87=8D=E6=96=B0=E8=AE=BE=E8=AE=A1=E6=88=90=E5=81=9A?=
=?UTF-8?q?=E9=A2=98=E6=8E=92=E6=9F=A5=E5=BC=8F?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
components/hazard/HazardFormPopup.vue | 1182 +++++++++++++++
components/hazard/hazardForm.js | 72 +
components/hazard/index.js | 1 +
components/hazardDetail/HazardDetailPanel.vue | 760 ++++++++++
.../hazardDetail/HazardDetailPanelV2.vue | 743 ++++++++++
components/hazardDetail/hazardDetail.js | 371 +++++
components/hazardDetail/index.js | 1 +
.../hazardDetail/useHazardDetailScroll.js | 164 +++
pages.json | 24 +-
pages/Inspectionresult/Inspectionresult.vue | 1255 ++--------------
pages/Inspectionresult/detail.vue | 1284 +++++++++++++++++
pages/Inspectionresult/list.vue | 284 ++++
pages/editchecklist/editchecklist.vue | 82 +-
pages/hiddendanger/Inspection.vue | 1169 +--------------
pages/hiddendanger/acceptance.vue | 353 +++--
pages/hiddendanger/assignment.vue | 116 +-
pages/hiddendanger/detail2.vue | 243 ++++
pages/hiddendanger/rectification.vue | 343 +++--
pages/hiddendanger/view.vue | 218 +--
pages/index/index.vue | 250 +++-
pages/login/login.vue | 2 +-
pages/membermanagemen/membermanagemen.vue | 128 +-
request/api.js | 60 +-
request/request.js | 8 +-
static/yinhuan_detail/date.png | Bin 0 -> 2709 bytes
static/yinhuan_detail/jiaoban__selected.png | Bin 0 -> 1121 bytes
static/yinhuan_detail/jiaoban__unselected.png | Bin 0 -> 1437 bytes
static/yinhuan_detail/status.png | Bin 0 -> 1567 bytes
static/yinhuan_detail/tijiao__selected.png | Bin 0 -> 583 bytes
static/yinhuan_detail/tijiao__unselected.png | Bin 0 -> 758 bytes
static/yinhuan_detail/xiaohao__selected.png | Bin 0 -> 929 bytes
static/yinhuan_detail/xiaohao__unselected.png | Bin 0 -> 1153 bytes
static/yinhuan_detail/yanshou__selected.png | Bin 0 -> 780 bytes
static/yinhuan_detail/yanshou__unselected.png | Bin 0 -> 730 bytes
.../yinhuan_detail/zhenggai__unselected.png | Bin 0 -> 991 bytes
static/yinhuan_detail/zhenggai_selected.png | Bin 0 -> 751 bytes
unpackage/dist/build/mp-weixin/app.json | 3 +
.../dist/build/mp-weixin/common/assets.js | 2 +-
.../dist/build/mp-weixin/common/vendor.js | 4 +-
.../components/hazard/HazardFormPopup.js | 1 +
.../components/hazard/HazardFormPopup.json | 9 +
.../components/hazard/HazardFormPopup.wxml | 1 +
.../components/hazard/HazardFormPopup.wxss | 1 +
.../mp-weixin/components/hazard/hazardForm.js | 1 +
.../mp-weixin/components/hazard/index.js | 1 +
.../hazardDetail/HazardDetailPanel.js | 1 +
.../hazardDetail/HazardDetailPanel.json | 4 +
.../hazardDetail/HazardDetailPanel.wxml | 1 +
.../hazardDetail/HazardDetailPanel.wxss | 1 +
.../hazardDetail/HazardDetailPanelV2.js | 1 +
.../hazardDetail/HazardDetailPanelV2.json | 4 +
.../hazardDetail/HazardDetailPanelV2.wxml | 1 +
.../hazardDetail/HazardDetailPanelV2.wxss | 1 +
.../components/hazardDetail/hazardDetail.js | 1 +
.../hazardDetail/useHazardDetailScroll.js | 1 +
.../Inspectionresult/Inspectionresult.js | 2 +-
.../Inspectionresult/Inspectionresult.json | 5 +-
.../Inspectionresult/Inspectionresult.wxml | 2 +-
.../Inspectionresult/Inspectionresult.wxss | 2 +-
.../pages/Inspectionresult/detail.js | 1 +
.../pages/Inspectionresult/detail.json | 11 +
.../pages/Inspectionresult/detail.wxml | 1 +
.../pages/Inspectionresult/detail.wxss | 1 +
.../mp-weixin/pages/Inspectionresult/list.js | 1 +
.../pages/Inspectionresult/list.json | 7 +
.../pages/Inspectionresult/list.wxml | 1 +
.../pages/Inspectionresult/list.wxss | 1 +
.../Inspectionwarning/Inspectionwarning.js | 2 +-
.../pages/editchecklist/editchecklist.js | 2 +-
.../pages/editchecklist/editchecklist.wxml | 2 +-
.../pages/editchecklist/editchecklist.wxss | 2 +-
.../pages/hiddendanger/Inspection.js | 2 +-
.../pages/hiddendanger/Inspection.json | 6 +-
.../pages/hiddendanger/Inspection.wxml | 2 +-
.../pages/hiddendanger/Inspection.wxss | 2 +-
.../pages/hiddendanger/acceptance.js | 2 +-
.../pages/hiddendanger/acceptance.wxml | 2 +-
.../pages/hiddendanger/acceptance.wxss | 2 +-
.../pages/hiddendanger/assignment.js | 2 +-
.../pages/hiddendanger/assignment.wxml | 2 +-
.../pages/hiddendanger/assignment.wxss | 2 +-
.../mp-weixin/pages/hiddendanger/detail2.js | 1 +
.../mp-weixin/pages/hiddendanger/detail2.json | 10 +
.../mp-weixin/pages/hiddendanger/detail2.wxml | 1 +
.../mp-weixin/pages/hiddendanger/detail2.wxss | 1 +
.../pages/hiddendanger/rectification.js | 2 +-
.../pages/hiddendanger/rectification.wxml | 2 +-
.../pages/hiddendanger/rectification.wxss | 2 +-
.../mp-weixin/pages/hiddendanger/view.js | 2 +-
.../mp-weixin/pages/hiddendanger/view.json | 3 +-
.../mp-weixin/pages/hiddendanger/view.wxml | 2 +-
.../mp-weixin/pages/hiddendanger/view.wxss | 2 +-
.../dist/build/mp-weixin/pages/index/index.js | 2 +-
.../build/mp-weixin/pages/index/index.json | 5 +-
.../build/mp-weixin/pages/index/index.wxml | 2 +-
.../build/mp-weixin/pages/index/index.wxss | 2 +-
.../build/mp-weixin/pages/login/forget.js | 2 +-
.../dist/build/mp-weixin/pages/login/login.js | 2 +-
.../build/mp-weixin/pages/login/login.wxml | 2 +-
.../build/mp-weixin/pages/login/login.wxss | 2 +-
.../build/mp-weixin/pages/login/success.js | 2 +-
.../pages/membermanagemen/membermanagemen.js | 2 +-
.../membermanagemen/membermanagemen.wxml | 2 +-
.../membermanagemen/membermanagemen.wxss | 2 +-
.../pages/personalcenter/helpcenter.js | 2 +-
.../mp-weixin/pages/personalcenter/my.js | 2 +-
unpackage/dist/build/mp-weixin/request/api.js | 2 +-
.../mp-weixin/static/yinhuan_detail/date.png | Bin 0 -> 2709 bytes
.../yinhuan_detail/jiaoban__selected.png | Bin 0 -> 1121 bytes
.../yinhuan_detail/jiaoban__unselected.png | Bin 0 -> 1437 bytes
.../static/yinhuan_detail/status.png | Bin 0 -> 1567 bytes
.../yinhuan_detail/tijiao__selected.png | Bin 0 -> 583 bytes
.../yinhuan_detail/tijiao__unselected.png | Bin 0 -> 758 bytes
.../yinhuan_detail/xiaohao__selected.png | Bin 0 -> 929 bytes
.../yinhuan_detail/xiaohao__unselected.png | Bin 0 -> 1153 bytes
.../yinhuan_detail/yanshou__selected.png | Bin 0 -> 780 bytes
.../yinhuan_detail/yanshou__unselected.png | Bin 0 -> 730 bytes
.../yinhuan_detail/zhenggai__unselected.png | Bin 0 -> 991 bytes
.../yinhuan_detail/zhenggai_selected.png | Bin 0 -> 751 bytes
.../components/u-choose/u-choose.js | 1 -
.../components/u-choose/u-choose.json | 6 -
.../components/u-choose/u-choose.wxml | 1 -
.../components/u-choose/u-choose.wxss | 1 -
.../uview-plus/components/u-tag/props.js | 1 -
.../uview-plus/components/u-tag/u-tag.js | 1 -
.../uview-plus/components/u-tag/u-tag.json | 7 -
.../uview-plus/components/u-tag/u-tag.wxml | 1 -
.../uview-plus/components/u-tag/u-tag.wxss | 1 -
.../uview-plus/libs/function/index.js | 2 +-
.../dist/build/mp-weixin/utils/draftCache.js | 1 +
.../build/mp-weixin/utils/useDraftCache.js | 1 +
.../dist/dev/.sourcemap/mp-weixin/app.js.map | 2 +-
.../.sourcemap/mp-weixin/common/assets.js.map | 2 +-
.../.sourcemap/mp-weixin/common/vendor.js.map | 2 +-
.../components/hazard/HazardFormPopup.js.map | 1 +
.../components/hazard/hazardForm.js.map | 1 +
.../mp-weixin/components/hazard/index.js.map | 1 +
.../hazardDetail/HazardDetailPanel.js.map | 1 +
.../hazardDetail/HazardDetailPanelV2.js.map | 1 +
.../hazardDetail/hazardDetail.js.map | 1 +
.../hazardDetail/useHazardDetailScroll.js.map | 1 +
.../Inspectionresult/Inspectionresult.js.map | 2 +-
.../pages/Inspectionresult/detail.js.map | 1 +
.../pages/Inspectionresult/list.js.map | 1 +
.../pages/editchecklist/editchecklist.js.map | 2 +-
.../pages/hiddendanger/Inspection.js.map | 2 +-
.../pages/hiddendanger/acceptance.js.map | 2 +-
.../pages/hiddendanger/assignment.js.map | 2 +-
.../pages/hiddendanger/detail2.js.map | 1 +
.../pages/hiddendanger/rectification.js.map | 2 +-
.../mp-weixin/pages/hiddendanger/view.js.map | 2 +-
.../mp-weixin/pages/index/index.js.map | 2 +-
.../mp-weixin/pages/login/login.js.map | 2 +-
.../membermanagemen/membermanagemen.js.map | 2 +-
.../.sourcemap/mp-weixin/request/api.js.map | 2 +-
.../mp-weixin/request/request.js.map | 2 +-
.../components/u-checkbox-group/props.js.map | 1 -
.../u-checkbox-group/u-checkbox-group.js.map | 1 -
.../components/u-choose/u-choose.js.map | 1 -
.../uview-plus/components/u-tag/props.js.map | 1 -
.../uview-plus/components/u-tag/u-tag.js.map | 1 -
.../uview-plus/libs/function/index.js.map | 2 +-
.../mp-weixin/utils/draftCache.js.map | 1 +
.../mp-weixin/utils/useDraftCache.js.map | 1 +
unpackage/dist/dev/mp-weixin/app.js | 3 +
unpackage/dist/dev/mp-weixin/app.json | 3 +
unpackage/dist/dev/mp-weixin/common/assets.js | 28 +-
unpackage/dist/dev/mp-weixin/common/vendor.js | 59 +-
.../components/hazard/HazardFormPopup.js | 657 +++++++++
.../components/hazard/HazardFormPopup.json | 9 +
.../components/hazard/HazardFormPopup.wxml | 1 +
.../components/hazard/HazardFormPopup.wxss | 373 +++++
.../mp-weixin/components/hazard/hazardForm.js | 73 +
.../dev/mp-weixin/components/hazard/index.js | 4 +
.../hazardDetail/HazardDetailPanel.js | 242 ++++
.../hazardDetail/HazardDetailPanel.json | 4 +
.../hazardDetail/HazardDetailPanel.wxml | 1 +
.../hazardDetail/HazardDetailPanel.wxss | 331 +++++
.../hazardDetail/HazardDetailPanelV2.js | 265 ++++
.../hazardDetail/HazardDetailPanelV2.json | 4 +
.../hazardDetail/HazardDetailPanelV2.wxml | 1 +
.../hazardDetail/HazardDetailPanelV2.wxss | 292 ++++
.../components/hazardDetail/hazardDetail.js | 203 +++
.../hazardDetail/useHazardDetailScroll.js | 144 ++
.../Inspectionresult/Inspectionresult.js | 711 ++-------
.../Inspectionresult/Inspectionresult.json | 5 +-
.../Inspectionresult/Inspectionresult.wxml | 2 +-
.../Inspectionresult/Inspectionresult.wxss | 274 ----
.../pages/Inspectionresult/detail.js | 645 +++++++++
.../pages/Inspectionresult/detail.json | 11 +
.../pages/Inspectionresult/detail.wxml | 1 +
.../pages/Inspectionresult/detail.wxss | 455 ++++++
.../mp-weixin/pages/Inspectionresult/list.js | 138 ++
.../pages/Inspectionresult/list.json | 7 +
.../pages/Inspectionresult/list.wxml | 1 +
.../pages/Inspectionresult/list.wxss | 105 ++
.../Inspectionwarning/Inspectionwarning.js | 4 +-
.../pages/editchecklist/editchecklist.js | 89 +-
.../pages/hiddendanger/Inspection.js | 554 +------
.../pages/hiddendanger/Inspection.json | 6 +-
.../pages/hiddendanger/Inspection.wxml | 2 +-
.../pages/hiddendanger/Inspection.wxss | 338 -----
.../pages/hiddendanger/acceptance.js | 333 +++--
.../pages/hiddendanger/acceptance.wxml | 2 +-
.../pages/hiddendanger/assignment.js | 113 +-
.../mp-weixin/pages/hiddendanger/detail2.js | 106 ++
.../mp-weixin/pages/hiddendanger/detail2.json | 10 +
.../mp-weixin/pages/hiddendanger/detail2.wxml | 1 +
.../mp-weixin/pages/hiddendanger/detail2.wxss | 132 ++
.../pages/hiddendanger/rectification.js | 308 ++--
.../pages/hiddendanger/rectification.wxml | 2 +-
.../dev/mp-weixin/pages/hiddendanger/view.js | 114 +-
.../mp-weixin/pages/hiddendanger/view.json | 3 +-
.../mp-weixin/pages/hiddendanger/view.wxml | 2 +-
.../mp-weixin/pages/hiddendanger/view.wxss | 37 +-
.../dist/dev/mp-weixin/pages/index/index.js | 177 ++-
.../dist/dev/mp-weixin/pages/index/index.json | 5 +-
.../dist/dev/mp-weixin/pages/index/index.wxml | 2 +-
.../dist/dev/mp-weixin/pages/index/index.wxss | 29 +
.../dist/dev/mp-weixin/pages/login/forget.js | 4 +-
.../dist/dev/mp-weixin/pages/login/login.js | 6 +-
.../dist/dev/mp-weixin/pages/login/login.wxml | 2 +-
.../dist/dev/mp-weixin/pages/login/success.js | 2 +-
.../pages/membermanagemen/membermanagemen.js | 136 +-
.../membermanagemen/membermanagemen.wxml | 2 +-
.../pages/personalcenter/helpcenter.js | 4 +-
.../dev/mp-weixin/pages/personalcenter/my.js | 4 +-
unpackage/dist/dev/mp-weixin/request/api.js | 47 +
.../dist/dev/mp-weixin/request/request.js | 8 +-
.../mp-weixin/static/yinhuan_detail/date.png | Bin 0 -> 2709 bytes
.../yinhuan_detail/jiaoban__selected.png | Bin 0 -> 1121 bytes
.../yinhuan_detail/jiaoban__unselected.png | Bin 0 -> 1437 bytes
.../static/yinhuan_detail/status.png | Bin 0 -> 1567 bytes
.../yinhuan_detail/tijiao__selected.png | Bin 0 -> 583 bytes
.../yinhuan_detail/tijiao__unselected.png | Bin 0 -> 758 bytes
.../yinhuan_detail/xiaohao__selected.png | Bin 0 -> 929 bytes
.../yinhuan_detail/xiaohao__unselected.png | Bin 0 -> 1153 bytes
.../yinhuan_detail/yanshou__selected.png | Bin 0 -> 780 bytes
.../yinhuan_detail/yanshou__unselected.png | Bin 0 -> 730 bytes
.../yinhuan_detail/zhenggai__unselected.png | Bin 0 -> 991 bytes
.../yinhuan_detail/zhenggai_selected.png | Bin 0 -> 751 bytes
.../components/u-choose/u-choose.js | 110 --
.../components/u-choose/u-choose.json | 6 -
.../components/u-choose/u-choose.wxml | 1 -
.../components/u-choose/u-choose.wxss | 39 -
.../uview-plus/components/u-tag/props.js | 119 --
.../uview-plus/components/u-tag/u-tag.js | 162 ---
.../uview-plus/components/u-tag/u-tag.json | 7 -
.../uview-plus/components/u-tag/u-tag.wxml | 1 -
.../uview-plus/components/u-tag/u-tag.wxss | 186 ---
.../uview-plus/libs/function/index.js | 1 -
.../dist/dev/mp-weixin/utils/draftCache.js | 80 +
.../dist/dev/mp-weixin/utils/useDraftCache.js | 114 ++
utils/draftCache.js | 102 ++
utils/useDraftCache.js | 158 ++
代码结构分析与优化建议.md | 423 ++++++
256 files changed, 12542 insertions(+), 5956 deletions(-)
create mode 100644 components/hazard/HazardFormPopup.vue
create mode 100644 components/hazard/hazardForm.js
create mode 100644 components/hazard/index.js
create mode 100644 components/hazardDetail/HazardDetailPanel.vue
create mode 100644 components/hazardDetail/HazardDetailPanelV2.vue
create mode 100644 components/hazardDetail/hazardDetail.js
create mode 100644 components/hazardDetail/index.js
create mode 100644 components/hazardDetail/useHazardDetailScroll.js
create mode 100644 pages/Inspectionresult/detail.vue
create mode 100644 pages/Inspectionresult/list.vue
create mode 100644 pages/hiddendanger/detail2.vue
create mode 100644 static/yinhuan_detail/date.png
create mode 100644 static/yinhuan_detail/jiaoban__selected.png
create mode 100644 static/yinhuan_detail/jiaoban__unselected.png
create mode 100644 static/yinhuan_detail/status.png
create mode 100644 static/yinhuan_detail/tijiao__selected.png
create mode 100644 static/yinhuan_detail/tijiao__unselected.png
create mode 100644 static/yinhuan_detail/xiaohao__selected.png
create mode 100644 static/yinhuan_detail/xiaohao__unselected.png
create mode 100644 static/yinhuan_detail/yanshou__selected.png
create mode 100644 static/yinhuan_detail/yanshou__unselected.png
create mode 100644 static/yinhuan_detail/zhenggai__unselected.png
create mode 100644 static/yinhuan_detail/zhenggai_selected.png
create mode 100644 unpackage/dist/build/mp-weixin/components/hazard/HazardFormPopup.js
create mode 100644 unpackage/dist/build/mp-weixin/components/hazard/HazardFormPopup.json
create mode 100644 unpackage/dist/build/mp-weixin/components/hazard/HazardFormPopup.wxml
create mode 100644 unpackage/dist/build/mp-weixin/components/hazard/HazardFormPopup.wxss
create mode 100644 unpackage/dist/build/mp-weixin/components/hazard/hazardForm.js
create mode 100644 unpackage/dist/build/mp-weixin/components/hazard/index.js
create mode 100644 unpackage/dist/build/mp-weixin/components/hazardDetail/HazardDetailPanel.js
create mode 100644 unpackage/dist/build/mp-weixin/components/hazardDetail/HazardDetailPanel.json
create mode 100644 unpackage/dist/build/mp-weixin/components/hazardDetail/HazardDetailPanel.wxml
create mode 100644 unpackage/dist/build/mp-weixin/components/hazardDetail/HazardDetailPanel.wxss
create mode 100644 unpackage/dist/build/mp-weixin/components/hazardDetail/HazardDetailPanelV2.js
create mode 100644 unpackage/dist/build/mp-weixin/components/hazardDetail/HazardDetailPanelV2.json
create mode 100644 unpackage/dist/build/mp-weixin/components/hazardDetail/HazardDetailPanelV2.wxml
create mode 100644 unpackage/dist/build/mp-weixin/components/hazardDetail/HazardDetailPanelV2.wxss
create mode 100644 unpackage/dist/build/mp-weixin/components/hazardDetail/hazardDetail.js
create mode 100644 unpackage/dist/build/mp-weixin/components/hazardDetail/useHazardDetailScroll.js
create mode 100644 unpackage/dist/build/mp-weixin/pages/Inspectionresult/detail.js
create mode 100644 unpackage/dist/build/mp-weixin/pages/Inspectionresult/detail.json
create mode 100644 unpackage/dist/build/mp-weixin/pages/Inspectionresult/detail.wxml
create mode 100644 unpackage/dist/build/mp-weixin/pages/Inspectionresult/detail.wxss
create mode 100644 unpackage/dist/build/mp-weixin/pages/Inspectionresult/list.js
create mode 100644 unpackage/dist/build/mp-weixin/pages/Inspectionresult/list.json
create mode 100644 unpackage/dist/build/mp-weixin/pages/Inspectionresult/list.wxml
create mode 100644 unpackage/dist/build/mp-weixin/pages/Inspectionresult/list.wxss
create mode 100644 unpackage/dist/build/mp-weixin/pages/hiddendanger/detail2.js
create mode 100644 unpackage/dist/build/mp-weixin/pages/hiddendanger/detail2.json
create mode 100644 unpackage/dist/build/mp-weixin/pages/hiddendanger/detail2.wxml
create mode 100644 unpackage/dist/build/mp-weixin/pages/hiddendanger/detail2.wxss
create mode 100644 unpackage/dist/build/mp-weixin/static/yinhuan_detail/date.png
create mode 100644 unpackage/dist/build/mp-weixin/static/yinhuan_detail/jiaoban__selected.png
create mode 100644 unpackage/dist/build/mp-weixin/static/yinhuan_detail/jiaoban__unselected.png
create mode 100644 unpackage/dist/build/mp-weixin/static/yinhuan_detail/status.png
create mode 100644 unpackage/dist/build/mp-weixin/static/yinhuan_detail/tijiao__selected.png
create mode 100644 unpackage/dist/build/mp-weixin/static/yinhuan_detail/tijiao__unselected.png
create mode 100644 unpackage/dist/build/mp-weixin/static/yinhuan_detail/xiaohao__selected.png
create mode 100644 unpackage/dist/build/mp-weixin/static/yinhuan_detail/xiaohao__unselected.png
create mode 100644 unpackage/dist/build/mp-weixin/static/yinhuan_detail/yanshou__selected.png
create mode 100644 unpackage/dist/build/mp-weixin/static/yinhuan_detail/yanshou__unselected.png
create mode 100644 unpackage/dist/build/mp-weixin/static/yinhuan_detail/zhenggai__unselected.png
create mode 100644 unpackage/dist/build/mp-weixin/static/yinhuan_detail/zhenggai_selected.png
delete mode 100644 unpackage/dist/build/mp-weixin/uni_modules/uview-plus/components/u-choose/u-choose.js
delete mode 100644 unpackage/dist/build/mp-weixin/uni_modules/uview-plus/components/u-choose/u-choose.json
delete mode 100644 unpackage/dist/build/mp-weixin/uni_modules/uview-plus/components/u-choose/u-choose.wxml
delete mode 100644 unpackage/dist/build/mp-weixin/uni_modules/uview-plus/components/u-choose/u-choose.wxss
delete mode 100644 unpackage/dist/build/mp-weixin/uni_modules/uview-plus/components/u-tag/props.js
delete mode 100644 unpackage/dist/build/mp-weixin/uni_modules/uview-plus/components/u-tag/u-tag.js
delete mode 100644 unpackage/dist/build/mp-weixin/uni_modules/uview-plus/components/u-tag/u-tag.json
delete mode 100644 unpackage/dist/build/mp-weixin/uni_modules/uview-plus/components/u-tag/u-tag.wxml
delete mode 100644 unpackage/dist/build/mp-weixin/uni_modules/uview-plus/components/u-tag/u-tag.wxss
create mode 100644 unpackage/dist/build/mp-weixin/utils/draftCache.js
create mode 100644 unpackage/dist/build/mp-weixin/utils/useDraftCache.js
create mode 100644 unpackage/dist/dev/.sourcemap/mp-weixin/components/hazard/HazardFormPopup.js.map
create mode 100644 unpackage/dist/dev/.sourcemap/mp-weixin/components/hazard/hazardForm.js.map
create mode 100644 unpackage/dist/dev/.sourcemap/mp-weixin/components/hazard/index.js.map
create mode 100644 unpackage/dist/dev/.sourcemap/mp-weixin/components/hazardDetail/HazardDetailPanel.js.map
create mode 100644 unpackage/dist/dev/.sourcemap/mp-weixin/components/hazardDetail/HazardDetailPanelV2.js.map
create mode 100644 unpackage/dist/dev/.sourcemap/mp-weixin/components/hazardDetail/hazardDetail.js.map
create mode 100644 unpackage/dist/dev/.sourcemap/mp-weixin/components/hazardDetail/useHazardDetailScroll.js.map
create mode 100644 unpackage/dist/dev/.sourcemap/mp-weixin/pages/Inspectionresult/detail.js.map
create mode 100644 unpackage/dist/dev/.sourcemap/mp-weixin/pages/Inspectionresult/list.js.map
create mode 100644 unpackage/dist/dev/.sourcemap/mp-weixin/pages/hiddendanger/detail2.js.map
delete mode 100644 unpackage/dist/dev/.sourcemap/mp-weixin/uni_modules/uview-plus/components/u-checkbox-group/props.js.map
delete mode 100644 unpackage/dist/dev/.sourcemap/mp-weixin/uni_modules/uview-plus/components/u-checkbox-group/u-checkbox-group.js.map
delete mode 100644 unpackage/dist/dev/.sourcemap/mp-weixin/uni_modules/uview-plus/components/u-choose/u-choose.js.map
delete mode 100644 unpackage/dist/dev/.sourcemap/mp-weixin/uni_modules/uview-plus/components/u-tag/props.js.map
delete mode 100644 unpackage/dist/dev/.sourcemap/mp-weixin/uni_modules/uview-plus/components/u-tag/u-tag.js.map
create mode 100644 unpackage/dist/dev/.sourcemap/mp-weixin/utils/draftCache.js.map
create mode 100644 unpackage/dist/dev/.sourcemap/mp-weixin/utils/useDraftCache.js.map
create mode 100644 unpackage/dist/dev/mp-weixin/components/hazard/HazardFormPopup.js
create mode 100644 unpackage/dist/dev/mp-weixin/components/hazard/HazardFormPopup.json
create mode 100644 unpackage/dist/dev/mp-weixin/components/hazard/HazardFormPopup.wxml
create mode 100644 unpackage/dist/dev/mp-weixin/components/hazard/HazardFormPopup.wxss
create mode 100644 unpackage/dist/dev/mp-weixin/components/hazard/hazardForm.js
create mode 100644 unpackage/dist/dev/mp-weixin/components/hazard/index.js
create mode 100644 unpackage/dist/dev/mp-weixin/components/hazardDetail/HazardDetailPanel.js
create mode 100644 unpackage/dist/dev/mp-weixin/components/hazardDetail/HazardDetailPanel.json
create mode 100644 unpackage/dist/dev/mp-weixin/components/hazardDetail/HazardDetailPanel.wxml
create mode 100644 unpackage/dist/dev/mp-weixin/components/hazardDetail/HazardDetailPanel.wxss
create mode 100644 unpackage/dist/dev/mp-weixin/components/hazardDetail/HazardDetailPanelV2.js
create mode 100644 unpackage/dist/dev/mp-weixin/components/hazardDetail/HazardDetailPanelV2.json
create mode 100644 unpackage/dist/dev/mp-weixin/components/hazardDetail/HazardDetailPanelV2.wxml
create mode 100644 unpackage/dist/dev/mp-weixin/components/hazardDetail/HazardDetailPanelV2.wxss
create mode 100644 unpackage/dist/dev/mp-weixin/components/hazardDetail/hazardDetail.js
create mode 100644 unpackage/dist/dev/mp-weixin/components/hazardDetail/useHazardDetailScroll.js
create mode 100644 unpackage/dist/dev/mp-weixin/pages/Inspectionresult/detail.js
create mode 100644 unpackage/dist/dev/mp-weixin/pages/Inspectionresult/detail.json
create mode 100644 unpackage/dist/dev/mp-weixin/pages/Inspectionresult/detail.wxml
create mode 100644 unpackage/dist/dev/mp-weixin/pages/Inspectionresult/detail.wxss
create mode 100644 unpackage/dist/dev/mp-weixin/pages/Inspectionresult/list.js
create mode 100644 unpackage/dist/dev/mp-weixin/pages/Inspectionresult/list.json
create mode 100644 unpackage/dist/dev/mp-weixin/pages/Inspectionresult/list.wxml
create mode 100644 unpackage/dist/dev/mp-weixin/pages/Inspectionresult/list.wxss
create mode 100644 unpackage/dist/dev/mp-weixin/pages/hiddendanger/detail2.js
create mode 100644 unpackage/dist/dev/mp-weixin/pages/hiddendanger/detail2.json
create mode 100644 unpackage/dist/dev/mp-weixin/pages/hiddendanger/detail2.wxml
create mode 100644 unpackage/dist/dev/mp-weixin/pages/hiddendanger/detail2.wxss
create mode 100644 unpackage/dist/dev/mp-weixin/static/yinhuan_detail/date.png
create mode 100644 unpackage/dist/dev/mp-weixin/static/yinhuan_detail/jiaoban__selected.png
create mode 100644 unpackage/dist/dev/mp-weixin/static/yinhuan_detail/jiaoban__unselected.png
create mode 100644 unpackage/dist/dev/mp-weixin/static/yinhuan_detail/status.png
create mode 100644 unpackage/dist/dev/mp-weixin/static/yinhuan_detail/tijiao__selected.png
create mode 100644 unpackage/dist/dev/mp-weixin/static/yinhuan_detail/tijiao__unselected.png
create mode 100644 unpackage/dist/dev/mp-weixin/static/yinhuan_detail/xiaohao__selected.png
create mode 100644 unpackage/dist/dev/mp-weixin/static/yinhuan_detail/xiaohao__unselected.png
create mode 100644 unpackage/dist/dev/mp-weixin/static/yinhuan_detail/yanshou__selected.png
create mode 100644 unpackage/dist/dev/mp-weixin/static/yinhuan_detail/yanshou__unselected.png
create mode 100644 unpackage/dist/dev/mp-weixin/static/yinhuan_detail/zhenggai__unselected.png
create mode 100644 unpackage/dist/dev/mp-weixin/static/yinhuan_detail/zhenggai_selected.png
delete mode 100644 unpackage/dist/dev/mp-weixin/uni_modules/uview-plus/components/u-choose/u-choose.js
delete mode 100644 unpackage/dist/dev/mp-weixin/uni_modules/uview-plus/components/u-choose/u-choose.json
delete mode 100644 unpackage/dist/dev/mp-weixin/uni_modules/uview-plus/components/u-choose/u-choose.wxml
delete mode 100644 unpackage/dist/dev/mp-weixin/uni_modules/uview-plus/components/u-choose/u-choose.wxss
delete mode 100644 unpackage/dist/dev/mp-weixin/uni_modules/uview-plus/components/u-tag/props.js
delete mode 100644 unpackage/dist/dev/mp-weixin/uni_modules/uview-plus/components/u-tag/u-tag.js
delete mode 100644 unpackage/dist/dev/mp-weixin/uni_modules/uview-plus/components/u-tag/u-tag.json
delete mode 100644 unpackage/dist/dev/mp-weixin/uni_modules/uview-plus/components/u-tag/u-tag.wxml
delete mode 100644 unpackage/dist/dev/mp-weixin/uni_modules/uview-plus/components/u-tag/u-tag.wxss
create mode 100644 unpackage/dist/dev/mp-weixin/utils/draftCache.js
create mode 100644 unpackage/dist/dev/mp-weixin/utils/useDraftCache.js
create mode 100644 utils/draftCache.js
create mode 100644 utils/useDraftCache.js
create mode 100644 代码结构分析与优化建议.md
diff --git a/components/hazard/HazardFormPopup.vue b/components/hazard/HazardFormPopup.vue
new file mode 100644
index 0000000..07b5f21
--- /dev/null
+++ b/components/hazard/HazardFormPopup.vue
@@ -0,0 +1,1182 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/components/hazard/hazardForm.js b/components/hazard/hazardForm.js
new file mode 100644
index 0000000..7b5d756
--- /dev/null
+++ b/components/hazard/hazardForm.js
@@ -0,0 +1,72 @@
+import { buildAttachmentItem } from '@/utils/upload.js';
+
+export const LEVEL_OPTIONS = [
+ { id: 2, title: '一般隐患' },
+ { id: 3, title: '重大隐患' }
+];
+
+export const SOURCE_OPTIONS = [
+ { id: 1, title: '部门检查' },
+ { id: 2, title: '督导检查' },
+ { id: 3, title: '企业自查' },
+ { id: 4, title: '行业互查' }
+];
+
+export const AI_LEVEL_MAP = {
+ 轻微: 0,
+ 轻微隐患: 0,
+ 一般: 0,
+ 一般隐患: 0,
+ 重大: 1,
+ 重大隐患: 1
+};
+
+export function createEmptyHazardPayload() {
+ return {
+ formData: {
+ title: '',
+ level: 0,
+ source: 0,
+ description: '',
+ tagIndex: 0,
+ tagId: null,
+ regulationId: null,
+ regulationName: ''
+ },
+ address: '',
+ lng: 0,
+ lat: 0,
+ areaId: '',
+ areaName: '',
+ fileList: []
+ };
+}
+
+export function buildHiddenDangerParams(payload, extra = {}) {
+ const { formData, address, lng, lat, areaId, fileList } = payload;
+ const selectedTag = payload.tagOptions?.[formData.tagIndex];
+ const tagId = formData.tagId ?? (selectedTag ? selectedTag.id : null);
+
+ return {
+ title: formData.title,
+ level: LEVEL_OPTIONS[formData.level]?.id || 2,
+ lng: lng || 0,
+ lat: lat || 0,
+ address: address || '',
+ areaId: areaId || null,
+ description: formData.description || '',
+ source: SOURCE_OPTIONS[formData.source]?.title || '',
+ tagId,
+ attachments: (fileList || [])
+ .filter((f) => f.status === 'success')
+ .map((file) => buildAttachmentItem(file)),
+ regulationId: formData.regulationId || null,
+ ...extra
+ };
+}
+
+export function hasValidHazardPayload(payload) {
+ if (!payload) return false;
+ const { formData, fileList } = payload;
+ return !!(formData?.title && fileList?.length > 0);
+}
diff --git a/components/hazard/index.js b/components/hazard/index.js
new file mode 100644
index 0000000..8af8403
--- /dev/null
+++ b/components/hazard/index.js
@@ -0,0 +1 @@
+export * from './hazardForm.js';
diff --git a/components/hazardDetail/HazardDetailPanel.vue b/components/hazardDetail/HazardDetailPanel.vue
new file mode 100644
index 0000000..611fdcd
--- /dev/null
+++ b/components/hazardDetail/HazardDetailPanel.vue
@@ -0,0 +1,760 @@
+
+
+
+ {{ detail.title || '-' }}
+
+
+ 隐患状态
+ {{ detail.statusName || '-' }}
+
+ 提交日期 {{ detail.createdAt || '-' }}
+
+
+
+
+ 加载中...
+
+
+
+ 暂无历史记录
+
+
+
+
+
+
+
+
+ {{ item.nodeName }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 隐患标题
+ {{ item.content.title }}
+
+
+ 检查形式
+ {{ item.content.source }}
+
+
+ 隐患区域
+
+
+ {{ item.content.areaName }}
+
+
+
+ 位置描述
+ {{ item.content.address }}
+
+
+ 隐患等级
+
+
+ {{ item.content.levelName || '-' }}
+
+
+
+
+ 隐患标签
+ {{ item.content.tagName }}
+
+
+ 问题描述
+ {{ item.content.description }}
+
+
+ 隐患附件
+
+
+
+
+
+ 参考法规
+ {{ item.content.legalBasis }}
+
+
+
+
+
+
+ 指定整改责任人
+ {{ item.content.assigneeName }}
+
+
+ 指定整改截至日期
+ {{ item.content.deadline }}
+
+
+
+
+
+
+ 整改状态
+ {{ item.content.rectifyStatusName }}
+
+
+ 整改方案
+ {{ item.content.rectifyPlan }}
+
+
+ 整改结果
+ {{ item.content.rectifyResult }}
+
+
+ 整改措施
+ {{ item.content.rectificationMeasures }}
+
+
+ 管控措施
+ {{ item.content.controlMeasures }}
+
+
+ 限定整改时间
+ {{ item.content.deadline }}
+
+
+ 整改责任人
+ {{ item.content.rectifierNames }}
+
+
+ 管理人员
+ {{ item.content.managerNames }}
+
+
+ 预计费用
+ {{ formatCost(item.content.planCost) }}
+
+
+ 实际费用
+ {{ formatCost(item.content.actualCost) }}
+
+
+ 整改附件
+
+
+
+ {{ file.fileName || '附件' }}
+
+
+
+
+ 整改签字
+
+
+
+
+
+
+
+ 验收结果
+
+ {{ item.content.resultName }}
+
+
+
+ 验收备注
+ {{ item.content.remark }}
+
+
+ 验收附件
+
+
+
+ {{ file.fileName || '附件' }}
+
+
+
+
+ 验收签字
+
+
+
+
+
+
+
+ 销号结果
+
+ {{ item.content.resultName }}
+
+
+
+ 销号备注
+ {{ item.content.remark }}
+
+
+ 销号附件
+
+
+
+ {{ file.fileName || '附件' }}
+
+
+
+
+ 销号签字
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/components/hazardDetail/HazardDetailPanelV2.vue b/components/hazardDetail/HazardDetailPanelV2.vue
new file mode 100644
index 0000000..ed87155
--- /dev/null
+++ b/components/hazardDetail/HazardDetailPanelV2.vue
@@ -0,0 +1,743 @@
+
+
+
+ 加载中...
+
+
+
+ 暂无历史记录
+
+
+
+
+
+
+
+
+
+ {{ item.nodeName }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 隐患标题
+ {{ item.content.title }}
+
+
+ 检查形式
+ {{ item.content.source }}
+
+
+ 隐患区域
+
+
+ {{ item.content.areaName }}
+
+
+
+ 位置描述
+ {{ item.content.address }}
+
+
+ 隐患等级
+
+
+ {{ item.content.levelName || '-' }}
+
+
+
+
+ 隐患标签
+ {{ item.content.tagName }}
+
+
+ 问题描述
+ {{ item.content.description }}
+
+
+ 隐患附件
+
+
+
+
+
+ 参考法规
+ {{ item.content.legalBasis }}
+
+
+
+
+
+
+ 指定整改责任人
+ {{ item.content.assigneeName }}
+
+
+ 指定整改截至日期
+ {{ item.content.deadline }}
+
+
+
+
+
+
+ 整改状态
+ {{ item.content.rectifyStatusName }}
+
+
+ 整改方案
+ {{ item.content.rectifyPlan }}
+
+
+ 整改结果
+ {{ item.content.rectifyResult }}
+
+
+ 整改措施
+ {{ item.content.rectificationMeasures }}
+
+
+ 管控措施
+ {{ item.content.controlMeasures }}
+
+
+ 限定整改时间
+ {{ item.content.deadline }}
+
+
+ 整改责任人
+ {{ item.content.rectifierNames }}
+
+
+ 管理人员
+ {{ item.content.managerNames }}
+
+
+ 预计费用
+ {{ formatCost(item.content.planCost) }}
+
+
+ 实际费用
+ {{ formatCost(item.content.actualCost) }}
+
+
+ 整改附件
+
+
+
+ {{ file.fileName || '附件' }}
+
+
+
+
+ 整改签字
+
+
+
+
+
+
+
+ 验收结果
+
+ {{ item.content.resultName }}
+
+
+
+ 验收备注
+ {{ item.content.remark }}
+
+
+ 验收附件
+
+
+
+ {{ file.fileName || '附件' }}
+
+
+
+
+ 验收签字
+
+
+
+
+
+
+
+ 销号结果
+
+ {{ item.content.resultName }}
+
+
+
+ 销号备注
+ {{ item.content.remark }}
+
+
+ 销号附件
+
+
+
+ {{ file.fileName || '附件' }}
+
+
+
+
+ 销号签字
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/components/hazardDetail/hazardDetail.js b/components/hazardDetail/hazardDetail.js
new file mode 100644
index 0000000..82adcaf
--- /dev/null
+++ b/components/hazardDetail/hazardDetail.js
@@ -0,0 +1,371 @@
+/** 隐患详情历史节点类型 */
+export const HAZARD_NODE_TYPES = {
+ SUBMIT: 'submit',
+ ASSIGN: 'assign',
+ RECTIFY: 'rectify',
+ VERIFY: 'verify',
+ WRITEOFF: 'writeoff'
+};
+
+export const HAZARD_STATUS_CLASS_MAP = {
+ 1: 'status-blue',
+ 2: 'status-orange',
+ 3: 'status-red',
+ 4: 'status-yellow',
+ 5: 'status-green'
+};
+
+const STATUS_NAME_CLASS_MAP = {
+ 待交办: 'status-blue',
+ 待整改: 'status-orange',
+ 整改中: 'status-orange',
+ 待验收: 'status-red',
+ 待销号: 'status-yellow',
+ 已完成: 'status-green',
+ 已销号: 'status-green'
+};
+
+const LEVEL_NAME_MAP = {
+ 2: '一般隐患',
+ 3: '重大隐患'
+};
+
+export function getLevelName(level) {
+ return LEVEL_NAME_MAP[level] || '未知';
+}
+
+export function getStatusClass(status, statusName) {
+ if (statusName && STATUS_NAME_CLASS_MAP[statusName]) {
+ return STATUS_NAME_CLASS_MAP[statusName];
+ }
+ return HAZARD_STATUS_CLASS_MAP[status] || '';
+}
+
+const LEVEL_CLASS_MAP = {
+ 2: 'level-normal',
+ 3: 'level-major'
+};
+
+const LEVEL_NAME_CLASS_MAP = {
+ 一般: 'level-normal',
+ 一般隐患: 'level-normal',
+ 重大: 'level-major',
+ 重大隐患: 'level-major'
+};
+
+export function getStepIconPath(type, active = false) {
+ const baseMap = {
+ submit: 'tijiao',
+ assign: 'jiaoban',
+ rectify: 'zhenggai',
+ verify: 'yanshou',
+ writeoff: 'xiaohao'
+ };
+ const base = baseMap[type] || 'tijiao';
+ if (base === 'zhenggai') {
+ return active
+ ? '/static/yinhuan_detail/zhenggai_selected.png'
+ : '/static/yinhuan_detail/zhenggai__unselected.png';
+ }
+ return `/static/yinhuan_detail/${base}__${active ? 'selected' : 'unselected'}.png`;
+}
+
+export function getLevelClass(level, levelName) {
+ if (level != null && LEVEL_CLASS_MAP[level]) {
+ return LEVEL_CLASS_MAP[level];
+ }
+ if (levelName && LEVEL_NAME_CLASS_MAP[levelName]) {
+ return LEVEL_NAME_CLASS_MAP[levelName];
+ }
+ return '';
+}
+
+/** 将姓名数组或字符串格式化为「a、b、c」 */
+export function formatNameList(names, fallback = '-') {
+ if (Array.isArray(names) && names.length) {
+ return names.join('、');
+ }
+ if (typeof names === 'string' && names.trim()) {
+ const parts = names.split(/[,,、]/).map((s) => s.trim()).filter(Boolean);
+ return parts.length ? parts.join('、') : names;
+ }
+ return fallback;
+}
+
+/** 判断是否为销号记录(type=2 或 typeName=销号) */
+export function isWriteoffRecord(record) {
+ if (!record) return false;
+ return record.type === 2 || record.typeName === '销号';
+}
+
+function buildVerifyNode(record) {
+ return {
+ type: HAZARD_NODE_TYPES.VERIFY,
+ nodeName: '验收',
+ titlePrefix: '验收',
+ operator: record.verifierName || '-',
+ time: record.verifyTime || '-',
+ content: {
+ resultName: record.resultName || '-',
+ remark: record.remark || '',
+ attachments: record.attachments || [],
+ signPath: record.signPath || '',
+ verifyDeptName: record.verifyDeptName || '-'
+ }
+ };
+}
+
+function buildWriteoffNode(record) {
+ return {
+ type: HAZARD_NODE_TYPES.WRITEOFF,
+ nodeName: '销号',
+ titlePrefix: '销号',
+ operator: record.verifierName || '-',
+ time: record.verifyTime || '-',
+ content: {
+ resultName: record.resultName || '-',
+ remark: record.remark || '',
+ attachments: record.attachments || [],
+ signPath: record.signPath || '',
+ writeoffDeptName: record.writeoffDeptName || '-'
+ }
+ };
+}
+
+/** 合并验收/销号记录,按 verifyId 去重 */
+function appendAuditNodes(list, records, seenIds) {
+ (records || []).forEach((record) => {
+ if (!record) return;
+
+ const key = record.verifyId ?? record.id;
+ if (key != null) {
+ if (seenIds.has(key)) return;
+ seenIds.add(key);
+ }
+
+ list.push(isWriteoffRecord(record) ? buildWriteoffNode(record) : buildVerifyNode(record));
+ });
+}
+
+function resolveWriteoffRecords(flow) {
+ return flow.writeOffs || flow.writeoffs || [];
+}
+
+/** 解析整改责任人(兼容数组、逗号分隔字符串、单人字段) */
+export function resolveRectifierNames(rectify) {
+ if (!rectify) return '-';
+ if (Array.isArray(rectify.rectifierNames) && rectify.rectifierNames.length) {
+ return rectify.rectifierNames.join('、');
+ }
+ if (Array.isArray(rectify.memberNames) && rectify.memberNames.length) {
+ return rectify.memberNames.join('、');
+ }
+ return formatNameList(rectify.rectifierName, '-');
+}
+
+/**
+ * 将隐患详情转为步骤历史列表(与后台 HazardDetailDrawer 保持一致)
+ * @param {Object} data 隐患详情
+ * @returns {Array}
+ */
+export function generateHazardHistory(data) {
+ if (!data) return [];
+
+ const list = [];
+
+ list.push({
+ type: HAZARD_NODE_TYPES.SUBMIT,
+ nodeName: '提交',
+ titlePrefix: '提交',
+ operator: data.reporterName || '-',
+ time: data.createdAt || '-',
+ content: {
+ title: data.title || '-',
+ source: data.source || '-',
+ areaName: data.areaName || '-',
+ areaColor: data.areaColor || '',
+ address: data.address || '-',
+ level: data.level,
+ levelName: data.levelName || getLevelName(data.level),
+ tagName: data.tagName || '-',
+ description: data.description || '-',
+ attachments: data.attachments || [],
+ legalBasis: data.legalBasis || data.regulationName || '-',
+ reporterPhone: data.reporterPhone || '-',
+ reportDeptName: data.reportDeptName || '-'
+ }
+ });
+
+ if (data.assignFlows && data.assignFlows.length > 0) {
+ data.assignFlows.forEach((flow) => {
+ if (flow.assignId) {
+ list.push({
+ type: HAZARD_NODE_TYPES.ASSIGN,
+ nodeName: '交办',
+ titlePrefix: '交办',
+ operator: flow.assignerName || '-',
+ time: flow.assignTime || '-',
+ content: {
+ assigneeName: flow.assigneeName || '-',
+ deadline: flow.deadline || '-',
+ assignDeptName: flow.assignDeptName || '-',
+ assignRemark: flow.assignRemark || '-',
+ priorityName: flow.priorityName || '-'
+ }
+ });
+ }
+ if (flow.rectify) {
+ list.push({
+ type: HAZARD_NODE_TYPES.RECTIFY,
+ nodeName: '整改',
+ titlePrefix: '整改',
+ operator: flow.rectify.rectifierName || '-',
+ time: flow.rectify.rectifyTime || '-',
+ content: {
+ rectifyPlan: flow.rectify.rectifyPlan || '-',
+ rectifyResult: flow.rectify.rectifyResult || '-',
+ rectificationMeasures: flow.rectify.rectificationMeasures || '-',
+ controlMeasures: flow.rectify.controlMeasures || '-',
+ deadline: flow.deadline || '-',
+ rectifierNames: resolveRectifierNames(flow.rectify),
+ managerNames: formatNameList(flow.rectify.managerNames, '-'),
+ planCost: flow.rectify.planCost,
+ actualCost: flow.rectify.actualCost,
+ attachments: flow.rectify.attachments || [],
+ signPath: flow.rectify.signPath || '',
+ rectifyStatusName: flow.rectify.rectifyStatusName || '-'
+ }
+ });
+ }
+ const seenAuditIds = new Set();
+ appendAuditNodes(list, flow.verifies || [], seenAuditIds);
+ appendAuditNodes(list, resolveWriteoffRecords(flow), seenAuditIds);
+ });
+ }
+
+ return list;
+}
+
+const LONG_DESCRIPTION =
+ '消防通道内堆放大量纸箱及杂物,影响疏散通道畅通,存在火灾安全隐患。' +
+ '现场检查发现通道宽度不足1.2米,部分区域被临时物料占用,紧急情况下可能影响人员撤离。' +
+ '建议立即清理并建立日常巡查机制,防止问题反弹。';
+
+/** 开发联调前使用的 mock 详情数据(各节点均含完整假数据) */
+export const MOCK_HAZARD_DETAIL = {
+ id: 'mock-hazard-001',
+ status: 2,
+ statusName: '整改中',
+ reporterName: '张三',
+ reporterPhone: '13800138000',
+ reportDeptName: '安全管理部',
+ createdAt: '2026-06-01 09:30:00',
+ title: '消防通道堆放杂物',
+ level: 2,
+ levelName: '一般隐患',
+ source: '部门检查',
+ areaName: '生产车间A区',
+ areaColor: '#409EFF',
+ address: '办公楼3层东侧消防通道',
+ tagName: '消防安全',
+ description: LONG_DESCRIPTION,
+ legalBasis: '《中华人民共和国消防法》第二十八条',
+ regulationName: '《中华人民共和国消防法》第二十八条',
+ attachments: [
+ {
+ fileName: 'hazard-1.jpg',
+ filePath: 'https://picsum.photos/seed/hazard1/200/200',
+ fileType: 'image'
+ },
+ {
+ fileName: 'hazard-2.jpg',
+ filePath: 'https://picsum.photos/seed/hazard2/200/200',
+ fileType: 'image'
+ },
+ {
+ fileName: 'hazard-3.jpg',
+ filePath: 'https://picsum.photos/seed/hazard3/200/200',
+ fileType: 'image'
+ }
+ ],
+ assignFlows: [
+ {
+ assignId: 'mock-assign-001',
+ assignerName: '李主管',
+ assignTime: '2026-06-02 10:00:00',
+ assigneeName: '王整改',
+ assignDeptName: '设备保障部',
+ assignRemark: '该隐患位于主疏散通道,请优先处理,务必在整改期限内完成闭环。',
+ priorityName: '高',
+ deadline: '2026-06-10 18:00:00',
+ rectify: {
+ rectifyId: 'mock-rectify-001',
+ rectifierName: '王整改',
+ rectifyTime: '2026-06-08 15:20:00',
+ rectifyStatusName: '已完成',
+ rectifyPlan:
+ '立即清理消防通道杂物,并设置警示标识,后续每周巡查一次。' +
+ '对责任区域进行划分,明确禁止堆放物料的范围,同时组织一次消防安全培训。',
+ rectifyResult: '已完成清理,通道恢复畅通,现场已张贴禁止堆放标识。',
+ rectificationMeasures: '组织人员清理杂物,划定禁止堆放区域,增加日常巡检频次。',
+ controlMeasures: '安装监控并纳入日常巡检清单,发现反弹情况立即上报。',
+ rectifierNames: ['王整改', '赵协助'],
+ managerNames: ['李主管'],
+ planCost: 500,
+ actualCost: 380,
+ attachments: [
+ {
+ fileName: 'rectify-1.jpg',
+ filePath: 'https://picsum.photos/seed/rectify1/200/200',
+ fileType: 'image'
+ },
+ {
+ fileName: 'rectify-2.jpg',
+ filePath: 'https://picsum.photos/seed/rectify2/200/200',
+ fileType: 'image'
+ }
+ ],
+ signPath: 'https://picsum.photos/seed/sign1/300/120'
+ },
+ verifies: [
+ {
+ verifierName: '陈验收',
+ verifyTime: '2026-06-09 11:00:00',
+ verifyDeptName: '安全监察组',
+ resultName: '通过',
+ remark: '现场复查通道畅通,整改到位,未发现反弹迹象。',
+ attachments: [
+ {
+ fileName: 'verify-1.jpg',
+ filePath: 'https://picsum.photos/seed/verify1/200/200',
+ fileType: 'image'
+ },
+ {
+ fileName: 'verify-2.jpg',
+ filePath: 'https://picsum.photos/seed/verify2/200/200',
+ fileType: 'image'
+ }
+ ],
+ signPath: 'https://picsum.photos/seed/sign2/300/120'
+ }
+ ],
+ writeOffs: [
+ {
+ verifierName: '刘销号',
+ verifyTime: '2026-06-10 16:30:00',
+ writeoffDeptName: '公司安委会',
+ resultName: '通过',
+ remark: '隐患已消除,整改资料齐全,同意销号。',
+ attachments: [
+ {
+ fileName: 'writeoff-1.jpg',
+ filePath: 'https://picsum.photos/seed/writeoff1/200/200',
+ fileType: 'image'
+ }
+ ],
+ signPath: 'https://picsum.photos/seed/sign3/300/120'
+ }
+ ]
+ }
+ ]
+};
diff --git a/components/hazardDetail/index.js b/components/hazardDetail/index.js
new file mode 100644
index 0000000..cba1b85
--- /dev/null
+++ b/components/hazardDetail/index.js
@@ -0,0 +1 @@
+export * from './hazardDetail.js';
diff --git a/components/hazardDetail/useHazardDetailScroll.js b/components/hazardDetail/useHazardDetailScroll.js
new file mode 100644
index 0000000..6113602
--- /dev/null
+++ b/components/hazardDetail/useHazardDetailScroll.js
@@ -0,0 +1,164 @@
+import { ref, watch, nextTick, getCurrentInstance } from 'vue';
+import { onReady } from '@dcloudio/uni-app';
+import { generateHazardHistory } from './hazardDetail.js';
+
+/**
+ * 隐患详情左右联动滚动(与 HazardDetailPanel 保持一致)
+ * - 右侧滚动时,根据 node-section 位置同步左侧 activeIndex
+ * - 点击左侧步骤时,右侧 scroll-into-view 定位到对应卡片
+ */
+export function useHazardDetailScroll(detailSource, loadingSource) {
+ const instance = getCurrentInstance();
+ const queryScope = instance?.proxy || instance;
+
+ const historyList = ref([]);
+ const activeIndex = ref(0);
+ const sectionOffsets = ref([0]);
+ const contentViewHeight = ref(0);
+ const contentScrollIntoView = ref('');
+ const stepScrollIntoView = ref('');
+ const scrollWithAnimation = ref(true);
+ const isProgrammaticScroll = ref(false);
+ let measureLayoutTimer = null;
+
+ const measureLayout = () => {
+ if (!historyList.value.length) return;
+
+ nextTick(() => {
+ const query = uni.createSelectorQuery().in(queryScope);
+ query.select('.content-scroll').boundingClientRect();
+ query.select('.content-scroll').scrollOffset();
+ query.selectAll('.node-section').boundingClientRect();
+ query.exec((res) => {
+ const containerRect = res?.[0];
+ const scrollOffset = res?.[1];
+ const sections = res?.[2] || [];
+ if (!containerRect || !sections.length) return;
+
+ contentViewHeight.value = containerRect.height || 0;
+ const baseScrollTop = scrollOffset?.scrollTop || 0;
+ sectionOffsets.value = sections.map(
+ (section) => section.top - containerRect.top + baseScrollTop
+ );
+ });
+ });
+ };
+
+ const scheduleMeasureLayout = () => {
+ clearTimeout(measureLayoutTimer);
+ measureLayoutTimer = setTimeout(() => {
+ measureLayout();
+ }, 80);
+ };
+
+ const rebuildHistory = (data) => {
+ historyList.value = generateHazardHistory(data);
+ activeIndex.value = 0;
+ contentScrollIntoView.value = '';
+ scheduleMeasureLayout();
+ setTimeout(scheduleMeasureLayout, 300);
+ };
+
+ const syncActiveIndex = (scrollTop, scrollHeight = 0) => {
+ const count = historyList.value.length;
+ if (!count) return;
+
+ if (scrollHeight > 0 && contentViewHeight.value > 0) {
+ if (scrollTop + contentViewHeight.value >= scrollHeight - 60) {
+ if (activeIndex.value !== count - 1) {
+ activeIndex.value = count - 1;
+ }
+ return;
+ }
+ }
+
+ const offsets = sectionOffsets.value;
+ if (!offsets.length) return;
+
+ let idx = 0;
+ for (let i = offsets.length - 1; i >= 0; i--) {
+ if (scrollTop >= offsets[i] - 80) {
+ idx = i;
+ break;
+ }
+ }
+
+ if (idx !== activeIndex.value) {
+ activeIndex.value = idx;
+ }
+ };
+
+ const onContentScroll = (e) => {
+ if (isProgrammaticScroll.value) return;
+ const { scrollTop = 0, scrollHeight = 0 } = e.detail || {};
+ syncActiveIndex(scrollTop, scrollHeight);
+ scheduleMeasureLayout();
+ };
+
+ const onScrollToLower = () => {
+ const count = historyList.value.length;
+ if (count > 0 && activeIndex.value !== count - 1) {
+ activeIndex.value = count - 1;
+ }
+ };
+
+ const scrollToNode = (index) => {
+ if (index < 0 || index >= historyList.value.length) return;
+
+ isProgrammaticScroll.value = true;
+ scrollWithAnimation.value = true;
+ activeIndex.value = index;
+ contentScrollIntoView.value = 'hazard-node-' + index;
+
+ setTimeout(() => {
+ contentScrollIntoView.value = '';
+ isProgrammaticScroll.value = false;
+ scheduleMeasureLayout();
+ }, 350);
+ };
+
+ watch(
+ () => (typeof loadingSource === 'function' ? loadingSource() : loadingSource?.value),
+ (loading) => {
+ if (!loading) {
+ scheduleMeasureLayout();
+ setTimeout(scheduleMeasureLayout, 300);
+ }
+ }
+ );
+
+ watch(
+ () => (typeof detailSource === 'function' ? detailSource() : detailSource?.value),
+ (val) => rebuildHistory(val),
+ { immediate: true, deep: true }
+ );
+
+ watch(activeIndex, (index) => {
+ stepScrollIntoView.value = 'hazard-step-' + index;
+ setTimeout(() => {
+ stepScrollIntoView.value = '';
+ }, 300);
+ });
+
+ watch(
+ () => historyList.value.length,
+ () => scheduleMeasureLayout()
+ );
+
+ onReady(() => {
+ scheduleMeasureLayout();
+ setTimeout(scheduleMeasureLayout, 300);
+ });
+
+ return {
+ historyList,
+ activeIndex,
+ contentScrollIntoView,
+ stepScrollIntoView,
+ scrollWithAnimation,
+ onContentScroll,
+ onScrollToLower,
+ scrollToNode,
+ scheduleMeasureLayout
+ };
+}
diff --git a/pages.json b/pages.json
index 5e77aaf..0262eb9 100644
--- a/pages.json
+++ b/pages.json
@@ -12,7 +12,7 @@
{
"path": "pages/index/index",
"style": {
- "navigationBarTitleText": "三查一曝光",
+ "navigationBarTitleText": "湘西州“三个一”安全管理平台",
"navigationStyle": "custom",
"navigationBarTextStyle": "white"
}
@@ -35,6 +35,19 @@
"navigationBarTitleText": "检查结果"
}
},
+ {
+ "path": "pages/Inspectionresult/list",
+ "style": {
+ "navigationStyle": "custom",
+ "navigationBarTitleText": "检查列表"
+ }
+ },
+ {
+ "path": "pages/Inspectionresult/detail",
+ "style": {
+ "navigationBarTitleText": "排查详情"
+ }
+ },
{
"path": "pages/membermanagemen/membermanagemen",
"style": {
@@ -95,6 +108,15 @@
"navigationBarTitleText": "查看隐患"
}
},
+ {
+ "path": "pages/hiddendanger/detail2",
+ "style": {
+ "navigationBarTitleText": "隐患详情",
+ "navigationStyle": "custom",
+ "navigationBarTextStyle": "white",
+ "disableScroll": true
+ }
+ },
{
"path":"pages/hiddendanger/rectification",
"style": {
diff --git a/pages/Inspectionresult/Inspectionresult.vue b/pages/Inspectionresult/Inspectionresult.vue
index 0361a5d..b29147a 100644
--- a/pages/Inspectionresult/Inspectionresult.vue
+++ b/pages/Inspectionresult/Inspectionresult.vue
@@ -1,6 +1,5 @@
-
第 {{ checkData.currentIndex || 1 }} 个问题
@@ -34,44 +33,41 @@
-
检查结果为异常,需填写隐患信息
-
填写隐患信息
-
检查形式:
- {{ sourceOptions[hazardFormData.source]?.title || '-' }}
+ {{ SOURCE_OPTIONS[hazardPayload.formData.source]?.title || '-' }}
隐患位置:
- {{ hazardAddress || '-' }}
+ {{ hazardPayload.address || '-' }}
隐患描述:
- {{ hazardFormData.description || '-' }}
+ {{ hazardPayload.formData.description || '-' }}
-
+
附件:
- {{ hazardFileList.length }}个文件
+ {{ hazardPayload.fileList.length }}个文件
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
@@ -970,7 +340,6 @@
background: #EBF2FC;
}
- // 进度显示
.progress-bar {
background: #fff;
border-radius: 12rpx;
@@ -1010,13 +379,11 @@
transition: width 0.3s ease;
}
- // 隐患信息区域
.hazard-section {
border-top: 1rpx solid #eee;
padding-top: 20rpx;
}
- // 提示文字
.hazard-tip {
display: flex;
align-items: center;
@@ -1032,7 +399,6 @@
}
}
- // 填写隐患信息按钮
.hazard-btn {
display: flex;
align-items: center;
@@ -1048,7 +414,6 @@
}
}
- // 隐患信息卡片
.hazard-card {
background: #F5F9FF;
border: 1rpx solid #D6E4FF;
@@ -1121,7 +486,6 @@
}
}
- // 隐患等级标签
.level-tag {
padding: 4rpx 16rpx;
border-radius: 8rpx;
@@ -1145,337 +509,4 @@
border: 2rpx solid #FFA39E;
color: #F5222D;
}
-
- // 弹窗样式
- .popup-content {
- width: 600rpx;
- background: #fff;
- border-radius: 20rpx;
- overflow: hidden;
- }
-
- .popup-header {
- display: flex;
- justify-content: space-between;
- align-items: center;
- padding: 30rpx;
- border-bottom: 1rpx solid #eee;
-
- .popup-title {
- font-size: 32rpx;
- color: #333;
- }
-
- .popup-close {
- font-size: 40rpx;
- color: #999;
- line-height: 1;
- }
- }
-
- .popup-body {
- padding: 30rpx;
- }
-
- // 检查形式横向滚动,露出第 4 项一角提示可滑动
- .source-choose-scroll {
- width: 100%;
- overflow: hidden;
-
- :deep(.up-choose) {
- width: 100%;
- white-space: nowrap;
- }
-
- :deep(.u-tag-wrapper) {
- margin-right: 12rpx;
- }
-
- :deep(.u-tag) {
- display: flex !important;
- align-items: center !important;
- justify-content: center !important;
- box-sizing: border-box;
- padding: 0 8rpx !important;
- line-height: normal !important;
- }
-
- :deep(.u-tag__content) {
- display: flex;
- align-items: center;
- justify-content: center;
- flex: 1;
- }
-
- :deep(.u-tag__text) {
- font-size: 24rpx !important;
- line-height: 1.3 !important;
- text-align: center;
- }
- }
-
- // AI 识别按钮样式
- .ai-btn-wrapper {
- display: flex;
- justify-content: flex-end;
- }
-
- .ai-analyze-btn {
- display: flex;
- align-items: center;
- justify-content: center;
- height: 72rpx;
- padding: 0 32rpx;
- font-size: 28rpx;
- color: #fff;
- background: linear-gradient(135deg, #4facfe 0%, #2668EA 100%);
- border-radius: 36rpx;
- border: none;
-
- &::after {
- border: none;
- }
-
- .ai-btn-icon {
- margin-right: 8rpx;
- font-size: 30rpx;
- }
-
- &[disabled] {
- opacity: 0.7;
- }
- }
-
- .popup-footer {
- display: flex;
- border-top: 1rpx solid #eee;
-
- button {
- flex: 1;
- height: 90rpx;
- margin: 0 !important;
- padding: 0 !important;
- line-height: 90rpx;
- border-radius: 0;
- font-size: 30rpx;
-
- &::after {
- border: none;
- }
- }
-
- .btn-cancel {
- background: #fff;
- color: #666;
- }
-
- .btn-confirm {
- color: #fff;
- }
- }
-
- .address-box {
- display: flex;
- align-items: center;
- gap: 20rpx;
-
- .address-input-wrapper {
- flex: 1;
- }
-
- .btn-address {
- flex-shrink: 0;
- height: 70rpx;
- line-height: 70rpx;
- padding: 0 30rpx;
- font-size: 26rpx;
- border-radius: 8rpx;
- color: #fff;
-
- &::after {
- border: none;
- }
- }
- }
-
- // 选择器触发器样式
- .select-trigger {
- display: flex;
- align-items: center;
- justify-content: space-between;
- background: #fff;
- border: 1rpx solid #dcdfe6;
- border-radius: 8rpx;
- padding: 20rpx 24rpx;
-
- .select-value {
- flex: 1;
- font-size: 28rpx;
- color: #333;
-
- &.placeholder {
- color: #c0c4cc;
- }
- }
- }
-
- // 选择弹窗样式
- .picker-popup {
- background: #fff;
-
- .picker-header {
- display: flex;
- justify-content: space-between;
- align-items: center;
- padding: 30rpx;
- border-bottom: 1rpx solid #eee;
-
- .picker-cancel {
- font-size: 28rpx;
- color: #999;
- }
-
- .picker-title {
- font-size: 32rpx;
- font-weight: bold;
- color: #333;
- }
-
- .picker-confirm {
- font-size: 28rpx;
- color: #2667E9;
- }
- }
-
- .picker-body {
- max-height: 600rpx;
- padding: 0 30rpx;
- }
-
- .picker-item {
- display: flex;
- justify-content: space-between;
- align-items: center;
- padding: 30rpx 0;
- border-bottom: 1rpx solid #f5f5f5;
- font-size: 30rpx;
- color: #333;
-
- &:last-child {
- border-bottom: none;
- }
-
- &.picker-item-active {
- color: #2667E9;
- }
- }
- }
-
- // 区域颜色圆点
- // 选择法规(法律依据)弹出框样式
- .law-popup {
- width: 600rpx;
- background: #fff;
- border-radius: 20rpx;
- overflow: hidden;
- max-height: 80vh;
-
- .popup-header {
- display: flex;
- justify-content: space-between;
- align-items: center;
- padding: 30rpx;
- border-bottom: 1rpx solid #eee;
-
- .popup-title {
- font-size: 32rpx;
- font-weight: bold;
- color: #333;
- }
-
- .popup-close {
- font-size: 40rpx;
- color: #999;
- cursor: pointer;
- }
- }
- }
-
- .search-box {
- display: flex;
- align-items: center;
- background: #F5F5F5;
- border-radius: 40rpx;
- padding: 16rpx 24rpx;
- margin: 20rpx 30rpx;
-
- .search-icon {
- font-size: 28rpx;
- color: #999;
- margin-right: 12rpx;
- }
-
- .search-input {
- flex: 1;
- font-size: 28rpx;
- background: transparent;
- border: none;
- }
-
- .search-btn {
- color: #2667E9;
- font-size: 26rpx;
- margin-left: 16rpx;
- cursor: pointer;
- }
- }
-
- .loading-tip, .empty-tip {
- text-align: center;
- padding: 40rpx;
- color: #999;
- font-size: 26rpx;
- }
-
- .law-list {
- max-height: 500rpx;
- padding: 0 30rpx;
- }
-
- .law-item {
- padding: 24rpx;
- border: 2rpx solid #E5E5E5;
- border-radius: 12rpx;
- margin-bottom: 16rpx;
- font-size: 28rpx;
- color: #333;
- text-align: left;
-
- .law-title {
- line-height: 1.5;
- margin-bottom: 8rpx;
- font-weight: bold;
- }
-
- .law-basis {
- font-size: 24rpx;
- line-height: 1.4;
- display: -webkit-box;
- -webkit-line-clamp: 2;
- -webkit-box-orient: vertical;
- overflow: hidden;
- }
- }
-
- .law-item-active {
- border-color: #2667E9;
- background: #F0F6FF;
- }
-
- .area-color-dot {
- width: 24rpx;
- height: 24rpx;
- border-radius: 50%;
- margin-right: 16rpx;
- }
diff --git a/pages/Inspectionresult/detail.vue b/pages/Inspectionresult/detail.vue
new file mode 100644
index 0000000..103abcc
--- /dev/null
+++ b/pages/Inspectionresult/detail.vue
@@ -0,0 +1,1284 @@
+
+
+ 加载中...
+
+
+ 暂无检查项
+
+
+
+
+
+
+
+
+ 共 {{ checkItemList.length }} 项检查
+ ,已提交 {{ submittedCount }} 项
+ ,待提交 {{ pendingSubmitCount }} 项
+ ,待检查 {{ uncheckedCount }} 项
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 已自动恢复您上次未提交的检查内容
+
+ 清空草稿
+
+
+
+
+
+
+ {{ item.name }}
+
+
+
+
+
+
+
+
+ 检查结果
+
+ {{ getResultLabel(item.result) }}
+
+
+
+ 备注
+ {{ item.remark }}
+
+
+
+ 隐患标题
+ {{ item.hazardName }}
+
+
+ 检查形式
+ {{ item.source }}
+
+
+ 隐患位置
+ {{ item.hazardAddress }}
+
+
+ 隐患描述
+ {{ item.hazardDesc }}
+
+
+
+
+
+
+
+
+
+ 检查结果
+ onResultChange(index, label)"
+ >
+
+
+
+
+
+
+
+ 检查结果为异常,需填写隐患信息
+
+
+
+ 填写隐患信息
+
+
+
+
+
+
+ 检查形式:
+ {{ SOURCE_OPTIONS[answerList[index].hazardPayload.formData.source]?.title || '-' }}
+
+
+ 隐患位置:
+ {{ answerList[index].hazardPayload.address || '-' }}
+
+
+ 隐患描述:
+ {{ answerList[index].hazardPayload.formData.description || '-' }}
+
+
+ 附件:
+ {{ answerList[index].hazardPayload.fileList.length }}个文件
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/pages/Inspectionresult/list.vue b/pages/Inspectionresult/list.vue
new file mode 100644
index 0000000..fce872b
--- /dev/null
+++ b/pages/Inspectionresult/list.vue
@@ -0,0 +1,284 @@
+
+
+
+
+ 加载中...
+
+
+ 请从首页检查计划进入
+
+
+
+ 暂无检查任务
+
+
+
+
+
+
+ {{ item.runModeName }}完成
+ {{ item.cycle }}
+
+
+ 任务日期:
+ {{ formatDate(item.taskDate) }}
+
+
+ 计划时间:
+
+ {{ formatDate(item.planStartTime) }}至{{ formatDate(item.planEndTime) }}
+
+
+
+ 完成进度:
+
+
+
+
+ {{ formatProgress(item.progress) }}%
+
+
+
+
+ {{ item.totalCount ?? 0 }}
+ 总检项
+
+
+ {{ item.pendingCount ?? 0 }}
+ 待排查
+
+
+ {{ item.unusualNum ?? 0 }}
+ 异常数
+
+
+ {{ item.finishedCount ?? 0 }}
+ 已完成
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/pages/editchecklist/editchecklist.vue b/pages/editchecklist/editchecklist.vue
index 78416bb..11a3480 100644
--- a/pages/editchecklist/editchecklist.vue
+++ b/pages/editchecklist/editchecklist.vue
@@ -129,7 +129,7 @@
开始时间
-
+
{{ formData.startDate || '请选择开始时间' }}
@@ -137,8 +137,9 @@
结束时间
-
+
{{ formData.endDate || '请选择结束时间' }}
@@ -158,8 +159,9 @@
{
};
// 日期选择器值
-const startDateValue = ref(Number(new Date()));
-const endDateValue = ref(Number(new Date()));
+const getTodayTimestamp = () => {
+ const now = new Date();
+ return new Date(now.getFullYear(), now.getMonth(), now.getDate()).getTime();
+};
+
+const todayMinDate = computed(() => getTodayTimestamp());
+
+const endDateMinDate = computed(() => {
+ if (formData.startDate) {
+ const [year, month, day] = formData.startDate.split('-').map(Number);
+ return new Date(year, month - 1, day).getTime();
+ }
+ return getTodayTimestamp();
+});
+
+const startDateValue = ref(getTodayTimestamp());
+const endDateValue = ref(getTodayTimestamp());
// 选择器显示控制
const showDeptPicker = ref(false);
@@ -619,22 +636,46 @@ const onCycleConfirm = (e) => {
showCyclePicker.value = false;
};
-// 日期时间格式化(精确到时分秒)
-const formatDateTime = (timestamp) => {
+// 日期格式化(年月日)
+const formatDate = (timestamp) => {
const date = new Date(timestamp);
const year = date.getFullYear();
const month = String(date.getMonth() + 1).padStart(2, '0');
const day = String(date.getDate()).padStart(2, '0');
- const hours = String(date.getHours()).padStart(2, '0');
- const minutes = String(date.getMinutes()).padStart(2, '0');
- const seconds = String(date.getSeconds()).padStart(2, '0');
- return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`;
+ return `${year}-${month}-${day}`;
+};
+
+const parseDateValue = (dateStr) => {
+ if (!dateStr) return 0;
+ const [datePart] = dateStr.split(' ');
+ const [year, month, day] = datePart.split('-').map(Number);
+ return new Date(year, month - 1, day).getTime();
+};
+
+const openStartDatePicker = () => {
+ const today = getTodayTimestamp();
+ if (startDateValue.value < today) {
+ startDateValue.value = today;
+ }
+ showStartDatePicker.value = true;
+};
+
+const openEndDatePicker = () => {
+ const minDate = endDateMinDate.value;
+ if (endDateValue.value < minDate) {
+ endDateValue.value = minDate;
+ }
+ showEndDatePicker.value = true;
};
const onStartDateConfirm = (e) => {
- const selectedDate = formatDateTime(e.value);
- // 如果已经选了结束时间,校验开始时间不能晚于结束时间
- if (formData.endDate && new Date(selectedDate) > new Date(formData.endDate)) {
+ const selectedDate = formatDate(e.value);
+ const todayStr = formatDate(getTodayTimestamp());
+ if (selectedDate < todayStr) {
+ uni.showToast({ title: '开始时间不能早于今天', icon: 'none' });
+ return;
+ }
+ if (formData.endDate && parseDateValue(selectedDate) > parseDateValue(formData.endDate)) {
uni.showToast({ title: '开始时间不能晚于结束时间', icon: 'none' });
return;
}
@@ -643,9 +684,8 @@ const onStartDateConfirm = (e) => {
};
const onEndDateConfirm = (e) => {
- const selectedDate = formatDateTime(e.value);
- // 如果已经选了开始时间,校验结束时间不能早于开始时间
- if (formData.startDate && new Date(selectedDate) < new Date(formData.startDate)) {
+ const selectedDate = formatDate(e.value);
+ if (formData.startDate && parseDateValue(selectedDate) < parseDateValue(formData.startDate)) {
uni.showToast({ title: '结束时间不能早于开始时间', icon: 'none' });
return;
}
@@ -1101,7 +1141,7 @@ const handleSave = async () => {
uni.showToast({ title: '请选择计划时间', icon: 'none' });
return;
}
- if (new Date(formData.endDate) < new Date(formData.startDate)) {
+ if (parseDateValue(formData.endDate) < parseDateValue(formData.startDate)) {
uni.showToast({ title: '结束时间不能早于开始时间', icon: 'none' });
return;
}
@@ -1157,8 +1197,8 @@ const handleSave = async () => {
itemIds: itemIds, // 从检查库选择的库id数组
cycle: cycleMap[formData.cycleName] || 1,
isWeekend: workdaySwitch.value ? 1 : 2,
- planStartTime: formData.startDate,
- planEndTime: formData.endDate
+ planStartTime: `${formData.startDate} 00:00:00`,
+ planEndTime: `${formData.endDate} 23:59:59`
};
// 如果是指定人员模式,添加执行人员id
diff --git a/pages/hiddendanger/Inspection.vue b/pages/hiddendanger/Inspection.vue
index 792e96e..0111a94 100644
--- a/pages/hiddendanger/Inspection.vue
+++ b/pages/hiddendanger/Inspection.vue
@@ -36,605 +36,134 @@
{{item.createdAt}}
-
-
-
-
-
-
+
新增
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
\ No newline at end of file
+
diff --git a/pages/hiddendanger/acceptance.vue b/pages/hiddendanger/acceptance.vue
index 491dea3..7ae70ee 100644
--- a/pages/hiddendanger/acceptance.vue
+++ b/pages/hiddendanger/acceptance.vue
@@ -74,7 +74,14 @@
-
+
+ 暂无签名,请点击重新签名
@@ -87,9 +94,10 @@
:lineWidth="3"
:enableHistory="false"
@confirm="(res) => onSignatureConfirm(res.tempFilePath)"
- @start="isSignatureEmpty = false"
- @signing="isSignatureEmpty = false"
- @clear="isSignatureEmpty = true"
+ @start="onSignatureStart"
+ @signing="onSignatureSigning"
+ @end="onSignatureEnd"
+ @clear="onSignatureClear"
>
@@ -105,14 +113,17 @@
+
+
diff --git a/pages/hiddendanger/rectification.vue b/pages/hiddendanger/rectification.vue
index fad4e0d..9b44c5f 100644
--- a/pages/hiddendanger/rectification.vue
+++ b/pages/hiddendanger/rectification.vue
@@ -235,9 +235,10 @@
:lineWidth="3"
:enableHistory="false"
@confirm="(res) => onSignatureConfirm(res.tempFilePath)"
- @start="isSignatureEmpty = false"
- @signing="isSignatureEmpty = false"
- @clear="isSignatureEmpty = true"
+ @start="onSignatureStart"
+ @signing="onSignatureSigning"
+ @end="onSignatureEnd"
+ @clear="onSignatureClear"
>
@@ -250,9 +251,11 @@
diff --git a/pages/index/index.vue b/pages/index/index.vue
index afea62f..ec1135d 100644
--- a/pages/index/index.vue
+++ b/pages/index/index.vue
@@ -6,7 +6,7 @@
-
-
+
我的检查计划
+
暂无检查计划
-
+
-