import{az as m,d as h,r as c,s as A,b as y,p as k,c as r,e as q,k as x,i as s,h as l,u as o,a2 as w,q as N,g as B,m as C,E as S}from"./index.0308b213.js";const R=e=>m.request({url:"addon/visa.process/editSave",method:"POST",data:e}),M=e=>m.request({url:"addon/visa.process/list",method:"POST",data:e}),T=e=>m.request({url:"addon/visa.process/detail",params:{id:e}}),j=e=>m.request({url:"addon/visa.process/delete",params:{id:e}}),U=B("div",{class:"tn-form-item__tips"},"\u586B\u5199\u6807\u9898\u540D\u79F0",-1),O=B("div",{class:"tn-form-item__tips"},"\u7528\u4E8E\u4ECB\u7ECD\u6D41\u7A0B\u7684\u8BF4\u660E",-1),P=C("\u63D0\u4EA4"),z=C("\u53D6\u6D88"),G=h({props:{modelValue:{type:Boolean,default:!1},id:{default:0}},emits:["update:modelValue","onClose"],setup(e,{emit:f}){const n=e;let i=c(!1),E=A(()=>Number(n.id)>0);c([]);const v=c(),t=y({id:0,title:"",desc:""});k(()=>n.modelValue,a=>{i.value=a,a&&n.id&&(t.id=n.id,F())});const F=()=>{T(n.id).then(a=>{t.title=a.data.title||"",t.desc=a.data.desc||""})},g=()=>{R(t).then(()=>{S.success("\u4FDD\u5B58\u6210\u529F"),p()})},p=()=>{f("update:modelValue",!1),f("onClose")};return(a,u)=>{const _=r("el-input"),V=r("el-form-item"),D=r("el-button"),b=r("el-dialog");return q(),x(b,{modelValue:o(i),"onUpdate:modelValue":u[2]||(u[2]=d=>N(i)?i.value=d:i=d),title:o(E)?"\u7F16\u8F91":"\u65B0\u589E",width:"80%","destroy-on-close":"",onClose:p},{footer:s(()=>[l(D,{type:"primary",onClick:g},{default:s(()=>[P]),_:1}),l(D,{type:"danger",onClick:p},{default:s(()=>[z]),_:1})]),default:s(()=>[l(o(w),{ref_key:"formRef",ref:v,model:o(t),"label-width":"150px"},{default:s(()=>[l(V,{label:"\u6D41\u7A0B\u6807\u9898",prop:"title"},{default:s(()=>[l(_,{modelValue:o(t).title,"onUpdate:modelValue":u[0]||(u[0]=d=>o(t).title=d)},null,8,["modelValue"]),U]),_:1}),l(V,{label:"\u6D41\u7A0B\u63CF\u8FF0",prop:"desc"},{default:s(()=>[l(_,{modelValue:o(t).desc,"onUpdate:modelValue":u[1]||(u[1]=d=>o(t).desc=d),type:"textarea",rows:6},null,8,["modelValue"]),O]),_:1})]),_:1},8,["model"])]),_:1},8,["modelValue","title"])}}});export{G as _,j as d,M as l};
