1 |
- import{ar as c,d as q,i as B,r as n,f as G,o as b,x,w as u,g as i,a as t,n as h,y as J,P as R,W as T,B as W,G as A,D as E,J as H,_ as I,__tla as K}from"./index-b362e1d5.js";import{_ as L,__tla as N}from"./Dialog-71bebaff.js";import{u as Q,__tla as X}from"./useMessage-7c1dd10e.js";let f,m,F,Y=Promise.all([(()=>{try{return K}catch{}})(),(()=>{try{return N}catch{}})(),(()=>{try{return X}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=I(q({name:"SocialStatusForm",__name:"SocialStatusForm",emits:["success"],setup(e,{expose:P,emit:U}){const{t:p}=B(),y=Q(),r=n(!1),w=n(""),d=n(!1),g=n(""),l=n({id:void 0,level:void 0,name:void 0,point:void 0}),k=G({name:[{required:!0,message:"\u8EAB\u4EF7\u540D\u79F0\u4E0D\u80FD\u4E3A\u7A7A",trigger:"blur"}]}),_=n();P({open:async(s,a)=>{if(r.value=!0,w.value=p("action."+s),g.value=s,C(),a){d.value=!0;try{l.value=await m.getSocialStatus(a)}finally{d.value=!1}}}});const z=U,j=async()=>{await _.value.validate(),d.value=!0;try{const s=l.value;g.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}},C=()=>{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=T,S=W,D=A,V=E,M=L,O=H;return b(),x(M,{title:t(w),modelValue:t(r),"onUpdate:modelValue":a[4]||(a[4]=o=>R(r)?r.value=o:null)},{footer:u(()=>[i(V,{onClick:j,type:"primary",disabled:t(d)},{default:u(()=>[h("\u786E \u5B9A")]),_:1},8,["disabled"]),i(V,{onClick:a[3]||(a[3]=o=>r.value=!1)},{default:u(()=>[h("\u53D6 \u6D88")]),_:1})]),default:u(()=>[J((b(),x(D,{ref_key:"formRef",ref:_,model:t(l),rules:t(k),"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"]]),F=Object.freeze(Object.defineProperty({__proto__:null,default:f},Symbol.toStringTag,{value:"Module"}))});export{f as S,Y as __tla,m as a,F as b};
|