| 1 |
- (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-1fa34746"],{5093:function(e,t,o){"use strict";o.r(t);var s=function(){var e=this,t=e.$createElement,o=e._self._c||t;return o("div",{staticClass:"app-container"},[o("el-row",[o("el-col",{staticClass:"card-box",attrs:{span:12}},[o("el-card",[o("div",{attrs:{slot:"header"},slot:"header"},[o("span",{staticStyle:{"font-size":"20px","font-weight":"bold"}},[o("i",{staticClass:"el-icon-monitor"}),e._v(" SNMP "+e._s(e.$t("sz")))])]),o("div",{staticClass:"el-table el-table--enable-row-hover el-table--medium"},[[o("el-form",{ref:"form",attrs:{model:e.form,rules:e.rules,"label-width":"230px"}},[o("el-form-item",{attrs:{label:this.$t("zt"),prop:"mode"}},[o("el-select",{staticStyle:{width:"100%"},attrs:{"allow-create":"",filterable:!1},on:{change:e.handleSelectChange},model:{value:e.form.mode,callback:function(t){e.$set(e.form,"mode",t)},expression:"form.mode"}},e._l(e.modes,(function(t){return o("el-option",{key:t.id,attrs:{label:e.$t(t.name),value:t.id}})})),1)],1),"1"==e.form.mode?o("el-form-item",{attrs:{label:this.$t("stm"),prop:"public"}},[o("el-input",{model:{value:e.form.public,callback:function(t){e.$set(e.form,"public",t)},expression:"form.public"}})],1):e._e(),"1"==e.form.mode?o("el-form-item",{attrs:{required:!0,label:"SNMP "+this.$t("xybb"),prop:"snmpVersion"}},[o("el-select",{staticStyle:{width:"100%"},attrs:{"allow-create":"",filterable:!1},model:{value:e.form.snmpVersion,callback:function(t){e.$set(e.form,"snmpVersion",t)},expression:"form.snmpVersion"}},e._l(e.SNMPs,(function(t){return o("el-option",{key:t.id,attrs:{label:e.$t(t.name),value:t.id}})})),1)],1):e._e(),"1"==e.form.mode?o("el-form-item",{attrs:{required:!0,label:"SNMP TRAP"+this.$t("fwzt"),prop:"trapMode"}},[o("el-select",{staticStyle:{width:"100%"},attrs:{"allow-create":"",filterable:!1},model:{value:e.form.trapMode,callback:function(t){e.$set(e.form,"trapMode",t)},expression:"form.trapMode"}},e._l(e.modes,(function(t){return o("el-option",{key:t.id,attrs:{label:e.$t(t.name),value:t.id}})})),1)],1):e._e()],1),o("div",{staticClass:"dialog-footer",staticStyle:{float:"right"},attrs:{slot:"footer"},slot:"footer"},[o("el-button",{attrs:{type:"primary"},on:{click:e.submitForm}},[e._v(e._s(e.$t("qd")))])],1)]],2)])],1)],1)],1)},r=[],a=o("7ba4"),n={name:"Server",data:function(){return{server:[],totalStatus:{},channelList:[],title:"",show:"false",sensorStatusTitle:"",open:!1,usertoken:"",form:{},sensorStatusForm:{},modes:[{id:"0",name:"gb"},{id:"1",name:"kq"}],SNMPs:[{id:"SNMP V1",name:"SNMP V1"},{id:"SNMP V2c",name:"SNMP V2c"},{id:"SNMP V3",name:"SNMP V3"}],activeName:"温湿度传感器",sensorStatusTabs:[],sensorStatusOpen:!1,sensorStatusList:[],rules:{mode:[{required:!0,message:this.$i18n.t("zt")+" "+this.$i18n.t("bnwk"),trigger:"blur"}]}}},created:function(){this.usertoken=this.$store.state.user.usertoken,this.queryIp()},methods:{editDisabled:function(){return"0"===this.form.mode},handleClick:function(e,t){console.log(e,t)},handleSelectChange:function(e){this.form.mode=e},queryIp:function(){var e=this,t={};t.token=this.usertoken,t.type="listSnmpQuery",Object(a["j"])(t).then((function(t){null!=t.data&&(e.form=t.data)}))},submitForm:function(){var e=this;this.$refs["form"].validate((function(t){if(t){var o={};o.token=e.usertoken,o.type="SnmpSave",o.mode=e.form.mode,o.public=e.form.public,o.snmpVersion=e.form.snmpVersion,o.trapMode=e.form.trapMode,"0"==e.form.mode&&(o.snmpVersion="",o.trapMode=""),e.$modal.confirm(e.$t("qdybcm")).then((function(){Object(a["j"])(o)})).then((function(){e.$modal.msgSuccess(e.$t("zxcg"))})).catch((function(){}))}}))},openLoading:function(){this.$modal.loading(this.$t("zzjzqsh"))}}},i=n,l=(o("f2f8"),o("2877")),m=Object(l["a"])(i,s,r,!1,null,"75d4c432",null);t["default"]=m.exports},c071:function(e,t,o){},f2f8:function(e,t,o){"use strict";o("c071")}}]);
|