(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2d312cce","chunk-2505857e"],{"975e":function(e,t,a){"use strict";a.r(t);var n=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("el-card",{staticClass:"aui-card--fill",attrs:{shadow:"never"}},[a("div",{staticClass:"mod-job__schedule"},[a("el-form",{attrs:{inline:!0,model:e.dataForm},nativeOn:{keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.getDataList()}}},[a("el-form-item",[a("el-input",{attrs:{placeholder:e.$t("schedule.beanName"),clearable:""},model:{value:e.dataForm.beanName,callback:function(t){e.$set(e.dataForm,"beanName",t)},expression:"dataForm.beanName"}})],1),a("el-form-item",[a("el-button",{on:{click:function(t){return e.getDataList()}}},[e._v(e._s(e.$t("query")))])],1),a("el-form-item",[e.$hasPermission("sys:schedule:save")?a("el-button",{attrs:{type:"primary"},on:{click:function(t){return e.addOrUpdateHandle()}}},[e._v(e._s(e.$t("add")))]):e._e()],1),a("el-form-item",[e.$hasPermission("sys:schedule:delete")?a("el-button",{attrs:{type:"danger"},on:{click:function(t){return e.deleteHandle()}}},[e._v(e._s(e.$t("deleteBatch")))]):e._e()],1),a("el-form-item",[e.$hasPermission("sys:schedule:pause")?a("el-button",{attrs:{type:"danger"},on:{click:function(t){return e.pauseHandle()}}},[e._v(e._s(e.$t("schedule.pauseBatch")))]):e._e()],1),a("el-form-item",[e.$hasPermission("sys:schedule:resume")?a("el-button",{attrs:{type:"danger"},on:{click:function(t){return e.resumeHandle()}}},[e._v(e._s(e.$t("schedule.resumeBatch")))]):e._e()],1),a("el-form-item",[e.$hasPermission("sys:schedule:run")?a("el-button",{attrs:{type:"danger"},on:{click:function(t){return e.runHandle()}}},[e._v(e._s(e.$t("schedule.runBatch")))]):e._e()],1),a("el-form-item",[e.$hasPermission("sys:schedule:log")?a("el-button",{attrs:{type:"success"},on:{click:function(t){return e.logHandle()}}},[e._v(e._s(e.$t("schedule.log")))]):e._e()],1)],1),a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:e.dataListLoading,expression:"dataListLoading"}],staticStyle:{width:"100%"},attrs:{data:e.dataList,border:""},on:{"selection-change":e.dataListSelectionChangeHandle,"sort-change":e.dataListSortChangeHandle}},[a("el-table-column",{attrs:{type:"selection","header-align":"center",align:"center",width:"50"}}),a("el-table-column",{attrs:{prop:"beanName",label:e.$t("schedule.beanName"),"header-align":"center",align:"center"}}),a("el-table-column",{attrs:{prop:"params",label:e.$t("schedule.params"),"header-align":"center",align:"center"}}),a("el-table-column",{attrs:{prop:"cronExpression",label:e.$t("schedule.cronExpression"),"header-align":"center",align:"center"}}),a("el-table-column",{attrs:{prop:"remark",label:e.$t("schedule.remark"),"header-align":"center",align:"center"}}),a("el-table-column",{attrs:{prop:"status",label:e.$t("schedule.status"),sortable:"custom","header-align":"center",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){return[1===t.row.status?a("el-tag",{attrs:{size:"small"}},[e._v(e._s(e.$t("schedule.status1")))]):a("el-tag",{attrs:{size:"small",type:"danger"}},[e._v(e._s(e.$t("schedule.status0")))])]}}])}),a("el-table-column",{attrs:{label:e.$t("handle"),fixed:"right","header-align":"center",align:"center",width:"150"},scopedSlots:e._u([{key:"default",fn:function(t){return[e.$hasPermission("sys:schedule:update")?a("el-button",{attrs:{type:"text",size:"small"},on:{click:function(a){return e.addOrUpdateHandle(t.row.id)}}},[e._v(e._s(e.$t("update")))]):e._e(),e.$hasPermission("sys:schedule:pause")?a("el-button",{attrs:{type:"text",size:"small"},on:{click:function(a){return e.pauseHandle(t.row.id)}}},[e._v(e._s(e.$t("schedule.pause")))]):e._e(),e.$hasPermission("sys:schedule:resume")?a("el-button",{attrs:{type:"text",size:"small"},on:{click:function(a){return e.resumeHandle(t.row.id)}}},[e._v(e._s(e.$t("schedule.resume")))]):e._e(),e.$hasPermission("sys:schedule:run")?a("el-button",{attrs:{type:"text",size:"small"},on:{click:function(a){return e.runHandle(t.row.id)}}},[e._v(e._s(e.$t("schedule.run")))]):e._e(),e.$hasPermission("sys:schedule:delete")?a("el-button",{attrs:{type:"text",size:"small"},on:{click:function(a){return e.deleteHandle(t.row.id)}}},[e._v(e._s(e.$t("delete")))]):e._e()]}}])})],1),a("el-pagination",{attrs:{"current-page":e.page,"page-sizes":[10,20,50,100],"page-size":e.limit,total:e.total,layout:"total, sizes, prev, pager, next, jumper"},on:{"size-change":e.pageSizeChangeHandle,"current-change":e.pageCurrentChangeHandle}}),e.addOrUpdateVisible?a("add-or-update",{ref:"addOrUpdate",on:{successSubmit:e.getDataList}}):e._e(),e.logVisible?a("log",{ref:"log"}):e._e()],1)])},s=[],i=(a("d81d"),a("e1a5")),r=a("5959"),o=a("9fca"),l={mixins:[i["a"]],data:function(){return{mixinViewModuleOptions:{getDataListURL:"/sys/schedule/page",getDataListIsPage:!0,deleteURL:"/sys/schedule",deleteIsBatch:!0},dataForm:{beanName:""},logVisible:!1}},components:{AddOrUpdate:r["default"],Log:o["default"]},methods:{pauseHandle:function(e){var t=this;if(!e&&this.dataListSelections.length<=0)return this.$message({message:this.$t("prompt.deleteBatch"),type:"warning",duration:500});this.$confirm(this.$t("prompt.info",{handle:this.$t("schedule.pause")}),this.$t("prompt.title"),{confirmButtonText:this.$t("confirm"),cancelButtonText:this.$t("cancel"),type:"warning"}).then((function(){t.$http.put("/sys/schedule/pause",e?[e]:t.dataListSelections.map((function(e){return e.id}))).then((function(e){var a=e.data;if(0!==a.code)return t.$message.error(a.msg);t.$message({message:t.$t("prompt.success"),type:"success",duration:500,onClose:function(){t.getDataList()}})})).catch((function(){}))})).catch((function(){}))},resumeHandle:function(e){var t=this;if(!e&&this.dataListSelections.length<=0)return this.$message({message:this.$t("prompt.deleteBatch"),type:"warning",duration:500});this.$confirm(this.$t("prompt.info",{handle:this.$t("schedule.resume")}),this.$t("prompt.title"),{confirmButtonText:this.$t("confirm"),cancelButtonText:this.$t("cancel"),type:"warning"}).then((function(){t.$http.put("/sys/schedule/resume",e?[e]:t.dataListSelections.map((function(e){return e.id}))).then((function(e){var a=e.data;if(0!==a.code)return t.$message.error(a.msg);t.$message({message:t.$t("prompt.success"),type:"success",duration:500,onClose:function(){t.getDataList()}})})).catch((function(){}))})).catch((function(){}))},runHandle:function(e){var t=this;if(!e&&this.dataListSelections.length<=0)return this.$message({message:this.$t("prompt.deleteBatch"),type:"warning",duration:500});this.$confirm(this.$t("prompt.info",{handle:this.$t("schedule.run")}),this.$t("prompt.title"),{confirmButtonText:this.$t("confirm"),cancelButtonText:this.$t("cancel"),type:"warning"}).then((function(){t.$http.put("/sys/schedule/run",e?[e]:t.dataListSelections.map((function(e){return e.id}))).then((function(e){var a=e.data;if(0!==a.code)return t.$message.error(a.msg);t.$message({message:t.$t("prompt.success"),type:"success",duration:500,onClose:function(){t.getDataList()}})})).catch((function(){}))})).catch((function(){}))},logHandle:function(){var e=this;this.logVisible=!0,this.$nextTick((function(){e.$refs.log.init()}))}}},c=l,d=a("2877"),u=Object(d["a"])(c,n,s,!1,null,null,null);t["default"]=u.exports},"9fca":function(e,t,a){"use strict";a.r(t);var n=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("el-dialog",{attrs:{visible:e.visible,title:e.$t("schedule.log"),"close-on-click-modal":!1,"close-on-press-escape":!1,width:"75%"},on:{"update:visible":function(t){e.visible=t}}},[a("el-form",{attrs:{inline:!0,model:e.dataForm},nativeOn:{keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.getDataList()}}},[a("el-form-item",[a("el-input",{attrs:{placeholder:e.$t("schedule.jobId"),clearable:""},model:{value:e.dataForm.jobId,callback:function(t){e.$set(e.dataForm,"jobId",t)},expression:"dataForm.jobId"}})],1),a("el-form-item",[a("el-button",{on:{click:function(t){return e.getDataList()}}},[e._v(e._s(e.$t("query")))])],1)],1),a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:e.dataListLoading,expression:"dataListLoading"}],staticStyle:{width:"100%"},attrs:{data:e.dataList,border:"",height:"460"},on:{"sort-change":e.dataListSortChangeHandle}},[a("el-table-column",{attrs:{prop:"jobId",label:e.$t("schedule.jobId"),"header-align":"center",align:"center",width:"80"}}),a("el-table-column",{attrs:{prop:"beanName",label:e.$t("schedule.beanName"),"header-align":"center",align:"center"}}),a("el-table-column",{attrs:{prop:"params",label:e.$t("schedule.params"),"header-align":"center",align:"center"}}),a("el-table-column",{attrs:{prop:"status",label:e.$t("schedule.status"),"header-align":"center",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){return[1===t.row.status?a("el-tag",{attrs:{size:"small"}},[e._v(e._s(e.$t("schedule.statusLog1")))]):a("el-tag",{staticStyle:{cursor:"pointer"},attrs:{type:"danger",size:"small"},nativeOn:{click:function(a){return e.showErrorInfo(t.row.id)}}},[e._v(e._s(e.$t("schedule.statusLog0")))])]}}])}),a("el-table-column",{attrs:{prop:"times",label:e.$t("schedule.times"),"header-align":"center",align:"center"}}),a("el-table-column",{attrs:{prop:"createDate",label:e.$t("schedule.createDate"),"header-align":"center",align:"center",width:"180"}})],1),a("el-pagination",{attrs:{"current-page":e.page,"page-sizes":[10,20,50,100],"page-size":e.limit,total:e.total,layout:"total, sizes, prev, pager, next, jumper"},on:{"size-change":e.pageSizeChangeHandle,"current-change":e.pageCurrentChangeHandle}})],1)},s=[],i=a("e1a5"),r={mixins:[i["a"]],data:function(){return{visible:!1,mixinViewModuleOptions:{getDataListURL:"/sys/scheduleLog/page",getDataListIsPage:!0},dataForm:{jobId:""}}},methods:{init:function(){this.visible=!0,this.getDataList()},showErrorInfo:function(e){var t=this;this.$http.get("/sys/scheduleLog/".concat(e)).then((function(e){var a=e.data;if(0!==a.code)return t.$message.error(a.msg);t.$alert(a.data.error)})).catch((function(){}))}}},o=r,l=a("2877"),c=Object(l["a"])(o,n,s,!1,null,null,null);t["default"]=c.exports},e1a5:function(e,t,a){"use strict";a("99af"),a("4de4"),a("d81d"),a("b0c0"),a("ac1f"),a("5319");var n=a("5530"),s=a("a78e"),i=a.n(s),r=a("4328"),o=a.n(r);t["a"]={data:function(){return{mixinViewModuleOptions:{createdIsNeed:!0,activatedIsNeed:!1,getDataListURL:"",getDataListIsPage:!1,deleteURL:"",deleteIsBatch:!1,deleteIsBatchKey:"id",exportURL:""},dataForm:{},dataList:[],order:"",orderField:"",page:1,limit:10,total:0,dataListLoading:!1,dataListSelections:[],addOrUpdateVisible:!1}},created:function(){this.mixinViewModuleOptions.createdIsNeed&&this.query()},activated:function(){this.mixinViewModuleOptions.activatedIsNeed&&this.query()},methods:{query:function(){var e=this;this.dataListLoading=!0,this.$http.get(this.mixinViewModuleOptions.getDataListURL,{params:Object(n["a"])({order:this.order?this.order:null,orderField:this.orderField?this.orderField:null,page:this.mixinViewModuleOptions.getDataListIsPage?this.page:null,limit:this.mixinViewModuleOptions.getDataListIsPage?this.limit:null},this.dataForm)}).then((function(t){var a=t.data;if(e.dataListLoading=!1,0!==a.code)return e.dataList=[],e.total=0,e.$message.error(a.msg);e.dataList=e.mixinViewModuleOptions.getDataListIsPage?a.data.list:a.data,e.total=e.mixinViewModuleOptions.getDataListIsPage?a.data.total:0})).catch((function(){e.dataListLoading=!1}))},dataListSelectionChangeHandle:function(e){this.dataListSelections=e},dataListSortChangeHandle:function(e){if(!e.order||!e.prop)return this.order="",this.orderField="",!1;this.order=e.order.replace(/ending$/,""),this.orderField=e.prop.replace(/([A-Z])/g,"_$1").toLowerCase(),this.query()},pageSizeChangeHandle:function(e){this.page=1,this.limit=e,this.query()},pageCurrentChangeHandle:function(e){this.page=e,this.query()},getDataList:function(){this.page=1,this.query()},addOrUpdateHandle:function(e){var t=this;this.addOrUpdateVisible=!0,this.$nextTick((function(){t.$refs.addOrUpdate.dataForm.id=e,t.$refs.addOrUpdate.init()}))},closeCurrentTab:function(e){var t=this.$store.state.contentTabsActiveName;if(this.$store.state.contentTabs=this.$store.state.contentTabs.filter((function(e){return e.name!==t})),this.$store.state.contentTabs.length<=0)return this.$store.state.sidebarMenuActiveName=this.$store.state.contentTabsActiveName="home",!1;t===this.$store.state.contentTabsActiveName&&this.$router.push({name:this.$store.state.contentTabs[this.$store.state.contentTabs.length-1].name})},deleteHandle:function(e){var t=this;if(this.mixinViewModuleOptions.deleteIsBatch&&!e&&this.dataListSelections.length<=0)return this.$message({message:this.$t("prompt.deleteBatch"),type:"warning",duration:500});this.$confirm(this.$t("prompt.info",{handle:this.$t("delete")}),this.$t("prompt.title"),{confirmButtonText:this.$t("confirm"),cancelButtonText:this.$t("cancel"),type:"warning"}).then((function(){t.$http.delete("".concat(t.mixinViewModuleOptions.deleteURL).concat(t.mixinViewModuleOptions.deleteIsBatch?"":"/"+e),t.mixinViewModuleOptions.deleteIsBatch?{data:e?[e]:t.dataListSelections.map((function(e){return e[t.mixinViewModuleOptions.deleteIsBatchKey]}))}:{}).then((function(e){var a=e.data;if(0!==a.code)return t.$message.error(a.msg);t.$message({message:t.$t("prompt.success"),type:"success",duration:500,onClose:function(){t.query()}})})).catch((function(){}))})).catch((function(){}))},exportHandle:function(){var e=o.a.stringify(Object(n["a"])({token:i.a.get("token")},this.dataForm));window.location.href="".concat(window.SITE_CONFIG["apiURL"]).concat(this.mixinViewModuleOptions.exportURL,"?").concat(e)}}}}}]);