|
@@ -8,7 +8,7 @@
|
|
|
:visible-arrow="false"
|
|
:visible-arrow="false"
|
|
|
trigger="click">
|
|
trigger="click">
|
|
|
<div class="corp-switch">
|
|
<div class="corp-switch">
|
|
|
- <div class="current-corp">sunny</div>
|
|
|
|
|
|
|
+ <div class="current-corp">{{ tenantName }}</div>
|
|
|
<el-button type="text" style="color: #00B899;" @click="showProcessInstance()">
|
|
<el-button type="text" style="color: #00B899;" @click="showProcessInstance()">
|
|
|
<i class="el-icon-s-operation"></i>
|
|
<i class="el-icon-s-operation"></i>
|
|
|
切换企业/团队
|
|
切换企业/团队
|
|
@@ -43,8 +43,8 @@
|
|
|
</template>
|
|
</template>
|
|
|
<el-dropdown class="avatar-container right-menu-item hover-effect" trigger="click">
|
|
<el-dropdown class="avatar-container right-menu-item hover-effect" trigger="click">
|
|
|
<div class="avatar-wrapper">
|
|
<div class="avatar-wrapper">
|
|
|
- <!-- <img :src="avatar" class="user-avatar"> -->
|
|
|
|
|
- <img src="https://static-legacy.dingtalk.com/media/lQLPD4bTZ9hFfEHNAl_NAl-wu2M_jTTO8eEGNqKVr0MUAA_607_607.png" class="user-avatar">
|
|
|
|
|
|
|
+ <img :src="avatar" class="user-avatar">
|
|
|
|
|
+ <!-- <img src="https://static-legacy.dingtalk.com/media/lQLPD4bTZ9hFfEHNAl_NAl-wu2M_jTTO8eEGNqKVr0MUAA_607_607.png" class="user-avatar"> -->
|
|
|
<span v-if="nickname" class="user-nickname">{{ nickname }}</span>
|
|
<span v-if="nickname" class="user-nickname">{{ nickname }}</span>
|
|
|
<!-- <i class="el-icon-caret-bottom" /> -->
|
|
<!-- <i class="el-icon-caret-bottom" /> -->
|
|
|
</div>
|
|
</div>
|
|
@@ -52,7 +52,7 @@
|
|
|
<router-link to="/user/profile">
|
|
<router-link to="/user/profile">
|
|
|
<el-dropdown-item>个人中心</el-dropdown-item>
|
|
<el-dropdown-item>个人中心</el-dropdown-item>
|
|
|
</router-link>
|
|
</router-link>
|
|
|
- <el-dropdown-item @click.native="setting = true">
|
|
|
|
|
|
|
+ <el-dropdown-item @click.native="companySetting('/system/companyInfo')">
|
|
|
<span>企业管理</span>
|
|
<span>企业管理</span>
|
|
|
</el-dropdown-item>
|
|
</el-dropdown-item>
|
|
|
<el-dropdown-item divided @click.native="logout">
|
|
<el-dropdown-item divided @click.native="logout">
|
|
@@ -100,7 +100,8 @@ export default {
|
|
|
'sidebar',
|
|
'sidebar',
|
|
|
'avatar',
|
|
'avatar',
|
|
|
'nickname',
|
|
'nickname',
|
|
|
- 'device'
|
|
|
|
|
|
|
+ 'device',
|
|
|
|
|
+ 'tenantName'
|
|
|
]),
|
|
]),
|
|
|
setting: {
|
|
setting: {
|
|
|
get() {
|
|
get() {
|
|
@@ -129,6 +130,113 @@ export default {
|
|
|
toggleSideBar() {
|
|
toggleSideBar() {
|
|
|
this.$store.dispatch('app/toggleSideBar')
|
|
this.$store.dispatch('app/toggleSideBar')
|
|
|
},
|
|
},
|
|
|
|
|
+ async companySetting(item){
|
|
|
|
|
+ let key = item;
|
|
|
|
|
+ const menus = [
|
|
|
|
|
+ {
|
|
|
|
|
+ "id": 1,
|
|
|
|
|
+ "parentId": 0,
|
|
|
|
|
+ "name": "企业管理",
|
|
|
|
|
+ "path": "/system",
|
|
|
|
|
+ "component": null,
|
|
|
|
|
+ "componentName": null,
|
|
|
|
|
+ "icon": "system",
|
|
|
|
|
+ "visible": true,
|
|
|
|
|
+ "keepAlive": true,
|
|
|
|
|
+ "alwaysShow": true,
|
|
|
|
|
+ "children": [
|
|
|
|
|
+ {
|
|
|
|
|
+ "id": 109,
|
|
|
|
|
+ "parentId": 1,
|
|
|
|
|
+ "name": "企业信息",
|
|
|
|
|
+ "path": "companyInfo",
|
|
|
|
|
+ "component": "system/companyInfo/index",
|
|
|
|
|
+ "componentName": "SystemCompanyInfo",
|
|
|
|
|
+ "icon": "tree-table",
|
|
|
|
|
+ "visible": true,
|
|
|
|
|
+ "keepAlive": true,
|
|
|
|
|
+ "alwaysShow": true,
|
|
|
|
|
+ "children": null
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ "id": 102,
|
|
|
|
|
+ "parentId": 1,
|
|
|
|
|
+ "name": "菜单管理",
|
|
|
|
|
+ "path": "menu",
|
|
|
|
|
+ "component": "system/menu/index",
|
|
|
|
|
+ "componentName": "SystemMenu",
|
|
|
|
|
+ "icon": "tree-table",
|
|
|
|
|
+ "visible": true,
|
|
|
|
|
+ "keepAlive": true,
|
|
|
|
|
+ "alwaysShow": true,
|
|
|
|
|
+ "children": null
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ "id": 103,
|
|
|
|
|
+ "parentId": 1,
|
|
|
|
|
+ "name": "部门管理",
|
|
|
|
|
+ "path": "dept",
|
|
|
|
|
+ "component": "system/dept/index",
|
|
|
|
|
+ "componentName": "SystemDept",
|
|
|
|
|
+ "icon": "tree",
|
|
|
|
|
+ "visible": true,
|
|
|
|
|
+ "keepAlive": true,
|
|
|
|
|
+ "alwaysShow": true,
|
|
|
|
|
+ "children": null
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ "id": 100,
|
|
|
|
|
+ "parentId": 1,
|
|
|
|
|
+ "name": "用户管理",
|
|
|
|
|
+ "path": "user",
|
|
|
|
|
+ "component": "system/user/index",
|
|
|
|
|
+ "componentName": "SystemUser",
|
|
|
|
|
+ "icon": "user",
|
|
|
|
|
+ "visible": true,
|
|
|
|
|
+ "keepAlive": true,
|
|
|
|
|
+ "alwaysShow": true,
|
|
|
|
|
+ "children": null
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ "id": 101,
|
|
|
|
|
+ "parentId": 1,
|
|
|
|
|
+ "name": "角色管理",
|
|
|
|
|
+ "path": "role",
|
|
|
|
|
+ "component": "system/role/index",
|
|
|
|
|
+ "componentName": "SystemRole",
|
|
|
|
|
+ "icon": "peoples",
|
|
|
|
|
+ "visible": true,
|
|
|
|
|
+ "keepAlive": true,
|
|
|
|
|
+ "alwaysShow": true,
|
|
|
|
|
+ "children": null
|
|
|
|
|
+ },
|
|
|
|
|
+
|
|
|
|
|
+ {
|
|
|
|
|
+ "id": 105,
|
|
|
|
|
+ "parentId": 1,
|
|
|
|
|
+ "name": "字典管理",
|
|
|
|
|
+ "path": "dict",
|
|
|
|
|
+ "component": "system/dict/index",
|
|
|
|
|
+ "componentName": "SystemDictType",
|
|
|
|
|
+ "icon": "dict",
|
|
|
|
|
+ "visible": true,
|
|
|
|
|
+ "keepAlive": true,
|
|
|
|
|
+ "alwaysShow": true,
|
|
|
|
|
+ "children": null
|
|
|
|
|
+ }
|
|
|
|
|
+ ]
|
|
|
|
|
+ }
|
|
|
|
|
+ ]
|
|
|
|
|
+ localStorage.setItem("menus", JSON.stringify(menus))
|
|
|
|
|
+ this.$store.dispatch('GenerateRoutes', menus).then(accessRoutes => {
|
|
|
|
|
+ console.log(accessRoutes);
|
|
|
|
|
+ // 根据 roles 权限生成可访问的路由表
|
|
|
|
|
+ router.addRoutes(accessRoutes) // 动态添加可访问路由表
|
|
|
|
|
+ })
|
|
|
|
|
+ setTimeout(() => {
|
|
|
|
|
+ this.$router.push({ path: key });
|
|
|
|
|
+ }, 200);
|
|
|
|
|
+ },
|
|
|
async logout() {
|
|
async logout() {
|
|
|
this.$modal.confirm('确定注销并退出系统吗?', '提示').then(() => {
|
|
this.$modal.confirm('确定注销并退出系统吗?', '提示').then(() => {
|
|
|
this.$store.dispatch('LogOut').then(() => {
|
|
this.$store.dispatch('LogOut').then(() => {
|