import{T,a as b}from"./tabbarLeftItem-d60bd7c0-1779868775780v=1.0.0.js";import w from"./accountBaseInfoPro-24840e28-1779868775780v=1.0.0.js";import x from"./accountRole-53c8486d-1779868775780v=1.0.0.js";import{a as R,u as S}from"./account-ec8d0b54-1779868775780v=1.0.0.js";import{u as P}from"./useFormEdit-42a9503c-1779868775780v=1.0.0.js";import M from"./asyncApplication-bd84e3b6-1779868775780v=1.0.0.js";import{b as q}from"./index-0f3e2c06-1779868775780v=1.0.0.js";import{E as m}from"./eleVendor-dbf96bf3-1779868775780v=1.0.0.js";import{l as F,a as i,e as L,d as N,ah as D,m as c,M as p,O as I,U as f,u as n,B as u,R as C}from"./vendor-98154105-1779868775780v=1.0.0.js";import"./_plugin-vue_export-helper-8c5478df-1779868775780v=1.0.0.js";import"./Imgs-fee891de-1779868775780v=1.0.0.js";import"./upload-a2386bf9-1779868775780v=1.0.0.js";import"./addOrganAccount-f8281166-1779868775780v=1.0.0.js";import"./eleValidate-dfbd5aa5-1779868775780v=1.0.0.js";import"./Cascader-42286393-1779868775780v=1.0.0.js";import"./organize-df1743e7-1779868775780v=1.0.0.js";import"./department-b547eda3-1779868775780v=1.0.0.js";import"./index-f89521bb-1779868775780v=1.0.0.js";import"./organSelect-aa5d969e-1779868775780v=1.0.0.js";import"./systemManage-d67b09c0-1779868775780v=1.0.0.js";import"./unit-3af479b6-1779868775780v=1.0.0.js";import"./tabs-e9b8af2b-1779868775780v=1.0.0.js";const V=F({name:"organManageAccountAdd"}),da=F({...V,setup($){const{closeCurrent:v,setTitle:O}=P(),g=q(),d=i(""),B=i(""),y=L(()=>!Boolean(d.value)),t=i("1"),k=r=>{},l=i({accountName:"",avatar:"",phone:"",sex:3,identityCard:"",account:"",password:"",status:1,organUnitId:"",areaId:"",departmentId:"",position:"",accounType:null,socialCreditCode:null,codeRole:"",organFormArr:[],organUnitTypes:"",organUnitIds:"",departmentIds:"",positions:"",dictIds:"",organUnitDictIds:""}),o=i(!1),U=()=>{v()},_=async r=>{o.value=!0;try{let a=R,s="\u65B0\u589E\u6210\u529F",e=await a(r);e.code==0?(m({type:"success",message:`${s}!`}),d.value=e.data,t.value="2"):m.warning(e.msg),o.value=!1}catch{o.value=!1}},A=()=>{v()},E=async r=>{o.value=!0;try{let a=S,s="\u66F4\u65B0\u6210\u529F",e=await a(r);e.code==0?(m({type:"success",message:`${s}!`}),v()):m.warning(e.msg),o.value=!1}catch{o.value=!1}};return N(()=>{g.query.areaId&&(B.value=g.query.areaId,l.value.areaId=g.query.areaId)}),(r,a)=>{const s=D("PaIndexPage");return c(),p(s,{filterWidth:240},{treeCard:I(()=>[f(T,{value:n(t),"onUpdate:value":a[0]||(a[0]=e=>u(t)?t.value=e:null),onTabClick:k},{default:I(()=>[f(b,{name:"1",label:"\u57FA\u672C\u4FE1\u606F","icon-name":"icon_addCard_base_info"}),f(b,{name:"2",label:"\u5E94\u7528\u540C\u6B65",disabled:n(y),"icon-name":"icon_addCard_base_info"},null,8,["disabled"]),f(b,{name:"4",label:"\u89D2\u8272\u4FE1\u606F",disabled:n(y),"icon-name":"icon_addCard_sell_info"},null,8,["disabled"])]),_:1},8,["value"])]),default:I(()=>[n(t)=="1"?(c(),p(w,{key:0,value:n(l),"onUpdate:value":a[1]||(a[1]=e=>u(l)?l.value=e:null),loading:n(o),"onUpdate:loading":a[2]||(a[2]=e=>u(o)?o.value=e:null),onCancel:U,onSubmit:_},null,8,["value","loading"])):C("",!0),n(t)=="2"?(c(),p(M,{key:1,accountId:n(d),value:n(l),"onUpdate:value":a[3]||(a[3]=e=>u(l)?l.value=e:null),loading:n(o),"onUpdate:loading":a[4]||(a[4]=e=>u(o)?o.value=e:null),onCancel:U,onSubmit:_},null,8,["accountId","value","loading"])):C("",!0),n(t)=="4"?(c(),p(x,{key:2,accountId:n(d),onCancel:A,loading:n(o),"onUpdate:loading":a[5]||(a[5]=e=>u(o)?o.value=e:null),onSubmit:E},null,8,["accountId","loading"])):C("",!0)]),_:1})}}});export{da as default};
