EMS2.0-Documents/7.部署文档/Window安装/项目前端文件/IEMS/js/chunk-8492257a.a9c84623.js

2 lines
17 KiB
JavaScript
Raw Permalink Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-8492257a","chunk-0d87864c","chunk-c095d836","chunk-0a210700","chunk-05a3b661","chunk-2d0abcaa","chunk-2d0aeedb"],{"0bc6":function(t,e,i){"use strict";i.r(e);var s=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",[t.item.showingChildren?i("el-submenu",{attrs:{index:t.item.meta.name,route:t.item}},[i("template",{slot:"title"},[t.item.meta.icon?i("i",{staticClass:"iconfont icon",class:"icon-"+t.item.meta.icon}):t._e(),t.isCollapse?t._e():i("span",[t._v(t._s(t.$t("home."+t.item.meta.name)))])]),i("el-menu-item-group",t._l(t.item.children,(function(t){return i("SidebarItem",{key:t.permissionId,attrs:{index:t.meta.name,item:t}})})),1)],2):[i("el-menu-item",{attrs:{index:t.item.meta.name,route:t.item}},[t.item.meta.icon?i("i",{staticClass:"iconfont icon",class:"icon-"+t.item.meta.icon}):t._e(),i("span",{attrs:{slot:"title"},slot:"title"},[t._v(t._s(t.$t("home."+t.item.meta.name)))])])]],2)},n=[],a={name:"SidebarItem",props:{item:{type:Object,required:!0}},computed:{isCollapse:{get:function(){return this.$store.state.app.isCollapse}}}},o=a,r=i("2877"),c=Object(r["a"])(o,s,n,!1,null,null,null);e["default"]=c.exports},"162e":function(t,e,i){"use strict";i.r(e);var s=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"app-wrapper"},[i("div",{staticClass:"app-header"},[i("div",{staticClass:"header-logo",on:{click:t.goHome}},[t.logoForm.logoPath?i("img",{staticClass:"icon",attrs:{src:t.logoForm.logoPath,alt:""}}):i("i",{staticClass:"iconfont icon-logo icon"}),t.logoForm.unitName?i("div",{staticClass:"name"},[t._v(" "+t._s("en"==this.$i18n.locale?t.logoForm.enUnitName:t.logoForm.unitName)+" ")]):i("div",{staticClass:"name"},[t._v(" "+t._s(t.isAdmin||t.isHome?t.$t("deskName"):t.$t("name"))+" ")])]),i("div",{staticClass:"header-content"},[i("SignOut",{attrs:{isAdmin:t.isAdmin,isHome:t.isHome}}),i("AlarmList")],1)]),i("div",{class:{collapsed:t.isCollapse},attrs:{id:"app-main"}},[t.isHome?t._e():i("LeftBar"),i("div",{staticClass:"app-main",class:{isAdmin:t.isHome}},[t.isHome?t._e():i("TagsView"),i("AppMain")],1)],1)])},n=[],a=(i("b0c0"),i("fcda")),o=i("177e"),r=i("9128"),c=i("77eb"),l=i("1a47"),u={name:"Layout",components:{LeftBar:c["default"],SignOut:a["default"],AppMain:o["default"],TagsView:l["default"],AlarmList:r["default"]},data:function(){return{isAdmin:!1,isHome:!0}},mounted:function(){console.log(this.logoForm," this.-----------"),this.isAdmin="admin"==this.$route.matched[0].meta.name,this.isHome="manager"==this.$route.name},watch:{$route:function(){console.log(this.$route),this.isAdmin="admin"==this.$route.matched[0].meta.name,this.isHome="manager"==this.$route.name}},computed:{logoForm:{get:function(){return this.$store.state.user.logoForm}},isCollapse:{get:function(){return this.$store.state.app.isCollapse}}},methods:{goHome:function(){var t=this.$router.resolve({path:"/map/GIS"});window.open(t.href,"GIS")}}},m=u,h=(i("4a5a"),i("2877")),d=Object(h["a"])(m,s,n,!1,null,"a5015ec8",null);e["default"]=d.exports},"177e":function(t,e,i){"use strict";i.r(e);var s=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{attrs:{id:"app-container"}},[i("keep-alive",{attrs:{include:t.cachedViews}},[i("router-view",{key:t.key})],1)],1)},n=[],a={name:"AppMain",computed:{cachedViews:function(){return this.$store.state.tagsView.cachedViews},key:function(){return this.$route.fullPath}}},o=a,r=i("2877"),c=Object(r["a"])(o,s,n,!1,null,null,null);e["default"]=c.exports},"1a47":function(t,e,i){"use strict";i.r(e);var s=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"tags-view-container"},[i("i",{staticClass:"iconfont icon-xiangqian icon"}),i("i",{staticClass:"iconfont icon-xianghou icon after"}),i("div",{ref:"isOverflow",staticClass:"container"},t._l(t.visitedViews,(function(e){return i("div",{key:e.path,staticClass:"tags-view-item",class:t.isActive(e)?"active":"",on:{click:function(i){return t.goLink(e)},contextmenu:function(i){return i.preventDefault(),i.stopPropagation(),t.openMenu(e,i)}}},[i("span",{staticClass:"tag isOverflow",class:{affix:e.meta.affix}},[i("el-tooltip",{staticClass:"item",attrs:{effect:"dark",content:t.$t("home."+e.meta.name),placement:"top"}},[i("span",[t._v(t._s(t.$t("home."+e.meta.name)))])])],1),i("i",{staticClass:"iconfont icon-guanbi close",class:{noshow:e.meta.affix},on:{click:function(i){return i.preventDefault(),i.stopPropagation(),t.closeSelectedTag(e)}}})])})),0),i("ul",{directives:[{name:"show",rawName:"v-show",value:t.visible,expression:"visible"}],staticClass:"contextmenu",style:{left:t.left+"px",top:t.top+"px"}},[i("li",{on:{click:function(e){return t.refreshSelectedTag(t.selectedTag)}}},[t._v(t._s(t.$t("home.refresh")))]),t.selectedTag.meta&&t.selectedTag.meta.affix?t._e():i("li",{on:{click:function(e){return t.closeSelectedTag(t.selectedTag)}}},[t._v(" "+t._s(t.$t("home.close"))+" ")]),i("li",{on:{click:t.closeOthersTags}},[t._v(" "+t._s(t.$t("home.closeOthers"))+" ")]),i("li",{on:{click:function(e){return t.closeAllTags(t.selectedTag)}}},[t._v(t._s(t.$t("home.closeAll")))])])])},n=[],a=i("b85c"),o=i("2909"),r=i("5530"),c=(i("d3b7"),i("159b"),i("b0c0"),i("99af"),i("ac1f"),i("5319"),i("fb6a"),i("df7c")),l=i.n(c),u={name:"TagsView",data:function(){return{visible:!1,top:0,left:0,selectedTag:{},affixTags:[],isOverflow:!1}},computed:{visitedViews:function(){return console.log(this.$store.state.tagsView.visitedViews),this.$store.state.tagsView.visitedViews},routes:function(){return this.$store.state.permission.routes}},watch:{$route:function(){this.addTags()},visible:function(t){t?document.body.addEventListener("click",this.closeMenu):document.body.removeEventListener("click",this.closeMenu)}},mounted:function(){var t=this;this.initTags(),this.addTags(),this.$nextTick((function(){t.isOverflow=t.checkEllipsis(t.$refs.isOverflow.firstElementChild.firstElementChild.firstElementChild)}))},beforeRouteLeave:function(){},methods:{checkEllipsis:function(t){return console.log(t),t.offsetWidth>=85},isActive:function(t){return l.a.resolve(t.path)===l.a.resolve(this.$route.path)},filterAffixTags:function(t){var e=this,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"/",s=[];return t.forEach((function(t){if(t.meta&&t.meta.affix){var n=l.a.resolve(i,t.path),a="admin"==e.$route.matched[0].meta.name,c="manager"==e.$route.matched[0].meta.name;t.meta.isAdmin&&a?s.push({fullPath:n,path:n,name:t.name,meta:Object(r["a"])({},t.meta)}):t.meta.isAdmin||a||c||s.push({fullPath:n,path:n,name:t.name,meta:Object(r["a"])({},t.meta)})}else if(t.children){var u=e.filterAffixTags(t.children,t.path);u.length>=1&&(s=[].concat(Object(o["a"])(s),Object(o["a"])(u)))}})),s},initTags:function(){console.log("------------1-------------");var t,e=this.affixTags=this.filterAffixTags(this.routes),i=Object(a["a"])(e);try{for(i.s();!(t=i.n()).done;){var s=t.value;s.name&&this.$store.dispatch("addVisitedView",s)}}catch(n){i.e(n)}finally{i.f()}},addTags:function(){var t=this.$route.name;return t&&this.$store.dispatch("addView",this.$route),!1},refreshSelectedTag:function(t){var e=this;this.$store.dispatch("delCachedView",t).then((function(){var i=t.fullPath;console.log(i),e.$nextTick((function(){e.$router.replace({path:i})}))}))},closeSelectedTag:function(t){var e=this;this.$store.dispatch("delView",t).then((function(i){var s=i.visitedViews;e.isActive(t)&&e.toLastView(s)}))},closeOthersTags:function(){this.$router.push(this.selectedTag),this.$store.dispatch("delOthersViews",this.selectedTag)},closeAllTags:function(t){var e=this;this.$store.dispatch("delAllViews").then((function(i){var s=i.visitedViews;e.affixTags.some((function(e){return e.path===t.path}))||e.toLastView(s)}))},toLastView:function(t){var e=t.slice(-1)[0];e?this.$router.push(e):this.$router.push("/")},openMenu:function(t,e){var i=window.innerWidth-100,s=e.clientX-35;this.left=s>i?i:s,this.top=e.clientY+15,this.visible=!0,this.selectedTag=t},closeMenu:function(){this.visible=!1},goLink:function(t){this.$router.push({path:t.path})}}},m=u,h=(i("8082"),i("2877")),d=Object(h["a"])(m,s,n,!1,null,"172fb22a",null);e["default"]=d.exports},"22de":function(t,e,i){},3137:function(t,e,i){"use strict";i("bda2")},"4a5a":function(t,e,i){"use strict";i("4f79")},"4f79":function(t,e,i){},"77eb":function(t,e,i){"use strict";i.r(e);var s=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"leftbar"},[i("div",{staticClass:"bar"},[i("el-menu",{staticClass:"leftbar-menu",attrs:{"default-active":t.$route.meta.name,collapse:t.isCollapse,"collapse-transition":!1,"unique-opened":""},on:{select:t.btn}},t._l(this.Permission_routes,(function(e){return i("SidebarItem",{key:e.permissionId,attrs:{item:e,isCollapse:t.isCollapse}})})),1)],1),i("div",{staticClass:"collapse",on:{click:t.changeCollapse}},[i("i",{staticClass:"iconfont icon-daohangsuofang navbg"}),i("i",{staticClass:"iconfont icon-xia arrow"})])])},n=[],a=i("5530"),o=(i("b0c0"),i("4de4"),i("d3b7"),i("d81d"),i("2f62")),r=i("0bc6"),c={name:"NavbarList",components:{SidebarItem:r["default"]},data:function(){return{paths:"",routes:[],isAdmin:!1,routeName:"",routeChange:!0,Permission_routes:[]}},computed:Object(a["a"])(Object(a["a"])({},Object(o["b"])(["permission_routes","admin_routes"])),{},{isCollapse:{get:function(){return this.$store.state.app.isCollapse}}}),mounted:function(){this.routeName=this.$route.matched[0].meta.name,this.isAdmin="admin"==this.$route.matched[0].meta.name,this.getRoutes()},watch:{$route:function(){this.routeName!=this.$route.matched[0].meta.name&&(this.routeName=this.$route.matched[0].meta.name,this.isAdmin="admin"==this.$route.matched[0].meta.name,this.getRoutes())},isCollapse:function(){},permission_routes:function(){this.getRoutes()}},methods:{reload:function(){var t=this;this.isRouterAlive=!1,this.$nextTick((function(){return t.isRouterAlive=!0}))},changeCollapse:function(){this.$store.dispatch("toggleSideBar")},getRoutes:function(){console.log(this.isAdmin," this.$store.state.app.isCollapse"),this.isAdmin?this.Permission_routes=this.admin_routes.filter((function(t){return t.children&&t.children.length>1?t.showingChildren=!0:t.showingChildren=!1,t})):(this.Permission_routes=this.permission_routes.filter((function(t){return!t.hidden&&"admin"!=t.meta.name})),this.Permission_routes=this.Permission_routes.map((function(t){return t.children&&t.children.length>1?t.showingChildren=!0:(t=t.children&&t.children[0]||t,t.showingChildren=!1),t})))},btn:function(t,e,i){this.paths=t,console.log(t,e,i,i.route),this.$router.push({name:t})},handleOpen:function(t,e){console.log(t,e,"----------------1-----------")},handleClose:function(t,e){console.log(t,e,"----------------3-----------")}}},l=c,u=i("2877"),m=Object(u["a"])(l,s,n,!1,null,null,null);e["default"]=m.exports},8082:function(t,e,i){"use strict";i("22de")},9128:function(t,e,i){"use strict";i.r(e);var s=function(){var t=this,e=t.$createElement,i=t._self._c||e;return t.alarmList.length>0?i("div",{staticClass:"alarm-container"},[i("div",{staticClass:"name"},[i("i",{staticClass:"iconfont icon-tongzhi"}),i("span",[t._v(t._s(t.$t("alarm.notification"))+"")])]),i("div",{ref:"msgBox",staticClass:"msg-box"},[i("div",{ref:"box",staticClass:"list"},t._l(t.alarmList,(function(e,s){return i("div",{key:s,ref:"list",refInFor:!0,staticClass:"msg"},[i("span",[t._v(" ["+t._s(t.getLevel(e.alarmLevel))+"] "+t._s(e.deviceName+": "+e.alarmInfo)+" ")])])})),0)])]):t._e()},n=[],a=(i("ac1f"),i("5319"),i("a9e3"),i("9e04")),o={name:"AppMain",computed:{cachedViews:function(){return this.$store.state.tagsView.cachedViews},key:function(){return this.$route.fullPath}},filters:{},data:function(){return{nowTime:null,disArr:[],alarmList:[]}},mounted:function(){var t=this;Object(a["i"])().then((function(e){t.alarmList=e.data.alarmList,t.$nextTick((function(){t.setAlarmList()}))}))},beforeDestroy:function(){clearInterval(this.nowTime),this.nowTime=null},methods:{getLevel:function(t){return 1==t?this.$t("alarm.leve1"):2==t?this.$t("alarm.leve2"):3==t?this.$t("alarm.leve3"):void 0},setAlarmList:function(){var t=this.$refs.list,e=this.$refs.msgBox,i=this.$refs.box;if(0!=this.alarmList.length&&!(e.offsetWidth>i.offsetWidth)){for(var s=this.alarmList.length,n=[],a=this.getMargin(t[0]),o=0;o<s;o++)n.push(t[o].clientWidth+a);this.disArr=n,this.moveLeft()}},getMargin:function(t){var e=window.getComputedStyle(t,null)["margin-right"];return e=e.replace("px",""),Number(e)},moveLeft:function(){var t=this,e=this.$refs.box,i=0;this.nowTime=setInterval((function(){i-=.5,Math.abs(i)>Math.abs(t.disArr[0])&&(t.disArr.push(t.disArr.shift()),t.alarmList.push(t.alarmList.shift()),i=0),e.style="transform: translateX(".concat(i,"px)")}),1e3/60)}}},r=o,c=(i("e4ed"),i("2877")),l=Object(c["a"])(r,s,n,!1,null,"5cace76c",null);e["default"]=l.exports},"9e04":function(t,e,i){"use strict";i.d(e,"g",(function(){return n})),i.d(e,"a",(function(){return a})),i.d(e,"c",(function(){return o})),i.d(e,"i",(function(){return r})),i.d(e,"j",(function(){return c})),i.d(e,"h",(function(){return l})),i.d(e,"b",(function(){return u})),i.d(e,"d",(function(){return m})),i.d(e,"e",(function(){return h})),i.d(e,"f",(function(){return d}));var s=i("b775");function n(t){return Object(s["a"])({url:"trajectory-service/deptAlarm/getTaskByAlarmId",method:"get",params:t})}function a(t){return Object(s["a"])({url:"alarm-service/alarm/clearAlarmStatus?alarmId="+t,method:"post"})}function o(t){return Object(s["a"])({url:"alarm-service/alarm/getAlarmList",method:"get",params:t})}function r(t){return Object(s["a"])({url:"alarm-service/alarm/getTipAlarmList",method:"get",params:t})}function c(t){return Object(s["a"])({url:"alarm-service/alarm/updateAlarmReadStatus",method:"post",params:t})}function l(t){return Object(s["a"])({url:"device-service/deviceLog/getDeviceLogList",method:"get",params:t})}function u(t){return Object(s["a"])({url:"alarm-service/statistics/getAlarmLevel",method:"get",params:t})}function m(t){return Object(s["a"])({url:"alarm-service/statistics/getAlarmStatus",method:"get",params:t})}function h(t){return Object(s["a"])({url:"alarm-service/statistics/getAlarmTypeLevel",method:"get",params:t})}function d(t){return Object(s["a"])({url:"alarm-service/statistics/getAlarmTypeStatus",method:"get",params:t})}},"9e9c":function(t,e,i){},bda2:function(t,e,i){},e4ed:function(t,e,i){"use strict";i("9e9c")},fcda:function(t,e,i){"use strict";i.r(e);var s=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"header-goback"},[i("div",{staticClass:"desk",on:{click:t.goScreen}},[i("i",{staticClass:"iconfont icon-shouye"}),i("span",[t._v(t._s(t.$t("home.screen")))])]),t.isAdmin||t.isHome?t._e():i("div",{staticClass:"desk",on:{click:t.goAdmin}},[i("i",{staticClass:"iconfont icon-guanlitai"}),i("span",[t._v(t._s(t.$t("login.desk")))])]),i("div",{staticClass:"lanange"},[i("i",{staticClass:"iconfont icon-yuyan"}),i("span",{class:{isLang:"zh"==t.lang},on:{click:function(e){return t.changeLang("zh")}}},[t._v("中")]),i("el-divider",{attrs:{direction:"vertical"}}),i("span",{class:{isLang:"en"==t.lang},on:{click:function(e){return t.changeLang("en")}}},[t._v("EN")])],1),i("div",{staticClass:"name"},[i("i",{staticClass:"iconfont icon-yonghu"}),i("span",[t._v(t._s(t.$t("login.welcome")))]),i("span",[t._v(t._s(t.getUserType(t.userType)))]),i("span",[t._v("["+t._s(t.userName)+"]")]),t.isAdmin?t._e():i("el-tooltip",{attrs:{content:t.$t("home.personal")}},[i("i",{staticClass:"iconfont icon-bianji",on:{click:function(e){return t.goPerson(t.isAdmin)}}})]),i("el-tooltip",{attrs:{content:t.$t("login.signOut")}},[i("i",{staticClass:"iconfont icon-tuichu",on:{click:t.logout}})])],1)])},n=[],a=(i("b680"),i("d3b7"),i("25f0"),{name:"SignOut",props:{isAdmin:{type:Boolean,required:!0},isHome:{type:Boolean,required:!0}},data:function(){return{isShow:!1,timeout:5e4,lang:this.$i18n.locale,openedWindow:null}},filters:{round:function(t){if(t){t-=0;var e=parseFloat(t.toFixed(1));return e}return 0}},mounted:function(){this.logoForm.unitName?document.title="en"==this.$i18n.locale?this.logoForm.enUnitName:this.logoForm.unitName:document.title=""},computed:{userName:function(){return this.$store.state.user.userName},userType:function(){return this.$store.state.user.userType},logoForm:{get:function(){return this.$store.state.user.logoForm}}},methods:{getUserType:function(t){return 1==t?this.$t("user.superAdmin"):this.$t("user.admin")},goScreen:function(){var t=this.$router.resolve({name:"screen"});window.open(t.href,"screen")},goAdmin:function(){var t=this.$router.resolve({name:"manager"});window.open(t.href,"manager")},goPerson:function(){this.isAdmin||this.$router.push({name:"personal"})},changeLang:function(t){this.lang!=t&&(this.$i18n.locale=t,this.lang=t,localStorage.setItem("lang",t),this.$message({message:this.$t("changelangtip").toString(),type:"success"}))},logout:function(){window.localStorage.removeItem("sitename"),this.$store.dispatch("LogOut").then((function(){location.reload()}))}}}),o=a,r=(i("3137"),i("2877")),c=Object(r["a"])(o,s,n,!1,null,"58efc830",null);e["default"]=c.exports}}]);
//# sourceMappingURL=chunk-8492257a.a9c84623.js.map