(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2d0e95d2"],{"8ce6":function(t,e,n){"use strict";n.r(e);var a=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"m-container"},[t._m(0),t._v(" "),n("div",{staticClass:"m-core"},[n("div",{staticClass:"tableWrap"},[n("el-table",{staticStyle:{width:"100%"},attrs:{"header-cell-style":{background:"#EDEEF0",color:"#444"},data:t.tableData}},[n("el-table-column",{attrs:{prop:"id",align:"center",label:"任务编号"}}),t._v(" "),n("el-table-column",{attrs:{prop:"description",align:"center",label:"英文名"}}),t._v(" "),n("el-table-column",{attrs:{prop:"name",align:"center",label:"任务名"}}),t._v(" "),n("el-table-column",{attrs:{align:"center",prop:"timeExp",label:"表达式"}}),t._v(" "),n("el-table-column",{attrs:{align:"center",prop:"modifyOn",label:"最后执行时间"}}),t._v(" "),n("el-table-column",{attrs:{prop:"status",align:"center",label:"任务状态"},scopedSlots:t._u([{key:"default",fn:function(e){return[n("div",[t._v("\n              "+t._s(t.getStatus(e.row.status))+"\n            ")])]}}])}),t._v(" "),n("el-table-column",{attrs:{align:"center",label:"操作"},scopedSlots:t._u([{key:"default",fn:function(e){return[1==e.row.status||3==e.row.status?n("el-button",{attrs:{type:"text"},on:{click:function(n){return t.onPause(e.row)}}},[t._v("暂停")]):t._e(),t._v(" "),1==e.row.status||3==e.row.status?n("el-button",{attrs:{type:"text"},on:{click:function(n){return t.onExecute(e.row)}}},[t._v("执行")]):t._e(),t._v(" "),0==e.row.status?n("el-button",{attrs:{type:"text"},on:{click:function(n){return t.onResume(e.row)}}},[t._v("恢复")]):t._e()]}}])})],1)],1)])])},s=[function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("h2",[n("div",{staticClass:"squrt"}),t._v("定时任务\n  ")])}],o=n("b775");function c(t){return Object(o["a"])({url:"/api-task/task/list",method:"get",params:t})}function r(t){return Object(o["a"])({url:"/api-task/task/resume/"+t.taskId,method:"post"})}function i(t){return Object(o["a"])({url:"/api-task/task/execute/"+t.taskId,method:"post"})}function u(t){return Object(o["a"])({url:"/api-task/task/pause/"+t.taskId,method:"post"})}var l={data:function(){return{tableData:[]}},mounted:function(){this.__init()},methods:{__init:function(){var t=this;c().then((function(e){if(200==e.code){var n=e.data;t.tableData=n.rows}}))},onPause:function(t){var e=this;this.$confirm("您确定暂停吗?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){u({taskId:t.id}).then((function(t){200==t.code?(e.$message.success("暂停成功"),e.__init()):e.$message.error(t.msg)}))})).catch((function(){}))},onExecute:function(t){var e=this;this.$confirm("您确定执行吗?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){i({taskId:t.id}).then((function(t){200==t.code?(e.$message.success("执行成功"),e.__init()):e.$message.error(t.msg)}))})).catch((function(){}))},onResume:function(t){var e=this;this.$confirm("您确定恢复吗?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){r({taskId:t.id}).then((function(t){200==t.code?(e.$message.success("恢复成功"),e.__init()):e.$message.error(t.msg)}))})).catch((function(){}))},getStatus:function(t){var e={0:"暂停",1:"准备就绪",2:"执行中",3:"执行成功"};return-1==t?"执行失败":e[t]}}},f=l,d=n("2877"),m=Object(d["a"])(f,a,s,!1,null,null,null);e["default"]=m.exports}}]);