import{d as S,q as _,a1 as j,U,r as t,o as v,c as y,e as l,j as i,g as s,f as b,aA as q,F as z,C as A,i as L,aw as R,ak as E,al as M,_ as T}from "./index-f5e1fd05.js";import{l as $}from "./login-bottom-ec7c87ff.js";import{c as G,e as H}from "./session-8b690360.js";const J= r=>(E("data-v-df366fa2"),r=r(),M(),r),K={class:"CaseInfoDialog_main"},O={class:"title"},P=["src"],Q=J(()=>s("span",null,"案件信息",-1)),W={class:"btn_footer"},X=S({name:"CaseInfoDialog",__name:"CaseInfoDialog",emits:["save"],setup(r, {expose:I,emit:k}){const n=_(!1),m=_(!1),c=j({caseNumber:"",name:""}),u=_(),f=_([]),w={name:[{required:!0,message:"请输入",trigger:"change"}]};I({async open(){await U(),n.value=!0}});const g=()=>{u.value.resetFields(),n.value=!1},V=k,C= a=>a.ajid+"|"+a.ajmc,h= a=>{a.validate(async(e, p)=>{if(e){const d=await G({caseNumber:c.name.split("|")[0],caseName:c.name.split("|")[1],speed:1,type:1});d.code===200&&(R("创建成功",{type:"success"}),n.value=!1,V("save",d.data))}else return p})},x=async a=>{if(a){m.value=!0;const e=await H({keyword:a});m.value=!1,f.value=e.data}else f.value=[]};return(a, e)=>{const p=t("el-icon"),d=t("el-option"),D=t("el-select"),B=t("el-form-item"),N=t("el-form"),F=t("el-dialog");return v(),y("div",null,[l(F,{width:"640","append-to-body":"",title:"",modelValue:n.value,"onUpdate:modelValue":e[2]||(e[2]= o=>n.value=o),"custom-class":"CaseInfoDialog"},{default:i(()=>[s("div",K,[s("div",O,[s("img",{src:b($),alt:""},null,8,P),Q,l(p,{onClick:g,size:"20",class:"icon"},{default:i(()=>[l(b(q))]),_:1})]),l(N,{rules:w,"label-position":"top",ref_key:"ruleFormRef",ref:u,model:c},{default:i(()=>[l(B,{label:"案件编号 | 名称",prop:"name"},{default:i(()=>[l(D,{loading:m.value,style:{width:"100%"},size:"large",filterable:"",remote:"",modelValue:c.name,"onUpdate:modelValue":e[0]||(e[0]= o=>c.name=o),placeholder:"请输入","remote-method":x},{default:i(()=>[(v(!0),y(z,null,A(f.value, o=>(v(),L(d,{key:o.id,label:C(o),value:C(o)},null,8,["label","value"]))),128))]),_:1},8,["loading","modelValue"])]),_:1})]),_:1},8,["model"]),s("div",W,[s("div",{class:"main_btn",onClick:e[1]||(e[1]= o=>h(u.value))},"确定"),s("div",{class:"btn",onClick:g},"取消")])])]),_:1},8,["modelValue"])])}}});const ae=T(X,[["__scopeId","data-v-df366fa2"]]);export{ae as default};
