se-ui/.env.development | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
se-ui/.env.production | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
se-ui/.env.staging | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
se-ui/src/components/Breadcrumb/index.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
se-ui/src/layout/components/Navbar.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
se-ui/src/permission.js | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
se-ui/src/utils/request.js | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
se-ui/src/views/login.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
se-ui/src/views/system/role/index.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
se-ui/src/views/system/user/profile/index.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
se-ui/vue.config.js | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
se-ui/.env.development
@@ -1,5 +1,5 @@ # 页面标题 VUE_APP_TITLE = 管理系统 VUE_APP_TITLE = 综合管理分系统 # 开发环境配置 ENV = 'development' se-ui/.env.production
@@ -1,5 +1,5 @@ # 页面标题 VUE_APP_TITLE = 管理系统 VUE_APP_TITLE = 综合管理分系统 # 生产环境配置 ENV = 'production' se-ui/.env.staging
@@ -1,5 +1,5 @@ # 页面标题 VUE_APP_TITLE = 管理系统 VUE_APP_TITLE = 综合管理分系统 NODE_ENV = production se-ui/src/components/Breadcrumb/index.vue
@@ -35,10 +35,12 @@ const first = matched[0] if (!this.isDashboard(first)) { matched = [{ path: '/index', meta: { title: '首页' }}].concat(matched) // matched = [{ path: '/index', meta: { title: '首页' }}].concat(matched) } this.levelList = matched.filter(item => item.meta && item.meta.title && item.meta.breadcrumb !== false) }, isDashboard(route) { const name = route && route.name se-ui/src/layout/components/Navbar.vue
@@ -1,13 +1,18 @@ <template> <div class="navbar"> <hamburger id="hamburger-container" :is-active="sidebar.opened" class="hamburger-container" @toggleClick="toggleSideBar" /> <hamburger id="hamburger-container" :is-active="sidebar.opened" class="hamburger-container" @toggleClick="toggleSideBar" /> <breadcrumb id="breadcrumb-container" class="breadcrumb-container" v-if="!topNav"/> <top-nav id="topmenu-container" class="topmenu-container" v-if="topNav"/> <breadcrumb id="breadcrumb-container" class="breadcrumb-container" v-if="!topNav" /> <top-nav id="topmenu-container" class="topmenu-container" v-if="topNav" /> <div class="right-menu"> <template v-if="device!=='mobile'"> <search id="header-search" class="right-menu-item" /> <!-- <search id="header-search" class="right-menu-item" /> --> <!-- <el-tooltip content="源码地址" effect="dark" placement="bottom"> <se-git id="se-git" class="right-menu-item hover-effect" /> @@ -15,28 +20,27 @@ <el-tooltip content="文档地址" effect="dark" placement="bottom"> <se-doc id="se-doc" class="right-menu-item hover-effect" /> </el-tooltip> --> </el-tooltip>--> <screenfull id="screenfull" class="right-menu-item hover-effect" /> <el-tooltip content="布局大小" effect="dark" placement="bottom"> <!-- <el-tooltip content="布局大小" effect="dark" placement="bottom"> <size-select id="size-select" class="right-menu-item hover-effect" /> </el-tooltip> </el-tooltip>--> </template> <el-dropdown class="avatar-container right-menu-item hover-effect" trigger="click"> <div class="avatar-wrapper"> <img :src="avatar" class="user-avatar"> <img :src="avatar" class="user-avatar" /> <i class="el-icon-caret-bottom" /> </div> <el-dropdown-menu slot="dropdown"> <router-link to="/user/profile"> <el-dropdown-item>个人中心</el-dropdown-item> </router-link> <el-dropdown-item @click.native="setting = true"> <!-- <el-dropdown-item @click.native="setting = true"> <span>布局设置</span> </el-dropdown-item> </el-dropdown-item>--> <el-dropdown-item divided @click.native="logout"> <span>退出登录</span> </el-dropdown-item> @@ -47,15 +51,15 @@ </template> <script> import { mapGetters } from 'vuex' import Breadcrumb from '@/components/Breadcrumb' import TopNav from '@/components/TopNav' import Hamburger from '@/components/Hamburger' import Screenfull from '@/components/Screenfull' import SizeSelect from '@/components/SizeSelect' import Search from '@/components/HeaderSearch' import SEGit from '@/components/se/Git' import SEDoc from '@/components/se/Doc' import { mapGetters } from "vuex"; import Breadcrumb from "@/components/Breadcrumb"; import TopNav from "@/components/TopNav"; import Hamburger from "@/components/Hamburger"; import Screenfull from "@/components/Screenfull"; import SizeSelect from "@/components/SizeSelect"; import Search from "@/components/HeaderSearch"; import SEGit from "@/components/se/Git"; import SEDoc from "@/components/se/Doc"; export default { components: { @@ -69,11 +73,8 @@ SEDoc }, computed: { ...mapGetters([ 'sidebar', 'avatar', 'device' ]), setting: { ...mapGetters(["sidebar", "avatar", "device"]), setting: { get() { return this.$store.state.settings.showSettings; }, @@ -102,7 +103,11 @@ }) .then(() => { this.$store.dispatch("LogOut").then(() => { location.href = window.location.origin + '/sso/login' if ((process.env.ENV = "development")) { window.location.href = "http://localhost:8080/login"; } else if ((process.env.ENV = "production")) { window.location.href = window.location.origin + "/sso/login"; } }); }) .catch(() => {}); se-ui/src/permission.js
@@ -16,7 +16,12 @@ to.meta.title && store.dispatch('settings/setTitle', to.meta.title) /* has token*/ if (to.path === '/login') { next({ path: '/' }) if (process.env.ENV = 'development') { window.location.href = 'http://localhost:8080/login' } else if (process.env.ENV = 'production') { window.location.href = window.location.origin + '/sso/login' } // next({ path: '/' }) NProgress.done() } else if (whiteList.indexOf(to.path) !== -1) { next() @@ -34,7 +39,11 @@ }).catch(err => { store.dispatch('LogOut').then(() => { Message.error(err) window.location.href = window.location.origin + '/sso/login' if (process.env.ENV = 'development') { window.location.href = 'http://localhost:8080/login' } else if (process.env.ENV = 'production') { window.location.href = window.location.origin + '/sso/login' } // next({ path: '/' }) }) }) @@ -48,8 +57,11 @@ // 在免登录白名单,直接进入 next() } else { // next(`/login?redirect=${encodeURIComponent(to.fullPath)}`) // 否则全部重定向到登录页 window.location.href = window.location.origin + '/sso/login' if (process.env.ENV = 'development') { window.location.href = 'http://localhost:8080/login' } else if (process.env.ENV = 'production') { window.location.href = window.location.origin + '/sso/login' } NProgress.done() } } se-ui/src/utils/request.js
@@ -68,46 +68,50 @@ } return config }, error => { console.log(error) Promise.reject(error) console.log(error) Promise.reject(error) }) // 响应拦截器 service.interceptors.response.use(res => { // 未设置状态码则默认成功状态 const code = res.data.code || 200; // 获取错误信息 const msg = errorCode[code] || res.data.msg || errorCode['default'] // 二进制数据则直接返回 if (res.request.responseType === 'blob' || res.request.responseType === 'arraybuffer') { return res.data } if (code === 401) { if (!isRelogin.show) { isRelogin.show = true; MessageBox.confirm('登录状态已过期,您可以继续留在该页面,或者重新登录', '系统提示', { confirmButtonText: '重新登录', cancelButtonText: '取消', type: 'warning' }).then(() => { isRelogin.show = false; store.dispatch('LogOut').then(() => { location.href = '/index'; }) // 未设置状态码则默认成功状态 const code = res.data.code || 200; // 获取错误信息 const msg = errorCode[code] || res.data.msg || errorCode['default'] // 二进制数据则直接返回 if (res.request.responseType === 'blob' || res.request.responseType === 'arraybuffer') { return res.data } if (code === 401) { if (!isRelogin.show) { isRelogin.show = true; MessageBox.confirm('登录状态已过期,您可以继续留在该页面,或者重新登录', '系统提示', { confirmButtonText: '重新登录', cancelButtonText: '取消', type: 'warning' }).then(() => { isRelogin.show = false; store.dispatch('LogOut').then(() => { if ((process.env.ENV = "development")) { window.location.href = "http://localhost:8080/login"; } else if ((process.env.ENV = "production")) { window.location.href = window.location.origin + "/sso/login"; } }) }).catch(() => { isRelogin.show = false; }); } return Promise.reject('无效的会话,或者会话已过期,请重新登录。') } else if (code === 500) { Message({ message: msg, type: 'error' }) return Promise.reject(new Error(msg)) } else if (code === 601) { Message({ message: msg, type: 'warning' }) return Promise.reject('error') } else if (code !== 200) { Notification.error({ title: msg }) return Promise.reject('error') } else { return res.data } }, return Promise.reject('无效的会话,或者会话已过期,请重新登录。') } else if (code === 500) { Message({ message: msg, type: 'error' }) return Promise.reject(new Error(msg)) } else if (code === 601) { Message({ message: msg, type: 'warning' }) return Promise.reject('error') } else if (code !== 200) { Notification.error({ title: msg }) return Promise.reject('error') } else { return res.data } }, error => { console.log('err' + error) let { message } = error; se-ui/src/views/login.vue
@@ -57,8 +57,8 @@ return { codeUrl: "", loginForm: { username: "admin", password: "admin123", username: "", password: "", rememberMe: false, code: "", uuid: "" @@ -89,7 +89,7 @@ } }, created() { // this.getCode(); this.getCode(); this.getCookie(); }, methods: { se-ui/src/views/system/role/index.vue
@@ -1,5 +1,5 @@ <template> <div class="app-container"> <div :style="styleObject" class="app-container"> <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch"> <el-form-item label="角色名称" prop="roleName"> <el-input @@ -166,16 +166,20 @@ /> <!-- 添加或修改角色配置对话框 --> <!-- :wrapperClosable="false" 点击遮罩层是否可以关闭 Drawer--> <el-drawer title="信息修改" :visible.sync="open" direction="rtl" custom-class="demo-drawer" size="500px" ref="drawer" append-to-body :modal="false" :before-close="cancel" > <div class="demo-drawer__content"> <el-form ref="form" :model="form" :rules="rules" label-width="100px"> <el-form ref="form" :model="form" :rules="rules" label-width="120px"> <el-form-item label="角色名称" prop="roleName"> <el-input v-model="form.roleName" placeholder="请输入角色名称" /> </el-form-item> @@ -231,12 +235,12 @@ </el-form-item> </el-form> <div class="demo-drawer__footer"> <!-- <el-button >取 消</el-button> <el-button @click="cancel">取 消</el-button> <el-button type="primary" @click="$refs.drawer.closeDrawer()" @click="submitForm" :loading="loading" >{{ loading ? '提交中 ...' : '确 定' }}</el-button>--> >{{ loading ? '提交中 ...' : '确 定' }}</el-button> </div> </div> </el-drawer> @@ -341,7 +345,18 @@ </el-dialog> </div> </template> <style scoped> .demo-drawer__footer { width: 100%; position: absolute; bottom: 0; left: 0; border-top: 1px solid #e8e8e8; padding: 10px 16px; text-align: right; background-color: bfa; } </style> <script> import { listRole, @@ -424,6 +439,7 @@ roleKey: undefined, status: undefined }, styleObject: {}, // 表单参数 form: {}, defaultProps: { @@ -517,6 +533,7 @@ // 取消按钮 cancel() { this.open = false; this.styleObject = { width: "100%" }; this.reset(); }, // 取消按钮(数据权限) @@ -619,6 +636,7 @@ this.reset(); this.getMenuTreeselect(); this.open = true; this.title = "添加角色"; }, /** 修改按钮操作 */ @@ -629,6 +647,7 @@ getRole(roleId).then(response => { this.form = response.data; this.open = true; this.styleObject = { width: "70%" }; this.$nextTick(() => { roleMenu.then(res => { let checkedKeys = res.checkedKeys; @@ -677,6 +696,7 @@ updateRole(this.form).then(response => { this.$modal.msgSuccess("修改成功"); this.open = false; this.styleObject = { width: "100%" }; this.getList(); }); } else { @@ -684,6 +704,7 @@ addRole(this.form).then(response => { this.$modal.msgSuccess("新增成功"); this.open = false; this.styleObject = { width: "100%" }; this.getList(); }); } se-ui/src/views/system/user/profile/index.vue
@@ -20,6 +20,12 @@ <div class="pull-right">{{ user.phonenumber }}</div> </li> <li class="list-group-item"> <svg-icon icon-class="phone" />密级 <div class="pull-right" >{{selectDictLabel(dict.type.sys_secret_level, user.secretLevel)}}</div> </li> <li class="list-group-item"> <svg-icon icon-class="email" />用户邮箱 <div class="pull-right">{{ user.email }}</div> </li> @@ -67,6 +73,7 @@ export default { name: "Profile", components: { userAvatar, userInfo, resetPwd }, dicts: ["sys_secret_level"], data() { return { user: {}, se-ui/vue.config.js
@@ -34,7 +34,8 @@ proxy: { // detail: https://cli.vuejs.org/config/#devserver-proxy [process.env.VUE_APP_BASE_API]: { target: `http://192.168.11.203:8090`, target: `http://localhost:8080`, //target: `http://192.168.11.203:8090`, changeOrigin: true, pathRewrite: { ['^' + process.env.VUE_APP_BASE_API]: process.env.VUE_APP_BASE_API