1 line
15 KiB
JavaScript
1 line
15 KiB
JavaScript
|
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-3d2a27ce","chunk-2505857e"],{"975e":function(t,e,a){"use strict";a.r(e);var i=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("el-card",{staticClass:"aui-card--fill",attrs:{shadow:"never"}},[a("div",{staticClass:"mod-job__schedule"},[a("search-bar",{ref:"searchBarForm",attrs:{formConfigs:t.formConfig},on:{headBtnClick:t.buttonClick}}),a("base-table",{attrs:{"table-props":t.tableProps,page:t.listQuery.page,limit:t.listQuery.limit,"table-data":t.tableData}},[t.tableBtn.length?a("method-btn",{attrs:{slot:"handleBtn",width:200,label:"操作","method-list":t.tableBtn},on:{clickBtn:t.handleClick},slot:"handleBtn"}):t._e()],1),a("pagination",{attrs:{limit:t.listQuery.limit,page:t.listQuery.page,total:t.listQuery.total},on:{"update:limit":function(e){return t.$set(t.listQuery,"limit",e)},"update:page":function(e){return t.$set(t.listQuery,"page",e)},pagination:t.getDataList}}),a("base-dialog",{attrs:{dialogTitle:t.addOrEditTitle,dialogVisible:t.addOrUpdateVisible,"before-close":t.handleCancel},on:{cancel:t.handleCancel,confirm:t.handleConfirm}},[a("add-or-update",{ref:"addOrUpdate",on:{successSubmit:t.successSubmit}})],1),t.logVisible?a("log",{ref:"log"}):t._e()],1)])},n=[],s=(a("d81d"),a("ed26")),o=a("5959"),r=a("9fca"),l=a("12cb"),d=a("fc23"),c=[{prop:"beanName",label:l["a"].t("schedule.beanName")},{prop:"params",label:l["a"].t("schedule.params")},{prop:"cronExpression",label:l["a"].t("schedule.cronExpression")},{prop:"remark",label:l["a"].t("schedule.remark")},{prop:"status",label:l["a"].t("schedule.status"),filter:Object(d["a"])("scheduleStatus")}],u=[{type:"edit",btnName:"编辑"},{type:"pause",btnName:"暂停"},{type:"restore",btnName:"恢复"},{type:"run",btnName:"执行"},{type:"delete",btnName:"删除"}],h={mixins:[s["a"]],data:function(){return{urlOptions:{getDataListURL:"/sys/schedule/page",deleteURL:"/sys/schedule"},dataForm:{beanName:""},tableProps:c,tableBtn:u,addDeleteURL:!0,logVisible:!1,formConfig:[{type:"input",label:l["a"].t("schedule.beanName"),placeholder:l["a"].t("schedule.beanName"),param:"beanName"},{type:"button",btnName:"查询",name:"search",color:"primary"},{type:"button",btnName:"新增",name:"add",color:"primary",plain:!0},{type:"button",btnName:"日志",name:"log",color:"success"}]}},components:{AddOrUpdate:o["default"],Log:r["default"]},methods:{buttonClick:function(t){switch(t.btnName){case"search":this.listQuery.beanName=t.beanName,this.listQuery.page=1,this.getDataList();break;case"add":this.addOrEditTitle="新增",this.addOrUpdateVisible=!0,this.addOrUpdateHandle();break;case"log":this.logHandle();break;default:console.log(t)}},btnFun:function(t){"pause"===t.type?this.pauseHandle(t.data.id):"restore"===t.type?this.resumeHandle(t.data.id):this.runHandle(t.data.id)},pauseHandle:function(t){var e=this;if(!t&&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(){e.$http.put("/sys/schedule/pause",t?[t]:e.dataListSelections.map((function(t){return t.id}))).then((function(t){var a=t.data;if(0!==a.code)return e.$message.error(a.msg);e.$message({message:e.$t("prompt.success"),type:"success",duration:500,onClose:function(){e.getDataList()}})})).catch((function(){}))})).catch((function(){}))},resumeHandle:function(t){var e=this;if(!t&&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(){e.$http.put("/sys/schedule/resume",t?[t]:e.dataListSelections.map((function(t){return t.id}))).then((function(t){var a=t.data;if(0!==a.code)return e.$message.error(a.msg);e.$message({message:e.$t("pro
|