(window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-3a14bc76"],{
/***/"376d":
/***/function(e,t,a){"use strict";
/* harmony import */a("adbb");
/* harmony import */},
/***/"684f":
/***/function(e,t,a){"use strict";
/* harmony export (binding) */a.d(t,"a",(function(){return s})),
/* harmony export (binding) */a.d(t,"f",(function(){return c})),
/* harmony export (binding) */a.d(t,"g",(function(){return l})),
/* harmony export (binding) */a.d(t,"h",(function(){return p})),
/* harmony export (binding) */a.d(t,"b",(function(){return g})),
/* harmony export (binding) */a.d(t,"c",(function(){return v})),
/* harmony export (binding) */a.d(t,"d",(function(){return M})),
/* harmony export (binding) */a.d(t,"e",(function(){return y}));
/* harmony import */var o=a("c7eb"),n=a("1da1"),r=a("7424"),i=a("b775");
/* harmony import */
/**
 * 模型添加
 */
function s(e){return d.apply(this,arguments)}
/**
 * 模型删除
 */function d(){return(d=Object(n.a)(Object(o.a)().mark((function e(t){return Object(o.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(i.g)(r.VIRTUALDEVICEMODELADD,i.b.POST,t));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function c(e){return u.apply(this,arguments)}
/**
 * modbus模型修改
 */function u(){return(u=Object(n.a)(Object(o.a)().mark((function e(t){return Object(o.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(i.g)(r.VIRTUALDEVICEMODELDEL,i.b.POST,t));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function l(e){return f.apply(this,arguments)}
/**
 * 模型列表
 */function f(){return(f=Object(n.a)(Object(o.a)().mark((function e(t){return Object(o.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(i.g)(r.VIRTUALDEVICEMODELEDIT,i.b.POST,t));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function p(e){return m.apply(this,arguments)}function m(){return(m=Object(n.a)(Object(o.a)().mark((function e(t){return Object(o.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(i.g)(r.VIRTUALDEVICEMODELLIST,i.b.POST,t));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function g(e){return h.apply(this,arguments)}function h(){return(h=Object(n.a)(Object(o.a)().mark((function e(t){return Object(o.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(i.g)(r.VIRTUALDEVICEMODELDATAADD,i.b.POST,t));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function v(e){return b.apply(this,arguments)}function b(){return(b=Object(n.a)(Object(o.a)().mark((function e(t){return Object(o.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(i.g)(r.VIRTUALDEVICEMODELDATADEL,i.b.POST,t));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function M(e){return D.apply(this,arguments)}function D(){return(D=Object(n.a)(Object(o.a)().mark((function e(t){return Object(o.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(i.g)(r.VIRTUALDEVICEMODELDATAEDIT,i.b.POST,t));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function y(e){return S.apply(this,arguments)}function S(){return(S=Object(n.a)(Object(o.a)().mark((function e(t){return Object(o.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(i.g)(r.VIRTUALDEVICEMODELDATALIST,i.b.POST,t));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}
/* unused harmony default export */},
/***/"6f97":
/***/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("4de4"),a("14d9"),a("d3b7"),a("0643"),a("2382");
// 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/VirtualDevice/VirtualDeviceModel.vue?vue&type=template&id=ba0eb096
var o=a("daf8"),n=a("456a"),r=a("684f"),i={name:"VirtualDeviceModel",i18n:a("89fe"),data:function(){return{pagination:{pageSize:15,showSizeChanger:!0},RESTFulForm:this.$form.createForm(this),AddVisible:!1,messageShowLoad:!1,advanced:!0,refIconLoading:!1,columns:[{width:"10%",slotName:"dataModel.modelTableIndex",scopedSlots:{customRender:"no",title:"dataModel.modelTableIndex"},dataIndex:"no"},{width:"20%",slotName:"dataModel.modelName",scopedSlots:{customRender:"modelName",title:"dataModel.modelName"},dataIndex:"modelName"},{slotName:"dataModel.modelDec",width:"40%",scopedSlots:{customRender:"modelDec",title:"dataModel.modelDec"},dataIndex:"modelDec"},{slotName:"dataModel.modelTableOpt",scopedSlots:{customRender:"action",title:"dataModel.modelTableOpt"}}],dataSource:[],configurationModel:[],displayPageList:[],IsEdit:!1,EditUuid:"",selectedRows:[],textAreValue:"",error:""}},authorize:{},components:{Mtextarea:o.a},mounted:function(){},activated:function(){},created:function(){this.dataSource=[],this.getConfigurationModel(),this.getModelList()},watch:{$route:function(){this.dataSource=[],this.getModelList()}},methods:{addModel:function(){this.AddVisible=!0,this.IsEdit=!1,this.EditUuid="",this.textAreValue="",this.RESTFulForm.setFieldsValue({name:"",description:"",configurationModel:"",configurationPageUUID:""})},GoToEdit:function(e){var t=this;t.AddVisible=!0,""!=e.configUid&&this.GetDisplayPage(e.configUid),setTimeout((function(){t.IsEdit=!0,t.EditUuid=e.key,t.textAreValue=e.modelDec,t.RESTFulForm.setFieldsValue({name:e.modelName,description:e.modelDec,configurationModel:e.configUid,configurationPageUUID:e.PageUUID})}),500)},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 o=0;o<t.length;o++){var n={};n.label=t[o].PageName,n.value=t[o].PageId,n.pageType=t[o].PageType,n.pageModelUuid=t[o].modelId,a.displayPageList.push(n)}}}))},getConfigurationModel:function(){this.configurationModel=[];var e=this;Object(n.m)({type:1}).then((function(t){var a={};if(null!=t.data.list)for(var o=0;o<t.data.list.length;o++)a.name=t.data.list[o].name,a.description=t.data.list[o].description,a.uuid=t.data.list[o].displayUid,e.configurationModel.push(a),a={}}))},onAddSubmit:function(e){var t=this;e.preventDefault();var a=this;this.IsEdit?this.RESTFulForm.validateFields((function(e){if(!e){t.messageShowLoad=!0;var o={uuid:a.EditUuid,data:{name:t.RESTFulForm.getFieldValue("name"),dec:t.RESTFulForm.getFieldValue("description"),configUid:t.RESTFulForm.getFieldValue("configurationModel"),PageUUID:t.RESTFulForm.getFieldValue("configurationPageUUID"),type:480}};Object(r.g)(o).then((function(e){a.messageShowLoad=!1,200==e.data.code?a.$message.success(a.$t("dataModel.editSuccess"),3):a.$message.error(a.$t("dataModel.editFailed"),3),a.getModelList(),a.AddVisible=!1})).catch((function(){a.messageShowLoad=!1,a.$message.error(a.$t("loginPage.serverError"),3)}))}})):this.RESTFulForm.validateFields((function(e){if(!e){t.logging=!0;var o={name:t.RESTFulForm.getFieldValue("name"),dec:t.RESTFulForm.getFieldValue("description"),configUid:t.RESTFulForm.getFieldValue("configurationModel"),PageUUID:t.RESTFulForm.getFieldValue("configurationPageUUID"),type:480};Object(r.a)(o).then((function(e){a.messageShowLoad=!1,2002==e.data.code&&a.$message.success(a.$t("dataModel.modelAddSuccess"),3),a.AddVisible=!1,a.getModelList()})).catch((function(){a.messageShowLoad=!1,a.$message.error(a.$t("loginPage.serverError"),3)}))}}))},refresh:function(){this.refIconLoading=!0,this.getModelList()},getModelList:function(){this.dataSource=[];var e=this;this.messageShowLoad=!0,Object(r.h)({type:480}).then((function(t){var a={};if(e.refIconLoading=!1,e.messageShowLoad=!1,null!=t.data.list)for(var o=0;o<t.data.list.length;o++)a.key=t.data.list[o].uuid,a.no=o+1,a.modelName=t.data.list[o].name,a.modelDec=t.data.list[o].dec,a.configUid=t.data.list[o].configUid,a.PageUUID=t.data.list[o].PageUUID,e.dataSource.push(a),a={}})).catch((function(){e.messageShowLoad=!1,e.$message.error(e.$t("loginPage.serverError"),3)}))},deleteRecord:function(e){var t={uuid:e},a=this;Object(r.f)(t).then((function(t){200==t.data.code?(a.dataSource=a.dataSource.filter((function(t){return t.key!==e})),a.selectedRows=a.selectedRows.filter((function(t){return t.key!==e}))):2004==t.data.code&&a.$message.error(a.$t("dataModel.modelBand"))}))}}},s=(a("80499"),a("2877")),d=Object(s.a)(i,(function(){var e=this,t=e._self._c;return t("a-card",[t("a-space",{staticClass:"operator"},[t("a-button",{attrs:{type:"primary",icon:"plus"},on:{click:e.addModel}},[e._v(e._s(e.$t("dataModel.RESTFulData.AddModel")))]),t("a-button",{attrs:{type:"default",icon:"sync",loading:e.refIconLoading},on:{click:function(t){return e.refresh()}}},[e._v(e._s(e.$t("dataModel.refModel")))])],1),t("a-spin",{staticStyle:{padding:"1px"},attrs:{spinning:e.messageShowLoad,tip:"Loading..."}},[t("a-table",{attrs:{rowKey:"key",pagination:e.pagination,columns:e.columns,"data-source":e.dataSource},scopedSlots:e._u([{key:"no",fn:function(t,a,o,n){return[e._v(" "+e._s(o+1)+" ")]}},{key:"OPCUAConnectType",fn:function(a){return t("div",{},[1==a?t("span",[e._v(" "+e._s(e.$t("dataModel.opcuaModel.connectionTcp")))]):2==a?t("span",[e._v(" "+e._s(e.$t("dataModel.opcuaModel.connectionHttps")))]):e._e()])}},{key:"OPCUAAuthModes",fn:function(a){return t("div",{},[1==a?t("span",[e._v(" "+e._s(e.$t("dataModel.opcuaModel.AuthenticationAnonymous")))]):2==a?t("span",[e._v(" "+e._s(e.$t("dataModel.opcuaModel.AuthenticationUserPassword")))]):3==a?t("span",[e._v(" "+e._s(e.$t("dataModel.opcuaModel.AuthenticationCertificate")))]):e._e()])}},{key:"action",fn:function(a,o){return t("div",{},[t("router-link",{staticStyle:{color:"#13C2C2"},attrs:{to:""},nativeOn:{click:function(t){return e.GoToEdit(o)}}},[t("a-icon",{attrs:{type:"edit"}}),e._v(e._s(e.$t("dataModel.modelDetail")))],1),e._v(" | "),t("router-link",{staticStyle:{color:"darkorange"},attrs:{to:"/DeviceModel/VirtualDeviceData/".concat(o.key)}},[t("a-icon",{attrs:{type:"unordered-list"}}),e._v(e._s(e.$t("dataModel.opcuaModel.NodeIDConfig")))],1),e._v(" | "),t("a-popconfirm",{attrs:{title:e.$t("dataModel.deleteConfirm")},on:{confirm:function(t){return e.deleteRecord(o.key)}}},[t("a-icon",{staticStyle:{color:"red"},attrs:{slot:"icon",type:"question-circle-o"},slot:"icon"}),t("a-icon",{attrs:{type:"delete",theme:"twoTone","two-tone-color":"#eb2f96"}}),t("a",{staticStyle:{color:"#eb2f96"}},[e._v(e._s(e.$t("dataModel.delete")))])],1)],1)}}])},[e._l(e.columns,(function(a,o){return t("template",{slot:a.slotName},[t("span",{key:o},[e._v(e._s(e.$t(a.slotName)))])])}))],2)],1),t("a-modal",{attrs:{title:e.IsEdit?e.$t("dataModel.RESTFulData.EditModel"):e.$t("dataModel.RESTFulData.AddModel")},on:{ok:e.onAddSubmit},model:{value:e.AddVisible,callback:function(t){e.AddVisible=t},expression:"AddVisible"}},[t("a-form",{attrs:{form:e.RESTFulForm,"label-col":{span:6},"wrapper-col":{span:15}}},[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.RESTFulData.ModelName")}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["name",{rules:[{required:!0,message:e.$t("dataModel.static.DataName"),whitespace:!0}]}],expression:"['name', {rules: [{ required: true, message: $t('dataModel.static.DataName'), whitespace: true}]}]"}],attrs:{autocomplete:"autocomplete"}})],1),t("a-form-item",{attrs:{label:e.$t("device.deviceConfigurationModelName")}},[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,o){return t("a-select-option",{key:o,attrs:{value:a.uuid}},[e._v(" "+e._s(a.name)+" ")])})),1)],1),t("a-form-item",{attrs:{label:e.$t("device.deviceConfigurationPageName")}},[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,o){return t("a-select-option",{key:o,attrs:{value:a.value}},[e._v(" "+e._s(a.label)+" ")])})),1)],1),t("a-form-item",{attrs:{label:e.$t("dataModel.static.DataDec")}},[t("Mtextarea",{directives:[{name:"decorator",rawName:"v-decorator",value:["description",{rules:[{required:!0,message:e.$t("dataModel.static.DataDec")}]}],expression:"['description', { rules: [{ required: true, message: $t('dataModel.static.DataDec') }] }]"}],attrs:{rows:"4",showWordLimit:!0,maxLength:100,autoSize:!1},model:{value:e.textAreValue,callback:function(t){e.textAreValue=t},expression:"textAreValue"}})],1)],1)],1)],1)}),[],!1,null,null,null)
/* harmony default export */;t.default=d.exports},
/***/80499:
/***/function(e,t,a){"use strict";
/* harmony import */a("98a2");
/* harmony import */},
/***/"98a2":
/***/function(e,t,a){
// extracted by mini-css-extract-plugin
/***/},
/***/adbb:
/***/function(e,t,a){
// extracted by mini-css-extract-plugin
/***/},
/***/daf8:
/***/function(e,t,a){"use strict";
// 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/components/textarea/index.vue?vue&type=template&id=b9c09c60&scoped=true
var o={props:{
// 是否展示字数统
showWordLimit:{type:Boolean,default:!1}},
// v-model处理
model:{prop:"value",event:"change"},computed:{
// 长度控制
textLength:function(){return(this.$attrs.value||"").length}},methods:{onChange:function(e){
// v-model 回调函数
this.$emit("change",e.target.value)}}},n=(a("376d"),a("2877")),r=Object(n.a)(o,(function(){var e=this,t=e._self._c;return t("div",{staticClass:"textarea-wrapper"},[t("a-textarea",e._b({staticClass:"m-textarea",on:{change:e.onChange},model:{value:e.$attrs.value,callback:function(t){e.$set(e.$attrs,"value",t)},expression:"$attrs.value"}},"a-textarea",e.$attrs,!1)),e.showWordLimit?t("span",{staticClass:"m-count"},[e._v(e._s(e.textLength)+"/"),e.$attrs.maxLength?[e._v(e._s(e.$attrs.maxLength))]:e._e()],2):e._e()],1)}),[],!1,null,"b9c09c60",null)
/* harmony default export */;t.a=r.exports}}]);