| 1 |
- (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2a6c961c"],{4706:function(t,e,s){"use strict";s("e62e")},"5f7a":function(t,e,s){"use strict";s.r(e);var a=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{staticClass:"app-container"},[s("el-row",[s("el-col",{staticClass:"card-box",attrs:{span:8}},[s("el-card",[s("div",{attrs:{slot:"header"},slot:"header"},[s("span",{staticStyle:{"font-size":"20px","font-weight":"bold"}},[s("i",{staticClass:"el-icon-monitor"}),t._v(" "+t._s(t.$t("WIFIsz")))])]),s("div",{staticClass:"el-table el-table--enable-row-hover el-table--medium"},[[s("el-form",{ref:"form3",attrs:{model:t.form3,rules:t.rules1,"label-width":"auto"}},[s("el-form-item",{attrs:{label:this.$t("wifiwl"),prop:"czmode"}},[s("el-select",{staticStyle:{width:"100%"},attrs:{"allow-create":"",filterable:!1},model:{value:t.form3.czmode,callback:function(e){t.$set(t.form3,"czmode",e)},expression:"form3.czmode"}},t._l(t.czmodes,(function(e){return s("el-option",{key:e.id,attrs:{label:t.$t(e.name),value:e.id}})})),1)],1),s("el-form-item",{attrs:{label:this.$t("ljzt")}},[s("el-input",{attrs:{readonly:!0}},[s("template",{slot:"prefix"},[t.form3.ljzt==this.$t("wlj")?s("span",{staticStyle:{color:"red"}},[t._v(t._s(t.form3.ljzt))]):s("span",{staticStyle:{color:"green"}},[t._v(t._s(t.form3.ljzt))])])],2)],1),s("el-form-item",{attrs:{label:"SSID"}},[s("el-input",{model:{value:t.form3.ssid,callback:function(e){t.$set(t.form3,"ssid",e)},expression:"form3.ssid"}})],1),s("el-form-item",{attrs:{label:this.$t("formPassword")}},[s("el-input",{attrs:{"auto-complete":"off",type:t.passwordVisible?"text":"password"},model:{value:t.form3.password,callback:function(e){t.$set(t.form3,"password",e)},expression:"form3.password"}},[s("template",{slot:"suffix"},[s("span",{staticClass:"el-icon-view",on:{click:function(e){return t.togglePasswordVisibility()}}})])],2)],1),s("el-form-item",{attrs:{label:this.$t("IPadress")}},[s("el-input",{attrs:{readonly:!0},model:{value:t.form3.IPadress,callback:function(e){t.$set(t.form3,"IPadress",e)},expression:"form3.IPadress"}})],1)],1),s("div",{staticClass:"dialog-footer",staticStyle:{float:"right"},attrs:{slot:"footer"},slot:"footer"},[s("el-button",{attrs:{type:"primary"},on:{click:t.submitForm3}},[t._v(t._s(t.$t("sz")))])],1)]],2)])],1),"1"==this.productParams.ip4sz?s("el-col",{staticClass:"card-box",staticStyle:{display:"none"},attrs:{span:8}},[s("el-card",[s("div",{attrs:{slot:"header"},slot:"header"},[s("span",{staticStyle:{"font-size":"20px","font-weight":"bold"}},[s("i",{staticClass:"el-icon-monitor"}),t._v(" "+t._s(t.$t("IPV4sz")))])]),s("div",{staticClass:"el-table el-table--enable-row-hover el-table--medium"},[[s("el-form",{ref:"form",attrs:{model:t.form,rules:t.rules2,"label-width":"auto"}},[s("el-form-item",{attrs:{label:this.$t("xzms"),prop:"mode"}},[s("el-select",{staticStyle:{width:"100%"},attrs:{"allow-create":"",clearable:"",filterable:!1},on:{change:t.handleSelectChange},model:{value:t.form.mode,callback:function(e){t.$set(t.form,"mode",e)},expression:"form.mode"}},t._l(t.modes,(function(e){return s("el-option",{key:e.id,attrs:{label:t.$t(e.name),value:e.id}})})),1)],1),s("el-form-item",{attrs:{label:"IP "+this.$t("dz"),prop:"ipaddress"}},[s("el-input",{attrs:{disabled:t.showClass},model:{value:t.form.ipaddress,callback:function(e){t.$set(t.form,"ipaddress",e)},expression:"form.ipaddress"}})],1),s("el-form-item",{attrs:{label:this.$t("zwym"),prop:"mask"}},[s("el-input",{attrs:{disabled:t.showClass},model:{value:t.form.mask,callback:function(e){t.$set(t.form,"mask",e)},expression:"form.mask"}})],1),s("el-form-item",{attrs:{label:this.$t("wg"),prop:"gateway"}},[s("el-input",{attrs:{disabled:t.showClass},model:{value:t.form.gateway,callback:function(e){t.$set(t.form,"gateway",e)},expression:"form.gateway"}})],1),s("el-form-item",{attrs:{label:"DNS1:",prop:"dns1"}},[s("el-input",{attrs:{disabled:t.showClass},model:{value:t.form.dns1,callback:function(e){t.$set(t.form,"dns1",e)},expression:"form.dns1"}})],1),s("el-form-item",{attrs:{label:"DNS2:",prop:"dns2"}},[s("el-input",{attrs:{disabled:t.showClass},model:{value:t.form.dns2,callback:function(e){t.$set(t.form,"dns2",e)},expression:"form.dns2"}})],1)],1),s("div",{staticClass:"dialog-footer",staticStyle:{float:"right"},attrs:{slot:"footer"},slot:"footer"},[s("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?s("el-col",{staticClass:"card-box",staticStyle:{display:"none"},attrs:{span:8}},[s("el-card",[s("div",{attrs:{slot:"header"},slot:"header"},[s("span",{staticStyle:{"font-size":"20px","font-weight":"bold"}},[s("i",{staticClass:"el-icon-monitor"}),t._v(" "+t._s(t.$t("IPV6sz")))])]),s("div",{staticClass:"el-table el-table--enable-row-hover el-table--medium"},[[s("el-form",{ref:"form2",attrs:{model:t.form2,rules:t.rules3,"label-width":"auto"}},[s("el-form-item",{attrs:{label:this.$t("xzms"),prop:"mode"}},[s("el-select",{staticStyle:{width:"100%"},attrs:{"allow-create":"",clearable:"",filterable:""},on:{change:t.handleSelectChange2},model:{value:t.form2.mode,callback:function(e){t.$set(t.form2,"mode",e)},expression:"form2.mode"}},t._l(t.modes,(function(e){return s("el-option",{key:e.id,attrs:{label:t.$t(e.name),value:e.id}})})),1)],1),s("el-form-item",{attrs:{label:"IPV6 "+this.$t("dz"),prop:"ipaddress"}},[s("el-input",{attrs:{disabled:t.showClass2},model:{value:t.form2.ipaddress,callback:function(e){t.$set(t.form2,"ipaddress",e)},expression:"form2.ipaddress"}})],1),s("el-form-item",{attrs:{label:this.$t("zwym2"),prop:"mask"}},[s("el-input",{attrs:{disabled:t.showClass2},model:{value:t.form2.mask,callback:function(e){t.$set(t.form2,"mask",e)},expression:"form2.mask"}})],1),s("el-form-item",{attrs:{label:this.$t("wg"),prop:"gateway"}},[s("el-input",{attrs:{disabled:t.showClass2},model:{value:t.form2.gateway,callback:function(e){t.$set(t.form2,"gateway",e)},expression:"form2.gateway"}})],1),s("el-form-item",{attrs:{label:"DNS1:",prop:"dns1"}},[s("el-input",{attrs:{disabled:t.showClass2},model:{value:t.form2.dns1,callback:function(e){t.$set(t.form2,"dns1",e)},expression:"form2.dns1"}})],1),s("el-form-item",{attrs:{label:"DNS2:",prop:"dns2"}},[s("el-input",{attrs:{disabled:t.showClass2},model:{value:t.form2.dns2,callback:function(e){t.$set(t.form2,"dns2",e)},expression:"form2.dns2"}})],1)],1),s("div",{staticClass:"dialog-footer",staticStyle:{float:"right"},attrs:{slot:"footer"},slot:"footer"},[s("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=s("7ba4"),l={name:"Server",data:function(){return{isChecked:!1,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.ljzt=t.data.data.ljzt)},togglePasswordVisibility:function(){this.passwordVisible=!this.passwordVisible},handleClick:function(t,e){console.log(t,e)},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 e={};e.token=this.usertoken,e.type="listWIFIIPV4Query",Object(r["d"])(e).then((function(e){null!=e.data&&("1"==e.data.mode&&(t.showClass=!1),t.form=e.data)}))}},queryIp2:function(){var t=this;if("1"==this.productParams.ip6sz){var e={};e.token=this.usertoken,e.type="listWIFIIPV6Query",Object(r["d"])(e).then((function(e){null!=e.data&&("1"==e.data.mode&&(t.showClass2=!1),t.form2=e.data)}))}},queryIp3:function(){var t=this,e={};e.token=this.usertoken,e.type="listWIFIPZQuery",Object(r["d"])(e).then((function(e){null!=e.data&&(t.form3=e.data)}))},submitForm:function(){var t=this;this.$refs["form"].validate((function(e){if(e){var s={};s.token=t.usertoken,s.type="WIFIIPV4Save",s.mode=t.form.mode,s.ipaddress=t.form.ipaddress,s.mask=t.form.mask,s.gateway=t.form.gateway,s.dns1=t.form.dns1,s.dns2=t.form.dns2,s.mac=t.form.mac,t.$modal.confirm(t.$t("qdybcm")).then((function(){Object(r["d"])(s)})).then((function(){t.$modal.msgSuccess(t.$t("zxcg"))})).catch((function(){}))}}))},submitForm2:function(){var t=this;this.$refs["form2"].validate((function(e){if(e){var s={};s.token=t.usertoken,s.type="WIFIIPV6Save",s.mode=t.form2.mode,s.ipaddress=t.form2.ipaddress,s.mask=t.form2.mask,s.gateway=t.form2.gateway,s.dns1=t.form2.dns1,s.dns2=t.form2.dns2,t.$modal.confirm(t.$t("qdybcm")).then((function(){Object(r["d"])(s)})).then((function(){t.$modal.msgSuccess(t.$t("zxcg"))})).catch((function(){}))}}))},submitForm3:function(){var t=this;this.$refs["form3"].validate((function(e){if(e){var s={};s.token=t.usertoken,s.type="WIFIPZSave",s.ssid=t.form3.ssid,s.password=t.form3.password,s.IPadress=t.form3.IPadress,s.czmode=t.form3.czmode,t.$modal.confirm(t.$t("qdybcm")).then((function(){Object(r["d"])(s)})).then((function(){t.$modal.msgSuccess(t.$t("zxcg"))})).catch((function(){}))}}))},openLoading:function(){this.$modal.loading(this.$t("zzjzqsh"))}}},i=l,n=(s("4706"),s("e535"),s("2877")),d=Object(n["a"])(i,a,o,!1,null,"072cf2c0",null);e["default"]=d.exports},"6bd4":function(t,e,s){},e535:function(t,e,s){"use strict";s("6bd4")},e62e:function(t,e,s){}}]);
|