2 lines
7.4 KiB
JavaScript
2 lines
7.4 KiB
JavaScript
|
import{Q as e,G as a,r as l,a as o,I as t,U as n,d as u,T as d,o as r,c as s,K as i,M as p,f as m,e as c,w as b,j as f,V as g,W as v,k as _,J as h,n as j,l as w,A as y,m as k,v as V}from"./index.e5c8b0d6.js";import{g as x}from"./job.fcbfb179.js";const N={class:"app-container"},C={key:0},S={key:1},T={class:"dialog-footer"},G=a({name:"JobLog"}),U=Object.assign(G,{setup(a){const{proxy:G}=V(),{sys_common_status:U,sys_job_group:D}=G.useDict("sys_common_status","sys_job_group"),L=l([]),I=l(!1),$=l(!0),q=l(!0),M=l([]),P=l(!0),R=l(0),Y=l([]),z=o(),K=t({form:{},queryParams:{pageNum:1,pageSize:10,dictName:void 0,dictType:void 0,status:void 0}}),{queryParams:J,form:O,rules:Q}=n(K);function A(){var a;$.value=!0,(a=G.addDateRange(J.value,Y.value),e({url:"/monitor/jobLog/list",method:"get",params:a})).then((e=>{L.value=e.rows,R.value=e.total,$.value=!1}))}function F(){G.$tab.closeOpenPage({path:"/monitor/job"})}function W(){J.value.pageNum=1,A()}function B(){Y.value=[],G.resetForm("queryRef"),W()}function E(e){M.value=e.map((e=>e.jobLogId)),P.value=!e.length}function H(a){G.$modal.confirm('是否确认删除调度日志编号为"'+M.value+'"的数据项?').then((function(){return a=M.value,e({url:"/monitor/jobLog/"+a,method:"delete"});var a})).then((()=>{A(),G.$modal.msgSuccess("删除成功")})).catch((()=>{}))}function X(){G.$modal.confirm("是否确认清空所有调度日志数据项?").then((function(){return e({url:"/monitor/jobLog/clean",method:"delete"})})).then((()=>{A(),G.$modal.msgSuccess("清空成功")})).catch((()=>{}))}function Z(){G.download("monitor/jobLog/export",{...J.value},`job_log_${(new Date).getTime()}.xlsx`)}return(()=>{const e=z.params&&z.params.jobId;void 0!==e&&0!=e?x(e).then((e=>{J.value.jobName=e.data.jobName,J.value.jobGroup=e.data.jobGroup,A()})):A()})(),A(),(e,a)=>{const l=u("el-input"),o=u("el-form-item"),t=u("el-option"),n=u("el-select"),V=u("el-date-picker"),x=u("el-button"),G=u("el-form"),M=u("el-col"),z=u("right-toolbar"),K=u("el-row"),Q=u("el-table-column"),ee=u("dict-tag"),ae=u("el-table"),le=u("pagination"),oe=u("el-dialog"),te=d("hasPermi"),ne=d("loading");return r(),s("div",N,[i(c(G,{model:m(J),ref:"queryRef",inline:!0,"label-width":"68px"},{default:b((()=>[c(o,{label:"任务名称",prop:"jobName"},{default:b((()=>[c(l,{modelValue:m(J).jobName,"onUpdate:modelValue":a[0]||(a[0]=e=>m(J).jobName=e),placeholder:"请输入任务名称",clearable:"",style:{width:"240px"},onKeyup:f(W,["enter"])},null,8,["modelValue","onKeyup"])])),_:1}),c(o,{label:"任务组名",prop:"jobGroup"},{default:b((()=>[c(n,{modelValue:m(J).jobGroup,"onUpdate:modelValue":a[1]||(a[1]=e=>m(J).jobGroup=e),placeholder:"请选择任务组名",clearable:"",style:{width:"240px"}},{default:b((()=>[(r(!0),s(g,null,v(m(D),(e=>(r(),_(t,{key:e.value,label:e.label,value:e.value},null,8,["label","value"])))),128))])),_:1},8,["modelValue"])])),_:1}),c(o,{label:"执行状态",prop:"status"},{default:b((()=>[c(n,{modelValue:m(J).status,"onUpdate:modelValue":a[2]||(a[2]=e=>m(J).status=e),placeholder:"请选择执行状态",clearable:"",style:{width:"240px"}},{default:b((()=>[(r(!0),s(g,null,v(m(U),(e=>(r(),_(t,{key:e.value,label:e.label,value:e.value},null,8,["label","value"])))),128))])),_:1},8,["modelValue"])])),_:1}),c(o,{label:"执行时间",style:{width:"308px"}},{default:b((()=>[c(V,{modelValue:m(Y),"onUpdate:modelValue":a[3]||(a[3]=e=>h(Y)?Y.value=e:null),"value-format":"YYYY-MM-DD",type:"daterange","range-separator":"-","start-placeholder":"开始日期","end-placeholder":"结束日期"},null,8,["modelValue"])])),_:1}),c(o,null,{default:b((()=>[c(x,{type:"primary",icon:"Search",onClick:W},{default:b((()=>[j("搜索")])),_:1}),c(x,{icon:"Refresh",onClick:B},{default:b((()=>[j("重置")])),_:1})])),_:1})])),_:1},8,["model"]),[[p,m(q)]]),c(K,{gutter:10,class:"mb8"},{default:b((()=>[c(M,{span:1.5},{default:b((()=>[i((r(),_(x,{type:"danger",plain:"",icon:"Delete",disabled:m(P),onClick:H},{default:b((()=>[j("删除")])),_:1},8,["disabled"])),[[te,["monitor:job:remove"]]])])),_:1},8,["span"]),c(M,{span:1.5},{default:b((()=>[i((r(),_(x,{typ
|