1 |
- import{d as Y,B as z,r as s,f as G,o as i,j as c,w as r,i as o,a,m as v,D as H,c as U,F as x,C as w,t as S,R as K,X as L,I as P,ai as W,aj as $,p as Q,J as Z,q as aa,M as ea,__tla as la}from"./index-1e808f2e.js";import{_ as ta,__tla as oa}from"./Dialog-f44f9d78.js";import{E as ra,__tla as da}from"./el-tree-select-e8e05888.js";import{_ as ua,__tla as sa}from"./UploadImg-3538b5a5.js";import{a as M,D as C,__tla as ma}from"./dict-a31cb4ba.js";import{g as _a,u as ia,__tla as pa}from"./index-2da6fa30.js";import{g as na,__tla as ca}from"./index-f40ed4f7.js";import{d as va}from"./tree-fd3a041e.js";import{_ as fa,__tla as Va}from"./MemberTagSelect.vue_vue_type_script_setup_true_lang-aa9ad730.js";import{_ as ba,__tla as ya}from"./MemberGroupSelect.vue_vue_type_script_setup_true_lang-76785b04.js";import{u as ha,__tla as ga}from"./useMessage-5f9e8917.js";import"./_plugin-vue_export-helper-1b428a4d.js";import{__tla as Ia}from"./index-b59955b6.js";import{__tla as ka}from"./el-image-viewer-dddb6285.js";import{__tla as Ua}from"./TagForm.vue_vue_type_script_setup_true_lang-3babb22e.js";import{__tla as xa}from"./index-a209ecc6.js";let E,wa=Promise.all([(()=>{try{return la}catch{}})(),(()=>{try{return oa}catch{}})(),(()=>{try{return da}catch{}})(),(()=>{try{return sa}catch{}})(),(()=>{try{return ma}catch{}})(),(()=>{try{return pa}catch{}})(),(()=>{try{return ca}catch{}})(),(()=>{try{return Va}catch{}})(),(()=>{try{return ya}catch{}})(),(()=>{try{return ga}catch{}})(),(()=>{try{return Ia}catch{}})(),(()=>{try{return ka}catch{}})(),(()=>{try{return Ua}catch{}})(),(()=>{try{return xa}catch{}})()]).then(async()=>{E=Y({__name:"UserForm",emits:["success"],setup(Sa,{expose:F,emit:R}){const{t:f}=z(),V=ha(),m=s(!1),b=s(""),_=s(!1),y=s(""),t=s({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}),T=G({mobile:[{required:!0,message:"\u624B\u673A\u53F7\u4E0D\u80FD\u4E3A\u7A7A",trigger:"blur"}],status:[{required:!0,message:"\u72B6\u6001\u4E0D\u80FD\u4E3A\u7A7A",trigger:"blur"}]}),p=s(),h=s([]);F({open:async(u,l)=>{if(m.value=!0,b.value=f("action."+u),y.value=u,X(),l){_.value=!0;try{t.value=await _a(l)}finally{_.value=!1}}h.value=await na()}});const q=R,D=async()=>{if(p&&await p.value.validate()){_.value=!0;try{const u=t.value;y.value==="create"?V.success(f("common.createSuccess")):(await ia(u),V.success(f("common.updateSuccess"))),m.value=!1,q("success")}finally{_.value=!1}}},X=()=>{var u;t.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},(u=p.value)==null||u.resetFields()};return(u,l)=>{const n=L,d=P,g=W,I=$,j=ua,A=Q,J=ra,O=Z,k=aa,B=ta,N=ea;return i(),c(B,{title:a(b),modelValue:a(m),"onUpdate:modelValue":l[12]||(l[12]=e=>K(m)?m.value=e:null)},{footer:r(()=>[o(k,{onClick:D,type:"primary",disabled:a(_)},{default:r(()=>[v("\u786E \u5B9A")]),_:1},8,["disabled"]),o(k,{onClick:l[11]||(l[11]=e=>m.value=!1)},{default:r(()=>[v("\u53D6 \u6D88")]),_:1})]),default:r(()=>[H((i(),c(O,{ref_key:"formRef",ref:p,model:a(t),rules:a(T),"label-width":"100px"},{default:r(()=>[o(d,{label:"\u624B\u673A\u53F7",prop:"mobile"},{default:r(()=>[o(n,{modelValue:a(t).mobile,"onUpdate:modelValue":l[0]||(l[0]=e=>a(t).mobile=e),placeholder:"\u8BF7\u8F93\u5165\u624B\u673A\u53F7"},null,8,["modelValue"])]),_:1}),o(d,{label:"\u72B6\u6001",prop:"status"},{default:r(()=>[o(I,{modelValue:a(t).status,"onUpdate:modelValue":l[1]||(l[1]=e=>a(t).status=e)},{default:r(()=>[(i(!0),U(x,null,w(a(M)(a(C).COMMON_STATUS),e=>(i(),c(g,{key:e.value,label:e.value},{default:r(()=>[v(S(e.label),1)]),_:2},1032,["label"]))),128))]),_:1},8,["modelValue"])]),_:1}),o(d,{label:"\u7528\u6237\u6635\u79F0",prop:"nickname"},{default:r(()=>[o(n,{modelValue:a(t).nickname,"onUpdate:modelValue":l[2]||(l[2]=e=>a(t).nickname=e),placeholder:"\u8BF7\u8F93\u5165\u7528\u6237\u6635\u79F0"},null,8,["modelValue"])]),_:1}),o(d,{label:"\u5934\u50CF",prop:"avatar"},{default:r(()=>[o(j,{modelValue:a(t).avatar,"onUpdate:modelValue":l[3]||(l[3]=e=>a(t).avatar=e),limit:1,"is-show-tip":!1},null,8,["modelValue"])]),_:1}),o(d,{label:"\u771F\u5B9E\u540D\u5B57",prop:"name"},{default:r(()=>[o(n,{modelValue:a(t).name,"onUpdate:modelValue":l[4]||(l[4]=e=>a(t).name=e),placeholder:"\u8BF7\u8F93\u5165\u771F\u5B9E\u540D\u5B57"},null,8,["modelValue"])]),_:1}),o(d,{label:"\u7528\u6237\u6027\u522B",prop:"sex"},{default:r(()=>[o(I,{modelValue:a(t).sex,"onUpdate:modelValue":l[5]||(l[5]=e=>a(t).sex=e)},{default:r(()=>[(i(!0),U(x,null,w(a(M)(a(C).SYSTEM_USER_SEX),e=>(i(),c(g,{key:e.value,label:e.value},{default:r(()=>[v(S(e.label),1)]),_:2},1032,["label"]))),128))]),_:1},8,["modelValue"])]),_:1}),o(d,{label:"\u51FA\u751F\u65E5\u671F",prop:"birthday"},{default:r(()=>[o(A,{modelValue:a(t).birthday,"onUpdate:modelValue":l[6]||(l[6]=e=>a(t).birthday=e),type:"date","value-format":"x",placeholder:"\u9009\u62E9\u51FA\u751F\u65E5\u671F"},null,8,["modelValue"])]),_:1}),o(d,{label:"\u6240\u5728\u5730",prop:"areaId"},{default:r(()=>[o(J,{modelValue:a(t).areaId,"onUpdate:modelValue":l[7]||(l[7]=e=>a(t).areaId=e),data:a(h),props:a(va),"render-after-expand":!0},null,8,["modelValue","data","props"])]),_:1}),o(d,{label:"\u7528\u6237\u6807\u7B7E",prop:"tagIds"},{default:r(()=>[o(fa,{modelValue:a(t).tagIds,"onUpdate:modelValue":l[8]||(l[8]=e=>a(t).tagIds=e),"show-add":""},null,8,["modelValue"])]),_:1}),o(d,{label:"\u7528\u6237\u5206\u7EC4",prop:"groupId"},{default:r(()=>[o(ba,{modelValue:a(t).groupId,"onUpdate:modelValue":l[9]||(l[9]=e=>a(t).groupId=e)},null,8,["modelValue"])]),_:1}),o(d,{label:"\u4F1A\u5458\u5907\u6CE8",prop:"mark"},{default:r(()=>[o(n,{type:"textarea",modelValue:a(t).mark,"onUpdate:modelValue":l[10]||(l[10]=e=>a(t).mark=e),placeholder:"\u8BF7\u8F93\u5165\u4F1A\u5458\u5907\u6CE8"},null,8,["modelValue"])]),_:1})]),_:1},8,["model","rules"])),[[N,a(_)]])]),_:1},8,["title","modelValue"])}}})});export{wa as __tla,E as default};
|