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{u as S}from"./useModal-CO65vga3.js";import{B as x}from"./Table-0PViRYCf.js";import{_ as T}from"./TableAction.vue_vue_type_script_setup_true_lang-Bj_Y4LtN.js";import{a as C}from"./vesselsSurvey-CV_Ys9Tu.js";import{_ as b}from"./index.vue_vue_type_script_setup_true_lang-DyCkxlGj.js";import{V as d,bk as g,d as B,a as u,bl as M,Z as c,fc as N,c as R,o as E,l as r,w as O,j as m}from"./index-9PRMimni.js";const{t:e}=d();g();function V(){return[{title:e("vesselsSurvey.no"),key:"no",width:60,render:(y,n)=>n+1},{title:e("vesselsSurvey.surveyTypeNo"),key:"configNo",width:150},{title:e("vesselsSurvey.surveyTypeNameEn"),key:"surveyEnglishName",width:180},{title:e("vesselsSurvey.surveyTypeNameCn"),key:"surveyChineseName",width:180},{title:e("vesselsSurvey.lastSurveyDate"),key:"surveyDate",width:130},{title:e("vesselsSurvey.windowStart"),key:"windowStart",width:110},{title:e("vesselsSurvey.windowEnd"),key:"windowEnd",width:110},{title:e("vesselsSurvey.updateBy"),key:"createBy",width:100},{title:e("vesselsSurvey.remark"),key:"remark",width:200}]}const L=B({__name:"index",emits:["refresh"],setup(y,{expose:n,emit:q}){const{t:s}=d(),a=u({}),l=M("infoModalRef"),[v,{openModal:f}]=S({title:s("vesselsSurvey.history"),subBtuText:s("common.okText"),cancelText:s("common.cancelText"),width:1200}),w=u({width:100,title:s("common.optionsText"),key:"action",fixed:"right",align:"center",render(t){return c(T,{style:"text",actions:[{label:s("common.optionsViewText"),labelShow:!1,icon:c(N,{class:"text-[#2180F1] text-[14px]"}),onClick:h.bind(null,t)}]})}});function h(t){l.value?.handleOpenModal({mode:"view",record:t})}async function p(t,i=a){try{return i.surveyId||Promise.reject(),await C({...t,...i})}catch{return{list:[],total:0}}}function _({record:t}){a.surveyId=t?.id??void 0,f()}return n({handleOpenModal:_}),(t,i)=>(E(),R(r(k),{onRegister:r(v),showAction:!1},{default:O(()=>[m(r(x),{columns:r(V)(),request:o=>p(o),"row-key":o=>o.id,autoScrollX:!0,"virtual-scroll":"",actionColumn:r(w)},null,8,["columns","request","row-key","actionColumn"]),m(b,{ref_key:"infoModalRef",ref:l},null,512)]),_:1},8,["onRegister"]))}});export{L as _};
