You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

1 lines
12 KiB

(window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-c68ba2f4"],{1244:function(e,t,a){"use strict";var n=a("b7f0");a.n(n).a},"1a86":function(e,t,a){"use strict";t.a={data:function(){return{isSearch:!1,total:null}},created:function(){},methods:{handleSizeChange:function(e){this.queryInfo.pageSize=e,this.initTable()},handleCurrentChange:function(e){this.queryInfo.pageNum=e,this.initTable()},searchClick:function(){this.isSearch=!this.isSearch}}}},3476:function(e,t,a){"use strict";a.r(t);a("7db0"),a("a15b"),a("d81d"),a("96cf");var n=a("1da1"),r=a("1a86"),o=a("284b"),s=function(e){return Object(o.a)({url:"manager/quartz/scheduleJob/list",method:"GET",params:e})},i=function(e){return Object(o.a)({url:"manager/quartz/scheduleJob/resume?id=".concat(e),method:"POST"})},l=function(e){return Object(o.a)({url:"manager/quartz/scheduleJob/stop?id=".concat(e),method:"POST"})},c={data:function(){return{dialogTitle:"",queryInfo:{name:"",orderBy:"",pageNo:1,pageSize:10},tableData:[],isShowDialog:!1,formLabelWidth:"120px",total:0,ids:"",operateInfo:{className:"com.cmsen.ticket.monitor.task.TestTask",cronExpression:"0 30 4 * * ?",description:"",group:"ocr",isInfo:"0",mapTxt:"",name:"测试",sort:1,status:"1",id:"",ext1:"",ext2:""},mapTxtData:[],selections:[],type:""}},mixins:[r.a],components:{},created:function(){this.initTable()},mounted:function(){var e,t=this;Object(o.a)({url:"manager/quartz/scheduleJob/getMapTxt",method:"GET",params:e}).then((function(e){var a=e.mapTxt.map((function(e){return{label:e,id:e}}));t.mapTxtData=a}))},computed:{},methods:{initTable:function(){var e=this;return Object(n.a)(regeneratorRuntime.mark((function t(){var a;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,s(e.queryInfo);case 2:200==(a=t.sent).status&&(e.tableData=a.result.data,e.total=a.result.pagination.total);case 4:case"end":return t.stop()}}),t)})))()},clickHandle:function(e){var t=this;if("add"==e)this.type="add",this.dialogTitle="添加定时任务";else{if(this.type="edit",this.dialogTitle="修改定时任务",1!=this.selections.length)return void this.$message.warning("请选择一个任务");var a=this.tableData.find((function(e){return e.id==t.ids}));for(var n in this.operateInfo)for(var r in a)n==r&&(this.operateInfo[n]=a[r])}this.isShowDialog=!this.isShowDialog},saveTaskHandle:function(){var e=this;return Object(n.a)(regeneratorRuntime.mark((function t(){var a;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,n=e.operateInfo,Object(o.a)({url:"manager/quartz/scheduleJob/save",method:"POST",data:n});case 2:if(200!=(a=t.sent).code){t.next=8;break}e.$message.success(a.msg),e.initTable(),t.next=10;break;case 8:return e.$message.warning("保存失败!"),t.abrupt("return");case 10:e.operateInfo={className:"com.cmsen.ticket.monitor.task.TestTask",cronExpression:"0 30 4 * * ?",description:"",group:"ocr",isInfo:"",mapTxt:"",name:"测试",sort:1,status:"1",id:"",ext1:"",ext2:""},e.isShowDialog=!1;case 11:case"end":return t.stop()}var n}),t)})))()},selectionChangeHandle:function(e){var t=e.map((function(e){return e.id}));this.selections=t;var a=t.join(",");this.ids=a},deleteHandle:function(){var e=this;return Object(n.a)(regeneratorRuntime.mark((function t(){var a;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,n=e.ids,Object(o.a)({url:"manager/quartz/scheduleJob/delete?ids=".concat(n),method:"DELETE"});case 2:200==(a=t.sent).code?(e.$message.success(a.msg),e.$refs.table.clearSelection(),e.initTable()):e.$message.warning("删除失败");case 4:case"end":return t.stop()}var n}),t)})))()},startNowHandle:function(){var e=this;return Object(n.a)(regeneratorRuntime.mark((function t(){var a;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(""!=e.ids){t.next=3;break}return e.$message.warning("请选择一个任务"),t.abrupt("return");case 3:return t.next=5,n=e.ids,Object(o.a)({url:"manager/quartz/scheduleJob/startNow?id=".concat(n),method:"POST"});case 5:200==(a=t.sent).code?(e.$message.success(a.msg),e.$refs.table.clearSelection()):e.$message.warning(a.msg);case 7:case"end":return t.stop()}var n}),t)})))()},suspendHandle:function(e){var t=this;return Object(n.a)(regeneratorRuntime.mark((function a(){var n;return regeneratorRuntime.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return a.next=2,l(e);case 2:200==(n=a.sent).code?t.$message.success(n.msg):t.$message.warning(n.msg);case 4:case"end":return a.stop()}}),a)})))()},queryByClassName:function(){var e=this;return Object(n.a)(regeneratorRuntime.mark((function t(){var a;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,s(e.queryInfo);case 2:200==(a=t.sent).status&&(e.tableData=a.result.data,e.total=a.result.pagination.total);case 4:case"end":return t.stop()}}),t)})))()},resumeHandle:function(e){var t=this;return Object(n.a)(regeneratorRuntime.mark((function a(){var n;return regeneratorRuntime.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return a.next=2,i(e);case 2:200==(n=a.sent).code?t.$message.success(n.msg):t.$message.warning(n.msg);case 4:case"end":return a.stop()}}),a)})))()},closeHandle:function(){"edit"==this.type&&(this.operateInfo={className:"com.cmsen.ticket.monitor.task.TestTask",cronExpression:"0 30 4 * * ?",description:"",group:"ocr",isInfo:"",mapTxt:"",name:"测试",sort:1,status:"1",id:"",ext1:"",ext2:""})}}},u=(a("1244"),a("2877")),p=Object(u.a)(c,(function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"wrapper"},[a("div",{staticClass:"top",staticStyle:{"padding-bottom":"20px"}},[a("el-form",{staticClass:"demo-form-inline",attrs:{inline:!0,model:e.queryInfo}},[a("el-form-item",[a("el-input",{attrs:{placeholder:"任务名"},model:{value:e.queryInfo.name,callback:function(t){e.$set(e.queryInfo,"name",t)},expression:"queryInfo.name"}})],1),a("el-form-item",[a("el-button",{attrs:{type:"primary",size:"mini"},on:{click:e.queryByClassName}},[e._v("查询")]),a("el-button",{attrs:{size:"mini"}},[e._v("重置")])],1)],1)],1),a("div",{staticClass:"buttons"},[a("el-button",{attrs:{type:"primary",plain:"",icon:"el-icon-plus"},on:{click:function(t){return e.clickHandle("add")}}},[e._v("新建")]),a("el-button",{attrs:{type:"warning",plain:"",icon:"el-icon-edit-outline"},on:{click:function(t){return e.clickHandle("edit")}}},[e._v("修改")]),a("el-button",{attrs:{type:"danger",plain:"",icon:"el-icon-delete"},on:{click:e.deleteHandle}},[e._v("删除")]),a("el-button",{attrs:{type:"success",plain:"",icon:"el-icon-edit-outline"},on:{click:e.startNowHandle}},[e._v("立即执行一次")])],1),a("div",{staticStyle:{"margin-top":"15px"}},[a("el-table",{ref:"table",staticStyle:{width:"100%"},attrs:{data:e.tableData,"default-sort":{prop:"date",order:"descending"},border:""},on:{"selection-change":e.selectionChangeHandle}},[a("el-table-column",{attrs:{type:"selection",width:"55",align:"center"}}),a("el-table-column",{attrs:{prop:"name",label:"任务名",sortable:"",align:"center"}}),a("el-table-column",{attrs:{prop:"group",label:"任务组",sortable:"",align:"center"}}),a("el-table-column",{attrs:{prop:"cronExpression",label:"定时规则",align:"center",width:"100"}}),a("el-table-column",{attrs:{prop:"status",label:"启用状态",align:"center",width:"100"}}),a("el-table-column",{attrs:{prop:"sort",label:"排序",align:"center"}}),a("el-table-column",{attrs:{prop:"className",label:"任务类",align:"center"}}),a("el-table-column",{attrs:{prop:"description",label:"描述",align:"center"}}),a("el-table-column",{attrs:{label:"操作",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){var n=t.row;return[a("el-link",{attrs:{type:"primary",icon:"el-icon-video-play",underline:!1},on:{click:function(t){return e.resumeHandle(n.id)}}},[e._v("开始 ")]),a("el-link",{attrs:{type:"primary",icon:"el-icon-video-pause",underline:!1},on:{click:function(t){return e.suspendHandle(n.id)}}},[e._v("暂停 ")])]}}])})],1)],1),a("div",{staticClass:"m-top-4"},[a("el-pagination",{attrs:{background:"","current-page":e.queryInfo.pageNo,"page-size":e.queryInfo.pageSize,"page-sizes":[10,20,30,50],layout:" prev, pager, next,total, sizes, jumper",total:e.total},on:{"size-change":e.handleSizeChange,"current-change":e.handleCurrentChange,"update:currentPage":function(t){return e.$set(e.queryInfo,"pageNo",t)},"update:current-page":function(t){return e.$set(e.queryInfo,"pageNo",t)}}})],1),a("el-dialog",{attrs:{title:e.dialogTitle,visible:e.isShowDialog},on:{"update:visible":function(t){e.isShowDialog=t},close:e.closeHandle}},[a("el-form",{attrs:{model:e.operateInfo}},[a("el-form-item",{attrs:{label:"任务名","label-width":e.formLabelWidth,required:""}},[a("el-input",{attrs:{autocomplete:"off"},model:{value:e.operateInfo.name,callback:function(t){e.$set(e.operateInfo,"name",t)},expression:"operateInfo.name"}})],1),a("el-form-item",{attrs:{label:"任务组","label-width":e.formLabelWidth,required:""}},[a("el-select",{attrs:{placeholder:"请选择任务组"},model:{value:e.operateInfo.group,callback:function(t){e.$set(e.operateInfo,"group",t)},expression:"operateInfo.group"}})],1),a("el-form-item",{attrs:{label:"定时规则","label-width":e.formLabelWidth,required:""}},[a("el-input",{attrs:{autocomplete:"off"},model:{value:e.operateInfo.cronExpression,callback:function(t){e.$set(e.operateInfo,"cronExpression",t)},expression:"operateInfo.cronExpression"}})],1),a("el-form-item",{attrs:{label:"启用状态","label-width":e.formLabelWidth,required:""}},[a("el-select",{attrs:{placeholder:"请选择启用状态"},model:{value:e.operateInfo.status,callback:function(t){e.$set(e.operateInfo,"status",t)},expression:"operateInfo.status"}},[a("el-option",{attrs:{label:"启用",value:"1"}}),a("el-option",{attrs:{label:"暂停",value:"0"}})],1)],1),a("el-form-item",{attrs:{label:"排序","label-width":e.formLabelWidth,required:""}},[a("el-input",{attrs:{autocomplete:"off"},model:{value:e.operateInfo.sort,callback:function(t){e.$set(e.operateInfo,"sort",t)},expression:"operateInfo.sort"}})],1),a("el-form-item",{attrs:{label:"失败通知用户","label-width":e.formLabelWidth}},[a("el-select",{attrs:{placeholder:"请选择"},model:{value:e.operateInfo.isInfo,callback:function(t){e.$set(e.operateInfo,"isInfo",t)},expression:"operateInfo.isInfo"}},[a("el-option",{attrs:{label:"是",value:"1"}}),a("el-option",{attrs:{label:"否",value:"0"}})],1)],1),a("el-form-item",{attrs:{label:"任务类","label-width":e.formLabelWidth,required:""}},[a("el-input",{attrs:{autocomplete:"off"},model:{value:e.operateInfo.className,callback:function(t){e.$set(e.operateInfo,"className",t)},expression:"operateInfo.className"}})],1),a("el-form-item",{attrs:{label:"存储过程","label-width":e.formLabelWidth}},[a("el-select",{attrs:{placeholder:"请选择存储过程"},model:{value:e.operateInfo.mapTxt,callback:function(t){e.$set(e.operateInfo,"mapTxt",t)},expression:"operateInfo.mapTxt"}},e._l(e.mapTxtData,(function(e){return a("el-option",{key:e.id,attrs:{label:e.label,value:e.id}})})),1)],1),a("el-form-item",{attrs:{label:"描述","label-width":e.formLabelWidth}},[a("el-input",{attrs:{autocomplete:"off"},model:{value:e.operateInfo.description,callback:function(t){e.$set(e.operateInfo,"description",t)},expression:"operateInfo.description"}})],1),a("el-form-item",{attrs:{label:"code","label-width":e.formLabelWidth}},[a("el-input",{attrs:{autocomplete:"off"},model:{value:e.operateInfo.ext1,callback:function(t){e.$set(e.operateInfo,"ext1",t)},expression:"operateInfo.ext1"}})],1),a("el-form-item",{attrs:{label:"邮箱","label-width":e.formLabelWidth}},[a("el-input",{attrs:{autocomplete:"off"},model:{value:e.operateInfo.ext2,callback:function(t){e.$set(e.operateInfo,"ext2",t)},expression:"operateInfo.ext2"}})],1)],1),a("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{on:{click:function(t){e.isShowDialog=!1}}},[e._v("取 消")]),a("el-button",{attrs:{type:"primary"},on:{click:e.saveTaskHandle}},[e._v("确 定")])],1)],1)],1)}),[],!1,null,"3c2e182d",null);t.default=p.exports},b7f0:function(e,t,a){}}]);