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