UReportDataForm-1ae6c2bb.js 3.7 KB

1
  1. import{aA as c,d as E,P as I,r as i,x as J,o as _,C as y,A as r,f as o,a as e,D as k,k as N,c as W,F as Z,R as G,a2 as H,a9 as K,V as L,S as Q,U as X,W as Y,J as $,Z as aa,_ as ea,__tla as ta}from"./index-286756b9.js";import{_ as la,__tla as ra}from"./Dialog-4c2de357.js";import{_ as oa,__tla as sa}from"./Editor-514f76f8.js";import{a as ua,D as da,__tla as na}from"./dict-82dca549.js";import{u as ca,__tla as ia}from"./useMessage-084b1e70.js";let V,x,U,S,D,ma=Promise.all([(()=>{try{return ta}catch{}})(),(()=>{try{return ra}catch{}})(),(()=>{try{return sa}catch{}})(),(()=>{try{return na}catch{}})(),(()=>{try{return ia}catch{}})()]).then(async()=>{D=async u=>await c.get({url:"/report/ureport-data/page",params:u}),U=async u=>await c.delete({url:"/report/ureport-data/delete?id="+u}),S=async u=>await c.download({url:"/report/ureport-data/export-excel",params:u}),V=ea(E({__name:"UReportDataForm",emits:["success"],setup(u,{expose:F,emit:C}){const{t:v}=I(),g=ca(),d=i(!1),b=i(""),n=i(!1),w=i(""),l=i({id:void 0,name:void 0,status:void 0,content:void 0,remark:void 0}),M=J({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=i();F({open:async(s,a)=>{if(d.value=!0,b.value=v("action."+s),w.value=s,A(),a){n.value=!0;try{l.value=await(async m=>await c.get({url:"/report/ureport-data/get?id="+m}))(a)}finally{n.value=!1}}}});const O=C,R=async()=>{await f.value.validate(),n.value=!0;try{const s=l.value;w.value==="create"?(await(async a=>await c.post({url:"/report/ureport-data/create",data:a}))(s),g.success(v("common.createSuccess"))):(await(async a=>await c.put({url:"/report/ureport-data/update",data:a}))(s),g.success(v("common.updateSuccess"))),d.value=!1,O("success")}finally{n.value=!1}},A=()=>{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,a)=>{const m=K,p=L,z=Q,P=X,T=oa,j=Y,h=$,q=la,B=aa;return _(),y(q,{title:e(b),modelValue:e(d),"onUpdate:modelValue":a[5]||(a[5]=t=>H(d)?d.value=t:null)},{footer:r(()=>[o(h,{onClick:R,type:"primary",disabled:e(n)},{default:r(()=>[k("\u786E \u5B9A")]),_:1},8,["disabled"]),o(h,{onClick:a[4]||(a[4]=t=>d.value=!1)},{default:r(()=>[k("\u53D6 \u6D88")]),_:1})]),default:r(()=>[N((_(),y(j,{ref_key:"formRef",ref:f,model:e(l),rules:e(M),"label-width":"100px"},{default:r(()=>[o(p,{label:"\u6587\u4EF6\u540D\u79F0",prop:"name"},{default:r(()=>[o(m,{modelValue:e(l).name,"onUpdate:modelValue":a[0]||(a[0]=t=>e(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(P,{modelValue:e(l).status,"onUpdate:modelValue":a[1]||(a[1]=t=>e(l).status=t),placeholder:"\u8BF7\u9009\u62E9\u72B6\u6001"},{default:r(()=>[(_(!0),W(Z,null,G(e(ua)(e(da).COMMON_STATUS),t=>(_(),y(z,{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(T,{modelValue:e(l).content,"onUpdate:modelValue":a[2]||(a[2]=t=>e(l).content=t),height:"150px"},null,8,["modelValue"])]),_:1}),o(p,{label:"\u5907\u6CE8",prop:"remark"},{default:r(()=>[o(m,{modelValue:e(l).remark,"onUpdate:modelValue":a[3]||(a[3]=t=>e(l).remark=t),placeholder:"\u8BF7\u8F93\u5165\u5907\u6CE8"},null,8,["modelValue"])]),_:1})]),_:1},8,["model","rules"])),[[B,e(n)]])]),_:1},8,["title","modelValue"])}}}),[["__file","D:/zx/mall-newfeifan-zx-admin/src/views/report/ureport/UReportDataForm.vue"]]),x=Object.freeze(Object.defineProperty({__proto__:null,default:V},Symbol.toStringTag,{value:"Module"}))});export{V as U,ma as __tla,x as a,U as d,S as e,D as g};