import{d as w,V as C,a4 as N,gD as Y,r as V,aw as B,h as i,o as t,i as n,j as u,S as L,w as s,p as m,A as c,l,F as b,a9 as h,ao as M,c as A,ap as E}from"./index-9PRMimni.js";import{m as j,n as F}from"./template-rpthWlT9.js";import{g as P}from"./helper-DAsjAERN.js";const S={class:"pt-[25px] pb-[25px] border-b-[1px] border-solid border-[#000]"},O={class:"flex flex-col gap-y-[14px] font-semibold"},$={class:"flex items-center gap-x-[8px] pb-[11px] border-b border-[rgba(177,177,177,0.25)]"},z={class:"pt-[10px]"},G={key:0},H={key:1},J={class:"mt-[10px] pt-[10px] border-t-[1px] border-solid border-[rgba(177,177,177,0.25)]"},K={class:"flex flex-col gap-y-[14px] font-semibold"},Q={class:"mt-[10px]"},U={key:0},W={key:1},te=w({__name:"Action",props:{actionData:{}},setup(k){const{t:e}=C(),y=k,f=N(()=>({...y.actionData,rectifyTime:Y(y.actionData.rectifyTime).format("YYYY-MM-DD")})),v=V(),I=V();function R(){const _=[{title:e("hsqe.auditInspection.vesselInspection.shipVisitReport.deficiencyReport.action.correctiveAction"),data:[{field:"correctActionType",label:e("hsqe.auditInspection.vesselInspection.shipVisitReport.deficiencyReport.action.actionType"),options:v.value},{field:"rectifyTime",label:e("hsqe.auditInspection.vesselInspection.shipVisitReport.deficiencyReport.action.extensionRectifiedDate")},{field:"correctActionDescription",label:e("hsqe.auditInspection.vesselInspection.shipVisitReport.deficiencyReport.action.description")}]},{title:e("hsqe.auditInspection.vesselInspection.shipVisitReport.deficiencyReport.action.preventiveAction"),data:[{field:"preventActionMethod",label:e("hsqe.auditInspection.vesselInspection.shipVisitReport.deficiencyReport.action.actionType"),options:I.value},{field:"preventActionDescription",label:e("hsqe.auditInspection.vesselInspection.shipVisitReport.deficiencyReport.action.comments")}]}],a=[{field:"correctActionReview",label:e("hsqe.auditInspection.vesselInspection.shipVisitReport.deficiencyReport.action.verifiedClosedON"),options:[{label:"是",value:"yes",labelEn:"Yes"},{label:"否",value:"no",labelEn:"No"}]},{field:"correctActionComment",label:e("hsqe.auditInspection.vesselInspection.shipVisitReport.deficiencyReport.action.comments")}];return{shipColums:_,bankColums:a}}function g(_,a){const p=_?.find(r=>r.code||r.value===a);return P(p)}async function q(){v.value=await j(),I.value=await F()}return B(()=>{q()}),(_,a)=>{const p=L,r=E,D=M;return t(),i("div",S,[n("div",null,[n("header",O,[u(p,{class:"text-[18px] text-[#191919]"},{default:s(()=>[m(c(l(e)("hsqe.auditInspection.vesselInspection.shipVisitReport.deficiencyReport.action.vesselAction")),1)]),_:1})]),n("main",null,[(t(!0),i(b,null,h(R().shipColums,(o,x)=>(t(),i("div",{key:x,class:"mt-[12px]"},[n("div",$,[a[0]||(a[0]=n("div",{class:"h-[14px] border-l-[4px] border-l-[#195cf1]"},null,-1)),u(p,{class:"text-[16px] text-[#404040] font-medium"},{default:s(()=>[m(c(o.title),1)]),_:2},1024)]),n("div",z,[u(D,{"label-placement":"top",column:2,"label-class":"text-[16px] w-[200px] text-[#000]","content-class":"text-[14px] w-[200px] text-[#676767]"},{default:s(()=>[(t(!0),i(b,null,h(o.data,(d,T)=>(t(),A(r,{key:T,label:d.label},{default:s(()=>[d.options?(t(),i("div",H,c(g(d?.options,l(f)[d?.field])),1)):(t(),i("div",G,c(l(f)[d?.field]),1))]),_:2},1032,["label"]))),128))]),_:2},1024)])]))),128))])]),n("div",J,[n("header",K,[u(p,{class:"text-[18px] text-[#191919]"},{default:s(()=>[m(c(l(e)("hsqe.auditInspection.vesselInspection.shipVisitReport.deficiencyReport.action.officeAction")),1)]),_:1})]),n("main",Q,[u(D,{"label-placement":"top",column:2,"label-class":"text-[16px] w-[200px] text-[#000]","content-class":"text-[14px] w-[200px] text-[#676767]"},{default:s(()=>[(t(!0),i(b,null,h(R().bankColums,(o,x)=>(t(),A(r,{key:x,label:o.label},{default:s(()=>[o.options?(t(),i("div",W,c(g(o.options,l(f)[o?.field])),1)):(t(),i("div",U,c(l(f)[o?.field]),1))]),_:2},1032,["label"]))),128))]),_:1})])])])}}});export{te as _};
