chunk-06403e46.0c6228d3.js 10 KB

1
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-06403e46"],{"476b":function(t,s,e){},"5f7a":function(t,s,e){"use strict";e.r(s);var a=function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("div",{staticClass:"app-container"},[e("el-row",[e("el-col",{staticClass:"card-box",attrs:{span:8}},[e("el-card",[e("div",{attrs:{slot:"header"},slot:"header"},[e("span",{staticStyle:{"font-size":"20px","font-weight":"bold"}},[e("i",{staticClass:"el-icon-monitor"}),t._v(" "+t._s(t.$t("WIFIsz")))])]),e("div",{staticClass:"el-table el-table--enable-row-hover el-table--medium"},[[e("el-form",{ref:"form3",attrs:{model:t.form3,rules:t.rules1,"label-width":"auto"}},[e("el-form-item",{attrs:{label:this.$t("wifiwl"),prop:"czmode"}},[e("el-select",{staticStyle:{width:"100%"},attrs:{"allow-create":"",filterable:!1},model:{value:t.form3.czmode,callback:function(s){t.$set(t.form3,"czmode",s)},expression:"form3.czmode"}},t._l(t.czmodes,(function(s){return e("el-option",{key:s.id,attrs:{label:t.$t(s.name),value:s.id}})})),1)],1),e("el-form-item",{attrs:{label:this.$t("ljzt")}},[e("el-input",{attrs:{readonly:!0}},[e("template",{slot:"prefix"},["未连接"==t.form3.ljzt?e("span",{staticStyle:{color:"red"}},[t._v(t._s(t.form3.ljzt))]):e("span",{staticStyle:{color:"green"}},[t._v(t._s(t.form3.ljzt))])])],2)],1),e("el-form-item",{attrs:{label:"SSID",prop:"ssid"}},[e("el-input",{model:{value:t.form3.ssid,callback:function(s){t.$set(t.form3,"ssid",s)},expression:"form3.ssid"}})],1),e("el-form-item",{attrs:{required:!0,label:this.$t("formPassword"),prop:"password"}},[e("el-input",{attrs:{"auto-complete":"off",type:t.passwordVisible?"text":"password"},model:{value:t.form3.password,callback:function(s){t.$set(t.form3,"password",s)},expression:"form3.password"}},[e("template",{slot:"suffix"},[e("span",{staticClass:"el-icon-view",on:{click:function(s){return t.togglePasswordVisibility()}}})])],2)],1),e("el-form-item",{attrs:{label:this.$t("IPadress")}},[e("el-input",{attrs:{readonly:!0},model:{value:t.form3.IPadress,callback:function(s){t.$set(t.form3,"IPadress",s)},expression:"form3.IPadress"}})],1)],1),e("div",{staticClass:"dialog-footer",staticStyle:{float:"right"},attrs:{slot:"footer"},slot:"footer"},[e("el-button",{attrs:{type:"primary"},on:{click:t.submitForm3}},[t._v(t._s(t.$t("sz")))])],1)]],2)])],1),"1"==this.productParams.ip4sz?e("el-col",{staticClass:"card-box",staticStyle:{display:"none"},attrs:{span:8}},[e("el-card",[e("div",{attrs:{slot:"header"},slot:"header"},[e("span",{staticStyle:{"font-size":"20px","font-weight":"bold"}},[e("i",{staticClass:"el-icon-monitor"}),t._v(" "+t._s(t.$t("IPV4sz")))])]),e("div",{staticClass:"el-table el-table--enable-row-hover el-table--medium"},[[e("el-form",{ref:"form",attrs:{model:t.form,rules:t.rules2,"label-width":"auto"}},[e("el-form-item",{attrs:{label:this.$t("xzms"),prop:"mode"}},[e("el-select",{staticStyle:{width:"100%"},attrs:{"allow-create":"",clearable:"",filterable:!1},on:{change:t.handleSelectChange},model:{value:t.form.mode,callback:function(s){t.$set(t.form,"mode",s)},expression:"form.mode"}},t._l(t.modes,(function(s){return e("el-option",{key:s.id,attrs:{label:t.$t(s.name),value:s.id}})})),1)],1),e("el-form-item",{attrs:{label:"IP "+this.$t("dz"),prop:"ipaddress"}},[e("el-input",{attrs:{disabled:t.showClass},model:{value:t.form.ipaddress,callback:function(s){t.$set(t.form,"ipaddress",s)},expression:"form.ipaddress"}})],1),e("el-form-item",{attrs:{label:this.$t("zwym"),prop:"mask"}},[e("el-input",{attrs:{disabled:t.showClass},model:{value:t.form.mask,callback:function(s){t.$set(t.form,"mask",s)},expression:"form.mask"}})],1),e("el-form-item",{attrs:{label:this.$t("wg"),prop:"gateway"}},[e("el-input",{attrs:{disabled:t.showClass},model:{value:t.form.gateway,callback:function(s){t.$set(t.form,"gateway",s)},expression:"form.gateway"}})],1),e("el-form-item",{attrs:{label:"DNS1:",prop:"dns1"}},[e("el-input",{attrs:{disabled:t.showClass},model:{value:t.form.dns1,callback:function(s){t.$set(t.form,"dns1",s)},expression:"form.dns1"}})],1),e("el-form-item",{attrs:{label:"DNS2:",prop:"dns2"}},[e("el-input",{attrs:{disabled:t.showClass},model:{value:t.form.dns2,callback:function(s){t.$set(t.form,"dns2",s)},expression:"form.dns2"}})],1)],1),e("div",{staticClass:"dialog-footer",staticStyle:{float:"right"},attrs:{slot:"footer"},slot:"footer"},[e("el-button",{attrs:{type:"primary"},on:{click:t.submitForm}},[t._v(t._s(t.$t("qd")))])],1)]],2)])],1):t._e(),"1"==this.productParams.ip6sz?e("el-col",{staticClass:"card-box",staticStyle:{display:"none"},attrs:{span:8}},[e("el-card",[e("div",{attrs:{slot:"header"},slot:"header"},[e("span",{staticStyle:{"font-size":"20px","font-weight":"bold"}},[e("i",{staticClass:"el-icon-monitor"}),t._v(" "+t._s(t.$t("IPV6sz")))])]),e("div",{staticClass:"el-table el-table--enable-row-hover el-table--medium"},[[e("el-form",{ref:"form2",attrs:{model:t.form2,rules:t.rules3,"label-width":"auto"}},[e("el-form-item",{attrs:{label:this.$t("xzms"),prop:"mode"}},[e("el-select",{staticStyle:{width:"100%"},attrs:{"allow-create":"",clearable:"",filterable:""},on:{change:t.handleSelectChange2},model:{value:t.form2.mode,callback:function(s){t.$set(t.form2,"mode",s)},expression:"form2.mode"}},t._l(t.modes,(function(s){return e("el-option",{key:s.id,attrs:{label:t.$t(s.name),value:s.id}})})),1)],1),e("el-form-item",{attrs:{label:"IPV6 "+this.$t("dz"),prop:"ipaddress"}},[e("el-input",{attrs:{disabled:t.showClass2},model:{value:t.form2.ipaddress,callback:function(s){t.$set(t.form2,"ipaddress",s)},expression:"form2.ipaddress"}})],1),e("el-form-item",{attrs:{label:this.$t("zwym2"),prop:"mask"}},[e("el-input",{attrs:{disabled:t.showClass2},model:{value:t.form2.mask,callback:function(s){t.$set(t.form2,"mask",s)},expression:"form2.mask"}})],1),e("el-form-item",{attrs:{label:this.$t("wg"),prop:"gateway"}},[e("el-input",{attrs:{disabled:t.showClass2},model:{value:t.form2.gateway,callback:function(s){t.$set(t.form2,"gateway",s)},expression:"form2.gateway"}})],1),e("el-form-item",{attrs:{label:"DNS1:",prop:"dns1"}},[e("el-input",{attrs:{disabled:t.showClass2},model:{value:t.form2.dns1,callback:function(s){t.$set(t.form2,"dns1",s)},expression:"form2.dns1"}})],1),e("el-form-item",{attrs:{label:"DNS2:",prop:"dns2"}},[e("el-input",{attrs:{disabled:t.showClass2},model:{value:t.form2.dns2,callback:function(s){t.$set(t.form2,"dns2",s)},expression:"form2.dns2"}})],1)],1),e("div",{staticClass:"dialog-footer",staticStyle:{float:"right"},attrs:{slot:"footer"},slot:"footer"},[e("el-button",{attrs:{type:"primary"},on:{click:t.submitForm2}},[t._v(t._s(t.$t("qd")))])],1)]],2)])],1):t._e()],1)],1)},o=[],r=e("7ba4"),l={name:"Server",data:function(){return{server:[],totalStatus:{},channelList:[],title:"",sensorStatusTitle:"",open:!1,usertoken:"",form:{},form2:{},form3:{},sensorStatusForm:{},czmodes:[{id:"0",name:"gb"},{id:"1",name:"qy"}],modes:[{id:"0",name:"zd"},{id:"1",name:"sd"}],types:[{id:"WIFIIPV4Save",name:"IPV4"},{id:"WIFIIPV6Save",name:"IPV6"}],activeName:"温湿度传感器",sensorStatusTabs:[],sensorStatusOpen:!1,sensorStatusList:[],showClass:!0,showClass2:!0,productParams:{},rules1:{ssid:[{required:!0,message:"SSID "+this.$i18n.t("bnwk"),trigger:"blur"}],password:[{required:!0,message:this.$i18n.t("formPassword")+" "+this.$i18n.t("bnwk"),trigger:"blur"}],czmode:[{required:!0,message:this.$i18n.t("wifiwl")+" "+this.$i18n.t("bnwk"),trigger:"blur"}]},rules2:{mode:[{required:!0,message:this.$i18n.t("xzms")+" "+this.$i18n.t("bnwk"),trigger:"blur"}],type:[{required:!0,message:this.$i18n.t("IPbb")+" "+this.$i18n.t("bnwk"),trigger:"blur"}]},rules3:{mode:[{required:!0,message:this.$i18n.t("xzms")+" "+this.$i18n.t("bnwk"),trigger:"blur"}]},passwordVisible:!1}},mounted:function(){this.$bus.$on("WIFI_STATUS",this.onSocketMessageToWifiStatus)},created:function(){var t=this;this.usertoken=this.$store.state.user.usertoken,this.productParams=this.$store.state.user.productParams,this.queryIp3(),setTimeout((function(){t.queryIp()}),1e3),setTimeout((function(){t.queryIp2()}),1500)},methods:{onSocketMessageToWifiStatus:function(t){t.success&&null!=t.data&&""!=t.data.data&&null!=t.data.data&&null!=t.data&&(this.form3.IPadress=t.data.data.IPadress,this.form3.ljzt=t.data.data.ljzt,this.form3.password=t.data.data.password,this.form3.ssid=t.data.data.ssid)},togglePasswordVisibility:function(){this.passwordVisible=!this.passwordVisible},handleClick:function(t,s){console.log(t,s)},handleSelectChange:function(t){"1"==t?this.showClass=!1:(this.showClass=!0,this.form.mode=t)},handleSelectChange2:function(t){"1"==t?this.showClass2=!1:(this.showClass2=!0,this.form2={},this.form2.mode=t)},queryIp:function(){var t=this;if("1"==this.productParams.ip4sz){var s={};s.token=this.usertoken,s.type="listWIFIIPV4Query",Object(r["d"])(s).then((function(s){null!=s.data&&("1"==s.data.mode&&(t.showClass=!1),t.form=s.data)}))}},queryIp2:function(){var t=this;if("1"==this.productParams.ip6sz){var s={};s.token=this.usertoken,s.type="listWIFIIPV6Query",Object(r["d"])(s).then((function(s){null!=s.data&&("1"==s.data.mode&&(t.showClass2=!1),t.form2=s.data)}))}},queryIp3:function(){var t=this,s={};s.token=this.usertoken,s.type="listWIFIPZQuery",Object(r["d"])(s).then((function(s){null!=s.data&&(t.form3=s.data)}))},submitForm:function(){var t=this;this.$refs["form"].validate((function(s){if(s){var e={};e.token=t.usertoken,e.type="WIFIIPV4Save",e.mode=t.form.mode,e.ipaddress=t.form.ipaddress,e.mask=t.form.mask,e.gateway=t.form.gateway,e.dns1=t.form.dns1,e.dns2=t.form.dns2,e.mac=t.form.mac,t.$modal.confirm(t.$t("qdybcm")).then((function(){Object(r["d"])(e)})).then((function(){t.$modal.msgSuccess(t.$t("zxcg"))})).catch((function(){}))}}))},submitForm2:function(){var t=this;this.$refs["form2"].validate((function(s){if(s){var e={};e.token=t.usertoken,e.type="WIFIIPV6Save",e.mode=t.form2.mode,e.ipaddress=t.form2.ipaddress,e.mask=t.form2.mask,e.gateway=t.form2.gateway,e.dns1=t.form2.dns1,e.dns2=t.form2.dns2,t.$modal.confirm(t.$t("qdybcm")).then((function(){Object(r["d"])(e)})).then((function(){t.$modal.msgSuccess(t.$t("zxcg"))})).catch((function(){}))}}))},submitForm3:function(){var t=this;this.$refs["form3"].validate((function(s){if(s){var e={};e.token=t.usertoken,e.type="WIFIPZSave",e.ssid=t.form3.ssid,e.password=t.form3.password,e.IPadress=t.form3.IPadress,e.czmode=t.form3.czmode,t.$modal.confirm(t.$t("qdybcm")).then((function(){Object(r["d"])(e)})).then((function(){t.$modal.msgSuccess(t.$t("zxcg"))})).catch((function(){}))}}))},openLoading:function(){this.$modal.loading(this.$t("zzjzqsh"))}}},i=l,n=(e("ade9"),e("2877")),d=Object(n["a"])(i,a,o,!1,null,"209cc6a8",null);s["default"]=d.exports},ade9:function(t,s,e){"use strict";e("476b")}}]);