| 1 |
- (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-048f07e6"],{"0e56":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",["1"==this.productParams.ip4sz?s("el-col",{staticClass:"card-box",attrs:{span:12}},[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.rules1,"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",attrs:{span:12}},[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.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.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{server:[],totalStatus:{},channelList:[],title:"",sensorStatusTitle:"",open:!1,usertoken:"",form:{},form2:{},sensorStatusForm:{},modes:[{id:"0",name:"zd"},{id:"1",name:"sd"}],types:[{id:"WkIPV4Save",name:"IPV4"},{id:"WkIPV6Save",name:"IPV6"}],activeName:"温湿度传感器",sensorStatusTabs:[],sensorStatusOpen:!1,sensorStatusList:[],showClass:!0,showClass2:!0,productParams:{},rules1:{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"}]},rules2:{mode:[{required:!0,message:this.$i18n.t("xzms")+" "+this.$i18n.t("bnwk"),trigger:"blur"}]}}},created:function(){var t=this;this.usertoken=this.$store.state.user.usertoken,this.productParams=this.$store.state.user.productParams,this.queryIp(),setTimeout((function(){t.queryIp2()}),1e3)},methods:{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="listWkIPV4Query",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="listWkIPV6Query",Object(r["d"])(e).then((function(e){null!=e.data&&("1"==e.data.mode&&(t.showClass2=!1),t.form2=e.data)}))}},submitForm:function(){var t=this;this.$refs["form"].validate((function(e){if(e){var s={};s.token=t.usertoken,s.type="WkIPV4Save",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="WkIPV6Save",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(){}))}}))},openLoading:function(){this.$modal.loading(this.$t("zzjzqsh"))}}},i=l,n=(s("b4f88"),s("2877")),m=Object(n["a"])(i,a,o,!1,null,"18105979",null);e["default"]=m.exports},b4f88:function(t,e,s){"use strict";s("cb3e")},cb3e:function(t,e,s){}}]);
|