1 |
- import{ap as i,d as G,n as P,r as c,f as E,o as _,l as y,w as r,i as o,a,j as U,C as J,c as K,F as X,k as B,y as I,U as L,H as Q,D as W,G as Y,K as Z,J as $,N as ee,_ as ae,__tla as te}from"./index-afaf388d.js";import{_ as le,__tla as re}from"./Dialog-82c2009c.js";import{_ as oe,__tla as se}from"./Editor-7453cc9a.js";import{a as ue,D as de,__tla as ne}from"./dict-0449a0a1.js";import{u as ie,__tla as ce}from"./useMessage-a290df31.js";let g,k,x,S,F,me=Promise.all([(()=>{try{return te}catch{}})(),(()=>{try{return re}catch{}})(),(()=>{try{return se}catch{}})(),(()=>{try{return ne}catch{}})(),(()=>{try{return ce}catch{}})()]).then(async()=>{F=async u=>await i.get({url:"/report/ureport-data/page",params:u}),x=async u=>await i.delete({url:"/report/ureport-data/delete?id="+u}),S=async u=>await i.download({url:"/report/ureport-data/export-excel",params:u}),g=ae(G({__name:"UReportDataForm",emits:["success"],setup(u,{expose:C,emit:M}){const{t:v}=P(),w=ie(),d=c(!1),V=c(""),n=c(!1),b=c(""),l=c({id:void 0,name:void 0,status:void 0,content:void 0,remark:void 0}),O=E({name:[{required:!0,message:"\u6587\u4EF6\u540D\u79F0\u4E0D\u80FD\u4E3A\u7A7A",trigger:"blur"}],status:[{required:!0,message:"\u72B6\u6001\u4E0D\u80FD\u4E3A\u7A7A",trigger:"change"}]}),f=c();C({open:async(s,e)=>{if(d.value=!0,V.value=v("action."+s),b.value=s,j(),e){n.value=!0;try{l.value=await(async m=>await i.get({url:"/report/ureport-data/get?id="+m}))(e)}finally{n.value=!1}}}});const R=M,D=async()=>{await f.value.validate(),n.value=!0;try{const s=l.value;b.value==="create"?(await(async e=>await i.post({url:"/report/ureport-data/create",data:e}))(s),w.success(v("common.createSuccess"))):(await(async e=>await i.put({url:"/report/ureport-data/update",data:e}))(s),w.success(v("common.updateSuccess"))),d.value=!1,R("success")}finally{n.value=!1}},j=()=>{var s;l.value={id:void 0,name:void 0,status:void 0,content:void 0,remark:void 0},(s=f.value)==null||s.resetFields()};return(s,e)=>{const m=L,p=Q,q=W,T=Y,z=oe,H=Z,h=$,N=le,A=ee;return _(),y(N,{title:a(V),modelValue:a(d),"onUpdate:modelValue":e[5]||(e[5]=t=>I(d)?d.value=t:null)},{footer:r(()=>[o(h,{onClick:D,type:"primary",disabled:a(n)},{default:r(()=>[U("\u786E \u5B9A")]),_:1},8,["disabled"]),o(h,{onClick:e[4]||(e[4]=t=>d.value=!1)},{default:r(()=>[U("\u53D6 \u6D88")]),_:1})]),default:r(()=>[J((_(),y(H,{ref_key:"formRef",ref:f,model:a(l),rules:a(O),"label-width":"100px"},{default:r(()=>[o(p,{label:"\u6587\u4EF6\u540D\u79F0",prop:"name"},{default:r(()=>[o(m,{modelValue:a(l).name,"onUpdate:modelValue":e[0]||(e[0]=t=>a(l).name=t),placeholder:"\u8BF7\u8F93\u5165\u6587\u4EF6\u540D\u79F0"},null,8,["modelValue"])]),_:1}),o(p,{label:"\u72B6\u6001",prop:"status"},{default:r(()=>[o(T,{modelValue:a(l).status,"onUpdate:modelValue":e[1]||(e[1]=t=>a(l).status=t),placeholder:"\u8BF7\u9009\u62E9\u72B6\u6001"},{default:r(()=>[(_(!0),K(X,null,B(a(ue)(a(de).COMMON_STATUS),t=>(_(),y(q,{key:t.value,label:t.label,value:t.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),o(p,{label:"\u6587\u4EF6\u5185\u5BB9",prop:"content"},{default:r(()=>[o(z,{modelValue:a(l).content,"onUpdate:modelValue":e[2]||(e[2]=t=>a(l).content=t),height:"150px"},null,8,["modelValue"])]),_:1}),o(p,{label:"\u5907\u6CE8",prop:"remark"},{default:r(()=>[o(m,{modelValue:a(l).remark,"onUpdate:modelValue":e[3]||(e[3]=t=>a(l).remark=t),placeholder:"\u8BF7\u8F93\u5165\u5907\u6CE8"},null,8,["modelValue"])]),_:1})]),_:1},8,["model","rules"])),[[A,a(n)]])]),_:1},8,["title","modelValue"])}}}),[["__file","/Users/RuHu.Xu/Desktop/mall-newfeifan-zx-admin/src/views/report/ureport/UReportDataForm.vue"]]),k=Object.freeze(Object.defineProperty({__proto__:null,default:g},Symbol.toStringTag,{value:"Module"}))});export{g as U,me as __tla,k as a,x as d,S as e,F as g};
|