qy-renren-qt/dist/2209301437/static/js/26.js

1 line
8.3 KiB
JavaScript
Raw Normal View History

2022-09-30 14:43:03 +08:00
webpackJsonp([26,46],{"MQn/":function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r={data:function(){return{visible:!1,dataForm:{id:0,code:"SB"+(new Date).getTime(),name:"",alias:"",type:"",description:"",note:""},typeArr:[],dataRule:{code:[{required:!0,message:"编码,系统自动生成可修改不能为空",trigger:"blur"}],name:[{required:!0,message:"名称不能为空",trigger:"blur"}],type:[{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/mtequipmentinfo/info/"+t.dataForm.id),method:"get",params:t.$http.adornParams()}).then(function(e){var a=e.data;a&&0===a.code&&(t.dataForm=a.mtEquipmentInfo)}),t.$http({url:t.$http.adornUrl("/work/mtsysdictdata/list"),method:"get",params:t.$http.adornParams({page:1,limit:500,dictTypeId:1})}).then(function(e){var a=e.data;a&&0===a.code?t.typeArr=a.page.list:t.typeArr=[]})})},dataFormSubmit:function(){var e=this;this.$refs.dataForm.validate(function(t){t&&e.$http({url:e.$http.adornUrl("/work/mtequipmentinfo/"+(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,alias:e.dataForm.alias,type:e.dataForm.type,description:e.dataForm.description,note:e.dataForm.note})}).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)})})}}},n={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:"编码",prop:"code"}},[a("el-input",{attrs:{placeholder:"编码,系统自动生成可修改",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:"alias"}},[a("el-input",{attrs:{placeholder:"别名",clearable:""},model:{value:e.dataForm.alias,callback:function(t){e.$set(e.dataForm,"alias",t)},expression:"dataForm.alias"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"设备类型",prop:"type"}},[a("el-select",{attrs:{clearable:"",filterable:"",placeholder:"设备类型"},model:{value:e.dataForm.type,callback:function(t){e.$set(e.dataForm,"type",t)},expression:"dataForm.type"}},e._l(e.typeArr,function(e){return a("el-option",{key:e.id,attrs:{label:e.dataName,value:e.id}})}))],1),e._v(" "),a("el-form-item",{attrs:{label:"描述信息",prop:"description"}},[a("el-input",{attrs:{placeholder:"描述信息",clearable:""},model:{value:e.dataForm.description,callback:function(t){e.$set(e.dataForm,"description",t)},expression:"dataForm.description"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"备注",prop:"note"}},[a("el-input",{attrs:{placeholder:"备注",clearable:""},model:{value:e.dataForm.note,callback:function(t){e.$set(e.dataForm,"note",t)},expression:"dataForm.note"}})],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:[]},i=a("VU/8")(r,n,!1,null,null,null);t.default=i.exports},O5cc:function(e,t,a){"use strict";Obj