import{V as p,bk as C,d as D,e as T,r as q,a as E,Z as c,c as L,o as B,w as r,j as a,W as I,l as s,k as V,X as A}from"./index-9PRMimni.js";import{B as F}from"./BasicForm-dL_oCSPM.js";import{u as N}from"./useForm-CKmgcynv.js";import{B as P}from"./Table-0PViRYCf.js";import{_ as W}from"./TableAction.vue_vue_type_script_setup_true_lang-Bj_Y4LtN.js";import{g as M}from"./riskAssessment-BQgT9XET.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";import"./Table.vue_vue_type_style_index_0_scoped_7b9e6ece_lang-BoW2DV_e.js";import"./componentMap-CElCaWis.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"./useTimeout-BxFilWvD.js";import"./Flex-CTSf12gq.js";const{t}=p(),U=[{label:t("Draft"),value:1},{label:t("Published"),value:0},{label:t("Closed"),value:2}],$=[{label:t("Deck Department"),value:1},{label:t("Engine Department"),value:0}],H=[{field:"status",component:"NSelect",label:t("hsqe.ra.status"),componentProps:{placeholder:t("document.documentManagement.status"),options:U,clearable:!0}},{field:"dept",component:"NSelect",label:t("hsqe.ra.deptOrShip"),componentProps:{placeholder:t("document.documentManagement.status"),options:$,clearable:!0}}],O=C(),{t:e}=p(),Q=[{title:e("No."),key:"no",width:150},{title:e("Item"),key:"fileName",width:150,render:i=>O.getLocale==="en"?i?.operationEnglish:i?.operationChinese},{title:e("Max Risk Rating"),key:"maxRisk",width:150},{title:e("Dept/Ship"),key:"rev",width:150,render:i=>i.dept=="1"?"Tech":"Cabin"},{title:e("Status"),key:"effectiveDate",width:150,render:i=>{switch(i.status){case 1:return e("craft");case 2:return e("published");case 3:return e("closed");default:return""}}},{title:e("Revision"),key:"revision",width:150},{title:e("Last Update"),key:"updateTime",width:150}],Te=D({__name:"index",setup(i){const m=T(),{t:l}=p(),u=q(),[b,{getFieldsValue:k}]=N({schemas:H,labelWidth:"150",gridProps:{cols:4,xGap:15}}),g=E({width:120,title:l("common.optionsText"),key:"action",fixed:"right",align:"center",render(o){return c(W,{style:"text",actions:[{label:l("hsqe.deficiency.view"),labelShow:!1,icon:c("i",{class:"iconfont icon-View text-[#3F7AE9] text-[20px]"}),onClick:()=>{m.push({name:"Add_HSQE_AuditInspection_ReportList_VesselInspection_DeficiencyReport",query:{id:o.id,type:"view"}})}},{label:l("common.optionsEditText"),labelShow:!1,icon:c("i",{class:"iconfont icon-a-Frame28"}),onClick:()=>{m.push({name:"Add_HSQE_AuditInspection_ReportList_VesselInspection_DeficiencyReport",query:{id:o.id,isEdit:1}})},ifShow:o.editable}]})}});function d(){u.value.reload()}function w(o){d()}function y(o){d()}async function v(o){let _=k();return M({...o,..._})}return(o,_)=>{const S=V,f=I,R=A;return B(),L(R,null,{default:r(()=>[a(f,{bordered:!1,class:"mb-3 proCard"},{default:r(()=>[a(s(F),{onRegister:s(b),onSubmit:w,onReset:y},{statusSlot:r(({model:n,field:h})=>[a(S,{value:n[h],"onUpdate:value":x=>n[h]=x},null,8,["value","onUpdate:value"])]),_:1},8,["onRegister"])]),_:1}),a(f,{bordered:!1,class:"proCard"},{default:r(()=>[a(s(P),{columns:s(Q),request:n=>v(n),"row-key":n=>n.id,ref_key:"basicTableRef",ref:u,autoScrollX:!0,"virtual-scroll":"",actionColumn:s(g)},null,8,["columns","request","row-key","actionColumn"])]),_:1})]),_:1})}}});export{Te as default};
