(window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-2e4134ee"],{
/***/"0e1f":
/***/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 s})),
/* harmony export (binding) */a.d(t,"c",(function(){return d})),
/* harmony export (binding) */a.d(t,"d",(function(){return f})),
/* harmony export (binding) */a.d(t,"e",(function(){return b})),
/* harmony export (binding) */a.d(t,"f",(function(){return h})),
/* harmony export (binding) */a.d(t,"g",(function(){return O})),
/* harmony export (binding) */a.d(t,"h",(function(){return w})),
/* harmony export (binding) */a.d(t,"i",(function(){return M}));
/* harmony import */var r=a("c7eb"),n=a("1da1"),o=a("7424"),i=a("b775");
/* harmony import */
/**
 * 模型添加
 */
function c(e){return u.apply(this,arguments)}
/**
 * 模型删除
 */function u(){return(u=Object(n.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(i.g)(o.HJ212MODELADD,i.b.POST,t));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function s(e){return l.apply(this,arguments)}
/**
 * modbus模型修改
 */function l(){return(l=Object(n.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(i.g)(o.HJ212MODELDEL,i.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(n.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(i.g)(o.HJ212MODELEDIT,i.b.POST,t));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function f(e){return m.apply(this,arguments)}function m(){return(m=Object(n.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(i.g)(o.HJ212MODELLIST,i.b.POST,t));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function b(e){return g.apply(this,arguments)}function g(){return(g=Object(n.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(i.g)(o.HJ212MODELNODEIDADD,i.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(n.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(i.g)(o.HJ212MODELNODEIDDEL,i.b.POST,t));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function O(e){return y.apply(this,arguments)}function y(){return(y=Object(n.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(i.g)(o.HJ212MODELNODEIDEDIT,i.b.POST,t));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function w(e){return j.apply(this,arguments)}function j(){return(j=Object(n.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(i.g)(o.HJ212MODELNODEIDLIST,i.b.POST,t));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function M(){return D.apply(this,arguments)}function D(){return(D=Object(n.a)(Object(r.a)().mark((function e(){return Object(r.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(i.g)(o.HJ212TEMPLETEIDLIST,i.b.POST));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}
/* unused harmony default export */},
/***/"0e4e":
/***/function(e,t,a){"use strict";
/* harmony import */a("30cc");
/* harmony import */},
/***/"30cc":
/***/function(e,t,a){
// extracted by mini-css-extract-plugin
/***/},
/***/"6e62":
/***/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/hj212/hj212ModelAdd.vue?vue&type=template&id=23008ff1&scoped=true
var r=a("0e1f"),n=a("456a"),o={name:"HJ212ModelAdd",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(n.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(n.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 n={};n.label=t[r].PageName,n.value=t[r].PageId,n.pageType=t[r].PageType,n.pageModelUuid=t[r].modelId,a.displayPageList.push(n)}}}))},onSubmit:function(e){var t=this;e.preventDefault();var a=this;this.form.validateFields((function(e){if(!e){t.messageShowLoad=!0;var n={name:t.form.getFieldValue("name"),dec:t.form.getFieldValue("dec"),configUid:t.form.getFieldValue("configurationModel"),PageUUID:t.form.getFieldValue("configurationPageUUID"),type:470};Object(r.a)(n).then((function(e){a.messageShowLoad=!1,2002==e.data.code&&(a.$message.success(a.$t("dataModel.modelAddSuccess"),3),a.$router.push("/DeviceModel/HJ212Model"))})).catch((function(){a.messageShowLoad=!1,a.$message.error(a.$t("loginPage.serverError"),3)}))}}))},onBlackCLK:function(){this.$router.push("/DeviceModel/HJ212Model")}}},i=(a("0e4e"),a("2877")),c=Object(i.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",{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,"23008ff1",null)
/* harmony default export */;t.default=c.exports}}]);