webpackJsonp([48],{DN4S:function(a,t,e){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r={data:function(){return{visible:!1,dataForm:{id:0,alarmGrade:"",alarmType:"",alarmContent:"",description:""},dataRule:{alarmGrade:[{required:!0,message:"报警级别不能为空",trigger:"blur"}],alarmType:[{required:!0,message:"报警类型不能为空",trigger:"blur"}],alarmContent:[{required:!0,message:"报警内容不能为空",trigger:"blur"}]}}},methods:{init:function(a){var t=this;this.dataForm.id=a||"",this.visible=!0,this.$nextTick(function(){t.$refs.dataForm.resetFields(),t.dataForm.id&&t.$http({url:t.$http.adornUrl("/work/mtalarmlog/info/"+t.dataForm.id),method:"get",params:t.$http.adornParams()}).then(function(a){var e=a.data;e&&0===e.code&&(t.dataForm=e.mtAlarmLog)})})},dataFormSubmit:function(){var a=this;this.$refs.dataForm.validate(function(t){t&&a.$http({url:a.$http.adornUrl("/work/mtalarmlog/"+(a.dataForm.id?"update":"save")),method:"post",data:a.$http.adornData({id:a.dataForm.id||void 0,alarmGrade:a.dataForm.alarmGrade,alarmType:a.dataForm.alarmType,alarmContent:a.dataForm.alarmContent,description:a.dataForm.description})}).then(function(t){var e=t.data;e&&0===e.code?a.$message({message:"操作成功",type:"success",duration:1500,onClose:function(){a.visible=!1,a.$emit("refreshDataList")}}):a.$message.error(e.msg)})})}}},o={render:function(){var a=this,t=a.$createElement,e=a._self._c||t;return e("el-dialog",{attrs:{title:a.dataForm.id?"修改":"新增","close-on-click-modal":!1,visible:a.visible},on:{"update:visible":function(t){a.visible=t}}},[e("el-form",{ref:"dataForm",attrs:{model:a.dataForm,rules:a.dataRule,"label-width":"80px"},nativeOn:{keyup:function(t){if(!("button"in t)&&a._k(t.keyCode,"enter",13,t.key,"Enter"))return null;a.dataFormSubmit()}}},[e("el-form-item",{attrs:{label:"报警级别",prop:"alarmGrade"}},[e("el-input",{attrs:{placeholder:"报警级别",clearable:""},model:{value:a.dataForm.alarmGrade,callback:function(t){a.$set(a.dataForm,"alarmGrade",t)},expression:"dataForm.alarmGrade"}})],1),a._v(" "),e("el-form-item",{attrs:{label:"报警类型",prop:"alarmType"}},[e("el-input",{attrs:{placeholder:"报警类型",clearable:""},model:{value:a.dataForm.alarmType,callback:function(t){a.$set(a.dataForm,"alarmType",t)},expression:"dataForm.alarmType"}})],1),a._v(" "),e("el-form-item",{attrs:{label:"报警内容",prop:"alarmContent"}},[e("el-input",{attrs:{placeholder:"报警内容",clearable:""},model:{value:a.dataForm.alarmContent,callback:function(t){a.$set(a.dataForm,"alarmContent",t)},expression:"dataForm.alarmContent"}})],1),a._v(" "),e("el-form-item",{attrs:{label:"描述",prop:"description"}},[e("el-input",{attrs:{placeholder:"描述",clearable:""},model:{value:a.dataForm.description,callback:function(t){a.$set(a.dataForm,"description",t)},expression:"dataForm.description"}})],1)],1),a._v(" "),e("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[e("el-button",{on:{click:function(t){a.visible=!1}}},[a._v("取消")]),a._v(" "),e("el-button",{attrs:{type:"primary"},on:{click:function(t){a.dataFormSubmit()}}},[a._v("确定")])],1)],1)},staticRenderFns:[]},l=e("VU/8")(r,o,!1,null,null,null);t.default=l.exports}});