Commit 1902227d by liimin

样式调整

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