(window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-f1ddd7ee"],{"346a":function(e,t,r){"use strict";r.d(t,"a",(function(){return i})),r.d(t,"b",(function(){return s})),r.d(t,"c",(function(){return d})),r.d(t,"d",(function(){return p})),r.d(t,"e",(function(){return m})),r.d(t,"f",(function(){return h})),r.d(t,"g",(function(){return v})),r.d(t,"h",(function(){return M}));var a=r("c964"),n=(r("96cf"),r("7424")),o=r("b775");function i(e){return u.apply(this,arguments)}function u(){return(u=Object(a.a)(regeneratorRuntime.mark((function e(t){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(o.g)(n.MQTTMODELADD,o.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(a.a)(regeneratorRuntime.mark((function e(t){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(o.g)(n.MQTTMODELDEL,o.b.POST,t));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function d(e){return l.apply(this,arguments)}function l(){return(l=Object(a.a)(regeneratorRuntime.mark((function e(t){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(o.g)(n.MQTTMODELEDIT,o.b.POST,t));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function p(e){return f.apply(this,arguments)}function f(){return(f=Object(a.a)(regeneratorRuntime.mark((function e(t){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(o.g)(n.MQTTMODELLIST,o.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(a.a)(regeneratorRuntime.mark((function e(t){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(o.g)(n.MQTTMODELNODEIDADD,o.b.POST,t));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function h(e){return b.apply(this,arguments)}function b(){return(b=Object(a.a)(regeneratorRuntime.mark((function e(t){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(o.g)(n.MQTTMODELNODEIDDEL,o.b.POST,t));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function v(e){return y.apply(this,arguments)}function y(){return(y=Object(a.a)(regeneratorRuntime.mark((function e(t){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(o.g)(n.MQTTMODELNODEIDEDIT,o.b.POST,t));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function M(e){return w.apply(this,arguments)}function w(){return(w=Object(a.a)(regeneratorRuntime.mark((function e(t){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(o.g)(n.MQTTMODELNODEIDLIST,o.b.POST,t));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}},"524b":function(e,t,r){},"57c0":function(e,t,r){"use strict";r("524b")},bf21:function(e,t,r){"use strict";r.r(t);r("b0c0"),r("a4d3"),r("e01a");var a=r("346a"),n=r("456a"),o={name:"MqttModelAdd",i18n:r("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.j)({type:1}).then((function(t){var r={};if(null!=t.data.list)for(var a=0;a<t.data.list.length;a++)r.name=t.data.list[a].name,r.description=t.data.list[a].description,r.uuid=t.data.list[a].displayUid,e.configurationModel.push(r),r={}}))},GetDisplayPage:function(e){var t={muid:e},r=this;this.displayPageList=[],Object(n.k)(t).then((function(e){if(0==e.data.code){var t=e.data.layer;if(t.length>0)for(var a=0;a<t.length;a++){var n={};n.label=t[a].PageName,n.value=t[a].PageId,n.pageType=t[a].PageType,n.pageModelUuid=t[a].modelId,r.displayPageList.push(n)}}}))},onSubmit:function(e){var t=this;e.preventDefault();var r=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:20};Object(a.a)(n).then((function(e){r.messageShowLoad=!1,2002==e.data.code&&(r.$message.success(r.$t("dataModel.modelAddSuccess"),3),r.$router.push("/DeviceModel/MqttModel"))})).catch((function(){r.messageShowLoad=!1,r.$message.error(r.$t("loginPage.serverError"),3)}))}}))},onBlackCLK:function(){this.$router.push("/DeviceModel/MqttModel")}}},i=(r("57c0"),r("2877")),u=Object(i.a)(o,(function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("a-spin",{staticStyle:{padding:"1px"},attrs:{spinning:e.messageShowLoad,tip:"Loading..."}},[r("a-card",{attrs:{"body-style":{padding:"24px 32px"},bordered:!1}},[r("a-form",{attrs:{form:e.form},on:{submit:e.onSubmit}},[r("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:""}}),r("a-form-item",{attrs:{label:e.$t("dataModel.modelName"),labelCol:{span:7},wrapperCol:{span:10}}},[r("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),r("a-form-item",{attrs:{label:e.$t("dataModel.modelDec"),labelCol:{span:7},wrapperCol:{span:10}}},[r("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),r("a-form-item",{attrs:{label:e.$t("device.deviceConfigurationModelName"),labelCol:{span:7},wrapperCol:{span:10}}},[r("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(t,a){return r("a-select-option",{key:a,attrs:{value:t.uuid}},[e._v(" "+e._s(t.name)+" ")])})),1)],1),r("a-form-item",{attrs:{label:e.$t("device.deviceConfigurationPageName"),labelCol:{span:7},wrapperCol:{span:10}}},[r("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(t,a){return r("a-select-option",{key:a,attrs:{value:t.value}},[e._v(" "+e._s(t.label)+" ")])})),1)],1),r("a-form-item",{staticStyle:{"margin-top":"24px"},attrs:{wrapperCol:{span:10,offset:7}}},[r("a-button",{attrs:{type:"primary",htmlType:"submit"}},[e._v(e._s(e.$t("dataModel.add")))]),r("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,"11423db6",null);t.default=u.exports}}]);