chunk-3f6ea1aa.5262f5ee.js 6.4 KB

1
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-3f6ea1aa"],{"09f4":function(t,e,n){"use strict";n.d(e,"a",(function(){return r})),Math.easeInOutQuad=function(t,e,n,a){return t/=a/2,t<1?n/2*t*t+e:(t--,-n/2*(t*(t-2)-1)+e)};var a=function(){return window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||function(t){window.setTimeout(t,1e3/60)}}();function o(t){document.documentElement.scrollTop=t,document.body.parentNode.scrollTop=t,document.body.scrollTop=t}function i(){return document.documentElement.scrollTop||document.body.parentNode.scrollTop||document.body.scrollTop}function r(t,e,n){var r=i(),u=t-r,c=20,s=0;e="undefined"===typeof e?500:e;var l=function t(){s+=c;var i=Math.easeInOutQuad(s,r,u,e);o(i),s<e?a(t):n&&"function"===typeof n&&n()};l()}},"333d":function(t,e,n){"use strict";var a=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"pagination-container",class:{hidden:t.hidden}},[n("el-pagination",t._b({attrs:{"current-page":t.currentPage,"page-size":t.pageSize,layout:t.layout,"page-sizes":t.pageSizes,total:t.total},on:{"update:currentPage":function(e){t.currentPage=e},"update:current-page":function(e){t.currentPage=e},"update:pageSize":function(e){t.pageSize=e},"update:page-size":function(e){t.pageSize=e},"size-change":t.handleSizeChange,"current-change":t.handleCurrentChange}},"el-pagination",t.$attrs,!1))],1)},o=[],i=(n("c5f6"),n("09f4")),r={name:"Pagination",props:{total:{required:!0,type:Number},page:{type:Number,default:1},limit:{type:Number,default:10},pageSizes:{type:Array,default:function(){return[10,20,30,50]}},layout:{type:String,default:"total,sizes,prev, pager, next, jumper"},background:{type:Boolean,default:!0},autoScroll:{type:Boolean,default:!0},hidden:{type:Boolean,default:!1}},computed:{currentPage:{get:function(){return this.page},set:function(t){this.$emit("update:page",t)}},pageSize:{get:function(){return this.limit},set:function(t){this.$emit("update:limit",t)}}},methods:{handleSizeChange:function(t){this.$emit("pagination",{page:this.currentPage,limit:t}),this.autoScroll&&Object(i["a"])(0,800)},handleCurrentChange:function(t){this.$emit("pagination",{page:t,limit:this.pageSize}),this.autoScroll&&Object(i["a"])(0,800)}}},u=r,c=(n("c0b9"),n("2877")),s=Object(c["a"])(u,a,o,!1,null,"31cb099a",null);e["a"]=s.exports},"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:"最后执行时间"},scopedSlots:t._u([{key:"default",fn:function(e){return[n("div",[t._v("\n "+t._s(t._f("dateForMinFormat")(e.row.modifyOn))+"\n ")])]}}])}),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),t._v(" "),n("pagination",{attrs:{total:t.pageInfo.total,page:t.pageInfo.page,limit:t.pageInfo.limit,"page-sizes":t.pageInfo.page_size},on:{"update:page":function(e){return t.$set(t.pageInfo,"page",e)},"update:limit":function(e){return t.$set(t.pageInfo,"limit",e)},pagination:t.__init}})],1)])])},o=[function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("h2",[n("div",{staticClass:"squrt"}),t._v("定时任务\n ")])}],i=n("333d"),r=n("b775");function u(t){return Object(r["a"])({url:"/api-task/task/list",method:"get",params:t})}function c(t){return Object(r["a"])({url:"/api-task/task/resume/"+t.taskId,method:"post"})}function s(t){return Object(r["a"])({url:"/api-task/task/execute/"+t.taskId,method:"post"})}function l(t){return Object(r["a"])({url:"/api-task/task/pause/"+t.taskId,method:"post"})}var p={components:{pagination:i["a"]},data:function(){return{tableData:[],pageInfo:{limit:10,page:1,total:0,page_size:[10,20,40,50]}}},mounted:function(){this.__init()},methods:{__init:function(){var t=this;u({rows:this.pageInfo.limit,page:this.pageInfo.page}).then((function(e){if(200==e.code){var n=e.data;t.tableData=n.rows,t.pageInfo.total=n.total}}))},onPause:function(t){var e=this;this.$confirm("您确定暂停吗?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){l({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(){s({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(){c({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]}}},d=p,f=n("2877"),g=Object(f["a"])(d,a,o,!1,null,null,null);e["default"]=g.exports},c0b9:function(t,e,n){"use strict";var a=n("de4e"),o=n.n(a);o.a},de4e:function(t,e,n){}}]);