master
lion 2 years ago
parent 12e402e5f9
commit 8c680d51c1

@ -8,10 +8,11 @@ export function save(data) {
})
}
export function listuser() {
export function listuser(params) {
return request({
url: '/api/admin/admin',
method: 'get'
method: 'get',
params:params
})
}

@ -1,44 +1,65 @@
<template>
<div style="padding: 0 15px;" @click="toggleClick">
<svg
:class="{'is-active':isActive}"
class="hamburger"
viewBox="0 0 1024 1024"
xmlns="http://www.w3.org/2000/svg"
width="64"
height="64"
>
<path d="M408 442h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm-8 204c0 4.4 3.6 8 8 8h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56zm504-486H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 632H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM142.4 642.1L298.7 519a8.84 8.84 0 0 0 0-13.9L142.4 381.9c-5.8-4.6-14.4-.5-14.4 6.9v246.3a8.9 8.9 0 0 0 14.4 7z" />
</svg>
</div>
</template>
<script>
export default {
name: 'Hamburger',
props: {
isActive: {
type: Boolean,
default: false
}
},
methods: {
toggleClick() {
this.$emit('toggleClick')
}
}
}
</script>
<style scoped>
.hamburger {
display: inline-block;
vertical-align: middle;
width: 20px;
height: 20px;
}
.hamburger.is-active {
transform: rotate(180deg);
}
<template>
<div style="padding: 0 15px;" @click="toggleClick">
<svg :class="{'is-active-hamburger':isActive}" class="hamburger" viewBox="0 0 1024 1024"
xmlns="http://www.w3.org/2000/svg" width="64" height="64">
<path
d="M408 442h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm-8 204c0 4.4 3.6 8 8 8h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56zm504-486H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 632H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM142.4 642.1L298.7 519a8.84 8.84 0 0 0 0-13.9L142.4 381.9c-5.8-4.6-14.4-.5-14.4 6.9v246.3a8.9 8.9 0 0 0 14.4 7z" />
</svg>
<transition name="fade">
<span class="hamburgertxt" v-if="isActive"></span>
</transition>
</div>
</template>
<script>
export default {
name: 'Hamburger',
props: {
isActive: {
type: Boolean,
default: false
}
},
methods: {
toggleClick() {
this.$emit('toggleClick')
}
}
}
</script>
<style scoped>
.hamburger {
display: inline-block;
vertical-align: middle;
width: 20px;
height: 20px;
}
.hamburgertxt {
color: #606266;
font-size: 16px;
margin-left: 0.625rem;
}
.hamburger.is-active-hamburger {
transform: rotate(180deg);
background-color: none !important;
}
.fade-enter {
opacity: 0;
}
.fade-enter-active {
transition: opacity .1s;
}
.fade-leave-to {
opacity: 0;
}
.fade-leave-active {
transition: opacity .1s;
}
</style>

@ -1,5 +1,7 @@
<template>
<section class="app-main">
<breadcrumb class="breadcrumb-container" />
<transition name="fade-transform" mode="out-in">
<router-view :key="key" />
</transition>
@ -7,7 +9,11 @@
</template>
<script>
import Breadcrumb from '@/components/Breadcrumb'
export default {
components: {
Breadcrumb
},
name: 'AppMain',
computed: {
key() {
@ -20,13 +26,14 @@ export default {
<style scoped>
.app-main {
/*50 = navbar */
min-height: calc(100vh - 50px);
min-height: calc(100vh - 30px);
width: 100%;
position: relative;
overflow: hidden;
padding:0 20px
}
.fixed-header+.app-main {
padding: 50px 20px 0 20px;
padding-top: 50px;
}
</style>
@ -37,4 +44,7 @@ export default {
padding-right: 15px;
}
}
.breadcrumb-container {
margin-left: 20px !important;
}
</style>

@ -1,10 +1,10 @@
<template>
<div class="navbar">
<hamburger :is-active="sidebar.opened" class="hamburger-container" @toggleClick="toggleSideBar" />
<!-- <hamburger :is-active="sidebar.opened" class="hamburger-container" @toggleClick="toggleSideBar" /> -->
<breadcrumb class="breadcrumb-container" />
<div class="right-menu">
<!-- <div class="right-menu">
<el-dropdown class="avatar-container" trigger="click">
<div class="avatar-wrapper">
<img src="../../assets/face.jpg" class="user-avatar">
@ -25,7 +25,7 @@
<span style="display:block;">退出</span>
</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
</el-dropdown> -->
</div>
</div>
</template>
@ -82,7 +82,8 @@
}
.breadcrumb-container {
float: left;
float: left;
margin-left:20px!important
}
.right-menu {

@ -99,6 +99,6 @@
</script>
<style>
.el-submenu__title i {
color: #fff !important;
/* color: #fff !important; */
}
</style>

@ -1,54 +1,91 @@
<template>
<div :class="{'has-logo':showLogo}">
<logo v-if="showLogo" :collapse="isCollapse" />
<el-scrollbar wrap-class="scrollbar-wrapper">
<el-menu
:default-active="activeMenu"
:collapse="isCollapse"
:background-color="variables.menuBg"
:text-color="variables.menuText"
:unique-opened="false"
:active-text-color="variables.menuActiveText"
:collapse-transition="false"
mode="vertical"
>
<sidebar-item v-for="route in permission_routes" :key="route.path" :item="route" :base-path="route.path" />
</el-menu>
</el-scrollbar>
</div>
</template>
<script>
import { mapGetters } from 'vuex'
import Logo from './Logo'
import SidebarItem from './SidebarItem'
import variables from '@/styles/variables.scss'
export default {
components: { SidebarItem, Logo },
computed: {
...mapGetters([
'permission_routes',
'sidebar'
]),
activeMenu() {
const route = this.$route
const { meta, path } = route
// if set path, the sidebar will highlight the path you set
if (meta.activeMenu) {
return meta.activeMenu
}
return path
},
showLogo() {
return this.$store.state.settings.sidebarLogo
},
variables() {
return variables
},
isCollapse() {
return !this.sidebar.opened
}
}
}
</script>
<template>
<div :class="{'has-logo':showLogo}">
<logo v-if="showLogo" :collapse="isCollapse" />
<el-scrollbar wrap-class="scrollbar-wrapper">
<el-menu :default-active="activeMenu" :collapse="isCollapse" :background-color="variables.menuBg"
:text-color="variables.menuText" :unique-opened="false" :active-text-color="variables.menuActiveText"
:collapse-transition="false" mode="vertical">
<sidebar-item v-for="route in permission_routes" :key="route.path" :item="route" :base-path="route.path" />
</el-menu>
</el-scrollbar>
<hamburger :is-active="sidebar.opened" class="hamburger-container" @toggleClick="toggleSideBar" />
</div>
</template>
<script>
import {
mapGetters
} from 'vuex'
import Logo from './Logo'
import SidebarItem from './SidebarItem'
import variables from '@/styles/variables.scss'
import Hamburger from '@/components/Hamburger'
export default {
components: {
SidebarItem,
Logo,
Hamburger
},
computed: {
...mapGetters([
'sidebar',
'permission_routes',
]),
routes() {
//return this.routers;
//return this.$router.options.routes
},
activeMenu() {
const route = this.$route
const {
meta,
path
} = route
// if set path, the sidebar will highlight the path you set
if (meta.activeMenu) {
return meta.activeMenu
}
return path
},
showLogo() {
return this.$store.state.settings.sidebarLogo
},
variables() {
return variables
},
isCollapse() {
return !this.sidebar.opened
}
},
methods: {
toggleSideBar() {
this.$store.dispatch('app/toggleSideBar')
},
async logout() {
await this.$store.dispatch('user/logout')
this.$router.push(`/login?redirect=${this.$route.fullPath}`)
}
}
}
</script>
<style lang="scss" scoped>
.hamburger-container {
//line-height: 46px;
height: 100%;
//float: left;
display: flex;
justify-content: center;
cursor: pointer;
transition: background .3s;
-webkit-tap-highlight-color: transparent;
padding-top: 20px !important;
&:hover {
background: rgba(0, 0, 0, .025)
}
}
</style>

@ -1,93 +1,103 @@
<template>
<div :class="classObj" class="app-wrapper">
<div v-if="device==='mobile'&&sidebar.opened" class="drawer-bg" @click="handleClickOutside" />
<sidebar class="sidebar-container" />
<div class="main-container">
<div :class="{'fixed-header':fixedHeader}">
<navbar />
</div>
<app-main />
</div>
</div>
</template>
<script>
import { Navbar, Sidebar, AppMain } from './components'
import ResizeMixin from './mixin/ResizeHandler'
export default {
name: 'Layout',
components: {
Navbar,
Sidebar,
AppMain
},
mixins: [ResizeMixin],
computed: {
sidebar() {
return this.$store.state.app.sidebar
},
device() {
return this.$store.state.app.device
},
fixedHeader() {
return this.$store.state.settings.fixedHeader
},
classObj() {
return {
hideSidebar: !this.sidebar.opened,
openSidebar: this.sidebar.opened,
withoutAnimation: this.sidebar.withoutAnimation,
mobile: this.device === 'mobile'
}
}
},
methods: {
handleClickOutside() {
this.$store.dispatch('app/closeSideBar', { withoutAnimation: false })
}
}
}
</script>
<style lang="scss" scoped>
@import "~@/styles/mixin.scss";
@import "~@/styles/variables.scss";
.app-wrapper {
@include clearfix;
position: relative;
height: 100%;
width: 100%;
&.mobile.openSidebar{
position: fixed;
top: 0;
}
}
.drawer-bg {
background: #000;
opacity: 0.3;
width: 100%;
top: 0;
height: 100%;
position: absolute;
z-index: 999;
}
.fixed-header {
position: fixed;
top: 0;
right: 0;
z-index: 9;
width: calc(100% - #{$sideBarWidth});
transition: width 0.28s;
}
.hideSidebar .fixed-header {
width: calc(100% - 54px)
}
.mobile .fixed-header {
width: 100%;
}
<template>
<div :class="classObj" class="app-wrapper">
<div v-if="device==='mobile'&&sidebar.opened" class="drawer-bg" @click="handleClickOutside" />
<sidebar class="sidebar-container" />
<div class="main-container">
<div :class="{'fixed-header':fixedHeader}" v-if="false">
<navbar />
</div>
<el-scrollbar style="height: 100%">
<app-main />
</el-scrollbar>
</div>
</div>
</template>
<script>
import {
Navbar,
Sidebar,
AppMain
} from './components'
import ResizeMixin from './mixin/ResizeHandler'
export default {
name: 'Layout',
components: {
Navbar,
Sidebar,
AppMain
},
mixins: [ResizeMixin],
computed: {
sidebar() {
return this.$store.state.app.sidebar
},
device() {
return this.$store.state.app.device
},
fixedHeader() {
return this.$store.state.settings.fixedHeader
},
classObj() {
return {
hideSidebar: !this.sidebar.opened,
openSidebar: this.sidebar.opened,
withoutAnimation: this.sidebar.withoutAnimation,
mobile: this.device === 'mobile'
}
}
},
methods: {
handleClickOutside() {
this.$store.dispatch('app/closeSideBar', {
withoutAnimation: false
})
}
}
}
</script>
<style lang="scss" scoped>
@import "~@/styles/mixin.scss";
@import "~@/styles/variables.scss";
.app-wrapper {
@include clearfix;
position: relative;
height: 100%;
width: 100%;
&.mobile.openSidebar {
position: fixed;
top: 0;
}
}
.drawer-bg {
background: #000;
opacity: 0.3;
width: 100%;
top: 0;
height: 100%;
position: absolute;
z-index: 999;
}
.fixed-header {
position: fixed;
top: 0;
right: 0;
z-index: 9;
width: calc(100% - #{$sideBarWidth});
transition: width 0.28s;
}
.hideSidebar .fixed-header {
width: calc(100% - 54px)
}
.mobile .fixed-header {
width: 100%;
}
</style>

@ -10,8 +10,8 @@
.sidebar-container {
transition: width 0.28s;
width: $sideBarWidth !important;
//background-color: $menuBg;
background: linear-gradient(180deg, #0284cd, #0077CC);
background-color: $menuBg;
// background: linear-gradient(180deg, #0284cd, #0077CC);
box-shadow: 1px 1px 15px 0px rgba(17, 76, 157, 0.2);
height: 100%;
position: fixed;

@ -1,16 +1,16 @@
// sidebar
$menuText:#ffffff;
$menuActiveText:#ffffff;
$subMenuActiveText:#ffffff; //https://github.com/ElemeFE/element/issues/12951
$menuText:#606266;
$menuActiveText:#303133;
$subMenuActiveText:#0077CC;//https://github.com/ElemeFE/element/issues/12951
$menuBg:rgb(255, 255, 255,0);//#304156
$menuHover:rgba(242, 242, 242, .4);
$menuActiveBg:rgba(242, 242, 242, .4);
$menuBg:#ffffff;//#304156
$menuHover:#e0f2ff;
$menuActiveBg:#dcf3ff;
$subMenuBg:rgb(255, 255, 255,0);//#304156
$subMenuHover:rgba(242, 242, 242, .4);
$submenuActiveBg:rgba(242, 242, 242, .4);
$subMenuBg:#ffffff;//#1f2d3d
$subMenuHover:#edf6ff;
$submenuActiveBg:#dcf3ff;
$sideBarWidth: 210px;
$primaryColor: #0077CC;

@ -1,6 +1,6 @@
<template>
<div>
<div>当前登录人{{user.name}}</div>
<div class="statistics">
<panel-group :totaldata="list" />
</div>
@ -37,6 +37,9 @@
import {
outboundsCharts
} from "@/api/charts.js"
import {
getInfo
} from '../../api/user.js'
export default {
components: {
@ -45,6 +48,7 @@
},
data() {
return {
user:{},
start_time: '',
end_time: '',
dateRange:[],
@ -176,6 +180,10 @@
}
},
created() {
getInfo().then(response => {
console.log(response)
this.user = response
}).catch(error => {})
this.start_time = this.recentTime(-14, 'yyyy-MM-dd')
this.end_time = this.getNowDate()
this.dateRange = [this.start_time,this.end_time]

@ -1,5 +1,5 @@
<template>
<div style="padding: 0 20px">
<div>
<div ref="lxHeader">
<lx-header icon="md-apps" text="库存管理" style="margin-bottom: 10px; border: 0px; margin-top: 15px">

@ -1,5 +1,5 @@
<template>
<div style="padding: 0 20px">
<div>
<div ref="lxHeader">
<lx-header icon="md-apps" :text="`${chukuType}出库管理`" style="margin-bottom: 10px; border: 0px; margin-top: 15px">

@ -1,5 +1,5 @@
<template>
<div style="padding: 0 20px">
<div>
<div ref="lxHeader">
<lx-header icon="md-apps" text="出库统计" style="margin-bottom: 10px; border: 0px; margin-top: 15px">

@ -1,5 +1,5 @@
<template>
<div style="padding: 0 20px">
<div>
<div ref="lxHeader">
<lx-header icon="md-apps" text="入库统计" style="margin-bottom: 10px; border: 0px; margin-top: 15px">

@ -1,5 +1,5 @@
<template>
<div style="padding: 0 20px">
<div>
<div ref="lxHeader">
<lx-header icon="md-apps" :text="rukuType=='回库'?`归还入库管理`:`${rukuType}入库管理`" style="margin-bottom: 10px; border: 0px; margin-top: 15px">

@ -7,7 +7,7 @@
<div slot="content"></div>
<slot>
<div>
<Input style="width: 200px; margin-right: 10px" v-model.number="searchFields.Name" placeholder="关键字搜索" />
<Input style="width: 200px; margin-right: 10px" v-model.number="searchFields.KeyWord" placeholder="关键字搜索" />
<Button type="primary" @click="load" style="margin-left: 10px">查询</Button>
<Button type="primary" @click="edit()" style="margin-left: 10px">新增用户</Button>
</div>
@ -164,7 +164,11 @@
},
load() {
var that = this;
listuser().then(response => {
listuser({
page:1,
page_size:999,
keyword:this.searchFields.KeyWord
}).then(response => {
var data = response.data;
var _rolelist = [];
for (var m of data) {

Loading…
Cancel
Save