webpackJsonp([71],{lJxs:function(e,a,t){"use strict";Object.defineProperty(a,"__esModule",{value:!0});var r={data:function(){return{visible:!1,dataForm:{id:0,beanName:"",methodName:"",params:"",cronExpression:"",remark:"",status:0},dataRule:{beanName:[{required:!0,message:"必填项不能为空",trigger:"blur"}],methodName:[{required:!0,message:"必填项不能为空",trigger:"blur"}],cronExpression:[{required:!0,message:"必填项不能为空",trigger:"blur"}]}}},methods:{init:function(){var e=this;this.visible=!0,this.$nextTick(function(){e.$refs.dataForm.resetFields(),e.dataForm.id&&e.getScheduleInfo()})},getScheduleInfo:function(){var e=this;this.$http.get(window.SITE_CONFIG.baseURL+"/sys/schedule/info/"+this.dataForm.id).then(function(a){a&&0===a.code&&(e.dataForm.beanName=a.schedule.beanName,e.dataForm.methodName=a.schedule.methodName,e.dataForm.params=a.schedule.params,e.dataForm.cronExpression=a.schedule.cronExpression,e.dataForm.remark=a.schedule.remark,e.dataForm.status=a.schedule.status)})},dataFormSubmit:function(){var e=this;this.$refs.dataForm.validate(function(a){a&&e.$http.post(window.SITE_CONFIG.baseURL+"/sys/schedule/"+(e.dataForm.id?"update":"save"),{jobId:e.dataForm.id||void 0,beanName:e.dataForm.beanName,methodName:e.dataForm.methodName,params:e.dataForm.params,cronExpression:e.dataForm.cronExpression,remark:e.dataForm.remark,status:e.dataForm.id?e.dataForm.status:void 0}).then(function(a){a&&0===a.code&&e.$message({message:"操作成功",type:"success",duration:1500,onClose:function(){e.visible=!1,e.$emit("refreshDataList")}})})})}}},o={render:function(){var e=this,a=e.$createElement,t=e._self._c||a;return t("el-dialog",{attrs:{title:e.dataForm.id?"修改":"新增","close-on-click-modal":!1,visible:e.visible},on:{"update:visible":function(a){e.visible=a}}},[t("el-form",{ref:"dataForm",attrs:{model:e.dataForm,rules:e.dataRule,"label-width":"100px"},nativeOn:{keyup:function(a){if(!("button"in a)&&e._k(a.keyCode,"enter",13,a.key,"Enter"))return null;e.dataFormSubmit()}}},[t("el-form-item",{attrs:{label:"bean名称",prop:"beanName"}},[t("el-input",{attrs:{placeholder:"spring bean名称, 如: testTask"},model:{value:e.dataForm.beanName,callback:function(a){e.$set(e.dataForm,"beanName",a)},expression:"dataForm.beanName"}})],1),e._v(" "),t("el-form-item",{attrs:{label:"方法名称",prop:"methodName"}},[t("el-input",{attrs:{placeholder:"方法名称"},model:{value:e.dataForm.methodName,callback:function(a){e.$set(e.dataForm,"methodName",a)},expression:"dataForm.methodName"}})],1),e._v(" "),t("el-form-item",{attrs:{label:"参数",prop:"params"}},[t("el-input",{attrs:{placeholder:"参数"},model:{value:e.dataForm.params,callback:function(a){e.$set(e.dataForm,"params",a)},expression:"dataForm.params"}})],1),e._v(" "),t("el-form-item",{attrs:{label:"cron表达式",prop:"cronExpression"}},[t("el-input",{attrs:{placeholder:"如: 0 0 12 * * ?"},model:{value:e.dataForm.cronExpression,callback:function(a){e.$set(e.dataForm,"cronExpression",a)},expression:"dataForm.cronExpression"}})],1),e._v(" "),t("el-form-item",{attrs:{label:"备注",prop:"remark"}},[t("el-input",{attrs:{placeholder:"备注"},model:{value:e.dataForm.remark,callback:function(a){e.$set(e.dataForm,"remark",a)},expression:"dataForm.remark"}})],1)],1),e._v(" "),t("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[t("el-button",{on:{click:function(a){e.visible=!1}}},[e._v("取消")]),e._v(" "),t("el-button",{attrs:{type:"primary"},on:{click:function(a){e.dataFormSubmit()}}},[e._v("确定")])],1)],1)},staticRenderFns:[]},s=t("C7Lr")(r,o,!1,null,null,null);a.default=s.exports}});