qy-renren-qt/dist/2209301437/static/js/45.js
2022-09-30 14:43:03 +08:00

1 line
3.6 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

webpackJsonp([45],{nyz5:function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o={data:function(){return{visible:!1,dataForm:{id:0,code:"",name:"",note:"",type:"",distance:""},dataRule:{code:[{required:!0,message:"点位编码对应plc不能为空",trigger:"blur"}],name:[{required:!0,message:"点位对应的设备名称不能为空",trigger:"blur"}],note:[{required:!0,message:"点位说明关联对应表数据的code出入点code,库位code等等不能为空",trigger:"blur"}],type:[{required:!0,message:"类型1 液压台2 库位不能为空",trigger:"blur"}],distance:[{required:!0,message:"距离不能为空",trigger:"blur"}]}}},methods:{init:function(e){var t=this;this.dataForm.id=e||"",this.visible=!0,this.$nextTick(function(){t.$refs.dataForm.resetFields(),t.dataForm.id&&t.$http({url:t.$http.adornUrl("/work/mtpointinfo/info/"+t.dataForm.id),method:"get",params:t.$http.adornParams()}).then(function(e){var a=e.data;a&&0===a.code&&(t.dataForm=a.mtPointInfo)})})},dataFormSubmit:function(){var e=this;this.$refs.dataForm.validate(function(t){t&&e.$http({url:e.$http.adornUrl("/work/mtpointinfo/"+(e.dataForm.id?"update":"save")),method:"post",data:e.$http.adornData({id:e.dataForm.id||void 0,code:e.dataForm.code,name:e.dataForm.name,note:e.dataForm.note,type:e.dataForm.type,distance:e.dataForm.distance})}).then(function(t){var a=t.data;a&&0===a.code?e.$message({message:"操作成功",type:"success",duration:1500,onClose:function(){e.visible=!1,e.$emit("refreshDataList")}}):e.$message.error(a.msg)})})}}},r={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("el-dialog",{attrs:{title:e.dataForm.id?"修改":"新增","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:"点位编码对应plc",prop:"code"}},[a("el-input",{attrs:{placeholder:"点位编码对应plc",clearable:""},model:{value:e.dataForm.code,callback:function(t){e.$set(e.dataForm,"code",t)},expression:"dataForm.code"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"点位对应的设备名称",prop:"name"}},[a("el-input",{attrs:{placeholder:"点位对应的设备名称",clearable:""},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:"note"}},[a("el-input",{attrs:{placeholder:"点位说明关联对应表数据的code出入点code,库位code等等",clearable:""},model:{value:e.dataForm.note,callback:function(t){e.$set(e.dataForm,"note",t)},expression:"dataForm.note"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"类型",prop:"type"}},[a("el-input",{attrs:{placeholder:"类型1 液压台2 库位",clearable:""},model:{value:e.dataForm.type,callback:function(t){e.$set(e.dataForm,"type",t)},expression:"dataForm.type"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"距离",prop:"distance"}},[a("el-input",{attrs:{placeholder:"距离",clearable:""},model:{value:e.dataForm.distance,callback:function(t){e.$set(e.dataForm,"distance",t)},expression:"dataForm.distance"}})],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._v(" "),a("el-button",{attrs:{type:"primary"},on:{click:function(t){e.dataFormSubmit()}}},[e._v("确定")])],1)],1)},staticRenderFns:[]},l=a("VU/8")(o,r,!1,null,null,null);t.default=l.exports}});