mirror of
https://gitee.com/ZhongBangKeJi/crmeb_java.git
synced 2026-04-23 12:08:33 +08:00
12.31开源admin代码更新
This commit is contained in:
@@ -27,13 +27,13 @@ export default {
|
||||
{
|
||||
title: '社区',
|
||||
key: '2',
|
||||
href: 'http://bbs.crmeb.net',
|
||||
href: 'https://q.crmeb.net/?categoryId=122&sequence=0',
|
||||
blankTarget: true
|
||||
},
|
||||
{
|
||||
title: '文档',
|
||||
key: '3',
|
||||
href: 'https://help.crmeb.net',
|
||||
href: 'https://help.crmeb.net/crmeb_java/1748037',
|
||||
blankTarget: true
|
||||
}
|
||||
],
|
||||
@@ -70,7 +70,7 @@ export default {
|
||||
}
|
||||
|
||||
.fixed-header+.app-main {
|
||||
padding-top: 95px;
|
||||
padding-top: 50px;
|
||||
}
|
||||
|
||||
.hasTagsView {
|
||||
@@ -82,7 +82,7 @@ export default {
|
||||
}
|
||||
|
||||
.fixed-header+.app-main {
|
||||
padding-top: 95px;
|
||||
padding-top: 80px;
|
||||
}
|
||||
}
|
||||
.el-popup-parent--hidden {
|
||||
|
||||
@@ -1,44 +1,31 @@
|
||||
<template>
|
||||
<div class="navbar">
|
||||
<hamburger id="hamburger-container" :is-active="sidebar.opened" class="hamburger-container" @toggleClick="toggleSideBar" />
|
||||
|
||||
<breadcrumb id="breadcrumb-container" class="breadcrumb-container" />
|
||||
|
||||
<hamburger
|
||||
id="hamburger-container"
|
||||
:is-active="sidebar.opened"
|
||||
class="hamburger-container"
|
||||
@toggleClick="toggleSideBar"
|
||||
/>
|
||||
<breadcrumb id="breadcrumb-container" class="breadcrumb-container"/>
|
||||
<div class="right-menu">
|
||||
<template v-if="device!=='mobile'">
|
||||
<template v-if="device !== 'mobile'">
|
||||
<search id="header-search" class="right-menu-item" />
|
||||
|
||||
<error-log class="errLog-container right-menu-item hover-effect" />
|
||||
|
||||
<screenfull id="screenfull" class="right-menu-item hover-effect" />
|
||||
|
||||
</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">
|
||||
{{JavaInfo.account}}<i class="el-icon-arrow-down el-icon--right"></i>
|
||||
<!--<img :src="avatar+'?imageView2/1/w/80/h/80'" class="user-avatar">-->
|
||||
<!--<i class="el-icon-caret-bottom" />-->
|
||||
{{ JavaInfo.realName}}<i class="el-icon-arrow-down el-icon--right"></i>
|
||||
</div>
|
||||
<el-dropdown-menu slot="dropdown">
|
||||
<!-- <router-link to="/profile/index">-->
|
||||
<!-- <el-dropdown-item>Profile</el-dropdown-item>-->
|
||||
<!-- </router-link>-->
|
||||
<router-link to="/">
|
||||
<el-dropdown-item>主页</el-dropdown-item>
|
||||
</router-link>
|
||||
<router-link :to=" { path: '/maintain/user' } " v-if="!isPhone">
|
||||
<router-link :to="{ path: '/maintain/user' }" v-if="!isPhone">
|
||||
<el-dropdown-item>个人中心</el-dropdown-item>
|
||||
</router-link>
|
||||
<!--<el-dropdown-item @click.native="onUnbundling">解绑账号</el-dropdown-item>-->
|
||||
<!-- <a target="_blank" href="https://github.com/PanJiaChen/vue-element-admin/">-->
|
||||
<!-- <el-dropdown-item>Github</el-dropdown-item>-->
|
||||
<!-- </a>-->
|
||||
<!-- <a target="_blank" href="https://panjiachen.github.io/vue-element-admin-site/#/">-->
|
||||
<!-- <el-dropdown-item>Docs</el-dropdown-item>-->
|
||||
<!-- </a>-->
|
||||
<el-dropdown-item divided @click.native="logout">
|
||||
<span style="display:block;">退出</span>
|
||||
<el-dropdown-item @click.native="logout">
|
||||
<span>退出</span>
|
||||
</el-dropdown-item>
|
||||
</el-dropdown-menu>
|
||||
</el-dropdown>
|
||||
@@ -47,52 +34,51 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex'
|
||||
import Breadcrumb from '@/components/Breadcrumb'
|
||||
import Hamburger from '@/components/Hamburger'
|
||||
import ErrorLog from '@/components/ErrorLog'
|
||||
import Screenfull from '@/components/Screenfull'
|
||||
import Search from '@/components/HeaderSearch'
|
||||
import { unbindApi } from '@/api/wxApi'
|
||||
import Cookies from 'js-cookie'
|
||||
import { mapGetters } from "vuex";
|
||||
import Breadcrumb from "@/components/Breadcrumb";
|
||||
import Hamburger from "@/components/Hamburger";
|
||||
import Screenfull from "@/components/Screenfull";
|
||||
import Search from "@/components/HeaderSearch";
|
||||
import { unbindApi } from "@/api/wxApi";
|
||||
import Cookies from "js-cookie";
|
||||
export default {
|
||||
components: {
|
||||
Breadcrumb,
|
||||
Hamburger,
|
||||
ErrorLog,
|
||||
Screenfull,
|
||||
Search
|
||||
Search,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
isPhone: this.$wechat.isPhone(),
|
||||
JavaInfo: JSON.parse(Cookies.get('JavaInfo')),
|
||||
JavaInfo: JSON.parse(Cookies.get("JavaInfo")),
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
show(value) {
|
||||
if (value && !this.clickNotClose) {
|
||||
this.addEventClick()
|
||||
}
|
||||
if (value) {
|
||||
addClass(document.body, 'showRightPanel')
|
||||
} else {
|
||||
removeClass(document.body, 'showRightPanel')
|
||||
}
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapGetters([
|
||||
'sidebar',
|
||||
'avatar',
|
||||
'device'
|
||||
])
|
||||
...mapGetters(["sidebar", "avatar", "device"]),
|
||||
},
|
||||
methods: {
|
||||
onUnbundling() {
|
||||
this.$modalSure('解绑微信吗').then(() => {
|
||||
unbindApi().then(() => {
|
||||
this.$message.success('解绑成功')
|
||||
})
|
||||
})
|
||||
},
|
||||
toggleSideBar() {
|
||||
this.$store.dispatch('app/toggleSideBar')
|
||||
this.$store.dispatch("app/toggleSideBar");
|
||||
},
|
||||
async logout() {
|
||||
await this.$store.dispatch('user/logout')
|
||||
this.$router.push(`/login?redirect=${this.$route.fullPath}`)
|
||||
}
|
||||
}
|
||||
}
|
||||
await this.$store.dispatch("user/logout");
|
||||
this.$router.push(`/login?redirect=${this.$route.fullPath}`);
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@@ -101,18 +87,18 @@ export default {
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
background: #fff;
|
||||
box-shadow: 0 1px 4px rgba(0,21,41,.08);
|
||||
// box-shadow: 0 1px 4px rgba(0, 21, 41, 0.08);
|
||||
|
||||
.hamburger-container {
|
||||
line-height: 46px;
|
||||
height: 100%;
|
||||
float: left;
|
||||
cursor: pointer;
|
||||
transition: background .3s;
|
||||
-webkit-tap-highlight-color:transparent;
|
||||
transition: background 0.3s;
|
||||
-webkit-tap-highlight-color: transparent;
|
||||
|
||||
&:hover {
|
||||
background: rgba(0, 0, 0, .025)
|
||||
background: rgba(0, 0, 0, 0.025);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -120,6 +106,11 @@ export default {
|
||||
float: left;
|
||||
}
|
||||
|
||||
.topmenu-container {
|
||||
position: absolute;
|
||||
left: 50px;
|
||||
}
|
||||
|
||||
.errLog-container {
|
||||
display: inline-block;
|
||||
vertical-align: top;
|
||||
@@ -144,10 +135,10 @@ export default {
|
||||
|
||||
&.hover-effect {
|
||||
cursor: pointer;
|
||||
transition: background .3s;
|
||||
transition: background 0.3s;
|
||||
|
||||
&:hover {
|
||||
background: rgba(0, 0, 0, .025)
|
||||
background: rgba(0, 0, 0, 0.025);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,28 +1,35 @@
|
||||
<template>
|
||||
<div class="drawer-container">
|
||||
<div>
|
||||
<h3 class="drawer-title">Page style setting</h3>
|
||||
|
||||
<h3 class="drawer-title">主题风格设置</h3>
|
||||
<div class="drawer-item">
|
||||
<span>Theme Color</span>
|
||||
<span>主题颜色</span>
|
||||
<theme-picker style="float: right;height: 26px;margin: -3px 8px 0 0;" @change="themeChange" />
|
||||
<div class="drawer-item" v-if="topNav">
|
||||
<span>开启 Icon</span>
|
||||
<el-switch v-model="navIcon" class="drawer-switch" />
|
||||
</div>
|
||||
|
||||
<div class="drawer-item">
|
||||
<span>Open Tags-View</span>
|
||||
<span>开启 Tags-Views</span>
|
||||
<el-switch v-model="tagsView" class="drawer-switch" />
|
||||
</div>
|
||||
|
||||
<div class="drawer-item">
|
||||
<span>Fixed Header</span>
|
||||
<span>固定 Header</span>
|
||||
<el-switch v-model="fixedHeader" class="drawer-switch" />
|
||||
</div>
|
||||
|
||||
<div class="drawer-item">
|
||||
<span>Sidebar Logo</span>
|
||||
<span>显示 Logo</span>
|
||||
<el-switch v-model="sidebarLogo" class="drawer-switch" />
|
||||
</div>
|
||||
|
||||
<el-divider/>
|
||||
<el-button size="small" type="primary" plain icon="el-icon-document-add" @click="saveSetting">保存配置</el-button>
|
||||
<el-button size="small" plain icon="el-icon-refresh" @click="resetSetting">重置配置</el-button>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@@ -33,9 +40,17 @@ import ThemePicker from '@/components/ThemePicker'
|
||||
export default {
|
||||
components: { ThemePicker },
|
||||
data() {
|
||||
return {}
|
||||
return {
|
||||
sideTheme: this.$store.state.settings.sideTheme,
|
||||
routers:this.$store.state.permission.routes,
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
theme:{
|
||||
get(){
|
||||
return this.$store.state.settings.theme
|
||||
}
|
||||
},
|
||||
fixedHeader: {
|
||||
get() {
|
||||
return this.$store.state.settings.fixedHeader
|
||||
@@ -76,12 +91,44 @@ export default {
|
||||
key: 'theme',
|
||||
value: val
|
||||
})
|
||||
},
|
||||
handleTheme(val) {
|
||||
this.$store.dispatch('settings/changeSetting', {
|
||||
key: 'sideTheme',
|
||||
value: val
|
||||
})
|
||||
this.sideTheme = val;
|
||||
},
|
||||
saveSetting() {
|
||||
this.$modal.loading("正在保存到本地,请稍候...");
|
||||
//将设置写入缓存
|
||||
this.$cache.local.setJSON(
|
||||
'layout-setting',{
|
||||
"topNav":this.topNav,
|
||||
"tagsView":this.tagsView,
|
||||
"fixedHeader":this.fixedHeader,
|
||||
"sidebarLogo":this.sidebarLogo,
|
||||
"dynamicTitle":this.dynamicTitle,
|
||||
"sideTheme":this.sideTheme,
|
||||
"theme":this.theme,
|
||||
"navIcon":this.navIcon
|
||||
}
|
||||
);
|
||||
setTimeout(this.$modal.closeLoading(), 1000)
|
||||
},
|
||||
resetSetting() {
|
||||
this.$modal.loading("正在清除设置缓存并刷新,请稍候...");
|
||||
this.$cache.local.remove("layout-setting")
|
||||
setTimeout("window.location.reload()", 1000)
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
/deep/ .el-switch{
|
||||
width: 40px;
|
||||
}
|
||||
.drawer-container {
|
||||
padding: 24px;
|
||||
font-size: 14px;
|
||||
@@ -104,5 +151,38 @@ export default {
|
||||
.drawer-switch {
|
||||
float: right
|
||||
}
|
||||
.setting-drawer-block-checbox {
|
||||
display: flex;
|
||||
justify-content: flex-start;
|
||||
align-items: center;
|
||||
margin-top: 10px;
|
||||
margin-bottom: 20px;
|
||||
|
||||
.setting-drawer-block-checbox-item {
|
||||
position: relative;
|
||||
margin-right: 16px;
|
||||
border-radius: 2px;
|
||||
cursor: pointer;
|
||||
|
||||
img {
|
||||
width: 48px;
|
||||
height: 48px;
|
||||
}
|
||||
|
||||
.setting-drawer-block-checbox-selectIcon {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
padding-top: 15px;
|
||||
padding-left: 24px;
|
||||
color: #1890ff;
|
||||
font-weight: 700;
|
||||
font-size: 14px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
@@ -18,7 +18,7 @@ export default {
|
||||
|
||||
if (icon) {
|
||||
const ic = 'el-icon-' + icon
|
||||
vnodes.push(<i class={ic}/>)
|
||||
vnodes.push(<i style="color:#ffffff;" class={ic}/>)
|
||||
}
|
||||
|
||||
if (title) {
|
||||
|
||||
@@ -1,35 +1,35 @@
|
||||
<template>
|
||||
<div :class="{'has-logo':showLogo}">
|
||||
<div :class="{'has-logo':showLogo}" :style="{ backgroundColor: variables.menuBackground }">
|
||||
<logo v-if="showLogo" :collapse="isCollapse" />
|
||||
<div>hello</div>
|
||||
{{permission_routes}}
|
||||
<el-scrollbar wrap-class="scrollbar-wrapper">
|
||||
<el-menu
|
||||
:default-active="activeMenu"
|
||||
:collapse="isCollapse"
|
||||
:background-color="variables.menuBg"
|
||||
:text-color="variables.menuText"
|
||||
:background-color="variables.menuBackground"
|
||||
:text-color=" variables.menuColor"
|
||||
:unique-opened="true"
|
||||
:active-text-color="variables.menuActiveText"
|
||||
:collapse-transition="false"
|
||||
:collapse-transition="true"
|
||||
mode="vertical"
|
||||
>
|
||||
<sidebar-item v-for="route in permission_routes" :key="route.url" :item="route" :base-path="route.url" />
|
||||
<sidebar-item v-for="route in sidebarRouters" :key="route.url" :item="route" :base-path="route.url" />
|
||||
</el-menu>
|
||||
</el-scrollbar>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex'
|
||||
import { mapGetters,mapState } from 'vuex'
|
||||
import Logo from './Logo'
|
||||
import SidebarItem from './SidebarItem'
|
||||
import variables from '@/styles/variables.scss'
|
||||
export default {
|
||||
components: { SidebarItem, Logo },
|
||||
computed: {
|
||||
...mapState(["settings"]),
|
||||
...mapGetters([
|
||||
'permission_routes',
|
||||
'sidebarRouters',
|
||||
'sidebar'
|
||||
]),
|
||||
activeMenu() {
|
||||
@@ -50,6 +50,12 @@ export default {
|
||||
isCollapse() {
|
||||
return !this.sidebar.opened
|
||||
}
|
||||
}
|
||||
},
|
||||
}
|
||||
</script>
|
||||
<style lang="scss">
|
||||
.el-submenu__icon-arrow{
|
||||
color: #fff !important;
|
||||
}
|
||||
</style>
|
||||
|
||||
|
||||
@@ -48,7 +48,10 @@ export default {
|
||||
},
|
||||
routes() {
|
||||
return this.$store.state.permission.routes
|
||||
}
|
||||
},
|
||||
theme() {
|
||||
return this.$store.state.settings.theme;
|
||||
},
|
||||
},
|
||||
watch: {
|
||||
$route() {
|
||||
@@ -202,11 +205,12 @@ export default {
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.tags-view-container {
|
||||
padding: 6px 0;
|
||||
padding: 10px 0;
|
||||
width: 100%;
|
||||
background: #f5f7f9;
|
||||
border-bottom: 1px solid #d8dce5;
|
||||
box-shadow: 0 1px 3px 0 rgba(0, 0, 0, .12), 0 0 3px 0 rgba(0, 0, 0, .04);
|
||||
// background: #f5f7f9;
|
||||
background: #f5f5f5;
|
||||
// border-bottom: 1px solid #d8dce5;
|
||||
// box-shadow: 0 1px 3px 0 rgba(0, 0, 0, .12), 0 0 3px 0 rgba(0, 0, 0, .04);
|
||||
.tags-view-wrapper {
|
||||
.tags-view-item {
|
||||
display: inline-block;
|
||||
@@ -219,27 +223,28 @@ export default {
|
||||
background: #fff;
|
||||
padding: 0 8px;
|
||||
font-size: 12px;
|
||||
margin-left: 5px;
|
||||
margin-left: 10px;
|
||||
border-radius: 3px;
|
||||
&:first-of-type {
|
||||
margin-left: 15px;
|
||||
margin-left: 20px;
|
||||
}
|
||||
&:last-of-type {
|
||||
margin-right: 15px;
|
||||
margin-right: 20px;
|
||||
}
|
||||
&.active {
|
||||
background-color: #fff;
|
||||
color: #498ff7;
|
||||
color: #1890FF;
|
||||
border-color: #fff;
|
||||
&::before {
|
||||
content: '';
|
||||
background: #fff;
|
||||
display: inline-block;
|
||||
width: 8px;
|
||||
height: 8px;
|
||||
border-radius: 50%;
|
||||
position: relative;
|
||||
margin-right: 2px;
|
||||
}
|
||||
// &::before {
|
||||
// content: '';
|
||||
// background: #fff;
|
||||
// display: inline-block;
|
||||
// width: 8px;
|
||||
// height: 8px;
|
||||
// border-radius: 50%;
|
||||
// position: relative;
|
||||
// margin-right: 2px;
|
||||
// }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
<settings />
|
||||
</right-panel>
|
||||
</div>
|
||||
<div class="open-image" @click="clear" v-if="openImage"><img src="@/assets/imgs/pc1.jpg" alt=""></div>
|
||||
<div class="open-image" @click="clear" v-if="openImage"><img src="@/assets/imgs/pc1.png" alt=""></div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -108,7 +108,7 @@ export default {
|
||||
top: 0;
|
||||
right: 0;
|
||||
z-index: 9;
|
||||
width: calc(100% - #{$sideBarWidth});
|
||||
width: calc(100% - #{$base-sidebar-width});
|
||||
transition: width 0.28s;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,3 +1,13 @@
|
||||
// +----------------------------------------------------------------------
|
||||
// | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
|
||||
// +----------------------------------------------------------------------
|
||||
// | Copyright (c) 2016~2021 https://www.crmeb.com All rights reserved.
|
||||
// +----------------------------------------------------------------------
|
||||
// | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
|
||||
// +----------------------------------------------------------------------
|
||||
// | Author: CRMEB Team <admin@crmeb.com>
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
import store from '@/store'
|
||||
|
||||
const { body } = document
|
||||
|
||||
Reference in New Issue
Block a user