(window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-1f3f14a4"],{
/***/4240:
/***/function(e,t,a){"use strict";
/* harmony import */a("6677");
/* harmony import */},
/***/6677:
/***/function(e,t,a){
// extracted by mini-css-extract-plugin
/***/},
/***/8448:
/***/function(e,t,a){"use strict";
/* harmony export (binding) */a.d(t,"a",(function(){return c})),
/* harmony export (binding) */a.d(t,"b",(function(){return u})),
/* harmony export (binding) */a.d(t,"c",(function(){return d})),
/* harmony export (binding) */a.d(t,"h",(function(){return m})),
/* harmony export (binding) */a.d(t,"d",(function(){return h})),
/* harmony export (binding) */a.d(t,"e",(function(){return M})),
/* harmony export (binding) */a.d(t,"f",(function(){return y})),
/* harmony export (binding) */a.d(t,"g",(function(){return C}));
/* harmony import */var r=a("c7eb"),o=a("1da1"),i=a("7424"),n=a("b775");
/* harmony import */
/**
 * 模型添加
 */
function c(e){return s.apply(this,arguments)}
/**
 * 模型删除
 */function s(){return(s=Object(o.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)(i.OPCUAMODELADD,n.b.POST,t));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function u(e){return l.apply(this,arguments)}
/**
 * modbus模型修改
 */function l(){return(l=Object(o.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)(i.OPCUAMODELDEL,n.b.POST,t));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function d(e){return p.apply(this,arguments)}
/**
 * 模型列表
 */function p(){return(p=Object(o.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)(i.OPCUAMODELEDIT,n.b.POST,t));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function m(e){return f.apply(this,arguments)}function f(){return(f=Object(o.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)(i.OPCUAMODELLIST,n.b.POST,t));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function h(e){return v.apply(this,arguments)}function v(){return(v=Object(o.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)(i.OPCUAMODELNODEIDADD,n.b.POST,t));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function M(e){return g.apply(this,arguments)}function g(){return(g=Object(o.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)(i.OPCUAMODELNODEIDDEL,n.b.POST,t));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function y(e){return b.apply(this,arguments)}function b(){return(b=Object(o.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)(i.OPCUAMODELNODEIDEDIT,n.b.POST,t));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function C(e){return P.apply(this,arguments)}function P(){return(P=Object(o.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)(i.OPCUAMODELNODEIDLIST,n.b.POST,t));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}
/* unused harmony default export */},
/***/f6df:
/***/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/opcua/OpcuaModelAdd.vue?vue&type=template&id=270e47e4&scoped=true
var r=a("8448"),o=a("456a"),i={name:"OpcuaModelAdd",i18n:a("89fe"),data:function(){return{error:"",COMList:[],CertificatePrivateKey:"",CertificatePath:"",OPCUAConnectType:1,SecurityModes:1,SecurityPolicy:1,Authentication:1,configurationModel:[],displayPageList:[],messageShowLoad:!1,form:this.$form.createForm(this),version:1,value:1}},mounted:function(){this.getConfigurationModel(),this.$nextTick((function(){this.form.setFieldsValue({gatherNumber:"30",opcuaConnectType:"1",SecurityPolicy:"1",SecurityModes:"1",Authentication:"1"})}))},computed:{desc:function(){return this.$t("pageDesc")}},methods:{getConfigurationModel:function(){this.configurationModel=[];var e=this;Object(o.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(o.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 o={};o.label=t[r].PageName,o.value=t[r].PageId,o.pageType=t[r].PageType,o.pageModelUuid=t[r].modelId,a.displayPageList.push(o)}}}))},onSubmit:function(e){var t=this;e.preventDefault();var a=this;this.form.validateFields((function(e){if(!e){t.messageShowLoad=!0;var o={name:t.form.getFieldValue("name"),dec:t.form.getFieldValue("dec"),configUid:t.form.getFieldValue("configurationModel"),PageUUID:t.form.getFieldValue("configurationPageUUID"),type:3,gatherNumber:parseInt(t.form.getFieldValue("gatherNumber")),OPCUAConnectType:parseInt(t.form.getFieldValue("opcuaConnectType")),OPCUASecurityPolicies:parseInt(t.form.getFieldValue("SecurityPolicy")),OPCUASecurityModes:parseInt(t.form.getFieldValue("SecurityModes")),OPCUAAuthModes:parseInt(t.form.getFieldValue("Authentication"))};2==o.OPCUAAuthModes?(o.OPCUAConnectUserName=t.form.getFieldValue("AuthenticationUser"),o.OPCUAConnectPassword=t.form.getFieldValue("AuthenticationPassword")):3==o.OPCUAAuthModes&&(o.OPCUACertificatePath=t.form.getFieldValue("CertificatePath"),o.OPCUAPrivateKeyPath=t.form.getFieldValue("CertificatePrivateKey")),Object(r.a)(o).then((function(e){a.messageShowLoad=!1,2002==e.data.code&&(a.$message.success(a.$t("dataModel.modelAddSuccess"),3),a.$router.push("/DeviceModel/OPCUAModel"))})).catch((function(){a.messageShowLoad=!1,a.$message.error(a.$t("loginPage.serverError"),3)}))}}))},onBlackCLK:function(){this.$router.push("/DeviceModel/OPCUAModel")},handleConnectionSelectChange:function(e){this.OPCUAConnectType=e},handleSecurityModesChange:function(e){this.SecurityModes=e},handleSecurityPolicyChange:function(e){this.SecurityPolicy=e},handleAuthenticationChange:function(e){this.Authentication=e}}},n=(a("4240"),a("2877")),c=Object(n.a)(i,(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.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.opcuaModel.connection"),labelCol:{span:7},wrapperCol:{span:10}}},[t("a-select",{directives:[{name:"decorator",rawName:"v-decorator",value:["opcuaConnectType",{rules:[{required:!0,message:e.$t("dataModel.opcuaModel.connection"),whitespace:!0}]}],expression:"['opcuaConnectType', {rules: [{ required: true, message: $t('dataModel.opcuaModel.connection'), whitespace: true}]}]"}],attrs:{autocomplete:"autocomplete"},on:{change:e.handleConnectionSelectChange}},[t("a-select-option",{attrs:{value:"1"}},[e._v(e._s(e.$t("dataModel.opcuaModel.connectionTcp")))]),t("a-select-option",{attrs:{value:"2"}},[e._v(e._s(e.$t("dataModel.opcuaModel.connectionHttps")))])],1)],1),t("a-form-item",{attrs:{label:e.$t("dataModel.opcuaModel.SecurityPolicy"),labelCol:{span:7},wrapperCol:{span:10}}},[t("a-select",{directives:[{name:"decorator",rawName:"v-decorator",value:["SecurityPolicy",{rules:[{required:!0,message:e.$t("dataModel.opcuaModel.SecurityPolicy"),whitespace:!0}]}],expression:"['SecurityPolicy', {rules: [{ required: true, message: $t('dataModel.opcuaModel.SecurityPolicy'), whitespace: true}]}]"}],attrs:{autocomplete:"autocomplete"},on:{change:e.handleSecurityPolicyChange}},[t("a-select-option",{attrs:{value:"1"}},[e._v(e._s(e.$t("dataModel.opcuaModel.SecurityPolicyNone")))]),t("a-select-option",{attrs:{value:"2"}},[e._v(e._s(e.$t("dataModel.opcuaModel.SecurityPolicyBasic128Rsa15")))]),t("a-select-option",{attrs:{value:"3"}},[e._v(e._s(e.$t("dataModel.opcuaModel.SecurityPolicyBasic256")))]),t("a-select-option",{attrs:{value:"4"}},[e._v(e._s(e.$t("dataModel.opcuaModel.SecurityPolicyBasic256Sha256")))]),t("a-select-option",{attrs:{value:"5"}},[e._v(e._s(e.$t("dataModel.opcuaModel.SecurityPolicyAes128Sha256Rsa0aep")))]),t("a-select-option",{attrs:{value:"6"}},[e._v(e._s(e.$t("dataModel.opcuaModel.SecurityPolicyAes256Sha256RsaPss")))])],1)],1),t("a-form-item",{attrs:{label:e.$t("dataModel.opcuaModel.SecurityModes"),labelCol:{span:7},wrapperCol:{span:10}}},[t("a-select",{directives:[{name:"decorator",rawName:"v-decorator",value:["SecurityModes",{rules:[{required:!0,message:e.$t("dataModel.opcuaModel.SecurityModes"),whitespace:!0}]}],expression:"['SecurityModes', {rules: [{ required: true, message: $t('dataModel.opcuaModel.SecurityModes'), whitespace: true}]}]"}],attrs:{autocomplete:"autocomplete"},on:{change:e.handleSecurityModesChange}},[t("a-select-option",{attrs:{value:"1"}},[e._v(e._s(e.$t("dataModel.opcuaModel.SecurityModesNone")))]),t("a-select-option",{attrs:{value:"2"}},[e._v(e._s(e.$t("dataModel.opcuaModel.SecurityModesSign")))]),t("a-select-option",{attrs:{value:"3"}},[e._v(e._s(e.$t("dataModel.opcuaModel.SecurityModesSignAndEncrypt")))])],1)],1),t("a-form-item",{attrs:{label:e.$t("dataModel.opcuaModel.Authentication"),labelCol:{span:7},wrapperCol:{span:10}}},[t("a-select",{directives:[{name:"decorator",rawName:"v-decorator",value:["Authentication",{rules:[{required:!0,message:e.$t("dataModel.opcuaModel.Authentication"),whitespace:!0}]}],expression:"['Authentication', {rules: [{ required: true, message: $t('dataModel.opcuaModel.Authentication'), whitespace: true}]}]"}],attrs:{autocomplete:"autocomplete"},on:{change:e.handleAuthenticationChange}},[t("a-select-option",{attrs:{value:"1"}},[e._v(e._s(e.$t("dataModel.opcuaModel.AuthenticationAnonymous")))]),t("a-select-option",{attrs:{value:"2"}},[e._v(e._s(e.$t("dataModel.opcuaModel.AuthenticationUserPassword")))]),t("a-select-option",{attrs:{value:"3"}},[e._v(e._s(e.$t("dataModel.opcuaModel.AuthenticationCertificate")))])],1)],1),2==e.Authentication?t("div",[t("a-form-item",{attrs:{label:e.$t("dataModel.opcuaModel.AuthenticationUser"),labelCol:{span:7},wrapperCol:{span:10}}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["AuthenticationUser",{rules:[{required:!0,message:e.$t("dataModel.opcuaModel.AuthenticationUser"),whitespace:!0}]}],expression:"['AuthenticationUser', {rules: [{ required: true, message: $t('dataModel.opcuaModel.AuthenticationUser'), whitespace: true}]}]"}]})],1),t("a-form-item",{attrs:{label:e.$t("dataModel.opcuaModel.AuthenticationPassword"),labelCol:{span:7},wrapperCol:{span:10}}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["AuthenticationPassword",{rules:[{required:!0,message:e.$t("dataModel.opcuaModel.AuthenticationPassword"),whitespace:!0}]}],expression:"['AuthenticationPassword', {rules: [{ required: true, message: $t('dataModel.opcuaModel.AuthenticationPassword'), whitespace: true}]}]"}]})],1)],1):3==e.Authentication?t("div",[t("a-form-item",{attrs:{label:e.$t("dataModel.opcuaModel.CertificatePath"),labelCol:{span:7},wrapperCol:{span:10}}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["CertificatePath",{rules:[{required:!0,message:e.$t("dataModel.opcuaModel.CertificatePath"),whitespace:!0}]}],expression:"['CertificatePath', {rules: [{ required: true, message: $t('dataModel.opcuaModel.CertificatePath'), whitespace: true}]}]"}],model:{value:e.CertificatePath,callback:function(t){e.CertificatePath=t},expression:"CertificatePath"}})],1),t("a-form-item",{attrs:{label:e.$t("dataModel.opcuaModel.CertificatePrivateKey"),labelCol:{span:7},wrapperCol:{span:10}}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["CertificatePrivateKey",{rules:[{required:!0,message:e.$t("dataModel.opcuaModel.CertificatePrivateKey"),whitespace:!0}]}],expression:"['CertificatePrivateKey', {rules: [{ required: true, message: $t('dataModel.opcuaModel.CertificatePrivateKey'), whitespace: true}]}]"}],model:{value:e.CertificatePrivateKey,callback:function(t){e.CertificatePrivateKey=t},expression:"CertificatePrivateKey"}})],1)],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,"270e47e4",null)
/* harmony default export */;t.default=c.exports}}]);