import{_ as k}from"./basicModal.vue_vue_type_script_setup_true_lang-CsJydKhW.js";import"./basicModal.vue_vue_type_style_index_0_lang-8QZP7ApW.js";import{s as b}from"./survey-50B41bWV.js";import{d as q,bk as E,V as M,r as d,c as N,o as u,l as t,w as o,h as T,D as x,j as r,ap as B,p as i,A as l,ao as D,aq as V}from"./index-9PRMimni.js";import{u as C}from"./useModal-CO65vga3.js";const H={key:0,class:"mb-4 ml-4"},z=q({__name:"History",setup(L,{expose:_}){const m=E(),{t:s}=M(),n=d([]),p=d(window.innerHeight-315),y=d([{title:"No.",key:"num",width:60,render:(e,c)=>c+1},{title:s("hsqe.Survey.SurveyDate"),key:"surveyDate",width:140,render(e){return e.surveyDate.slice(0,10)}},{title:s("hsqe.Survey.WindowStart"),key:"windowsStart",width:140,render(e){return e.windowsStart.slice(0,10)}},{title:s("hsqe.Survey.WindowEnd"),key:"windowsEnd",width:140,render(e){return e.windowsEnd.slice(0,10)}},{title:s("hsqe.Survey.EditBy"),key:"createByName",width:140},{title:s("hsqe.Survey.updatedAt"),key:"createTime",width:140,render(e){return e.createTime.slice(0,10)}}]),[h,{openModal:w}]=C({title:s("hsqe.Survey.SurveyHistory"),width:1e3});async function f(e){let a=await b({surveyId:e,pageNum:1,pageSize:100});n.value=a.list,w()}return _({showModal:f}),(e,c)=>{const a=B,v=D,g=V,S=k;return u(),N(S,{ref:"modalRef",onRegister:t(h),class:"basicModal basicFormModal",showAction:!1},{default:o(()=>[t(n).length!==0?(u(),T("div",H,[r(v,{"label-placement":"left"},{default:o(()=>[r(a,null,{label:o(()=>[i(l(t(s)("hsqe.certificate.Vessel")),1)]),default:o(()=>[i(" "+l(t(n)[0].vessel),1)]),_:1}),r(a,null,{label:o(()=>[i(l(t(s)("hsqe.Survey.SurveyType")),1)]),default:o(()=>[i(" "+l(t(m).getLocale==="en"?t(n)[0].surveyTypeEnglish:t(n)[0].surveyTypeChinese),1)]),_:1})]),_:1})])):x("",!0),r(g,{columns:t(y),data:t(n),pagination:!1,striped:"",height:t(p)},null,8,["columns","data","height"])]),_:1},8,["onRegister"])}}});export{z as _};
