import{B as I}from"./BasicForm-dL_oCSPM.js";import{V as S,d as k,f as R,r as s,u as w,aw as B,h as D,o as C,p as V,j as c,A,l as r,w as E,aA as G,h8 as J}from"./index-9PRMimni.js";import{b as L}from"./meeting-Cq-av6G8.js";import{u as T}from"./useForm-CKmgcynv.js";import"./Render.vue_vue_type_script_lang-DKUYY0Zw.js";import"./SingleImageUpload-CNx4b9eC.js";import"./ImageUpload.vue_vue_type_style_index_0_scoped_cb086928_lang-D-28kXvw.js";import"./componentSetting-DVhNDBTO.js";import"./ImageUpload-DUsnro3W.js";import"./vuedraggable.umd-Co2xEC3p.js";import"./BasicUpload.vue_vue_type_style_index_0_scoped_a4d0e930_lang-DxRbtP01.js";import"./tabsView-BXskTdVh.js";import"./BasicForm.vue_vue_type_style_index_0_scoped_b9e995ec_lang-CEvcLwxD.js";import"./propTypes-CebMRUpe.js";import"./BasicSelect-C_uwzMkE.js";import"./BasicSelect.vue_vue_type_style_index_0_scoped_772d51cc_lang-Brp6PjEU.js";import"./dictionary-BRse4lkf.js";import"./index-DkvzUEqh.js";import"./index-kKnqLkWM.js";import"./AutoComplete-Dv1Bqed4.js";import"./TreeSelect-BZh2DeCh.js";import"./usePageCache-DluHn7Yy.js";const{t:e}=S();function U(n){return{schemas:[{field:"ship_name",label:e("hsqe.meeting.NameofShip"),component:"NInput",componentProps:{disabled:!0}},{field:"ship_master",label:e("hsqe.meeting.Master"),component:"NInput",componentProps:{disabled:!0}},{field:"ce",label:e("hsqe.meeting.C_E"),component:"NInput",componentProps:{disabled:!0}},{field:"co",label:e("hsqe.meeting.C_O"),component:"NInput",componentProps:{disabled:!0}},{field:"co",label:e("hsqe.meeting.SafetyOfficer"),component:"NInput",componentProps:{disabled:!0}},{field:"meeting_date",label:e("hsqe.meeting.meeting_date"),component:"NDatePicker",giProps:{span:1},componentProps:{type:"date",valueFormat:"yyyy-MM-dd",disabled:n?.readOnly},rules:[{required:!0,type:"date",message:e("hsqe.meeting.meeting_date"),trigger:["blur"]}]},{field:"meeting_held_from",label:e("hsqe.meeting.validfrom"),component:"NDatePicker",giProps:{span:1},componentProps:{type:"date",valueFormat:"yyyy-MM-dd",disabled:n?.readOnly},rules:[{required:!0,type:"date",message:e("hsqe.meeting.validfrom"),trigger:["blur"]}]},{field:"meeting_held_to",label:e("hsqe.meeting.validfrom"),component:"NDatePicker",giProps:{span:1},componentProps:{type:"date",valueFormat:"yyyy-MM-dd",disabled:n?.readOnly},rules:[{required:!0,type:"date",message:e("hsqe.meeting.validto"),trigger:["blur"]}]},{field:"attendee",slot:"attendee",label:e("hsqe.meeting.attendee"),giProps:{span:1},componentProps:{disabled:n?.readOnly},rules:[{required:!0,message:e("hsqe.meeting.attendee"),trigger:["blur"]}]},{field:"meeting_place",label:e("hsqe.meeting.meeting_place"),component:"NInput",giProps:{span:1},componentProps:{type:"textarea",disabled:n?.readOnly},rules:[{required:!0,message:e("hsqe.meeting.meeting_place"),trigger:["blur"]}]},{field:"meeting_brief",label:e("hsqe.meeting.meeting_brief"),component:"NInput",giProps:{span:1},componentProps:{type:"textarea",disabled:n?.readOnly},rules:[{required:!0,message:e("hsqe.meeting.meeting_brief"),trigger:["blur"]}]}]}}const ue=k({__name:"index",setup(n,{expose:i}){const o=R(),g=s(!1),l=w(),m=s([]),p=s([]),[f,{setFieldsValue:y,getFieldsValue:b}]=T({schemas:m,labelWidth:"auto",layout:"horizontal",collapsed:!0,gridProps:{cols:2,xGap:15},showActionButtonGroup:!1}),_=s(!1);function h(t){l.success(JSON.stringify(t))}function q(t){l.success(JSON.stringify(t))}const P=async()=>{var t={template_code:o.query.meetingTypeCode,uuid:o.query.uuid},a=await L(t);y(a),console.log(a)},v=async()=>{var t=await J();p.value=t};function N(){const t=U({readOnly:_.value});m.value=t.schemas,P(),v()}B(()=>{N()});function O(){return b()}return i({getData:O}),(t,a)=>{const M=G,x=I;return C(),D("div",null,[V(A(r(o).query)+" ",1),c(x,{onRegister:r(f),ref_key:"modalRef",ref:g,"label-placement":"top",onSubmit:h,onReset:q},{attendee:E(({model:d,field:u})=>[c(M,{value:d[u],"onUpdate:value":F=>d[u]=F,filterable:"",multiple:"",options:r(p)},null,8,["value","onUpdate:value","options"])]),_:1},8,["onRegister"])])}}});export{ue as default};
