吕天方 2 years ago
commit 3502bc547f

@ -5,7 +5,8 @@ VUE_APP_TITLE = 若依管理系统
ENV = 'development' ENV = 'development'
# 若依管理系统/开发环境 # 若依管理系统/开发环境
VUE_APP_BASE_API = 'https://vue.ruoyi.vip/prod-api' # VUE_APP_BASE_API = 'https://vue.ruoyi.vip/prod-api'
VUE_APP_BASE_API = 'http://39.101.188.84:9034'
# 路由懒加载 # 路由懒加载
VUE_CLI_BABEL_TRANSPILE_MODULES = true VUE_CLI_BABEL_TRANSPILE_MODULES = true

Binary file not shown.

After

Width:  |  Height:  |  Size: 229 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 112 KiB

@ -4,7 +4,7 @@
**/ **/
/* theme color */ /* theme color */
$--color-primary: #1890ff; $--color-primary: #f8414d;
$--color-success: #13ce66; $--color-success: #13ce66;
$--color-warning: #ffba00; $--color-warning: #ffba00;
$--color-danger: #ff4949; $--color-danger: #ff4949;
@ -20,7 +20,7 @@ $--border-color-lighter: #e6ebf5;
$--table-border: 1px solid #dfe6ec; $--table-border: 1px solid #dfe6ec;
/* icon font path, required */ /* icon font path, required */
$--font-path: '~element-ui/lib/theme-chalk/fonts'; $--font-path: "~element-ui/lib/theme-chalk/fonts";
@import "~element-ui/packages/theme-chalk/src/index"; @import "~element-ui/packages/theme-chalk/src/index";

@ -0,0 +1,8 @@
@font-face {
font-family: "Alibaba-PuHuiTi-Bold";
src: url("http://www.jichuanglanhai.com/demo/taicang-file/fonts/Alibaba-PuHuiTi-Bold.otf");
}
@font-face {
font-family: "Alibaba-PuHuiTi-Regular";
src: url("http://www.jichuanglanhai.com/demo/taicang-file/fonts/Alibaba-PuHuiTi-Regular.otf");
}

