(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-801ada60"],{"1ab6":function(a,e,t){"use strict";t("52cb")},"52cb":function(a,e,t){},acb1:function(a,e,t){"use strict";t.r(e);var n,c=function(){var a=this,e=a._self._c;return e("div",[e("van-nav-bar",{attrs:{title:a.$t("gateway.lora.title"),"left-arrow":""},on:{"click-left":a.onBack}}),e("div",{staticClass:"config-content"},[e("van-form",{on:{submit:a.onSubmit}},[e("div",{staticClass:"block-title"},[a._v(a._s(a.$t("gateway.lora.RFConfiguration")))]),e("van-tabs",{model:{value:a.active,callback:function(e){a.active=e},expression:"active"}},[e("van-tab",{attrs:{title:a.$t("gateway.lora.RF1")}},[e("van-field",{attrs:{name:"ipaddr",label:a.$t("gateway.lan.ipaddr"),placeholder:a.$t("gateway.lan.ipaddr"),rules:[{required:!0,message:a.$t("gateway.lan.ipaddrTips")}]},model:{value:a.form.ipaddr,callback:function(e){a.$set(a.form,"ipaddr",e)},expression:"form.ipaddr"}})],1),e("van-tab",{attrs:{title:a.$t("gateway.lora.RF2")}})],1),e("van-field",{attrs:{name:"netmask",label:a.$t("gateway.lan.netmask"),placeholder:a.$t("gateway.lan.netmaskplaceholder"),rules:[{required:!0,message:a.$t("gateway.lan.netmaskTip")}]},model:{value:a.form.netmask,callback:function(e){a.$set(a.form,"netmask",e)},expression:"form.netmask"}}),e("div",{staticClass:"block-title"},[a._v(a._s(a.$t("gateway.lan.DHCPserversettings")))]),e("van-field",{attrs:{name:"switch",label:a.$t("gateway.lan.Enableornot")},scopedSlots:a._u([{key:"input",fn:function(){return[e("van-switch",{attrs:{size:"20","active-value":1,"inactive-value":0},model:{value:a.form.dhcp_server_enable,callback:function(e){a.$set(a.form,"dhcp_server_enable",e)},expression:"form.dhcp_server_enable"}})]},proxy:!0}])}),e("van-field",{attrs:{type:"number",name:"dhcp_start",label:a.$t("gateway.lan.dhcpStart"),placeholder:a.$t("gateway.lan.dhcpStart"),rules:[{required:!0,message:a.$t("gateway.lan.dhcpStartTip")}]},model:{value:a.form.dhcp_start,callback:function(e){a.$set(a.form,"dhcp_start",a._n(e))},expression:"form.dhcp_start"}}),e("van-field",{attrs:{type:"number",name:"dhcp_limit",label:a.$t("gateway.lan.dhcpLimit"),placeholder:a.$t("gateway.lan.dhcpLimit"),rules:[{required:!0,message:a.$t("gateway.lan.dhcpLimitTip")}]},model:{value:a.form.dhcp_limit,callback:function(e){a.$set(a.form,"dhcp_limit",a._n(e))},expression:"form.dhcp_limit"}}),e("van-field",{attrs:{type:"number",name:"dhcp_leasetime",label:a.$t("gateway.lan.dhcpLeasetime"),placeholder:a.$t("gateway.lan.dhcpLeasetime"),rules:[{required:!0,message:a.$t("gateway.lan.dhcpLeasetimeTip")}]},model:{value:a.form.dhcp_leasetime,callback:function(e){a.$set(a.form,"dhcp_leasetime",a._n(e))},expression:"form.dhcp_leasetime"}}),e("div",{staticStyle:{margin:"16px"}},[e("van-button",{attrs:{round:"",loading:a.isLoading,block:"",type:"info","native-type":"submit"}},[a._v(a._s(a.$t("common.submit")))])],1)],1)],1)],1)},i=[],s=(t("4f6c"),t("16ab")),l=t("3788"),r=(t("0460"),t("0440")),o=(t("edee"),t("e17c")),d=(t("50a2"),t("20e5")),m=(t("c19c"),t("f477")),p=(t("b314"),t("ed0c")),u=(t("89b4"),t("ec60")),b=(t("6df5"),t("c08a")),f=(t("7026"),t("d758")),h=(t("92fc"),t("a241")),g=(t("3ccd"),t("7589")),v=(t("897c"),t("4fe0")),_=(t("7104"),t("7321")),y=(t("0231"),t("4469")),w=(t("57c7"),t("da71")),$=t("9923"),k="Get_GatewayLANCfg",O="Set_GatewayLANCfg",j={name:"Add",components:(n={},Object(l["a"])(n,y["a"].name,y["a"]),Object(l["a"])(n,_["a"].name,_["a"]),Object(l["a"])(n,v["a"].name,v["a"]),Object(l["a"])(n,g["a"].name,g["a"]),Object(l["a"])(n,h["a"].name,h["a"]),Object(l["a"])(n,f["a"].name,f["a"]),Object(l["a"])(n,b["a"].name,b["a"]),Object(l["a"])(n,u["a"].name,u["a"]),Object(l["a"])(n,p["a"].name,p["a"]),Object(l["a"])(n,m["a"].name,m["a"]),Object(l["a"])(n,d["a"].name,d["a"]),Object(l["a"])(n,o["a"].name,o["a"]),Object(l["a"])(n,r["a"].name,r["a"]),n),data:function(){return{isLoading:!1,active:0,form:{type:1,ipaddr:"172.16.254.254",netmask:"255.255.255.0",dhcp_server_enable:1,dhcp_start:100,dhcp_limit:150,dhcp_leasetime:12}}},created:function(){this.init()},methods:{init:function(){var a=this;Object(w["a"])(k).then((function(e){console.log("res",e),a.form=Object.assign(a.form,e)})).catch((function(){Object(s["a"])({type:"danger",message:$["a"].t("gateway.lan.FailedObtainLANportConfiguration")})}))},onBack:function(){this.$router.go(-1)},onSubmit:function(){var a=this,e=Object.assign(a.form);a.isLoading=!0,Object(w["c"])(O,e).then((function(){e.dhcp_start=Number(e.dhcp_start),e.dhcp_limit=Number(e.dhcp_limit),e.dhcp_leasetime=Number(e.dhcp_leasetime),a.isLoading=!1,Object(s["a"])({type:"success",message:$["a"].t("common.OperationSuccessful")}),a.onBack()})).catch((function(){a.isLoading=!1,Object(s["a"])({type:"danger",message:$["a"].t("common.OperationFailed")})}))}}},L=j,x=(t("1ab6"),t("0b56")),S=Object(x["a"])(L,c,i,!1,null,null,null);e["default"]=S.exports}}]);
//# sourceMappingURL=chunk-801ada60.3f7ee66a.js.map