(window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-2d20fe40"],{b60f:function(t,e,a){"use strict";a.r(e);var n=a("8593"),i={name:"system_crontab",data:function(){return{loading:!1,columns:[{title:"名称",key:"name",minWidth:150},{title:"最后执行时间",key:"last_execution_time",minWidth:150},{title:"执行周期",key:"execution_cycle",minWidth:150},{title:"是否开启",slot:"is_open",minWidth:100},{title:"操作",slot:"action",align:"center",fixed:"right",minWidth:100}],tableData:[],page:1,limit:15,total:0}},created:function(){this.getList()},methods:{getList:function(){var t=this;this.loading=!0,Object(n.ab)({page:this.page,limit:this.limit}).then((function(e){t.loading=!1;var a=e.data,n=a.count,i=a.list;t.total=n,t.tableData=i})).catch((function(e){t.loading=!1,t.$Message.error(e.msg)}))},handleDelete:function(t,e,a){var n=this,i={title:e,num:a,url:"system/timer/del/".concat(t.id),method:"get",ids:""};this.$modalSure(i).then((function(t){n.$Message.success(t.msg),n.tableData.splice(a,1),n.tableData.length||(n.page=1==n.page?1:n.page-1),n.getList()})).catch((function(t){n.$Message.error(t.msg)}))},handleChange:function(t){var e=this,a=t.id,i=t.is_open;Object(n.W)(a,i).then((function(t){e.$Message.success(t.msg),e.getList()})).catch((function(t){e.$Message.error(t.msg)}))},pageChange:function(t){this.page=t,this.getList()}}},s=a("2877"),o=Object(s.a)(i,(function(){var t=this,e=t._self._c;return e("Card",{attrs:{bordered:!1,"dis-hover":""}},[e("Button",{directives:[{name:"auth",rawName:"v-auth",value:["system-crontab-create"],expression:"['system-crontab-create']"}],attrs:{type:"primary",to:"/admin/system/crontab/create"}},[t._v("添加定时任务")]),e("Table",{staticClass:"ivu-mt",attrs:{columns:t.columns,data:t.tableData,loading:t.loading},scopedSlots:t._u([{key:"is_open",fn:function(a){var n=a.row;return[e("i-switch",{attrs:{"true-value":1,"false-value":0,size:"large"},on:{"on-change":function(e){return t.handleChange(n)}},model:{value:n.is_open,callback:function(e){t.$set(n,"is_open",e)},expression:"row.is_open"}},[e("span",{attrs:{slot:"open"},slot:"open"},[t._v("开启")]),e("span",{attrs:{slot:"close"},slot:"close"},[t._v("关闭")])])]}},{key:"action",fn:function(a){var n=a.row;return[e("router-link",{attrs:{to:"/admin/system/crontab/create/".concat(n.id)}},[t._v("编辑")]),e("Divider",{attrs:{type:"vertical"}}),e("a",{on:{click:function(e){return t.handleDelete(n,"删除定时任务",t.index)}}},[t._v("删除")])]}}])}),e("div",{staticClass:"acea-row row-right page"},[e("Page",{attrs:{total:t.total,current:t.page,"show-elevator":"","show-total":"","page-size":t.limit},on:{"on-change":t.pageChange}})],1)],1)}),[],!1,null,"1a0adc34",null);e.default=o.exports}}]);