1 |
- import{d as G,Y as H,K as p,h as J,r as m,ea as F,L as $,e as aa,l as ea,x as la,a as t,o as f,v as w,w as e,f as a,c as M,F as E,q as N,n as L,t as O,O as c,Z as ta,V as ua,A as da,E as oa,i as sa,ah as ra,ai as na,D as ma,I as ia,_ as _a,__tla as pa}from"./index-00b1998d.js";import{E as fa,__tla as va}from"./el-tree-select-a872ac6f.js";import{a as Q,D as j,__tla as ca}from"./dict-29c23f6f.js";import{f as ba,h as Va,__tla as ya}from"./index-6269c438.js";import{g as ha,__tla as Ua}from"./index-8bfa1ed6.js";import{d as ka}from"./tree-0af4953a.js";import{f as z,__tla as xa}from"./formatTime-4e31c660.js";import{u as wa,__tla as Ia}from"./useMessage-437e6444.js";let A,ga=Promise.all([(()=>{try{return pa}catch{}})(),(()=>{try{return va}catch{}})(),(()=>{try{return ca}catch{}})(),(()=>{try{return ya}catch{}})(),(()=>{try{return Ua}catch{}})(),(()=>{try{return xa}catch{}})(),(()=>{try{return Ia}catch{}})()]).then(async()=>{A=_a(G({__name:"UserForm",props:{isDetail:{type:Boolean,default:!1},obj:{default:{}},openType:{default:"create"},avatar:{type:String,default:""}},emits:["success"],setup(b,{expose:C,emit:Sa}){const R=H(),W=p(()=>R.getMobile),{t:V}=J(),I=wa(),Y=m(!1),q=m(""),_=m(!1),g=m(""),d=m({id:void 0,mobile:void 0,password:void 0,status:void 0,nickname:void 0,avatar:void 0,name:void 0,sex:void 0,areaId:void 0,birthday:void 0,mark:void 0,tagIds:[],groupId:void 0,currentQuota:0}),y=p(()=>F(d.value.currentQuota)),h=p(()=>F(d.value.highQuotaTotal)),U=b;$(U,r=>{d.value.avatar=r.avatar},{immediate:!0});const B=aa({}),v=m(),S=m([]),k=p(()=>z(d.value.createTime)),x=p(()=>z(d.value.loginDate));C({submitForm:async()=>{if(!v||!await v.value.validate())return;_.value=!0;const r=m(!1);try{const u=d.value;g.value==="create"?I.success(V("common.createSuccess")):(await Va(u),I.success(V("common.updateSuccess"))),r.value=!0}finally{_.value=!1}return r.value}}),ea(()=>{(async(r,u)=>{if(Y.value=!0,q.value=V("action."+r),g.value=r,K(),u){_.value=!0;try{d.value=await ba(u)}finally{_.value=!1}}S.value=await ha()})(U.openType,U.obj.id)});const K=()=>{var r;d.value={id:void 0,mobile:void 0,password:void 0,status:void 0,nickname:void 0,avatar:void 0,name:void 0,sex:void 0,areaId:void 0,birthday:void 0,mark:void 0,tagIds:[],groupId:void 0},(r=v.value)==null||r.resetFields()};return(r,u)=>{const n=ua,o=da,s=oa,i=sa,D=ra,T=na,P=fa,X=ma,Z=ia;return la((f(),w(X,{ref_key:"formRef",ref:v,model:t(d),rules:t(B),"label-width":"120px",disabled:b.isDetail,class:ta({view:b.isDetail,"mobile-card":t(W)})},{default:e(()=>[a(i,null,{default:e(()=>[a(s,{span:12},{default:e(()=>[a(o,{label:"\u59D3\u540D",prop:"name"},{default:e(()=>[a(n,{modelValue:t(d).name,"onUpdate:modelValue":u[0]||(u[0]=l=>t(d).name=l),placeholder:"\u8BF7\u8F93\u5165\u59D3\u540D"},null,8,["modelValue"])]),_:1})]),_:1}),a(s,{span:12},{default:e(()=>[a(o,{label:"\u6635\u79F0",prop:"nickname"},{default:e(()=>[a(n,{modelValue:t(d).nickname,"onUpdate:modelValue":u[1]||(u[1]=l=>t(d).nickname=l),placeholder:"\u8BF7\u8F93\u5165\u6635\u79F0"},null,8,["modelValue"])]),_:1})]),_:1})]),_:1}),a(i,null,{default:e(()=>[a(s,{span:12},{default:e(()=>[a(o,{label:"\u72B6\u6001",prop:"status"},{default:e(()=>[a(T,{modelValue:t(d).status,"onUpdate:modelValue":u[2]||(u[2]=l=>t(d).status=l)},{default:e(()=>[(f(!0),M(E,null,N(t(Q)(t(j).COMMON_STATUS),l=>(f(),w(D,{key:l.value,label:l.value},{default:e(()=>[L(O(l.label),1)]),_:2},1032,["label"]))),128))]),_:1},8,["modelValue"])]),_:1})]),_:1}),a(s,{span:12},{default:e(()=>[a(o,{label:"\u624B\u673A\u53F7",prop:"mobile"},{default:e(()=>[a(n,{modelValue:t(d).mobile,"onUpdate:modelValue":u[3]||(u[3]=l=>t(d).mobile=l),placeholder:"\u8BF7\u8F93\u5165\u624B\u673A\u53F7",disabled:"true"},null,8,["modelValue"])]),_:1})]),_:1})]),_:1}),a(i,null,{default:e(()=>[a(s,{span:12},{default:e(()=>[a(o,{label:"\u6240\u5728\u5730",prop:"areaId"},{default:e(()=>[a(P,{modelValue:t(d).areaId,"onUpdate:modelValue":u[4]||(u[4]=l=>t(d).areaId=l),data:t(S),props:t(ka),"render-after-expand":!0},null,8,["modelValue","data","props"])]),_:1})]),_:1}),a(s,{span:12},{default:e(()=>[a(o,{label:"\u90AE\u7BB1",prop:"email"},{default:e(()=>[a(n,{modelValue:t(d).email,"onUpdate:modelValue":u[5]||(u[5]=l=>t(d).email=l),placeholder:"\u8BF7\u8F93\u5165\u90AE\u7BB1"},null,8,["modelValue"])]),_:1})]),_:1})]),_:1}),a(i,null,{default:e(()=>[a(s,{span:12},{default:e(()=>[a(o,{label:"\u6027\u522B",prop:"sex"},{default:e(()=>[a(T,{modelValue:t(d).sex,"onUpdate:modelValue":u[6]||(u[6]=l=>t(d).sex=l)},{default:e(()=>[(f(!0),M(E,null,N(t(Q)(t(j).SYSTEM_USER_SEX),l=>(f(),w(D,{key:l.value,label:l.value},{default:e(()=>[L(O(l.label),1)]),_:2},1032,["label"]))),128))]),_:1},8,["modelValue"])]),_:1})]),_:1}),a(s,{span:12},{default:e(()=>[a(o,{label:"\u521B\u5EFA\u65F6\u95F4"},{default:e(()=>[a(n,{modelValue:t(k),"onUpdate:modelValue":u[7]||(u[7]=l=>c(k)?k.value=l:null),disabled:"true"},null,8,["modelValue"])]),_:1})]),_:1})]),_:1}),a(i,null,{default:e(()=>[a(s,{span:12},{default:e(()=>[a(o,{label:"\u63A8\u8350\u4EBA"},{default:e(()=>[a(n,{modelValue:t(d).ancNickName,"onUpdate:modelValue":u[8]||(u[8]=l=>t(d).ancNickName=l),disabled:"true"},null,8,["modelValue"])]),_:1})]),_:1}),a(s,{span:12},{default:e(()=>[a(o,{label:"\u8EAB\u4EF7"},{default:e(()=>[a(n,{modelValue:t(d).currentMemberWorthLevel,"onUpdate:modelValue":u[9]||(u[9]=l=>t(d).currentMemberWorthLevel=l),disabled:"true"},null,8,["modelValue"])]),_:1})]),_:1})]),_:1}),a(i,null,{default:e(()=>[a(s,{span:12},{default:e(()=>[a(o,{label:"\u79EF\u5206"},{default:e(()=>[a(n,{modelValue:t(y),"onUpdate:modelValue":u[10]||(u[10]=l=>c(y)?y.value=l:null),disabled:"true"},null,8,["modelValue"])]),_:1})]),_:1}),a(s,{span:12},{default:e(()=>[a(o,{label:"\u6700\u540E\u767B\u9646\u65F6\u95F4"},{default:e(()=>[a(n,{modelValue:t(x),"onUpdate:modelValue":u[11]||(u[11]=l=>c(x)?x.value=l:null),disabled:"true"},null,8,["modelValue"])]),_:1})]),_:1})]),_:1}),a(i,null,{default:e(()=>[a(s,{span:24},{default:e(()=>[a(o,{label:"\u5CF0\u503C"},{default:e(()=>[a(n,{modelValue:t(h),"onUpdate:modelValue":u[12]||(u[12]=l=>c(h)?h.value=l:null),disabled:"true"},null,8,["modelValue"])]),_:1})]),_:1})]),_:1})]),_:1},8,["model","rules","disabled","class"])),[[Z,t(_)]])}}}),[["__scopeId","data-v-77675d5e"],["__file","D:/zx/mall-newfeifan-zx-admin/src/views/member/user/components/UserForm.vue"]])});export{ga as __tla,A as default};
|