From 057fa7f12df6834d3e6a9c7c9057e9c8967c8935 Mon Sep 17 00:00:00 2001 From: zhs Date: Sat, 22 May 2021 13:38:33 +0800 Subject: [PATCH] =?UTF-8?q?=E9=80=82=E9=85=8D=E5=BC=80=E5=85=B3=E9=87=8F?= =?UTF-8?q?=E8=BE=93=E5=85=A5=E5=92=8C=E8=BE=93=E5=87=BA=E4=B8=A4=E7=A7=8D?= =?UTF-8?q?=E9=80=9A=E8=AE=AF=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- webroot/index.html | 2 +- webroot/serverConfig.json | 2 +- webroot/static/css/chunk-8e9c993e.4442f57d.css | 1 - webroot/static/css/chunk-b662b61c.56fcb75b.css | 1 + webroot/static/js/{app.0b87b9e3.js => app.c4d6d5a8.js} | 2 +- webroot/static/js/chunk-8e9c993e.762ef04c.js | 1 - webroot/static/js/chunk-b662b61c.efd56867.js | 1 + 7 files changed, 5 insertions(+), 5 deletions(-) delete mode 100644 webroot/static/css/chunk-8e9c993e.4442f57d.css create mode 100644 webroot/static/css/chunk-b662b61c.56fcb75b.css rename webroot/static/js/{app.0b87b9e3.js => app.c4d6d5a8.js} (99%) delete mode 100644 webroot/static/js/chunk-8e9c993e.762ef04c.js create mode 100644 webroot/static/js/chunk-b662b61c.efd56867.js diff --git a/webroot/index.html b/webroot/index.html index 3445c0b..2d841fc 100644 --- a/webroot/index.html +++ b/webroot/index.html @@ -1 +1 @@ -通用采集器系统
\ No newline at end of file +通用采集器系统
\ No newline at end of file diff --git a/webroot/serverConfig.json b/webroot/serverConfig.json index 5107489..e3e25d0 100644 --- a/webroot/serverConfig.json +++ b/webroot/serverConfig.json @@ -6,6 +6,6 @@ "SURVEY_ADDR": "http://47.103.45.84:9004/diaowen/survey!answerSurveryMobile.action?surveyId=", "REPORT_ADDR": "http://139.196.207.46:443/", "BASE_TITLE": "开源版", - "HOME_TITLE": "openGW系统登录(QQ:1028704210)", + "HOME_TITLE": "通用采集器系统登录(QQ:1028704210)", "OPEN_SOURCE": false } \ No newline at end of file diff --git a/webroot/static/css/chunk-8e9c993e.4442f57d.css b/webroot/static/css/chunk-8e9c993e.4442f57d.css deleted file mode 100644 index b66803f..0000000 --- a/webroot/static/css/chunk-8e9c993e.4442f57d.css +++ /dev/null @@ -1 +0,0 @@ -.card-panel-icon[data-v-ed3ea624]{float:left;font-size:48px;width:50%;display:block;margin-bottom:10px;color:#f4516c}.text[data-v-ed3ea624]{font-size:14px}.item[data-v-ed3ea624]{margin-bottom:18px;display:-webkit-box;display:-ms-flexbox;display:flex} \ No newline at end of file diff --git a/webroot/static/css/chunk-b662b61c.56fcb75b.css b/webroot/static/css/chunk-b662b61c.56fcb75b.css new file mode 100644 index 0000000..745be16 --- /dev/null +++ b/webroot/static/css/chunk-b662b61c.56fcb75b.css @@ -0,0 +1 @@ +.card-panel-icon[data-v-e3ad6a7c]{float:left;font-size:48px;width:50%;display:block;margin-bottom:10px;color:#f4516c}.text[data-v-e3ad6a7c]{font-size:14px}.item[data-v-e3ad6a7c]{margin-bottom:18px;display:-webkit-box;display:-ms-flexbox;display:flex} \ No newline at end of file diff --git a/webroot/static/js/app.0b87b9e3.js b/webroot/static/js/app.c4d6d5a8.js similarity index 99% rename from webroot/static/js/app.0b87b9e3.js rename to webroot/static/js/app.c4d6d5a8.js index f4af680..05a7a6b 100644 --- a/webroot/static/js/app.0b87b9e3.js +++ b/webroot/static/js/app.c4d6d5a8.js @@ -1 +1 @@ -(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["app"],{0:function(e,t,n){e.exports=n("56d7")},"028b":function(e,t,n){"use strict";var a=n("f12c"),i=n.n(a);i.a},1343:function(e,t,n){},"14b4":function(e,t,n){"use strict";n.r(t);var a=n("e017"),i=n.n(a),o=n("21a1"),c=n.n(o),r=new i.a({id:"icon-memory",use:"icon-memory-usage",viewBox:"0 0 1024 1024",content:''});c.a.add(r);t["default"]=r},1605:function(e,t,n){e.exports=n.p+"static/img/admin.ecba1844.gif"},"186a":function(e,t,n){"use strict";var a=n("dc52"),i=n.n(a);i.a},"18f0":function(e,t,n){"use strict";n.r(t);var a=n("e017"),i=n.n(a),o=n("21a1"),c=n.n(o),r=new i.a({id:"icon-link",use:"icon-link-usage",viewBox:"0 0 128 128",content:''});c.a.add(r);t["default"]=r},"1b2d":function(e,t,n){"use strict";n.r(t);var a=n("e017"),i=n.n(a),o=n("21a1"),c=n.n(o),r=new i.a({id:"icon-interface",use:"icon-interface-usage",viewBox:"0 0 1024 1024",content:''});c.a.add(r);t["default"]=r},2753:function(e,t,n){"use strict";var a=n("1343"),i=n.n(a);i.a},"2a3d":function(e,t,n){"use strict";n.r(t);var a=n("e017"),i=n.n(a),o=n("21a1"),c=n.n(o),r=new i.a({id:"icon-password",use:"icon-password-usage",viewBox:"0 0 128 128",content:''});c.a.add(r);t["default"]=r},"30c3":function(e,t,n){"use strict";n.r(t);var a=n("e017"),i=n.n(a),o=n("21a1"),c=n.n(o),r=new i.a({id:"icon-example",use:"icon-example-usage",viewBox:"0 0 128 128",content:''});c.a.add(r);t["default"]=r},"47f1":function(e,t,n){"use strict";n.r(t);var a=n("e017"),i=n.n(a),o=n("21a1"),c=n.n(o),r=new i.a({id:"icon-table",use:"icon-table-usage",viewBox:"0 0 128 128",content:''});c.a.add(r);t["default"]=r},"4cdc":function(e,t,n){},"4df5":function(e,t,n){"use strict";n.r(t);var a=n("e017"),i=n.n(a),o=n("21a1"),c=n.n(o),r=new i.a({id:"icon-eye",use:"icon-eye-usage",viewBox:"0 0 128 64",content:''});c.a.add(r);t["default"]=r},"51ff":function(e,t,n){var a={"./dashboard.svg":"f782","./deviceManage.svg":"c504","./deviceStatus.svg":"b37b","./example.svg":"30c3","./eye-open.svg":"d7ec","./eye.svg":"4df5","./form.svg":"eb1b","./interface.svg":"1b2d","./link.svg":"18f0","./memory.svg":"14b4","./nested.svg":"dcf8","./password.svg":"2a3d","./table.svg":"47f1","./template.svg":"dcbb","./tree.svg":"93cd","./user.svg":"b3b5","./wireless.svg":"f117"};function i(e){var t=o(e);return n(t)}function o(e){var t=a[e];if(!(t+1)){var n=new Error("Cannot find module '"+e+"'");throw n.code="MODULE_NOT_FOUND",n}return t}i.keys=function(){return Object.keys(a)},i.resolve=o,e.exports=i,i.id="51ff"},"56d7":function(e,t,n){"use strict";n.r(t);n("96cf");var a=n("3b8d"),i=(n("cadf"),n("551c"),n("f751"),n("097d"),n("2b0e")),o=(n("f5df"),n("5c96")),c=n.n(o),r=(n("0fae"),n("f0d9")),s=n.n(r),l=(n("b20f"),function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{attrs:{id:"app"}},[n("router-view")],1)}),u=[],d={name:"App"},m=d,h=n("2877"),p=Object(h["a"])(m,l,u,!1,null,null,null),f=p.exports,v=n("bc3a"),b=n.n(v),g=n("2f62"),w=(n("7f7f"),{sidebar:function(e){return e.app.sidebar},device:function(e){return e.app.device},token:function(e){return e.user.token},avatar:function(e){return e.user.avatar},name:function(e){return e.user.name}}),x=w,y=n("a78e"),k=n.n(y),M={sidebar:{opened:!k.a.get("sidebarStatus")||!!+k.a.get("sidebarStatus"),withoutAnimation:!1},device:"desktop"},z={TOGGLE_SIDEBAR:function(e){e.sidebar.opened=!e.sidebar.opened,e.sidebar.withoutAnimation=!1,e.sidebar.opened?k.a.set("sidebarStatus",1):k.a.set("sidebarStatus",0)},CLOSE_SIDEBAR:function(e,t){k.a.set("sidebarStatus",0),e.sidebar.opened=!1,e.sidebar.withoutAnimation=t},TOGGLE_DEVICE:function(e,t){e.device=t}},_={toggleSideBar:function(e){var t=e.commit;t("TOGGLE_SIDEBAR")},closeSideBar:function(e,t){var n=e.commit,a=t.withoutAnimation;n("CLOSE_SIDEBAR",a)},toggleDevice:function(e,t){var n=e.commit;n("TOGGLE_DEVICE",t)}},C={namespaced:!0,state:M,mutations:z,actions:_},S=n("83d6"),H=n.n(S),E=H.a.showSettings,B=H.a.fixedHeader,O=H.a.sidebarLogo,T={showSettings:E,fixedHeader:B,sidebarLogo:O},L={CHANGE_SETTING:function(e,t){var n=t.key,a=t.value;e.hasOwnProperty(n)&&(e[n]=a)}},V={changeSetting:function(e,t){var n=e.commit;n("CHANGE_SETTING",t)}},A={namespaced:!0,state:T,mutations:L,actions:V},$="token";function j(){return k.a.get($)}function D(e){return k.a.set($,e)}function R(){return k.a.remove($)}var I=b.a.create({timeout:5e3});I.interceptors.request.use((function(e){return yt.getters.token&&(e.headers["token"]=j()),e}),(function(e){return console.log(e),Promise.reject(e)})),I.interceptors.response.use((function(e){var t=e.data;return t}),(function(e){return console.log("err"+e),Object(o["Message"])({message:e.message,type:"error",duration:5e3}),Promise.reject(e)}));var N=I;function P(e){var t="";return t="/api/v1/system/login",N({url:t,method:"post",data:e})}function q(e){var t="";return t="/api/v1/system/loginParam",N({url:t,method:"get",params:{}})}function G(){var e="";return e="/api/v1/system/reboot",N({url:e,method:"post"})}console.log("当前环境:production");n("3b2b"),n("a481");var F,U,K=n("8c4f"),J=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"app-wrapper",class:e.classObj},["mobile"===e.device&&e.sidebar.opened?n("div",{staticClass:"drawer-bg",on:{click:e.handleClickOutside}}):e._e(),e._v(" "),n("sidebar",{staticClass:"sidebar-container"}),e._v(" "),n("div",{staticClass:"main-container"},[n("div",{class:{"fixed-header":e.fixedHeader}},[n("navbar")],1),e._v(" "),n("app-main")],1)],1)},W=[],Y=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"navbar"},[a("hamburger",{staticClass:"hamburger-container",attrs:{"is-active":e.sidebar.opened},on:{toggleClick:e.toggleSideBar}}),e._v(" "),a("breadcrumb",{staticClass:"breadcrumb-container"}),e._v(" "),a("div",{staticClass:"right-menu"},[a("el-dropdown",{staticClass:"avatar-container",attrs:{trigger:"click"}},[a("div",{staticClass:"avatar-wrapper"},[a("img",{staticClass:"user-avatar",attrs:{src:n("1605")}}),e._v(" "),a("i",{staticClass:"el-icon-caret-bottom"})]),e._v(" "),a("el-dropdown-menu",{staticClass:"user-dropdown",attrs:{slot:"dropdown"},slot:"dropdown"},[a("router-link",{attrs:{to:"/"}},[a("el-dropdown-item",[e._v("\n 回到首页\n ")])],1),e._v(" "),a("el-dropdown-item",{attrs:{divided:""}},[a("span",{staticStyle:{display:"block"},on:{click:e.logout}},[e._v("重启系统")])])],1)],1)],1)],1)},Q=[],X=n("db72"),Z=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("el-breadcrumb",{staticClass:"app-breadcrumb",attrs:{separator:"/"}},[n("transition-group",{attrs:{name:"breadcrumb"}},e._l(e.levelList,(function(t,a){return n("el-breadcrumb-item",{key:t.path},["noRedirect"===t.redirect||a==e.levelList.length-1?n("span",{staticClass:"no-redirect"},[e._v(e._s(t.meta.title))]):n("a",{on:{click:function(n){return n.preventDefault(),e.handleLink(t)}}},[e._v(e._s(t.meta.title))])])})),1)],1)},ee=[],te=n("bd11"),ne=n.n(te),ae={data:function(){return{levelList:null}},watch:{$route:function(){this.getBreadcrumb()}},created:function(){this.getBreadcrumb()},methods:{getBreadcrumb:function(){var e=this.$route.matched.filter((function(e){return e.meta&&e.meta.title})),t=e[0];this.isDashboard(t)||(e=[{path:"/dashboard",meta:{title:"首页"}}].concat(e)),this.levelList=e.filter((function(e){return e.meta&&e.meta.title&&!1!==e.meta.breadcrumb}))},isDashboard:function(e){var t=e&&e.name;return!!t&&t.trim().toLocaleLowerCase()==="Dashboard".toLocaleLowerCase()},pathCompile:function(e){var t=this.$route.params,n=ne.a.compile(e);return n(t)},handleLink:function(e){var t=e.redirect,n=e.path;t?this.$router.push(t):this.$router.push(this.pathCompile(n))}}},ie=ae,oe=(n("976b"),Object(h["a"])(ie,Z,ee,!1,null,"33d79dae",null)),ce=oe.exports,re=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticStyle:{padding:"0 15px"},on:{click:e.toggleClick}},[n("svg",{staticClass:"hamburger",class:{"is-active":e.isActive},attrs:{viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg",width:"64",height:"64"}},[n("path",{attrs:{d:"M408 442h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm-8 204c0 4.4 3.6 8 8 8h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56zm504-486H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 632H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM142.4 642.1L298.7 519a8.84 8.84 0 0 0 0-13.9L142.4 381.9c-5.8-4.6-14.4-.5-14.4 6.9v246.3a8.9 8.9 0 0 0 14.4 7z"}})])])},se=[],le={name:"Hamburger",props:{isActive:{type:Boolean,default:!1}},methods:{toggleClick:function(){this.$emit("toggleClick")}}},ue=le,de=(n("186a"),Object(h["a"])(ue,re,se,!1,null,"49e15297",null)),me=de.exports,he={components:{Breadcrumb:ce,Hamburger:me},computed:Object(X["a"])({},Object(g["b"])(["sidebar","avatar"])),methods:{toggleSideBar:function(){this.$store.dispatch("app/toggleSideBar")},logout:function(){var e=Object(a["a"])(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,this.$store.dispatch("user/logout");case 2:this.$router.push("/login");case 3:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}()}},pe=he,fe=(n("2753"),Object(h["a"])(pe,Y,Q,!1,null,"d179ddf0",null)),ve=fe.exports,be=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{class:{"has-logo":e.showLogo}},[e.showLogo?n("logo",{attrs:{collapse:e.isCollapse}}):e._e(),e._v(" "),n("el-scrollbar",{attrs:{"wrap-class":"scrollbar-wrapper"}},[n("el-menu",{attrs:{"default-active":e.activeMenu,collapse:e.isCollapse,"background-color":e.variables.menuBg,"text-color":e.variables.menuText,"unique-opened":!1,"active-text-color":e.variables.menuActiveText,"collapse-transition":!1,mode:"vertical"}},e._l(e.routes,(function(e){return n("sidebar-item",{key:e.path,attrs:{item:e,"base-path":e.path}})})),1)],1)],1)},ge=[],we=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"sidebar-logo-container",class:{collapse:e.collapse}},[n("transition",{attrs:{name:"sidebarLogoFade"}},[e.collapse?n("router-link",{key:"collapse",staticClass:"sidebar-logo-link",attrs:{to:"/"}},[e.logo?n("img",{staticClass:"sidebar-logo",attrs:{src:e.logo}}):n("h1",{staticClass:"sidebar-title"},[e._v(e._s(e.title)+" ")])]):n("router-link",{key:"expand",staticClass:"sidebar-logo-link",attrs:{to:"/"}},[e.logo?n("img",{staticClass:"sidebar-logo",attrs:{src:e.logo}}):e._e(),e._v(" "),n("h1",{staticClass:"sidebar-title"},[e._v(e._s(e.title)+" ")])])],1)],1)},xe=[],ye={name:"SidebarLogo",props:{collapse:{type:Boolean,required:!0}},data:function(){return{title:"Vue Admin Template",logo:"https://wpimg.wallstcn.com/69a1c46c-eb1c-4b46-8bd4-e9e686ef5251.png"}}},ke=ye,Me=(n("6b31"),Object(h["a"])(ke,we,xe,!1,null,"5bb1c0e2",null)),ze=Me.exports,_e=function(){var e=this,t=e.$createElement,n=e._self._c||t;return e.item.hidden?e._e():n("div",{staticClass:"menu-wrapper"},[!e.hasOneShowingChild(e.item.children,e.item)||e.onlyOneChild.children&&!e.onlyOneChild.noShowingChildren||e.item.alwaysShow?n("el-submenu",{ref:"subMenu",attrs:{index:e.resolvePath(e.item.path),"popper-append-to-body":""}},[n("template",{slot:"title"},[e.item.meta?n("item",{attrs:{icon:e.item.meta&&e.item.meta.icon,title:e.item.meta.title}}):e._e()],1),e._v(" "),e._l(e.item.children,(function(t){return n("sidebar-item",{key:t.path,staticClass:"nest-menu",attrs:{"is-nest":!0,item:t,"base-path":e.resolvePath(t.path)}})}))],2):[e.onlyOneChild.meta?n("app-link",{attrs:{to:e.resolvePath(e.onlyOneChild.path)}},[n("el-menu-item",{class:{"submenu-title-noDropdown":!e.isNest},attrs:{index:e.resolvePath(e.onlyOneChild.path)}},[n("item",{attrs:{icon:e.onlyOneChild.meta.icon||e.item.meta&&e.item.meta.icon,title:e.onlyOneChild.meta.title}})],1)],1):e._e()]],2)},Ce=[],Se=n("df7c"),He=n.n(Se),Ee=n("61f7"),Be={name:"MenuItem",functional:!0,props:{icon:{type:String,default:""},title:{type:String,default:""}},render:function(e,t){var n=t.props,a=n.icon,i=n.title,o=[];return a&&o.push(e("svg-icon",{attrs:{"icon-class":a}})),i&&o.push(e("span",{slot:"title"},[i])),o}},Oe=Be,Te=Object(h["a"])(Oe,F,U,!1,null,null,null),Le=Te.exports,Ve=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("component",e._b({},"component",e.linkProps(e.to),!1),[e._t("default")],2)},Ae=[],$e={props:{to:{type:String,required:!0}},methods:{linkProps:function(e){return Object(Ee["a"])(e)?{is:"a",href:e,target:"_blank",rel:"noopener"}:{is:"router-link",to:e}}}},je=$e,De=Object(h["a"])(je,Ve,Ae,!1,null,null,null),Re=De.exports,Ie={computed:{device:function(){return this.$store.state.app.device}},mounted:function(){this.fixBugIniOS()},methods:{fixBugIniOS:function(){var e=this,t=this.$refs.subMenu;if(t){var n=t.handleMouseleave;t.handleMouseleave=function(t){"mobile"!==e.device&&n(t)}}}}},Ne={name:"SidebarItem",components:{Item:Le,AppLink:Re},mixins:[Ie],props:{item:{type:Object,required:!0},isNest:{type:Boolean,default:!1},basePath:{type:String,default:""}},data:function(){return this.onlyOneChild=null,{}},methods:{hasOneShowingChild:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1?arguments[1]:void 0,a=t.filter((function(t){return!t.hidden&&(e.onlyOneChild=t,!0)}));return 1===a.length||0===a.length&&(this.onlyOneChild=Object(X["a"])(Object(X["a"])({},n),{},{path:"",noShowingChildren:!0}),!0)},resolvePath:function(e){return Object(Ee["a"])(e)?e:Object(Ee["a"])(this.basePath)?this.basePath:He.a.resolve(this.basePath,e)}}},Pe=Ne,qe=Object(h["a"])(Pe,_e,Ce,!1,null,null,null),Ge=qe.exports,Fe=n("cf1e"),Ue=n.n(Fe),Ke={components:{SidebarItem:Ge,Logo:ze},computed:Object(X["a"])(Object(X["a"])({},Object(g["b"])(["sidebar"])),{},{routes:function(){return this.$router.options.routes},activeMenu:function(){var e=this.$route,t=e.meta,n=e.path;return t.activeMenu?t.activeMenu:n},showLogo:function(){return this.$store.state.settings.sidebarLogo},variables:function(){return Ue.a},isCollapse:function(){return!this.sidebar.opened}})},Je=Ke,We=Object(h["a"])(Je,be,ge,!1,null,null,null),Ye=We.exports,Qe=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("section",{staticClass:"app-main"},[n("transition",{attrs:{name:"fade-transform",mode:"out-in"}},[n("router-view",{key:e.key})],1)],1)},Xe=[],Ze={name:"AppMain",computed:{key:function(){return this.$route.path}}},et=Ze,tt=(n("e4de"),n("028b"),Object(h["a"])(et,Qe,Xe,!1,null,"64cf4d83",null)),nt=tt.exports,at=document,it=at.body,ot=992,ct={watch:{$route:function(e){"mobile"===this.device&&this.sidebar.opened&&yt.dispatch("app/closeSideBar",{withoutAnimation:!1})}},beforeMount:function(){window.addEventListener("resize",this.$_resizeHandler)},beforeDestroy:function(){window.removeEventListener("resize",this.$_resizeHandler)},mounted:function(){var e=this.$_isMobile();e&&(yt.dispatch("app/toggleDevice","mobile"),yt.dispatch("app/closeSideBar",{withoutAnimation:!0}))},methods:{$_isMobile:function(){var e=it.getBoundingClientRect();return e.width-1=0}function o(e){var t=["admin","111111"];return t.indexOf(e.trim())>=0}n.d(t,"a",(function(){return a})),n.d(t,"c",(function(){return i})),n.d(t,"b",(function(){return o}))},"6b31":function(e,t,n){"use strict";var a=n("4cdc"),i=n.n(a);i.a},"83d6":function(e,t){e.exports={title:"通用采集器系统",fixedHeader:!1,sidebarLogo:!1}},8902:function(e,t,n){},"93cd":function(e,t,n){"use strict";n.r(t);var a=n("e017"),i=n.n(a),o=n("21a1"),c=n.n(o),r=new i.a({id:"icon-tree",use:"icon-tree-usage",viewBox:"0 0 128 128",content:''});c.a.add(r);t["default"]=r},"976b":function(e,t,n){"use strict";var a=n("f14a"),i=n.n(a);i.a},"9f2b":function(e,t,n){"use strict";var a=n("bf90"),i=n.n(a);i.a},b20f:function(e,t,n){e.exports={menuText:"#bfcbd9",menuActiveText:"#409EFF",subMenuActiveText:"#f4f4f5",menuBg:"#304156",menuHover:"#263445",subMenuBg:"#1f2d3d",subMenuHover:"#001528",sideBarWidth:"210px"}},b37b:function(e,t,n){"use strict";n.r(t);var a=n("e017"),i=n.n(a),o=n("21a1"),c=n.n(o),r=new i.a({id:"icon-deviceStatus",use:"icon-deviceStatus-usage",viewBox:"0 0 1024 1024",content:''});c.a.add(r);t["default"]=r},b3b5:function(e,t,n){"use strict";n.r(t);var a=n("e017"),i=n.n(a),o=n("21a1"),c=n.n(o),r=new i.a({id:"icon-user",use:"icon-user-usage",viewBox:"0 0 130 130",content:''});c.a.add(r);t["default"]=r},bf90:function(e,t,n){},c504:function(e,t,n){"use strict";n.r(t);var a=n("e017"),i=n.n(a),o=n("21a1"),c=n.n(o),r=new i.a({id:"icon-deviceManage",use:"icon-deviceManage-usage",viewBox:"0 0 1024 1024",content:''});c.a.add(r);t["default"]=r},cf1e:function(e,t,n){e.exports={menuText:"#bfcbd9",menuActiveText:"#409EFF",subMenuActiveText:"#f4f4f5",menuBg:"#304156",menuHover:"#263445",subMenuBg:"#1f2d3d",subMenuHover:"#001528",sideBarWidth:"210px"}},d27f:function(e,t,n){"use strict";var a=n("e176"),i=n.n(a);i.a},d7ec:function(e,t,n){"use strict";n.r(t);var a=n("e017"),i=n.n(a),o=n("21a1"),c=n.n(o),r=new i.a({id:"icon-eye-open",use:"icon-eye-open-usage",viewBox:"0 0 1024 1024",content:''});c.a.add(r);t["default"]=r},dc52:function(e,t,n){},dcbb:function(e,t,n){"use strict";n.r(t);var a=n("e017"),i=n.n(a),o=n("21a1"),c=n.n(o),r=new i.a({id:"icon-template",use:"icon-template-usage",viewBox:"0 0 128 128",content:''});c.a.add(r);t["default"]=r},dcf8:function(e,t,n){"use strict";n.r(t);var a=n("e017"),i=n.n(a),o=n("21a1"),c=n.n(o),r=new i.a({id:"icon-nested",use:"icon-nested-usage",viewBox:"0 0 128 128",content:''});c.a.add(r);t["default"]=r},e176:function(e,t,n){},e4de:function(e,t,n){"use strict";var a=n("8902"),i=n.n(a);i.a},eb1b:function(e,t,n){"use strict";n.r(t);var a=n("e017"),i=n.n(a),o=n("21a1"),c=n.n(o),r=new i.a({id:"icon-form",use:"icon-form-usage",viewBox:"0 0 128 128",content:''});c.a.add(r);t["default"]=r},f117:function(e,t,n){"use strict";n.r(t);var a=n("e017"),i=n.n(a),o=n("21a1"),c=n.n(o),r=new i.a({id:"icon-wireless",use:"icon-wireless-usage",viewBox:"0 0 1024 1024",content:''});c.a.add(r);t["default"]=r},f12c:function(e,t,n){},f14a:function(e,t,n){},f782:function(e,t,n){"use strict";n.r(t);var a=n("e017"),i=n.n(a),o=n("21a1"),c=n.n(o),r=new i.a({id:"icon-dashboard",use:"icon-dashboard-usage",viewBox:"0 0 128 100",content:''});c.a.add(r);t["default"]=r}},[[0,"runtime","chunk-elementUI","chunk-libs"]]]); \ No newline at end of file +(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["app"],{0:function(e,t,n){e.exports=n("56d7")},"028b":function(e,t,n){"use strict";var a=n("f12c"),i=n.n(a);i.a},1343:function(e,t,n){},"14b4":function(e,t,n){"use strict";n.r(t);var a=n("e017"),i=n.n(a),o=n("21a1"),c=n.n(o),r=new i.a({id:"icon-memory",use:"icon-memory-usage",viewBox:"0 0 1024 1024",content:''});c.a.add(r);t["default"]=r},1605:function(e,t,n){e.exports=n.p+"static/img/admin.ecba1844.gif"},"186a":function(e,t,n){"use strict";var a=n("dc52"),i=n.n(a);i.a},"18f0":function(e,t,n){"use strict";n.r(t);var a=n("e017"),i=n.n(a),o=n("21a1"),c=n.n(o),r=new i.a({id:"icon-link",use:"icon-link-usage",viewBox:"0 0 128 128",content:''});c.a.add(r);t["default"]=r},"1b2d":function(e,t,n){"use strict";n.r(t);var a=n("e017"),i=n.n(a),o=n("21a1"),c=n.n(o),r=new i.a({id:"icon-interface",use:"icon-interface-usage",viewBox:"0 0 1024 1024",content:''});c.a.add(r);t["default"]=r},2753:function(e,t,n){"use strict";var a=n("1343"),i=n.n(a);i.a},"2a3d":function(e,t,n){"use strict";n.r(t);var a=n("e017"),i=n.n(a),o=n("21a1"),c=n.n(o),r=new i.a({id:"icon-password",use:"icon-password-usage",viewBox:"0 0 128 128",content:''});c.a.add(r);t["default"]=r},"30c3":function(e,t,n){"use strict";n.r(t);var a=n("e017"),i=n.n(a),o=n("21a1"),c=n.n(o),r=new i.a({id:"icon-example",use:"icon-example-usage",viewBox:"0 0 128 128",content:''});c.a.add(r);t["default"]=r},"47f1":function(e,t,n){"use strict";n.r(t);var a=n("e017"),i=n.n(a),o=n("21a1"),c=n.n(o),r=new i.a({id:"icon-table",use:"icon-table-usage",viewBox:"0 0 128 128",content:''});c.a.add(r);t["default"]=r},"4cdc":function(e,t,n){},"4df5":function(e,t,n){"use strict";n.r(t);var a=n("e017"),i=n.n(a),o=n("21a1"),c=n.n(o),r=new i.a({id:"icon-eye",use:"icon-eye-usage",viewBox:"0 0 128 64",content:''});c.a.add(r);t["default"]=r},"51ff":function(e,t,n){var a={"./dashboard.svg":"f782","./deviceManage.svg":"c504","./deviceStatus.svg":"b37b","./example.svg":"30c3","./eye-open.svg":"d7ec","./eye.svg":"4df5","./form.svg":"eb1b","./interface.svg":"1b2d","./link.svg":"18f0","./memory.svg":"14b4","./nested.svg":"dcf8","./password.svg":"2a3d","./table.svg":"47f1","./template.svg":"dcbb","./tree.svg":"93cd","./user.svg":"b3b5","./wireless.svg":"f117"};function i(e){var t=o(e);return n(t)}function o(e){var t=a[e];if(!(t+1)){var n=new Error("Cannot find module '"+e+"'");throw n.code="MODULE_NOT_FOUND",n}return t}i.keys=function(){return Object.keys(a)},i.resolve=o,e.exports=i,i.id="51ff"},"56d7":function(e,t,n){"use strict";n.r(t);n("96cf");var a=n("3b8d"),i=(n("cadf"),n("551c"),n("f751"),n("097d"),n("2b0e")),o=(n("f5df"),n("5c96")),c=n.n(o),r=(n("0fae"),n("f0d9")),s=n.n(r),l=(n("b20f"),function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{attrs:{id:"app"}},[n("router-view")],1)}),u=[],d={name:"App"},m=d,h=n("2877"),p=Object(h["a"])(m,l,u,!1,null,null,null),f=p.exports,v=n("bc3a"),b=n.n(v),g=n("2f62"),w=(n("7f7f"),{sidebar:function(e){return e.app.sidebar},device:function(e){return e.app.device},token:function(e){return e.user.token},avatar:function(e){return e.user.avatar},name:function(e){return e.user.name}}),x=w,y=n("a78e"),k=n.n(y),M={sidebar:{opened:!k.a.get("sidebarStatus")||!!+k.a.get("sidebarStatus"),withoutAnimation:!1},device:"desktop"},z={TOGGLE_SIDEBAR:function(e){e.sidebar.opened=!e.sidebar.opened,e.sidebar.withoutAnimation=!1,e.sidebar.opened?k.a.set("sidebarStatus",1):k.a.set("sidebarStatus",0)},CLOSE_SIDEBAR:function(e,t){k.a.set("sidebarStatus",0),e.sidebar.opened=!1,e.sidebar.withoutAnimation=t},TOGGLE_DEVICE:function(e,t){e.device=t}},_={toggleSideBar:function(e){var t=e.commit;t("TOGGLE_SIDEBAR")},closeSideBar:function(e,t){var n=e.commit,a=t.withoutAnimation;n("CLOSE_SIDEBAR",a)},toggleDevice:function(e,t){var n=e.commit;n("TOGGLE_DEVICE",t)}},C={namespaced:!0,state:M,mutations:z,actions:_},S=n("83d6"),H=n.n(S),E=H.a.showSettings,B=H.a.fixedHeader,O=H.a.sidebarLogo,T={showSettings:E,fixedHeader:B,sidebarLogo:O},L={CHANGE_SETTING:function(e,t){var n=t.key,a=t.value;e.hasOwnProperty(n)&&(e[n]=a)}},V={changeSetting:function(e,t){var n=e.commit;n("CHANGE_SETTING",t)}},A={namespaced:!0,state:T,mutations:L,actions:V},$="token";function j(){return k.a.get($)}function D(e){return k.a.set($,e)}function R(){return k.a.remove($)}var I=b.a.create({timeout:5e3});I.interceptors.request.use((function(e){return yt.getters.token&&(e.headers["token"]=j()),e}),(function(e){return console.log(e),Promise.reject(e)})),I.interceptors.response.use((function(e){var t=e.data;return t}),(function(e){return console.log("err"+e),Object(o["Message"])({message:e.message,type:"error",duration:5e3}),Promise.reject(e)}));var N=I;function P(e){var t="";return t="/api/v1/system/login",N({url:t,method:"post",data:e})}function q(e){var t="";return t="/api/v1/system/loginParam",N({url:t,method:"get",params:{}})}function G(){var e="";return e="/api/v1/system/reboot",N({url:e,method:"post"})}console.log("当前环境:production");n("3b2b"),n("a481");var F,U,K=n("8c4f"),J=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"app-wrapper",class:e.classObj},["mobile"===e.device&&e.sidebar.opened?n("div",{staticClass:"drawer-bg",on:{click:e.handleClickOutside}}):e._e(),e._v(" "),n("sidebar",{staticClass:"sidebar-container"}),e._v(" "),n("div",{staticClass:"main-container"},[n("div",{class:{"fixed-header":e.fixedHeader}},[n("navbar")],1),e._v(" "),n("app-main")],1)],1)},W=[],Y=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"navbar"},[a("hamburger",{staticClass:"hamburger-container",attrs:{"is-active":e.sidebar.opened},on:{toggleClick:e.toggleSideBar}}),e._v(" "),a("breadcrumb",{staticClass:"breadcrumb-container"}),e._v(" "),a("div",{staticClass:"right-menu"},[a("el-dropdown",{staticClass:"avatar-container",attrs:{trigger:"click"}},[a("div",{staticClass:"avatar-wrapper"},[a("img",{staticClass:"user-avatar",attrs:{src:n("1605")}}),e._v(" "),a("i",{staticClass:"el-icon-caret-bottom"})]),e._v(" "),a("el-dropdown-menu",{staticClass:"user-dropdown",attrs:{slot:"dropdown"},slot:"dropdown"},[a("router-link",{attrs:{to:"/"}},[a("el-dropdown-item",[e._v("\n 回到首页\n ")])],1),e._v(" "),a("el-dropdown-item",{attrs:{divided:""}},[a("span",{staticStyle:{display:"block"},on:{click:e.logout}},[e._v("重启系统")])])],1)],1)],1)],1)},Q=[],X=n("db72"),Z=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("el-breadcrumb",{staticClass:"app-breadcrumb",attrs:{separator:"/"}},[n("transition-group",{attrs:{name:"breadcrumb"}},e._l(e.levelList,(function(t,a){return n("el-breadcrumb-item",{key:t.path},["noRedirect"===t.redirect||a==e.levelList.length-1?n("span",{staticClass:"no-redirect"},[e._v(e._s(t.meta.title))]):n("a",{on:{click:function(n){return n.preventDefault(),e.handleLink(t)}}},[e._v(e._s(t.meta.title))])])})),1)],1)},ee=[],te=n("bd11"),ne=n.n(te),ae={data:function(){return{levelList:null}},watch:{$route:function(){this.getBreadcrumb()}},created:function(){this.getBreadcrumb()},methods:{getBreadcrumb:function(){var e=this.$route.matched.filter((function(e){return e.meta&&e.meta.title})),t=e[0];this.isDashboard(t)||(e=[{path:"/dashboard",meta:{title:"首页"}}].concat(e)),this.levelList=e.filter((function(e){return e.meta&&e.meta.title&&!1!==e.meta.breadcrumb}))},isDashboard:function(e){var t=e&&e.name;return!!t&&t.trim().toLocaleLowerCase()==="Dashboard".toLocaleLowerCase()},pathCompile:function(e){var t=this.$route.params,n=ne.a.compile(e);return n(t)},handleLink:function(e){var t=e.redirect,n=e.path;t?this.$router.push(t):this.$router.push(this.pathCompile(n))}}},ie=ae,oe=(n("976b"),Object(h["a"])(ie,Z,ee,!1,null,"33d79dae",null)),ce=oe.exports,re=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticStyle:{padding:"0 15px"},on:{click:e.toggleClick}},[n("svg",{staticClass:"hamburger",class:{"is-active":e.isActive},attrs:{viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg",width:"64",height:"64"}},[n("path",{attrs:{d:"M408 442h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm-8 204c0 4.4 3.6 8 8 8h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56zm504-486H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 632H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM142.4 642.1L298.7 519a8.84 8.84 0 0 0 0-13.9L142.4 381.9c-5.8-4.6-14.4-.5-14.4 6.9v246.3a8.9 8.9 0 0 0 14.4 7z"}})])])},se=[],le={name:"Hamburger",props:{isActive:{type:Boolean,default:!1}},methods:{toggleClick:function(){this.$emit("toggleClick")}}},ue=le,de=(n("186a"),Object(h["a"])(ue,re,se,!1,null,"49e15297",null)),me=de.exports,he={components:{Breadcrumb:ce,Hamburger:me},computed:Object(X["a"])({},Object(g["b"])(["sidebar","avatar"])),methods:{toggleSideBar:function(){this.$store.dispatch("app/toggleSideBar")},logout:function(){var e=Object(a["a"])(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,this.$store.dispatch("user/logout");case 2:this.$router.push("/login");case 3:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}()}},pe=he,fe=(n("2753"),Object(h["a"])(pe,Y,Q,!1,null,"d179ddf0",null)),ve=fe.exports,be=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{class:{"has-logo":e.showLogo}},[e.showLogo?n("logo",{attrs:{collapse:e.isCollapse}}):e._e(),e._v(" "),n("el-scrollbar",{attrs:{"wrap-class":"scrollbar-wrapper"}},[n("el-menu",{attrs:{"default-active":e.activeMenu,collapse:e.isCollapse,"background-color":e.variables.menuBg,"text-color":e.variables.menuText,"unique-opened":!1,"active-text-color":e.variables.menuActiveText,"collapse-transition":!1,mode:"vertical"}},e._l(e.routes,(function(e){return n("sidebar-item",{key:e.path,attrs:{item:e,"base-path":e.path}})})),1)],1)],1)},ge=[],we=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"sidebar-logo-container",class:{collapse:e.collapse}},[n("transition",{attrs:{name:"sidebarLogoFade"}},[e.collapse?n("router-link",{key:"collapse",staticClass:"sidebar-logo-link",attrs:{to:"/"}},[e.logo?n("img",{staticClass:"sidebar-logo",attrs:{src:e.logo}}):n("h1",{staticClass:"sidebar-title"},[e._v(e._s(e.title)+" ")])]):n("router-link",{key:"expand",staticClass:"sidebar-logo-link",attrs:{to:"/"}},[e.logo?n("img",{staticClass:"sidebar-logo",attrs:{src:e.logo}}):e._e(),e._v(" "),n("h1",{staticClass:"sidebar-title"},[e._v(e._s(e.title)+" ")])])],1)],1)},xe=[],ye={name:"SidebarLogo",props:{collapse:{type:Boolean,required:!0}},data:function(){return{title:"Vue Admin Template",logo:"https://wpimg.wallstcn.com/69a1c46c-eb1c-4b46-8bd4-e9e686ef5251.png"}}},ke=ye,Me=(n("6b31"),Object(h["a"])(ke,we,xe,!1,null,"5bb1c0e2",null)),ze=Me.exports,_e=function(){var e=this,t=e.$createElement,n=e._self._c||t;return e.item.hidden?e._e():n("div",{staticClass:"menu-wrapper"},[!e.hasOneShowingChild(e.item.children,e.item)||e.onlyOneChild.children&&!e.onlyOneChild.noShowingChildren||e.item.alwaysShow?n("el-submenu",{ref:"subMenu",attrs:{index:e.resolvePath(e.item.path),"popper-append-to-body":""}},[n("template",{slot:"title"},[e.item.meta?n("item",{attrs:{icon:e.item.meta&&e.item.meta.icon,title:e.item.meta.title}}):e._e()],1),e._v(" "),e._l(e.item.children,(function(t){return n("sidebar-item",{key:t.path,staticClass:"nest-menu",attrs:{"is-nest":!0,item:t,"base-path":e.resolvePath(t.path)}})}))],2):[e.onlyOneChild.meta?n("app-link",{attrs:{to:e.resolvePath(e.onlyOneChild.path)}},[n("el-menu-item",{class:{"submenu-title-noDropdown":!e.isNest},attrs:{index:e.resolvePath(e.onlyOneChild.path)}},[n("item",{attrs:{icon:e.onlyOneChild.meta.icon||e.item.meta&&e.item.meta.icon,title:e.onlyOneChild.meta.title}})],1)],1):e._e()]],2)},Ce=[],Se=n("df7c"),He=n.n(Se),Ee=n("61f7"),Be={name:"MenuItem",functional:!0,props:{icon:{type:String,default:""},title:{type:String,default:""}},render:function(e,t){var n=t.props,a=n.icon,i=n.title,o=[];return a&&o.push(e("svg-icon",{attrs:{"icon-class":a}})),i&&o.push(e("span",{slot:"title"},[i])),o}},Oe=Be,Te=Object(h["a"])(Oe,F,U,!1,null,null,null),Le=Te.exports,Ve=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("component",e._b({},"component",e.linkProps(e.to),!1),[e._t("default")],2)},Ae=[],$e={props:{to:{type:String,required:!0}},methods:{linkProps:function(e){return Object(Ee["a"])(e)?{is:"a",href:e,target:"_blank",rel:"noopener"}:{is:"router-link",to:e}}}},je=$e,De=Object(h["a"])(je,Ve,Ae,!1,null,null,null),Re=De.exports,Ie={computed:{device:function(){return this.$store.state.app.device}},mounted:function(){this.fixBugIniOS()},methods:{fixBugIniOS:function(){var e=this,t=this.$refs.subMenu;if(t){var n=t.handleMouseleave;t.handleMouseleave=function(t){"mobile"!==e.device&&n(t)}}}}},Ne={name:"SidebarItem",components:{Item:Le,AppLink:Re},mixins:[Ie],props:{item:{type:Object,required:!0},isNest:{type:Boolean,default:!1},basePath:{type:String,default:""}},data:function(){return this.onlyOneChild=null,{}},methods:{hasOneShowingChild:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1?arguments[1]:void 0,a=t.filter((function(t){return!t.hidden&&(e.onlyOneChild=t,!0)}));return 1===a.length||0===a.length&&(this.onlyOneChild=Object(X["a"])(Object(X["a"])({},n),{},{path:"",noShowingChildren:!0}),!0)},resolvePath:function(e){return Object(Ee["a"])(e)?e:Object(Ee["a"])(this.basePath)?this.basePath:He.a.resolve(this.basePath,e)}}},Pe=Ne,qe=Object(h["a"])(Pe,_e,Ce,!1,null,null,null),Ge=qe.exports,Fe=n("cf1e"),Ue=n.n(Fe),Ke={components:{SidebarItem:Ge,Logo:ze},computed:Object(X["a"])(Object(X["a"])({},Object(g["b"])(["sidebar"])),{},{routes:function(){return this.$router.options.routes},activeMenu:function(){var e=this.$route,t=e.meta,n=e.path;return t.activeMenu?t.activeMenu:n},showLogo:function(){return this.$store.state.settings.sidebarLogo},variables:function(){return Ue.a},isCollapse:function(){return!this.sidebar.opened}})},Je=Ke,We=Object(h["a"])(Je,be,ge,!1,null,null,null),Ye=We.exports,Qe=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("section",{staticClass:"app-main"},[n("transition",{attrs:{name:"fade-transform",mode:"out-in"}},[n("router-view",{key:e.key})],1)],1)},Xe=[],Ze={name:"AppMain",computed:{key:function(){return this.$route.path}}},et=Ze,tt=(n("e4de"),n("028b"),Object(h["a"])(et,Qe,Xe,!1,null,"64cf4d83",null)),nt=tt.exports,at=document,it=at.body,ot=992,ct={watch:{$route:function(e){"mobile"===this.device&&this.sidebar.opened&&yt.dispatch("app/closeSideBar",{withoutAnimation:!1})}},beforeMount:function(){window.addEventListener("resize",this.$_resizeHandler)},beforeDestroy:function(){window.removeEventListener("resize",this.$_resizeHandler)},mounted:function(){var e=this.$_isMobile();e&&(yt.dispatch("app/toggleDevice","mobile"),yt.dispatch("app/closeSideBar",{withoutAnimation:!0}))},methods:{$_isMobile:function(){var e=it.getBoundingClientRect();return e.width-1=0}function o(e){var t=["admin","111111"];return t.indexOf(e.trim())>=0}n.d(t,"a",(function(){return a})),n.d(t,"c",(function(){return i})),n.d(t,"b",(function(){return o}))},"6b31":function(e,t,n){"use strict";var a=n("4cdc"),i=n.n(a);i.a},"83d6":function(e,t){e.exports={title:"通用采集器系统",fixedHeader:!1,sidebarLogo:!1}},8902:function(e,t,n){},"93cd":function(e,t,n){"use strict";n.r(t);var a=n("e017"),i=n.n(a),o=n("21a1"),c=n.n(o),r=new i.a({id:"icon-tree",use:"icon-tree-usage",viewBox:"0 0 128 128",content:''});c.a.add(r);t["default"]=r},"976b":function(e,t,n){"use strict";var a=n("f14a"),i=n.n(a);i.a},"9f2b":function(e,t,n){"use strict";var a=n("bf90"),i=n.n(a);i.a},b20f:function(e,t,n){e.exports={menuText:"#bfcbd9",menuActiveText:"#409EFF",subMenuActiveText:"#f4f4f5",menuBg:"#304156",menuHover:"#263445",subMenuBg:"#1f2d3d",subMenuHover:"#001528",sideBarWidth:"210px"}},b37b:function(e,t,n){"use strict";n.r(t);var a=n("e017"),i=n.n(a),o=n("21a1"),c=n.n(o),r=new i.a({id:"icon-deviceStatus",use:"icon-deviceStatus-usage",viewBox:"0 0 1024 1024",content:''});c.a.add(r);t["default"]=r},b3b5:function(e,t,n){"use strict";n.r(t);var a=n("e017"),i=n.n(a),o=n("21a1"),c=n.n(o),r=new i.a({id:"icon-user",use:"icon-user-usage",viewBox:"0 0 130 130",content:''});c.a.add(r);t["default"]=r},bf90:function(e,t,n){},c504:function(e,t,n){"use strict";n.r(t);var a=n("e017"),i=n.n(a),o=n("21a1"),c=n.n(o),r=new i.a({id:"icon-deviceManage",use:"icon-deviceManage-usage",viewBox:"0 0 1024 1024",content:''});c.a.add(r);t["default"]=r},cf1e:function(e,t,n){e.exports={menuText:"#bfcbd9",menuActiveText:"#409EFF",subMenuActiveText:"#f4f4f5",menuBg:"#304156",menuHover:"#263445",subMenuBg:"#1f2d3d",subMenuHover:"#001528",sideBarWidth:"210px"}},d27f:function(e,t,n){"use strict";var a=n("e176"),i=n.n(a);i.a},d7ec:function(e,t,n){"use strict";n.r(t);var a=n("e017"),i=n.n(a),o=n("21a1"),c=n.n(o),r=new i.a({id:"icon-eye-open",use:"icon-eye-open-usage",viewBox:"0 0 1024 1024",content:''});c.a.add(r);t["default"]=r},dc52:function(e,t,n){},dcbb:function(e,t,n){"use strict";n.r(t);var a=n("e017"),i=n.n(a),o=n("21a1"),c=n.n(o),r=new i.a({id:"icon-template",use:"icon-template-usage",viewBox:"0 0 128 128",content:''});c.a.add(r);t["default"]=r},dcf8:function(e,t,n){"use strict";n.r(t);var a=n("e017"),i=n.n(a),o=n("21a1"),c=n.n(o),r=new i.a({id:"icon-nested",use:"icon-nested-usage",viewBox:"0 0 128 128",content:''});c.a.add(r);t["default"]=r},e176:function(e,t,n){},e4de:function(e,t,n){"use strict";var a=n("8902"),i=n.n(a);i.a},eb1b:function(e,t,n){"use strict";n.r(t);var a=n("e017"),i=n.n(a),o=n("21a1"),c=n.n(o),r=new i.a({id:"icon-form",use:"icon-form-usage",viewBox:"0 0 128 128",content:''});c.a.add(r);t["default"]=r},f117:function(e,t,n){"use strict";n.r(t);var a=n("e017"),i=n.n(a),o=n("21a1"),c=n.n(o),r=new i.a({id:"icon-wireless",use:"icon-wireless-usage",viewBox:"0 0 1024 1024",content:''});c.a.add(r);t["default"]=r},f12c:function(e,t,n){},f14a:function(e,t,n){},f782:function(e,t,n){"use strict";n.r(t);var a=n("e017"),i=n.n(a),o=n("21a1"),c=n.n(o),r=new i.a({id:"icon-dashboard",use:"icon-dashboard-usage",viewBox:"0 0 128 100",content:''});c.a.add(r);t["default"]=r}},[[0,"runtime","chunk-elementUI","chunk-libs"]]]); \ No newline at end of file diff --git a/webroot/static/js/chunk-8e9c993e.762ef04c.js b/webroot/static/js/chunk-8e9c993e.762ef04c.js deleted file mode 100644 index 0fd6abd..0000000 --- a/webroot/static/js/chunk-8e9c993e.762ef04c.js +++ /dev/null @@ -1 +0,0 @@ -(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-8e9c993e"],{"244b":function(t,e,a){},3846:function(t,e,a){a("9e1e")&&"g"!=/./g.flags&&a("86cc").f(RegExp.prototype,"flags",{configurable:!0,get:a("0bfb")})},"6b54":function(t,e,a){"use strict";a("3846");var r=a("cb7c"),s=a("0bfb"),l=a("9e1e"),i="toString",o=/./[i],n=function(t){a("2aba")(RegExp.prototype,i,t,!0)};a("79e5")((function(){return"/a/b"!=o.call({source:"a",flags:"b"})}))?n((function(){var t=r(this);return"/".concat(t.source,"/","flags"in t?t.flags:!l&&t instanceof RegExp?s.call(t):void 0)})):o.name!=i&&n((function(){return o.call(this)}))},"8b66":function(t,e,a){"use strict";var r=a("244b"),s=a.n(r);s.a},"9adf":function(t,e,a){"use strict";a.r(e);var r=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"app-container"},[a("el-row",{attrs:{gutter:20}},[a("el-col",{staticStyle:{"margin-bottom":"20px"},attrs:{xs:24,sm:12,md:6}},[a("el-row",{attrs:{gutter:10}},[a("el-col",{attrs:{xs:24,sm:24,md:24}},[a("el-input",{staticStyle:{width:"100%","margin-right":"10px"},attrs:{placeholder:"输入通信接口名称过滤"},model:{value:t.filterText,callback:function(e){t.filterText=e},expression:"filterText"}})],1)],1)],1),t._v(" "),a("el-col",{staticStyle:{"margin-bottom":"20px"},attrs:{xs:24,sm:12,md:18}},[a("el-button",{staticStyle:{float:"right","margin-left":"5px"},attrs:{type:"primary"},on:{click:function(e){t.addVisible=!0,t.form={},t.Param={BaudRate:"9600",Parity:"N",DataBits:"8",StopBits:"1"},t.title="添加通讯接口",t.mode="post"}}},[t._v("添加")]),t._v(" "),a("el-button",{staticStyle:{float:"right"},attrs:{type:"primary"},on:{click:t.getAllCommInterface}},[t._v("刷新")])],1)],1),t._v(" "),a("el-row",{attrs:{gutter:20}},t._l(t.filtedData,(function(e,r){return a("el-col",{key:r,staticStyle:{"margin-bottom":"10px"},attrs:{xs:24,sm:12,md:8}},[a("el-card",{staticClass:"box-card",attrs:{shadow:"hover"}},[a("div",{staticClass:"clearfix",attrs:{slot:"header"},slot:"header"},[a("span",[t._v(t._s(e.Name))]),t._v(" "),a("el-button",{staticStyle:{float:"right",padding:"3px 0"},attrs:{type:"text"},on:{click:function(a){return t.editCommInterface(e)}}},[t._v("修改")]),t._v(" "),a("el-button",{staticStyle:{float:"right",padding:"3px 0"},attrs:{type:"text"},on:{click:function(a){return t.deleteCommInterface(e)}}},[t._v("删除")])],1),t._v(" "),a("el-row",{staticClass:"text item"},[a("el-col",{staticStyle:{"align-self":"center"},attrs:{xs:12,sm:12,md:12}},[a("span",[t._v("接口类型:")])]),t._v(" "),a("el-col",{attrs:{xs:12,sm:12,md:12}},[a("el-tag",{attrs:{type:t._f("statusFilter")(e.Type)}},[t._v(t._s(t._f("interfaceTypeFilter")(e.Type)))])],1)],1),t._v(" "),a("el-collapse",{attrs:{accordion:""},model:{value:t.activeNames,callback:function(e){t.activeNames=e},expression:"activeNames"}},[e.Param?a("el-collapse-item",{attrs:{title:"详细参数",name:e.Name}},[e.Param&&"LocalSerial"==e.Type?a("el-row",{staticClass:"text item"},[a("el-col",{staticStyle:{"align-self":"center","text-align":"right"},attrs:{xs:8,sm:8,md:8}},[a("span",[t._v("物理接口:")])]),t._v(" "),a("el-col",{staticStyle:{"text-align":"left"},attrs:{xs:16,sm:16,md:16}},[a("span",[t._v(t._s(e.Param.Name))])])],1):t._e(),t._v(" "),e.Param&&"LocalSerial"==e.Type?a("el-row",{staticClass:"text item"},[a("el-col",{staticStyle:{"align-self":"center","text-align":"right"},attrs:{xs:8,sm:8,md:8}},[a("span",[t._v("波特率:")])]),t._v(" "),a("el-col",{staticStyle:{"text-align":"left"},attrs:{xs:16,sm:16,md:16}},[a("span",[t._v(t._s(e.Param.BaudRate))])])],1):t._e(),t._v(" "),e.Param&&"LocalSerial"==e.Type?a("el-row",{staticClass:"text item"},[a("el-col",{staticStyle:{"align-self":"center","text-align":"right"},attrs:{xs:8,sm:8,md:8}},[a("span",[t._v("数据位:")])]),t._v(" "),a("el-col",{staticStyle:{"text-align":"left"},attrs:{xs:16,sm:16,md:16}},[a("span",[t._v(t._s(e.Param.DataBits))])])],1):t._e(),t._v(" "),e.Param&&"LocalSerial"==e.Type?a("el-row",{staticClass:"text item"},[a("el-col",{staticStyle:{"align-self":"center","text-align":"right"},attrs:{xs:8,sm:8,md:8}},[a("span",[t._v("校验位:")])]),t._v(" "),a("el-col",{staticStyle:{"text-align":"left"},attrs:{xs:16,sm:16,md:16}},[a("span",[t._v(t._s(t._f("parityFilter")(e.Param.Parity)))])])],1):t._e(),t._v(" "),e.Param&&"LocalSerial"==e.Type?a("el-row",{staticClass:"text item"},[a("el-col",{staticStyle:{"align-self":"center","text-align":"right"},attrs:{xs:8,sm:8,md:8}},[a("span",[t._v("停止位:")])]),t._v(" "),a("el-col",{staticStyle:{"text-align":"left"},attrs:{xs:16,sm:16,md:16}},[a("span",[t._v(t._s(e.Param.StopBits))])])],1):t._e(),t._v(" "),e.Param&&"LocalSerial"==e.Type?a("el-row",{staticClass:"text item"},[a("el-col",{staticStyle:{"align-self":"center","text-align":"right"},attrs:{xs:8,sm:8,md:8}},[a("span",[t._v("命令间隔:")])]),t._v(" "),a("el-col",{staticStyle:{"text-align":"left"},attrs:{xs:16,sm:16,md:16}},[a("span",[t._v(t._s(e.Param.Interval))])])],1):t._e(),t._v(" "),e.Param&&"LocalSerial"==e.Type?a("el-row",{staticClass:"text item"},[a("el-col",{staticStyle:{"align-self":"center","text-align":"right"},attrs:{xs:8,sm:8,md:8}},[a("span",[t._v("超时时间:")])]),t._v(" "),a("el-col",{staticStyle:{"text-align":"left"},attrs:{xs:16,sm:16,md:16}},[a("span",[t._v(t._s(e.Param.Timeout))])])],1):t._e(),t._v(" "),e.Param&&"TcpClient"==e.Type?a("el-row",{staticClass:"text item"},[a("el-col",{staticStyle:{"align-self":"center","text-align":"right"},attrs:{xs:8,sm:8,md:8}},[a("span",[t._v("目标IP:")])]),t._v(" "),a("el-col",{staticStyle:{"text-align":"left"},attrs:{xs:16,sm:16,md:16}},[a("span",[t._v(t._s(e.Param.IP))])])],1):t._e(),t._v(" "),e.Param&&"TcpClient"==e.Type?a("el-row",{staticClass:"text item"},[a("el-col",{staticStyle:{"align-self":"center","text-align":"right"},attrs:{xs:8,sm:8,md:8}},[a("span",[t._v("目标端口:")])]),t._v(" "),a("el-col",{staticStyle:{"text-align":"left"},attrs:{xs:16,sm:16,md:16}},[a("span",[t._v(t._s(e.Param.Port))])])],1):t._e(),t._v(" "),e.Param&&"TcpClient"==e.Type?a("el-row",{staticClass:"text item"},[a("el-col",{staticStyle:{"align-self":"center","text-align":"right"},attrs:{xs:8,sm:8,md:8}},[a("span",[t._v("超时时间:")])]),t._v(" "),a("el-col",{staticStyle:{"text-align":"left"},attrs:{xs:16,sm:16,md:16}},[a("span",[t._v(t._s(e.Param.Timeout))])])],1):t._e(),t._v(" "),e.Param&&"TcpClient"==e.Type?a("el-row",{staticClass:"text item"},[a("el-col",{staticStyle:{"align-self":"center","text-align":"right"},attrs:{xs:8,sm:8,md:8}},[a("span",[t._v("通讯间隔:")])]),t._v(" "),a("el-col",{staticStyle:{"text-align":"left"},attrs:{xs:16,sm:16,md:16}},[a("span",[t._v(t._s(e.Param.Interval))])])],1):t._e()],1):t._e()],1)],1)],1)})),1),t._v(" "),a("el-dialog",{attrs:{title:t.title,visible:t.addVisible,width:"30%"},on:{"update:visible":function(e){t.addVisible=e}}},[a("el-form",{ref:"form",attrs:{model:t.form,"label-width":"100px"}},[a("el-form-item",{attrs:{label:"接口名称"}},[a("el-input",{model:{value:t.form.CommInterfaceName,callback:function(e){t.$set(t.form,"CommInterfaceName",e)},expression:"form.CommInterfaceName"}})],1),t._v(" "),a("el-form-item",{attrs:{label:"接口类型"}},[a("el-select",{attrs:{clearable:"",placeholder:"接口类型"},model:{value:t.form.InterfaceType,callback:function(e){t.$set(t.form,"InterfaceType",e)},expression:"form.InterfaceType"}},t._l(t.InterfaceTypeList,(function(t,e){return a("el-option",{key:e,attrs:{label:t.text,value:t.id}})})),1)],1),t._v(" "),"LocalSerial"==t.form.InterfaceType?a("el-form-item",{attrs:{label:"输入串口"}},[a("el-input",{attrs:{placeholder:"请输入串口"},model:{value:t.Param.Name,callback:function(e){t.$set(t.Param,"Name",e)},expression:"Param.Name"}})],1):t._e(),t._v(" "),"LocalSerial"==t.form.InterfaceType?a("el-form-item",{attrs:{label:"波特率"}},[a("el-select",{attrs:{placeholder:"波特率"},model:{value:t.Param.BaudRate,callback:function(e){t.$set(t.Param,"BaudRate",e)},expression:"Param.BaudRate"}},t._l(t.baudRateList,(function(t,e){return a("el-option",{key:e,attrs:{label:t.text,value:t.id}})})),1)],1):t._e(),t._v(" "),"LocalSerial"==t.form.InterfaceType?a("el-form-item",{attrs:{label:"校验位"}},[a("el-select",{attrs:{placeholder:"校验位"},model:{value:t.Param.Parity,callback:function(e){t.$set(t.Param,"Parity",e)},expression:"Param.Parity"}},t._l(t.parityList,(function(t,e){return a("el-option",{key:e,attrs:{label:t.text,value:t.id}})})),1)],1):t._e(),t._v(" "),"LocalSerial"==t.form.InterfaceType?a("el-form-item",{attrs:{label:"数据位"}},[a("el-select",{attrs:{placeholder:"数据位"},model:{value:t.Param.DataBits,callback:function(e){t.$set(t.Param,"DataBits",e)},expression:"Param.DataBits"}},t._l(t.dataBitsList,(function(t,e){return a("el-option",{key:e,attrs:{label:t.text,value:t.id}})})),1)],1):t._e(),t._v(" "),"LocalSerial"==t.form.InterfaceType?a("el-form-item",{attrs:{label:"停止位"}},[a("el-select",{attrs:{placeholder:"停止位"},model:{value:t.Param.StopBits,callback:function(e){t.$set(t.Param,"StopBits",e)},expression:"Param.StopBits"}},t._l(t.stopBitsList,(function(t,e){return a("el-option",{key:e,attrs:{label:t.text,value:t.id}})})),1)],1):t._e(),t._v(" "),"LocalSerial"==t.form.InterfaceType?a("el-form-item",{attrs:{label:"命令间隔"}},[a("el-input",{attrs:{type:"number"},model:{value:t.Param.Interval,callback:function(e){t.$set(t.Param,"Interval",e)},expression:"Param.Interval"}})],1):t._e(),t._v(" "),"LocalSerial"==t.form.InterfaceType?a("el-form-item",{attrs:{label:"通讯超时"}},[a("el-input",{attrs:{type:"number"},model:{value:t.Param.Timeout,callback:function(e){t.$set(t.Param,"Timeout",e)},expression:"Param.Timeout"}})],1):t._e(),t._v(" "),"TcpClient"==t.form.InterfaceType?a("el-form-item",{attrs:{label:"目的地址"}},[a("el-input",{model:{value:t.Param.IP,callback:function(e){t.$set(t.Param,"IP",e)},expression:"Param.IP"}})],1):t._e(),t._v(" "),"TcpClient"==t.form.InterfaceType?a("el-form-item",{attrs:{label:"目的端口"}},[a("el-input",{attrs:{type:"number"},model:{value:t.Param.Port,callback:function(e){t.$set(t.Param,"Port",e)},expression:"Param.Port"}})],1):t._e(),t._v(" "),"TcpServer"==t.form.InterfaceType?a("el-form-item",{attrs:{label:"本地端口"}},[a("el-input",{attrs:{type:"number"},model:{value:t.Param.localPort,callback:function(e){t.$set(t.Param,"localPort",e)},expression:"Param.localPort"}})],1):t._e(),t._v(" "),"TcpClient"==t.form.InterfaceType?a("el-form-item",{attrs:{label:"超时时间"}},[a("el-input",{attrs:{type:"number"},model:{value:t.Param.Timeout,callback:function(e){t.$set(t.Param,"Timeout",e)},expression:"Param.Timeout"}})],1):t._e(),t._v(" "),"TcpClient"==t.form.InterfaceType?a("el-form-item",{attrs:{label:"通讯间隔"}},[a("el-input",{attrs:{type:"number"},model:{value:t.Param.Interval,callback:function(e){t.$set(t.Param,"Interval",e)},expression:"Param.Interval"}})],1):t._e()],1),t._v(" "),a("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{on:{click:function(e){t.addVisible=!1,t.form={}}}},[t._v("取 消")]),t._v(" "),a("el-button",{attrs:{type:"primary"},on:{click:t.addCommInterface}},[t._v("确 定")])],1)],1)],1)},s=[],l=(a("6b54"),{filters:{statusFilter:function(t){var e={LocalSerial:"success",TcpClient:"gray",TcpServer:"danger"};return e[t]||"info"},interfaceTypeFilter:function(t){var e={LocalSerial:"本地串口",TcpClient:"Tcp客户端",TcpServer:"Tcp服务端"};return e[t]||"未知"},parityFilter:function(t){return"N"===t?"无校验":"O"===t?"奇校验":"E"===t?"偶校验":"未知"}},data:function(){return{serialList:[],listLoading:!0,form:{},filterText:"",editVisible:!1,baudRateList:[],ParityList:[],InterfaceTypeList:[],addVisible:!1,InterfaceMap:[],activeNames:"11",Param:{},title:"",mode:""}},computed:{filtedData:function(){var t=this;return this.InterfaceMap.filter((function(e){if(e.Name.toString().indexOf(t.filterText)>-1)return e}))}},created:function(){this.getAllCommInterface(),this.InterfaceTypeList=[{id:"LocalSerial",text:"本地串口"},{id:"TcpClient",text:"Tcp客户端"}],this.baudRateList=[{id:"1200",text:"1200"},{id:"2400",text:"2400"},{id:"4800",text:"4800"},{id:"9600",text:"9600"},{id:"19200",text:"19200"},{id:"38400",text:"38400"},{id:"115200",text:"115200"}],this.parityList=[{id:"N",text:"无校验"},{id:"O",text:"奇校验"},{id:"E",text:"偶校验"}],this.dataBitsList=[{id:"5",text:"5位"},{id:"6",text:"6位"},{id:"7",text:"7位"},{id:"8",text:"8位"}],this.stopBitsList=[{id:"1",text:"1位"},{id:"1.5",text:"1.5"},{id:"2",text:"2位"}]},methods:{getSerialList:function(){this.listLoading=!0;var t=this,e="";e="./api/v1/serial/param",this.$axios({method:"get",url:e,headers:{token:this.$store.getters.token}}).then((function(e){var a=e.data;"0"===a.Code?(t.serialList=a.Data,t.listLoading=!1):"1"===a.Code?(t.$message.error(a.Message),t.listLoading=!1):"-1"===a.Code?(t.listLoading=!1,t.$message.error(a.Message),t.$store.dispatch("user/resetToken"),t.$router.push("/login?redirect=".concat(t.$route.fullPath))):(t.$message.error("返回未知错误,错误码:"+a.Code),t.listLoading=!1)})).catch((function(e){t.$message.error("出错了"+JSON.stringify(e)),t.listLoading=!1}))},getAllCommInterface:function(){this.listLoading=!0;var t=this,e="";e="./api/v1/device/commInterface",this.$axios({method:"get",url:e,headers:{token:this.$store.getters.token}}).then((function(e){var a=e.data;"0"===a.Code?(t.InterfaceMap=a.Data.InterfaceMap,t.listLoading=!1):"1"===a.Code?(t.$message.error(a.Message),t.listLoading=!1):"-1"===a.Code?(t.listLoading=!1,t.$message.error(a.Message),t.$store.dispatch("user/resetToken"),t.$router.push("/login?redirect=".concat(t.$route.fullPath))):(t.$message.error("返回未知错误,错误码:"+a.Code),t.listLoading=!1)})).catch((function(e){t.$message.error("出错了"+JSON.stringify(e)),t.listLoading=!1}))},selectSerial:function(t){},selectInterfaceType:function(t){console.log(t)},handleEdit:function(t,e){this.form=e,this.editVisible=!0},addCommInterface:function(){var t=this,e="",a={};a.Name=this.form.CommInterfaceName,a.Type=this.form.InterfaceType,"LocalSerial"===this.form.InterfaceType&&(e="commInterface",a.Param={Name:t.Param.Name,BaudRate:t.Param.BaudRate,Parity:t.Param.Parity,DataBits:t.Param.DataBits,StopBits:t.Param.StopBits,Timeout:t.Param.Timeout,Interval:t.Param.Interval}),"TcpClient"===this.form.InterfaceType&&(e="commInterface",a.Param={IP:t.Param.IP,Port:t.Param.Port,Timeout:t.Param.Timeout,Interval:t.Param.Interval});var r="";r="./api/v1/device/"+e,this.$axios({method:t.mode,url:r,data:a,headers:{token:this.$store.getters.token}}).then((function(e){var a=e.data;"0"===a.Code?(t.addVisible=!1,"post"===t.mode&&t.$message.success("添加通讯接口成功"),"put"===t.mode&&t.$message.success("修改通讯接口成功")):"1"===a.Code?t.$message.error(a.Message):"-1"===a.Code?(t.$message.error(a.Message),t.$store.dispatch("user/resetToken"),t.$router.push("/login?redirect=".concat(t.$route.fullPath))):t.$message.error("返回未知错误,错误码:"+a.Code)})).catch((function(e){t.$message.error("出错了"+JSON.stringify(e))}))},editCommInterface:function(t){var e=this;this.form={},this.Param={},this.addVisible=!0,this.form=t,this.$set(e.form,"CommInterfaceName",t.Name),this.$set(e.form,"InterfaceType",t.Type),this.Param=t.Param,this.title="修改通讯接口",this.mode="put","LocalSerial"===t.Type&&this.getSerialList()},deleteCommInterface:function(t){var e=this,a=this;this.$messageBox.confirm("你确定要删除通讯接口吗?

"+t.Name+"

","删除通讯接口",{confirmButtonText:"确定",cancelButtonText:"取消",center:!0,dangerouslyUseHTMLString:!0,type:"info"}).then((function(r){if("confirm"===r){e.form={},e.Param={},e.form=t,e.$set(a.form,"CommInterfaceName",t.Name),e.$set(a.form,"InterfaceType",t.Type),e.Param=t.Param,e.mode="delete";var s="";"LocalSerial"===e.form.InterfaceType&&(s="commInterface"),"TcpClient"===e.form.InterfaceType&&(s="commInterface");var l="";l="./api/v1/device/"+s;var i={};i.commInterface=e.form.CommInterfaceName,e.$axios({method:a.mode,url:l,params:i,headers:{token:e.$store.getters.token}}).then((function(t){var e=t.data;"0"===e.Code?(a.addVisible=!1,"post"===a.mode&&a.$message.success("添加通讯接口成功"),"put"===a.mode&&a.$message.success("修改通讯接口成功"),"delete"===a.mode&&a.$message.success("删除通讯接口成功")):"1"===e.Code?a.$message.error(e.Message):"-1"===e.Code?(a.$message.error(e.Message),a.$store.dispatch("user/resetToken"),a.$router.push("/login?redirect=".concat(a.$route.fullPath))):a.$message.error("返回未知错误,错误码:"+e.Code)})).catch((function(t){a.$message.error("出错了"+JSON.stringify(t))}))}})).catch((function(t){"cancel"===t&&console.log("cancel")}))},saveEditSerial:function(t,e){var a=this;this.$axios({method:"post",url:"./api/v1/serial/param",data:a.form,headers:{token:this.$store.getters.token}}).then((function(t){a.editVisible=!1,a.fetchData()})).catch((function(t){a.$message.error("出错了"+JSON.stringify(t))}))}}}),i=l,o=(a("8b66"),a("2877")),n=Object(o["a"])(i,r,s,!1,null,"ed3ea624",null);e["default"]=n.exports}}]); \ No newline at end of file diff --git a/webroot/static/js/chunk-b662b61c.efd56867.js b/webroot/static/js/chunk-b662b61c.efd56867.js new file mode 100644 index 0000000..e30fd13 --- /dev/null +++ b/webroot/static/js/chunk-b662b61c.efd56867.js @@ -0,0 +1 @@ +(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-b662b61c"],{"03a9":function(t,e,a){},3846:function(t,e,a){a("9e1e")&&"g"!=/./g.flags&&a("86cc").f(RegExp.prototype,"flags",{configurable:!0,get:a("0bfb")})},55226:function(t,e,a){"use strict";var r=a("03a9"),s=a.n(r);s.a},"6b54":function(t,e,a){"use strict";a("3846");var r=a("cb7c"),s=a("0bfb"),l=a("9e1e"),i="toString",o=/./[i],n=function(t){a("2aba")(RegExp.prototype,i,t,!0)};a("79e5")((function(){return"/a/b"!=o.call({source:"a",flags:"b"})}))?n((function(){var t=r(this);return"/".concat(t.source,"/","flags"in t?t.flags:!l&&t instanceof RegExp?s.call(t):void 0)})):o.name!=i&&n((function(){return o.call(this)}))},"9adf":function(t,e,a){"use strict";a.r(e);var r=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"app-container"},[a("el-row",{attrs:{gutter:20}},[a("el-col",{staticStyle:{"margin-bottom":"20px"},attrs:{xs:24,sm:12,md:6}},[a("el-row",{attrs:{gutter:10}},[a("el-col",{attrs:{xs:24,sm:24,md:24}},[a("el-input",{staticStyle:{width:"100%","margin-right":"10px"},attrs:{placeholder:"输入通信接口名称过滤"},model:{value:t.filterText,callback:function(e){t.filterText=e},expression:"filterText"}})],1)],1)],1),t._v(" "),a("el-col",{staticStyle:{"margin-bottom":"20px"},attrs:{xs:24,sm:12,md:18}},[a("el-button",{staticStyle:{float:"right","margin-left":"5px"},attrs:{type:"primary"},on:{click:function(e){t.addVisible=!0,t.form={},t.Param={BaudRate:"9600",Parity:"N",DataBits:"8",StopBits:"1"},t.title="添加通讯接口",t.mode="post"}}},[t._v("添加")]),t._v(" "),a("el-button",{staticStyle:{float:"right"},attrs:{type:"primary"},on:{click:t.getAllCommInterface}},[t._v("刷新")])],1)],1),t._v(" "),a("el-row",{attrs:{gutter:20}},t._l(t.filtedData,(function(e,r){return a("el-col",{key:r,staticStyle:{"margin-bottom":"10px"},attrs:{xs:24,sm:12,md:8}},[a("el-card",{staticClass:"box-card",attrs:{shadow:"hover"}},[a("div",{staticClass:"clearfix",attrs:{slot:"header"},slot:"header"},[a("span",[t._v(t._s(e.Name))]),t._v(" "),a("el-button",{staticStyle:{float:"right",padding:"3px 0"},attrs:{type:"text"},on:{click:function(a){return t.editCommInterface(e)}}},[t._v("修改")]),t._v(" "),a("el-button",{staticStyle:{float:"right",padding:"3px 0"},attrs:{type:"text"},on:{click:function(a){return t.deleteCommInterface(e)}}},[t._v("删除")])],1),t._v(" "),a("el-row",{staticClass:"text item"},[a("el-col",{staticStyle:{"align-self":"center"},attrs:{xs:12,sm:12,md:12}},[a("span",[t._v("接口类型:")])]),t._v(" "),a("el-col",{attrs:{xs:12,sm:12,md:12}},[a("el-tag",{attrs:{type:t._f("statusFilter")(e.Type)}},[t._v(t._s(t._f("interfaceTypeFilter")(e.Type)))])],1)],1),t._v(" "),a("el-collapse",{attrs:{accordion:""},model:{value:t.activeNames,callback:function(e){t.activeNames=e},expression:"activeNames"}},[e.Param?a("el-collapse-item",{attrs:{title:"详细参数",name:e.Name}},[e.Param&&"LocalSerial"==e.Type?a("el-row",{staticClass:"text item"},[a("el-col",{staticStyle:{"align-self":"center","text-align":"right"},attrs:{xs:8,sm:8,md:8}},[a("span",[t._v("物理接口:")])]),t._v(" "),a("el-col",{staticStyle:{"text-align":"left"},attrs:{xs:16,sm:16,md:16}},[a("span",[t._v(t._s(e.Param.Name))])])],1):t._e(),t._v(" "),e.Param&&"LocalSerial"==e.Type?a("el-row",{staticClass:"text item"},[a("el-col",{staticStyle:{"align-self":"center","text-align":"right"},attrs:{xs:8,sm:8,md:8}},[a("span",[t._v("波特率:")])]),t._v(" "),a("el-col",{staticStyle:{"text-align":"left"},attrs:{xs:16,sm:16,md:16}},[a("span",[t._v(t._s(e.Param.BaudRate))])])],1):t._e(),t._v(" "),e.Param&&"LocalSerial"==e.Type?a("el-row",{staticClass:"text item"},[a("el-col",{staticStyle:{"align-self":"center","text-align":"right"},attrs:{xs:8,sm:8,md:8}},[a("span",[t._v("数据位:")])]),t._v(" "),a("el-col",{staticStyle:{"text-align":"left"},attrs:{xs:16,sm:16,md:16}},[a("span",[t._v(t._s(e.Param.DataBits))])])],1):t._e(),t._v(" "),e.Param&&"LocalSerial"==e.Type?a("el-row",{staticClass:"text item"},[a("el-col",{staticStyle:{"align-self":"center","text-align":"right"},attrs:{xs:8,sm:8,md:8}},[a("span",[t._v("校验位:")])]),t._v(" "),a("el-col",{staticStyle:{"text-align":"left"},attrs:{xs:16,sm:16,md:16}},[a("span",[t._v(t._s(t._f("parityFilter")(e.Param.Parity)))])])],1):t._e(),t._v(" "),e.Param&&"LocalSerial"==e.Type?a("el-row",{staticClass:"text item"},[a("el-col",{staticStyle:{"align-self":"center","text-align":"right"},attrs:{xs:8,sm:8,md:8}},[a("span",[t._v("停止位:")])]),t._v(" "),a("el-col",{staticStyle:{"text-align":"left"},attrs:{xs:16,sm:16,md:16}},[a("span",[t._v(t._s(e.Param.StopBits))])])],1):t._e(),t._v(" "),e.Param&&"LocalSerial"==e.Type?a("el-row",{staticClass:"text item"},[a("el-col",{staticStyle:{"align-self":"center","text-align":"right"},attrs:{xs:8,sm:8,md:8}},[a("span",[t._v("命令间隔:")])]),t._v(" "),a("el-col",{staticStyle:{"text-align":"left"},attrs:{xs:16,sm:16,md:16}},[a("span",[t._v(t._s(e.Param.Interval))])])],1):t._e(),t._v(" "),e.Param&&"LocalSerial"==e.Type?a("el-row",{staticClass:"text item"},[a("el-col",{staticStyle:{"align-self":"center","text-align":"right"},attrs:{xs:8,sm:8,md:8}},[a("span",[t._v("超时时间:")])]),t._v(" "),a("el-col",{staticStyle:{"text-align":"left"},attrs:{xs:16,sm:16,md:16}},[a("span",[t._v(t._s(e.Param.Timeout))])])],1):t._e(),t._v(" "),e.Param&&"TcpClient"==e.Type?a("el-row",{staticClass:"text item"},[a("el-col",{staticStyle:{"align-self":"center","text-align":"right"},attrs:{xs:8,sm:8,md:8}},[a("span",[t._v("目标IP:")])]),t._v(" "),a("el-col",{staticStyle:{"text-align":"left"},attrs:{xs:16,sm:16,md:16}},[a("span",[t._v(t._s(e.Param.IP))])])],1):t._e(),t._v(" "),e.Param&&"TcpClient"==e.Type?a("el-row",{staticClass:"text item"},[a("el-col",{staticStyle:{"align-self":"center","text-align":"right"},attrs:{xs:8,sm:8,md:8}},[a("span",[t._v("目标端口:")])]),t._v(" "),a("el-col",{staticStyle:{"text-align":"left"},attrs:{xs:16,sm:16,md:16}},[a("span",[t._v(t._s(e.Param.Port))])])],1):t._e(),t._v(" "),e.Param&&"TcpClient"==e.Type?a("el-row",{staticClass:"text item"},[a("el-col",{staticStyle:{"align-self":"center","text-align":"right"},attrs:{xs:8,sm:8,md:8}},[a("span",[t._v("超时时间:")])]),t._v(" "),a("el-col",{staticStyle:{"text-align":"left"},attrs:{xs:16,sm:16,md:16}},[a("span",[t._v(t._s(e.Param.Timeout))])])],1):t._e(),t._v(" "),e.Param&&"TcpClient"==e.Type?a("el-row",{staticClass:"text item"},[a("el-col",{staticStyle:{"align-self":"center","text-align":"right"},attrs:{xs:8,sm:8,md:8}},[a("span",[t._v("通讯间隔:")])]),t._v(" "),a("el-col",{staticStyle:{"text-align":"left"},attrs:{xs:16,sm:16,md:16}},[a("span",[t._v(t._s(e.Param.Interval))])])],1):t._e(),t._v(" "),e.Param&&"IoIn"==e.Type?a("el-row",{staticClass:"text item"},[a("el-col",{staticStyle:{"align-self":"center","text-align":"right"},attrs:{xs:8,sm:8,md:8}},[a("span",[t._v("物理接口:")])]),t._v(" "),a("el-col",{staticStyle:{"text-align":"left"},attrs:{xs:16,sm:16,md:16}},[a("span",[t._v(t._s(e.Param.Name))])])],1):t._e(),t._v(" "),e.Param&&"IoOut"==e.Type?a("el-row",{staticClass:"text item"},[a("el-col",{staticStyle:{"align-self":"center","text-align":"right"},attrs:{xs:8,sm:8,md:8}},[a("span",[t._v("物理接口:")])]),t._v(" "),a("el-col",{staticStyle:{"text-align":"left"},attrs:{xs:16,sm:16,md:16}},[a("span",[t._v(t._s(e.Param.Name))])])],1):t._e()],1):t._e()],1)],1)],1)})),1),t._v(" "),a("el-dialog",{attrs:{title:t.title,visible:t.addVisible,width:"30%"},on:{"update:visible":function(e){t.addVisible=e}}},[a("el-form",{ref:"form",attrs:{model:t.form,"label-width":"100px"}},[a("el-form-item",{attrs:{label:"接口名称"}},[a("el-input",{model:{value:t.form.CommInterfaceName,callback:function(e){t.$set(t.form,"CommInterfaceName",e)},expression:"form.CommInterfaceName"}})],1),t._v(" "),a("el-form-item",{attrs:{label:"接口类型"}},[a("el-select",{attrs:{clearable:"",placeholder:"接口类型"},model:{value:t.form.InterfaceType,callback:function(e){t.$set(t.form,"InterfaceType",e)},expression:"form.InterfaceType"}},t._l(t.InterfaceTypeList,(function(t,e){return a("el-option",{key:e,attrs:{label:t.text,value:t.id}})})),1)],1),t._v(" "),"LocalSerial"==t.form.InterfaceType?a("el-form-item",{attrs:{label:"输入串口"}},[a("el-input",{attrs:{placeholder:"请输入串口"},model:{value:t.Param.Name,callback:function(e){t.$set(t.Param,"Name",e)},expression:"Param.Name"}})],1):t._e(),t._v(" "),"LocalSerial"==t.form.InterfaceType?a("el-form-item",{attrs:{label:"波特率"}},[a("el-select",{attrs:{placeholder:"波特率"},model:{value:t.Param.BaudRate,callback:function(e){t.$set(t.Param,"BaudRate",e)},expression:"Param.BaudRate"}},t._l(t.baudRateList,(function(t,e){return a("el-option",{key:e,attrs:{label:t.text,value:t.id}})})),1)],1):t._e(),t._v(" "),"LocalSerial"==t.form.InterfaceType?a("el-form-item",{attrs:{label:"校验位"}},[a("el-select",{attrs:{placeholder:"校验位"},model:{value:t.Param.Parity,callback:function(e){t.$set(t.Param,"Parity",e)},expression:"Param.Parity"}},t._l(t.parityList,(function(t,e){return a("el-option",{key:e,attrs:{label:t.text,value:t.id}})})),1)],1):t._e(),t._v(" "),"LocalSerial"==t.form.InterfaceType?a("el-form-item",{attrs:{label:"数据位"}},[a("el-select",{attrs:{placeholder:"数据位"},model:{value:t.Param.DataBits,callback:function(e){t.$set(t.Param,"DataBits",e)},expression:"Param.DataBits"}},t._l(t.dataBitsList,(function(t,e){return a("el-option",{key:e,attrs:{label:t.text,value:t.id}})})),1)],1):t._e(),t._v(" "),"LocalSerial"==t.form.InterfaceType?a("el-form-item",{attrs:{label:"停止位"}},[a("el-select",{attrs:{placeholder:"停止位"},model:{value:t.Param.StopBits,callback:function(e){t.$set(t.Param,"StopBits",e)},expression:"Param.StopBits"}},t._l(t.stopBitsList,(function(t,e){return a("el-option",{key:e,attrs:{label:t.text,value:t.id}})})),1)],1):t._e(),t._v(" "),"LocalSerial"==t.form.InterfaceType?a("el-form-item",{attrs:{label:"命令间隔"}},[a("el-input",{attrs:{type:"number"},model:{value:t.Param.Interval,callback:function(e){t.$set(t.Param,"Interval",e)},expression:"Param.Interval"}})],1):t._e(),t._v(" "),"LocalSerial"==t.form.InterfaceType?a("el-form-item",{attrs:{label:"通讯超时"}},[a("el-input",{attrs:{type:"number"},model:{value:t.Param.Timeout,callback:function(e){t.$set(t.Param,"Timeout",e)},expression:"Param.Timeout"}})],1):t._e(),t._v(" "),"TcpClient"==t.form.InterfaceType?a("el-form-item",{attrs:{label:"目的地址"}},[a("el-input",{model:{value:t.Param.IP,callback:function(e){t.$set(t.Param,"IP",e)},expression:"Param.IP"}})],1):t._e(),t._v(" "),"TcpClient"==t.form.InterfaceType?a("el-form-item",{attrs:{label:"目的端口"}},[a("el-input",{attrs:{type:"number"},model:{value:t.Param.Port,callback:function(e){t.$set(t.Param,"Port",e)},expression:"Param.Port"}})],1):t._e(),t._v(" "),"TcpServer"==t.form.InterfaceType?a("el-form-item",{attrs:{label:"本地端口"}},[a("el-input",{attrs:{type:"number"},model:{value:t.Param.localPort,callback:function(e){t.$set(t.Param,"localPort",e)},expression:"Param.localPort"}})],1):t._e(),t._v(" "),"TcpClient"==t.form.InterfaceType?a("el-form-item",{attrs:{label:"超时时间"}},[a("el-input",{attrs:{type:"number"},model:{value:t.Param.Timeout,callback:function(e){t.$set(t.Param,"Timeout",e)},expression:"Param.Timeout"}})],1):t._e(),t._v(" "),"TcpClient"==t.form.InterfaceType?a("el-form-item",{attrs:{label:"通讯间隔"}},[a("el-input",{attrs:{type:"number"},model:{value:t.Param.Interval,callback:function(e){t.$set(t.Param,"Interval",e)},expression:"Param.Interval"}})],1):t._e(),t._v(" "),"IoIn"==t.form.InterfaceType?a("el-form-item",{attrs:{label:"物理接口"}},[a("el-input",{model:{value:t.Param.Name,callback:function(e){t.$set(t.Param,"Name",e)},expression:"Param.Name"}})],1):t._e(),t._v(" "),"IoOut"==t.form.InterfaceType?a("el-form-item",{attrs:{label:"物理接口"}},[a("el-input",{model:{value:t.Param.Name,callback:function(e){t.$set(t.Param,"Name",e)},expression:"Param.Name"}})],1):t._e()],1),t._v(" "),a("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{on:{click:function(e){t.addVisible=!1,t.form={}}}},[t._v("取 消")]),t._v(" "),a("el-button",{attrs:{type:"primary"},on:{click:t.addCommInterface}},[t._v("确 定")])],1)],1)],1)},s=[],l=(a("6b54"),{filters:{statusFilter:function(t){var e={LocalSerial:"success",TcpClient:"gray",IoIn:"warning",IoOut:"danger",TcpServer:"danger"};return e[t]||"info"},interfaceTypeFilter:function(t){var e={LocalSerial:"本地串口",TcpClient:"Tcp客户端",IoIn:"开关量输入",IoOut:"开关量输出",TcpServer:"Tcp服务端"};return e[t]||"未知"},parityFilter:function(t){return"N"===t?"无校验":"O"===t?"奇校验":"E"===t?"偶校验":"未知"}},data:function(){return{serialList:[],listLoading:!0,form:{},filterText:"",editVisible:!1,baudRateList:[],ParityList:[],InterfaceTypeList:[],addVisible:!1,InterfaceMap:[],activeNames:"11",Param:{},title:"",mode:""}},computed:{filtedData:function(){var t=this;return this.InterfaceMap.filter((function(e){if(e.Name.toString().indexOf(t.filterText)>-1)return e}))}},created:function(){this.getAllCommInterface(),this.InterfaceTypeList=[{id:"LocalSerial",text:"本地串口"},{id:"TcpClient",text:"Tcp客户端"},{id:"IoIn",text:"开关量输入"},{id:"IoOut",text:"开关量输出"}],this.baudRateList=[{id:"1200",text:"1200"},{id:"2400",text:"2400"},{id:"4800",text:"4800"},{id:"9600",text:"9600"},{id:"19200",text:"19200"},{id:"38400",text:"38400"},{id:"115200",text:"115200"}],this.parityList=[{id:"N",text:"无校验"},{id:"O",text:"奇校验"},{id:"E",text:"偶校验"}],this.dataBitsList=[{id:"5",text:"5位"},{id:"6",text:"6位"},{id:"7",text:"7位"},{id:"8",text:"8位"}],this.stopBitsList=[{id:"1",text:"1位"},{id:"1.5",text:"1.5"},{id:"2",text:"2位"}]},methods:{getSerialList:function(){this.listLoading=!0;var t=this,e="";e="./api/v1/serial/param",this.$axios({method:"get",url:e,headers:{token:this.$store.getters.token}}).then((function(e){var a=e.data;"0"===a.Code?(t.serialList=a.Data,t.listLoading=!1):"1"===a.Code?(t.$message.error(a.Message),t.listLoading=!1):"-1"===a.Code?(t.listLoading=!1,t.$message.error(a.Message),t.$store.dispatch("user/resetToken"),t.$router.push("/login?redirect=".concat(t.$route.fullPath))):(t.$message.error("返回未知错误,错误码:"+a.Code),t.listLoading=!1)})).catch((function(e){t.$message.error("出错了"+JSON.stringify(e)),t.listLoading=!1}))},getAllCommInterface:function(){this.listLoading=!0;var t=this,e="";e="./api/v1/device/commInterface",this.$axios({method:"get",url:e,headers:{token:this.$store.getters.token}}).then((function(e){var a=e.data;"0"===a.Code?(t.InterfaceMap=a.Data.InterfaceMap,t.listLoading=!1):"1"===a.Code?(t.$message.error(a.Message),t.listLoading=!1):"-1"===a.Code?(t.listLoading=!1,t.$message.error(a.Message),t.$store.dispatch("user/resetToken"),t.$router.push("/login?redirect=".concat(t.$route.fullPath))):(t.$message.error("返回未知错误,错误码:"+a.Code),t.listLoading=!1)})).catch((function(e){t.$message.error("出错了"+JSON.stringify(e)),t.listLoading=!1}))},selectSerial:function(t){},selectInterfaceType:function(t){console.log(t)},handleEdit:function(t,e){this.form=e,this.editVisible=!0},addCommInterface:function(){var t=this,e="commInterface",a={};a.Name=this.form.CommInterfaceName,a.Type=this.form.InterfaceType,"LocalSerial"===this.form.InterfaceType&&(a.Param={Name:t.Param.Name,BaudRate:t.Param.BaudRate,Parity:t.Param.Parity,DataBits:t.Param.DataBits,StopBits:t.Param.StopBits,Timeout:t.Param.Timeout,Interval:t.Param.Interval}),"TcpClient"===this.form.InterfaceType&&(a.Param={IP:t.Param.IP,Port:t.Param.Port,Timeout:t.Param.Timeout,Interval:t.Param.Interval}),"IoIn"!==this.form.InterfaceType&&"IoOut"!==this.form.InterfaceType||(a.Param={Name:t.Param.Name});var r="";r="./api/v1/device/"+e,this.$axios({method:t.mode,url:r,data:a,headers:{token:this.$store.getters.token}}).then((function(e){var a=e.data;"0"===a.Code?(t.addVisible=!1,"post"===t.mode&&t.$message.success("添加通讯接口成功"),"put"===t.mode&&t.$message.success("修改通讯接口成功")):"1"===a.Code?t.$message.error(a.Message):"-1"===a.Code?(t.$message.error(a.Message),t.$store.dispatch("user/resetToken"),t.$router.push("/login?redirect=".concat(t.$route.fullPath))):t.$message.error("返回未知错误,错误码:"+a.Code)})).catch((function(e){t.$message.error("出错了"+JSON.stringify(e))}))},editCommInterface:function(t){var e=this;this.form={},this.Param={},this.addVisible=!0,this.form=t,this.$set(e.form,"CommInterfaceName",t.Name),this.$set(e.form,"InterfaceType",t.Type),this.Param=t.Param,this.title="修改通讯接口",this.mode="put","LocalSerial"===t.Type&&this.getSerialList()},deleteCommInterface:function(t){var e=this,a=this;this.$messageBox.confirm("你确定要删除通讯接口吗?

"+t.Name+"

","删除通讯接口",{confirmButtonText:"确定",cancelButtonText:"取消",center:!0,dangerouslyUseHTMLString:!0,type:"info"}).then((function(r){if("confirm"===r){e.form={},e.Param={},e.form=t,e.$set(a.form,"CommInterfaceName",t.Name),e.$set(a.form,"InterfaceType",t.Type),e.Param=t.Param,e.mode="delete";var s="";"LocalSerial"===e.form.InterfaceType&&(s="commInterface"),"TcpClient"===e.form.InterfaceType&&(s="commInterface");var l="";l="./api/v1/device/"+s;var i={};i.commInterface=e.form.CommInterfaceName,e.$axios({method:a.mode,url:l,params:i,headers:{token:e.$store.getters.token}}).then((function(t){var e=t.data;"0"===e.Code?(a.addVisible=!1,"post"===a.mode&&a.$message.success("添加通讯接口成功"),"put"===a.mode&&a.$message.success("修改通讯接口成功"),"delete"===a.mode&&a.$message.success("删除通讯接口成功")):"1"===e.Code?a.$message.error(e.Message):"-1"===e.Code?(a.$message.error(e.Message),a.$store.dispatch("user/resetToken"),a.$router.push("/login?redirect=".concat(a.$route.fullPath))):a.$message.error("返回未知错误,错误码:"+e.Code)})).catch((function(t){a.$message.error("出错了"+JSON.stringify(t))}))}})).catch((function(t){"cancel"===t&&console.log("cancel")}))},saveEditSerial:function(t,e){var a=this;this.$axios({method:"post",url:"./api/v1/serial/param",data:a.form,headers:{token:this.$store.getters.token}}).then((function(t){a.editVisible=!1,a.fetchData()})).catch((function(t){a.$message.error("出错了"+JSON.stringify(t))}))}}}),i=l,o=(a("55226"),a("2877")),n=Object(o["a"])(i,r,s,!1,null,"e3ad6a7c",null);e["default"]=n.exports}}]); \ No newline at end of file