1 |
- (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-e50ed9d6"],{"17e4":function(e,t,r){"use strict";r.r(t);var o=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"app-container"},[r("el-form",{directives:[{name:"show",rawName:"v-show",value:e.showSearch,expression:"showSearch"}],ref:"queryForm",attrs:{model:e.queryParams,size:"small",inline:!0,"label-width":"68px"}},[r("el-form-item",{attrs:{label:"执行器",prop:"jobGroup"}},[r("el-select",{attrs:{placeholder:"请选择"},model:{value:e.queryParams.jobGroup,callback:function(t){e.$set(e.queryParams,"jobGroup",t)},expression:"queryParams.jobGroup"}},e._l(e.jobGroupOptions,(function(e){return r("el-option",{key:e.id,attrs:{label:e.title,value:e.id}})})),1)],1),r("el-form-item",{attrs:{label:"任务ID",prop:"jobId"}},[r("el-input",{attrs:{placeholder:"请输入任务ID",clearable:""},nativeOn:{keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.handleQuery(t)}},model:{value:e.queryParams.jobId,callback:function(t){e.$set(e.queryParams,"jobId",t)},expression:"queryParams.jobId"}})],1),r("el-form-item",{attrs:{label:"状态",prop:"logStatus"}},[r("el-select",{attrs:{placeholder:"请选择"},model:{value:e.queryParams.logStatus,callback:function(t){e.$set(e.queryParams,"logStatus",t)},expression:"queryParams.logStatus"}},e._l(e.dict.type.sys_job_log_status,(function(e){return r("el-option",{key:e.value,attrs:{label:e.label,value:e.value}})})),1)],1),r("el-form-item",{attrs:{label:"调度时间",prop:"triggerTimeArr"}},[r("el-date-picker",{staticStyle:{width:"240px"},attrs:{"value-format":"yyyy-MM-dd",type:"daterange","range-separator":"-","start-placeholder":"开始日期","end-placeholder":"结束日期"},model:{value:e.queryParams.triggerTimeArr,callback:function(t){e.$set(e.queryParams,"triggerTimeArr",t)},expression:"queryParams.triggerTimeArr"}})],1),r("el-form-item",[r("el-button",{attrs:{type:"primary",icon:"el-icon-search",size:"mini"},on:{click:e.handleQuery}},[e._v("搜索")]),r("el-button",{attrs:{icon:"el-icon-refresh",size:"mini"},on:{click:e.resetQuery}},[e._v("重置")])],1)],1),r("el-row",{staticClass:"mb8",attrs:{gutter:10}},[r("el-col",{attrs:{span:1.5}},[r("el-button",{directives:[{name:"hasPermi",rawName:"v-hasPermi",value:["job:log:clearLog"],expression:"['job:log:clearLog']"}],attrs:{type:"danger",plain:"",icon:"el-icon-delete",size:"mini"},on:{click:e.handleDelete}},[e._v("清理")])],1),r("right-toolbar",{attrs:{showSearch:e.showSearch},on:{"update:showSearch":function(t){e.showSearch=t},"update:show-search":function(t){e.showSearch=t},queryTable:e.getList}})],1),r("el-table",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],attrs:{data:e.logList},on:{"selection-change":e.handleSelectionChange}},[r("el-table-column",{attrs:{label:"任务ID",align:"center",prop:"jobId"}}),r("el-table-column",{attrs:{label:"调度时间",align:"center",prop:"triggerTime"}}),r("el-table-column",{attrs:{label:"调度结果",align:"center",prop:"triggerCode"},scopedSlots:e._u([{key:"default",fn:function(t){return[r("dict-tag",{attrs:{options:e.dict.type.sys_job_trigger_code,value:t.row.triggerCode}})]}}])}),r("el-table-column",{attrs:{label:"调度备注",align:"center",prop:"triggerMsg"},scopedSlots:e._u([{key:"default",fn:function(t){return[r("el-button",{attrs:{size:"mini",type:"text"},on:{click:function(r){return e.handleRowDialog(t.row,1)}}},[e._v("查看")])]}}])}),r("el-table-column",{attrs:{label:"执行时间",align:"center",prop:"handleTime"}}),r("el-table-column",{attrs:{label:"调度结果",align:"center",prop:"handleCode"},scopedSlots:e._u([{key:"default",fn:function(t){return[r("dict-tag",{attrs:{options:e.dict.type.sys_job_trigger_code,value:t.row.handleCode}})]}}])}),r("el-table-column",{attrs:{label:"执行备注",align:"center",prop:"handleMsg"},scopedSlots:e._u([{key:"default",fn:function(t){return[r("el-button",{attrs:{size:"mini",type:"text"},on:{click:function(r){return e.handleRowDialog(t.row,2)}}},[e._v("查看")])]}}])}),r("el-table-column",{attrs:{label:"操作",align:"center","class-name":"small-padding fixed-width"},scopedSlots:e._u([{key:"default",fn:function(t){return[200===t.row.handleCode?r("el-button",{directives:[{name:"hasPermi",rawName:"v-hasPermi",value:["job:log:remove"],expression:"['job:log:remove']"}],attrs:{size:"mini",type:"text"},on:{click:function(r){return e.handleRowDialog(t.row,3)}}},[e._v("执行日志")]):e._e()]}}])})],1),r("pagination",{directives:[{name:"show",rawName:"v-show",value:e.total>0,expression:"total>0"}],attrs:{total:e.total,page:e.queryParams.pageNum,limit:e.queryParams.pageSize},on:{"update:page":function(t){return e.$set(e.queryParams,"pageNum",t)},"update:limit":function(t){return e.$set(e.queryParams,"pageSize",t)},pagination:e.getList}}),r("el-dialog",{attrs:{title:"调度备注",visible:e.showViewTriggerMsgFlag},on:{"update:visible":function(t){e.showViewTriggerMsgFlag=t}}},[r("div",{domProps:{innerHTML:e._s(e.selectRow.triggerMsg)}})]),r("el-dialog",{attrs:{title:"执行备注",visible:e.showRemarkFlag},on:{"update:visible":function(t){e.showRemarkFlag=t}}},[r("div",{domProps:{innerHTML:e._s(e.selectRow.handleMsg)}})]),r("el-dialog",{attrs:{title:"执行日志",visible:e.showExecLogFlag},on:{"update:visible":function(t){e.showExecLogFlag=t}}},[r("div",{domProps:{innerHTML:e._s(e.logData.logContent)}}),r("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[r("el-button",{on:{click:function(t){e.showExecLogFlag=!1}}},[e._v("关 闭")]),r("el-button",{attrs:{type:"primary"},on:{click:e.getExecLog}},[e._v("刷 新")])],1)]),r("el-dialog",{attrs:{title:"日志清理",visible:e.showClearLogFlag},on:{"update:visible":function(t){e.showClearLogFlag=t}}},[r("el-form",{ref:"clearForm",attrs:{model:e.clearForm,rules:e.clearFormRules,"label-width":"180px"}},[r("el-form-item",{attrs:{label:"执行器:",prop:"jobGroup"}},[r("el-select",{attrs:{placeholder:"请选择",size:"",disabled:!0},model:{value:e.clearForm.jobGroup,callback:function(t){e.$set(e.clearForm,"jobGroup",t)},expression:"clearForm.jobGroup"}},e._l(e.jobGroupOptions,(function(e){return r("el-option",{key:e.id,attrs:{label:e.title,value:e.id}})})),1)],1),r("el-form-item",{attrs:{label:"任务:",prop:"jobId"}},[r("el-select",{attrs:{placeholder:"请选择",disabled:!0},model:{value:e.clearForm.jobId,callback:function(t){e.$set(e.clearForm,"jobId",t)},expression:"clearForm.jobId"}},e._l(e.jobIdList,(function(e){return r("el-option",{key:e.id,attrs:{label:e.title,value:e.id}})})),1)],1),r("el-form-item",{attrs:{label:"清理方式:",prop:"type"}},[r("el-select",{attrs:{placeholder:"请选择"},model:{value:e.clearForm.type,callback:function(t){e.$set(e.clearForm,"type",t)},expression:"clearForm.type"}},e._l(e.dict.type.sys_job_log_clear_type,(function(e){return r("el-option",{key:e.value,attrs:{label:e.label,value:e.value}})})),1)],1)],1),r("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[r("el-button",{on:{click:function(t){e.showClearLogFlag=!1}}},[e._v("取 消")]),r("el-button",{attrs:{type:"primary"},on:{click:e.clearLog}},[e._v("确 定")])],1)],1)],1)},l=[],a=r("5530"),n=(r("fb6a"),r("d81d"),r("b775"));function i(e){return Object(n["a"])({url:"/job/log/list",method:"get",params:e})}function s(e){return Object(n["a"])({url:"/job/log/"+e,method:"get"})}function u(e){return Object(n["a"])({url:"/job/log",method:"post",data:e})}function c(e){return Object(n["a"])({url:"/job/log",method:"put",data:e})}function g(e){return Object(n["a"])({url:"/job/log/logDetailCat",method:"post",data:e})}function d(e){return Object(n["a"])({url:"/job/log/clearLog",method:"post",data:e})}var m=r("2da1"),p=r("6e0b"),h={name:"Log",dicts:["sys_job_trigger_code","sys_job_log_status","sys_job_log_clear_type"],data:function(){return{clearForm:{jobGroup:null,jobId:null,type:null},jobIdList:[{id:"",title:"全部"}],clearFormRules:{type:[{required:!0,message:"请选择清理方式",trigger:"blur"}]},showClearLogFlag:!1,jobGroupOptions:[],logData:{logContent:""},showExecLogFlag:!1,selectRow:{},showViewTriggerMsgFlag:!1,showRemarkFlag:!1,loading:!0,ids:[],single:!0,multiple:!0,showSearch:!0,total:0,logList:[],title:"",open:!1,queryParams:{pageNum:1,pageSize:10,jobGroup:null,jobId:null,executorAddress:null,executorHandler:null,executorParam:null,executorShardingParam:null,executorFailRetryCount:null,triggerTime:null,triggerCode:null,triggerMsg:null,handleTime:null,handleCode:null,handleMsg:null,alarmStatus:null,tenantId:null,logStatus:null},form:{},rules:{jobGroup:[{required:!0,message:"执行器主键ID不能为空",trigger:"blur"}],jobId:[{required:!0,message:"任务,主键ID不能为空",trigger:"blur"}],executorFailRetryCount:[{required:!0,message:"失败重试次数不能为空",trigger:"blur"}],triggerCode:[{required:!0,message:"调度-结果不能为空",trigger:"blur"}],handleCode:[{required:!0,message:"执行-状态不能为空",trigger:"blur"}],alarmStatus:[{required:!0,message:"告警状态:0-默认、1-无需告警、2-告警成功、3-告警失败不能为空",trigger:"blur"}]}}},created:function(){this.getList(),this.initPageDicData()},methods:{clearLog:function(){var e=this;this.$refs["clearForm"].validate((function(t){t&&d(e.clearForm).then((function(){e.$modal.msgSuccess("操作成功"),e.showClearLogFlag=!1,e.getList()}))}))},initPageDicData:function(){var e=this;this.jobGroupOptions=[],Object(p["d"])({title:""}).then((function(t){e.jobGroupOptions=t.data,e.jobGroupOptions.unshift({id:"",title:"全部"})}))},handleRowDialog:function(e,t){this.selectRow=e,1===t?this.showViewTriggerMsgFlag=!0:2===t?this.showRemarkFlag=!0:3===t?(this.getExecLog(e),this.showExecLogFlag=!0):console.log("未定义的操作")},getExecLog:function(){var e=this;e.logData.logContent="",s(e.selectRow.id).then((function(t){console.log("查看执行日志",t);var r=t.data;g({executorAddress:r.executorAddress,logDateTim:Date.parse(r.triggerTime),id:r.id,fromLineNum:1}).then((function(t){console.log("logData",t),e.logData=t.data}))}))},stateFormat:function(e,t,r){return r?r.length>10?r.slice(0,10)+"...":r:""},getList:function(){var e=this;this.loading=!0,this.queryParams.triggerTimeArr&&2===this.queryParams.triggerTimeArr.length&&(console.log("this.queryParams.triggerTimeArr",this.queryParams.triggerTimeArr),this.queryParams.triggerTimeStart=this.queryParams.triggerTimeArr[0],this.queryParams.triggerTimeEnd=this.queryParams.triggerTimeArr[1]),i(this.queryParams).then((function(t){e.logList=t.data,e.total=t.total,e.loading=!1}))},cancel:function(){this.open=!1,this.reset()},reset:function(){this.form={id:null,jobGroup:null,jobId:null,executorAddress:null,executorHandler:null,executorParam:null,executorShardingParam:null,executorFailRetryCount:null,triggerTime:null,triggerCode:null,triggerMsg:null,handleTime:null,handleCode:null,handleMsg:null,alarmStatus:0,tenantId:null},this.resetForm("form")},handleQuery:function(){this.queryParams.pageNum=1,this.getList()},resetQuery:function(){this.resetForm("queryForm"),this.queryParams.triggerTimeStart="",this.queryParams.triggerTimeEnd="",this.handleQuery()},handleSelectionChange:function(e){this.ids=e.map((function(e){return e.id})),this.single=1!==e.length,this.multiple=!e.length},handleAdd:function(){this.reset(),this.open=!0,this.title="添加定时任务日志"},submitForm:function(){var e=this;this.$refs["form"].validate((function(t){t&&(null!=e.form.id?c(e.form).then((function(t){e.$modal.msgSuccess("修改成功"),e.open=!1,e.getList()})):u(e.form).then((function(t){e.$modal.msgSuccess("新增成功"),e.open=!1,e.getList()})))}))},handleDelete:function(){this.clearForm.jobGroup="",this.clearForm.jobId="",this.showClearLogFlag=!0},handleExport:function(){this.download("job/log/export",Object(a["a"])({},this.queryParams),"定时任务日志_".concat(Object(m["f"])((new Date).getTime(),"{y}-{m}-{d}"),".xlsx"))}}},b=h,f=r("2877"),y=Object(f["a"])(b,o,l,!1,null,null,null);t["default"]=y.exports},"6e0b":function(e,t,r){"use strict";r.d(t,"e",(function(){return l})),r.d(t,"c",(function(){return a})),r.d(t,"a",(function(){return n})),r.d(t,"f",(function(){return i})),r.d(t,"b",(function(){return s})),r.d(t,"d",(function(){return u}));var o=r("b775");function l(e){return Object(o["a"])({url:"/job/group/list",method:"get",params:e})}function a(e){return Object(o["a"])({url:"/job/group/"+e,method:"get"})}function n(e){return Object(o["a"])({url:"/job/group/add",method:"post",data:e})}function i(e){return Object(o["a"])({url:"/job/group/edit",method:"put",data:e})}function s(e){return Object(o["a"])({url:"/job/group/"+e,method:"delete"})}function u(e){return Object(o["a"])({url:"/job/group/getSelectAll",method:"get",params:e})}}}]);
|