PLC-read/dist/20490957/static/js/0.js
2023-12-18 09:42:27 +08:00

1 line
6.9 KiB
JavaScript

webpackJsonp([0],{"1JAX":function(e,t,a){e.exports=a.p+"static/img/13.5ec8b82.jpg"},E4LH:function(e,t,a){"use strict";t.a=function(e){return/^([a-zA-Z0-9_-])+@([a-zA-Z0-9_-])+((.[a-zA-Z0-9_-]{2,3}){1,2})$/.test(e)},t.b=function(e){return/^1[0-9]{10}$/.test(e)},t.c=function(e){return/^http[s]?:\/\/.*/.test(e)}},H2Hk:function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var 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,"append-to-body":""},on:{"update:visible":function(t){e.visible=t}}},[a("el-form",{ref:"dataForm",attrs:{model:e.dataForm,rules:e.dataRule,"label-width":"100px"},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:"参数ID",prop:"parameterId"}},[a("el-input",{attrs:{placeholder:"参数ID"},model:{value:e.dataForm.parameterId,callback:function(t){e.$set(e.dataForm,"parameterId",t)},expression:"dataForm.parameterId"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"参数名",prop:"parameterName"}},[a("el-input",{attrs:{placeholder:"参数名"},model:{value:e.dataForm.parameterName,callback:function(t){e.$set(e.dataForm,"parameterName",t)},expression:"dataForm.parameterName"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"参数类型",prop:"readType"}},[a("el-select",{attrs:{placeholder:"请选择参数类型"},model:{value:e.dataForm.readType,callback:function(t){e.$set(e.dataForm,"readType",t)},expression:"dataForm.readType"}},e._l(e.options,function(e){return a("el-option",{key:e,attrs:{label:e,value:e}})}))],1),e._v(" "),a("el-form-item",{attrs:{label:"参数地址",prop:"readAddress"}},[a("el-input",{attrs:{placeholder:"参数地址"},model:{value:e.dataForm.readAddress,callback:function(t){e.$set(e.dataForm,"readAddress",t)},expression:"dataForm.readAddress"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"读取长度",prop:"length"}},[a("el-input",{attrs:{placeholder:"读取长度"},model:{value:e.dataForm.length,callback:function(t){e.$set(e.dataForm,"length",t)},expression:"dataForm.length"}})],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:[]},o=a("VU/8")({data:function(){return{visible:!1,dataForm:{id:"",parameterId:"",parameterName:"",readType:"",length:"",readAddress:""},options:[],dataRule:{parameterId:[{required:!0,message:"参数ID不能为空",trigger:"blur"}],parameterName:[{required:!0,message:"参数名不能为空",trigger:"blur"}],readType:[{required:!0,message:"参数类型不能为空",trigger:"change"}],length:[{required:!0,message:"读取长度不能为空",trigger:"blur"}],readAddress:[{required:!0,message:"参数地址不能为空",trigger:"blur"}]}}},methods:{init:function(e,t){var a=this;e?this.dataForm.id=e:(this.dataForm.id="",this.dataForm.plcId=t),this.visible=!0,this.$http({url:this.$http.adornUrl("api/server/parameter-config/getReadType"),method:"post"}).then(function(e){var t=e.data;t&&0===t.code&&(a.options=t.data)}),this.$nextTick(function(){if(a.$refs.dataForm.resetFields(),a.dataForm.id){var e={current:1,id:a.dataForm.id,size:10};a.$http({url:a.$http.adornUrl("api/server/parameter-config/getParameterById"),method:"post",data:e}).then(function(e){var t=e.data;t&&0===t.code&&(a.dataForm=t.data)})}})},dataFormSubmit:function(){var e=this;this.$refs.dataForm.validate(function(t){t&&e.$http({url:e.$http.adornUrl("api/server/parameter-config/"+(e.dataForm.id?"updateParameters":"addParameter")),method:"post",data:e.dataForm}).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,!1,null,null,null);t.default=o.exports},"cdA+":function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=a("0xDb"),o={data:function(){var e=this;return{visible:!1,dataForm:{password:"",newPassword:"",confirmPassword:""},dataRule:{password:[{required:!0,message:"原密码不能为空",trigger:"blur"}],newPassword:[{required:!0,message:"新密码不能为空",trigger:"blur"}],confirmPassword:[{required:!0,message:"确认密码不能为空",trigger:"blur"},{validator:function(t,a,r){e.dataForm.newPassword!==a?r(new Error("确认密码与新密码不一致")):r()},trigger:"blur"}]}}},computed:{userName:{get:function(){return this.$store.state.user.name}},mainTabs:{get:function(){return this.$store.state.common.mainTabs},set:function(e){this.$store.commit("common/updateMainTabs",e)}}},methods:{init:function(){var e=this;this.visible=!0,this.$nextTick(function(){e.$refs.dataForm.resetFields()})},dataFormSubmit:function(){var e=this;this.$refs.dataForm.validate(function(t){t&&e.$http({url:e.$http.adornUrl("/sys/user/password"),method:"post",data:e.$http.adornData({password:e.dataForm.password,newPassword:e.dataForm.newPassword})}).then(function(t){var a=t.data;a&&0===a.code?e.$message({message:"操作成功",type:"success",duration:1500,onClose:function(){e.visible=!1,e.$nextTick(function(){e.mainTabs=[],Object(r.a)(),e.$router.replace({name:"login"})})}}):e.$message.error(a.msg)})})}}},s={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("el-dialog",{attrs:{title:"修改密码",visible:e.visible,"append-to-body":!0},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:"账号"}},[a("span",[e._v(e._s(e.userName))])]),e._v(" "),a("el-form-item",{attrs:{label:"原密码",prop:"password"}},[a("el-input",{attrs:{type:"password"},model:{value:e.dataForm.password,callback:function(t){e.$set(e.dataForm,"password",t)},expression:"dataForm.password"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"新密码",prop:"newPassword"}},[a("el-input",{attrs:{type:"password"},model:{value:e.dataForm.newPassword,callback:function(t){e.$set(e.dataForm,"newPassword",t)},expression:"dataForm.newPassword"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"确认密码",prop:"confirmPassword"}},[a("el-input",{attrs:{type:"password"},model:{value:e.dataForm.confirmPassword,callback:function(t){e.$set(e.dataForm,"confirmPassword",t)},expression:"dataForm.confirmPassword"}})],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")(o,s,!1,null,null,null);t.default=i.exports}});