(window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-65da1efd"],{
/***/"2b8b":
/***/function(e,t,a){
// extracted by mini-css-extract-plugin
/***/},
/***/"52ae":
/***/function(e,t,a){"use strict";
/* harmony export (binding) */a.d(t,"e",(function(){return i})),
/* harmony export (binding) */a.d(t,"c",(function(){return l})),
/* harmony export (binding) */a.d(t,"h",(function(){return p})),
/* harmony export (binding) */a.d(t,"k",(function(){return m})),
/* harmony export (binding) */a.d(t,"j",(function(){return f})),
/* harmony export (binding) */a.d(t,"f",(function(){return h})),
/* harmony export (binding) */a.d(t,"i",(function(){return w})),
/* harmony export (binding) */a.d(t,"g",(function(){return M})),
/* harmony export (binding) */a.d(t,"d",(function(){return O})),
/* harmony export (binding) */a.d(t,"a",(function(){return S})),
/* harmony export (binding) */a.d(t,"b",(function(){return N}));
/* harmony import */var r=a("c7eb"),s=a("1da1"),o=a("7424"),n=a("b775");
/* harmony import */
/**
 * snmp模型添加
 */
function i(e){return u.apply(this,arguments)}
/**
 * snmp单个模型获取
 */function u(){return(u=Object(s.a)(Object(r.a)().mark((function e(t){return Object(r.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(n.g)(o.SNMPMODELADD,n.b.POST,t));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function l(e){return c.apply(this,arguments)}
/**
 * snmp模型修改
 */function c(){return(c=Object(s.a)(Object(r.a)().mark((function e(t){return Object(r.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(n.g)(o.SNMPMODELSINGLE,n.b.POST,t));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function p(e){return d.apply(this,arguments)}
/**
 * snmp Mib保存
 */function d(){return(d=Object(s.a)(Object(r.a)().mark((function e(t){return Object(r.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(n.g)(o.SNMPMODELEDIT,n.b.POST,t));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function m(e){return v.apply(this,arguments)}
/**
 * snmp模型列表
 */function v(){return(v=Object(s.a)(Object(r.a)().mark((function e(t){return Object(r.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(n.g)(o.SAVEMIB,n.b.POST,t,{timeout:6e8}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function f(e){return g.apply(this,arguments)}
/**
 * snmp模型删除
 */function g(){return(g=Object(s.a)(Object(r.a)().mark((function e(t){return Object(r.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(n.g)(o.SNMPMODELLIST,n.b.POST,t));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function h(e){return b.apply(this,arguments)}
/**
 * snmp mib获取
 */function b(){return(b=Object(s.a)(Object(r.a)().mark((function e(t){return Object(r.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(n.g)(o.SNMPMODELDELETE,n.b.POST,t));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function w(e){return y.apply(this,arguments)}
/**
 * snmp mib 删除
 */function y(){return(y=Object(s.a)(Object(r.a)().mark((function e(t){return Object(r.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(n.g)(o.GETMIBS,n.b.POST,t));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function M(e){return P.apply(this,arguments)}
/**
 * 数据编辑
 */function P(){return(P=Object(s.a)(Object(r.a)().mark((function e(t){return Object(r.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(n.g)(o.DELETEMIBS,n.b.POST,t));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function O(e){return $.apply(this,arguments)}
/**
 * 通过设备模型获取数据
 */function $(){return($=Object(s.a)(Object(r.a)().mark((function e(t){return Object(r.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(n.g)(o.MODELDATAEDIT,n.b.POST,t));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function S(e){return C.apply(this,arguments)}function C(){return(C=Object(s.a)(Object(r.a)().mark((function e(t){return Object(r.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(n.g)(o.GETMIBS,n.b.POST,t));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function N(e){return j.apply(this,arguments)}function j(){return(j=Object(s.a)(Object(r.a)().mark((function e(t){return Object(r.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(n.g)(o.GETHistoryMIBS,n.b.POST,t));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}
/* unused harmony default export */},
/***/b648:
/***/function(e,t,a){"use strict";
// ESM COMPAT FLAG
a.r(t);
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.function.name.js
a("b0c0"),a("a4d3"),a("e01a"),a("14d9");
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"411544a2-vue-loader-template"}!./node_modules/cache-loader/dist/cjs.js??ref--13-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--6!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/pages/dataModel/snmp/SnmpModelAdd.vue?vue&type=template&id=71b64506
var r=a("52ae"),s=a("456a"),o={name:"BasicForm",i18n:a("89fe"),data:function(){return{error:"",messageShowLoad:!1,configurationModel:[],displayPageList:[],form:this.$form.createForm(this),version:1,securityLevel:1,value:1}},mounted:function(){this.getConfigurationModel()},computed:{desc:function(){return this.$t("pageDesc")}},methods:{getConfigurationModel:function(){this.configurationModel=[];var e=this;Object(s.m)({type:1}).then((function(t){var a={};if(null!=t.data.list)for(var r=0;r<t.data.list.length;r++)a.name=t.data.list[r].name,a.description=t.data.list[r].description,a.uuid=t.data.list[r].displayUid,e.configurationModel.push(a),a={}}))},GetDisplayPage:function(e){var t={muid:e},a=this;Object(s.n)(t).then((function(e){if(a.displayPageList=[],0==e.data.code){var t=e.data.layer;if(t.length>0)for(var r=0;r<t.length;r++){var s={};s.label=t[r].PageName,s.value=t[r].PageId,s.pageType=t[r].PageType,s.pageModelUuid=t[r].modelId,a.displayPageList.push(s)}}}))},onSubmit:function(e){var t=this;e.preventDefault(),this.form.validateFields((function(e){if(!e){t.messageShowLoad=!0;var a={name:t.form.getFieldValue("name"),dec:t.form.getFieldValue("dec"),configUid:t.form.getFieldValue("configurationModel"),PageUUID:t.form.getFieldValue("configurationPageUUID"),type:1,port:parseInt(t.form.getFieldValue("port")),version:parseInt(t.form.getFieldValue("version")),writecomm:t.form.getFieldValue("writecomm"),readcomm:t.form.getFieldValue("readcomm"),gatherNumber:parseInt(t.form.getFieldValue("gatherNumber")),snmpUserName:t.form.getFieldValue("snmpUserName"),snmpSecurityLevel:parseInt(t.form.getFieldValue("snmpSecurityLevel")),snmpAuthAlgorithm:parseInt(t.form.getFieldValue("snmpAuthAlgorithm")),snmpUserPassword:t.form.getFieldValue("snmpUserPassword"),snmpPrivacyAlgorithm:parseInt(t.form.getFieldValue("snmpPrivacyAlgorithm")),snmpPrivacyPassword:t.form.getFieldValue("snmpPrivacyPassword")};Object(r.e)(a).then(t.afterLogin)}}))},onBlackCLK:function(){this.$router.push("/DeviceModel/SnmpModel")},afterLogin:function(e){this.messageShowLoad=!1,2002==e.data.code?(this.$message.success(this.$t("dataModel.modelAddSuccess"),3),this.$router.push("/DeviceModel/SnmpModel")):2001==e.data.code?this.$message.error(this.$t("dataModel.modelNameRepeat"),3):this.$message.error(this.$t("dataModel.modelAddFailed"),3)},handleSelectChange:function(e){this.version=parseInt(e)},securityLevelSelectChange:function(e){this.securityLevel=parseInt(e)}}},n=(a("f682"),a("2877")),i=Object(n.a)(o,(function(){var e=this,t=e._self._c;return t("a-spin",{staticStyle:{padding:"1px"},attrs:{spinning:e.messageShowLoad,tip:"Loading..."}},[t("a-card",{attrs:{"body-style":{padding:"24px 32px"},bordered:!1}},[t("a-form",{attrs:{form:e.form},on:{submit:e.onSubmit}},[t("a-alert",{directives:[{name:"show",rawName:"v-show",value:e.error,expression:"error"}],staticStyle:{"margin-bottom":"24px"},attrs:{type:"error",closable:!0,message:e.error,showIcon:""}}),t("a-form-item",{attrs:{label:e.$t("dataModel.modelName"),labelCol:{span:7},wrapperCol:{span:10}}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["name",{rules:[{required:!0,message:e.$t("dataModel.modelName"),whitespace:!0}]}],expression:"['name', {rules: [{ required: true, message: $t('dataModel.modelName'), whitespace: true}]}]"}],attrs:{autocomplete:"autocomplete"}})],1),t("a-form-item",{attrs:{label:e.$t("dataModel.modelDec"),labelCol:{span:7},wrapperCol:{span:10}}},[t("a-textarea",{directives:[{name:"decorator",rawName:"v-decorator",value:["dec",{rules:[{required:!0,message:e.$t("dataModel.modelDec"),whitespace:!0}]}],expression:"['dec', {rules: [{ required: true, message: $t('dataModel.modelDec'), whitespace: true}]}]"}],attrs:{autocomplete:"autocomplete"}})],1),t("a-form-item",{attrs:{label:e.$t("device.deviceConfigurationModelName"),labelCol:{span:7},wrapperCol:{span:10}}},[t("a-select",{directives:[{name:"decorator",rawName:"v-decorator",value:["configurationModel",{rules:[{required:!1,message:e.$t("device.deviceConfigurationModelName")}]}],expression:"[\n                  'configurationModel',\n                  {\n                    rules: [{ required: false, message: $t('device.deviceConfigurationModelName') }],\n                  },\n                ]"}],on:{select:e.GetDisplayPage}},e._l(e.configurationModel,(function(a,r){return t("a-select-option",{key:r,attrs:{value:a.uuid}},[e._v(" "+e._s(a.name)+" ")])})),1)],1),t("a-form-item",{attrs:{label:e.$t("device.deviceConfigurationPageName"),labelCol:{span:7},wrapperCol:{span:10}}},[t("a-select",{directives:[{name:"decorator",rawName:"v-decorator",value:["configurationPageUUID",{rules:[{required:!1,message:e.$t("device.deviceConfigurationPageName")}]}],expression:"[\n                  'configurationPageUUID',\n                  {\n                    rules: [{ required: false, message: $t('device.deviceConfigurationPageName') }],\n                  },\n                ]"}]},e._l(e.displayPageList,(function(a,r){return t("a-select-option",{key:r,attrs:{value:a.value}},[e._v(" "+e._s(a.label)+" ")])})),1)],1),t("a-form-item",{attrs:{label:e.$t("dataModel.Port"),labelCol:{span:7},wrapperCol:{span:10}}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["port",{rules:[{required:!0,message:e.$t("dataModel.Port"),whitespace:!0,initialValue:162}]}],expression:"['port', {rules: [{ required: true, message: $t('dataModel.Port'), whitespace: true,initialValue:162}]}]"}],attrs:{autocomplete:"autocomplete"}})],1),t("a-form-item",{attrs:{label:e.$t("dataModel.gatherNumber"),labelCol:{span:7},wrapperCol:{span:10}}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["gatherNumber",{rules:[{required:!0,message:e.$t("dataModel.gatherNumber"),whitespace:!0}]}],expression:"['gatherNumber', {rules: [{ required: true, message: $t('dataModel.gatherNumber'), whitespace: true}]}]"}],attrs:{autocomplete:"autocomplete"}})],1),t("a-form-item",{attrs:{label:e.$t("dataModel.snmpVersion"),labelCol:{span:7},wrapperCol:{span:10}}},[t("a-select",{directives:[{name:"decorator",rawName:"v-decorator",value:["version",{rules:[{required:!0,message:e.$t("dataModel.snmpVersion"),whitespace:!0}]}],expression:"['version', {rules: [{ required: true, message: $t('dataModel.snmpVersion'), whitespace: true}]}]"}],attrs:{autocomplete:"autocomplete"},on:{change:e.handleSelectChange}},[t("a-select-option",{attrs:{value:"1"}},[e._v("V1")]),t("a-select-option",{attrs:{value:"2"}},[e._v("V2")]),t("a-select-option",{attrs:{value:"3"}},[e._v("V3")])],1)],1),3!==e.version?t("div",[t("a-form-item",{attrs:{label:e.$t("dataModel.snmpWriteComm"),labelCol:{span:7},wrapperCol:{span:10}}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["writecomm",{rules:[{required:!0,message:e.$t("dataModel.snmpWriteComm"),whitespace:!0}]}],expression:"['writecomm', {rules: [{ required: true, message: $t('dataModel.snmpWriteComm'), whitespace: true}]}]"}],attrs:{autocomplete:"autocomplete"}})],1),t("a-form-item",{attrs:{label:e.$t("dataModel.snmpReadComm"),labelCol:{span:7},wrapperCol:{span:10}}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["readcomm",{rules:[{required:!0,message:e.$t("dataModel.snmpReadComm"),whitespace:!0}]}],expression:"['readcomm', {rules: [{ required: true, message: $t('dataModel.snmpReadComm'), whitespace: true}]}]"}],attrs:{autocomplete:"autocomplete"}})],1)],1):e._e(),3===e.version?t("div",[t("a-form-item",{attrs:{label:e.$t("dataModel.snmpSecurityLevel"),labelCol:{span:7},wrapperCol:{span:10}}},[t("a-select",{directives:[{name:"decorator",rawName:"v-decorator",value:["snmpSecurityLevel",{rules:[{required:!0,message:e.$t("dataModel.snmpSecurityLevel"),whitespace:!0}]}],expression:"['snmpSecurityLevel', {rules: [{ required: true, message: $t('dataModel.snmpSecurityLevel'), whitespace: true}]}]"}],attrs:{autocomplete:"autocomplete"},on:{change:e.securityLevelSelectChange}},[t("a-select-option",{attrs:{value:"1"}},[e._v(e._s(e.$t("dataModel.snmpLevelNoAuthNoPrivacy")))]),t("a-select-option",{attrs:{value:"2"}},[e._v(e._s(e.$t("dataModel.snmpLevelAuthNoPrivacy")))]),t("a-select-option",{attrs:{value:"3"}},[e._v(e._s(e.$t("dataModel.snmpLevelAuthPrivacy")))])],1)],1),2==e.securityLevel||3==e.securityLevel?t("a-form-item",{attrs:{label:e.$t("dataModel.snmpUserName"),labelCol:{span:7},wrapperCol:{span:10}}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["snmpUserName",{rules:[{required:!0,message:e.$t("dataModel.snmpUserName"),whitespace:!0}]}],expression:"['snmpUserName', {rules: [{ required: true, message: $t('dataModel.snmpUserName'), whitespace: true}]}]"}],attrs:{autocomplete:"autocomplete"}})],1):e._e(),2==e.securityLevel||3==e.securityLevel?t("a-form-item",{attrs:{label:e.$t("dataModel.snmpAuthAlgorithm"),labelCol:{span:7},wrapperCol:{span:10}}},[t("a-select",{directives:[{name:"decorator",rawName:"v-decorator",value:["snmpAuthAlgorithm",{rules:[{required:!0,message:e.$t("dataModel.snmpAuthAlgorithm"),whitespace:!0}]}],expression:"['snmpAuthAlgorithm', {rules: [{ required: true, message: $t('dataModel.snmpAuthAlgorithm'), whitespace: true}]}]"}],attrs:{autocomplete:"autocomplete"}},[t("a-select-option",{attrs:{value:"1"}},[e._v("MD5")]),t("a-select-option",{attrs:{value:"2"}},[e._v("SHA")])],1)],1):e._e(),2==e.securityLevel||3==e.securityLevel?t("a-form-item",{attrs:{label:e.$t("dataModel.snmpUserPassword"),labelCol:{span:7},wrapperCol:{span:10}}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["snmpUserPassword",{rules:[{required:!0,message:e.$t("dataModel.snmpUserPassword"),whitespace:!0}]}],expression:"['snmpUserPassword', {rules: [{ required: true, message: $t('dataModel.snmpUserPassword'), whitespace: true}]}]"}],attrs:{autocomplete:"autocomplete"}})],1):e._e(),3==e.securityLevel?t("a-form-item",{attrs:{label:e.$t("dataModel.snmpPrivacyAlgorithm"),labelCol:{span:7},wrapperCol:{span:10}}},[t("a-select",{directives:[{name:"decorator",rawName:"v-decorator",value:["snmpPrivacyAlgorithm",{rules:[{required:!0,message:e.$t("dataModel.snmpPrivacyAlgorithm"),whitespace:!0}]}],expression:"['snmpPrivacyAlgorithm', {rules: [{ required: true, message: $t('dataModel.snmpPrivacyAlgorithm'), whitespace: true}]}]"}],attrs:{autocomplete:"autocomplete"}},[t("a-select-option",{attrs:{value:"1"}},[e._v("DES")]),t("a-select-option",{attrs:{value:"2"}},[e._v("AES")]),t("a-select-option",{attrs:{value:"3"}},[e._v("AES192")]),t("a-select-option",{attrs:{value:"4"}},[e._v("AES256")])],1)],1):e._e(),3==e.securityLevel?t("a-form-item",{attrs:{label:e.$t("dataModel.snmpPrivacyPassword"),labelCol:{span:7},wrapperCol:{span:10}}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["snmpPrivacyPassword",{rules:[{required:!0,message:e.$t("dataModel.snmpPrivacyPassword"),whitespace:!0}]}],expression:"['snmpPrivacyPassword', {rules: [{ required: true, message: $t('dataModel.snmpPrivacyPassword'), whitespace: true}]}]"}],attrs:{autocomplete:"autocomplete"}})],1):e._e()],1):e._e(),t("a-form-item",{staticStyle:{"margin-top":"24px"},attrs:{wrapperCol:{span:10,offset:7}}},[t("a-button",{attrs:{type:"primary",htmlType:"submit"}},[e._v(e._s(e.$t("dataModel.add")))]),t("a-button",{staticStyle:{"margin-left":"8px"},on:{click:function(t){return e.onBlackCLK()}}},[e._v(e._s(e.$t("dataModel.back")))])],1)],1)],1)],1)}),[],!1,null,null,null)
/* harmony default export */;t.default=i.exports},
/***/f682:
/***/function(e,t,a){"use strict";
/* harmony import */a("2b8b");
/* harmony import */}}]);