1 |
- import{d as oa,n as na,u as sa,r as g,f as ia,B as _a,P as ca,o as s,c as D,i as a,w as e,a as l,Q as F,F as B,k as ua,l as i,j as _,C as p,t as ma,a2 as R,U as pa,H as da,D as fa,G as ya,v as ha,J as ba,K as ga,L as wa,M as ka,N as va,_ as xa,__tla as ja}from"./index-afaf388d.js";import{_ as Ca,__tla as Na}from"./index-89d02e79.js";import{E as Sa,a as Ra,b as Oa,__tla as Pa}from"./el-dropdown-item-30ec389e.js";import{_ as Ta,__tla as Ua}from"./DictTag-3a1a976c.js";import{_ as Va,__tla as Aa}from"./ContentWrap-abe0694e.js";import{a as Ja,D as I,__tla as La}from"./dict-0449a0a1.js";import{c as O,__tla as qa}from"./permission-3e9c2554.js";import za,{__tla as Da}from"./JobForm-3fa0f611.js";import Fa,{__tla as Ba}from"./JobDetail-58da66c9.js";import{d as Ia}from"./download-20922b56.js";import{b as Ka,e as Ma,d as Ea,f as Ga,r as Ha,__tla as Xa}from"./index-0064730f.js";import{d}from"./constants-a1da293a.js";import{u as Qa,__tla as Wa}from"./useMessage-a290df31.js";import{__tla as Za}from"./index-0eed91e1.js";import"./color-6e929987.js";import{__tla as Ya}from"./el-card-9c18d881.js";import{__tla as $a}from"./Dialog-82c2009c.js";import{__tla as ae}from"./el-descriptions-item-fe161f2c.js";import{__tla as ee}from"./el-timeline-item-9f306369.js";import{__tla as te}from"./formatTime-42952e7f.js";let K,le=Promise.all([(()=>{try{return ja}catch{}})(),(()=>{try{return Na}catch{}})(),(()=>{try{return Pa}catch{}})(),(()=>{try{return Ua}catch{}})(),(()=>{try{return Aa}catch{}})(),(()=>{try{return La}catch{}})(),(()=>{try{return qa}catch{}})(),(()=>{try{return Da}catch{}})(),(()=>{try{return Ba}catch{}})(),(()=>{try{return Xa}catch{}})(),(()=>{try{return Wa}catch{}})(),(()=>{try{return Za}catch{}})(),(()=>{try{return Ya}catch{}})(),(()=>{try{return $a}catch{}})(),(()=>{try{return ae}catch{}})(),(()=>{try{return ee}catch{}})(),(()=>{try{return te}catch{}})()]).then(async()=>{K=xa(oa({name:"InfraJob",__name:"index",setup(re){const{t:j}=na(),f=Qa(),{push:M}=sa(),C=g(!0),P=g(0),T=g([]),n=ia({pageNo:1,pageSize:10,name:void 0,status:void 0,handlerName:void 0}),U=g(),N=g(!1),y=async()=>{C.value=!0;try{const r=await Ka(n);T.value=r.list,P.value=r.total}finally{C.value=!1}},k=()=>{n.pageNo=1,y()},E=()=>{U.value.resetFields(),k()},G=async()=>{try{await f.exportConfirm(),N.value=!0;const r=await Ma(n);Ia.excel(r,"\u5B9A\u65F6\u4EFB\u52A1.xls")}catch{}finally{N.value=!1}},V=g(),A=(r,o)=>{V.value.open(r,o)},H=async r=>{try{await f.confirm("\u786E\u8BA4\u8981\u7ACB\u5373\u6267\u884C\u4E00\u6B21"+r.name+"?",j("common.reminder")),await Ha(r.id),f.success("\u6267\u884C\u6210\u529F"),await y()}catch{}},J=g(),X=r=>{J.value.open(r)},L=r=>{M(r&&r>0?"/job/job-log?id="+r:"/job/job-log")};return _a(()=>{y()}),(r,o)=>{const q=pa,v=da,Q=fa,W=ya,w=ha,u=ba,Z=ga,z=Va,h=wa,Y=Ta,S=Sa,$=Ra,aa=Oa,ea=ka,ta=Ca,b=ca("hasPermi"),la=va;return s(),D(B,null,[a(z,null,{default:e(()=>[a(Z,{class:"-mb-15px",model:l(n),ref_key:"queryFormRef",ref:U,inline:!0,"label-width":"100px"},{default:e(()=>[a(v,{label:"\u4EFB\u52A1\u540D\u79F0",prop:"name"},{default:e(()=>[a(q,{modelValue:l(n).name,"onUpdate:modelValue":o[0]||(o[0]=t=>l(n).name=t),placeholder:"\u8BF7\u8F93\u5165\u4EFB\u52A1\u540D\u79F0",clearable:"",onKeyup:F(k,["enter"]),class:"!w-240px"},null,8,["modelValue"])]),_:1}),a(v,{label:"\u4EFB\u52A1\u72B6\u6001",prop:"status"},{default:e(()=>[a(W,{modelValue:l(n).status,"onUpdate:modelValue":o[1]||(o[1]=t=>l(n).status=t),placeholder:"\u8BF7\u9009\u62E9\u4EFB\u52A1\u72B6\u6001",clearable:"",class:"!w-240px"},{default:e(()=>[(s(!0),D(B,null,ua(l(Ja)(l(I).INFRA_JOB_STATUS),t=>(s(),i(Q,{key:t.value,label:t.label,value:t.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),a(v,{label:"\u5904\u7406\u5668\u7684\u540D\u5B57",prop:"handlerName"},{default:e(()=>[a(q,{modelValue:l(n).handlerName,"onUpdate:modelValue":o[2]||(o[2]=t=>l(n).handlerName=t),placeholder:"\u8BF7\u8F93\u5165\u5904\u7406\u5668\u7684\u540D\u5B57",clearable:"",onKeyup:F(k,["enter"]),class:"!w-240px"},null,8,["modelValue"])]),_:1}),a(v,null,{default:e(()=>[a(u,{onClick:k},{default:e(()=>[a(w,{icon:"ep:search",class:"mr-5px"}),_(" \u641C\u7D22")]),_:1}),a(u,{onClick:E},{default:e(()=>[a(w,{icon:"ep:refresh",class:"mr-5px"}),_(" \u91CD\u7F6E")]),_:1}),p((s(),i(u,{type:"primary",plain:"",onClick:o[3]||(o[3]=t=>A("create"))},{default:e(()=>[a(w,{icon:"ep:plus",class:"mr-5px"}),_(" \u65B0\u589E ")]),_:1})),[[b,["infra:job:create"]]]),p((s(),i(u,{type:"success",plain:"",onClick:G,loading:l(N)},{default:e(()=>[a(w,{icon:"ep:download",class:"mr-5px"}),_(" \u5BFC\u51FA ")]),_:1},8,["loading"])),[[b,["infra:job:export"]]]),p((s(),i(u,{type:"info",plain:"",onClick:o[4]||(o[4]=t=>L())},{default:e(()=>[a(w,{icon:"ep:zoom-in",class:"mr-5px"}),_(" \u6267\u884C\u65E5\u5FD7 ")]),_:1})),[[b,["infra:job:query"]]])]),_:1})]),_:1},8,["model"])]),_:1}),a(z,null,{default:e(()=>[p((s(),i(ea,{data:l(T)},{default:e(()=>[a(h,{label:"\u4EFB\u52A1\u7F16\u53F7",align:"center",prop:"id"}),a(h,{label:"\u4EFB\u52A1\u540D\u79F0",align:"center",prop:"name"}),a(h,{label:"\u4EFB\u52A1\u72B6\u6001",align:"center",prop:"status"},{default:e(t=>[a(Y,{type:l(I).INFRA_JOB_STATUS,value:t.row.status},null,8,["type","value"])]),_:1}),a(h,{label:"\u5904\u7406\u5668\u7684\u540D\u5B57",align:"center",prop:"handlerName"}),a(h,{label:"\u5904\u7406\u5668\u7684\u53C2\u6570",align:"center",prop:"handlerParam"}),a(h,{label:"CRON \u8868\u8FBE\u5F0F",align:"center",prop:"cronExpression"}),a(h,{label:"\u64CD\u4F5C",align:"center",width:"200"},{default:e(t=>[p((s(),i(u,{type:"primary",link:"",onClick:x=>A("update",t.row.id)},{default:e(()=>[_(" \u4FEE\u6539 ")]),_:2},1032,["onClick"])),[[b,["infra:job:update"]]]),p((s(),i(u,{type:"primary",link:"",onClick:x=>(async c=>{try{const m=c.status===d.STOP?"\u5F00\u542F":"\u5173\u95ED";await f.confirm("\u786E\u8BA4\u8981"+m+'\u5B9A\u65F6\u4EFB\u52A1\u7F16\u53F7\u4E3A"'+c.id+'"\u7684\u6570\u636E\u9879?',j("common.reminder"));const ra=c.status===d.STOP?d.NORMAL:d.STOP;await Ea(c.id,ra),f.success(m+"\u6210\u529F"),await y()}catch{c.status=c.status===d.NORMAL?d.STOP:d.NORMAL}})(t.row)},{default:e(()=>[_(ma(t.row.status===l(d).STOP?"\u5F00\u542F":"\u6682\u505C"),1)]),_:2},1032,["onClick"])),[[b,["infra:job:update"]]]),p((s(),i(u,{type:"danger",link:"",onClick:x=>(async c=>{try{await f.delConfirm(),await Ga(c),f.success(j("common.delSuccess")),await y()}catch{}})(t.row.id)},{default:e(()=>[_(" \u5220\u9664 ")]),_:2},1032,["onClick"])),[[b,["infra:job:delete"]]]),p((s(),i(aa,{onCommand:x=>((c,m)=>{switch(c){case"handleRun":H(m);break;case"openDetail":X(m.id);break;case"handleJobLog":L(m==null?void 0:m.id)}})(x,t.row)},{dropdown:e(()=>[a($,null,{default:e(()=>[l(O)(["infra:job:trigger"])?(s(),i(S,{key:0,command:"handleRun"},{default:e(()=>[_(" \u6267\u884C\u4E00\u6B21 ")]),_:1})):R("",!0),l(O)(["infra:job:query"])?(s(),i(S,{key:1,command:"openDetail"},{default:e(()=>[_(" \u4EFB\u52A1\u8BE6\u7EC6 ")]),_:1})):R("",!0),l(O)(["infra:job:query"])?(s(),i(S,{key:2,command:"handleJobLog"},{default:e(()=>[_(" \u8C03\u5EA6\u65E5\u5FD7 ")]),_:1})):R("",!0)]),_:1})]),default:e(()=>[a(u,{type:"primary",link:""},{default:e(()=>[a(w,{icon:"ep:d-arrow-right"}),_(" \u66F4\u591A")]),_:1})]),_:2},1032,["onCommand"])),[[b,["infra:job:trigger","infra:job:query"]]])]),_:1})]),_:1},8,["data"])),[[la,l(C)]]),a(ta,{total:l(P),page:l(n).pageNo,"onUpdate:page":o[5]||(o[5]=t=>l(n).pageNo=t),limit:l(n).pageSize,"onUpdate:limit":o[6]||(o[6]=t=>l(n).pageSize=t),onPagination:y},null,8,["total","page","limit"])]),_:1}),a(za,{ref_key:"formRef",ref:V,onSuccess:y},null,512),a(Fa,{ref_key:"detailRef",ref:J},null,512)],64)}}}),[["__file","/Users/RuHu.Xu/Desktop/mall-newfeifan-zx-admin/src/views/infra/job/index.vue"]])});export{le as __tla,K as default};
|