import{b as e}from"./project-4a4cab5b-1780912037814v=1.0.0.js";import{d as a,r as l,J as t,s as d,o as s,a as p,b as i,c as u,w as o,k as r,e as n,n as c,g as m,f as y,h as _,F as f,i as v,l as b,j as g,_ as I}from"./index-d052b22f-1780912037814v=1.0.0.js";const h={class:"pt20 mt30"},j=I(a({__name:"SelectProjectForm",props:{typeId:{type:[String,Number]},projectId:{type:[String,Number]}},emits:["update:active","update:typeId","getType","cancel","submit"],setup(a,{expose:I,emit:j}){const k=l({xs:16,sm:12,md:12,lg:12,xl:12});t();const x=l();let F=a;const w=d({get:()=>F.typeId,set(e){S("update:typeId",e)}}),C=d((()=>({type_id:w.value}))),R=l({type_id:[{required:!0,message:"请选择项目类型",trigger:"change"}]}),S=j;let T=l(!1);const V=async e=>{S("update:typeId",e),S("getType",N(e))},N=e=>P.value.find((a=>a.type_id==e)),P=l([]);return s((async()=>{(async()=>{let a=await e({});200==a.code&&(P.value=a.data)})()})),I({ruleFormRef:x}),(e,l)=>{const t=p("el-option"),d=p("el-select"),s=p("el-form-item"),I=p("FormCol"),j=p("FormRow"),F=p("el-button"),w=p("el-form");return i(),u(w,{model:y(C),ref_key:"ruleFormRef",ref:x,rules:R.value,"label-width":"170px"},{default:o((()=>[l[5]||(l[5]=r("div",{class:"divider mb30"},null,-1)),n(j,null,{default:o((()=>[n(I,c(m(k.value)),{default:o((()=>[n(s,{label:"项目类型：",prop:"type_id"},{default:o((()=>[n(d,{modelValue:y(C).type_id,"onUpdate:modelValue":l[0]||(l[0]=e=>y(C).type_id=e),class:"m-2",placeholder:"请选择项目类型",clearable:"",disabled:!!a.projectId,filterable:"",style:{width:"100%"},onChange:V},{default:o((()=>[(i(!0),_(f,null,v(P.value,(e=>(i(),u(t,{key:e.type_id,label:e.name,value:e.type_id},null,8,["label","value"])))),128))])),_:1},8,["modelValue","disabled"]),b(' <div class="tip">什么是项目类型，点击查看<span type="primary" @click="handleAddPlan">项目类型的解释</span></div> ')])),_:1})])),_:1},16)])),_:1}),n(s,null,{default:o((()=>[r("div",h,[n(F,{onClick:l[1]||(l[1]=e=>S("cancel"))},{default:o((()=>l[3]||(l[3]=[g("返回")]))),_:1}),n(F,{type:"primary",loading:y(T),onClick:l[2]||(l[2]=e=>{x.value.validate((async(e,a)=>{e&&(S("update:typeId",C.value.type_id),S("getType",N(C.value.type_id)),S("update:active",2))}))})},{default:o((()=>l[4]||(l[4]=[g("下一步")]))),_:1},8,["loading"])])])),_:1})])),_:1},8,["model","rules"])}}}),[["__scopeId","data-v-6fcba565"]]);export{j as default};
