diff --git a/alias.config.js b/alias.config.js new file mode 100644 index 000000000..edacee507 --- /dev/null +++ b/alias.config.js @@ -0,0 +1,14 @@ +/** + * 由于 Vue CLI 3 不再使用传统的 webpack 配置文件,故 WebStorm 无法识别别名 + * 本文件对项目无任何作用,仅作为 WebStorm 识别别名用 + * 进入 WebStorm preferences -> Language & Framework -> JavaScript -> Webpack,选择这个文件即可 + * */ +const resolve = dir => require('path').join(__dirname, dir); + +module.exports = { + resolve: { + alias: { + '@': resolve('src') + } + } +}; diff --git a/src/assets/img/logo-text.png b/src/assets/img/logo-text.png index 7471c24d5..8d741116c 100644 Binary files a/src/assets/img/logo-text.png and b/src/assets/img/logo-text.png differ diff --git a/src/components/Hamburger/index.vue b/src/components/Hamburger/index.vue index 56c433803..69cef432f 100644 --- a/src/components/Hamburger/index.vue +++ b/src/components/Hamburger/index.vue @@ -1,7 +1,7 @@ diff --git a/src/i18n/langs/cn.js b/src/i18n/langs/cn.js index a9cef3132..f2a311e86 100644 --- a/src/i18n/langs/cn.js +++ b/src/i18n/langs/cn.js @@ -25,6 +25,7 @@ const cn = { 'Users': '用户管理', 'UserList': '用户列表', 'UserGroupList': '用户组', + 'UserGroupDetail': '用户组详情', 'Assets': '资产管理', 'AssetList': '资产列表', 'DomainList': '网关列表', diff --git a/src/layout/components/BackPlayground.vue b/src/layout/components/BackPlayground.vue index 091dae5f2..612f116ab 100644 --- a/src/layout/components/BackPlayground.vue +++ b/src/layout/components/BackPlayground.vue @@ -1,12 +1,30 @@ diff --git a/src/layout/components/IBox.vue b/src/layout/components/IBox.vue new file mode 100644 index 000000000..4afd3b0ab --- /dev/null +++ b/src/layout/components/IBox.vue @@ -0,0 +1,85 @@ + + + + + diff --git a/src/layout/components/Sidebar/Organization.vue b/src/layout/components/Sidebar/Organization.vue index ca1b22afb..9ccd86cf2 100644 --- a/src/layout/components/Sidebar/Organization.vue +++ b/src/layout/components/Sidebar/Organization.vue @@ -1,16 +1,25 @@ @@ -25,17 +34,15 @@ export default { }, computed: { ...mapGetters([ - 'currentorg', - 'orglist' + 'currentOrg', + 'userAdminOrgList' ]) }, methods: { - changeOrg(x, y) { - console.log(x, y) - + changeOrg(orgId) { + console.log('Change to org: ', orgId) this.$store.dispatch('user/setCurrentOrg', { - name: x, - id: y + id: orgId }) } } @@ -43,27 +50,28 @@ export default { diff --git a/src/layout/components/Sidebar/index.vue b/src/layout/components/Sidebar/index.vue index 226859480..4da521d75 100644 --- a/src/layout/components/Sidebar/index.vue +++ b/src/layout/components/Sidebar/index.vue @@ -1,6 +1,9 @@ + + + + diff --git a/src/layout/components/index.js b/src/layout/components/index.js index e686427f2..8e917f548 100644 --- a/src/layout/components/index.js +++ b/src/layout/components/index.js @@ -5,3 +5,5 @@ export { default as BackPlayground } from './BackPlayground' export { default as ListTables } from './ListTables' export { default as TagsView } from './TagsView' export { default as Footer } from './Footer' +export { default as WrapperContent } from './WrapperContent' +export { default as IBox } from './IBox' diff --git a/src/layout/index.vue b/src/layout/index.vue index 6c010dfcb..30c05e00a 100644 --- a/src/layout/index.vue +++ b/src/layout/index.vue @@ -38,6 +38,7 @@ export default { return this.$store.state.settings.fixedHeader }, needTagsView() { + return false return this.$store.state.settings.tagsView }, classObj() { diff --git a/src/main.js b/src/main.js index f70cc2d9c..e8dc0e6f0 100644 --- a/src/main.js +++ b/src/main.js @@ -16,7 +16,6 @@ import i18n from './i18n/i18n' import '@/icons' // icon import '@/permission' // permission control - /** * If you don't want to use mock-server * you want to use MockJs for mock api @@ -43,7 +42,7 @@ import { Message, MessageBox } from 'element-ui' -import service from '@/utils/request'; +import service from '@/utils/request' import { Button, @@ -52,7 +51,7 @@ import { FormItem, Pagination, Table, - TableColumn, + TableColumn } from 'element-ui' Vue.use(Button) diff --git a/src/store/getters.js b/src/store/getters.js index b4e75234d..73d009330 100644 --- a/src/store/getters.js +++ b/src/store/getters.js @@ -5,8 +5,8 @@ const getters = { avatar: state => state.user.avatar, name: state => state.user.name, roles: state => state.user.roles, - currentorg: state => state.user.currentOrg, - orglist: state => state.user.orgs, + currentOrg: state => state.user.currentOrg, + userAdminOrgList: state => state.user.orgs, permission_routes: state => state.permission.routes, visitedViews: state => state.tagsView.visitedViews, cachedViews: state => state.tagsView.cachedViews diff --git a/src/styles/index.scss b/src/styles/index.scss index 145239e50..5af0d7822 100644 --- a/src/styles/index.scss +++ b/src/styles/index.scss @@ -10,7 +10,7 @@ body { height: 100%; -moz-osx-font-smoothing: grayscale; - -webkit-font-smoothing: auto; + //-webkit-font-smoothing: auto; text-rendering: optimizeLegibility; font-family: Helvetica Neue, Helvetica, PingFang SC, Hiragino Sans GB, Microsoft YaHei, Arial, sans-serif; } @@ -71,3 +71,14 @@ td .el-button.el-button--mini { padding: 1px 5px; line-height: 1.5; } + +.el-tabs__item.is-active, .el-tabs--border-card>.el-tabs__header .el-tabs__item.is-active { + color: #555555; +} + +.el-tabs--border-card>.el-tabs__header .el-tabs__item:not(.is-disabled):hover { + color: #555555; +} +.main-container { + background-color: #f3f3f4; +} diff --git a/src/styles/menu.scss b/src/styles/menu.scss index a23605ebc..1be8b35b7 100644 --- a/src/styles/menu.scss +++ b/src/styles/menu.scss @@ -14,7 +14,7 @@ .el-submenu .el-menu-item { height: 35px; - line-height: 35px; + line-height: 2.1; padding: 0 52px; min-width: 200px; } diff --git a/src/styles/variables.scss b/src/styles/variables.scss index 31dbdcb1b..9426fd72b 100644 --- a/src/styles/variables.scss +++ b/src/styles/variables.scss @@ -4,6 +4,7 @@ $menuActiveText: white; $menuTextWeight: 600; $subMenuActiveText: #f4f4f5; //https://github.com/ElemeFE/element/issues/12951 +//$menuBg: red; $menuBg: #2f4050; $menuHover: #293846; diff --git a/src/utils/auth.js b/src/utils/auth.js index 882065796..1c8b23d65 100644 --- a/src/utils/auth.js +++ b/src/utils/auth.js @@ -1,7 +1,7 @@ import Cookies from 'js-cookie' const TokenKey = 'csrftoken' -const CurrentOrg = 'currentorg' +const CurrentOrg = 'currentOrg' export function getToken() { return Cookies.get(TokenKey) diff --git a/src/views/users/UserGroupDetail.vue b/src/views/users/UserGroupDetail.vue index 472c5f190..9bcaf3119 100644 --- a/src/views/users/UserGroupDetail.vue +++ b/src/views/users/UserGroupDetail.vue @@ -1,21 +1,21 @@