1 line
11 KiB
JSON
1 line
11 KiB
JSON
{"remainingRequest":"C:\\Users\\27446\\Desktop\\up\\front\\dkha-web-sz-main\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!C:\\Users\\27446\\Desktop\\up\\front\\dkha-web-sz-main\\src\\views\\main-navbar.vue?vue&type=script&lang=js&","dependencies":[{"path":"C:\\Users\\27446\\Desktop\\up\\front\\dkha-web-sz-main\\src\\views\\main-navbar.vue","mtime":1614735254000},{"path":"C:\\Users\\27446\\Desktop\\up\\front\\dkha-web-sz-main\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"C:\\Users\\27446\\Desktop\\up\\front\\dkha-web-sz-main\\node_modules\\babel-loader\\lib\\index.js","mtime":499162500000},{"path":"C:\\Users\\27446\\Desktop\\up\\front\\dkha-web-sz-main\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"C:\\Users\\27446\\Desktop\\up\\front\\dkha-web-sz-main\\node_modules\\vue-loader\\lib\\index.js","mtime":499162500000}],"contextDependencies":[],"result":["//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n\nimport { messages } from '@/i18n'\nimport screenfull from 'screenfull'\nimport UpdatePassword from './main-navbar-update-password'\nimport updateInfo from './main-navbar-update-info'\nimport { clearLoginInfo } from '@/utils'\nexport default {\n inject: ['refresh'],\n data () {\n return {\n i18nMessages: messages,\n updatePasswordVisible: false, \n updateInfoVisible:false,\n messageTip: false\n }\n },\n components: {\n UpdatePassword,\n updateInfo\n },\n created () {\n // 未读通知数\n this.getUnReadCount()\n },\n methods: {\n myNoticeRouter () {\n this.$router.replace('sys-notice-user')\n },\n getUnReadCount () {\n this.$http.get(`/sys/notice/mynotice/unread`).then(({ data: res }) => {\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(() => {})\n },\n openindex(){\n if(this.$route.name == 'home'){\n\t\t\t\tlet dom=document.querySelectorAll(\".home\")[0];\n\t\t\t\t\t\t\tscreenfull.toggle(dom)\n\t\t\t\t}else{\n\t\t\t\t\tthis.$router.replace({name:'home'})\n\t\t\t\t}\n\t\t\t\tthis.$store.commit(\"SET_FULL_SCREEN\",true)\n },\n // 全屏\n 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 () {\n this.updatePasswordVisible = true\n this.$nextTick(() => {\n this.$refs.updatePassword.init()\n })\n },\n updateSelfInfoHandle(){\n this.updateInfoVisible=true;\n this.$nextTick(() => {\n this.$refs.updateInfo.init()\n })\n },\n // 退出\n logoutHandle () {\n this.$confirm(this.$t('prompt.info', { 'handle': this.$t('logout') }), this.$t('prompt.title'), {\n confirmButtonText: this.$t('confirm'),\n cancelButtonText: this.$t('cancel'),\n type: 'warning'\n }).then(() => {\n this.$http.post('/auth/oauth/logout').then(({ data: res }) => {\n if (res.code !== 0) {\n return this.$message.error(res.msg)\n }\n clearLoginInfo()\n this.$router.push({ name: 'login' })\n }).catch(() => {})\n }).catch(() => {})\n }\n }\n}\n",{"version":3,"sources":["main-navbar.vue"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","file":"main-navbar.vue","sourceRoot":"src/views","sourcesContent":["<template>\n <nav class=\"aui-navbar\" :class=\"`aui-navbar--${$store.state.navbarLayoutType}`\">\n <div class=\"aui-navbar__header\">\n <h1 class=\"aui-navbar__brand\" @click=\"$router.push({ name: 'home' })\">\n <!-- <a class=\"aui-navbar__brand-lg\" href=\"javascript:;\">{{ $t('brand.lg') }}</a> -->\n <!-- <a class=\"aui-navbar__brand-mini\" href=\"javascript:;\">{{ $t('brand.mini') }}</a> -->\n <a class=\"aui-navbar__brand-lg\" href=\"javascript:;\">\n <!-- <img class=\"header-logo\" src=\"../assets/img/logo.png\" alt=\"logo\">-->\n </a>\n <a class=\"aui-navbar__brand-mini\" href=\"javascript:;\">\n <!--<img class=\"header-logo\" src=\"../assets/img/logo-small.png\" alt=\"logo\">-->\n </a>\n </h1>\n </div>\n <div class=\"aui-navbar__body\">\n <el-menu class=\"aui-navbar__menu mr-auto\" mode=\"horizontal\">\n <el-menu-item index=\"1\" @click=\"$store.state.sidebarFold = !$store.state.sidebarFold\">\n <svg class=\"icon-svg aui-navbar__icon-menu aui-navbar__icon-menu--switch\" aria-hidden=\"true\"><use xlink:href=\"#icon-outdent\"></use></svg>\n </el-menu-item>\n <el-menu-item index=\"2\" @click=\"refresh()\">\n <svg class=\"icon-svg aui-navbar__icon-menu aui-navbar__icon-menu--refresh\" aria-hidden=\"true\"><use xlink:href=\"#icon-sync\"></use></svg>\n </el-menu-item>\n <el-menu-item index=\"2\" @click=\"openindex()\">\n\t\t\t\t\t<svg class=\"icon-svg aui-navbar__icon-menu aui-navbar__icon-menu--refresh\" aria-hidden=\"true\">\n\t\t\t\t\t\t<use xlink:href=\"#icon-home\"></use>\n\t\t\t\t\t</svg>\n\t\t\t\t</el-menu-item>\n </el-menu>\n \n <el-menu class=\"aui-navbar__menu mr-auto menu-title\" mode=\"horizontal\">\n\t\t\t\t<el-menu-item index=\"1\" @click=\"$router.push({ name: 'home' })\">\n\t\t\t\t\t<span style=\"font-size: 22px;user-select: none;\">{{ $t('brand.lg') }}</span>\n\t\t\t\t</el-menu-item>\n\t\t\t</el-menu>\n \n <el-menu class=\"aui-navbar__menu\" mode=\"horizontal\">\n <el-menu-item index=\"1\">\n <!-- <el-dropdown placement=\"bottom\" :show-timeout=\"0\">\n <el-button size=\"mini\">{{ $t('_lang') }}</el-button>\n <el-dropdown-menu slot=\"dropdown\">\n <el-dropdown-item v-for=\"(val, key) in i18nMessages\" :key=\"key\" @click.native=\"$i18n.locale = key\">{{ val._lang }}</el-dropdown-item>\n </el-dropdown-menu>\n </el-dropdown> -->\n </el-menu-item>\n <!-- <el-menu-item index=\"2\">\n <a href=\"//www.renren.io/\" target=\"_blank\"> \n <svg class=\"icon-svg aui-navbar__icon-menu\" aria-hidden=\"true\"><use xlink:href=\"#icon-earth\"></use></svg>\n </a> \n </el-menu-item> -->\n <!-- <el-menu-item index=\"4\" v-if=\"$hasPermission('sys:notice:all')\">\n <el-badge :is-dot=\"messageTip\">\n <a href=\"#\" @click=\"myNoticeRouter()\"><i class=\"el-icon-bell\"></i></a>\n </el-badge>\n </el-menu-item> -->\n <!-- <el-menu-item index=\"3\" @click=\"fullscreenHandle()\">\n <svg class=\"icon-svg aui-navbar__icon-menu\" aria-hidden=\"true\"><use xlink:href=\"#icon-fullscreen\"></use></svg>\n </el-menu-item> -->\n <el-menu-item index=\"4\" class=\"aui-navbar__avatar\">\n <el-dropdown placement=\"bottom\" :show-timeout=\"0\">\n <span class=\"el-dropdown-link\">\n <!-- <img src=\"~@/assets/img/avatar.png\"> -->\n <i class=\"el-icon-s-custom\"></i>\n <span>{{ $store.state.user.realName }}</span>\n <i class=\"el-icon-arrow-down\"></i>\n </span>\n <el-dropdown-menu slot=\"dropdown\">\n <el-dropdown-item v-if=\"$store.state.user.superAdmin!==1\" @click.native=\"updateSelfInfoHandle()\">个人信息</el-dropdown-item>\n <el-dropdown-item @click.native=\"updatePasswordHandle()\">{{ $t('updatePassword.title') }}</el-dropdown-item>\n <el-dropdown-item @click.native=\"logoutHandle()\">{{ $t('logout') }}</el-dropdown-item>\n </el-dropdown-menu>\n </el-dropdown>\n </el-menu-item>\n </el-menu>\n </div>\n <!-- 弹窗, 修改密码 -->\n <update-password v-if=\"updatePasswordVisible\" ref=\"updatePassword\"></update-password>\n <!-- 弹窗 修改个人信息 -->\n <update-info v-if=\"updateInfoVisible\" ref=\"updateInfo\"></update-info>\n </nav>\n</template>\n\n<script>\nimport { messages } from '@/i18n'\nimport screenfull from 'screenfull'\nimport UpdatePassword from './main-navbar-update-password'\nimport updateInfo from './main-navbar-update-info'\nimport { clearLoginInfo } from '@/utils'\nexport default {\n inject: ['refresh'],\n data () {\n return {\n i18nMessages: messages,\n updatePasswordVisible: false, \n updateInfoVisible:false,\n messageTip: false\n }\n },\n components: {\n UpdatePassword,\n updateInfo\n },\n created () {\n // 未读通知数\n this.getUnReadCount()\n },\n methods: {\n myNoticeRouter () {\n this.$router.replace('sys-notice-user')\n },\n getUnReadCount () {\n this.$http.get(`/sys/notice/mynotice/unread`).then(({ data: res }) => {\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(() => {})\n },\n openindex(){\n if(this.$route.name == 'home'){\n\t\t\t\tlet dom=document.querySelectorAll(\".home\")[0];\n\t\t\t\t\t\t\tscreenfull.toggle(dom)\n\t\t\t\t}else{\n\t\t\t\t\tthis.$router.replace({name:'home'})\n\t\t\t\t}\n\t\t\t\tthis.$store.commit(\"SET_FULL_SCREEN\",true)\n },\n // 全屏\n 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 () {\n this.updatePasswordVisible = true\n this.$nextTick(() => {\n this.$refs.updatePassword.init()\n })\n },\n updateSelfInfoHandle(){\n this.updateInfoVisible=true;\n this.$nextTick(() => {\n this.$refs.updateInfo.init()\n })\n },\n // 退出\n logoutHandle () {\n this.$confirm(this.$t('prompt.info', { 'handle': this.$t('logout') }), this.$t('prompt.title'), {\n confirmButtonText: this.$t('confirm'),\n cancelButtonText: this.$t('cancel'),\n type: 'warning'\n }).then(() => {\n this.$http.post('/auth/oauth/logout').then(({ data: res }) => {\n if (res.code !== 0) {\n return this.$message.error(res.msg)\n }\n clearLoginInfo()\n this.$router.push({ name: 'login' })\n }).catch(() => {})\n }).catch(() => {})\n }\n }\n}\n</script>\n<style lang=\"scss\" scoped>\n .menu-title{\n .el-menu-item{\n &:hover{\n background: transparent;\n }\n }\n }\n .aui-navbar__header{\n overflow: hidden;\n .header-logo{\n height: 30px;\n width: auto;\n margin:10px;\n }\n }\n</style>"]}]} |