1 |
- import{d as oa,h as na,u as sa,r as g,e as ia,k as _a,P as ca,o as s,c as L,f as a,w as e,a as l,Q as B,F as D,n as ua,q as i,m as _,v as p,t as ma,O,U as pa,z as da,x as fa,y as ya,_ as ha,B as ba,C as ga,D as wa,G as ka,H as va,__tla as xa}from"./index-2eab2d23.js";import{_ as Ca,__tla as ja}from"./index.vue_vue_type_script_setup_true_lang-5730b053.js";import{E as Na,a as Sa,b as Oa,__tla as Ra}from"./el-dropdown-item-ca87bcd9.js";import{_ as Pa,__tla as Ta}from"./DictTag.vue_vue_type_script_lang-cb1e47ff.js";import{_ as Va,__tla as Ua}from"./ContentWrap.vue_vue_type_script_setup_true_lang-5a63038a.js";import{a as Aa,D as M,__tla as qa}from"./dict-1ad71b6f.js";import{c as R,__tla as za}from"./permission-4b11372e.js";import{_ as Fa,__tla as Ja}from"./JobForm.vue_vue_type_script_setup_true_lang-66e664f4.js";import{_ as La,__tla as Ba}from"./JobDetail.vue_vue_type_script_setup_true_lang-63d0b33e.js";import{d as Da}from"./download-20922b56.js";import{b as Ma,e as Ea,d as Ia,f as Ha,r as Ka,__tla as Qa}from"./index-da1fd22b.js";import{d}from"./constants-40f13f5e.js";import{u as Ga,__tla as Wa}from"./useMessage-171aa63e.js";import{__tla as Ya}from"./index-cc63c3c4.js";import"./color-6e929987.js";import{__tla as Xa}from"./el-card-c558f0ec.js";import{__tla as Za}from"./Dialog-c2716df6.js";import"./_plugin-vue_export-helper-1b428a4d.js";import{__tla as $a}from"./el-descriptions-item-fd42286f.js";import{__tla as ae}from"./el-timeline-item-eddfdd2c.js";import{__tla as ee}from"./formatTime-41155543.js";let E,te=Promise.all([(()=>{try{return xa}catch{}})(),(()=>{try{return ja}catch{}})(),(()=>{try{return Ra}catch{}})(),(()=>{try{return Ta}catch{}})(),(()=>{try{return Ua}catch{}})(),(()=>{try{return qa}catch{}})(),(()=>{try{return za}catch{}})(),(()=>{try{return Ja}catch{}})(),(()=>{try{return Ba}catch{}})(),(()=>{try{return Qa}catch{}})(),(()=>{try{return Wa}catch{}})(),(()=>{try{return Ya}catch{}})(),(()=>{try{return Xa}catch{}})(),(()=>{try{return Za}catch{}})(),(()=>{try{return $a}catch{}})(),(()=>{try{return ae}catch{}})(),(()=>{try{return ee}catch{}})()]).then(async()=>{E=oa({name:"InfraJob",__name:"index",setup(le){const{t:C}=na(),f=Ga(),{push:I}=sa(),j=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()=>{j.value=!0;try{const r=await Ma(n);T.value=r.list,P.value=r.total}finally{j.value=!1}},k=()=>{n.pageNo=1,y()},H=()=>{V.value.resetFields(),k()},K=async()=>{try{await f.exportConfirm(),N.value=!0;const r=await Ea(n);Da.excel(r,"\u5B9A\u65F6\u4EFB\u52A1.xls")}catch{}finally{N.value=!1}},U=g(),A=(r,o)=>{U.value.open(r,o)},Q=async r=>{try{await f.confirm("\u786E\u8BA4\u8981\u7ACB\u5373\u6267\u884C\u4E00\u6B21"+r.name+"?",C("common.reminder")),await Ka(r.id),f.success("\u6267\u884C\u6210\u529F"),await y()}catch{}},q=g(),G=r=>{q.value.open(r)},z=r=>{I(r&&r>0?"/job/job-log?id="+r:"/job/job-log")};return _a(()=>{y()}),(r,o)=>{const F=pa,v=da,W=fa,Y=ya,w=ha,u=ba,X=ga,J=Va,h=wa,Z=Pa,S=Na,$=Sa,aa=Oa,ea=ka,ta=Ca,b=ca("hasPermi"),la=va;return s(),L(D,null,[a(J,null,{default:e(()=>[a(X,{class:"-mb-15px",model:l(n),ref_key:"queryFormRef",ref:V,inline:!0,"label-width":"100px"},{default:e(()=>[a(v,{label:"\u4EFB\u52A1\u540D\u79F0",prop:"name"},{default:e(()=>[a(F,{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:B(k,["enter"]),class:"!w-240px"},null,8,["modelValue"])]),_:1}),a(v,{label:"\u4EFB\u52A1\u72B6\u6001",prop:"status"},{default:e(()=>[a(Y,{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),L(D,null,ua(l(Aa)(l(M).INFRA_JOB_STATUS),t=>(s(),i(W,{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(F,{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:B(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:H},{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:K,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=>z())},{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(J,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(Z,{type:l(M).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?',C("common.reminder"));const ra=c.status===d.STOP?d.NORMAL:d.STOP;await Ia(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 Ha(c),f.success(C("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":Q(m);break;case"openDetail":G(m.id);break;case"handleJobLog":z(m==null?void 0:m.id)}})(x,t.row)},{dropdown:e(()=>[a($,null,{default:e(()=>[l(R)(["infra:job:trigger"])?(s(),i(S,{key:0,command:"handleRun"},{default:e(()=>[_(" \u6267\u884C\u4E00\u6B21 ")]),_:1})):O("",!0),l(R)(["infra:job:query"])?(s(),i(S,{key:1,command:"openDetail"},{default:e(()=>[_(" \u4EFB\u52A1\u8BE6\u7EC6 ")]),_:1})):O("",!0),l(R)(["infra:job:query"])?(s(),i(S,{key:2,command:"handleJobLog"},{default:e(()=>[_(" \u8C03\u5EA6\u65E5\u5FD7 ")]),_:1})):O("",!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(j)]]),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(Fa,{ref_key:"formRef",ref:U,onSuccess:y},null,512),a(La,{ref_key:"detailRef",ref:q},null,512)],64)}}})});export{te as __tla,E as default};
|