隐患详情重新设计,检查计划重新设计成做题排查式

This commit is contained in:
王利强
2026-06-21 16:30:12 +08:00
parent 1fe87ec438
commit cc94d3e3e9
256 changed files with 12542 additions and 5956 deletions

View File

@@ -0,0 +1 @@
"use strict";const e=require("../../common/vendor.js"),t=require("../../common/assets.js"),a=require("../../request/api.js");if(!Array){e.resolveComponent("u-navbar")()}Math||((()=>"../../uni_modules/uview-plus/components/u-navbar/u-navbar.js")+o)();const o=()=>"../../components/hazardDetail/HazardDetailPanelV2.js",n={__name:"detail2",setup(o){const n=e.getCurrentInstance(),i=(null==n?void 0:n.proxy)||n,r=e.ref({}),s=e.ref(!1),l=e.ref(0),u=()=>{e.nextTick$1((()=>{const t=e.index.createSelectorQuery().in(i);t.select(".panel-wrap").boundingClientRect(),t.exec((t=>{const a=null==t?void 0:t[0];if((null==a?void 0:a.height)>0)return void(l.value=Math.floor(a.height));const o=e.index.getSystemInfoSync();l.value=Math.floor(.55*o.windowHeight)}))}))};return e.onReady((()=>{u(),setTimeout(u,100),setTimeout(u,400)})),e.watch(s,(e=>{e||(u(),setTimeout(u,100),setTimeout(u,400))})),e.onLoad((t=>{t.hazardId?(async t=>{s.value=!0;try{const o=await a.getHazardDetail(t);0===o.code&&o.data?r.value=o.data:e.index.showToast({title:o.msg||"获取详情失败",icon:"none"})}catch(o){console.error("获取隐患详情失败:",o),e.index.showToast({title:"获取详情失败",icon:"none"})}finally{s.value=!1,u(),setTimeout(u,100),setTimeout(u,400)}})(t.hazardId):(e.index.showToast({title:"缺少隐患ID",icon:"none"}),setTimeout((()=>{e.index.navigateBack()}),1500))})),(a,o)=>({a:e.p({title:"查看隐患",placeholder:!0,safeAreaInsetTop:!0,bgColor:"transparent",titleColor:"#ffffff",leftIconColor:"#ffffff",autoBack:!0,border:!1}),b:t._imports_0$1,c:e.t(r.value.statusName||"-"),d:t._imports_1,e:e.t(r.value.createdAt||"-"),f:e.p({detail:r.value,loading:s.value,"body-height":l.value}),g:e.gei(a,"")})}},i=e._export_sfc(n,[["__scopeId","data-v-b921b17f"]]);wx.createPage(i);