From 1d17e2abbbaf740b5fe25e66569397258a9a02c7 Mon Sep 17 00:00:00 2001 From: apple Date: Wed, 29 Jul 2020 23:23:28 +0800 Subject: [PATCH] =?UTF-8?q?=E9=87=87=E9=9B=86=E6=8E=A5=E5=8F=A3=E8=AE=BE?= =?UTF-8?q?=E5=A4=87=E7=AE=A1=E7=90=86=E6=B7=BB=E5=8A=A0=EF=BC=8C=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=EF=BC=8C=E5=88=A0=E9=99=A4=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- webroot/index.html | 2 +- webroot/static/css/chunk-3605dc1a.e611300d.css | 1 - webroot/static/css/chunk-ecb32a26.50700f20.css | 1 + webroot/static/js/{app.18dc8a8d.js => app.1d7c5519.js} | 2 +- webroot/static/js/chunk-3605dc1a.eda9a9c9.js | 1 - webroot/static/js/chunk-ecb32a26.37b79df1.js | 1 + 6 files changed, 4 insertions(+), 4 deletions(-) delete mode 100644 webroot/static/css/chunk-3605dc1a.e611300d.css create mode 100644 webroot/static/css/chunk-ecb32a26.50700f20.css rename webroot/static/js/{app.18dc8a8d.js => app.1d7c5519.js} (99%) delete mode 100644 webroot/static/js/chunk-3605dc1a.eda9a9c9.js create mode 100644 webroot/static/js/chunk-ecb32a26.37b79df1.js diff --git a/webroot/index.html b/webroot/index.html index f174d9a..b0fdee2 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/static/css/chunk-3605dc1a.e611300d.css b/webroot/static/css/chunk-3605dc1a.e611300d.css deleted file mode 100644 index ecfd869..0000000 --- a/webroot/static/css/chunk-3605dc1a.e611300d.css +++ /dev/null @@ -1 +0,0 @@ -.card-panel-icon[data-v-a6aecb9e]{float:left;font-size:48px;width:50%;display:block;margin-bottom:10px;color:#f4516c}.text[data-v-a6aecb9e]{font-size:14px}.item[data-v-a6aecb9e]{margin-bottom:18px;display:-webkit-box;display:-ms-flexbox;display:flex}.bottom[data-v-a6aecb9e]{margin-top:23px;line-height:25px;padding-left:10px;padding-right:10px}.bottomRight[data-v-a6aecb9e]{padding:0;float:right} \ No newline at end of file diff --git a/webroot/static/css/chunk-ecb32a26.50700f20.css b/webroot/static/css/chunk-ecb32a26.50700f20.css new file mode 100644 index 0000000..1d649ca --- /dev/null +++ b/webroot/static/css/chunk-ecb32a26.50700f20.css @@ -0,0 +1 @@ +.card-panel-icon[data-v-054b99ba]{float:left;font-size:48px;width:50%;display:block;margin-bottom:10px;color:#f4516c}.text[data-v-054b99ba]{font-size:14px}.item[data-v-054b99ba]{margin-bottom:18px;display:-webkit-box;display:-ms-flexbox;display:flex}.bottom[data-v-054b99ba]{margin-top:23px;line-height:25px;padding-left:10px;padding-right:10px}.bottomRight[data-v-054b99ba]{padding:0;float:right} \ No newline at end of file diff --git a/webroot/static/js/app.18dc8a8d.js b/webroot/static/js/app.1d7c5519.js similarity index 99% rename from webroot/static/js/app.18dc8a8d.js rename to webroot/static/js/app.1d7c5519.js index df83fc6..b63e08d 100644 --- a/webroot/static/js/app.18dc8a8d.js +++ b/webroot/static/js/app.1d7c5519.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},"14b4":function(e,t,n){"use strict";n.r(t);var a=n("e017"),i=n.n(a),o=n("21a1"),r=n.n(o),s=new i.a({id:"icon-memory",use:"icon-memory-usage",viewBox:"0 0 1024 1024",content:''});r.a.add(s);t["default"]=s},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"),r=n.n(o),s=new i.a({id:"icon-link",use:"icon-link-usage",viewBox:"0 0 128 128",content:''});r.a.add(s);t["default"]=s},"1b2d":function(e,t,n){"use strict";n.r(t);var a=n("e017"),i=n.n(a),o=n("21a1"),r=n.n(o),s=new i.a({id:"icon-interface",use:"icon-interface-usage",viewBox:"0 0 1024 1024",content:''});r.a.add(s);t["default"]=s},"2a3d":function(e,t,n){"use strict";n.r(t);var a=n("e017"),i=n.n(a),o=n("21a1"),r=n.n(o),s=new i.a({id:"icon-password",use:"icon-password-usage",viewBox:"0 0 128 128",content:''});r.a.add(s);t["default"]=s},"30c3":function(e,t,n){"use strict";n.r(t);var a=n("e017"),i=n.n(a),o=n("21a1"),r=n.n(o),s=new i.a({id:"icon-example",use:"icon-example-usage",viewBox:"0 0 128 128",content:''});r.a.add(s);t["default"]=s},3615:function(e,t,n){"use strict";var a=n("c726"),i=n.n(a);i.a},"47f1":function(e,t,n){"use strict";n.r(t);var a=n("e017"),i=n.n(a),o=n("21a1"),r=n.n(o),s=new i.a({id:"icon-table",use:"icon-table-usage",viewBox:"0 0 128 128",content:''});r.a.add(s);t["default"]=s},"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"),r=n.n(o),s=new i.a({id:"icon-eye",use:"icon-eye-usage",viewBox:"0 0 128 64",content:''});r.a.add(s);t["default"]=s},"51ff":function(e,t,n){var a={"./dashboard.svg":"f782","./deviceManage.svg":"c504","./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")),r=n.n(o),s=(n("0fae"),n("b2d6")),c=n.n(s),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),z={sidebar:{opened:!k.a.get("sidebarStatus")||!!+k.a.get("sidebarStatus"),withoutAnimation:!1},device:"desktop"},_={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}},C={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)}},M={namespaced:!0,state:z,mutations:_,actions:C},E=n("83d6"),O=n.n(E),B=O.a.showSettings,H=O.a.fixedHeader,S=O.a.sidebarLogo,T={showSettings:B,fixedHeader:H,sidebarLogo:S},L={CHANGE_SETTING:function(e,t){var n=t.key,a=t.value;e.hasOwnProperty(n)&&(e[n]=a)}},A={changeSetting:function(e,t){var n=e.commit;n("CHANGE_SETTING",t)}},V={namespaced:!0,state:T,mutations:L,actions:A},$="token";function j(){return k.a.get($)}function D(e){return k.a.set($,e)}function N(){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 P=I;function R(e){var t="";return t="/api/v1/system/login",P({url:t,method:"post",data:e})}function q(e){var t="";return t="/api/v1/system/loginParam",P({url:t,method:"get",params:{}})}function G(){var e="";return e="/api/v1/system/reboot",P({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("db32")("./"+e.avatar+".gif")}}),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)),re=oe.exports,se=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"}})])])},ce=[],le={name:"Hamburger",props:{isActive:{type:Boolean,default:!1}},methods:{toggleClick:function(){this.$emit("toggleClick")}}},ue=le,de=(n("186a"),Object(h["a"])(ue,se,ce,!1,null,"49e15297",null)),me=de.exports,he={components:{Breadcrumb:re,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?redirect=".concat(this.$route.fullPath));case 3:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}()}},pe=he,fe=(n("3615"),Object(h["a"])(pe,Y,Q,!1,null,"13d9266c",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,ze=(n("6b31"),Object(h["a"])(ke,we,xe,!1,null,"5bb1c0e2",null)),_e=ze.exports,Ce=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)},Me=[],Ee=n("df7c"),Oe=n.n(Ee),Be=n("61f7"),He={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}},Se=He,Te=Object(h["a"])(Se,F,U,!1,null,null,null),Le=Te.exports,Ae=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)},Ve=[],$e={props:{to:{type:String,required:!0}},methods:{linkProps:function(e){return Object(Be["a"])(e)?{is:"a",href:e,target:"_blank",rel:"noopener"}:{is:"router-link",to:e}}}},je=$e,De=Object(h["a"])(je,Ae,Ve,!1,null,null,null),Ne=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)}}}}},Pe={name:"SidebarItem",components:{Item:Le,AppLink:Ne},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(Be["a"])(e)?e:Object(Be["a"])(this.basePath)?this.basePath:Oe.a.resolve(this.basePath,e)}}},Re=Pe,qe=Object(h["a"])(Re,Ce,Me,!1,null,null,null),Ge=qe.exports,Fe=n("cf1e"),Ue=n.n(Fe),Ke={components:{SidebarItem:Ge,Logo:_e},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,rt={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"),r=n.n(o),s=new i.a({id:"icon-tree",use:"icon-tree-usage",viewBox:"0 0 128 128",content:''});r.a.add(s);t["default"]=s},"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"}},b3b5:function(e,t,n){"use strict";n.r(t);var a=n("e017"),i=n.n(a),o=n("21a1"),r=n.n(o),s=new i.a({id:"icon-user",use:"icon-user-usage",viewBox:"0 0 130 130",content:''});r.a.add(s);t["default"]=s},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"),r=n.n(o),s=new i.a({id:"icon-deviceManage",use:"icon-deviceManage-usage",viewBox:"0 0 1024 1024",content:''});r.a.add(s);t["default"]=s},c726:function(e,t,n){},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"),r=n.n(o),s=new i.a({id:"icon-eye-open",use:"icon-eye-open-usage",viewBox:"0 0 1024 1024",content:''});r.a.add(s);t["default"]=s},db32:function(e,t,n){var a={"./admin.gif":"1605"};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="db32"},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"),r=n.n(o),s=new i.a({id:"icon-template",use:"icon-template-usage",viewBox:"0 0 128 128",content:''});r.a.add(s);t["default"]=s},dcf8:function(e,t,n){"use strict";n.r(t);var a=n("e017"),i=n.n(a),o=n("21a1"),r=n.n(o),s=new i.a({id:"icon-nested",use:"icon-nested-usage",viewBox:"0 0 128 128",content:''});r.a.add(s);t["default"]=s},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"),r=n.n(o),s=new i.a({id:"icon-form",use:"icon-form-usage",viewBox:"0 0 128 128",content:''});r.a.add(s);t["default"]=s},f117:function(e,t,n){"use strict";n.r(t);var a=n("e017"),i=n.n(a),o=n("21a1"),r=n.n(o),s=new i.a({id:"icon-wireless",use:"icon-wireless-usage",viewBox:"0 0 1024 1024",content:''});r.a.add(s);t["default"]=s},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"),r=n.n(o),s=new i.a({id:"icon-dashboard",use:"icon-dashboard-usage",viewBox:"0 0 128 100",content:''});r.a.add(s);t["default"]=s}},[[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},"14b4":function(e,t,n){"use strict";n.r(t);var a=n("e017"),i=n.n(a),o=n("21a1"),r=n.n(o),s=new i.a({id:"icon-memory",use:"icon-memory-usage",viewBox:"0 0 1024 1024",content:''});r.a.add(s);t["default"]=s},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"),r=n.n(o),s=new i.a({id:"icon-link",use:"icon-link-usage",viewBox:"0 0 128 128",content:''});r.a.add(s);t["default"]=s},"1b2d":function(e,t,n){"use strict";n.r(t);var a=n("e017"),i=n.n(a),o=n("21a1"),r=n.n(o),s=new i.a({id:"icon-interface",use:"icon-interface-usage",viewBox:"0 0 1024 1024",content:''});r.a.add(s);t["default"]=s},"2a3d":function(e,t,n){"use strict";n.r(t);var a=n("e017"),i=n.n(a),o=n("21a1"),r=n.n(o),s=new i.a({id:"icon-password",use:"icon-password-usage",viewBox:"0 0 128 128",content:''});r.a.add(s);t["default"]=s},"30c3":function(e,t,n){"use strict";n.r(t);var a=n("e017"),i=n.n(a),o=n("21a1"),r=n.n(o),s=new i.a({id:"icon-example",use:"icon-example-usage",viewBox:"0 0 128 128",content:''});r.a.add(s);t["default"]=s},3615:function(e,t,n){"use strict";var a=n("c726"),i=n.n(a);i.a},"47f1":function(e,t,n){"use strict";n.r(t);var a=n("e017"),i=n.n(a),o=n("21a1"),r=n.n(o),s=new i.a({id:"icon-table",use:"icon-table-usage",viewBox:"0 0 128 128",content:''});r.a.add(s);t["default"]=s},"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"),r=n.n(o),s=new i.a({id:"icon-eye",use:"icon-eye-usage",viewBox:"0 0 128 64",content:''});r.a.add(s);t["default"]=s},"51ff":function(e,t,n){var a={"./dashboard.svg":"f782","./deviceManage.svg":"c504","./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")),r=n.n(o),s=(n("0fae"),n("b2d6")),c=n.n(s),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),z={sidebar:{opened:!k.a.get("sidebarStatus")||!!+k.a.get("sidebarStatus"),withoutAnimation:!1},device:"desktop"},_={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}},C={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)}},M={namespaced:!0,state:z,mutations:_,actions:C},E=n("83d6"),O=n.n(E),B=O.a.showSettings,H=O.a.fixedHeader,S=O.a.sidebarLogo,T={showSettings:B,fixedHeader:H,sidebarLogo:S},L={CHANGE_SETTING:function(e,t){var n=t.key,a=t.value;e.hasOwnProperty(n)&&(e[n]=a)}},A={changeSetting:function(e,t){var n=e.commit;n("CHANGE_SETTING",t)}},V={namespaced:!0,state:T,mutations:L,actions:A},$="token";function j(){return k.a.get($)}function D(e){return k.a.set($,e)}function N(){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 P=I;function R(e){var t="";return t="/api/v1/system/login",P({url:t,method:"post",data:e})}function q(e){var t="";return t="/api/v1/system/loginParam",P({url:t,method:"get",params:{}})}function G(){var e="";return e="/api/v1/system/reboot",P({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("db32")("./"+e.avatar+".gif")}}),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)),re=oe.exports,se=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"}})])])},ce=[],le={name:"Hamburger",props:{isActive:{type:Boolean,default:!1}},methods:{toggleClick:function(){this.$emit("toggleClick")}}},ue=le,de=(n("186a"),Object(h["a"])(ue,se,ce,!1,null,"49e15297",null)),me=de.exports,he={components:{Breadcrumb:re,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?redirect=".concat(this.$route.fullPath));case 3:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}()}},pe=he,fe=(n("3615"),Object(h["a"])(pe,Y,Q,!1,null,"13d9266c",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,ze=(n("6b31"),Object(h["a"])(ke,we,xe,!1,null,"5bb1c0e2",null)),_e=ze.exports,Ce=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)},Me=[],Ee=n("df7c"),Oe=n.n(Ee),Be=n("61f7"),He={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}},Se=He,Te=Object(h["a"])(Se,F,U,!1,null,null,null),Le=Te.exports,Ae=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)},Ve=[],$e={props:{to:{type:String,required:!0}},methods:{linkProps:function(e){return Object(Be["a"])(e)?{is:"a",href:e,target:"_blank",rel:"noopener"}:{is:"router-link",to:e}}}},je=$e,De=Object(h["a"])(je,Ae,Ve,!1,null,null,null),Ne=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)}}}}},Pe={name:"SidebarItem",components:{Item:Le,AppLink:Ne},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(Be["a"])(e)?e:Object(Be["a"])(this.basePath)?this.basePath:Oe.a.resolve(this.basePath,e)}}},Re=Pe,qe=Object(h["a"])(Re,Ce,Me,!1,null,null,null),Ge=qe.exports,Fe=n("cf1e"),Ue=n.n(Fe),Ke={components:{SidebarItem:Ge,Logo:_e},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,rt={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"),r=n.n(o),s=new i.a({id:"icon-tree",use:"icon-tree-usage",viewBox:"0 0 128 128",content:''});r.a.add(s);t["default"]=s},"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"}},b3b5:function(e,t,n){"use strict";n.r(t);var a=n("e017"),i=n.n(a),o=n("21a1"),r=n.n(o),s=new i.a({id:"icon-user",use:"icon-user-usage",viewBox:"0 0 130 130",content:''});r.a.add(s);t["default"]=s},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"),r=n.n(o),s=new i.a({id:"icon-deviceManage",use:"icon-deviceManage-usage",viewBox:"0 0 1024 1024",content:''});r.a.add(s);t["default"]=s},c726:function(e,t,n){},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"),r=n.n(o),s=new i.a({id:"icon-eye-open",use:"icon-eye-open-usage",viewBox:"0 0 1024 1024",content:''});r.a.add(s);t["default"]=s},db32:function(e,t,n){var a={"./admin.gif":"1605"};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="db32"},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"),r=n.n(o),s=new i.a({id:"icon-template",use:"icon-template-usage",viewBox:"0 0 128 128",content:''});r.a.add(s);t["default"]=s},dcf8:function(e,t,n){"use strict";n.r(t);var a=n("e017"),i=n.n(a),o=n("21a1"),r=n.n(o),s=new i.a({id:"icon-nested",use:"icon-nested-usage",viewBox:"0 0 128 128",content:''});r.a.add(s);t["default"]=s},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"),r=n.n(o),s=new i.a({id:"icon-form",use:"icon-form-usage",viewBox:"0 0 128 128",content:''});r.a.add(s);t["default"]=s},f117:function(e,t,n){"use strict";n.r(t);var a=n("e017"),i=n.n(a),o=n("21a1"),r=n.n(o),s=new i.a({id:"icon-wireless",use:"icon-wireless-usage",viewBox:"0 0 1024 1024",content:''});r.a.add(s);t["default"]=s},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"),r=n.n(o),s=new i.a({id:"icon-dashboard",use:"icon-dashboard-usage",viewBox:"0 0 128 100",content:''});r.a.add(s);t["default"]=s}},[[0,"runtime","chunk-elementUI","chunk-libs"]]]); \ No newline at end of file diff --git a/webroot/static/js/chunk-3605dc1a.eda9a9c9.js b/webroot/static/js/chunk-3605dc1a.eda9a9c9.js deleted file mode 100644 index d213d2d..0000000 --- a/webroot/static/js/chunk-3605dc1a.eda9a9c9.js +++ /dev/null @@ -1 +0,0 @@ -(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-3605dc1a"],{"061c":function(e,t,a){"use strict";var i=a("90ba"),r=a.n(i);r.a},"4c31":function(e,t,a){"use strict";a.r(t);var i=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"app-container"},[a("el-row",{directives:[{name:"show",rawName:"v-show",value:e.firstVisible,expression:"firstVisible"}],attrs:{gutter:20}},[a("el-col",{staticStyle:{"margin-bottom":"20px"},attrs:{xs:24,sm:12,md:6}},[a("div",[a("span",{staticStyle:{"font-size":"20px","align-self":"center","margin-right":"15px"}},[e._v("设备统计")]),e._v(" "),a("span",{staticStyle:{"margin-right":"15px","align-self":"bottom"}},[e._v("总数:"),a("span",{staticStyle:{color:"#006db1"}},[e._v(e._s(e.deviceCntInfo.deviceCnt))])]),e._v(" "),a("span",{staticStyle:{"margin-right":"15px","align-self":"bottom"}},[e._v("在线:"),a("span",{staticStyle:{color:"green"}},[e._v(e._s(e.deviceCntInfo.deviceOnlineCnt))])])])]),e._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(t){e.addVisible=!0,e.getAllCommInterface(),e.form={},e.mode="post",e.title="添加采集接口"}}},[e._v("添加")]),e._v(" "),a("el-button",{staticStyle:{float:"right","margin-left":"5px"},attrs:{type:"primary"},on:{click:e.getAllInterface}},[e._v("刷新")])],1)],1),e._v(" "),a("el-row",{directives:[{name:"show",rawName:"v-show",value:e.firstVisible,expression:"firstVisible"}],attrs:{gutter:20}},e._l(e.interfaceList,(function(t,i){return a("el-col",{key:i,attrs:{xs:24,sm:12,md:6}},[a("el-card",{staticClass:"box-card",attrs:{shadow:"hover"}},[a("div",{staticClass:"clearfix",attrs:{slot:"header"},slot:"header"},[a("span",[e._v(e._s(t.CollInterfaceName))]),e._v(" "),a("el-button",{staticStyle:{float:"right",padding:"3px 0"},attrs:{type:"text"},on:{click:function(a){return e.deleteInterface(t)}}},[e._v("删除")]),e._v(" "),a("el-button",{staticStyle:{float:"right",padding:"3px 0"},attrs:{type:"text"},on:{click:function(a){return e.editInterface(t)}}},[e._v("修改")]),e._v(" "),a("el-button",{staticStyle:{float:"right",padding:"3px 0"},attrs:{type:"text"},on:{click:function(a){return e.handelGetDeviceListByInterface(t)}}},[e._v("详情")])],1),e._v(" "),a("el-row",{staticClass:"text item"},[a("el-col",{staticStyle:{"align-self":"center","padding-right":"15px","text-align":"right"},attrs:{xs:12,sm:12,md:12}},[a("span",[e._v("通讯接口:")])]),e._v(" "),a("el-col",{attrs:{xs:12,sm:12,md:12}},[a("span",[e._v(e._s(t.CommInterfaceName))])])],1),e._v(" "),a("el-row",{staticClass:"text item"},[a("el-col",{staticStyle:{"align-self":"center","padding-right":"15px","text-align":"right"},attrs:{xs:12,sm:12,md:12}},[a("span",[e._v("采集时间:")])]),e._v(" "),a("el-col",{attrs:{xs:12,sm:12,md:12}},[a("span",[e._v(e._s(t.PollPeriod)+" 毫秒")])])],1),e._v(" "),a("el-row",{staticClass:"text item"},[a("el-col",{staticStyle:{"align-self":"center","padding-right":"15px","text-align":"right"},attrs:{xs:12,sm:12,md:12}},[a("span",[e._v("采集超时:")])]),e._v(" "),a("el-col",{attrs:{xs:12,sm:12,md:12}},[a("span",[e._v(e._s(t.OfflinePeriod)+" 毫秒")])])],1),e._v(" "),a("div",{staticClass:"bottom clearfix"},[a("span",[e._v("设备总数:"),a("span",{staticStyle:{color:"#006db1"}},[e._v(e._s(t.DeviceNodeCnt))])]),e._v(" "),a("span",{staticClass:"bottomRight"},[e._v("设备在线:"),a("span",{staticStyle:{color:"green"}},[e._v(e._s(t.DeviceNodeOnlineCnt))])])])],1)],1)})),1),e._v(" "),a("el-row",{directives:[{name:"show",rawName:"v-show",value:e.sencondVisible,expression:"sencondVisible"}],attrs:{gutter:20}},[a("el-col",{staticStyle:{"margin-bottom":"20px"},attrs:{xs:24,sm:12,md:12}},[a("el-row",{attrs:{gutter:10}},[a("div",[a("el-button",{staticStyle:{"margin-right":"15px"},attrs:{type:"text"},on:{click:function(t){e.sencondVisible=!1,e.firstVisible=!0}}},[e._v("返回")]),e._v(" "),a("span",{staticStyle:{"font-size":"20px","align-self":"center","margin-right":"15px"}},[e._v(e._s(e.currentCollInterfaceName))]),e._v(" "),a("span",{staticStyle:{"margin-right":"15px","align-self":"bottom"}},[e._v("总数:"),a("span",{staticStyle:{color:"#006db1"}},[e._v(e._s(e.currentCollInterfaceDeviceNodeInfo.DeviceNodeCnt?e.currentCollInterfaceDeviceNodeInfo.DeviceNodeCnt:"0"))])]),e._v(" "),a("span",{staticStyle:{"margin-right":"15px","align-self":"bottom"}},[e._v("在线:"),a("span",{staticStyle:{color:"green"}},[e._v(e._s(e.currentCollInterfaceDeviceNodeInfo.DeviceNodeOnlineCnt?e.currentCollInterfaceDeviceNodeInfo.DeviceNodeOnlineCnt:"0"))])])],1)])],1),e._v(" "),a("el-col",{staticStyle:{"margin-bottom":"20px"},attrs:{xs:24,sm:12,md:12}},[a("el-button",{staticStyle:{float:"right","margin-left":"5px"},attrs:{type:"primary"},on:{click:e.handleAddDevice}},[e._v("添加")]),e._v(" "),a("el-button",{staticStyle:{float:"right","margin-left":"5px"},attrs:{type:"primary"},on:{click:e.handleModifyDevice}},[e._v("修改")]),e._v(" "),a("el-button",{staticStyle:{float:"right","margin-left":"5px"},attrs:{type:"primary"},on:{click:e.getDeviceListByInterface}},[e._v("刷新")])],1)],1),e._v(" "),a("el-row",{directives:[{name:"show",rawName:"v-show",value:e.sencondVisible,expression:"sencondVisible"}],attrs:{gutter:20}},[a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:e.listLoading,expression:"listLoading"}],attrs:{data:e.deviceListByCollInterface,height:"543","element-loading-text":"加载中",border:"",fit:"","highlight-current-row":""},on:{"selection-change":e.handleSelectionChange}},[a("el-table-column",{attrs:{type:"selection",width:"55",align:"center"}}),e._v(" "),a("el-table-column",{attrs:{label:"设备名称",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v("\n "+e._s(t.row.Name+"(")+"\n "),a("el-tag",{attrs:{type:e._f("statusFilter")(t.row.CommStatus)}},[e._v(e._s(e._f("netWorkFilter")(t.row.CommStatus)))]),e._v("\n "+e._s(")")+"\n ")]}}])}),e._v(" "),a("el-table-column",{attrs:{label:"设备模版",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v("\n "+e._s(t.row.Type)+"\n ")]}}])}),e._v(" "),a("el-table-column",{attrs:{label:"通讯地址",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("span",[e._v(e._s(t.row.Addr))])]}}])}),e._v(" "),a("el-table-column",{attrs:{label:"最后通信时间",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("span",[e._v(e._s(t.row.LastCommRTC))])]}}])}),e._v(" "),a("el-table-column",{attrs:{label:"通信总次数",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("span",[e._v(e._s(t.row.CommTotalCnt))])]}}])}),e._v(" "),a("el-table-column",{attrs:{label:"通信成功次数",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("span",[e._v(e._s(t.row.CommSuccessCnt))])]}}])}),e._v(" "),a("el-table-column",{attrs:{label:"操作",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-button",{attrs:{type:"primary",size:"small"},on:{click:function(a){return e.handleClick(t.row)}}},[e._v("查看变量")])]}}])})],1)],1),e._v(" "),a("el-dialog",{attrs:{title:e.title,visible:e.addVisible,width:"30%"},on:{"update:visible":function(t){e.addVisible=t}}},[a("el-form",{ref:"form",attrs:{model:e.form,"label-width":"100px"}},[a("el-form-item",{attrs:{label:"接口名称"}},[a("el-input",{model:{value:e.form.CollInterfaceName,callback:function(t){e.$set(e.form,"CollInterfaceName",t)},expression:"form.CollInterfaceName"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"通讯接口"}},[a("el-select",{attrs:{clearable:"",placeholder:"通讯接口"},model:{value:e.form.CommInterfaceName,callback:function(t){e.$set(e.form,"CommInterfaceName",t)},expression:"form.CommInterfaceName"}},e._l(e.InterfaceMap,(function(e,t){return a("el-option",{key:t,attrs:{label:e.Name,value:e.Name}})})),1)],1),e._v(" "),a("el-form-item",{attrs:{label:"采集时间"}},[a("el-input",{attrs:{placeholder:"请输入采集时间",type:"number"},model:{value:e.form.PollPeriod,callback:function(t){e.$set(e.form,"PollPeriod",e._n(t))},expression:"form.PollPeriod"}},[a("template",{slot:"append"},[e._v("毫秒")])],2)],1),e._v(" "),a("el-form-item",{attrs:{label:"采集超时"}},[a("el-input",{attrs:{placeholder:"请输入采集超时",type:"number"},model:{value:e.form.OfflinePeriod,callback:function(t){e.$set(e.form,"OfflinePeriod",e._n(t))},expression:"form.OfflinePeriod"}},[a("template",{slot:"append"},[e._v("毫秒")])],2)],1)],1),e._v(" "),a("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{on:{click:function(t){e.addVisible=!1,e.form={},e.getAllInterface()}}},[e._v("取 消")]),e._v(" "),a("el-button",{attrs:{type:"primary"},on:{click:e.addInterface}},[e._v("确 定")])],1)],1),e._v(" "),a("el-dialog",{attrs:{title:e.title,visible:e.deviceVisible,width:"30%"},on:{"update:visible":function(t){e.deviceVisible=t}}},[a("el-form",{ref:"form",attrs:{model:e.form,"label-width":"100px"}},[a("el-form-item",{attrs:{label:"设备名称"}},[a("el-input",{model:{value:e.form.Name,callback:function(t){e.$set(e.form,"Name",t)},expression:"form.Name"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"设备模版"}},[a("el-select",{attrs:{clearable:"",placeholder:"请输入设备模版"},model:{value:e.form.Type,callback:function(t){e.$set(e.form,"Type",t)},expression:"form.Type"}},e._l(e.templateList,(function(e,t){return a("el-option",{key:t,attrs:{label:e.TemplateType,value:e.TemplateType}})})),1)],1),e._v(" "),a("el-form-item",{attrs:{label:"采集接口"}},[a("el-input",{attrs:{placeholder:"请输入采集接口",disabled:!0},model:{value:e.form.CollInterfaceName,callback:function(t){e.$set(e.form,"CollInterfaceName",t)},expression:"form.CollInterfaceName"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"通讯地址"}},[a("el-input",{attrs:{placeholder:"请输入通讯地址",type:"number"},model:{value:e.form.Addr,callback:function(t){e.$set(e.form,"Addr",t)},expression:"form.Addr"}})],1)],1),e._v(" "),a("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{on:{click:function(t){e.deviceVisible=!1,e.form={}}}},[e._v("取 消")]),e._v(" "),a("el-button",{attrs:{type:"primary"},on:{click:e.addDevice}},[e._v("确 定")])],1)],1)],1)},r=[],s={filters:{statusFilter:function(e){var t={onLine:"success",offLine:"gray",noRegister:"danger"};return t[e]||"info"},interfaceTypeFilter:function(e){var t={LocalSerial:"本地串口",TcpClient:"Tcp客户端",TcpServer:"Tcp服务端"};return t[e]||"未知"},netWorkFilter:function(e){var t={onLine:"在线",noRegister:"未注册",offLine:"离线"};return t[e]||"未知"},parityFilter:function(e){return console.log(e),"N"===e?"无校验":"J"===e?"奇校验":"O"===e?"偶校验":"未知"}},data:function(){return{deviceListByCollInterface:[],listLoading:!0,form:{},filterText:"",editVisible:!1,baudRateList:[],ParityList:[],InterfaceTypeList:[],addVisible:!1,interface:[],activeNames:"11",firstVisible:!0,sencondVisible:!1,interfaceList:[],InterfaceMap:[],mode:"",title:"",deviceVisible:!1,templateList:[],currentCollInterfaceName:"",multipleSelection:[]}},computed:{deviceCntInfo:function(){var e=0,t=0,a={};return this.interfaceList.filter((function(a){e+=parseInt(a.DeviceNodeCnt),t+=parseInt(a.DeviceNodeOnlineCnt)})),a.deviceCnt=e,a.deviceOnlineCnt=t,a},currentCollInterfaceDeviceNodeInfo:function(){var e=0,t={};return this.deviceListByCollInterface.filter((function(t){"onLine"===t.CommStatus&&(e+=1)})),t.DeviceNodeCnt=this.deviceListByCollInterface.length,t.DeviceNodeOnlineCnt=e,t}},created:function(){this.getAllInterface(),this.InterfaceTypeList=[{id:"LocalSerial",text:"本地串口"},{id:"TcpClient",text:"Tcp客户端"}],this.templateTypeList=[{id:"1",text:"fcu200"},{id:"2",text:"fcu210"}],this.parityList=[{id:"N",text:"无校验"},{id:"J",text:"奇校验"},{id:"O",text:"偶校验"}]},methods:{getAllInterface:function(){this.listLoading=!0;var e=this,t="";t="./api/v1/device/allInterface",this.$axios({method:"get",url:t,headers:{token:this.$store.getters.token}}).then((function(t){var a=t.data;"0"===a.Code?(e.interfaceList=a.Data,e.listLoading=!1):"1"===a.Code?(e.$message.error(a.Message),e.listLoading=!1):"-1"===a.Code?(e.listLoading=!1,e.$message.error(a.Message),e.$store.dispatch("user/resetToken"),e.$router.push("/login?redirect=".concat(e.$route.fullPath))):(e.$message.error("返回未知错误,错误码:"+a.Code),e.listLoading=!1)})).catch((function(t){e.$message.error("出错了"+JSON.stringify(t)),e.listLoading=!1}))},addInterface:function(){var e=this,t="";t="./api/v1/device/interface",this.$axios({method:e.mode,url:t,data:e.form,headers:{token:this.$store.getters.token}}).then((function(t){var a=t.data;"0"===a.Code?(e.addVisible=!1,"post"===e.mode&&e.$message.success("添加采集接口成功"),"put"===e.mode&&e.$message.success("修改采集接口成功"),"delete"===e.mode&&e.$message.success("删除采集接口成功")):"1"===a.Code?e.$message.error(a.Message):"-1"===a.Code?(e.$message.error(a.Message),e.$store.dispatch("user/resetToken"),e.$router.push("/login?redirect=".concat(e.$route.fullPath))):e.$message.error("返回未知错误,错误码:"+a.Code)})).catch((function(t){e.$message.error("出错了"+JSON.stringify(t))}))},addDevice:function(){var e=this,t="";t="./api/v1/device/node",this.$axios({method:e.mode,url:t,data:e.form,headers:{token:this.$store.getters.token}}).then((function(t){var a=t.data;"0"===a.Code?(e.addVisible=!1,"post"===e.mode&&e.$message.success("添加设备成功"),"put"===e.mode&&e.$message.success("修改设备成功"),"delete"===e.mode&&e.$message.success("删除设备成功")):"1"===a.Code?e.$message.error(a.Message):"-1"===a.Code?(e.$message.error(a.Message),e.$store.dispatch("user/resetToken"),e.$router.push("/login?redirect=".concat(e.$route.fullPath))):e.$message.error("返回未知错误,错误码:"+a.Code)})).catch((function(t){e.$message.error("出错了"+JSON.stringify(t))}))},getAllCommInterface:function(){this.listLoading=!0;var e=this,t="";t="./api/v1/device/commInterface",this.$axios({method:"get",url:t,headers:{token:this.$store.getters.token}}).then((function(t){var a=t.data;"0"===a.Code?(e.InterfaceMap=a.Data.InterfaceMap,e.listLoading=!1):"1"===a.Code?(e.$message.error(a.Message),e.listLoading=!1):"-1"===a.Code?(e.listLoading=!1,e.$message.error(a.Message),e.$store.dispatch("user/resetToken"),e.$router.push("/login?redirect=".concat(e.$route.fullPath))):(e.$message.error("返回未知错误,错误码:"+a.Code),e.listLoading=!1)})).catch((function(t){e.$message.error("出错了"+JSON.stringify(t)),e.listLoading=!1}))},getAllTemplate:function(){this.listLoading=!0;var e=this,t="";t="./api/v1/device/template",this.$axios({method:"get",url:t,headers:{token:this.$store.getters.token}}).then((function(t){var a=t.data;"0"===a.Code?(e.templateList=a.Data,e.listLoading=!1):"1"===a.Code?(e.$message.error(a.Message),e.listLoading=!1):"-1"===a.Code?(e.listLoading=!1,e.$message.error(a.Message),e.$store.dispatch("user/resetToken"),e.$router.push("/login?redirect=".concat(e.$route.fullPath))):(e.$message.error("返回未知错误,错误码:"+a.Code),e.listLoading=!1)})).catch((function(t){e.$message.error("出错了"+JSON.stringify(t)),e.listLoading=!1}))},editInterface:function(e){this.form={},this.addVisible=!0,this.form=e,this.getAllCommInterface(),this.title="修改采集接口",this.mode="put"},deleteInterface:function(e){var t=this,a=this;this.$messageBox.confirm("你确定要删除采集接口吗?

"+e.CollInterfaceName+"

","删除采集接口",{confirmButtonText:"确定",cancelButtonText:"取消",center:!0,dangerouslyUseHTMLString:!0,type:"info"}).then((function(i){"confirm"===i&&(t.form={},t.$set(a.form,"CollInterfaceName",e.CollInterfaceName),t.mode="delete",a.addInterface())})).catch((function(e){"cancel"===e&&t.getAllInterface()}))},handelGetDeviceListByInterface:function(e){this.firstVisible=!1,this.sencondVisible=!0,this.currentCollInterfaceName=e.CollInterfaceName,this.getDeviceListByInterface()},getDeviceListByInterface:function(){var e=this,t="";t="./api/v1/device/interface",this.$axios({method:"get",url:t,params:{CollInterfaceName:e.currentCollInterfaceName},headers:{token:this.$store.getters.token}}).then((function(t){var a=t.data;"0"===a.Code?e.deviceListByCollInterface=a.Data.DeviceNodeMap:"1"===a.Code?e.$message.error(a.Message):"-1"===a.Code?(e.$message.error(a.Message),e.$store.dispatch("user/resetToken"),e.$router.push("/login?redirect=".concat(e.$route.fullPath))):e.$message.error("返回未知错误,错误码:"+a.Code)})).catch((function(t){e.$message.error("出错了"+JSON.stringify(t))}))},handleClick:function(e){alert("开发中")},handleEdit:function(e,t){this.form=t,this.editVisible=!0},handleAddDevice:function(){this.deviceVisible=!0,this.getAllTemplate(),this.title="添加设备",this.form.CollInterfaceName=this.currentCollInterfaceName,this.mode="post"},handleModifyDevice:function(){this.multipleSelection.length<1&&this.$message.error("请至少选择一个设备")},handleSelectionChange:function(e){this.multipleSelection=e},addCommInterface:function(){var e=this,t="";t="./api/v1/device/addCommInterface",this.$axios({method:"post",url:t,data:e.form,headers:{token:this.$store.getters.token}}).then((function(t){var a=t.data;"0"===a.Code?this.addVisible=!1:"1"===a.Code?e.$message.error(a.Message):"-1"===a.Code?(e.$message.error(a.Message),e.$store.dispatch("user/resetToken"),e.$router.push("/login?redirect=".concat(e.$route.fullPath))):e.$message.error("返回未知错误,错误码:"+a.Code)})).catch((function(t){e.$message.error("出错了"+JSON.stringify(t))}))}}},o=s,n=(a("061c"),a("2877")),l=Object(n["a"])(o,i,r,!1,null,"a6aecb9e",null);t["default"]=l.exports},"90ba":function(e,t,a){}}]); \ No newline at end of file diff --git a/webroot/static/js/chunk-ecb32a26.37b79df1.js b/webroot/static/js/chunk-ecb32a26.37b79df1.js new file mode 100644 index 0000000..de9711a --- /dev/null +++ b/webroot/static/js/chunk-ecb32a26.37b79df1.js @@ -0,0 +1 @@ +(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-ecb32a26"],{"4c31":function(e,t,i){"use strict";i.r(t);var a=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticClass:"app-container"},[i("el-row",{directives:[{name:"show",rawName:"v-show",value:e.firstVisible,expression:"firstVisible"}],attrs:{gutter:20}},[i("el-col",{staticStyle:{"margin-bottom":"20px"},attrs:{xs:24,sm:12,md:6}},[i("div",[i("span",{staticStyle:{"font-size":"20px","align-self":"center","margin-right":"15px"}},[e._v("设备统计")]),e._v(" "),i("span",{staticStyle:{"margin-right":"15px","align-self":"bottom"}},[e._v("总数:"),i("span",{staticStyle:{color:"#006db1"}},[e._v(e._s(e.deviceCntInfo.deviceCnt))])]),e._v(" "),i("span",{staticStyle:{"margin-right":"15px","align-self":"bottom"}},[e._v("在线:"),i("span",{staticStyle:{color:"green"}},[e._v(e._s(e.deviceCntInfo.deviceOnlineCnt))])])])]),e._v(" "),i("el-col",{staticStyle:{"margin-bottom":"20px"},attrs:{xs:24,sm:12,md:18}},[i("el-button",{staticStyle:{float:"right","margin-left":"5px"},attrs:{type:"primary"},on:{click:function(t){e.addVisible=!0,e.getAllCommInterface(),e.form={},e.mode="post",e.title="添加采集接口"}}},[e._v("添加")]),e._v(" "),i("el-button",{staticStyle:{float:"right","margin-left":"5px"},attrs:{type:"primary"},on:{click:e.getAllInterface}},[e._v("刷新")])],1)],1),e._v(" "),i("el-row",{directives:[{name:"show",rawName:"v-show",value:e.firstVisible,expression:"firstVisible"}],attrs:{gutter:20}},e._l(e.interfaceList,(function(t,a){return i("el-col",{key:a,attrs:{xs:24,sm:12,md:6}},[i("el-card",{staticClass:"box-card",attrs:{shadow:"hover"}},[i("div",{staticClass:"clearfix",attrs:{slot:"header"},slot:"header"},[i("span",[e._v(e._s(t.CollInterfaceName))]),e._v(" "),i("el-button",{staticStyle:{float:"right",padding:"3px 0"},attrs:{type:"text"},on:{click:function(i){return e.deleteInterface(t)}}},[e._v("删除")]),e._v(" "),i("el-button",{staticStyle:{float:"right",padding:"3px 0"},attrs:{type:"text"},on:{click:function(i){return e.editInterface(t)}}},[e._v("修改")]),e._v(" "),i("el-button",{staticStyle:{float:"right",padding:"3px 0"},attrs:{type:"text"},on:{click:function(i){return e.handelGetDeviceListByInterface(t)}}},[e._v("详情")])],1),e._v(" "),i("el-row",{staticClass:"text item"},[i("el-col",{staticStyle:{"align-self":"center","padding-right":"15px","text-align":"right"},attrs:{xs:12,sm:12,md:12}},[i("span",[e._v("通讯接口:")])]),e._v(" "),i("el-col",{attrs:{xs:12,sm:12,md:12}},[i("span",[e._v(e._s(t.CommInterfaceName))])])],1),e._v(" "),i("el-row",{staticClass:"text item"},[i("el-col",{staticStyle:{"align-self":"center","padding-right":"15px","text-align":"right"},attrs:{xs:12,sm:12,md:12}},[i("span",[e._v("采集时间:")])]),e._v(" "),i("el-col",{attrs:{xs:12,sm:12,md:12}},[i("span",[e._v(e._s(t.PollPeriod)+" 毫秒")])])],1),e._v(" "),i("el-row",{staticClass:"text item"},[i("el-col",{staticStyle:{"align-self":"center","padding-right":"15px","text-align":"right"},attrs:{xs:12,sm:12,md:12}},[i("span",[e._v("采集超时:")])]),e._v(" "),i("el-col",{attrs:{xs:12,sm:12,md:12}},[i("span",[e._v(e._s(t.OfflinePeriod)+" 毫秒")])])],1),e._v(" "),i("div",{staticClass:"bottom clearfix"},[i("span",[e._v("设备总数:"),i("span",{staticStyle:{color:"#006db1"}},[e._v(e._s(t.DeviceNodeCnt))])]),e._v(" "),i("span",{staticClass:"bottomRight"},[e._v("设备在线:"),i("span",{staticStyle:{color:"green"}},[e._v(e._s(t.DeviceNodeOnlineCnt))])])])],1)],1)})),1),e._v(" "),i("el-row",{directives:[{name:"show",rawName:"v-show",value:e.sencondVisible,expression:"sencondVisible"}],attrs:{gutter:20}},[i("el-col",{staticStyle:{"margin-bottom":"20px"},attrs:{xs:24,sm:12,md:12}},[i("el-row",{attrs:{gutter:10}},[i("div",[i("el-button",{staticStyle:{"margin-right":"15px"},attrs:{type:"text"},on:{click:function(t){e.sencondVisible=!1,e.firstVisible=!0}}},[e._v("返回")]),e._v(" "),i("span",{staticStyle:{"font-size":"20px","align-self":"center","margin-right":"15px"}},[e._v(e._s(e.currentCollInterfaceName))]),e._v(" "),i("span",{staticStyle:{"margin-right":"15px","align-self":"bottom"}},[e._v("总数:"),i("span",{staticStyle:{color:"#006db1"}},[e._v(e._s(e.currentCollInterfaceDeviceNodeInfo.DeviceNodeCnt?e.currentCollInterfaceDeviceNodeInfo.DeviceNodeCnt:"0"))])]),e._v(" "),i("span",{staticStyle:{"margin-right":"15px","align-self":"bottom"}},[e._v("在线:"),i("span",{staticStyle:{color:"green"}},[e._v(e._s(e.currentCollInterfaceDeviceNodeInfo.DeviceNodeOnlineCnt?e.currentCollInterfaceDeviceNodeInfo.DeviceNodeOnlineCnt:"0"))])])],1)])],1),e._v(" "),i("el-col",{staticStyle:{"margin-bottom":"20px"},attrs:{xs:24,sm:12,md:12}},[i("el-button",{staticStyle:{float:"right","margin-left":"5px"},attrs:{type:"primary"},on:{click:e.handleAddDevice}},[e._v("添加")]),e._v(" "),i("el-button",{staticStyle:{float:"right","margin-left":"5px"},attrs:{type:"primary"},on:{click:e.handleModifyDevice}},[e._v("修改")]),e._v(" "),i("el-button",{staticStyle:{float:"right","margin-left":"5px"},attrs:{type:"primary"},on:{click:e.handleDeleteDevice}},[e._v("删除")]),e._v(" "),i("el-button",{staticStyle:{float:"right","margin-left":"5px"},attrs:{type:"primary"},on:{click:e.getDeviceListByInterface}},[e._v("刷新")])],1)],1),e._v(" "),i("el-row",{directives:[{name:"show",rawName:"v-show",value:e.sencondVisible,expression:"sencondVisible"}],attrs:{gutter:20}},[i("el-table",{directives:[{name:"loading",rawName:"v-loading",value:e.listLoading,expression:"listLoading"}],attrs:{data:e.deviceListByCollInterface,height:"543","element-loading-text":"加载中",border:"",fit:"","highlight-current-row":""},on:{"selection-change":e.handleSelectionChange}},[i("el-table-column",{attrs:{type:"selection",width:"55",align:"center"}}),e._v(" "),i("el-table-column",{attrs:{label:"设备名称",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v("\n "+e._s(t.row.Name+"(")+"\n "),i("el-tag",{attrs:{type:e._f("statusFilter")(t.row.CommStatus)}},[e._v(e._s(e._f("netWorkFilter")(t.row.CommStatus)))]),e._v("\n "+e._s(")")+"\n ")]}}])}),e._v(" "),i("el-table-column",{attrs:{label:"设备模版",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v("\n "+e._s(t.row.Type)+"\n ")]}}])}),e._v(" "),i("el-table-column",{attrs:{label:"通讯地址",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){return[i("span",[e._v(e._s(t.row.Addr))])]}}])}),e._v(" "),i("el-table-column",{attrs:{label:"最后通信时间",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){return[i("span",[e._v(e._s(t.row.LastCommRTC))])]}}])}),e._v(" "),i("el-table-column",{attrs:{label:"通信总次数",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){return[i("span",[e._v(e._s(t.row.CommTotalCnt))])]}}])}),e._v(" "),i("el-table-column",{attrs:{label:"通信成功次数",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){return[i("span",[e._v(e._s(t.row.CommSuccessCnt))])]}}])}),e._v(" "),i("el-table-column",{attrs:{label:"操作",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){return[i("el-button",{attrs:{type:"primary",size:"small"},on:{click:function(i){return e.handleClick(t.row)}}},[e._v("查看变量")])]}}])})],1)],1),e._v(" "),i("el-dialog",{attrs:{title:e.title,visible:e.addVisible,width:"30%"},on:{"update:visible":function(t){e.addVisible=t}}},[i("el-form",{ref:"form",attrs:{model:e.form,"label-width":"100px"}},[i("el-form-item",{attrs:{label:"接口名称"}},[i("el-input",{model:{value:e.form.CollInterfaceName,callback:function(t){e.$set(e.form,"CollInterfaceName",t)},expression:"form.CollInterfaceName"}})],1),e._v(" "),i("el-form-item",{attrs:{label:"通讯接口"}},[i("el-select",{attrs:{clearable:"",placeholder:"通讯接口"},model:{value:e.form.CommInterfaceName,callback:function(t){e.$set(e.form,"CommInterfaceName",t)},expression:"form.CommInterfaceName"}},e._l(e.InterfaceMap,(function(e,t){return i("el-option",{key:t,attrs:{label:e.Name,value:e.Name}})})),1)],1),e._v(" "),i("el-form-item",{attrs:{label:"采集时间"}},[i("el-input",{attrs:{placeholder:"请输入采集时间",type:"number"},model:{value:e.form.PollPeriod,callback:function(t){e.$set(e.form,"PollPeriod",e._n(t))},expression:"form.PollPeriod"}},[i("template",{slot:"append"},[e._v("毫秒")])],2)],1),e._v(" "),i("el-form-item",{attrs:{label:"采集超时"}},[i("el-input",{attrs:{placeholder:"请输入采集超时",type:"number"},model:{value:e.form.OfflinePeriod,callback:function(t){e.$set(e.form,"OfflinePeriod",e._n(t))},expression:"form.OfflinePeriod"}},[i("template",{slot:"append"},[e._v("毫秒")])],2)],1)],1),e._v(" "),i("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[i("el-button",{on:{click:function(t){e.addVisible=!1,e.form={},e.getAllInterface()}}},[e._v("取 消")]),e._v(" "),i("el-button",{attrs:{type:"primary"},on:{click:e.addInterface}},[e._v("确 定")])],1)],1),e._v(" "),i("el-dialog",{attrs:{title:e.title,visible:e.deviceVisible,width:"30%"},on:{"update:visible":function(t){e.deviceVisible=t}}},[i("el-form",{ref:"form",attrs:{model:e.form,"label-width":"100px"}},[i("el-form-item",{attrs:{label:"设备名称"}},[i("el-input",{model:{value:e.form.Name,callback:function(t){e.$set(e.form,"Name",t)},expression:"form.Name"}})],1),e._v(" "),i("el-form-item",{attrs:{label:"设备模版"}},[i("el-select",{attrs:{clearable:"",placeholder:"请输入设备模版"},model:{value:e.form.Type,callback:function(t){e.$set(e.form,"Type",t)},expression:"form.Type"}},e._l(e.templateList,(function(e,t){return i("el-option",{key:t,attrs:{label:e.TemplateType,value:e.TemplateType}})})),1)],1),e._v(" "),i("el-form-item",{attrs:{label:"采集接口"}},[i("el-input",{attrs:{placeholder:"请输入采集接口",disabled:!0},model:{value:e.form.CollInterfaceName,callback:function(t){e.$set(e.form,"CollInterfaceName",t)},expression:"form.CollInterfaceName"}})],1),e._v(" "),i("el-form-item",{attrs:{label:"通讯地址"}},[i("el-input",{attrs:{placeholder:"请输入通讯地址",type:"number"},model:{value:e.form.Addr,callback:function(t){e.$set(e.form,"Addr",t)},expression:"form.Addr"}})],1)],1),e._v(" "),i("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[i("el-button",{on:{click:function(t){e.deviceVisible=!1,e.form={}}}},[e._v("取 消")]),e._v(" "),i("el-button",{attrs:{type:"primary"},on:{click:e.addDevice}},[e._v("确 定")])],1)],1),e._v(" "),i("el-dialog",{attrs:{title:"批量修改设备",visible:e.batchModifyDeviceVisible,width:"30%"},on:{"update:visible":function(t){e.batchModifyDeviceVisible=t}}},[i("el-form",{ref:"form",attrs:{model:e.form,"label-width":"100px"}},[i("el-form-item",{attrs:{label:"设备模版"}},[i("el-select",{attrs:{clearable:"",placeholder:"请输入设备模版"},model:{value:e.form.Type,callback:function(t){e.$set(e.form,"Type",t)},expression:"form.Type"}},e._l(e.templateList,(function(e,t){return i("el-option",{key:t,attrs:{label:e.TemplateType,value:e.TemplateType}})})),1)],1),e._v(" "),i("el-form-item",{attrs:{label:"采集接口"}},[i("el-input",{attrs:{placeholder:"请输入采集接口",disabled:!0},model:{value:e.form.CollInterfaceName,callback:function(t){e.$set(e.form,"CollInterfaceName",t)},expression:"form.CollInterfaceName"}})],1)],1),e._v(" "),i("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[i("el-button",{on:{click:function(t){e.batchModifyDeviceVisible=!1,e.form={}}}},[e._v("取 消")]),e._v(" "),i("el-button",{attrs:{type:"primary"},on:{click:e.batchModifyDevice}},[e._v("确 定")])],1)],1)],1)},r=[],s={filters:{statusFilter:function(e){var t={onLine:"success",offLine:"gray",noRegister:"danger"};return t[e]||"info"},interfaceTypeFilter:function(e){var t={LocalSerial:"本地串口",TcpClient:"Tcp客户端",TcpServer:"Tcp服务端"};return t[e]||"未知"},netWorkFilter:function(e){var t={onLine:"在线",noRegister:"未注册",offLine:"离线"};return t[e]||"未知"},parityFilter:function(e){return console.log(e),"N"===e?"无校验":"J"===e?"奇校验":"O"===e?"偶校验":"未知"}},data:function(){return{deviceListByCollInterface:[],listLoading:!0,form:{},filterText:"",editVisible:!1,baudRateList:[],ParityList:[],InterfaceTypeList:[],addVisible:!1,interface:[],activeNames:"11",firstVisible:!0,sencondVisible:!1,interfaceList:[],InterfaceMap:[],mode:"",title:"",deviceVisible:!1,templateList:[],currentCollInterfaceName:"",multipleSelection:[],batchModifyDeviceVisible:!1}},computed:{deviceCntInfo:function(){var e=0,t=0,i={};return this.interfaceList.filter((function(i){e+=parseInt(i.DeviceNodeCnt),t+=parseInt(i.DeviceNodeOnlineCnt)})),i.deviceCnt=e,i.deviceOnlineCnt=t,i},currentCollInterfaceDeviceNodeInfo:function(){var e=0,t={};return this.deviceListByCollInterface.filter((function(t){"onLine"===t.CommStatus&&(e+=1)})),t.DeviceNodeCnt=this.deviceListByCollInterface.length,t.DeviceNodeOnlineCnt=e,t}},created:function(){this.getAllInterface(),this.InterfaceTypeList=[{id:"LocalSerial",text:"本地串口"},{id:"TcpClient",text:"Tcp客户端"}],this.templateTypeList=[{id:"1",text:"fcu200"},{id:"2",text:"fcu210"}],this.parityList=[{id:"N",text:"无校验"},{id:"J",text:"奇校验"},{id:"O",text:"偶校验"}]},methods:{getAllInterface:function(){this.listLoading=!0;var e=this,t="";t="./api/v1/device/allInterface",this.$axios({method:"get",url:t,headers:{token:this.$store.getters.token}}).then((function(t){var i=t.data;"0"===i.Code?(e.interfaceList=i.Data,e.listLoading=!1):"1"===i.Code?(e.$message.error(i.Message),e.listLoading=!1):"-1"===i.Code?(e.listLoading=!1,e.$message.error(i.Message),e.$store.dispatch("user/resetToken"),e.$router.push("/login?redirect=".concat(e.$route.fullPath))):(e.$message.error("返回未知错误,错误码:"+i.Code),e.listLoading=!1)})).catch((function(t){e.$message.error("出错了"+JSON.stringify(t)),e.listLoading=!1}))},addInterface:function(){var e=this,t="";t="./api/v1/device/interface",this.$axios({method:e.mode,url:t,data:e.form,headers:{token:this.$store.getters.token}}).then((function(t){var i=t.data;"0"===i.Code?(e.addVisible=!1,"post"===e.mode&&e.$message.success("添加采集接口成功"),"put"===e.mode&&e.$message.success("修改采集接口成功"),"delete"===e.mode&&e.$message.success("删除采集接口成功")):"1"===i.Code?e.$message.error(i.Message):"-1"===i.Code?(e.$message.error(i.Message),e.$store.dispatch("user/resetToken"),e.$router.push("/login?redirect=".concat(e.$route.fullPath))):e.$message.error("返回未知错误,错误码:"+i.Code)})).catch((function(t){e.$message.error("出错了"+JSON.stringify(t))}))},addDevice:function(){var e=this,t="";t="./api/v1/device/node",this.$axios({method:e.mode,url:t,data:e.form,headers:{token:this.$store.getters.token}}).then((function(t){var i=t.data;"0"===i.Code?(e.addVisible=!1,"post"===e.mode&&(e.$message.success("添加设备成功"),e.deviceVisible=!0),"put"===e.mode&&(e.$message.success("修改设备成功"),e.deviceVisible=!0),"delete"===e.mode&&(e.$message.success("删除设备成功"),e.deviceVisible=!0)):"1"===i.Code?e.$message.error(i.Message):"-1"===i.Code?(e.$message.error(i.Message),e.$store.dispatch("user/resetToken"),e.$router.push("/login?redirect=".concat(e.$route.fullPath))):e.$message.error("返回未知错误,错误码:"+i.Code)})).catch((function(t){e.$message.error("出错了"+JSON.stringify(t))}))},getAllCommInterface:function(){this.listLoading=!0;var e=this,t="";t="./api/v1/device/commInterface",this.$axios({method:"get",url:t,headers:{token:this.$store.getters.token}}).then((function(t){var i=t.data;"0"===i.Code?(e.InterfaceMap=i.Data.InterfaceMap,e.listLoading=!1):"1"===i.Code?(e.$message.error(i.Message),e.listLoading=!1):"-1"===i.Code?(e.listLoading=!1,e.$message.error(i.Message),e.$store.dispatch("user/resetToken"),e.$router.push("/login?redirect=".concat(e.$route.fullPath))):(e.$message.error("返回未知错误,错误码:"+i.Code),e.listLoading=!1)})).catch((function(t){e.$message.error("出错了"+JSON.stringify(t)),e.listLoading=!1}))},getAllTemplate:function(){this.listLoading=!0;var e=this,t="";t="./api/v1/device/template",this.$axios({method:"get",url:t,headers:{token:this.$store.getters.token}}).then((function(t){var i=t.data;"0"===i.Code?(e.templateList=i.Data,e.listLoading=!1):"1"===i.Code?(e.$message.error(i.Message),e.listLoading=!1):"-1"===i.Code?(e.listLoading=!1,e.$message.error(i.Message),e.$store.dispatch("user/resetToken"),e.$router.push("/login?redirect=".concat(e.$route.fullPath))):(e.$message.error("返回未知错误,错误码:"+i.Code),e.listLoading=!1)})).catch((function(t){e.$message.error("出错了"+JSON.stringify(t)),e.listLoading=!1}))},editInterface:function(e){this.form={},this.addVisible=!0,this.form=e,this.getAllCommInterface(),this.title="修改采集接口",this.mode="put"},deleteInterface:function(e){var t=this,i=this;this.$messageBox.confirm("你确定要删除采集接口吗?

"+e.CollInterfaceName+"

","删除采集接口",{confirmButtonText:"确定",cancelButtonText:"取消",center:!0,dangerouslyUseHTMLString:!0,type:"info"}).then((function(a){"confirm"===a&&(t.form={},t.$set(i.form,"CollInterfaceName",e.CollInterfaceName),t.mode="delete",i.addInterface())})).catch((function(e){"cancel"===e&&t.getAllInterface()}))},handelGetDeviceListByInterface:function(e){this.firstVisible=!1,this.sencondVisible=!0,this.currentCollInterfaceName=e.CollInterfaceName,this.getDeviceListByInterface()},getDeviceListByInterface:function(){var e=this,t="";t="./api/v1/device/interface",this.$axios({method:"get",url:t,params:{CollInterfaceName:e.currentCollInterfaceName},headers:{token:this.$store.getters.token}}).then((function(t){var i=t.data;"0"===i.Code?e.deviceListByCollInterface=i.Data.DeviceNodeMap:"1"===i.Code?e.$message.error(i.Message):"-1"===i.Code?(e.$message.error(i.Message),e.$store.dispatch("user/resetToken"),e.$router.push("/login?redirect=".concat(e.$route.fullPath))):e.$message.error("返回未知错误,错误码:"+i.Code)})).catch((function(t){e.$message.error("出错了"+JSON.stringify(t))}))},handleClick:function(e){alert("开发中")},handleEdit:function(e,t){this.form=t,this.editVisible=!0},handleAddDevice:function(){this.deviceVisible=!0,this.getAllTemplate(),this.title="添加设备",this.form.CollInterfaceName=this.currentCollInterfaceName,this.mode="post"},handleModifyDevice:function(){if(this.selectDeviceNames=[],this.form={},this.mode="put",this.multipleSelection.length<1)this.$message.error("请至少选择一个设备");else{if(1===this.multipleSelection.length)return this.deviceVisible=!0,this.getAllTemplate(),this.title="修改设备",this.form.CollInterfaceName=this.currentCollInterfaceName,void(this.mode="put");this.getAllTemplate();var e=[];this.multipleSelection.filter((function(t){t.Name&&e.push(t.Name)})),e.length<1?this.$message.error("选择的设备无名称"):(this.selectDeviceNames=e,this.batchModifyDeviceVisible=!0,this.form.CollInterfaceName=this.currentCollInterfaceName)}},handleDeleteDevice:function(){var e=this;if(this.selectDeviceNames=[],this.multipleSelection.length<1)this.$message.error("请至少选择一个设备");else{var t=[];if(this.multipleSelection.filter((function(e){e.Name&&t.push(e.Name)})),t.length<1)this.$message.error("选择的设备无名称");else{this.selectDeviceNames=t;var i=this;this.$messageBox.confirm("你确定要删除这些设备吗?
","删除设备",{confirmButtonText:"确定",cancelButtonText:"取消",center:!0,dangerouslyUseHTMLString:!0,type:"info"}).then((function(t){"confirm"===t&&(e.mode="delete",i.batchModifyDevice())})).catch((function(t){"cancel"===t&&e.getDeviceListByInterface()}))}}},batchModifyDevice:function(){var e=this,t={};"put"===this.mode&&(t.CollInterfaceName=e.currentCollInterfaceName,t.Name=e.selectDeviceNames,t.Type=e.form.Type),"delete"===this.mode&&(t.CollInterfaceName=e.currentCollInterfaceName,t.Name=e.selectDeviceNames);var i="";i="./api/v1/device/node",this.$axios({method:e.mode,url:i,data:t,headers:{token:this.$store.getters.token}}).then((function(t){var i=t.data;"0"===i.Code?this.batchModifyDeviceVisible=!1:"1"===i.Code?e.$message.error(i.Message):"-1"===i.Code?(e.$message.error(i.Message),e.$store.dispatch("user/resetToken"),e.$router.push("/login?redirect=".concat(e.$route.fullPath))):e.$message.error("返回未知错误,错误码:"+i.Code)})).catch((function(t){e.$message.error("出错了"+JSON.stringify(t))}))},handleSelectionChange:function(e){this.multipleSelection=e},addCommInterface:function(){var e=this,t="";t="./api/v1/device/addCommInterface",this.$axios({method:"post",url:t,data:e.form,headers:{token:this.$store.getters.token}}).then((function(t){var i=t.data;"0"===i.Code?this.addVisible=!1:"1"===i.Code?e.$message.error(i.Message):"-1"===i.Code?(e.$message.error(i.Message),e.$store.dispatch("user/resetToken"),e.$router.push("/login?redirect=".concat(e.$route.fullPath))):e.$message.error("返回未知错误,错误码:"+i.Code)})).catch((function(t){e.$message.error("出错了"+JSON.stringify(t))}))}}},o=s,l=(i("af2d"),i("2877")),n=Object(l["a"])(o,a,r,!1,null,"054b99ba",null);t["default"]=n.exports},af2d:function(e,t,i){"use strict";var a=i("eb8c"),r=i.n(a);r.a},eb8c:function(e,t,i){}}]); \ No newline at end of file