| 1 |
- {"remainingRequest":"D:\\HTC\\program\\善行少年\\security-enterprise-admin\\node_modules\\babel-loader\\lib\\index.js!D:\\HTC\\program\\善行少年\\security-enterprise-admin\\node_modules\\cache-loader\\dist\\cjs.js??ref--0-0!D:\\HTC\\program\\善行少年\\security-enterprise-admin\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!D:\\HTC\\program\\善行少年\\security-enterprise-admin\\src\\views\\main-navbar.vue?vue&type=script&lang=js","dependencies":[{"path":"D:\\HTC\\program\\善行少年\\security-enterprise-admin\\src\\views\\main-navbar.vue","mtime":1760165958034},{"path":"D:\\HTC\\program\\善行少年\\security-enterprise-admin\\babel.config.js","mtime":1581948662000},{"path":"D:\\HTC\\program\\善行少年\\security-enterprise-admin\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\HTC\\program\\善行少年\\security-enterprise-admin\\node_modules\\babel-loader\\lib\\index.js","mtime":456789000000},{"path":"D:\\HTC\\program\\善行少年\\security-enterprise-admin\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\HTC\\program\\善行少年\\security-enterprise-admin\\node_modules\\vue-loader\\lib\\index.js","mtime":499162500000}],"contextDependencies":[],"result":["import \"core-js/modules/es6.regexp.replace\";\nimport { messages } from '@/i18n';\nimport screenfull from 'screenfull';\nimport UpdatePassword from \"./main-navbar-update-password\";\nimport { clearLoginInfo } from '@/utils';\nvar socket = null;\nexport default {\n inject: ['refresh'],\n data: function data() {\n return {\n i18nMessages: messages,\n updatePasswordVisible: false,\n messageTip: false\n };\n },\n components: {\n UpdatePassword: UpdatePassword\n },\n created: function created() {\n var vue = this;\n socket = new WebSocket(\"\".concat(window.SITE_CONFIG['socketURL']));\n socket.onopen = function () {};\n socket.onerror = function () {\n vue.$notify.error({\n title: vue.$t('notice.disconnect'),\n message: vue.$t('notice.disconnectMessage')\n });\n };\n socket.onmessage = function (evt) {\n var result = JSON.parse(evt.data);\n\n // 如果是有新文本通知,则提示有新通知\n if (result.type === 0) {\n vue.messageTip = true;\n vue.$notify({\n title: vue.$t('notice.new'),\n message: result.msg,\n type: 'info',\n duration: 5000\n });\n }\n };\n\n // 未读通知数\n this.getUnReadCount();\n },\n methods: {\n myNoticeRouter: function myNoticeRouter() {\n this.$router.replace('notice-notice-user');\n },\n getUnReadCount: function getUnReadCount() {\n var _this = this;\n this.$http.get(\"/sys/notice/mynotice/unread\").then(function (_ref) {\n var res = _ref.data;\n if (res.code !== 0) {\n return _this.$message.error(res.msg);\n }\n if (res.data > 0) {\n _this.messageTip = true;\n }\n }).catch(function () {});\n },\n // 全屏\n fullscreenHandle: function fullscreenHandle() {\n if (!screenfull.enabled) {\n return this.$message({\n message: this.$t('fullscreen.prompt'),\n type: 'warning',\n duration: 500\n });\n }\n screenfull.toggle();\n },\n // 修改密码\n updatePasswordHandle: function updatePasswordHandle() {\n var _this2 = this;\n this.updatePasswordVisible = true;\n this.$nextTick(function () {\n _this2.$refs.updatePassword.init();\n });\n },\n // 退出\n logoutHandle: function logoutHandle() {\n var _this3 = this;\n this.$confirm(this.$t('prompt.info', {\n 'handle': this.$t('logout')\n }), this.$t('prompt.title'), {\n confirmButtonText: this.$t('confirm'),\n cancelButtonText: this.$t('cancel'),\n type: 'warning'\n }).then(function () {\n _this3.$http.post('/logout').then(function (_ref2) {\n var res = _ref2.data;\n if (res.code !== 0) {\n return _this3.$message.error(res.msg);\n }\n clearLoginInfo();\n _this3.$router.push({\n name: 'login'\n });\n }).catch(function () {});\n }).catch(function () {});\n }\n }\n};",{"version":3,"names":["messages","screenfull","UpdatePassword","clearLoginInfo","socket","inject","data","i18nMessages","updatePasswordVisible","messageTip","components","created","vue","WebSocket","concat","window","SITE_CONFIG","onopen","onerror","$notify","error","title","$t","message","onmessage","evt","result","JSON","parse","type","msg","duration","getUnReadCount","methods","myNoticeRouter","$router","replace","_this","$http","get","then","_ref","res","code","$message","catch","fullscreenHandle","enabled","toggle","updatePasswordHandle","_this2","$nextTick","$refs","updatePassword","init","logoutHandle","_this3","$confirm","confirmButtonText","cancelButtonText","post","_ref2","push","name"],"sources":["src/views/main-navbar.vue"],"sourcesContent":["<template>\r\n <nav class=\"aui-navbar\" :class=\"`aui-navbar--${$store.state.navbarLayoutType}`\">\r\n <div class=\"aui-navbar__header\">\r\n <h1 class=\"aui-navbar__brand\" @click=\"$router.push({ name: 'home' })\">\r\n <a class=\"aui-navbar__brand-lg\" href=\"javascript:;\">{{ $t('brand.mini') }}</a>\r\n <a class=\"aui-navbar__brand-mini\" href=\"javascript:;\">{{ $t('brand.mini') }}</a>\r\n </h1>\r\n </div>\r\n <div class=\"aui-navbar__body\">\r\n <el-menu class=\"aui-navbar__menu mr-auto\" mode=\"horizontal\">\r\n <el-menu-item index=\"1\" @click=\"$store.state.sidebarFold = !$store.state.sidebarFold\">\r\n <svg class=\"icon-svg aui-navbar__icon-menu aui-navbar__icon-menu--switch\" aria-hidden=\"true\"><use xlink:href=\"#icon-outdent\"></use></svg>\r\n </el-menu-item>\r\n <el-menu-item index=\"2\" @click=\"refresh()\">\r\n <svg class=\"icon-svg aui-navbar__icon-menu aui-navbar__icon-menu--refresh\" aria-hidden=\"true\"><use xlink:href=\"#icon-sync\"></use></svg>\r\n </el-menu-item>\r\n </el-menu>\r\n <el-menu class=\"aui-navbar__menu\" mode=\"horizontal\">\r\n <el-menu-item index=\"3\" v-if=\"$hasPermission('sys:notice:all')\">\r\n <el-badge :is-dot=\"messageTip\">\r\n <a href=\"#\" @click=\"myNoticeRouter()\"><i class=\"el-icon-bell\"></i></a>\r\n </el-badge>\r\n </el-menu-item>\r\n <el-menu-item index=\"4\" @click=\"fullscreenHandle()\">\r\n <svg class=\"icon-svg aui-navbar__icon-menu\" aria-hidden=\"true\"><use xlink:href=\"#icon-fullscreen\"></use></svg>\r\n </el-menu-item>\r\n <el-menu-item index=\"5\" class=\"aui-navbar__avatar\">\r\n <el-dropdown placement=\"bottom\" :show-timeout=\"0\">\r\n <span class=\"el-dropdown-link\">\r\n <img src=\"~@/assets/img/avatar.png\">\r\n <span>{{ $store.state.user.name }}</span>\r\n <i class=\"el-icon-arrow-down\"></i>\r\n </span>\r\n <el-dropdown-menu slot=\"dropdown\">\r\n <el-dropdown-item @click.native=\"updatePasswordHandle()\">{{ $t('updatePassword.title') }}</el-dropdown-item>\r\n <el-dropdown-item @click.native=\"logoutHandle()\">{{ $t('logout') }}</el-dropdown-item>\r\n </el-dropdown-menu>\r\n </el-dropdown>\r\n </el-menu-item>\r\n </el-menu>\r\n </div>\r\n <!-- 弹窗, 修改密码 -->\r\n <update-password v-if=\"updatePasswordVisible\" ref=\"updatePassword\"></update-password>\r\n </nav>\r\n</template>\r\n<script>\r\nimport { messages } from '@/i18n'\r\nimport screenfull from 'screenfull'\r\nimport UpdatePassword from './main-navbar-update-password'\r\nimport { clearLoginInfo } from '@/utils'\r\nvar socket = null\r\nexport default {\r\n inject: ['refresh'],\r\n data () {\r\n return {\r\n i18nMessages: messages,\r\n updatePasswordVisible: false,\r\n messageTip: false\r\n }\r\n },\r\n components: {\r\n UpdatePassword\r\n },\r\n created () {\r\n var vue = this\r\n socket = new WebSocket(`${window.SITE_CONFIG['socketURL']}`)\r\n socket.onopen = function () {}\r\n socket.onerror = function () {\r\n vue.$notify.error({\r\n title: vue.$t('notice.disconnect'),\r\n message: vue.$t('notice.disconnectMessage')\r\n })\r\n }\r\n socket.onmessage = function (evt) {\r\n const result = JSON.parse(evt.data)\r\n\r\n // 如果是有新文本通知,则提示有新通知\r\n if (result.type === 0) {\r\n vue.messageTip = true\r\n vue.$notify({\r\n title: vue.$t('notice.new'),\r\n message: result.msg,\r\n type: 'info',\r\n duration: 5000\r\n })\r\n }\r\n }\r\n\r\n // 未读通知数\r\n this.getUnReadCount()\r\n },\r\n methods: {\r\n myNoticeRouter () {\r\n this.$router.replace('notice-notice-user')\r\n },\r\n getUnReadCount () {\r\n this.$http.get(`/sys/notice/mynotice/unread`).then(({ data: res }) => {\r\n if (res.code !== 0) {\r\n return this.$message.error(res.msg)\r\n }\r\n if (res.data > 0) {\r\n this.messageTip = true\r\n }\r\n }).catch(() => {})\r\n },\r\n // 全屏\r\n fullscreenHandle () {\r\n if (!screenfull.enabled) {\r\n return this.$message({\r\n message: this.$t('fullscreen.prompt'),\r\n type: 'warning',\r\n duration: 500\r\n })\r\n }\r\n screenfull.toggle()\r\n },\r\n // 修改密码\r\n updatePasswordHandle () {\r\n this.updatePasswordVisible = true\r\n this.$nextTick(() => {\r\n this.$refs.updatePassword.init()\r\n })\r\n },\r\n // 退出\r\n logoutHandle () {\r\n this.$confirm(this.$t('prompt.info', { 'handle': this.$t('logout') }), this.$t('prompt.title'), {\r\n confirmButtonText: this.$t('confirm'),\r\n cancelButtonText: this.$t('cancel'),\r\n type: 'warning'\r\n }).then(() => {\r\n this.$http.post('/logout').then(({ data: res }) => {\r\n if (res.code !== 0) {\r\n return this.$message.error(res.msg)\r\n }\r\n clearLoginInfo()\r\n this.$router.push({ name: 'login' })\r\n }).catch(() => {})\r\n }).catch(() => {})\r\n }\r\n }\r\n}\r\n</script>\r\n"],"mappings":";AA8CA,SAAAA,QAAA;AACA,OAAAC,UAAA;AACA,OAAAC,cAAA;AACA,SAAAC,cAAA;AACA,IAAAC,MAAA;AACA;EACAC,MAAA;EACAC,IAAA,WAAAA,KAAA;IACA;MACAC,YAAA,EAAAP,QAAA;MACAQ,qBAAA;MACAC,UAAA;IACA;EACA;EACAC,UAAA;IACAR,cAAA,EAAAA;EACA;EACAS,OAAA,WAAAA,QAAA;IACA,IAAAC,GAAA;IACAR,MAAA,OAAAS,SAAA,IAAAC,MAAA,CAAAC,MAAA,CAAAC,WAAA;IACAZ,MAAA,CAAAa,MAAA;IACAb,MAAA,CAAAc,OAAA;MACAN,GAAA,CAAAO,OAAA,CAAAC,KAAA;QACAC,KAAA,EAAAT,GAAA,CAAAU,EAAA;QACAC,OAAA,EAAAX,GAAA,CAAAU,EAAA;MACA;IACA;IACAlB,MAAA,CAAAoB,SAAA,aAAAC,GA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