index-64f064a0.js 7.6 KB

1
  1. import{d as oa,P as na,u as sa,r as g,x as ia,b as _a,a4 as ca,o as s,c as F,f as a,A as e,a as l,a5 as L,F as E,R as ua,C as i,D as _,k as p,E as ma,a3 as R,a9 as pa,V as da,S as fa,U as ya,Q as ba,J as ha,W as ga,X as wa,Y as ka,Z as xa,_ as va,__tla as ja}from"./index-286756b9.js";import{_ as Ca,__tla as Na}from"./index-ed6c67a8.js";import{E as Sa,a as Ra,b as Oa,__tla as Pa}from"./el-dropdown-item-4563de35.js";import{_ as Ta,__tla as Va}from"./DictTag-f72b04ca.js";import{_ as Aa,__tla as Ua}from"./ContentWrap-83998678.js";import{a as za,D as I,__tla as Ja}from"./dict-82dca549.js";import{c as O,__tla as qa}from"./permission-0c6eb6e9.js";import Da,{__tla as Fa}from"./JobForm-7b4aa8fb.js";import La,{__tla as Ea}from"./JobDetail-d67dab67.js";import{d as Ia}from"./download-20922b56.js";import{b as Ba,e as Ma,d as Ka,f as Qa,r as Xa,__tla as Za}from"./index-aec7b4a8.js";import{c as d}from"./constants-637baed6.js";import{u as Ha,__tla as Wa}from"./useMessage-084b1e70.js";import{__tla as Ya}from"./index-fb47c94c.js";import"./color-6e929987.js";import{__tla as Ga}from"./el-card-d3d5a654.js";import{__tla as $a}from"./Dialog-4c2de357.js";import{__tla as ae}from"./el-descriptions-item-63e151c1.js";import{__tla as ee}from"./el-timeline-item-c7efc654.js";import{__tla as te}from"./formatTime-83e416ef.js";let B,le=Promise.all([(()=>{try{return ja}catch{}})(),(()=>{try{return Na}catch{}})(),(()=>{try{return Pa}catch{}})(),(()=>{try{return Va}catch{}})(),(()=>{try{return Ua}catch{}})(),(()=>{try{return Ja}catch{}})(),(()=>{try{return qa}catch{}})(),(()=>{try{return Fa}catch{}})(),(()=>{try{return Ea}catch{}})(),(()=>{try{return Za}catch{}})(),(()=>{try{return Wa}catch{}})(),(()=>{try{return Ya}catch{}})(),(()=>{try{return Ga}catch{}})(),(()=>{try{return $a}catch{}})(),(()=>{try{return ae}catch{}})(),(()=>{try{return ee}catch{}})(),(()=>{try{return te}catch{}})()]).then(async()=>{B=va(oa({name:"InfraJob",__name:"index",setup(re){const{t:j}=na(),f=Ha(),{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}),V=g(),N=g(!1),y=async()=>{C.value=!0;try{const r=await Ba(n);T.value=r.list,P.value=r.total}finally{C.value=!1}},k=()=>{n.pageNo=1,y()},K=()=>{V.value.resetFields(),k()},Q=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}},A=g(),U=(r,o)=>{A.value.open(r,o)},X=async r=>{try{await f.confirm("\u786E\u8BA4\u8981\u7ACB\u5373\u6267\u884C\u4E00\u6B21"+r.name+"?",j("common.reminder")),await Xa(r.id),f.success("\u6267\u884C\u6210\u529F"),await y()}catch{}},z=g(),Z=r=>{z.value.open(r)},J=r=>{M(r&&r>0?"/job/job-log?id="+r:"/job/job-log")};return _a(()=>{y()}),(r,o)=>{const q=pa,x=da,H=fa,W=ya,w=ba,u=ha,Y=ga,D=Aa,b=wa,G=Ta,S=Sa,$=Ra,aa=Oa,ea=ka,ta=Ca,h=ca("hasPermi"),la=xa;return s(),F(E,null,[a(D,null,{default:e(()=>[a(Y,{class:"-mb-15px",model:l(n),ref_key:"queryFormRef",ref:V,inline:!0,"label-width":"100px"},{default:e(()=>[a(x,{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:L(k,["enter"]),class:"!w-240px"},null,8,["modelValue"])]),_:1}),a(x,{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),F(E,null,ua(l(za)(l(I).INFRA_JOB_STATUS),t=>(s(),i(H,{key:t.value,label:t.label,value:t.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),a(x,{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:L(k,["enter"]),class:"!w-240px"},null,8,["modelValue"])]),_:1}),a(x,null,{default:e(()=>[a(u,{onClick:k},{default:e(()=>[a(w,{icon:"ep:search",class:"mr-5px"}),_(" \u641C\u7D22")]),_:1}),a(u,{onClick:K},{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=>U("create"))},{default:e(()=>[a(w,{icon:"ep:plus",class:"mr-5px"}),_(" \u65B0\u589E ")]),_:1})),[[h,["infra:job:create"]]]),p((s(),i(u,{type:"success",plain:"",onClick:Q,loading:l(N)},{default:e(()=>[a(w,{icon:"ep:download",class:"mr-5px"}),_(" \u5BFC\u51FA ")]),_:1},8,["loading"])),[[h,["infra:job:export"]]]),p((s(),i(u,{type:"info",plain:"",onClick:o[4]||(o[4]=t=>J())},{default:e(()=>[a(w,{icon:"ep:zoom-in",class:"mr-5px"}),_(" \u6267\u884C\u65E5\u5FD7 ")]),_:1})),[[h,["infra:job:query"]]])]),_:1})]),_:1},8,["model"])]),_:1}),a(D,null,{default:e(()=>[p((s(),i(ea,{data:l(T)},{default:e(()=>[a(b,{label:"\u4EFB\u52A1\u7F16\u53F7",align:"center",prop:"id"}),a(b,{label:"\u4EFB\u52A1\u540D\u79F0",align:"center",prop:"name"}),a(b,{label:"\u4EFB\u52A1\u72B6\u6001",align:"center",prop:"status"},{default:e(t=>[a(G,{type:l(I).INFRA_JOB_STATUS,value:t.row.status},null,8,["type","value"])]),_:1}),a(b,{label:"\u5904\u7406\u5668\u7684\u540D\u5B57",align:"center",prop:"handlerName"}),a(b,{label:"\u5904\u7406\u5668\u7684\u53C2\u6570",align:"center",prop:"handlerParam"}),a(b,{label:"CRON \u8868\u8FBE\u5F0F",align:"center",prop:"cronExpression"}),a(b,{label:"\u64CD\u4F5C",align:"center",width:"200"},{default:e(t=>[p((s(),i(u,{type:"primary",link:"",onClick:v=>U("update",t.row.id)},{default:e(()=>[_(" \u4FEE\u6539 ")]),_:2},1032,["onClick"])),[[h,["infra:job:update"]]]),p((s(),i(u,{type:"primary",link:"",onClick:v=>(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 Ka(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"])),[[h,["infra:job:update"]]]),p((s(),i(u,{type:"danger",link:"",onClick:v=>(async c=>{try{await f.delConfirm(),await Qa(c),f.success(j("common.delSuccess")),await y()}catch{}})(t.row.id)},{default:e(()=>[_(" \u5220\u9664 ")]),_:2},1032,["onClick"])),[[h,["infra:job:delete"]]]),p((s(),i(aa,{onCommand:v=>((c,m)=>{switch(c){case"handleRun":X(m);break;case"openDetail":Z(m.id);break;case"handleJobLog":J(m==null?void 0:m.id)}})(v,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"])),[[h,["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(Da,{ref_key:"formRef",ref:A,onSuccess:y},null,512),a(La,{ref_key:"detailRef",ref:z},null,512)],64)}}}),[["__file","D:/zx/mall-newfeifan-zx-admin/src/views/infra/job/index.vue"]])});export{le as __tla,B as default};