Commit 1902227d by liimin

样式调整

1 parent a8ea65da
Showing 39 changed files with 336 additions and 283 deletions
......@@ -3564,6 +3564,12 @@
"delayed-stream": "1.0.0"
}
},
"commander": {
"version": "2.20.0",
"resolved": "https://registry.npmjs.org/commander/-/commander-2.20.0.tgz",
"integrity": "sha512-7j2y+40w61zy6YC2iRNpUe/NwhNyoXrYpHMrSunaMG64nRnaf96zO/KMQR4OyN/UnE5KLyEBnKHd4aG3rskjpQ==",
"dev": true
},
"commondir": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz",
......@@ -14390,11 +14396,6 @@
"resolved": "https://registry.npmjs.org/vue/-/vue-2.6.10.tgz",
"integrity": "sha512-ImThpeNU9HbdZL3utgMCq0oiMzAkt1mcgy3/E6zWC/G6AaQoeuFdsl9nDhTDU3X1R6FK7nsIUuRACVcjI+A2GQ=="
},
"vue-avatar": {
"version": "2.1.7",
"resolved": "https://registry.npmjs.org/vue-avatar/-/vue-avatar-2.1.7.tgz",
"integrity": "sha512-1nYbgzCHPaQIN+LkOW0VH+2CrB0ljM5aiVaPtHqJ0/Uf8PnHRWLXzO3NFmXy5EPaYRjeLwnmm3ox2zac1AhBtA=="
},
"vue-eslint-parser": {
"version": "2.0.3",
"resolved": "https://registry.npmjs.org/vue-eslint-parser/-/vue-eslint-parser-2.0.3.tgz",
......@@ -14669,12 +14670,6 @@
"integrity": "sha512-/czfa8BwS88b9gWQVhc8eknunSA2DoJpJyTQkhheIf5E48u1N0R4q/YxxsAeqRrmK9TQ/uYfgLDfZo91UlANIA==",
"dev": true
},
"commander": {
"version": "2.20.0",
"resolved": "https://registry.npmjs.org/commander/-/commander-2.20.0.tgz",
"integrity": "sha512-7j2y+40w61zy6YC2iRNpUe/NwhNyoXrYpHMrSunaMG64nRnaf96zO/KMQR4OyN/UnE5KLyEBnKHd4aG3rskjpQ==",
"dev": true
},
"ws": {
"version": "6.2.1",
"resolved": "https://registry.npmjs.org/ws/-/ws-6.2.1.tgz",
......
......@@ -5,7 +5,7 @@
"serve": "vue-cli-service serve --open",
"start": "npm run serve",
"dev": "npm run serve",
"build": "vue-cli-service build",
"build": "vue-cli-service build --mode nomock",
"build:nomock": "vue-cli-service build --mode nomock",
"build:travis": "vue-cli-service build --mode travis",
"lint": "vue-cli-service lint --fix",
......@@ -30,7 +30,6 @@
"screenfull": "^4.2.0",
"ua-parser-js": "^0.7.19",
"vue": "^2.6.10",
"vue-avatar": "^2.1.7",
"vue-i18n": "^8.14.0",
"vue-role-manager": "^1.2.0",
"vue-router": "^3.0.3",
......@@ -53,6 +52,7 @@
"sass-loader": "^7.1.0",
"svg-sprite-loader": "^4.1.3",
"vue-template-compiler": "^2.5.21",
"webpack-bundle-analyzer": "^3.4.1",
"webpack-theme-color-replacer": "^1.2.15"
}
}
......@@ -2,27 +2,27 @@ import request from './request'
const path = 'fims.subsystem.'
const methods = {
Add: `${path}add`,
Edit: `${path}edit`
Add: `${path}add`,
Edit: `${path}edit`
}
function getListApi (data) {
data.method = `${path}list`
return request(data)
data.method = `${path}list`
return request(data)
}
function editApi (data) {
return request(data)
return request(data)
}
function removeApi (data) {
data.method = `${path}remove`
return request(data)
data.method = `${path}remove`
return request(data)
}
export {
getListApi,
methods,
editApi,
removeApi
}
export {
getListApi,
methods,
editApi,
removeApi
}
\ No newline at end of file
......@@ -2,13 +2,13 @@ import request from './request'
const path = 'fims.system.'
function getListApi (data) {
data.method = `${path}list`
return request(data)
data.method = `${path}list`
return request(data)
}
function reportApi (data) {
data.method = `${path}report`
return request(data)
data.method = `${path}report`
return request(data)
}
export {
......
......@@ -2,7 +2,7 @@
html, body {
margin: 0px;
height: 100%;
font-family: 12px/150% Tahoma,Helvetica,Arial,Verdana,"Microsoft YaHei","SimSun","宋体";
font-family: "Helvetica Neue",Helvetica,"PingFang SC","Hiragino Sans GB","Microsoft YaHei","微软雅黑",Arial,sans-serif;
#app {
@extend %full;
a {
......
......@@ -19,4 +19,7 @@
}
.el-tabs__nav-scroll{
padding-left: 20px;
}
.el-color-picker__trigger{
border-color:rgba(255,255,255,.1)
}
\ No newline at end of file
......@@ -4,7 +4,8 @@ $theme-name: 'blue';
$private-left-side-color:#652DED;
// diff
$private-menu-active-background-color:#521ADA;
$private-item-hover:rgba(#000,.2);
$private-item-hover:rgba(#000,.05);
$private-menu-text-color:#C4D0DF;
// 主题背景颜色
......@@ -21,8 +22,8 @@ $theme-container-border-outer: 1px solid #E7EAEC;
$theme-multiple-page-control-color: #888;
$theme-multiple-page-control-color-active: $color-text-normal;
$theme-multiple-page-control-nav-prev-color: #FFF;
$theme-multiple-page-control-nav-next-color: #FFF;
$theme-multiple-page-control-nav-prev-color: $private-menu-text-color;
$theme-multiple-page-control-nav-next-color: $private-menu-text-color;
$theme-multiple-page-control-border-color: #E7EAEC;
$theme-multiple-page-control-border-color-active: #FFF;
$theme-multiple-page-control-background-color: rgba(#FFF, .2);
......@@ -30,7 +31,7 @@ $theme-multiple-page-control-background-color-active: #FFF;
// hamberg --limin diff
$theme-header-hamberg-color:#FFF;
$theme-header-hamberg-color-hover:#ccc;
$theme-header-hamberg-color-hover:$private-menu-active-background-color;
// 顶栏和侧边栏中展开的菜单 hover 状态下
$theme-menu-item-color-hover: #293849;
......@@ -41,10 +42,11 @@ $theme-header-background-color:$private-left-side-color;
$theme-header-logo-background-color:$private-left-side-color;
// 顶栏上的文字颜色 diff
$theme-header-item-color: #FFF;
$theme-header-item-color: $private-menu-text-color;
$theme-header-item-background-color: transparent;
// 顶栏上的项目在 hover 时
$theme-header-item-color-hover: #FFF;
$theme-header-item-border-color-hover:rgba($theme-header-item-color-hover,.1);
$theme-header-item-background-color-hover: $private-item-hover;
// 顶栏上的项目在 focus 时
$theme-header-item-color-focus: #FFF;
......@@ -53,8 +55,10 @@ $theme-header-item-background-color-focus: rgba($private-menu-active-background-
$theme-header-item-color-active: #FFF;
$theme-header-item-background-color-active: rgba($private-menu-active-background-color, 1);
// 侧边栏上的文字颜色
$theme-aside-item-color: #C4D0DF;
$theme-container-aside-background-color:linear-gradient(180deg, #6729ED 0%, #3E76E2 100%);
// 侧边栏上的文字颜色
$theme-aside-item-color: $private-menu-text-color;
$theme-aside-item-background-color: transparent;
// 侧边栏上的项目在 hover 时
$theme-aside-item-color-hover: #FFF;
......
......@@ -2,8 +2,8 @@
$theme-name: 'classic';
$private-left-side-color:#2A58AD;
$private-menu-active-background-color:#154190;
$private-item-hover:rgba(#000,.2);
$private-item-hover:rgba(#000,.05);
$private-menu-text-color:#C4D0DF;
// 主题背景颜色
$theme-bg-color: $private-left-side-color;
......@@ -19,8 +19,10 @@ $theme-container-border-outer: 1px solid #E7EAEC;
$theme-multiple-page-control-color: #888;
$theme-multiple-page-control-color-active: $color-text-normal;
$theme-multiple-page-control-nav-prev-color: #FFF;
$theme-multiple-page-control-nav-next-color: #FFF;
// tab 页签 滚动条 左 箭头 按钮 颜色
$theme-multiple-page-control-nav-prev-color: $private-menu-text-color;
// tab 页签 滚动条 右 箭头 按钮 颜色
$theme-multiple-page-control-nav-next-color: $private-menu-text-color;
$theme-multiple-page-control-border-color: #E7EAEC;
$theme-multiple-page-control-border-color-active: #FFF;
$theme-multiple-page-control-background-color: rgba(#FFF, .2);
......@@ -28,7 +30,7 @@ $theme-multiple-page-control-background-color-active: #FFF;
// hamberg --limin
$theme-header-hamberg-color:$private-left-side-color;
$theme-header-hamberg-color-hover:#ccc;
$theme-header-hamberg-color-hover:$private-menu-active-background-color;
// 顶栏和侧边栏中展开的菜单 hover 状态下
$theme-menu-item-color-hover: #293849;
......@@ -43,7 +45,9 @@ $theme-header-item-color: #666;
$theme-header-item-background-color: transparent;
// 顶栏上的项目在 hover 时
$theme-header-item-color-hover: #FFF;
$theme-header-item-border-color-hover:rgba($theme-header-item-color-hover,1);
$theme-header-item-background-color-hover: $private-item-hover;
// 顶栏上的项目在 focus 时
$theme-header-item-color-focus: #FFF;
$theme-header-item-background-color-focus: rgba($private-menu-active-background-color, 1);
......@@ -51,8 +55,10 @@ $theme-header-item-background-color-focus: rgba($private-menu-active-background-
$theme-header-item-color-active: #FFF;
$theme-header-item-background-color-active: rgba($private-menu-active-background-color, 1);
$theme-container-aside-background-color:'transparent';
// 侧边栏上的文字颜色
$theme-aside-item-color: #C4D0DF;
$theme-aside-item-color: $private-menu-text-color;
$theme-aside-item-background-color: transparent;
// 侧边栏上的项目在 hover 时
$theme-aside-item-color-hover: #FFF;
......
......@@ -2,7 +2,9 @@
$theme-name: 'dark';
$private-left-side-color:#314256;
$private-menu-active-background-color:#1F3147;
$private-item-hover:rgba(#000,.2);
$private-item-hover:rgba(#000,.05);
$private-menu-text-color:#C4D0DF;
// 主题背景颜色
$theme-bg-color: $private-left-side-color;
// 主题背景图片遮罩
......@@ -17,8 +19,8 @@ $theme-container-border-outer: 1px solid #E7EAEC;
$theme-multiple-page-control-color: #888;
$theme-multiple-page-control-color-active: $color-text-normal;
$theme-multiple-page-control-nav-prev-color: #FFF;
$theme-multiple-page-control-nav-next-color: #FFF;
$theme-multiple-page-control-nav-prev-color: $private-menu-text-color;
$theme-multiple-page-control-nav-next-color: $private-menu-text-color;
$theme-multiple-page-control-border-color: #E7EAEC;
$theme-multiple-page-control-border-color-active: #FFF;
$theme-multiple-page-control-background-color: rgba(#FFF, .2);
......@@ -26,7 +28,7 @@ $theme-multiple-page-control-background-color-active: #FFF;
// hamberg --limin
$theme-header-hamberg-color:#FFF;
$theme-header-hamberg-color-hover:#ccc;
$theme-header-hamberg-color-hover:$private-menu-active-background-color;
// 顶栏和侧边栏中展开的菜单 hover 状态下
$theme-menu-item-color-hover: #293849;
......@@ -37,10 +39,11 @@ $theme-header-background-color:#3B4F67;
$theme-header-logo-background-color:$private-left-side-color;
// 顶栏上的文字颜色
$theme-header-item-color: #C4D0DF;
$theme-header-item-color: $private-menu-text-color;
$theme-header-item-background-color: transparent;
// 顶栏上的项目在 hover 时
$theme-header-item-color-hover: #FFF;
$theme-header-item-border-color-hover:rgba($theme-header-item-color-hover,.1);
$theme-header-item-background-color-hover: $private-item-hover;
// 顶栏上的项目在 focus 时
$theme-header-item-color-focus: #FFF;
......@@ -49,8 +52,9 @@ $theme-header-item-background-color-focus: rgba($private-menu-active-background-
$theme-header-item-color-active: #FFF;
$theme-header-item-background-color-active: rgba($private-menu-active-background-color, 1);
$theme-container-aside-background-color:'transparent';
// 侧边栏上的文字颜色
$theme-aside-item-color: #C4D0DF;
$theme-aside-item-color: $private-menu-text-color;
$theme-aside-item-background-color: transparent;
// 侧边栏上的项目在 hover 时
$theme-aside-item-color-hover: #FFF;
......
......@@ -4,7 +4,8 @@ $theme-name: 'plane';
$private-left-side-color:transparent;
// diff
$private-menu-active-background-color:#002253;
$private-item-hover:rgba(#000,.2);
$private-item-hover:rgba(#000,.05);
$private-menu-text-color:#C4D0DF;
// 主题背景颜色
......@@ -21,8 +22,8 @@ $theme-container-border-outer: 1px solid #E7EAEC;
$theme-multiple-page-control-color: #888;
$theme-multiple-page-control-color-active: $color-text-normal;
$theme-multiple-page-control-nav-prev-color: #FFF;
$theme-multiple-page-control-nav-next-color: #FFF;
$theme-multiple-page-control-nav-prev-color: $private-menu-text-color;
$theme-multiple-page-control-nav-next-color: $private-menu-text-color;
$theme-multiple-page-control-border-color: #E7EAEC;
$theme-multiple-page-control-border-color-active: #FFF;
$theme-multiple-page-control-background-color: rgba(#FFF, .8);
......@@ -30,7 +31,7 @@ $theme-multiple-page-control-background-color-active: #FFF;
// hamberg --limin diff
$theme-header-hamberg-color:#FFF;
$theme-header-hamberg-color-hover:#ccc;
$theme-header-hamberg-color-hover:$private-menu-active-background-color;
// 顶栏和侧边栏中展开的菜单 hover 状态下
$theme-menu-item-color-hover: #293849;
......@@ -41,20 +42,22 @@ $theme-header-background-color:$private-left-side-color;
$theme-header-logo-background-color:$private-left-side-color;
// 顶栏上的文字颜色 diff
$theme-header-item-color: #FFF;
$theme-header-item-color: $private-menu-text-color;
$theme-header-item-background-color: transparent;
// 顶栏上的项目在 hover 时
$theme-header-item-color-hover: #FFF;
$theme-header-item-border-color-hover:rgba($theme-header-item-color-hover,.1);
$theme-header-item-background-color-hover: $private-item-hover;
// 顶栏上的项目在 focus 时
$theme-header-item-color-focus: #FFF;
$theme-header-item-background-color-focus: rgba($private-menu-active-background-color, 1);
$theme-header-item-background-color-focus: rgba($private-menu-active-background-color, .2);
// 顶栏上的项目在 active 时
$theme-header-item-color-active: #FFF;
$theme-header-item-background-color-active: rgba($private-menu-active-background-color, 1);
$theme-container-aside-background-color:'transparent';
// 侧边栏上的文字颜色
$theme-aside-item-color: #C4D0DF;
$theme-aside-item-color: $private-menu-text-color;
$theme-aside-item-background-color: transparent;
// 侧边栏上的项目在 hover 时
$theme-aside-item-color-hover: #FFF;
......
......@@ -109,6 +109,7 @@
-o-filter: grayscale(100%);
filter: grayscale(100%);
filter: gray;
transition: 3s ease;
}
// 主体
.d2-layout-header-aside-content {
......
......@@ -153,7 +153,8 @@
&.can-hover {
&:hover {
color: $theme-header-item-color-hover;
background: $theme-header-item-background-color-hover;
background-color: $theme-header-item-background-color-hover;
border-color:$theme-header-item-border-color-hover;
}
}
}
......@@ -163,6 +164,7 @@
.d2-theme-container {
// 侧边栏
.d2-theme-container-aside {
background: $theme-container-aside-background-color;
// 菜单为空的时候显示的信息
.d2-layout-header-aside-menu-empty {
background: $theme-aside-menu-empty-background-color;
......
......@@ -5,7 +5,7 @@ import d2ContainerGhost from './components/d2-container-ghost.vue'
import d2ContainerGhostBs from './components/d2-container-ghost-bs.vue'
import d2ContainerCard from './components/d2-container-card.vue'
import d2ContainerCardBs from './components/d2-container-card-bs.vue'
import d2Source from './components/d2-source.vue'
// import d2Source from './components/d2-source.vue'
export default {
name: 'd2-container',
......@@ -20,7 +20,7 @@ export default {
betterScroll: {
type: Boolean,
required: false,
default: false
default: true
}
},
computed: {
......@@ -51,8 +51,8 @@ export default {
on: {
scroll: e => this.$emit('scroll', e)
}
}, slots),
h(d2Source)
}, slots)
// h(d2Source)
])
},
methods: {
......
/*
* @Author: limin
* @Date: 2019-08-31 12:44:16
* @Last Modified by: limin
* @Last Modified time: 2019-08-31 12:44:16
*/
import Vue from 'vue'
import focus from './src/focus'
Vue.directive(focus.name,focus)
\ No newline at end of file
/*
* @Author: limin
* @Date: 2019-08-31 12:44:08
* @Last Modified by: limin
* @Last Modified time: 2019-08-31 12:44:08
*/
export default {
name:'focus',
inserted: function (el) {
el.querySelector('input').focus();
}
}
\ No newline at end of file
......@@ -15,26 +15,24 @@ export default {
data () {
return {
predefine: [
'#ff4500',
'#ff8c00',
'#ffd700',
'#90ee90',
'#00ced1',
'#1e90ff',
'#c71585'
'#FF0000','#008000','#0000FF'
]
}
},
computed: {
...mapState('d2admin/color', [
'value'
])
...mapState('d2admin', {
value:state=>state.color.value,
listTheme:state=>state.theme.list
})
},
watch: {
value (value) {
this.set(value)
}
},
mounted () {
this.predefine= [...this.predefine,...this.listTheme.map(theme=>theme.color)]
},
methods: {
...mapActions('d2admin/color', [
'set'
......
......@@ -62,9 +62,9 @@ export default {
...mapActions('d2admin/theme', [
'set'
]),
...mapActions('d2admin/color',{ setColor:'set'}),
...mapActions('d2admin/color', { setColor: 'set' }),
handleSelectTheme (row) {
const {name,color} = row
const { name, color } = row
this.set(name)
this.setColor(color)
}
......
......@@ -10,8 +10,8 @@
</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>-->
<div v-popover:popover-personal class="d2-mr">
<span class="btn-text">{{info.name ? `你好 ${info.name}` : '未登录'}}</span>
<div v-popover:popover-personal class="d2-mr personal-wrap">
<span class="btn-text">{{info.name ? `${info.name}` : '未登录'}}</span>
<el-popover ref="popover-personal" placement="bottom-end" trigger="hover">
<personal-panel :user="info"></personal-panel>
</el-popover>
......@@ -58,3 +58,11 @@ export default {
}
}
</script>
<style lang="scss" scoped>
.personal-wrap{
transform: translateY(-3px);
.btn-text{
text-shadow: 0 1px 1px#666;
}
}
</style>
......@@ -149,12 +149,12 @@ export default {
},
handleClose () {
this.passwordDialogVisible = false
},
}
// mergePassWord (params) {
// Modify(params)
// .then(res => {
// })
// .catch(err => console.log(err))
// }
......
......@@ -9,8 +9,7 @@ export default {
menuMixin
],
render (createElement) {
return createElement('div', { attrs: { class: 'd2-layout-header-aside-menu-side' }
}, [
return createElement('div', { attrs: { class: 'd2-layout-header-aside-menu-side' } }, [
createElement('el-menu', {
props: { collapse: this.asideCollapse, uniqueOpened: true, defaultActive: this.active },
ref: 'menu',
......@@ -71,9 +70,6 @@ export default {
// }
})
},
test () {
alert(111)
},
scrollDestroy () {
// https://github.com/d2-projects/d2-admin/issues/75
try {
......
<template>
<div class="personal-panel">
<div class="personal-desc" >
<div class="avatar-container">
<avatar :username="user.name"></avatar>
<!-- <img class="avatar" :src="require('@/assets/user.png')" /> -->
</div>
<div class="name-role">
<span class="sender">{{ user.name }} - {{ user.role||'超级管理员' }}</span>
</div>
<div class="registe-info">
<span class="registe-info">
<li class="fa fa-clock-o"></li>
注册时间:{{ user.registeInfo|| '2019-08-08' }}
</span>
</div>
<div class="personal-desc">
<div class="avatar-container">
<el-avatar
:size="'large'"
:src="'https://cube.elemecdn.com/3/7c/3ea6beec64369c2642b92c6726f1epng.png'"
></el-avatar>
</div>
<div class="name-role">
<span class="sender">{{ user.name }} - {{ user.role||'超级管理员' }}</span>
</div>
<div class="registe-info">
<span class="registe-info">
<li class="fa fa-clock-o"></li>
注册时间:{{ user.registeInfo|| '2019-08-08' }}
</span>
</div>
</div>
<!-- <div class="personal-relation">
<span class="relation-item">followers</span>
<span class="relation-item">watches</span>
<span class="relation-item">friends</span>
</div> -->
</div>-->
<div class="main-operation">
<span class="main-operation-item">
<el-button size="small" icon="fa fa-male" @click="openUserMsgDialog()"> 个人中心</el-button>
</span>
<span class="main-operation-item">
<el-button size="small" icon="fa fa-key"> 修改密码</el-button>
</span>
<span class="main-operation-item">
<el-button size="small" icon="fa fa-male" @click="openUserMsgDialog()">个人中心</el-button>
</span>
<span class="main-operation-item">
<el-button size="small" icon="fa fa-key">修改密码</el-button>
</span>
</div>
<div class="other-operation">
<div class="other-operation-item">
<li class="fa fa-eraser"></li>
清除缓存
</div>
<!-- <div class="other-operation-item">
<li class="fa fa-user"></li>
在线人数
</div>
<div class="other-operation-item">
<li class="fa fa-bell"></li>
访问次数
</div>
<div class="other-operation-item" @click="showBackupDialog">
<li class="fa fa-undo"></li>
{{$t("common.backupRestore")}}
</div> -->
<div class="other-operation" @click="clear">
<div class="other-operation-item">
<i class="fa fa-eraser"></i>
清除缓存
</div>
</div>
<div class="personal-footer" @click="logout">
<li class="fa fa-sign-out"></li>
<div class="personal-footer" @click="logOut">
<i class="fa fa-sign-out"></i>
注销
</div>
<!--备份还原界面-->
<!-- <backup ref="backupDialog" @afterRestore="afterRestore"></backup> -->
</div>
</template>
<script>
import Cookies from 'js-cookie'
// import Backup from "@/views/Backup/Backup"
import Avatar from 'vue-avatar'
import { mapState, mapActions } from "vuex";
import { Message, MessageBox } from "element-ui";
export default {
name: 'PersonalPanel',
components: {
// Backup
Avatar
},
name: "PersonalPanel",
props: {
user: {
type: Object,
default: {
name: 'admin',
avatar: '@/assets/user.png',
role: '超级管理员',
registeInfo: '注册时间:2018-12-25 '
name: "admin",
avatar: "@/assets/user.png",
role: "超级管理员",
registeInfo: "注册时间:2018-12-25 "
}
}
},
data () {
return {
}
computed: {
...mapState("d2admin/user", ["info"])
},
data() {
return {};
},
methods: {
// 退出登录
logout: function () {
this.$confirm('确认退出吗?', '提示', {
type: 'warning'
})
.then(() => {
sessionStorage.removeItem('user')
this.deleteCookie('token')
...mapActions("d2admin/account", ["logout"]),
/**
* @description 登出
*/
logOut() {
this.$store.commit("d2admin/gray/set", true);
MessageBox.confirm("确定要注销当前用户吗", "注销用户", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(async () => {
await this.$store.commit("d2admin/gray/set", false);
// await this.$store.dispatch('d2admin/user/set', {})
await this.logout();
this.$router.push('/login')
this.$api.login.logout().then((res) => {
}).catch(function (res) {
})
})
.catch(() => {})
},
// 删除cookie
deleteCookie: function (name) {
Cookies.remove(name)
.catch(() => {
this.$store.commit("d2admin/gray/set", false);
Message({
message: "取消注销操作"
});
});
},
// 打开备份还原界面
showBackupDialog: function () {
this.$refs.backupDialog.setBackupVisible(true)
clear(){
this.$store.commit("d2admin/gray/set", true);
MessageBox.confirm("清空缓存将重置所有个性化设置并退出到登录界面", "清空缓存", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(async () => {
await this.$store.commit("d2admin/gray/set", false);
await this.$store.dispatch('d2admin/db/set', {
dbName: 'sys',
path: '',
value: '',
user: true
})
window.location.reload()
})
.catch(() => {
this.$store.commit("d2admin/gray/set", false);
Message({
message: "取消清除缓存操作"
});
});
},
// 成功还原之后,重新登录
afterRestore: function () {
this.$refs.backupDialog.setBackupVisible(false)
sessionStorage.removeItem('user')
this.deleteCookie('token')
this.$router.push('/login')
this.$api.login.logout().then((res) => {
}).catch(function (res) {
comfirm(text,title,cancleText){
return new Promise((reject,resolve)=>{
this.$store.commit("d2admin/gray/set", true);
MessageBox.confirm(text, title, {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(async () => {
await this.$store.commit("d2admin/gray/set", false);
resolve(true)
})
.catch(() => {
this.$store.commit("d2admin/gray/set", false);
Message({
message: cancleText
});
reject()
});
})
},
// 打开个人信息弹出框
openUserMsgDialog: function () {
console.log('aaaa')
openUserMsgDialog: function() {
console.log("aaaa");
}
}
}
};
</script>
<style scoped>
......@@ -145,9 +163,9 @@ export default {
height: 80px;
border-radius: 90px;
}
.avatar-container{
display:inline-block;
align:center;
.avatar-container {
display: inline-block;
align: center;
}
.name-role {
font-size: 14px;
......@@ -178,7 +196,7 @@ export default {
margin: 4px;
}
.other-operation {
padding: 15px;
padding: 10px;
margin-right: 1px;
text-align: left;
border-color: rgba(180, 190, 190, 0.2);
......@@ -186,7 +204,7 @@ export default {
border-top-style: solid;
}
.other-operation-item {
padding:0 12px;
padding: 4px 8px;
}
.other-operation-item:hover {
cursor: pointer;
......
......@@ -28,10 +28,10 @@
<div class="d2-header-right" flex-box="0">
<!-- 如果你只想在开发环境显示这个按钮请添加 v-if="$env === 'development'" -->
<d2-header-search @click="handleSearchClick"/>
<d2-header-log />
<d2-header-size />
<d2-header-log v-if="$env === 'development'"/>
<d2-header-size v-if="$env === 'development'"/>
<d2-header-fullscreen/>
<d2-header-locales />
<d2-header-locales v-if="$env === 'development'"/>
<d2-header-theme/>
<d2-header-color/>
<d2-header-user/>
......@@ -69,7 +69,7 @@
</div>
<!-- 页面 -->
<div class="d2-theme-container-main-body" flex-box="1">
<transition :name="transitionActive ? 'fade-transverse' : ''" mode="out-in">
<transition :name="transitionActive ? 'el-fade-in' : ''" mode="linear">
<keep-alive :include="keepAlive">
<router-view/>
</keep-alive>
......@@ -126,7 +126,6 @@ export default {
}
},
mounted () {
console.log(this.keepAlive);
},
computed: {
...mapState('d2admin', {
......
// Element
import ElementUI from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'
// import 'element-ui/lib/theme-chalk/index.css'
// flex 布局库
import 'flex.css'
// 组件
import '@/components'
// svg 图标
import '@/assets/svg-icons'
//指令
import '@/directives'
// 功能插件
import pluginError from '@/plugin/error'
......
......@@ -17,7 +17,7 @@ const frameIn = [{
* 首页
*/
export const home = {
path: 'index',
path: '/index',
name: 'index',
icon: 'desktop',
meta: {
......@@ -31,7 +31,7 @@ export const home = {
export const sys = [
// 系统 前端日志
{
path: 'log',
path: '/log',
name: 'log',
meta: {
title: '前端日志',
......@@ -41,7 +41,7 @@ export const sys = [
},
// 刷新页面 必须保留
{
path: 'refresh',
path: '/refresh',
name: 'refresh',
hidden: true,
component: _import('system/function/refresh')
......@@ -60,7 +60,7 @@ export const sys = [
*/
export const resources = {
'102': {
path: 'page',
path: '/page',
icon: 'folder-o',
name: '页面',
meta: {
......@@ -68,7 +68,7 @@ export const resources = {
title: '页面',
id: '102',
pid: '0',
cache:true
cache: true
}
},
'10201': {
......@@ -79,7 +79,7 @@ export const resources = {
title: '页面 1',
id: '10201',
pid: '102',
cache:true
cache: true
},
component: _import('demo/page1')
},
......@@ -91,7 +91,7 @@ export const resources = {
title: '页面 2',
id: '10202',
pid: '102',
cache:true
cache: true
},
component: _import('demo/page2'),
auth: {
......@@ -143,7 +143,7 @@ export const resources = {
// component: _import('trafficManagement')
// },
'103': {
path: 'subSysManagement',
path: '/subSysManagement',
icon: 'th-list',
name: '子系统管理',
meta: {
......@@ -155,7 +155,7 @@ export const resources = {
component: _import('subSysManagement')
},
'104': {
path: 'trafficManagement',
path: '/trafficManagement',
icon: 'train',
name: '车辆管理',
meta: {
......@@ -167,7 +167,7 @@ export const resources = {
component: _import('trafficManagement')
},
'105': {
path: 'bb',
path: '/bb',
icon: 'file-text-o',
name: '单据管理',
meta: {
......@@ -202,7 +202,7 @@ export const resources = {
component: _import('trafficManagement')
},
'107': {
path: 'user',
path: '/user',
icon: 'users',
name: '用户管理',
meta: {
......@@ -215,7 +215,7 @@ export const resources = {
'10701': {
path: '/userManage',
name: '用户管理',
icon:'user',
icon: 'user',
meta: {
auth: true,
title: '用户管理',
......@@ -227,7 +227,7 @@ export const resources = {
'10702': {
path: '/jurisdictionManage',
name: '权限管理',
icon:'sitemap',
icon: 'sitemap',
meta: {
auth: true,
title: '权限管理',
......@@ -239,7 +239,7 @@ export const resources = {
'10703': {
path: '/loginLogs',
name: '登录日志',
icon:'file-text',
icon: 'file-text',
meta: {
auth: true,
title: '登录日志',
......@@ -249,7 +249,7 @@ export const resources = {
component: _import('userManage/loginLogs')
},
'108': {
path: 'reportingLogs',
path: '/reportingLogs',
icon: 'upload',
name: '上报日志',
meta: {
......
......@@ -34,25 +34,25 @@ export default {
{
title: 'classic',
name: 'classic',
color:'#E28B0C',
color: '#2A58AD',
preview: 'image/theme/classic/preview@2x.png'
},
{
title: 'dark',
name: 'dark',
color:'#377DE7',
color: '#314256',
preview: 'image/theme/dark/preview@2x.png'
},
{
title: 'blue',
name: 'blue',
color:'#E28B0C',
color: '#652DED',
preview: 'image/theme/blue/preview@2x.png'
},
{
title: 'plane',
name: 'plane',
color:'#377DE7',
color: '#377DE7',
backgroundImage: 'image/theme/plane/bg.jpg',
preview: 'image/theme/plane/preview@2x.png'
}
......
import { Message, MessageBox } from 'element-ui'
import util from '@/libs/util.js'
import router from '@/router'
import { AccountLogin } from '@api/sys.login'
......@@ -57,38 +56,15 @@ export default {
/**
* @description 注销
*/
async function logout () {
return new Promise(async resolve => {
// 删除cookie
util.cookies.remove('token')
util.cookies.remove('uuid')
// 清空 vuex 用户信息
await dispatch('d2admin/user/set', {}, { root: true })
// await dispatch('d2admin/user/clear', null, { root: true })
// 跳转路由
router.push({
name: 'login'
})
}
// 判断是否需要确认
if (confirm) {
commit('d2admin/gray/set', true, { root: true })
MessageBox.confirm('确定要注销当前用户吗', '注销用户', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
.then(() => {
commit('d2admin/gray/set', false, { root: true })
logout()
})
.catch(() => {
commit('d2admin/gray/set', false, { root: true })
Message({
message: '取消注销操作'
})
})
} else {
logout()
}
resolve()
})
},
/**
* @description 用户登录后从持久化数据加载一系列的设置
......
......@@ -134,7 +134,6 @@ export default {
state.opened.push(newTag)
// 如果这个页面需要缓存 将其添加到缓存设置
if (isKeepAlive(newTag)) {
console.log(newTag);
commit('keepAlivePush', tag.name)
}
// 持久化
......
......@@ -53,7 +53,7 @@ export default {
user: true
}, { root: true })
// 检查这个主题在主题列表里是否存在
let __theme= state.list.find(e => e.name === activeName)
let __theme = state.list.find(e => e.name === activeName)
if (__theme) {
state.activeName = activeName
} else {
......@@ -68,7 +68,7 @@ export default {
}, { root: true })
}
// 设置ui 颜色
await dispatch('d2admin/color/set',__theme.color,{root:true})
await dispatch('d2admin/color/set', __theme.color, { root: true })
// 将 vuex 中的主题应用到 dom
commit('dom')
// end
......
......@@ -41,6 +41,13 @@ export default {
// end
resolve()
})
},
clear ({ state, dispatch },) {
return new Promise(async resolve => {
await dispatch('set',{})
resolve()
})
}
}
}
......@@ -43,6 +43,7 @@
<auth-button label="查看" @e-auth-click="handleClick(scope.row)"/>
<auth-button label="编辑" @e-auth-click="handleClick(scope.row)"/>
<auth-button label="看不见我" @e-auth-click="handleClick(scope.row)"/>
<el-button label="222222" v-auth></el-button>
</template>
</el-table-column>
</el-table>
......@@ -52,7 +53,7 @@
<script>
export default {
name:'page2',
name: 'page2',
methods: {
handleClick (row) {
alert(JSON.stringify(row))
......@@ -60,7 +61,7 @@ export default {
},
data () {
return {
testCache:'',
testCache: '',
btn: {
lable: '测试',
action: 'test'
......
......@@ -110,7 +110,7 @@ export default {
watch: {
isVisible (val) {
this.disabled = this.editForm.subsystemCode ? true : false
this.disabled = !!this.editForm.subsystemCode
this.$refs.editRuleForm.resetFields()
}
},
......
......@@ -185,7 +185,7 @@ export default {
}
},
mounted() {
mounted () {
this.loadingGetList()
},
......@@ -212,7 +212,7 @@ export default {
this.tableLoading = false
})
},
editSubSystem(value) {
editSubSystem (value) {
const params = value
params.method = value.id ? methods.Edit : methods.Add
editApi(params).then(res => {
......
......@@ -67,7 +67,7 @@
</template>
<script>
export default {
name: "DialogReg",
name: 'DialogReg',
props: {
isVisible: {
type: Boolean,
......@@ -75,39 +75,39 @@ export default {
}
},
computed: {
dialogVisible() {
return this.isVisible;
dialogVisible () {
return this.isVisible
}
},
data() {
data () {
return {
company: [],
regForm: {
loginName: "",
password: "",
comfirm: "",
userName: "",
mobile: "",
loginName: '',
password: '',
comfirm: '',
userName: '',
mobile: '',
companyCode: [],
departName: "",
postCode: "",
stationCode: ""
departName: '',
postCode: '',
stationCode: ''
},
rules: Object.freeze({
loginName: [{ required: true, message: "用户名不能为空" }],
password: [{ required: true, message: "密码不能为空" }],
userName: [{ required: true, message: "姓名不能为空" }],
companyCode: [{ required: true, message: "用户名不能为空" }],
loginName: [{ required: true, message: "用户名不能为空" }]
loginName: [{ required: true, message: '用户名不能为空' }],
password: [{ required: true, message: '密码不能为空' }],
userName: [{ required: true, message: '姓名不能为空' }],
companyCode: [{ required: true, message: '用户名不能为空' }],
loginName: [{ required: true, message: '用户名不能为空' }]
})
};
}
},
methods: {
handleClose(done) {
this.$event.$emit("e-reg-dialog", false);
handleClose (done) {
this.$event.$emit('e-reg-dialog', false)
}
}
};
}
</script>
<style lang="scss">
$login-dialog-lable-width: 70px;
......@@ -164,4 +164,4 @@ $login-dialog-font: 13px;
width: 290px;
}
}
</style>
\ No newline at end of file
</style>
<template>
<div class="page-login">
<div class="page-login" >
<dialog-reg :isVisible="registerDialogVisible"/>
<div class="page-login--layer page-login--layer-area">
<ul class="circles">
......@@ -39,8 +39,10 @@
<el-form-item prop="username">
<el-input
type="text"
v-on:keyup.native.13="submit"
v-model="formLogin.username"
placeholder="请输入用户名">
placeholder="请输入用户名"
v-focus >
<i slot="prepend" class="fa fa-user-circle-o"></i>
</el-input>
</el-form-item>
......@@ -48,6 +50,7 @@
<el-input
type="password"
v-model="formLogin.password"
v-on:keyup.native.13="submit"
placeholder="请输入密码">
<i slot="prepend" class="fa fa-keyboard-o"></i>
</el-input>
......@@ -95,11 +98,11 @@ import dayjs from 'dayjs'
import { mapActions } from 'vuex'
export default {
components: {
'DialogReg':()=>import('./dialogReg')
'DialogReg': () => import('./dialogReg')
},
data () {
return {
registerDialogVisible:false,
registerDialogVisible: false,
timeInterval: null,
time: dayjs().format('HH:mm:ss'),
// 表单
......@@ -128,8 +131,8 @@ export default {
}
},
mounted () {
this.timeInterval = setInterval(() =>this.refreshTime(),1000)
this.$event.$on('e-reg-dialog',res => this.registerDialogVisible = res)
this.timeInterval = setInterval(() => this.refreshTime(), 1000)
this.$event.$on('e-reg-dialog', res => this.registerDialogVisible = res)
},
beforeDestroy () {
clearInterval(this.timeInterval)
......@@ -150,8 +153,8 @@ export default {
this.formLogin.password = user.password
this.submit()
},
openRegisterDialog(){
this.registerDialogVisible=!this.registerDialogVisible
openRegisterDialog () {
this.registerDialogVisible = !this.registerDialogVisible
},
/**
* @description 提交表单
......
......@@ -101,7 +101,7 @@
<script>
import EditDialog from './editDialog'
import { getListApi, methods, editApi, removeApi } from '@api/trafficManagement'
import { getListApi, methods, editApi, removeApi } from '@api/trafficManagement'
import notice from '@/common/notice'
export default {
name: 'trafficManagement',
......@@ -183,7 +183,7 @@ export default {
this.tableLoading = false
})
},
editTraffic(value) {
editTraffic (value) {
const params = value
params.method = value.id ? methods.Edit : methods.Add
editApi(params).then(res => {
......
......@@ -114,11 +114,11 @@ export default {
{
label: '登录时间',
prop: 'loginTime'
},
},
{
label: '登录用户',
prop: 'loginUser'
},
},
{
label: '姓名',
prop: 'userName'
......@@ -145,7 +145,7 @@ export default {
}
},
console: {
}
},
// 页码
......@@ -155,15 +155,15 @@ export default {
}
},
mounted() {
mounted () {
this.loadingGetList()
},
methods: {
loadingGetList() {
loadingGetList () {
this.tableLoading = true
this.getList()
},
getParams() {
getParams () {
return Object.assign(
{
pageCount: this.pageSize,
......@@ -172,23 +172,22 @@ export default {
this.searchForm
)
},
getList() {
getList () {
if (this.times.length) {
this.searchForm.beginTime = this.times[0]
this.searchForm.endTime = this.times[1]
}
const params = this.getParams()
getLoginlogs(params).then(res => {
// res.pagination && (this.total = res.pagination.totalCount)
this.tableData.data = res
console.log(this.tableData)
this.tableLoading = false
})
// res.pagination && (this.total = res.pagination.totalCount)
this.tableData.data = res
console.log(this.tableData)
this.tableLoading = false
})
.catch(err => {
this.tableLoading = false
console.log(err)
})
},
// 搜索
handleSearch () {
......
......@@ -88,7 +88,7 @@ module.exports = {
.plugin('theme-color-replacer')
.use(ThemeColorReplacer, [{
fileName: 'css/theme-colors.[contenthash:8].css',
resolveCss(resultCss) { // optional. Resolve result css code as you wish.
resolveCss (resultCss) { // optional. Resolve result css code as you wish.
return resultCss.replace(/process.env.VUE_APP_ELEMENT_COLOR/g, process.env.VUE_APP_ELEMENT_COLOR)
},
matchColors: [
......@@ -139,6 +139,11 @@ module.exports = {
args[0].cdn = cdn
return args
})
if (process.env.NODE_ENV === 'development') {
config
.plugin('webpack-bundle-analyzer')
.use(require('webpack-bundle-analyzer').BundleAnalyzerPlugin)
}
// 判断环境加入模拟数据
// const entry = config.entry('app')
// if (process.env.VUE_APP_BUILD_MODE !== 'nomock') {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!