import{V as h,d as N,r as c,a as O,Z as q,aw as W,c as A,o as $,X as I,w as r,j as i,l as e,aA as K,W as L,i as M,A as X,ds as j,cr as E}from"./index-9PRMimni.js";import{B as G}from"./BasicForm-dL_oCSPM.js";import{u as Z}from"./useForm-CKmgcynv.js";import{B as z}from"./Table-0PViRYCf.js";import{_ as H}from"./TableAction.vue_vue_type_script_setup_true_lang-Bj_Y4LtN.js";import{b as J}from"./noticecircular-BlDTlrlg.js";import{_ as Q}from"./FeedBack.vue_vue_type_script_setup_true_lang-lc6w1Hv1.js";const{t:u}=h(),Y=[{field:"isDepartmentOrShip",component:"NSelect",label:u("hsqe.noticeCircular.type"),componentProps:{placeholder:u("hsqe.noticeCircular.type"),defaultValue:1,clearable:!1,options:[{label:u("hsqe.noticeCircular.Office"),value:1},{label:u("hsqe.noticeCircular.Vessel"),value:2}]}},{field:"feedbackStatus",slot:"feedbackStatus",label:u("hsqe.noticeCircular.reportStatus"),componentProps:{placeholder:u("hsqe.noticeCircular.type")}}],{t:n}=h(),ee=[{title:n("hsqe.question.serialNo"),key:"index",width:80,render(t,d){return d+1}},{title:n("hsqe.noticeCircular.Office")+"/"+n("hsqe.noticeCircular.Vessel"),key:"name",minWidth:160},{title:n("hsqe.noticeCircular.FeedbackName"),key:"userName",minWidth:160},{title:n("hsqe.noticeCircular.FeedbackStatus"),key:"feedbackComment",minWidth:160,render(t){return t.feedback===0||t.noticeStatus===0||t.feedback===1||t.noticeStatus===1?n("hsqe.noticeCircular.PendingFeedback"):t.feedback===2||t.noticeStatus===2||t.feedback===3||t.noticeStatus===3?n("hsqe.noticeCircular.FeedbackSubmitted"):""}},{title:n("hsqe.noticeCircular.doneTime"),key:"doneTime",minWidth:160}],te={class:"text-[18px] font-bold"},re=N({__name:"index",props:{uuid:{},isFeedbackdata:{}},setup(t){const d=t,{t:s}=h(),_=c(),p=c(!1),k=c(""),C=c(),w=c([{label:s("hsqe.noticeCircular.PendingFeedback"),value:0},{label:s("hsqe.noticeCircular.FeedbackSubmitted"),value:2}]),g=c([{label:s("hsqe.noticeCircular.PendingFeedback"),value:1},{label:s("hsqe.noticeCircular.FeedbackSubmitted"),value:3}]),[v,{getFieldsValue:y}]=Z({schemas:Y,gridProps:{cols:4,xGap:"15"},labelPlacement:"top",showAdvancedButton:!1}),F=O({width:120,title:s("common.optionsText"),key:"action",fixed:"right",align:"center",render(a){return q(H,{style:"text",actions:[{label:s("common.optionsViewText"),labelShow:!1,icon:q("i",{class:"iconfont icon-View text-[#3F7AE9] text-[20px]"}),onClick:P.bind(null,a),ifShow:a.feedback===2}]})}});async function x(a,l){var b={...a,...l,isDepartmentOrShip:l.isDepartmentOrShip?l.isDepartmentOrShip:1,id:d.uuid};return J(b)}function R(a){m()}function T(a){m()}function P(a){p.value=!0,k.value=a.name,C.value=a.id}function m(){_.value.reload()}async function V(){m()}return W(()=>{V()}),(a,l)=>{const b=K,f=L,B=E,U=I;return $(),A(U,null,{default:r(()=>[i(f,{bordered:!1,class:"mb-3 proCard"},{default:r(()=>[i(e(G),{onRegister:e(v),onSubmit:R,onReset:T},{feedbackStatus:r(({model:o,field:S})=>[i(b,{value:o[S],"onUpdate:value":D=>o[S]=D,filterable:"",clearable:"",options:d.isFeedbackdata===0?e(w):e(g)},null,8,["value","onUpdate:value","options"])]),_:1},8,["onRegister"])]),_:1}),i(f,{bordered:!1,class:"proCard"},{default:r(()=>[i(e(z),{columns:e(ee),request:o=>x(o,e(y)()),"row-key":o=>o.id,ref_key:"basicTableRef",ref:_,autoScrollX:!0,"virtual-scroll":"",actionColumn:e(F),"onUpdate:checkedRowKeys":a.onCheckedRow},{tableTitle:r(()=>[M("span",te,X(e(s)("hsqe.noticeCircular.noticecircularname")),1)]),_:1},8,["columns","request","row-key","actionColumn","onUpdate:checkedRowKeys"])]),_:1}),i(B,{show:e(p),"onUpdate:show":l[0]||(l[0]=o=>j(p)?p.value=o:null),title:e(k),preset:"card",draggable:{bounds:"none"},class:"w-[60%]"},{default:r(()=>[i(Q,{sendUserId:e(C),viewdetail:!0},null,8,["sendUserId"])]),_:1},8,["show","title"])]),_:1})}}});export{re as _};
