UserLevelUpdateForm-50d66a8e.js 3.0 KB

1
  1. import{d as z,P as D,r as _,x as L,o as p,C as v,A as s,f as r,a as e,D as f,k as A,a2 as P,a9 as j,V as q,W as J,J as R,Z as S,_ as W,__tla as Z}from"./index-54aa57d8.js";import{_ as B,__tla as E}from"./Dialog-7bb778a5.js";import{g as G,u as H,__tla as K}from"./index-23663577.js";import M,{__tla as N}from"./MemberLevelSelect-5b234577.js";import{u as O,__tla as Q}from"./useMessage-f56cafbb.js";import{__tla as T}from"./el-avatar-39c72bad.js";import{__tla as X}from"./index-2bd586b6.js";let y,Y=Promise.all([(()=>{try{return Z}catch{}})(),(()=>{try{return E}catch{}})(),(()=>{try{return K}catch{}})(),(()=>{try{return N}catch{}})(),(()=>{try{return Q}catch{}})(),(()=>{try{return T}catch{}})(),(()=>{try{return X}catch{}})()]).then(async()=>{y=W(z({__name:"UserLevelUpdateForm",emits:["success"],setup($,{expose:V,emit:h}){const{t:b}=D(),w=O(),o=_(!1),d=_(!1),a=_({id:void 0,nickname:void 0,levelId:void 0,reason:void 0}),x=L({reason:[{required:!0,message:"\u4FEE\u6539\u539F\u56E0\u4E0D\u80FD\u4E3A\u7A7A",trigger:"blur"}]}),i=_();V({open:async u=>{if(o.value=!0,I(),u){d.value=!0;try{a.value=await G(u)}finally{d.value=!1}}}});const k=h,U=async()=>{if(i&&await i.value.validate()){d.value=!0;try{await H(a.value),w.success(b("common.updateSuccess")),o.value=!1,k("success")}finally{d.value=!1}}},I=()=>{var u;a.value={id:void 0,nickname:void 0,levelId:void 0,reason:void 0},(u=i.value)==null||u.resetFields()};return(u,l)=>{const m=j,n=q,g=J,c=R,C=B,F=S;return p(),v(C,{title:"\u4FEE\u6539\u7528\u6237\u7B49\u7EA7",modelValue:e(o),"onUpdate:modelValue":l[5]||(l[5]=t=>P(o)?o.value=t:null),width:"600"},{footer:s(()=>[r(c,{onClick:U,type:"primary",disabled:e(d)},{default:s(()=>[f("\u786E \u5B9A")]),_:1},8,["disabled"]),r(c,{onClick:l[4]||(l[4]=t=>o.value=!1)},{default:s(()=>[f("\u53D6 \u6D88")]),_:1})]),default:s(()=>[A((p(),v(g,{ref_key:"formRef",ref:i,model:e(a),rules:e(x),"label-width":"100px"},{default:s(()=>[r(n,{label:"\u7528\u6237\u7F16\u53F7",prop:"id"},{default:s(()=>[r(m,{modelValue:e(a).id,"onUpdate:modelValue":l[0]||(l[0]=t=>e(a).id=t),placeholder:"\u8BF7\u8F93\u5165\u7528\u6237\u6635\u79F0",class:"!w-240px",disabled:""},null,8,["modelValue"])]),_:1}),r(n,{label:"\u7528\u6237\u6635\u79F0",prop:"nickname"},{default:s(()=>[r(m,{modelValue:e(a).nickname,"onUpdate:modelValue":l[1]||(l[1]=t=>e(a).nickname=t),placeholder:"\u8BF7\u8F93\u5165\u7528\u6237\u6635\u79F0",class:"!w-240px",disabled:""},null,8,["modelValue"])]),_:1}),r(n,{label:"\u7528\u6237\u7B49\u7EA7",prop:"levelId"},{default:s(()=>[r(M,{modelValue:e(a).levelId,"onUpdate:modelValue":l[2]||(l[2]=t=>e(a).levelId=t)},null,8,["modelValue"])]),_:1}),r(n,{label:"\u4FEE\u6539\u539F\u56E0",prop:"reason"},{default:s(()=>[r(m,{type:"textarea",modelValue:e(a).reason,"onUpdate:modelValue":l[3]||(l[3]=t=>e(a).reason=t),placeholder:"\u8BF7\u8F93\u5165\u4FEE\u6539\u539F\u56E0"},null,8,["modelValue"])]),_:1})]),_:1},8,["model","rules"])),[[F,e(d)]])]),_:1},8,["modelValue"])}}}),[["__file","D:/zx/mall-newfeifan-zx-admin/src/views/member/user/UserLevelUpdateForm.vue"]])});export{Y as __tla,y as default};