1 |
- import{d as N,r as o,f as S,l as W,o as u,x as i,w as r,g as t,a as l,n as _,y as j,c as b,F as O,v as h,P as k,t as B,Q as L,z as G,A as J,B as Q,ai as H,aj as K,G as X,D as Y,J as Z,_ as $,__tla as ee}from"./index-3fb48822.js";import{_ as le,__tla as ae}from"./Dialog-7d4425a0.js";import{g as re,__tla as se}from"./index-c00dcc25.js";import{a as te,D as oe,__tla as ue}from"./dict-51415be4.js";import{P as ne,__tla as de}from"./index-92e90c83.js";import{u as ie,__tla as _e}from"./useMessage-b6c78c26.js";let I,me=Promise.all([(()=>{try{return ee}catch{}})(),(()=>{try{return ae}catch{}})(),(()=>{try{return se}catch{}})(),(()=>{try{return ue}catch{}})(),(()=>{try{return de}catch{}})(),(()=>{try{return _e}catch{}})()]).then(async()=>{I=$(N({name:"CrmTransferForm",__name:"TransferForm",emits:["success"],setup(ve,{expose:x,emit:C}){const F=ie(),d=o(!1),c=o(""),m=o(!1),V=o([]),v=o(!1),s=o({id:void 0,newOwnerUserId:void 0,oldOwnerPermissionLevel:void 0}),z=S({newOwnerUserId:[{required:!0,message:"\u65B0\u8D1F\u8D23\u4EBA\u4E0D\u80FD\u4E3A\u7A7A",trigger:"blur"}],oldOwnerPermissionLevel:[{required:!0,message:"\u8001\u8D1F\u8D23\u4EBA\u52A0\u5165\u56E2\u961F\u540E\u7684\u6743\u9650\u7EA7\u522B\u4E0D\u80FD\u4E3A\u7A7A",trigger:"blur"}]}),f=o(),g=o(()=>{});x({open:async(n,a,w)=>{d.value=!0,c.value=n,g.value=w,R(),s.value.id=a}});const D=C,E=async()=>{if(f&&await f.value.validate()){m.value=!0;try{const n=s.value;await g.value(l(n)),F.success(c.value+"\u6210\u529F"),d.value=!1,D("success")}finally{m.value=!1}}},R=()=>{var n;(n=f.value)==null||n.resetFields(),s.value={id:void 0,newOwnerUserId:void 0,oldOwnerPermissionLevel:void 0}};return W(async()=>{V.value=await re()}),(n,a)=>{const w=G,T=J,p=Q,y=H,P=K,q=X,U=Y,A=le,M=Z;return u(),i(A,{modelValue:l(d),"onUpdate:modelValue":a[5]||(a[5]=e=>k(d)?d.value=e:null),title:l(c),width:"30%"},{footer:r(()=>[t(U,{disabled:l(m),type:"primary",onClick:E},{default:r(()=>[_("\u786E \u5B9A")]),_:1},8,["disabled"]),t(U,{onClick:a[4]||(a[4]=e=>d.value=!1)},{default:r(()=>[_("\u53D6 \u6D88")]),_:1})]),default:r(()=>[j((u(),i(q,{ref_key:"formRef",ref:f,model:l(s),rules:l(z),"label-width":"150px"},{default:r(()=>[t(p,{label:"\u9009\u62E9\u65B0\u8D1F\u8D23\u4EBA",prop:"newOwnerUserId"},{default:r(()=>[t(T,{modelValue:l(s).newOwnerUserId,"onUpdate:modelValue":a[0]||(a[0]=e=>l(s).newOwnerUserId=e)},{default:r(()=>[(u(!0),b(O,null,h(l(V),e=>(u(),i(w,{key:e.id,label:e.nickname,value:e.id},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),t(p,{label:"\u8001\u8D1F\u8D23\u4EBA"},{default:r(()=>[t(P,{modelValue:l(v),"onUpdate:modelValue":a[1]||(a[1]=e=>k(v)?v.value=e:null),onChange:a[2]||(a[2]=e=>l(s).oldOwnerPermissionLevel=void 0)},{default:r(()=>[t(y,{label:!1,size:"large"},{default:r(()=>[_("\u79FB\u9664")]),_:1}),t(y,{label:!0,size:"large"},{default:r(()=>[_("\u52A0\u5165\u56E2\u961F")]),_:1})]),_:1},8,["modelValue"])]),_:1}),l(v)?(u(),i(p,{key:0,label:"\u8001\u8D1F\u8D23\u4EBA\u6743\u9650\u7EA7\u522B",prop:"oldOwnerPermissionLevel"},{default:r(()=>[t(P,{modelValue:l(s).oldOwnerPermissionLevel,"onUpdate:modelValue":a[3]||(a[3]=e=>l(s).oldOwnerPermissionLevel=e)},{default:r(()=>[(u(!0),b(O,null,h(l(te)(l(oe).CRM_PERMISSION_LEVEL),e=>(u(),b(O,{key:e.value},[e.value!=l(ne).OWNER?(u(),i(y,{key:0,label:e.value},{default:r(()=>[_(B(e.label),1)]),_:2},1032,["label"])):L("",!0)],64))),128))]),_:1},8,["modelValue"])]),_:1})):L("",!0)]),_:1},8,["model","rules"])),[[M,l(m)]])]),_:1},8,["modelValue","title"])}}}),[["__file","D:/zx/mall-newfeifan-zx-admin/src/views/crm/permission/components/TransferForm.vue"]])});export{me as __tla,I as default};
|