import{V as k,d as g,r as p,ay as w,ac as C,c as I,o as N,w as l,j as r,W as R,l as i,cb as x,ds as f,X as S}from"./index-9PRMimni.js";import{B as L}from"./Table-0PViRYCf.js";import"./Table.vue_vue_type_style_index_0_scoped_7b9e6ece_lang-BoW2DV_e.js";import"./vuedraggable.umd-Co2xEC3p.js";import"./Render.vue_vue_type_script_lang-DKUYY0Zw.js";import"./componentMap-CElCaWis.js";import"./propTypes-CebMRUpe.js";import"./format-DgF6KtHk.js";import"./omit-B2_8Y6O_.js";import"./_flatRest-DBrd2CHT.js";import"./flatten-DeoUZLdb.js";import"./print-CT_2hrjP.js";import"./basicModal.vue_vue_type_script_setup_true_lang-CsJydKhW.js";import"./basicModal.vue_vue_type_style_index_0_lang-8QZP7ApW.js";import"./useModal-CO65vga3.js";import"./componentSetting-DVhNDBTO.js";import"./useTimeout-BxFilWvD.js";import"./usePageCache-DluHn7Yy.js";import"./tabsView-BXskTdVh.js";import"./Flex-CTSf12gq.js";const{t}=k();function V(){const y=[{title:t("equipmentLibrary.equipmentMainLibrary.tableNum"),key:"num",width:80,render:(s,n)=>n+1},{title:t("equipmentLibrary.equipmentMainLibrary.hsqe.auditInspectionType"),key:""},{title:t("equipmentLibrary.equipmentMainLibrary.hsqe.auditDate"),key:""},{title:t("equipmentLibrary.equipmentMainLibrary.hsqe.reportNo"),key:""},{title:t("equipmentLibrary.equipmentMainLibrary.hsqe.deficiencyNo"),key:""}],d=[{title:t("equipmentLibrary.equipmentMainLibrary.tableNum"),key:"num",width:80,render:(s,n)=>n+1},{title:t("equipmentLibrary.equipmentMainLibrary.hsqe.accidentNo"),key:""},{title:t("equipmentLibrary.equipmentMainLibrary.hsqe.title"),key:""},{title:t("equipmentLibrary.equipmentMainLibrary.hsqe.date"),key:""},{title:t("equipmentLibrary.equipmentMainLibrary.hsqe.primaryCategory"),key:""},{title:t("equipmentLibrary.equipmentMainLibrary.hsqe.accidentStatus"),key:""}],o=[{title:t("equipmentLibrary.equipmentMainLibrary.tableNum"),key:"num",width:80,render:(s,n)=>n+1},{title:t("equipmentLibrary.equipmentMainLibrary.hsqe.nearMissNo"),key:""},{title:t("equipmentLibrary.equipmentMainLibrary.hsqe.title"),key:""},{title:t("equipmentLibrary.equipmentMainLibrary.hsqe.date"),key:""},{title:t("equipmentLibrary.equipmentMainLibrary.hsqe.primaryCategory"),key:""},{title:t("equipmentLibrary.equipmentMainLibrary.hsqe.nearMissStatus"),key:""}];return{auditInspectionColumns:y,accidentColumns:d,nearMissColumns:o}}const ae=g({__name:"index",props:{selectedTreeItem:{}},setup(y){const d=y,{t:o}=k(),s=p(),n=p(),M=p(),a=p(null),{auditInspectionColumns:_,accidentColumns:h,nearMissColumns:v}=V();w(()=>d.selectedTreeItem,()=>{C(()=>{c(!0,s.value),c(!0,n.value),c(!0,M.value)})},{immediate:!0,deep:!0});function A(m){}function B(m){}function X(m){}function c(m,u){u.restReload()}return(m,u)=>{const b=x,q=R,T=S;return N(),I(T,null,{default:l(()=>[r(q,{segmented:"",title:i(o)("equipmentLibrary.equipmentMainLibrary.hsqe.tableAuditInspection"),class:"ui-card"},{default:l(()=>[r(i(L),{ref_key:"auditInspectionTableRef",ref:s,columns:i(_),request:e=>void 0,"row-key":e=>e.id,autoScrollX:!0,immediate:!1,"virtual-scroll":""},{tableTitle:l(()=>[r(b,{"formatted-value":i(a),"onUpdate:formattedValue":u[0]||(u[0]=e=>f(a)?a.value=e:null),"value-format":"yyyy-MM-dd",type:"daterange",clearable:""},null,8,["formatted-value"])]),_:1},8,["columns","request","row-key"])]),_:1},8,["title"]),r(q,{segmented:"",title:i(o)("equipmentLibrary.equipmentMainLibrary.hsqe.tableAccident"),class:"ui-card mt-3 mb-3"},{default:l(()=>[r(i(L),{ref_key:"accidentTableRef",ref:n,columns:i(h),request:e=>void 0,"row-key":e=>e.id,autoScrollX:!0,immediate:!1,"virtual-scroll":""},{tableTitle:l(()=>[r(b,{"formatted-value":i(a),"onUpdate:formattedValue":u[1]||(u[1]=e=>f(a)?a.value=e:null),"value-format":"yyyy-MM-dd",type:"daterange",clearable:""},null,8,["formatted-value"])]),_:1},8,["columns","request","row-key"])]),_:1},8,["title"]),r(q,{segmented:"",title:i(o)("equipmentLibrary.equipmentMainLibrary.hsqe.tableNearMiss"),class:"ui-card"},{default:l(()=>[r(i(L),{ref_key:"nearMissTableRef",ref:M,columns:i(v),request:e=>void 0,"row-key":e=>e.id,autoScrollX:!0,immediate:!1,"virtual-scroll":""},{tableTitle:l(()=>[r(b,{"formatted-value":i(a),"onUpdate:formattedValue":u[2]||(u[2]=e=>f(a)?a.value=e:null),"value-format":"yyyy-MM-dd",type:"daterange",clearable:""},null,8,["formatted-value"])]),_:1},8,["columns","request","row-key"])]),_:1},8,["title"])]),_:1})}}});export{ae as default};
