(window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-2bb05177"],{
/***/"469c":
/***/function(e,t,a){
// extracted by mini-css-extract-plugin
/***/},
/***/"63c5":
/***/function(e,t,a){"use strict";
/* harmony export (binding) */a.d(t,"a",(function(){return s})),
/* harmony export (binding) */a.d(t,"c",(function(){return u})),
/* harmony export (binding) */a.d(t,"b",(function(){return d})),
/* harmony export (binding) */a.d(t,"d",(function(){return m})),
/* harmony export (binding) */a.d(t,"e",(function(){return b})),
/* harmony export (binding) */a.d(t,"f",(function(){return g})),
/* harmony export (binding) */a.d(t,"h",(function(){return v})),
/* harmony export (binding) */a.d(t,"g",(function(){return h})),
/* harmony export (binding) */a.d(t,"i",(function(){return C})),
/* harmony export (binding) */a.d(t,"m",(function(){return y})),
/* harmony export (binding) */a.d(t,"l",(function(){return T})),
/* harmony export (binding) */a.d(t,"j",(function(){return B})),
/* harmony export (binding) */a.d(t,"k",(function(){return L}));
/* harmony import */var r=a("c7eb"),o=a("1da1"),n=a("7424"),i=a("b775");
/* harmony import */
/**
 * 串口列表获取
 */
function s(){return l.apply(this,arguments)}
/**
 * 模型添加
 */function l(){return(l=Object(o.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)(n.COMLIST,i.b.POST));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function u(e){return c.apply(this,arguments)}
/**
 * 模型列表
 */function c(){return(c=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(i.g)(n.MODBUSMODELADD,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(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(i.g)(n.MODBUSMODELLIST,i.b.POST,t));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function m(e){return f.apply(this,arguments)}
/**
 * modbus模型修改
 */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(i.g)(n.MODBUSMODELDEL,i.b.POST,t));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function b(e){return S.apply(this,arguments)}
/**
 * modbus寄存器组添加
 */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(i.g)(n.MODBUSMODELEDIT,i.b.POST,t));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function g(e){return M.apply(this,arguments)}
/**
 * modbus寄存器组编辑
 */function M(){return(M=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(i.g)(n.MODBUSMODELGROUPADD,i.b.POST,t));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function v(e){return O.apply(this,arguments)}
/**
 * modbus寄存器组添加
 */function O(){return(O=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(i.g)(n.MODBUSMODELGROUPEDIT,i.b.POST,t));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function h(e){return w.apply(this,arguments)}
/**
 * modbus寄存器组列表
 */function w(){return(w=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(i.g)(n.MODBUSMODELGROUPDEL,i.b.POST,t));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function C(e){return P.apply(this,arguments)}
/**
 * modbus寄存器组里的寄存器列表
 */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(i.g)(n.MODBUSMODELGROUPLIST,i.b.POST,t));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function y(e){return D.apply(this,arguments)}
/**
 * modbus寄存器组里的寄存器编辑
 */function D(){return(D=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(i.g)(n.MODBUSMODELREGISTERADDRESSLIST,i.b.POST,t));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function T(e){return j.apply(this,arguments)}
/**
 * modbus寄存器组里的寄存器添加
 */function j(){return(j=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(i.g)(n.MODBUSMODELREGISTERADDRESSEDIT,i.b.POST,t));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function B(e){return $.apply(this,arguments)}
/**
 * modbus寄存器组里的寄存器删除
 */function $(){return($=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(i.g)(n.MODBUSMODELREGISTERADDRESSADD,i.b.POST,t));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function L(e){return _.apply(this,arguments)}function _(){return(_=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(i.g)(n.MODBUSMODELREGISTERADDRESSDEL,i.b.POST,t));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}
/* unused harmony default export */},
/***/9070:
/***/function(e,t,a){"use strict";
/* harmony import */a("469c");
/* harmony import */},
/***/e405:
/***/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/CJT188/CJT188ModelAdd.vue?vue&type=template&id=f7b974a2&scoped=true
var r=a("63c5"),o=a("456a"),n={name:"ModbusModelAdd",i18n:a("89fe"),data:function(){return{error:"",COMList:[],configurationModel:[],displayPageList:[],BaudList:["1200","2400","4800","9600","19200","38400","115200"],SerialDataBitList:["5","6","7","8"],SerialStopBitList:["1","2","1.5"],SerialFlowList:["None","XOn/XOff","RTS/CTS"],ModbusSerialMode:["RTU","ASCII"],ModbusTCPMode:["RTU","ASCII","TCP/IP"],SerialVerifyList:["None","Even","Odd"],modbusConnectType:"Serial",messageShowLoad:!1,form:this.$form.createForm(this),version:1,value:1}},mounted:function(){this.getConfigurationModel(),this.getCommList()},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"),type:490,gatherNumber:0,port:parseInt(t.form.getFieldValue("Port")),CJT188Timeout:parseInt(t.form.getFieldValue("timeout")),CJT188DataFormat:t.form.getFieldValue("DataFormat"),configUid:t.form.getFieldValue("configurationModel"),PageUUID:t.form.getFieldValue("configurationPageUUID"),CJT188TCPClientIpaddress:t.form.getFieldValue("IpAddress"),CJT188ConnectType:t.form.getFieldValue("modbusConnectType"),CJT188ConnectMode:t.form.getFieldValue("ModbusType"),CJT188ConnectCOMName:t.form.getFieldValue("SerialPort"),CJT188SerialBaud:parseInt(t.form.getFieldValue("SerialPortBaud")),CJT188SerialBits:parseInt(t.form.getFieldValue("SerialPortDataBit")),CJT188SerialParity:t.form.getFieldValue("SerialPortVerifyBit"),CJT188SerialStopBits:t.form.getFieldValue("SerialPortStopBit"),CJT188SerialFlow:t.form.getFieldValue("SerialPortFlow")};Object(r.c)(o).then((function(e){a.messageShowLoad=!1,2002==e.data.code&&(a.$message.success(a.$t("dataModel.modelAddSuccess"),3),a.$router.push("/DeviceModel/CJT188Model"))})).catch((function(){a.messageShowLoad=!1,a.$message.error(a.$t("loginPage.serverError"),3)}))}}))},onBlackCLK:function(){this.$router.push("/DeviceModel/DLT645Model")},getCommList:function(){var e=this;e.messageShowLoad=!0,this.$nextTick((function(){e.form.setFieldsValue({timeout:"1000",modbusConnectType:e.modbusConnectType,ModbusType:"RTU",DataFormat:"BigEndian",SerialPort:e.COMList[0],SerialPortBaud:"9600",SerialPortDataBit:"8",SerialPortVerifyBit:"None",SerialPortStopBit:"1",SerialPortFlow:"None"})})),Object(r.a)().then((function(t){e.COMList=t.data,e.form.setFieldsValue({modbusConnectType:e.modbusConnectType,ModbusType:"RTU",SerialPort:e.COMList[0],SerialPortBaud:"9600",SerialPortDataBit:"8",SerialPortVerifyBit:"None",SerialPortStopBit:"1",SerialPortFlow:"None"}),e.messageShowLoad=!1}))},handleSelectChange:function(e){this.modbusConnectType=e}}},i=(a("9070"),a("2877")),s=Object(i.a)(n,(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.modbusModel.connection"),labelCol:{span:7},wrapperCol:{span:10}}},[t("a-select",{directives:[{name:"decorator",rawName:"v-decorator",value:["modbusConnectType",{rules:[{required:!0,message:e.$t("dataModel.modbusModel.connection"),whitespace:!0}]}],expression:"['modbusConnectType', {rules: [{ required: true, message: $t('dataModel.modbusModel.connection'), whitespace: true}]}]"}],attrs:{autocomplete:"autocomplete"},on:{change:e.handleSelectChange}},[t("a-select-option",{attrs:{value:"Serial"}},[e._v(e._s(e.$t("dataModel.modbusModel.SerialConnection")))]),t("a-select-option",{attrs:{value:"TCPClient"}},[e._v(e._s(e.$t("dataModel.modbusModel.TCPClientConnection")))]),t("a-select-option",{attrs:{value:"TCPServer"}},[e._v(e._s(e.$t("dataModel.modbusModel.TCPServerConnection")))])],1)],1),t("a-form-item",{attrs:{label:e.$t("dataModel.TimeOut"),labelCol:{span:7},wrapperCol:{span:10}}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["timeout",{rules:[{required:!0,message:e.$t("dataModel.TimeOut"),whitespace:!0,initialValue:"1000"}]}],expression:"['timeout', {rules: [{ required: true, message: $t('dataModel.TimeOut'), whitespace: true,initialValue:'1000'}]}]"}]})],1),t("a-form-item",{attrs:{labelCol:{span:7},wrapperCol:{span:10}}},[t("span",{attrs:{slot:"label"},slot:"label"},[e._v(" "+e._s(e.$t("dataModel.DataFormat"))+"  "),t("a-tooltip",{attrs:{title:e.$t("dataModel.DataFormatTips")}},[t("a-icon",{attrs:{type:"question-circle-o"}})],1)],1),t("a-select",{directives:[{name:"decorator",rawName:"v-decorator",value:["DataFormat",{rules:[{required:!0,message:e.$t("dataModel.DataFormat"),whitespace:!0}]}],expression:"['DataFormat', {rules: [{ required: true, message: $t('dataModel.DataFormat'), whitespace: true}]}]"}],attrs:{autocomplete:"autocomplete"}},[t("a-select-option",{attrs:{value:"BigEndian"}},[e._v(e._s(e.$t("dataModel.DataFormatBigEndian")))]),t("a-select-option",{attrs:{value:"LittleEndian"}},[e._v(e._s(e.$t("dataModel.DataFormatLittleEndian")))])],1)],1),"Serial"==e.modbusConnectType?t("div",[t("a-form-item",{attrs:{label:e.$t("dataModel.modbusModel.SerialConnection"),labelCol:{span:7},wrapperCol:{span:10}}},[t("a-select",{directives:[{name:"decorator",rawName:"v-decorator",value:["SerialPort",{rules:[{required:!0,message:e.$t("dataModel.modbusModel.SerialConnection"),whitespace:!0}]}],expression:"['SerialPort', {rules: [{ required: true, message: $t('dataModel.modbusModel.SerialConnection'), whitespace: true}]}]"}]},e._l(e.COMList,(function(a){return t("a-select-option",{key:a,attrs:{value:a}},[e._v(" "+e._s(a)+" ")])})),1)],1),t("a-form-item",{attrs:{label:e.$t("dataModel.modbusModel.SerialBaud"),labelCol:{span:7},wrapperCol:{span:10}}},[t("a-select",{directives:[{name:"decorator",rawName:"v-decorator",value:["SerialPortBaud",{rules:[{required:!0,message:e.$t("dataModel.modbusModel.SerialBaud"),whitespace:!0}]}],expression:"['SerialPortBaud', {rules: [{ required: true, message: $t('dataModel.modbusModel.SerialBaud'), whitespace: true}]}]"}]},e._l(e.BaudList,(function(a){return t("a-select-option",{key:a,attrs:{value:a}},[e._v(" "+e._s(a)+" ")])})),1)],1),t("a-form-item",{attrs:{label:e.$t("dataModel.modbusModel.SerialPortDataBit"),labelCol:{span:7},wrapperCol:{span:10}}},[t("a-select",{directives:[{name:"decorator",rawName:"v-decorator",value:["SerialPortDataBit",{rules:[{required:!0,message:e.$t("dataModel.modbusModel.SerialPortDataBit"),whitespace:!0}]}],expression:"['SerialPortDataBit', {rules: [{ required: true, message: $t('dataModel.modbusModel.SerialPortDataBit'), whitespace: true}]}]"}]},e._l(e.SerialDataBitList,(function(a){return t("a-select-option",{key:a,attrs:{value:a}},[e._v(" "+e._s(a)+" ")])})),1)],1),t("a-form-item",{attrs:{label:e.$t("dataModel.modbusModel.SerialPortVerifyBit"),labelCol:{span:7},wrapperCol:{span:10}}},[t("a-select",{directives:[{name:"decorator",rawName:"v-decorator",value:["SerialPortVerifyBit",{rules:[{required:!0,message:e.$t("dataModel.modbusModel.SerialPortVerifyBit"),whitespace:!0}]}],expression:"['SerialPortVerifyBit', {rules: [{ required: true, message: $t('dataModel.modbusModel.SerialPortVerifyBit'), whitespace: true}]}]"}]},e._l(e.SerialVerifyList,(function(a){return t("a-select-option",{key:a,attrs:{value:a}},[e._v(" "+e._s(a)+" ")])})),1)],1),t("a-form-item",{attrs:{label:e.$t("dataModel.modbusModel.SerialPortStopBit"),labelCol:{span:7},wrapperCol:{span:10}}},[t("a-select",{directives:[{name:"decorator",rawName:"v-decorator",value:["SerialPortStopBit",{rules:[{required:!0,message:e.$t("dataModel.modbusModel.SerialPortStopBit"),whitespace:!0}]}],expression:"['SerialPortStopBit', {rules: [{ required: true, message: $t('dataModel.modbusModel.SerialPortStopBit'), whitespace: true}]}]"}]},e._l(e.SerialStopBitList,(function(a){return t("a-select-option",{key:a,attrs:{value:a}},[e._v(" "+e._s(a)+" ")])})),1)],1),t("a-form-item",{attrs:{label:e.$t("dataModel.modbusModel.SerialPortFlow"),labelCol:{span:7},wrapperCol:{span:10}}},[t("a-select",{directives:[{name:"decorator",rawName:"v-decorator",value:["SerialPortFlow",{rules:[{required:!0,message:e.$t("dataModel.modbusModel.SerialPortFlow"),whitespace:!0}]}],expression:"['SerialPortFlow', {rules: [{ required: true, message: $t('dataModel.modbusModel.SerialPortFlow'), whitespace: true}]}]"}]},e._l(e.SerialFlowList,(function(a){return t("a-select-option",{key:a,attrs:{value:a}},[e._v(" "+e._s(a)+" ")])})),1)],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,"f7b974a2",null)
/* harmony default export */;t.default=s.exports}}]);