1 |
- import{aA as c,d as q,P as J,r as n,x as M,o as b,C as x,A as u,f as i,a as t,D as h,k as R,a2 as T,a9 as W,V as Z,W as B,J as E,Z as G,_ as H,__tla as I}from"./index-54aa57d8.js";import{_ as K,__tla as L}from"./Dialog-7bb778a5.js";import{u as N,__tla as Q}from"./useMessage-f56cafbb.js";let f,m,k,X=Promise.all([(()=>{try{return I}catch{}})(),(()=>{try{return L}catch{}})(),(()=>{try{return Q}catch{}})()]).then(async()=>{m={getSocialStatusPage:async e=>await c.get({url:"/distri/social-status/page",params:e}),getSocialStatus:async e=>await c.get({url:"/distri/social-status/get?id="+e}),createSocialStatus:async e=>await c.post({url:"/distri/social-status/create",data:e}),updateSocialStatus:async e=>await c.put({url:"/distri/social-status/update",data:e}),deleteSocialStatus:async e=>await c.delete({url:"/distri/social-status/delete?id="+e}),exportSocialStatus:async e=>await c.download({url:"/distri/social-status/export-excel",params:e})},f=H(q({name:"SocialStatusForm",__name:"SocialStatusForm",emits:["success"],setup(e,{expose:F,emit:P}){const{t:p}=J(),y=N(),r=n(!1),w=n(""),d=n(!1),V=n(""),l=n({id:void 0,level:void 0,name:void 0,point:void 0}),U=M({name:[{required:!0,message:"\u8EAB\u4EF7\u540D\u79F0\u4E0D\u80FD\u4E3A\u7A7A",trigger:"blur"}]}),_=n();F({open:async(s,a)=>{if(r.value=!0,w.value=p("action."+s),V.value=s,j(),a){d.value=!0;try{l.value=await m.getSocialStatus(a)}finally{d.value=!1}}}});const z=P,C=async()=>{await _.value.validate(),d.value=!0;try{const s=l.value;V.value==="create"?(await m.createSocialStatus(s),y.success(p("common.createSuccess"))):(await m.updateSocialStatus(s),y.success(p("common.updateSuccess"))),r.value=!1,z("success")}finally{d.value=!1}},j=()=>{var s;l.value={id:void 0,level:void 0,name:void 0,point:void 0},(s=_.value)==null||s.resetFields()};return(s,a)=>{const v=W,S=Z,A=B,g=E,D=K,O=G;return b(),x(D,{title:t(w),modelValue:t(r),"onUpdate:modelValue":a[4]||(a[4]=o=>T(r)?r.value=o:null)},{footer:u(()=>[i(g,{onClick:C,type:"primary",disabled:t(d)},{default:u(()=>[h("\u786E \u5B9A")]),_:1},8,["disabled"]),i(g,{onClick:a[3]||(a[3]=o=>r.value=!1)},{default:u(()=>[h("\u53D6 \u6D88")]),_:1})]),default:u(()=>[R((b(),x(A,{ref_key:"formRef",ref:_,model:t(l),rules:t(U),"label-width":"100px"},{default:u(()=>[i(S,{label:"\u8EAB\u4EF7\u7B49\u7EA7",prop:"level"},{default:u(()=>[i(v,{modelValue:t(l).level,"onUpdate:modelValue":a[0]||(a[0]=o=>t(l).level=o),placeholder:"\u8BF7\u8F93\u5165\u8EAB\u4EF7\u7B49\u7EA7"},null,8,["modelValue"])]),_:1}),i(S,{label:"\u8EAB\u4EF7\u540D\u79F0",prop:"name"},{default:u(()=>[i(v,{modelValue:t(l).name,"onUpdate:modelValue":a[1]||(a[1]=o=>t(l).name=o),placeholder:"\u8BF7\u8F93\u5165\u8EAB\u4EF7\u540D\u79F0"},null,8,["modelValue"])]),_:1}),i(S,{label:"\u5347\u7EA7\u6240\u9700\u70B9\u6570",prop:"point"},{default:u(()=>[i(v,{modelValue:t(l).point,"onUpdate:modelValue":a[2]||(a[2]=o=>t(l).point=o),placeholder:"\u8BF7\u8F93\u5165\u5347\u7EA7\u6240\u9700\u70B9\u6570"},null,8,["modelValue"])]),_:1})]),_:1},8,["model","rules"])),[[O,t(d)]])]),_:1},8,["title","modelValue"])}}}),[["__file","D:/zx/mall-newfeifan-zx-admin/src/views/system/distri/socialstatus/SocialStatusForm.vue"]]),k=Object.freeze(Object.defineProperty({__proto__:null,default:f},Symbol.toStringTag,{value:"Module"}))});export{f as S,X as __tla,m as a,k as b};
|