webpackJsonp([61],{"2wNj":function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r={data:function(){return{visible:!1,dataForm:{id:0,name:"",installation:"",tagno:"",checkdate:"",useno:"",regno:"",state:"",createtime:"",updatetime:""},dataRule:{name:[{required:!0,message:"名称不能为空",trigger:"blur"}],installation:[{required:!0,message:"装置不能为空",trigger:"blur"}],tagno:[{required:!0,message:"位号不能为空",trigger:"blur"}],checkdate:[{required:!0,message:"检查日期不能为空",trigger:"blur"}],useno:[{required:!0,message:"使用编号不能为空",trigger:"blur"}],regno:[{required:!0,message:"注册编号不能为空",trigger:"blur"}],state:[{required:!0,message:"状态不能为空",trigger:"blur"}],createtime:[{required:!0,message:"创建时间不能为空",trigger:"blur"}],updatetime:[{required:!0,message:"更新时间不能为空",trigger:"blur"}]}}},methods:{init:function(e){var t=this;this.dataForm.id=e||0,this.visible=!0,this.$nextTick(function(){t.$refs.dataForm.resetFields(),t.dataForm.id&&t.$http({url:t.$http.adornUrl("/ssy/pipeline/info/"+t.dataForm.id),method:"get",params:t.$http.adornParams()}).then(function(e){var a=e.data;a&&0===a.code&&(t.dataForm.name=a.pipeline.name,t.dataForm.installation=a.pipeline.installation,t.dataForm.tagno=a.pipeline.tagno,t.dataForm.checkdate=a.pipeline.checkdate,t.dataForm.useno=a.pipeline.useno,t.dataForm.regno=a.pipeline.regno,t.dataForm.state=a.pipeline.state,t.dataForm.createtime=a.pipeline.createtime,t.dataForm.updatetime=a.pipeline.updatetime)})})},dataFormSubmit:function(){var e=this;this.$refs.dataForm.validate(function(t){t&&e.$http({url:e.$http.adornUrl("/ssy/pipeline/"+(e.dataForm.id?"update":"save")),method:"post",data:e.$http.adornData({id:e.dataForm.id||void 0,name:e.dataForm.name,installation:e.dataForm.installation,tagno:e.dataForm.tagno,checkdate:e.dataForm.checkdate,useno:e.dataForm.useno,regno:e.dataForm.regno,state:e.dataForm.state,createtime:e.dataForm.createtime,updatetime:e.dataForm.updatetime})}).then(function(t){var a=t.data;a&&0===a.code?e.$message({message:e.$t("message.success"),type:"success",duration:1500,onClose:function(){e.visible=!1,e.$emit("refreshDataList")}}):e.$message.error(a.msg)})})}}},o={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("el-dialog",{attrs:{title:e.dataForm.id?e.$t("edit"):e.$t("add"),"close-on-click-modal":!1,visible:e.visible},on:{"update:visible":function(t){e.visible=t}}},[a("el-form",{ref:"dataForm",attrs:{model:e.dataForm,rules:e.dataRule,"label-width":"80px"},nativeOn:{keyup:function(t){if(!("button"in t)&&e._k(t.keyCode,"enter",13,t.key,"Enter"))return null;e.dataFormSubmit()}}},[a("el-form-item",{attrs:{label:"名称",prop:"name"}},[a("el-input",{attrs:{placeholder:"名称"},model:{value:e.dataForm.name,callback:function(t){e.$set(e.dataForm,"name",t)},expression:"dataForm.name"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"装置",prop:"installation"}},[a("el-input",{attrs:{placeholder:"装置"},model:{value:e.dataForm.installation,callback:function(t){e.$set(e.dataForm,"installation",t)},expression:"dataForm.installation"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"位号",prop:"tagno"}},[a("el-input",{attrs:{placeholder:"位号"},model:{value:e.dataForm.tagno,callback:function(t){e.$set(e.dataForm,"tagno",t)},expression:"dataForm.tagno"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"使用编号",prop:"useno"}},[a("el-input",{attrs:{placeholder:"使用编号"},model:{value:e.dataForm.useno,callback:function(t){e.$set(e.dataForm,"useno",t)},expression:"dataForm.useno"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"注册编号",prop:"regno"}},[a("el-input",{attrs:{placeholder:"注册编号"},model:{value:e.dataForm.regno,callback:function(t){e.$set(e.dataForm,"regno",t)},expression:"dataForm.regno"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"状态",prop:"state"}},[a("el-input",{attrs:{placeholder:"状态"},model:{value:e.dataForm.state,callback:function(t){e.$set(e.dataForm,"state",t)},expression:"dataForm.state"}})],1)],1),e._v(" "),a("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{on:{click:function(t){e.visible=!1}}},[e._v(e._s(e.$t("message.cancel")))]),e._v(" "),a("el-button",{attrs:{type:"primary"},on:{click:function(t){e.dataFormSubmit()}}},[e._v(e._s(e.$t("message.confirm")))])],1)],1)},staticRenderFns:[]},i=a("VU/8")(r,o,!1,null,null,null);t.default=i.exports}});