import{T as E,a as b}from"./tabbarLeftItem-d60bd7c0-1779868775780v=1.0.0.js";import w from"./unitAccountBaseInfoPro-4fb8d233-1779868775780v=1.0.0.js";import x from"./asyncApplication-bd84e3b6-1779868775780v=1.0.0.js";import R from"./accountRole-53c8486d-1779868775780v=1.0.0.js";import{a as S,u as P}from"./account-ec8d0b54-1779868775780v=1.0.0.js";import{u as M}from"./useFormEdit-42a9503c-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 t,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"./unit-3af479b6-1779868775780v=1.0.0.js";import"./organSelect-aa5d969e-1779868775780v=1.0.0.js";import"./organize-df1743e7-1779868775780v=1.0.0.js";import"./systemManage-d67b09c0-1779868775780v=1.0.0.js";import"./department-b547eda3-1779868775780v=1.0.0.js";import"./index-f89521bb-1779868775780v=1.0.0.js";import"./tabs-e9b8af2b-1779868775780v=1.0.0.js";const V=F({name:"unitManageAccountAdd"}),de=F({...V,setup($){const{closeCurrent:v,setTitle:O}=M(),g=q(),d=i(""),A=i(""),y=L(()=>!Boolean(d.value)),n=i("1"),B=r=>{},l=i({accountName:"",avatar:"",phone:"",sex:3,identityCard:"",account:"",password:"",status:1,organUnitId:"",areaId:"",departmentId:"",position:"",accounType:null,socialCreditCode:null,codeRole:"",dictIds:"",organFormArr:[{dictId:"",organUnitId:"",departmentId:"",position:""}],organUnitTypes:"",organUnitIds:"",departmentIds:"",positions:"",thirdDeptType:""}),o=i(!1),U=()=>{v()},_=async r=>{o.value=!0;try{let e=S,s="\u65B0\u589E\u6210\u529F",a=await e(r);a.code==0?(m({type:"success",message:`${s}!`}),d.value=a.data,n.value="2"):m.warning(a.msg),o.value=!1}catch{o.value=!1}},T=()=>{v()},k=async r=>{o.value=!0;try{let e=P,s="\u66F4\u65B0\u6210\u529F",a=await e(r);a.code==0?(m({type:"success",message:`${s}!`}),v()):m.warning(a.msg),o.value=!1}catch{o.value=!1}};return N(()=>{g.query.areaId&&(A.value=g.query.areaId,l.value.areaId=g.query.areaId)}),(r,e)=>{const s=D("PaIndexPage");return c(),p(s,{filterWidth:240},{treeCard:I(()=>[f(E,{value:t(n),"onUpdate:value":e[0]||(e[0]=a=>u(n)?n.value=a:null),onTabClick:B},{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:t(y),"icon-name":"icon_addCard_base_info"},null,8,["disabled"]),f(b,{name:"4",label:"\u89D2\u8272\u4FE1\u606F",disabled:t(y),"icon-name":"icon_addCard_sell_info"},null,8,["disabled"])]),_:1},8,["value"])]),default:I(()=>[t(n)=="1"?(c(),p(w,{key:0,value:t(l),"onUpdate:value":e[1]||(e[1]=a=>u(l)?l.value=a:null),loading:t(o),"onUpdate:loading":e[2]||(e[2]=a=>u(o)?o.value=a:null),onCancel:U,onSubmit:_},null,8,["value","loading"])):C("",!0),t(n)=="2"?(c(),p(x,{key:1,accountId:t(d),value:t(l),"onUpdate:value":e[3]||(e[3]=a=>u(l)?l.value=a:null),loading:t(o),"onUpdate:loading":e[4]||(e[4]=a=>u(o)?o.value=a:null),onCancel:U,onSubmit:_},null,8,["accountId","value","loading"])):C("",!0),t(n)=="4"?(c(),p(R,{key:2,accountId:t(d),onCancel:T,loading:t(o),"onUpdate:loading":e[5]||(e[5]=a=>u(o)?o.value=a:null),onSubmit:k},null,8,["accountId","loading"])):C("",!0)]),_:1})}}});export{de as default};