@ -1,16 +1,18 @@
@import './variables.scss'; @import "./font.css";
@import './mixin.scss'; @import "./variables.scss";
@import './transition.scss'; @import "./mixin.scss";
@import './element-ui.scss'; @import "./transition.scss";
@import './sidebar.scss'; @import "./element-ui.scss";
@import './btn.scss'; @import "./sidebar.scss";
@import "./btn.scss";
body { body {
height: 100%; height: 100%;
-moz-osx-font-smoothing: grayscale; -moz-osx-font-smoothing: grayscale;
-webkit-font-smoothing: antialiased; -webkit-font-smoothing: antialiased;
text-rendering: optimizeLegibility; text-rendering: optimizeLegibility;
font-family: Helvetica Neue, Helvetica, PingFang SC, Hiragino Sans GB, Microsoft YaHei, Arial, sans-serif; font-family: Helvetica Neue, Helvetica, PingFang SC, Hiragino Sans GB,
Microsoft YaHei, Arial, sans-serif;
} }
label { label {
@ -104,7 +106,8 @@ aside {
display: block; display: block;
line-height: 32px; line-height: 32px;
font-size: 16px; font-size: 16px;
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,
Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;
color: #2c3e50; color: #2c3e50;
-webkit-font-smoothing: antialiased; -webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale; -moz-osx-font-smoothing: grayscale;
@ -122,6 +125,12 @@ aside {
//main-container //main-container
.app-container { .app-container {
padding: 20px; padding: 20px;
height: 100%;
width: 100%;
background: #fff;
box-shadow: 0px 0px 15px 0px rgba(229, 212, 212, 0.58);
border-radius: 8px;
overflow-y: auto;
} }
.components-container { .components-container {
@ -134,7 +143,7 @@ aside {
} }
.text-center { .text-center {
text-align: center text-align: center;
} }
.sub-navbar { .sub-navbar {
@ -145,7 +154,13 @@ aside {
text-align: right; text-align: right;
padding-right: 20px; padding-right: 20px;
transition: 600ms ease position; transition: 600ms ease position;
background: linear-gradient(90deg, rgba(32, 182, 249, 1) 0%, rgba(32, 182, 249, 1) 0%, rgba(33, 120, 241, 1) 100%, rgba(33, 120, 241, 1) 100%); background: linear-gradient(
90deg,
rgba(32, 182, 249, 1) 0%,
rgba(32, 182, 249, 1) 0%,
rgba(33, 120, 241, 1) 100%,
rgba(33, 120, 241, 1) 100%
);
.subtitle { .subtitle {
font-size: 20px; font-size: 20px;

@ -1,35 +1,35 @@
#app { #app {
.main-container { .main-container {
height: 100%; height: 100%;
transition: margin-left .28s; transition: margin-left 0.28s;
margin-left: $base-sidebar-width; margin-left: $base-sidebar-width;
position: relative; position: relative;
} }
.sidebarHide { .sidebarHide {
margin-left: 0!important; margin-left: 0 !important;
} }
.sidebar-container { .sidebar-container {
-webkit-transition: width .28s; -webkit-transition: width 0.28s;
transition: width 0.28s; transition: width 0.28s;
width: $base-sidebar-width !important; width: $base-sidebar-width !important;
background-color: $base-menu-background; background-color: $base-menu-background;
height: 100%; height: 100%;
position: fixed; // position: fixed;
font-size: 0px; font-size: 0px;
top: 0; top: 0;
bottom: 0; bottom: 0;
left: 0; left: 0;
z-index: 1001; z-index: 1001;
overflow: hidden; overflow: hidden;
-webkit-box-shadow: 2px 0 6px rgba(0,21,41,.35); -webkit-box-shadow: 2px 0 6px rgba(0, 21, 41, 0.35);
box-shadow: 2px 0 6px rgba(0,21,41,.35); box-shadow: 2px 0 6px rgba(0, 21, 41, 0.35);
// reset element-ui css // reset element-ui css
.horizontal-collapse-transition { .horizontal-collapse-transition {
transition: 0s width ease-in-out, 0s padding-left ease-in-out, 0s padding-right ease-in-out; transition: 0s width ease-in-out, 0s padding-left ease-in-out,
0s padding-right ease-in-out;
} }
.scrollbar-wrapper { .scrollbar-wrapper {
@ -70,7 +70,8 @@
width: 100% !important; width: 100% !important;
} }
.el-menu-item, .el-submenu__title { .el-menu-item,
.el-submenu__title {
overflow: hidden !important; overflow: hidden !important;
text-overflow: ellipsis !important; text-overflow: ellipsis !important;
white-space: nowrap !important; white-space: nowrap !important;
@ -85,10 +86,16 @@
} }
& .theme-dark .is-active > .el-submenu__title { & .theme-dark .is-active > .el-submenu__title {
color: $base-menu-color-active !important; // color: $base-menu-color-active !important;
color: #fff !important;
background-color: #f23f4a !important;
}
& .theme-dark .is-active > .el-submenu__title i {
// color: $base-menu-color-active !important;
color: #fff !important;
} }
& .nest-menu .el-submenu>.el-submenu__title, & .nest-menu .el-submenu > .el-submenu__title,
& .el-submenu .el-menu-item { & .el-submenu .el-menu-item {
min-width: $base-sidebar-width !important; min-width: $base-sidebar-width !important;
@ -97,12 +104,15 @@
} }
} }
& .theme-dark .nest-menu .el-submenu>.el-submenu__title, & .theme-dark .nest-menu .el-submenu > .el-submenu__title,
& .theme-dark .el-submenu .el-menu-item { & .theme-dark .el-submenu .el-menu-item {
background-color: $base-sub-menu-background !important; // background-color: $base-sub-menu-background !important;
background-color: #faf7f7;
&:hover { &:hover {
background-color: $base-sub-menu-hover !important; // background-color: $base-sub-menu-hover !important;
color: #f8414d !important;
background-color: rgba(255, 72, 83, 0.2) !important;
} }
} }
} }
@ -132,20 +142,19 @@
.el-submenu { .el-submenu {
overflow: hidden; overflow: hidden;
&>.el-submenu__title { & > .el-submenu__title {
padding: 0 !important; padding: 0 !important;
.svg-icon { .svg-icon {
margin-left: 20px; margin-left: 20px;
} }
} }
} }
.el-menu--collapse { .el-menu--collapse {
.el-submenu { .el-submenu {
&>.el-submenu__title { & > .el-submenu__title {
&>span { & > span {
height: 0; height: 0;
width: 0; width: 0;
overflow: hidden; overflow: hidden;
@ -168,7 +177,7 @@
} }
.sidebar-container { .sidebar-container {
transition: transform .28s; transition: transform 0.28s;
width: $base-sidebar-width !important; width: $base-sidebar-width !important;
} }
@ -182,7 +191,6 @@
} }
.withoutAnimation { .withoutAnimation {
.main-container, .main-container,
.sidebar-container { .sidebar-container {
transition: none; transition: none;
@ -192,13 +200,13 @@
// when menu collapsed // when menu collapsed
.el-menu--vertical { .el-menu--vertical {
&>.el-menu { & > .el-menu {
.svg-icon { .svg-icon {
margin-right: 16px; margin-right: 16px;
} }
} }
.nest-menu .el-submenu>.el-submenu__title, .nest-menu .el-submenu > .el-submenu__title,
.el-menu-item { .el-menu-item {
&:hover { &:hover {
// you can use $subMenuHover // you can use $subMenuHover
@ -207,7 +215,7 @@
} }
// the scroll bar appears when the subMenu is too long // the scroll bar appears when the subMenu is too long
>.el-menu--popup { > .el-menu--popup {
max-height: 100vh; max-height: 100vh;
overflow-y: auto; overflow-y: auto;

@ -1,25 +1,25 @@
// base color // base color
$blue:#324157; $blue: #324157;
$light-blue:#3A71A8; $light-blue: #3a71a8;
$red:#C03639; $red: #c03639;
$pink: #E65D6E; $pink: #e65d6e;
$green: #30B08F; $green: #30b08f;
$tiffany: #4AB7BD; $tiffany: #4ab7bd;
$yellow:#FEC171; $yellow: #fec171;
$panGreen: #30B08F; $panGreen: #30b08f;
// //
$base-menu-color:#bfcbd9; $base-menu-color: #4c4949;
$base-menu-color-active:#f4f4f5; $base-menu-color-active: #f4f4f5;
$base-menu-background:#304156; $base-menu-background: #304156;
$base-logo-title-color: #ffffff; $base-logo-title-color: #ffffff;
$base-menu-light-color:rgba(0,0,0,.70); $base-menu-light-color: rgba(0, 0, 0, 0.7);
$base-menu-light-background:#ffffff; $base-menu-light-background: #ffffff;
$base-logo-light-title-color: #001529; $base-logo-light-title-color: #001529;
$base-sub-menu-background:#1f2d3d; $base-sub-menu-background: #1f2d3d;
$base-sub-menu-hover:#001528; $base-sub-menu-hover: #001528;
// //
/** /**
@ -50,5 +50,5 @@ $base-sidebar-width: 200px;
subMenuHover: $base-sub-menu-hover; subMenuHover: $base-sub-menu-hover;
sideBarWidth: $base-sidebar-width; sideBarWidth: $base-sidebar-width;
logoTitleColor: $base-logo-title-color; logoTitleColor: $base-logo-title-color;
logoLightTitleColor: $base-logo-light-title-color logoLightTitleColor: $base-logo-light-title-color;
} }

@ -10,26 +10,27 @@
</template> </template>
<script> <script>
import iframeToggle from "./IframeToggle/index" import iframeToggle from "./IframeToggle/index";
export default { export default {
name: 'AppMain', name: "AppMain",
components: { iframeToggle }, components: { iframeToggle },
computed: { computed: {
cachedViews() { cachedViews() {
return this.$store.state.tagsView.cachedViews return this.$store.state.tagsView.cachedViews;
}, },
key() { key() {
return this.$route.path return this.$route.path;
} },
} },
} };
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.app-main { .app-main {
/* 50= navbar 50 */ /* 50= navbar 50 */
min-height: calc(100vh - 50px); // min-height: calc(100vh - 50px);
height: 100% !important;
width: 100%; width: 100%;
position: relative; position: relative;
overflow: hidden; overflow: hidden;

@ -0,0 +1,86 @@
<template>
<div class="header-container">
<div class="system-log">苏州园区志愿服务活动区块链平台</div>
<div class="right-menu">
<el-dropdown
class="avatar-container right-menu-item hover-effect"
trigger="click"
>
<div class="avatar-wrapper">
<img :src="avatar" class="user-avatar" />
<!-- <i class="el-icon-caret-bottom" /> -->
<div class="user-name">{{ name }}</div>
</div>
<el-dropdown-menu slot="dropdown">
<router-link to="/user/profile">
<el-dropdown-item>个人中心</el-dropdown-item>
</router-link>
<el-dropdown-item divided @click.native="logout">
<span>退出登录</span>
</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
</div>
</div>
</template>
<script>
import { mapGetters } from "vuex";
export default {
data() {
return {};
},
computed: {
...mapGetters(["avatar", "name"]),
},
};
</script>
<style lang="scss" scoped>
// @import "@/assets/styles/element-variables.scss";
.header-container {
height: 60px;
background: url("~@/assets/images/title-bg@2x.png");
background-size: cover;
display: flex;
justify-content: space-between;
align-items: center;
padding: 0 20px;
.system-log {
font-size: 23px;
font-family: "Alibaba-PuHuiTi-Bold";
font-weight: bold;
color: #ffffff;
line-height: 60px;
letter-spacing: 2px;
}
.avatar-container {
.avatar-wrapper {
display: flex;
align-items: center;
cursor: pointer;
.user-avatar {
width: 35px;
height: 35px;
border-radius: 50%;
}
.user-name {
margin-left: 10px;
font-size: 16px;
font-weight: 400;
color: #ffffff;
font-family: "Alibaba-PuHuiTi-Regular";
}
.el-icon-caret-bottom {
position: absolute;
right: -15px;
top: 50%;
transform: translateY(-50%);
font-size: 12px;
color: #ffffff;
}
}
}
}
</style>

@ -1,26 +1,42 @@
<template> <template>
<div :class="{'has-logo':showLogo}" :style="{ backgroundColor: settings.sideTheme === 'theme-dark' ? variables.menuBackground : variables.menuLightBackground }"> <div
<logo v-if="showLogo" :collapse="isCollapse" /> :class="{ 'has-logo': showLogo }"
<el-scrollbar :class="settings.sideTheme" wrap-class="scrollbar-wrapper"> :style="{
<el-menu backgroundColor:
:default-active="activeMenu" settings.sideTheme === 'theme-dark'
:collapse="isCollapse" ? 'transparent'
:background-color="settings.sideTheme === 'theme-dark' ? variables.menuBackground : variables.menuLightBackground" : variables.menuLightBackground,
:text-color="settings.sideTheme === 'theme-dark' ? variables.menuColor : variables.menuLightColor" }"
:unique-opened="true" >
:active-text-color="settings.theme" <logo v-if="showLogo" :collapse="isCollapse" />
:collapse-transition="false" <el-scrollbar :class="settings.sideTheme" wrap-class="scrollbar-wrapper">
mode="vertical" <el-menu
> :default-active="activeMenu"
<sidebar-item :collapse="isCollapse"
v-for="(route, index) in sidebarRouters" :background-color="
:key="route.path + index" settings.sideTheme === 'theme-dark'
:item="route" ? 'transparent'
:base-path="route.path" : variables.menuLightBackground
/> "
</el-menu> :text-color="
</el-scrollbar> settings.sideTheme === 'theme-dark'
</div> ? variables.menuColor
: variables.menuLightColor
"
:unique-opened="true"
:active-text-color="'#F23F4A'"
:collapse-transition="false"
mode="vertical"
>
<sidebar-item
v-for="(route, index) in sidebarRouters"
:key="route.path + index"
:item="route"
:base-path="route.path"
/>
</el-menu>
</el-scrollbar>
</div>
</template> </template>
<script> <script>
@ -30,28 +46,28 @@ import SidebarItem from "./SidebarItem";
import variables from "@/assets/styles/variables.scss"; import variables from "@/assets/styles/variables.scss";
export default { export default {
components: { SidebarItem, Logo }, components: { SidebarItem, Logo },
computed: { computed: {
...mapState(["settings"]), ...mapState(["settings"]),
...mapGetters(["sidebarRouters", "sidebar"]), ...mapGetters(["sidebarRouters", "sidebar"]),
activeMenu() { activeMenu() {
const route = this.$route; const route = this.$route;
const { meta, path } = route; const { meta, path } = route;
// if set path, the sidebar will highlight the path you set // if set path, the sidebar will highlight the path you set
if (meta.activeMenu) { if (meta.activeMenu) {
return meta.activeMenu; return meta.activeMenu;
} }
return path; return path;
}, },
showLogo() { showLogo() {
return this.$store.state.settings.sidebarLogo; return this.$store.state.settings.sidebarLogo;
}, },
variables() { variables() {
return variables; return variables;
}, },
isCollapse() { isCollapse() {
return !this.sidebar.opened; return !this.sidebar.opened;
} },
} },
}; };
</script> </script>

@ -3,3 +3,4 @@ export { default as Navbar } from './Navbar'
export { default as Settings } from './Settings' export { default as Settings } from './Settings'
export { default as Sidebar } from './Sidebar/index.vue' export { default as Sidebar } from './Sidebar/index.vue'
export { default as TagsView } from './TagsView/index.vue' export { default as TagsView } from './TagsView/index.vue'
export { default as MyHead } from './MyHead'

@ -1,112 +1,164 @@
<template> <template>
<div class="my-container">
<div :class="classObj" class="app-wrapper" :style="{'--current-color': theme}"> <MyHead />
<div v-if="device==='mobile'&&sidebar.opened" class="drawer-bg" @click="handleClickOutside"/> <div class="app-main">
<sidebar v-if="!sidebar.hide" class="sidebar-container"/> <div class="left-sidebar">
<div :class="{hasTagsView:needTagsView,sidebarHide:sidebar.hide}" class="main-container"> <sidebar v-if="!sidebar.hide" class="sidebar-container" />
<div :class="{'fixed-header':fixedHeader}"> </div>
<!-- <navbar/> --> <div class="right-page">
<!-- <tags-view v-if="needTagsView"/> --> <app-main />
</div> </div>
<app-main/>
<right-panel>
<settings/>
</right-panel>
</div> </div>
<!-- <div
:class="classObj"
class="app-wrapper"
:style="{ '--current-color': theme }"
>
<div
v-if="device === 'mobile' && sidebar.opened"
class="drawer-bg"
@click="handleClickOutside"
/>
<sidebar v-if="!sidebar.hide" class="sidebar-container" />
<div
:class="{ hasTagsView: needTagsView, sidebarHide: sidebar.hide }"
class="main-container"
>
<div :class="{ 'fixed-header': fixedHeader }">
<navbar />
<tags-view v-if="needTagsView" />
</div>
<app-main />
<right-panel>
<settings />
</right-panel>
</div>
</div> -->
</div> </div>
</template> </template>
<script> <script>
import RightPanel from '@/components/RightPanel' import RightPanel from "@/components/RightPanel";
import { AppMain, Navbar, Settings, Sidebar, TagsView } from './components' import {
import ResizeMixin from './mixin/ResizeHandler' AppMain,
import { mapState } from 'vuex' Navbar,
import variables from '@/assets/styles/variables.scss' Settings,
Sidebar,
TagsView,
MyHead,
} from "./components";
import ResizeMixin from "./mixin/ResizeHandler";
import { mapState } from "vuex";
import variables from "@/assets/styles/variables.scss";
export default { export default {
name: 'Layout', name: "Layout",
components: { components: {
AppMain, AppMain,
Navbar, Navbar,
RightPanel, RightPanel,
Settings, Settings,
Sidebar, Sidebar,
TagsView TagsView,
MyHead,
}, },
mixins: [ResizeMixin], mixins: [ResizeMixin],
computed: { computed: {
...mapState({ ...mapState({
theme: state => state.settings.theme, theme: (state) => state.settings.theme,
sideTheme: state => state.settings.sideTheme, sideTheme: (state) => state.settings.sideTheme,
sidebar: state => state.app.sidebar, sidebar: (state) => state.app.sidebar,
device: state => state.app.device, device: (state) => state.app.device,
needTagsView: state => state.settings.tagsView, needTagsView: (state) => state.settings.tagsView,
fixedHeader: state => state.settings.fixedHeader fixedHeader: (state) => state.settings.fixedHeader,
}), }),
classObj() { classObj() {
return { return {
hideSidebar: !this.sidebar.opened, hideSidebar: !this.sidebar.opened,
openSidebar: this.sidebar.opened, openSidebar: this.sidebar.opened,
withoutAnimation: this.sidebar.withoutAnimation, withoutAnimation: this.sidebar.withoutAnimation,
mobile: this.device === 'mobile' mobile: this.device === "mobile",
} };
}, },
variables() { variables() {
return variables; return variables;
} },
}, },
methods: { methods: {
handleClickOutside() { handleClickOutside() {
this.$store.dispatch('app/closeSideBar', { withoutAnimation: false }) this.$store.dispatch("app/closeSideBar", { withoutAnimation: false });
} },
} },
} };
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
@import "~@/assets/styles/mixin.scss"; @import "~@/assets/styles/mixin.scss";
@import "~@/assets/styles/variables.scss"; @import "~@/assets/styles/variables.scss";
.app-wrapper { .my-container {
@include clearfix; height: 100%;
position: relative; width: 100%;
height: 100%;
width: 100%;
&.mobile.openSidebar { .app-main {
position: fixed; height: calc(100% - 60px);
top: 0; display: flex;
align-items: center;
.left-sidebar {
height: 100%;
background: url("~@/assets/images/sidebar.png");
background-size: cover;
}
.right-page {
background: #f5f5f5;
padding: 13px;
height: 100%;
flex: 1;
overflow: hidden;
} }
} }
}
.drawer-bg { .app-wrapper {
background: #000; @include clearfix;
opacity: 0.3; position: relative;
width: 100%; height: 100%;
top: 0; width: 100%;
height: 100%;
position: absolute;
z-index: 999;
}
.fixed-header { &.mobile.openSidebar {
position: fixed; position: fixed;
top: 0; top: 0;
right: 0;
z-index: 9;
width: calc(100% - #{$base-sidebar-width});
transition: width 0.28s;
} }
}
.hideSidebar .fixed-header { .drawer-bg {
width: calc(100% - 54px); background: #000;
} opacity: 0.3;
width: 100%;
top: 0;
height: 100%;
position: absolute;
z-index: 999;
}
.sidebarHide .fixed-header { .fixed-header {
width: 100%; position: fixed;
} top: 0;
right: 0;
z-index: 9;
width: calc(100% - #{$base-sidebar-width});
transition: width 0.28s;
}
.mobile .fixed-header { .hideSidebar .fixed-header {
width: 100%; width: calc(100% - 54px);
} }
.sidebarHide .fixed-header {
width: 100%;
}
.mobile .fixed-header {
width: 100%;
}
</style> </style>

@ -2,7 +2,7 @@ module.exports = {
/** /**
* 侧边栏主题 深色主题theme-dark浅色主题theme-light * 侧边栏主题 深色主题theme-dark浅色主题theme-light
*/ */
sideTheme: 'theme-dark', sideTheme: "theme-dark",
/** /**
* 是否系统布局配置 * 是否系统布局配置
@ -22,12 +22,12 @@ module.exports = {
/** /**
* 是否固定头部 * 是否固定头部
*/ */
fixedHeader: false, fixedHeader: true,
/** /**
* 是否显示logo * 是否显示logo
*/ */
sidebarLogo: true, sidebarLogo: false,
/** /**
* 是否显示动态标题 * 是否显示动态标题
@ -40,5 +40,5 @@ module.exports = {
* The default is only used in the production env * The default is only used in the production env
* If you want to also use it in dev, you can pass ['production', 'development'] * If you want to also use it in dev, you can pass ['production', 'development']
*/ */
errorLog: 'production' errorLog: "production",
} };

Loading…
Cancel
Save