Commit aaf61569 by cwq0219

合并

2 parents 58967e36 a8ea65da
Showing 84 changed files with 921 additions and 575 deletions
...@@ -7,10 +7,12 @@ VUE_APP_TITLE=tFIMS ...@@ -7,10 +7,12 @@ VUE_APP_TITLE=tFIMS
VUE_APP_API=http://192.168.3.171:7300/mock/5d638b3b6fbe9a0ac59d872e/tFIMS VUE_APP_API=http://192.168.3.171:7300/mock/5d638b3b6fbe9a0ac59d872e/tFIMS
# 仓库地址 # 仓库地址
VUE_APP_REPO= VUE_APP_REPO=http://192.168.3.171:7300/mock/5d638b3b6fbe9a0ac59d872e/tFIMS
# 国际化配置 # 国际化配置
VUE_APP_I18N_LOCALE=zh-chs VUE_APP_I18N_LOCALE=zh-chs
VUE_APP_I18N_FALLBACK_LOCALE=en VUE_APP_I18N_FALLBACK_LOCALE=en
VUE_APP_ELEMENT_COLOR=#409EFF
\ No newline at end of file \ No newline at end of file
VUE_APP_ELEMENT_COLOR=#409EFF
VUE_APP_MAIN_COLOR=#3D6FE4
\ No newline at end of file \ No newline at end of file
...@@ -12,9 +12,6 @@ ...@@ -12,9 +12,6 @@
"test:unit": "vue-cli-service test:unit" "test:unit": "vue-cli-service test:unit"
}, },
"dependencies": { "dependencies": {
"@d2-projects/d2-crud": "^2.1.1",
"@d2-projects/vue-table-export": "^1.0.1",
"@d2-projects/vue-table-import": "^1.0.0",
"axios": "^0.18.0", "axios": "^0.18.0",
"better-scroll": "^1.15.2", "better-scroll": "^1.15.2",
"core-js": "^2.6.5", "core-js": "^2.6.5",
...@@ -28,7 +25,6 @@ ...@@ -28,7 +25,6 @@
"js-md5": "^0.7.3", "js-md5": "^0.7.3",
"lodash": "^4.17.11", "lodash": "^4.17.11",
"lowdb": "^1.0.0", "lowdb": "^1.0.0",
"mockjs": "^1.0.1-beta3",
"nprogress": "^0.2.0", "nprogress": "^0.2.0",
"qs": "^6.7.0", "qs": "^6.7.0",
"screenfull": "^4.2.0", "screenfull": "^4.2.0",
......
No preview for this file type
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head>
<meta charset="utf-8"> <head>
<meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1.0"> <meta http-equiv="X-UA-Compatible" content="IE=edge">
<link rel="icon" href="<%= BASE_URL %>icon.ico"> <meta name="viewport" content="width=device-width,initial-scale=1.0">
<title><%= VUE_APP_TITLE %></title> <link rel="icon" href="<%= BASE_URL %>icon.ico">
<style> <!-- 使用CDN的CSS文件 -->
html, body, #app { height: 100%; margin: 0px; padding: 0px; width: 100%; } <% for (var i in htmlWebpackPlugin.options.cdn && htmlWebpackPlugin.options.cdn.css) { %>
.d2-home { background-color:#000; height: 100%; display: flex; flex-direction: column; } <link href="<%= htmlWebpackPlugin.options.cdn.css[i] %>" rel="preload" as="style" />
.d2-home__main { user-select: none; width: 100%; flex-grow: 1; display: flex; justify-content: center; align-items: center; flex-direction: column; } <link href="<%= htmlWebpackPlugin.options.cdn.css[i] %>" rel="stylesheet" />
.d2-home__footer { width: 100%; flex-grow: 0; text-align: center; padding: 1em 0; } <% } %>
.d2-home__footer > a { font-size: 12px; color: #fff; text-decoration: none; } <!-- 使用CDN的JS文件 预加载 -->
.d2-home__loading { height: 32px; width: 32px; margin-bottom: 20px; } <% for (var i in htmlWebpackPlugin.options.cdn && htmlWebpackPlugin.options.cdn.js) { %>
.d2-home__title { color: #FFF; font-size: 20px; margin-bottom: 10px; } <link href="<%= htmlWebpackPlugin.options.cdn.js[i] %>" rel="preload" as="script" />
.d2-home__sub-title { color: #fff; font-size: 14px; } <% } %>
</style> <title><%= VUE_APP_TITLE %></title>
<!-- <script> <style>
html,
body,
#app {
height: 100%;
margin: 0px;
padding: 0px;
width: 100%;
}
.d2-home {
background-color: #2A343D;
height: 100%;
display: flex;
flex-direction: column;
}
.d2-home__main {
user-select: none;
width: 100%;
flex-grow: 1;
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
}
.d2-home__footer {
width: 100%;
flex-grow: 0;
text-align: center;
padding: 1em 0;
}
.d2-home__footer>a {
font-size: 12px;
color: #fff;
text-decoration: none;
}
.d2-home__loading {
height: 32px;
width: 32px;
margin-bottom: 20px;
}
.d2-home__title {
color: #FFF;
font-size: 20px;
margin-bottom: 10px;
}
.d2-home__sub-title {
color: #fff;
font-size: 14px;
}
</style>
<!-- <script>
var _hmt = _hmt || []; var _hmt = _hmt || [];
var hmid = "1dfa88d0c8571eef2d383070cb3e5ca1"; var hmid = "1dfa88d0c8571eef2d383070cb3e5ca1";
(function() { var hm = document.createElement("script"); hm.src = "https://hm.baidu.com/hm.js?" + hmid; var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(hm, s);})(); (function() { var hm = document.createElement("script"); hm.src = "https://hm.baidu.com/hm.js?" + hmid; var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(hm, s);})();
</script> --> </script> -->
</head> </head>
<body>
<noscript> <body>
<strong> <noscript>
很抱歉,如果没有 JavaScript 支持,D2Admin 将不能正常工作。请启用浏览器的 JavaScript 然后继续。 <strong>
</strong> 很抱歉,如果没有 JavaScript 支持,D2Admin 将不能正常工作。请启用浏览器的 JavaScript 然后继续。
</noscript> </strong>
<div id="app"> </noscript>
<div class="d2-home"> <div id="app">
<div class="d2-home__main"> <div class="d2-home">
<img <div class="d2-home__main">
class="d2-home__loading" <img class="d2-home__loading" src="./image/loading/loading-spin.svg" alt="loading">
src="./image/loading/loading-spin.svg" <div class="d2-home__title">
alt="loading"> 正在加载资源
<div class="d2-home__title">
正在加载资源
</div>
<div class="d2-home__sub-title">
初次加载资源可能需要较多时间 请耐心等待
</div>
</div> </div>
<div class="d2-home__footer"> <div class="d2-home__sub-title">
<a 初次加载资源可能需要较多时间 请耐心等待
href="https://github.com/d2-projects/d2-admin"
target="_blank">
https://github.com/d2-projects/d2-admin
</a>
</div> </div>
</div> </div>
<div class="d2-home__footer">
<a href="http://www.glsx.com.cn" target="_blank">
版权所有&copy-2019 GLSX粤ICP备12020087号
</a>
</div>
</div> </div>
</body> </div>
</html> <!-- built files will be auto injected -->
<% for (var i in htmlWebpackPlugin.options.cdn && htmlWebpackPlugin.options.cdn.js) { %>
<script src="<%= htmlWebpackPlugin.options.cdn.js[i] %>"></script>
<% } %>
</body>
</html>
\ No newline at end of file \ No newline at end of file
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Author: limin * @Author: limin
* @Date: 2019-08-26 18:02:41 * @Date: 2019-08-26 18:02:41
* @Last Modified by: limin * @Last Modified by: limin
* @Last Modified time: 2019-08-28 15:04:32 * @Last Modified time: 2019-08-29 03:55:24
*/ */
import axios from '@/plugin/axios' import axios from '@/plugin/axios'
...@@ -13,8 +13,9 @@ const request = (params, method) => { ...@@ -13,8 +13,9 @@ const request = (params, method) => {
params.timestamp = new Date().getTime() params.timestamp = new Date().getTime()
params.v = '1.0.0' params.v = '1.0.0'
params.format = 'json' params.format = 'json'
const url = process.env.NODE_ENV === 'production' ? 'router' : params.method // const url = process.env.NODE_ENV === 'production' ? 'router' : params.method
// return axios.post(url, { 'params': sign(params) }) // return axios.post(url, { 'params': sign(params) })
const url = params.method
return axios({ return axios({
url, url,
method: method || 'get', method: method || 'get',
......
const userManagePath = 'fims.user.' import request from './request'
import RequestMethods from './request.methods'
const path = 'fims.user.'
const userMethods = { export function Modify (data) {
Modify: `${userManagePath}modify`, data.method = `${path}modify`
Loginlog: `${userManagePath}search.loginlog` return request(data, RequestMethods.POST)
} }
export { export function getLoginlogs (data) {
userMethods data.method = `${path}search.loginlog`
return request(data)
} }
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
html, body { html, body {
margin: 0px; margin: 0px;
height: 100%; height: 100%;
font-family: "Helvetica Neue", Helvetica, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "微软雅黑", Arial, sans-serif; font-family: 12px/150% Tahoma,Helvetica,Arial,Verdana,"Microsoft YaHei","SimSun","宋体";
#app { #app {
@extend %full; @extend %full;
a { a {
......
...@@ -16,4 +16,7 @@ ...@@ -16,4 +16,7 @@
.el-tabs__item:focus.is-active.is-focus:not(:active) { .el-tabs__item:focus.is-active.is-focus:not(:active) {
box-shadow: none !important; box-shadow: none !important;
}
.el-tabs__nav-scroll{
padding-left: 20px;
} }
\ No newline at end of file \ No newline at end of file
// 主题名称
$theme-name: 'blue';
// diff
$private-left-side-color:#652DED;
// diff
$private-menu-active-background-color:#521ADA;
$private-item-hover:rgba(#000,.2);
// 主题背景颜色
$theme-bg-color: $private-left-side-color;
// 主题背景图片遮罩
$theme-bg-mask: rgba(#000, 0);
// 主区域背景色 --- limin diff
$theme-container-main-background-color:#F5F5F5;
// container组件
$theme-container-background-color: rgba(#FFF, 1);
$theme-container-header-footer-background-color: rgb(255, 255, 255);
$theme-container-border-inner: 1px solid $color-border-1;
$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-border-color: #E7EAEC;
$theme-multiple-page-control-border-color-active: #FFF;
$theme-multiple-page-control-background-color: rgba(#FFF, .2);
$theme-multiple-page-control-background-color-active: #FFF;
// hamberg --limin diff
$theme-header-hamberg-color:#FFF;
$theme-header-hamberg-color-hover:#ccc;
// 顶栏和侧边栏中展开的菜单 hover 状态下
$theme-menu-item-color-hover: #293849;
$theme-menu-item-background-color-hover: #ecf5ff;
// 头部背景色 --- limin
$theme-header-background-color:$private-left-side-color;
//logo 背景色 --- limin
$theme-header-logo-background-color:$private-left-side-color;
// 顶栏上的文字颜色 diff
$theme-header-item-color: #FFF;
$theme-header-item-background-color: transparent;
// 顶栏上的项目在 hover 时
$theme-header-item-color-hover: #FFF;
$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);
// 顶栏上的项目在 active 时
$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-aside-item-background-color: transparent;
// 侧边栏上的项目在 hover 时
$theme-aside-item-color-hover: #FFF;
$theme-aside-item-background-color-hover: $private-item-hover;
// 侧边栏上的项目在 focus 时
$theme-aside-item-color-focus: #FFF;
$theme-aside-item-background-color-focus: rgba($private-menu-active-background-color, 1);
// 侧边栏上的项目在 active 时
$theme-aside-item-color-active: #FFF;
$theme-aside-item-background-color-active: rgba($private-menu-active-background-color, 1);
// 侧边栏菜单为空的时候显示的元素
$theme-aside-menu-empty-icon-color: #1F3147;
$theme-aside-menu-empty-text-color: #1F3147;
$theme-aside-menu-empty-background-color: rgba(#FFF, .1);
$theme-aside-menu-empty-icon-color-hover: #FFEBA4;
$theme-aside-menu-empty-text-color-hover: #FFEBA4;
$theme-aside-menu-empty-background-color-hover: rgba(#FFF, .2);
\ No newline at end of file \ No newline at end of file
// 主题名称
$theme-name: 'classic';
$private-left-side-color:#2A58AD;
$private-menu-active-background-color:#154190;
$private-item-hover:rgba(#000,.2);
// 主题背景颜色
$theme-bg-color: $private-left-side-color;
// 主题背景图片遮罩
$theme-bg-mask: rgba(#000, 0);
// 主区域背景色 --- limin
$theme-container-main-background-color:#FFF;
// container组件
$theme-container-background-color: rgba(#FFF, 1);
$theme-container-header-footer-background-color: rgb(255, 255, 255);
$theme-container-border-inner: 1px solid $color-border-1;
$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-border-color: #E7EAEC;
$theme-multiple-page-control-border-color-active: #FFF;
$theme-multiple-page-control-background-color: rgba(#FFF, .2);
$theme-multiple-page-control-background-color-active: #FFF;
// hamberg --limin
$theme-header-hamberg-color:$private-left-side-color;
$theme-header-hamberg-color-hover:#ccc;
// 顶栏和侧边栏中展开的菜单 hover 状态下
$theme-menu-item-color-hover: #293849;
$theme-menu-item-background-color-hover: #ecf5ff;
// 头部背景色 --- limin
$theme-header-background-color:#F3F3F4;
//logo 背景色 --- limin
$theme-header-logo-background-color:$private-left-side-color;
// 顶栏上的文字颜色
$theme-header-item-color: #666;
$theme-header-item-background-color: transparent;
// 顶栏上的项目在 hover 时
$theme-header-item-color-hover: #FFF;
$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);
// 顶栏上的项目在 active 时
$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-aside-item-background-color: transparent;
// 侧边栏上的项目在 hover 时
$theme-aside-item-color-hover: #FFF;
$theme-aside-item-background-color-hover: $private-item-hover;
// 侧边栏上的项目在 focus 时
$theme-aside-item-color-focus: #FFF;
$theme-aside-item-background-color-focus: rgba($private-menu-active-background-color, 1);
// 侧边栏上的项目在 active 时
$theme-aside-item-color-active: #FFF;
$theme-aside-item-background-color-active: rgba($private-menu-active-background-color, 1);
// 侧边栏菜单为空的时候显示的元素
$theme-aside-menu-empty-icon-color: #1F3147;
$theme-aside-menu-empty-text-color: #1F3147;
$theme-aside-menu-empty-background-color: rgba(#FFF, .1);
$theme-aside-menu-empty-icon-color-hover: #FFEBA4;
$theme-aside-menu-empty-text-color-hover: #FFEBA4;
$theme-aside-menu-empty-background-color-hover: rgba(#FFF, .2);
\ No newline at end of file \ No newline at end of file
// 主题名称
$theme-name: 'd2';
// 主题背景颜色
$theme-bg-color: #ebf1f6;
// 主题背景图片遮罩
$theme-bg-mask: rgba(#000, 0);
// container组件
$theme-container-background-color: rgba(#FFF, 1);
$theme-container-header-footer-background-color: #FFF;
$theme-container-border-inner: 1px solid #cfd7e5;
$theme-container-border-outer: 1px solid #cfd7e5;
$theme-multiple-page-control-color: $color-text-normal;
$theme-multiple-page-control-color-active: #2f74ff;
$theme-multiple-page-control-nav-prev-color: #cfd7e5;
$theme-multiple-page-control-nav-next-color: #cfd7e5;
$theme-multiple-page-control-border-color: #cfd7e5;
$theme-multiple-page-control-border-color-active: #FFF;
$theme-multiple-page-control-background-color: rgba(#000, .03);
$theme-multiple-page-control-background-color-active: #FFF;
// 顶栏和侧边栏中展开的菜单 hover 状态下
$theme-menu-item-color-hover: #293849;
$theme-menu-item-background-color-hover: #ecf5ff;
// 顶栏上的文字颜色
$theme-header-item-color: $color-text-normal;
$theme-header-item-background-color: transparent;
// 顶栏上的项目在 hover 时
$theme-header-item-color-hover: #2f74ff;
$theme-header-item-background-color-hover: rgba(#FFF, .5);
// 顶栏上的项目在 focus 时
$theme-header-item-color-focus: #2f74ff;
$theme-header-item-background-color-focus: rgba(#FFF, .5);
// 顶栏上的项目在 active 时
$theme-header-item-color-active: #2f74ff;
$theme-header-item-background-color-active: rgba(#FFF, .5);
// 侧边栏上的文字颜色
$theme-aside-item-color: $color-text-normal;
$theme-aside-item-background-color: transparent;
// 侧边栏上的项目在 hover 时
$theme-aside-item-color-hover: #2f74ff;
$theme-aside-item-background-color-hover: rgba(#FFF, .5);
// 侧边栏上的项目在 focus 时
$theme-aside-item-color-focus: #2f74ff;
$theme-aside-item-background-color-focus: rgba(#FFF, .5);
// 侧边栏上的项目在 active 时
$theme-aside-item-color-active: #2f74ff;
$theme-aside-item-background-color-active: rgba(#FFF, .5);
// 侧边栏菜单为空的时候显示的元素
$theme-aside-menu-empty-icon-color: $color-text-normal;
$theme-aside-menu-empty-text-color: $color-text-normal;
$theme-aside-menu-empty-background-color: rgba(#000, .03);
$theme-aside-menu-empty-icon-color-hover: $color-text-main;
$theme-aside-menu-empty-text-color-hover: $color-text-main;
$theme-aside-menu-empty-background-color-hover: rgba(#000, .05);
\ No newline at end of file \ No newline at end of file
// 主题名称 // 主题名称
$theme-name: 'tomorrow-night-blue'; $theme-name: 'dark';
$private-left-side-color:#314256;
$private-menu-active-background-color:#1F3147;
$private-item-hover:rgba(#000,.2);
// 主题背景颜色 // 主题背景颜色
$theme-bg-color: #002253; $theme-bg-color: $private-left-side-color;
// 主题背景图片遮罩 // 主题背景图片遮罩
$theme-bg-mask: rgba(#000, 0); $theme-bg-mask: rgba(#000, 0);
// 主区域背景色 --- limin
$theme-container-main-background-color:#F5F5F5;
// container组件 // container组件
$theme-container-background-color: rgba(#FFF, 1); $theme-container-background-color: rgba(#FFF, 1);
$theme-container-header-footer-background-color: #FFF; $theme-container-header-footer-background-color: #FFF;
$theme-container-border-inner: 1px solid $color-border-1; $theme-container-border-inner: 1px solid $color-border-1;
$theme-container-border-outer: 1px solid #002253; $theme-container-border-outer: 1px solid #E7EAEC;
$theme-multiple-page-control-color: #FFF; $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: #FFF;
$theme-multiple-page-control-nav-next-color: #FFF; $theme-multiple-page-control-nav-next-color: #FFF;
$theme-multiple-page-control-border-color: #002253; $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);
$theme-multiple-page-control-background-color-active: #FFF; $theme-multiple-page-control-background-color-active: #FFF;
// hamberg --limin
$theme-header-hamberg-color:#FFF;
$theme-header-hamberg-color-hover:#ccc;
// 顶栏和侧边栏中展开的菜单 hover 状态下 // 顶栏和侧边栏中展开的菜单 hover 状态下
$theme-menu-item-color-hover: #293849; $theme-menu-item-color-hover: #293849;
$theme-menu-item-background-color-hover: #ecf5ff; $theme-menu-item-background-color-hover: #ecf5ff;
// 头部背景色 --- limin
$theme-header-background-color:#3B4F67;
//logo 背景色 --- limin
$theme-header-logo-background-color:$private-left-side-color;
// 顶栏上的文字颜色 // 顶栏上的文字颜色
$theme-header-item-color: #FF929A; $theme-header-item-color: #C4D0DF;
$theme-header-item-background-color: transparent; $theme-header-item-background-color: transparent;
// 顶栏上的项目在 hover 时 // 顶栏上的项目在 hover 时
$theme-header-item-color-hover: #FFEBA4; $theme-header-item-color-hover: #FFF;
$theme-header-item-background-color-hover: rgba(#FFF, .05); $theme-header-item-background-color-hover: $private-item-hover;
// 顶栏上的项目在 focus 时 // 顶栏上的项目在 focus 时
$theme-header-item-color-focus: #FFB870; $theme-header-item-color-focus: #FFF;
$theme-header-item-background-color-focus: rgba(#FFF, .05); $theme-header-item-background-color-focus: rgba($private-menu-active-background-color, 1);
// 顶栏上的项目在 active 时 // 顶栏上的项目在 active 时
$theme-header-item-color-active: #FFB870; $theme-header-item-color-active: #FFF;
$theme-header-item-background-color-active: rgba(#FFF, .05); $theme-header-item-background-color-active: rgba($private-menu-active-background-color, 1);
// 侧边栏上的文字颜色 // 侧边栏上的文字颜色
$theme-aside-item-color: #FF929A; $theme-aside-item-color: #C4D0DF;
$theme-aside-item-background-color: transparent; $theme-aside-item-background-color: transparent;
// 侧边栏上的项目在 hover 时 // 侧边栏上的项目在 hover 时
$theme-aside-item-color-hover: #FFEBA4; $theme-aside-item-color-hover: #FFF;
$theme-aside-item-background-color-hover: rgba(#FFF, .05); $theme-aside-item-background-color-hover: $private-item-hover;
// 侧边栏上的项目在 focus 时 // 侧边栏上的项目在 focus 时
$theme-aside-item-color-focus: #FFB870; $theme-aside-item-color-focus: #FFF;
$theme-aside-item-background-color-focus: rgba(#FFF, .05); $theme-aside-item-background-color-focus: rgba($private-menu-active-background-color, 1);
// 侧边栏上的项目在 active 时 // 侧边栏上的项目在 active 时
$theme-aside-item-color-active: #FFB870; $theme-aside-item-color-active: #FFF;
$theme-aside-item-background-color-active: rgba(#FFF, .05); $theme-aside-item-background-color-active: rgba($private-menu-active-background-color, 1);
// 侧边栏菜单为空的时候显示的元素 // 侧边栏菜单为空的时候显示的元素
$theme-aside-menu-empty-icon-color: #FFB870; $theme-aside-menu-empty-icon-color: #1F3147;
$theme-aside-menu-empty-text-color: #FFB870; $theme-aside-menu-empty-text-color: #1F3147;
$theme-aside-menu-empty-background-color: rgba(#FFF, .1); $theme-aside-menu-empty-background-color: rgba(#FFF, .1);
$theme-aside-menu-empty-icon-color-hover: #FFEBA4; $theme-aside-menu-empty-icon-color-hover: #FFEBA4;
$theme-aside-menu-empty-text-color-hover: #FFEBA4; $theme-aside-menu-empty-text-color-hover: #FFEBA4;
......
// 主题名称
$theme-name: 'line';
// 主题背景颜色
$theme-bg-color: #f8f8f9;
// 主题背景图片遮罩
$theme-bg-mask: rgba(#000, 0);
// container组件
$theme-container-background-color: rgba(#FFF, .8);
$theme-container-header-footer-background-color: #FFF;
$theme-container-border-inner: 1px solid $color-border-2;
$theme-container-border-outer: 1px solid #cfd7e5;
$theme-multiple-page-control-color: #FFF;
$theme-multiple-page-control-color-active: $color-text-normal;
$theme-multiple-page-control-nav-prev-color: #cfd7e5;
$theme-multiple-page-control-nav-next-color: #cfd7e5;
$theme-multiple-page-control-border-color: #cfd7e5;
$theme-multiple-page-control-border-color-active: #FFF;
$theme-multiple-page-control-background-color: #cfd7e5;
$theme-multiple-page-control-background-color-active: #FFF;
// 顶栏和侧边栏中展开的菜单 hover 状态下
$theme-menu-item-color-hover: #293849;
$theme-menu-item-background-color-hover: #EFEFEF;
// 顶栏上的文字颜色
$theme-header-item-color: $color-text-normal;
$theme-header-item-background-color: transparent;
// 顶栏上的项目在 hover 时
$theme-header-item-color-hover: $color-text-main;
$theme-header-item-background-color-hover: rgba(#000, .02);
// 顶栏上的项目在 focus 时
$theme-header-item-color-focus: $color-text-main;
$theme-header-item-background-color-focus: rgba(#000, .02);
// 顶栏上的项目在 active 时
$theme-header-item-color-active: $color-text-main;
$theme-header-item-background-color-active: rgba(#000, .03);
// 侧边栏上的文字颜色
$theme-aside-item-color: $color-text-normal;
$theme-aside-item-background-color: transparent;
// 侧边栏上的项目在 hover 时
$theme-aside-item-color-hover: $color-text-main;
$theme-aside-item-background-color-hover: rgba(#000, .02);
// 侧边栏上的项目在 focus 时
$theme-aside-item-color-focus: $color-text-main;
$theme-aside-item-background-color-focus: rgba(#000, .02);
// 侧边栏上的项目在 active 时
$theme-aside-item-color-active: $color-text-main;
$theme-aside-item-background-color-active: rgba(#000, .03);
// 侧边栏菜单为空的时候显示的元素
$theme-aside-menu-empty-icon-color: $color-text-normal;
$theme-aside-menu-empty-text-color: $color-text-normal;
$theme-aside-menu-empty-background-color: rgba(#000, .03);
$theme-aside-menu-empty-icon-color-hover: $color-text-main;
$theme-aside-menu-empty-text-color-hover: $color-text-main;
$theme-aside-menu-empty-background-color-hover: rgba(#000, .05);
\ No newline at end of file \ No newline at end of file
// 主题名称
$theme-name: 'plane';
// diff
$private-left-side-color:transparent;
// diff
$private-menu-active-background-color:#002253;
$private-item-hover:rgba(#000,.2);
// 主题背景颜色
$theme-bg-color: $private-left-side-color;
// 主题背景图片遮罩
$theme-bg-mask: rgba(#000, 0);
// 主区域背景色 --- limin diff
$theme-container-main-background-color:transparent;
// container组件
$theme-container-background-color: rgba(#FFF, 1);
$theme-container-header-footer-background-color: rgb(255, 255, 255);
$theme-container-border-inner: 1px solid $color-border-1;
$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-border-color: #E7EAEC;
$theme-multiple-page-control-border-color-active: #FFF;
$theme-multiple-page-control-background-color: rgba(#FFF, .8);
$theme-multiple-page-control-background-color-active: #FFF;
// hamberg --limin diff
$theme-header-hamberg-color:#FFF;
$theme-header-hamberg-color-hover:#ccc;
// 顶栏和侧边栏中展开的菜单 hover 状态下
$theme-menu-item-color-hover: #293849;
$theme-menu-item-background-color-hover: #ecf5ff;
// 头部背景色 --- limin
$theme-header-background-color:$private-left-side-color;
//logo 背景色 --- limin
$theme-header-logo-background-color:$private-left-side-color;
// 顶栏上的文字颜色 diff
$theme-header-item-color: #FFF;
$theme-header-item-background-color: transparent;
// 顶栏上的项目在 hover 时
$theme-header-item-color-hover: #FFF;
$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);
// 顶栏上的项目在 active 时
$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-aside-item-background-color: transparent;
// 侧边栏上的项目在 hover 时
$theme-aside-item-color-hover: #FFF;
$theme-aside-item-background-color-hover: $private-item-hover;
// 侧边栏上的项目在 focus 时
$theme-aside-item-color-focus: #FFF;
$theme-aside-item-background-color-focus: rgba($private-menu-active-background-color, 1);
// 侧边栏上的项目在 active 时
$theme-aside-item-color-active: #FFF;
$theme-aside-item-background-color-active: rgba($private-menu-active-background-color, 1);
// 侧边栏菜单为空的时候显示的元素
$theme-aside-menu-empty-icon-color: #1F3147;
$theme-aside-menu-empty-text-color: #1F3147;
$theme-aside-menu-empty-background-color: rgba(#FFF, .1);
$theme-aside-menu-empty-icon-color-hover: #FFEBA4;
$theme-aside-menu-empty-text-color-hover: #FFEBA4;
$theme-aside-menu-empty-background-color-hover: rgba(#FFF, .2);
\ No newline at end of file \ No newline at end of file
@import '~@/assets/style/theme/theme-base.scss'; @import '~@/assets/style/theme/theme-base.scss';
@import '~@/assets/style/theme/d2/index.scss';
@import '~@/assets/style/theme/line/index.scss';
@import '~@/assets/style/theme/star/index.scss';
@import '~@/assets/style/theme/tomorrow-night-blue/index.scss';
@import '~@/assets/style/theme/violet/index.scss';
\ No newline at end of file \ No newline at end of file
// @import '~@/assets/style/theme/d2/index.scss';
// @import '~@/assets/style/theme/line/index.scss';
// @import '~@/assets/style/theme/star/index.scss';
// @import '~@/assets/style/theme/tomorrow-night-blue/index.scss';
// @import '~@/assets/style/theme/violet/index.scss';
@import '~@/assets/style/theme/classic/index.scss';
@import '~@/assets/style/theme/dark/index.scss';
@import '~@/assets/style/theme/blue/index.scss';
@import '~@/assets/style/theme/plane/index.scss';
\ No newline at end of file \ No newline at end of file
// 主题名称
$theme-name: 'star';
// 主题背景颜色
$theme-bg-color: #EFF4F8;
// 主题背景图片遮罩
$theme-bg-mask: rgba(#000, .3);
// container组件
$theme-container-background-color: rgba(#FFF, .9);
$theme-container-header-footer-background-color: #FFF;
$theme-container-border-inner: 1px solid $color-border-1;
$theme-container-border-outer: 1px solid #114450;
$theme-multiple-page-control-color: #FFF;
$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-border-color: #114450;
$theme-multiple-page-control-border-color-active: #FFF;
$theme-multiple-page-control-background-color: rgba(#FFF, .5);
$theme-multiple-page-control-background-color-active: #FFF;
// 顶栏和侧边栏中展开的菜单 hover 状态下
$theme-menu-item-color-hover: #293849;
$theme-menu-item-background-color-hover: #ecf5ff;
// 顶栏上的文字颜色
$theme-header-item-color: #FFF;
$theme-header-item-background-color: transparent;
// 顶栏上的项目在 hover 时
$theme-header-item-color-hover: #FFF;
$theme-header-item-background-color-hover: rgba(#000, .2);
// 顶栏上的项目在 focus 时
$theme-header-item-color-focus: #FFF;
$theme-header-item-background-color-focus: rgba(#000, .2);
// 顶栏上的项目在 active 时
$theme-header-item-color-active: #FFF;
$theme-header-item-background-color-active: rgba(#000, .3);
// 侧边栏上的文字颜色
$theme-aside-item-color: #FFF;
$theme-aside-item-background-color: transparent;
// 侧边栏上的项目在 hover 时
$theme-aside-item-color-hover: #FFF;
$theme-aside-item-background-color-hover: rgba(#000, .2);
// 侧边栏上的项目在 focus 时
$theme-aside-item-color-focus: #FFF;
$theme-aside-item-background-color-focus: rgba(#000, .2);
// 侧边栏上的项目在 active 时
$theme-aside-item-color-active: #FFF;
$theme-aside-item-background-color-active: rgba(#000, .3);
// 侧边栏菜单为空的时候显示的元素
$theme-aside-menu-empty-icon-color: #FFF;
$theme-aside-menu-empty-text-color: #FFF;
$theme-aside-menu-empty-background-color: rgba(#FFF, .2);
$theme-aside-menu-empty-icon-color-hover: #FFF;
$theme-aside-menu-empty-text-color-hover: #FFF;
$theme-aside-menu-empty-background-color-hover: rgba(#FFF, .3);
\ No newline at end of file \ No newline at end of file
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
.d2-layout-header-aside-content { .d2-layout-header-aside-content {
@extend %full; @extend %full;
.d2-theme-header { .d2-theme-header {
height: 60px; height: 58px;
.d2-theme-header-menu { .d2-theme-header-menu {
overflow: hidden; overflow: hidden;
&.is-scrollable { &.is-scrollable {
...@@ -87,7 +87,7 @@ ...@@ -87,7 +87,7 @@
overflow: hidden; overflow: hidden;
.d2-theme-container-main-layer { .d2-theme-container-main-layer {
position: absolute; position: absolute;
top: 0px; top: 2px;
bottom: 0px; bottom: 0px;
left: 0px; left: 0px;
right: 0px; right: 0px;
...@@ -120,23 +120,14 @@ ...@@ -120,23 +120,14 @@
float: left; float: left;
text-align: center; text-align: center;
img { img {
height: 60px; height: 65px;
transform: translateX(-16px);
} }
} }
// 折叠侧边栏切换按钮 // 折叠侧边栏切换按钮
// .toggle-aside-btn { .toggle-aside-btn {
// float: left; margin-left: 26px;
// height: 60px; }
// width: 60px;
// display: flex;
// justify-content: center;
// align-items: center;
// @extend %unable-select;
// i {
// font-size: 20px;
// margin-top: 4px;
// }
// }
// [菜单] 顶栏 // [菜单] 顶栏
.el-menu { .el-menu {
float: left; float: left;
......
...@@ -63,6 +63,10 @@ ...@@ -63,6 +63,10 @@
// 顶栏 // 顶栏
.d2-theme-header { .d2-theme-header {
background-color: $theme-header-background-color;
.d2-theme-header-logo{
background-color: $theme-header-logo-background-color
}
// 顶栏菜单空间不足时显示的滚动控件 // 顶栏菜单空间不足时显示的滚动控件
.d2-theme-header-menu { .d2-theme-header-menu {
.d2-theme-header-menu__prev, .d2-theme-header-menu__next { .d2-theme-header-menu__prev, .d2-theme-header-menu__next {
...@@ -77,10 +81,10 @@ ...@@ -77,10 +81,10 @@
// 切换按钮 // 切换按钮
.toggle-aside-btn { .toggle-aside-btn {
// i { // i {
fill: $theme-header-item-color; fill: $theme-header-hamberg-color;
background: $theme-header-item-background-color; background: $theme-header-item-background-color;
&:hover { &:hover {
fill: $theme-header-item-color-hover; fill: $theme-header-hamberg-color-hover;
} }
// } // }
} }
...@@ -236,6 +240,7 @@ ...@@ -236,6 +240,7 @@
} }
} }
.d2-theme-container-main { .d2-theme-container-main {
background-color: $theme-container-main-background-color;
// 主体部分分为多页面控制器 和主体 // 主体部分分为多页面控制器 和主体
.d2-theme-container-main-header { .d2-theme-container-main-header {
// 多页面控制器 // 多页面控制器
......
@import './setting.scss';
@import '../theme.scss';
.theme-#{$theme-name} {
.d2-layout-header-aside-group {
background: #bc00e3;
background: linear-gradient(120deg, #bc00e3 0%, #4EFFFB 100%);
}
}
\ No newline at end of file \ No newline at end of file
// 主题名称
$theme-name: 'violet';
// 主题背景颜色
$theme-bg-color: #000;
// 主题背景图片遮罩
$theme-bg-mask: rgba(#000, 0);
// container组件
$theme-container-background-color: #FFF;
$theme-container-header-footer-background-color: #FFF;
$theme-container-border-inner: 1px solid $color-border-2;
$theme-container-border-outer: 1px solid #8C40E2;
$theme-multiple-page-control-color: #FFF;
$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-border-color: #8C40E2;
$theme-multiple-page-control-border-color-active: #FFF;
$theme-multiple-page-control-background-color: rgba(#FFF, .3);
$theme-multiple-page-control-background-color-active: #FFF;
// 顶栏和侧边栏中展开的菜单 hover 状态下
$theme-menu-item-color-hover: #293849;
$theme-menu-item-background-color-hover: #ecf5ff;
// 顶栏上的文字颜色
$theme-header-item-color: #FFF;
$theme-header-item-background-color: transparent;
// 顶栏上的项目在 hover 时
$theme-header-item-color-hover: #FFF;
$theme-header-item-background-color-hover: linear-gradient(-180deg, rgba(255,255,255,0.18) 0%, rgba(255,255,255,0.12) 100%);
// 顶栏上的项目在 focus 时
$theme-header-item-color-focus: #FFF;
$theme-header-item-background-color-focus: linear-gradient(-180deg, rgba(255,255,255,0.18) 0%, rgba(255,255,255,0.12) 100%);
// 顶栏上的项目在 active 时
$theme-header-item-color-active: #FFF;
$theme-header-item-background-color-active: linear-gradient(-180deg, rgba(255,255,255,0.18) 0%, rgba(255,255,255,0.12) 100%);
// 侧边栏上的文字颜色
$theme-aside-item-color: #FFF;
$theme-aside-item-background-color: transparent;
// 侧边栏上的项目在 hover 时
$theme-aside-item-color-hover: #FFF;
$theme-aside-item-background-color-hover: linear-gradient(90deg, rgba(255,255,255,0.28) 0%, rgba(255,255,255,0.00) 100%);
// 侧边栏上的项目在 focus 时
$theme-aside-item-color-focus: #FFF;
$theme-aside-item-background-color-focus: linear-gradient(90deg, rgba(255,255,255,0.28) 0%, rgba(255,255,255,0.00) 100%);
// 侧边栏上的项目在 active 时
$theme-aside-item-color-active: #FFF;
$theme-aside-item-background-color-active: linear-gradient(90deg, rgba(255,255,255,0.28) 0%, rgba(255,255,255,0.00) 100%);
// 侧边栏菜单为空的时候显示的元素
$theme-aside-menu-empty-icon-color: #FFF;
$theme-aside-menu-empty-text-color: #FFF;
$theme-aside-menu-empty-background-color: rgba(#000, .1);
$theme-aside-menu-empty-icon-color-hover: #FFF;
$theme-aside-menu-empty-text-color-hover: #FFF;
$theme-aside-menu-empty-background-color-hover: rgba(#000, .15);
\ No newline at end of file \ No newline at end of file
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
</template> </template>
<script> <script>
import {mapGetters} from 'vuex' import { mapGetters } from 'vuex'
export default { export default {
name: 'AuthButton', name: 'AuthButton',
props: { props: {
...@@ -43,20 +43,18 @@ export default { ...@@ -43,20 +43,18 @@ export default {
}, },
data () { data () {
return { return {
isInRole:false isInRole: false
} }
}, },
created () { created () {
// this.$vrm.setRoles(this.btnIdAll) // this.$vrm.setRoles(this.btnIdAll)
const {action,operation} = this.curBtns const { action, operation } = this.curBtns
this.isInRole = [...action,...operation].find(obj=>obj.id===this.id||obj.label===this.label) this.isInRole = [...action, ...operation].find(obj => obj.id === this.id || obj.label === this.label)
}, },
methods: { methods: {
handleClick: function () { handleClick: function () {
this.$emit('e-auth-click', {}) this.$emit('e-auth-click', {})
} }
},
mounted () {
} }
} }
</script> </script>
......
...@@ -25,13 +25,14 @@ ...@@ -25,13 +25,14 @@
v-if="activeName === scope.row.name" v-if="activeName === scope.row.name"
type="success" type="success"
icon="el-icon-check" icon="el-icon-check"
class="btn-active-success"
round> round>
已激活 已激活
</el-button> </el-button>
<el-button <el-button
v-else v-else
round round
@click="handleSelectTheme(scope.row.name)"> @click="handleSelectTheme(scope.row)">
使用 使用
</el-button> </el-button>
</template> </template>
...@@ -61,8 +62,11 @@ export default { ...@@ -61,8 +62,11 @@ export default {
...mapActions('d2admin/theme', [ ...mapActions('d2admin/theme', [
'set' 'set'
]), ]),
handleSelectTheme (name) { ...mapActions('d2admin/color',{ setColor:'set'}),
handleSelectTheme (row) {
const {name,color} = row
this.set(name) this.set(name)
this.setColor(color)
} }
} }
} }
...@@ -77,3 +81,10 @@ export default { ...@@ -77,3 +81,10 @@ export default {
border: 1px solid $color-border-1; border: 1px solid $color-border-1;
} }
</style> </style>
<style lang="scss">
.btn-active-success{
&:hover{
background-color: "#67C23A" !important;
}
}
</style>
...@@ -57,7 +57,7 @@ ...@@ -57,7 +57,7 @@
</template> </template>
<script> <script>
// import { ctMethods, request } from '@/api' import { Modify } from '@api/userManage'
export default { export default {
name: 'PasswordDialog', name: 'PasswordDialog',
components: { components: {
...@@ -122,11 +122,6 @@ export default { ...@@ -122,11 +122,6 @@ export default {
// } // }
// } // }
}, },
watch: {
},
mounted () {
},
methods: { methods: {
// getPersonalType() { // getPersonalType() {
// const params = {} // const params = {}
...@@ -156,17 +151,13 @@ export default { ...@@ -156,17 +151,13 @@ export default {
this.passwordDialogVisible = false this.passwordDialogVisible = false
}, },
mergePassWord (params) { // mergePassWord (params) {
// mergeBg // Modify(params)
// .req(params) // .then(res => {
// .then(res => {
// this.$message({ // })
// message: '密码已修改', // .catch(err => console.log(err))
// type: 'success' // }
// });
// })
// .catch(err => console.log(err))
}
} }
} }
......
...@@ -122,8 +122,6 @@ export default { ...@@ -122,8 +122,6 @@ export default {
// } // }
// } // }
}, },
mounted () {
},
methods: { methods: {
// getPersonalType() { // getPersonalType() {
// const params = {} // const params = {}
......
...@@ -120,8 +120,6 @@ export default { ...@@ -120,8 +120,6 @@ export default {
openUserMsgDialog: function () { openUserMsgDialog: function () {
console.log('aaaa') console.log('aaaa')
} }
},
mounted () {
} }
} }
</script> </script>
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
}" }"
flex-box="0" flex-box="0"
flex> flex>
<div class="logo-group" :style="{width: asideCollapse ? asideWidthCollapse : asideWidth}" flex-box="0"> <div class="logo-group d2-theme-header-logo" :style="{width: asideCollapse ? asideWidthCollapse : asideWidth}" flex-box="0">
<img v-if="asideCollapse" :src="`${$baseUrl}image/theme/${themeActiveSetting.name}/logo/icon-only.png`"> <img v-if="asideCollapse" :src="`${$baseUrl}image/theme/${themeActiveSetting.name}/logo/icon-only.png`">
<img v-else :src="`${$baseUrl}image/theme/${themeActiveSetting.name}/logo/all.png`"> <img v-else :src="`${$baseUrl}image/theme/${themeActiveSetting.name}/logo/all.png`">
</div> </div>
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
<!-- 如果你只想在开发环境显示这个按钮请添加 v-if="$env === 'development'" --> <!-- 如果你只想在开发环境显示这个按钮请添加 v-if="$env === 'development'" -->
<d2-header-search @click="handleSearchClick"/> <d2-header-search @click="handleSearchClick"/>
<d2-header-log /> <d2-header-log />
<!-- <d2-header-size /> --> <d2-header-size />
<d2-header-fullscreen/> <d2-header-fullscreen/>
<d2-header-locales /> <d2-header-locales />
<d2-header-theme/> <d2-header-theme/>
...@@ -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="in-out"> <transition :name="transitionActive ? 'fade-transverse' : ''" mode="out-in">
<keep-alive :include="keepAlive"> <keep-alive :include="keepAlive">
<router-view/> <router-view/>
</keep-alive> </keep-alive>
...@@ -125,6 +125,9 @@ export default { ...@@ -125,6 +125,9 @@ export default {
asideWidthCollapse: '65px' asideWidthCollapse: '65px'
} }
}, },
mounted () {
console.log(this.keepAlive);
},
computed: { computed: {
...mapState('d2admin', { ...mapState('d2admin', {
keepAlive: state => state.page.keepAlive, keepAlive: state => state.page.keepAlive,
......
...@@ -82,28 +82,28 @@ util.deepFind = function (menus, id) { ...@@ -82,28 +82,28 @@ util.deepFind = function (menus, id) {
* @param {*} alpha 透明度 * @param {*} alpha 透明度
*/ */
util.colorToRgb = (sColor, alpha) => { util.colorToRgb = (sColor, alpha) => {
var reg = /^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/ var reg = /^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/
sColor = sColor.toLowerCase() sColor = sColor.toLowerCase()
if (sColor && reg.test(sColor)) { if (sColor && reg.test(sColor)) {
if (sColor.length === 4) { if (sColor.length === 4) {
var sColorNew = '#' var sColorNew = '#'
for (var i = 1; i < 4; i += 1) { for (var i = 1; i < 4; i += 1) {
sColorNew += sColor.slice(i, i + 1).concat(sColor.slice(i, i + 1)) sColorNew += sColor.slice(i, i + 1).concat(sColor.slice(i, i + 1))
} }
sColor = sColorNew sColor = sColorNew
} }
// 处理六位的颜色值 // 处理六位的颜色值
var sColorChange = [] var sColorChange = []
for (let i = 1; i < 7; i += 2) { for (let i = 1; i < 7; i += 2) {
sColorChange.push(parseInt('0x' + sColor.slice(i, i + 2))) sColorChange.push(parseInt('0x' + sColor.slice(i, i + 2)))
} }
if (alpha || alpha === 0 || alpha === '0') { if (alpha || alpha === 0 || alpha === '0') {
return `rgba(${sColorChange.join(',')} ,${alpha})` return `rgba(${sColorChange.join(',')} ,${alpha})`
} }
return `rgb(${sColorChange.join(',')})` return `rgb(${sColorChange.join(',')})`
} else { } else {
return sColor return sColor
} }
} }
export default util export default util
...@@ -14,23 +14,23 @@ permision.packRoutesBtns = function (resources, idsInPermision) { ...@@ -14,23 +14,23 @@ permision.packRoutesBtns = function (resources, idsInPermision) {
if (!resources || !idsInPermision || !idsInPermision.length) { if (!resources || !idsInPermision || !idsInPermision.length) {
throw new Error('参数错误') throw new Error('参数错误')
} }
let __aRouteInPermision = [], let __aRouteInPermision = []
__oBtnInPermision = {}, let __oBtnInPermision = {}
// __aBtnIdAll=[], // __aBtnIdAll=[],
__objResource = null let __objResource = null
idsInPermision.forEach(obj => { idsInPermision.forEach(obj => {
__objResource = resources[obj.id] __objResource = resources[obj.id]
if(__objResource){//直接能取到的为路由 (也可以在routes 中定标识变量) if (__objResource) { // 直接能取到的为路由 (也可以在routes 中定标识变量)
__aRouteInPermision.push(resources[obj.id])//push 进 路由数组 __aRouteInPermision.push(resources[obj.id])// push 进 路由数组
}else{ //如果取不到 判断是否有父节点 并且父节点是否有auth属性 有 则视为按钮 (同样可以定义标识变量) } else { // 如果取不到 判断是否有父节点 并且父节点是否有auth属性 有 则视为按钮 (同样可以定义标识变量)
__objResource = resources[obj.pid] __objResource = resources[obj.pid]
if(__objResource && __objResource.auth && !__oBtnInPermision[obj.pid]){ if (__objResource && __objResource.auth && !__oBtnInPermision[obj.pid]) {
__oBtnInPermision[obj.pid]=__objResource.auth __oBtnInPermision[obj.pid] = __objResource.auth
// __aBtnIdAll = __aBtnIdAll.concat([...__objResource.auth.action.map(o=>o.id),...__objResource.auth.operation.map(o=>o.id)]) // __aBtnIdAll = __aBtnIdAll.concat([...__objResource.auth.action.map(o=>o.id),...__objResource.auth.operation.map(o=>o.id)])
} }
} }
}) })
return {'route':__aRouteInPermision,'btn':__oBtnInPermision} return { 'route': __aRouteInPermision, 'btn': __oBtnInPermision }
} }
/** /**
...@@ -49,12 +49,12 @@ permision.packAsideMenus = function (resources, idsInPermision) { ...@@ -49,12 +49,12 @@ permision.packAsideMenus = function (resources, idsInPermision) {
*/ */
idsInPermision.forEach(obj => { idsInPermision.forEach(obj => {
const __oMenu = permision.format2Menu(resources[obj.id]) const __oMenu = permision.format2Menu(resources[obj.id])
if(!__oMenu){ //不存在 可能是 按钮 直接继续循环 if (!__oMenu) { // 不存在 可能是 按钮 直接继续循环
return true return true
} }
if (obj.pid === '0') {//取出1级菜单 if (obj.pid === '0') { // 取出1级菜单
__aMenusInPermision.push(__oMenu) __aMenusInPermision.push(__oMenu)
} else {//取出子菜单 } else { // 取出子菜单
__aSub.push(__oMenu) __aSub.push(__oMenu)
} }
}) })
...@@ -77,7 +77,7 @@ permision.packAsideMenus = function (resources, idsInPermision) { ...@@ -77,7 +77,7 @@ permision.packAsideMenus = function (resources, idsInPermision) {
* 格式化菜单 封装成系统所需格式 * 格式化菜单 封装成系统所需格式
*/ */
permision.format2Menu = function (oMenu) { permision.format2Menu = function (oMenu) {
if(!oMenu) return null if (!oMenu) return null
const { icon, path, meta } = oMenu const { icon, path, meta } = oMenu
const { title, id, pid } = meta const { title, id, pid } = meta
return { title, icon, path, id, pid } return { title, icon, path, id, pid }
......
...@@ -7,37 +7,37 @@ import d2Admin from '@/plugin/d2admin' ...@@ -7,37 +7,37 @@ import d2Admin from '@/plugin/d2admin'
// store // store
import store from '@/store/index' import store from '@/store/index'
import D2Crud from '@d2-projects/d2-crud' // import D2Crud from '@d2-projects/d2-crud'
// 菜单和路由设置 // 菜单和路由设置
import router from './router' import router from './router'
// import menuHeader from '@/menu/header' // import menuHeader from '@/menu/header'
// import menuAside from '@/menu/aside' // import menuAside from '@/menu/aside'
// import { frameInRoutes } from '@/router/routes' // import { frameInRoutes } from '@/router/routes'
import VRM from 'vue-role-manager' // import VRM from 'vue-role-manager'
Vue.use(VRM, { // Vue.use(VRM, {
router, // router,
redirect: '403', // redirect: '403',
enabled: false // enabled: false
}) // })
// 核心插件 // 核心插件
Vue.use(d2Admin) Vue.use(d2Admin)
Vue.use(D2Crud) // Vue.use(D2Crud)
new Vue({ new Vue({
router, router,
store, store,
i18n, i18n,
render: h => h(App), render: h => h(App),
created () { // created () {
// 处理路由 得到每一级的路由设置 // 处理路由 得到每一级的路由设置
// this.$store.commit('d2admin/page/init', frameInRoutes) // this.$store.commit('d2admin/page/init', frameInRoutes)
// 设置顶栏菜单 (暂时不需要) // 设置顶栏菜单 (暂时不需要)
// this.$store.commit('d2admin/menu/headerSet', menuHeader) // this.$store.commit('d2admin/menu/headerSet', menuHeader)
// 设置侧边栏菜单 (TODO 进行过滤) // 设置侧边栏菜单 (TODO 进行过滤)
// this.$store.commit('d2admin/menu/asideSet', menuAside) // this.$store.commit('d2admin/menu/asideSet', menuAside)
// 初始化菜单搜索功能 // 初始化菜单搜索功能
// this.$store.commit('d2admin/search/init', menuHeader) // this.$store.commit('d2admin/search/init', menuHeader)
}, // },
mounted () { mounted () {
// 展示系统信息 // 展示系统信息
this.$store.commit('d2admin/releases/versionShow') this.$store.commit('d2admin/releases/versionShow')
......
...@@ -14,7 +14,7 @@ import routes from './routes' ...@@ -14,7 +14,7 @@ import routes from './routes'
const originalPush = VueRouter.prototype.push // 解决连续点击路由异常问题 limin const originalPush = VueRouter.prototype.push // 解决连续点击路由异常问题 limin
VueRouter.prototype.push = function push (location) { VueRouter.prototype.push = function push (location) {
return originalPush.call(this, location).catch(err => err) return originalPush.call(this, location) && originalPush.call(this, location).catch(err => err)
} }
Vue.use(VueRouter) Vue.use(VueRouter)
...@@ -39,6 +39,7 @@ router.beforeEach(async (to, from, next) => { ...@@ -39,6 +39,7 @@ router.beforeEach(async (to, from, next) => {
store.commit('d2admin/search/set', false) store.commit('d2admin/search/set', false)
if (from.name === null && to.path !== '/login' && !source) { // 页面刷新 动态路由会失效 初始化路由与左侧菜单栏 if (from.name === null && to.path !== '/login' && !source) { // 页面刷新 动态路由会失效 初始化路由与左侧菜单栏
await store.dispatch('d2admin/auth/init') await store.dispatch('d2admin/auth/init')
await store.dispatch('d2admin/account/load')
next(to.path) next(to.path)
} else if (to.matched.some(r => r.meta.auth)) { // 验证当前路由所有的匹配中是否需要有登录验证的 } else if (to.matched.some(r => r.meta.auth)) { // 验证当前路由所有的匹配中是否需要有登录验证的
// 这里暂时将cookie里是否存有token作为验证是否登录的条件 // 这里暂时将cookie里是否存有token作为验证是否登录的条件
...@@ -55,7 +56,6 @@ router.beforeEach(async (to, from, next) => { ...@@ -55,7 +56,6 @@ router.beforeEach(async (to, from, next) => {
redirect: to.fullPath redirect: to.fullPath
} }
}) })
// https://github.com/d2-projects/d2-admin/issues/138
NProgress.done() NProgress.done()
} }
} else { } else {
......
...@@ -28,7 +28,7 @@ export const home = { ...@@ -28,7 +28,7 @@ export const home = {
}, },
component: _import('systemMonitor') component: _import('systemMonitor')
} }
export const sys =[ export const sys = [
// 系统 前端日志 // 系统 前端日志
{ {
path: 'log', path: 'log',
...@@ -67,38 +67,41 @@ export const resources = { ...@@ -67,38 +67,41 @@ export const resources = {
auth: true, auth: true,
title: '页面', title: '页面',
id: '102', id: '102',
pid: '0' pid: '0',
cache:true
} }
}, },
'10201': { '10201': {
path: '/page1', path: '/page1',
name: '页面 1', name: 'page1',
meta: { meta: {
auth: true, auth: true,
title: '页面 1', title: '页面 1',
id: '10201', id: '10201',
pid: '102' pid: '102',
cache:true
}, },
component: _import('demo/page1') component: _import('demo/page1')
}, },
'10202': { '10202': {
path: '/page2', path: '/page2',
name: '页面 2', name: 'page2',
meta: { meta: {
auth: true, auth: true,
title: '页面 2', title: '页面 2',
id: '10202', id: '10202',
pid: '102' pid: '102',
cache:true
}, },
component: _import('demo/page2'), component: _import('demo/page2'),
auth: { auth: {
'operation': [{ // 列表操作 'operation': [{ // 列表操作
id: '1020201', id: '1020201',
pid:'10202', pid: '10202',
label: '查看' label: '查看'
}, { // }, { //
id: '1020202', id: '1020202',
pid:'10202', pid: '10202',
label: '编辑' label: '编辑'
}], }],
'action': [] // 按钮操作 'action': [] // 按钮操作
...@@ -116,11 +119,11 @@ export const resources = { ...@@ -116,11 +119,11 @@ export const resources = {
auth: { auth: {
'operation': [{ // 列表操作 'operation': [{ // 列表操作
id: '1020301', id: '1020301',
pid:'10203', pid: '10203',
label: '查看' label: '查看'
}, { // }, { //
id: '1020302', id: '1020302',
pid:'10203', pid: '10203',
label: '编辑' label: '编辑'
}], }],
'action': [] // 按钮操作 'action': [] // 按钮操作
...@@ -141,7 +144,7 @@ export const resources = { ...@@ -141,7 +144,7 @@ export const resources = {
// }, // },
'103': { '103': {
path: 'subSysManagement', path: 'subSysManagement',
icon: 'folder-o', icon: 'th-list',
name: '子系统管理', name: '子系统管理',
meta: { meta: {
auth: true, auth: true,
...@@ -177,7 +180,7 @@ export const resources = { ...@@ -177,7 +180,7 @@ export const resources = {
}, },
'106': { '106': {
path: 'bb', path: 'bb',
icon: 'folder-o', icon: 'file-text-o',
name: '单据管理', name: '单据管理',
meta: { meta: {
auth: true, auth: true,
...@@ -212,7 +215,7 @@ export const resources = { ...@@ -212,7 +215,7 @@ export const resources = {
}, },
'107': { '107': {
path: 'user', path: 'user',
icon: 'folder-o', icon: 'users',
name: '用户管理', name: '用户管理',
meta: { meta: {
auth: true, auth: true,
...@@ -224,6 +227,7 @@ export const resources = { ...@@ -224,6 +227,7 @@ export const resources = {
'10701': { '10701': {
path: '/userManage', path: '/userManage',
name: '用户管理', name: '用户管理',
icon:'user',
meta: { meta: {
auth: true, auth: true,
title: '用户管理', title: '用户管理',
...@@ -235,6 +239,7 @@ export const resources = { ...@@ -235,6 +239,7 @@ export const resources = {
'10702': { '10702': {
path: '/jurisdictionManage', path: '/jurisdictionManage',
name: '权限管理', name: '权限管理',
icon:'sitemap',
meta: { meta: {
auth: true, auth: true,
title: '权限管理', title: '权限管理',
...@@ -246,6 +251,7 @@ export const resources = { ...@@ -246,6 +251,7 @@ export const resources = {
'10703': { '10703': {
path: '/loginLogs', path: '/loginLogs',
name: '登录日志', name: '登录日志',
icon:'file-text',
meta: { meta: {
auth: true, auth: true,
title: '登录日志', title: '登录日志',
...@@ -255,8 +261,8 @@ export const resources = { ...@@ -255,8 +261,8 @@ export const resources = {
component: _import('userManage/loginLogs') component: _import('userManage/loginLogs')
}, },
'108': { '108': {
path: 'page', path: 'reportingLogs',
icon: 'folder-o', icon: 'upload',
name: '上报日志', name: '上报日志',
meta: { meta: {
auth: true, auth: true,
......
...@@ -32,32 +32,57 @@ export default { ...@@ -32,32 +32,57 @@ export default {
theme: { theme: {
list: [ list: [
{ {
title: 'd2admin 经典', title: 'classic',
name: 'd2', name: 'classic',
preview: 'image/theme/d2/preview@2x.png' color:'#E28B0C',
preview: 'image/theme/classic/preview@2x.png'
}, },
{ {
title: '紫罗兰', title: 'dark',
name: 'violet', name: 'dark',
preview: 'image/theme/violet/preview@2x.png' color:'#377DE7',
preview: 'image/theme/dark/preview@2x.png'
}, },
{ {
title: '简约线条', title: 'blue',
name: 'line', name: 'blue',
backgroundImage: 'image/theme/line/bg.jpg', color:'#E28B0C',
preview: 'image/theme/line/preview@2x.png' preview: 'image/theme/blue/preview@2x.png'
}, },
{ {
title: '流星', title: 'plane',
name: 'star', name: 'plane',
backgroundImage: 'image/theme/star/bg.jpg', color:'#377DE7',
preview: 'image/theme/star/preview@2x.png' backgroundImage: 'image/theme/plane/bg.jpg',
}, preview: 'image/theme/plane/preview@2x.png'
{
title: 'Tomorrow Night Blue (vsCode)',
name: 'tomorrow-night-blue',
preview: 'image/theme/tomorrow-night-blue/preview@2x.png'
} }
// {
// title: 'd2admin 经典',
// name: 'd2',
// preview: 'image/theme/d2/preview@2x.png'
// },
// {
// title: '紫罗兰',
// name: 'violet',
// preview: 'image/theme/violet/preview@2x.png'
// },
// {
// title: '简约线条',
// name: 'line',
// backgroundImage: 'image/theme/line/bg.jpg',
// preview: 'image/theme/line/preview@2x.png'
// },
// {
// title: '流星',
// name: 'star',
// backgroundImage: 'image/theme/star/bg.jpg',
// preview: 'image/theme/star/preview@2x.png'
// },
// {
// title: 'Tomorrow Night Blue (vsCode)',
// name: 'tomorrow-night-blue',
// preview: 'image/theme/tomorrow-night-blue/preview@2x.png'
// }
] ]
}, },
// 是否默认开启页面切换动画 // 是否默认开启页面切换动画
......
...@@ -32,12 +32,6 @@ export default { ...@@ -32,12 +32,6 @@ export default {
util.cookies.set('uuid', res.uuid) util.cookies.set('uuid', res.uuid)
util.cookies.set('token', res.token) util.cookies.set('token', res.token)
const { user, resources } = res const { user, resources } = res
// const __aRoutesInPermisions= util.permision.packRoutes(sources,resources)
// frameInRoutes[0].children=[dashboard,...__aRoutesInPermisions];
// router.addRoutes(frameInRoutes)
// const __aMenusInPermisions = util.permision.packAsideMenus(sources,resources)
// await commit('d2admin/page/init', frameInRoutes, { root: true })
// await commit('d2admin/menu/asideSet', [dashboard,...__aMenusInPermisions], { root: true })
await dispatch('d2admin/auth/set', resources, { root: true }) await dispatch('d2admin/auth/set', resources, { root: true })
// 设置 vuex 用户信息 // 设置 vuex 用户信息
await dispatch('d2admin/user/set', { await dispatch('d2admin/user/set', {
...@@ -114,6 +108,8 @@ export default { ...@@ -114,6 +108,8 @@ export default {
await dispatch('d2admin/menu/asideCollapseLoad', null, { root: true }) await dispatch('d2admin/menu/asideCollapseLoad', null, { root: true })
// DB -> store 持久化数据加载全局尺寸 // DB -> store 持久化数据加载全局尺寸
await dispatch('d2admin/size/load', null, { root: true }) await dispatch('d2admin/size/load', null, { root: true })
// // store 设置系统主色
// await dispatch('d2admin/color/set', process.env.VUE_APP_MAIN_COLOR)
// 后台接口 -> store // 后台接口 -> store
// await dispatch('d2admin/auth/init', null, { root: true }) // await dispatch('d2admin/auth/init', null, { root: true })
// end // end
......
...@@ -6,14 +6,14 @@ ...@@ -6,14 +6,14 @@
*/ */
import util from '@/libs/util.js' import util from '@/libs/util.js'
import router from '@/router' import router from '@/router'
import { resources as sources, home, frameInRoutes,sys } from '@/router/routes' import { resources as sources, home, frameInRoutes, sys } from '@/router/routes'
export default { export default {
namespaced: true, namespaced: true,
state: { state: {
source:null, source: null,
meta:{}, meta: {},
btns:{}, btns: {},
btnIdAll:[] btnIdAll: []
}, },
getters: { getters: {
/** /**
...@@ -39,16 +39,16 @@ export default { ...@@ -39,16 +39,16 @@ export default {
}, },
/** /**
* 返回当前页面的btn * 返回当前页面的btn
* @param {*} state * @param {*} state
*/ */
curBtns(state){ curBtns (state) {
return state.btns[state.meta.id] return state.btns[state.meta.id]
}, },
/** /**
* 返回当前页面的btn * 返回当前页面的btn
* @param {*} state * @param {*} state
*/ */
btnIdAll(state){ btnIdAll (state) {
return state.btnIdAll return state.btnIdAll
} }
}, },
...@@ -118,8 +118,8 @@ export default { ...@@ -118,8 +118,8 @@ export default {
// 获取权限资源点 // 获取权限资源点
const __source = await dispatch('load') const __source = await dispatch('load')
// 过滤资源点 并动态添加到路由 // 过滤资源点 并动态添加到路由
const { route,btn } = util.permision.packRoutesBtns(sources, __source) const { route, btn } = util.permision.packRoutesBtns(sources, __source)
frameInRoutes[0].children = [home, ...route,...sys] frameInRoutes[0].children = [home, ...route, ...sys]
router.addRoutes(frameInRoutes) router.addRoutes(frameInRoutes)
state.btns = btn state.btns = btn
await commit('d2admin/page/init', frameInRoutes, { root: true }) await commit('d2admin/page/init', frameInRoutes, { root: true })
......
...@@ -134,6 +134,7 @@ export default { ...@@ -134,6 +134,7 @@ 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,10 +53,12 @@ export default { ...@@ -53,10 +53,12 @@ export default {
user: true user: true
}, { root: true }) }, { root: true })
// 检查这个主题在主题列表里是否存在 // 检查这个主题在主题列表里是否存在
if (state.list.find(e => e.name === activeName)) { let __theme= state.list.find(e => e.name === activeName)
if (__theme) {
state.activeName = activeName state.activeName = activeName
} else { } else {
state.activeName = state.list[0].name __theme = state.list[0]
state.activeName = __theme.name
// 持久化 // 持久化
await dispatch('d2admin/db/set', { await dispatch('d2admin/db/set', {
dbName: 'sys', dbName: 'sys',
...@@ -65,6 +67,8 @@ export default { ...@@ -65,6 +67,8 @@ export default {
user: true user: true
}, { root: true }) }, { root: true })
} }
// 设置ui 颜色
await dispatch('d2admin/color/set',__theme.color,{root:true})
// 将 vuex 中的主题应用到 dom // 将 vuex 中的主题应用到 dom
commit('dom') commit('dom')
// end // end
......
...@@ -46,23 +46,21 @@ ...@@ -46,23 +46,21 @@
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<el-input v-model="testCache" type="text"></el-input>
</d2-container> </d2-container>
</template> </template>
<script> <script>
export default { export default {
name:'page2',
methods: { methods: {
handleClick (row) { handleClick (row) {
alert(JSON.stringify(row)) alert(JSON.stringify(row))
} }
}, },
components: {
},
mounted () {
},
data () { data () {
return { return {
testCache:'',
btn: { btn: {
lable: '测试', lable: '测试',
action: 'test' action: 'test'
......
...@@ -25,9 +25,9 @@ export const getBingImages = options => { ...@@ -25,9 +25,9 @@ export const getBingImages = options => {
// request({ url: 'http://localhost:3000/api/wallpaper' }).then(res => { // request({ url: 'http://localhost:3000/api/wallpaper' }).then(res => {
// console.log(JSON.parse(res.data).base64) // console.log(JSON.parse(res.data).base64)
// if (res.status === 'success') { // if (res.status === 'success') {
resolve(res) resolve(res)
// } else { // } else {
// reject('ERROR.') // reject('ERROR.')
// } // }
}) })
}) })
......
...@@ -11,7 +11,7 @@ export default { ...@@ -11,7 +11,7 @@ export default {
refresh: Boolean, refresh: Boolean,
withAnimation: Boolean withAnimation: Boolean
}, },
data() { data () {
return { return {
oBgStyle: { oBgStyle: {
backgroundImage: '', backgroundImage: '',
...@@ -19,7 +19,7 @@ export default { ...@@ -19,7 +19,7 @@ export default {
} }
} }
}, },
beforeMount() { beforeMount () {
// const oBg = this.$get_session('oBg') // const oBg = this.$get_session('oBg')
// if (oBg && !this.refresh) { // if (oBg && !this.refresh) {
// this.oBgStyle.backgroundImage = oBg.bgi // this.oBgStyle.backgroundImage = oBg.bgi
...@@ -32,8 +32,8 @@ export default { ...@@ -32,8 +32,8 @@ export default {
const oBg = { bgi: this.oBgStyle.backgroundImage, copyright, copyrightlink } const oBg = { bgi: this.oBgStyle.backgroundImage, copyright, copyrightlink }
// this.$set_session('oBg', JSON.stringify(oBg)) // this.$set_session('oBg', JSON.stringify(oBg))
this.$emit('update:oBg', oBg) this.$emit('update:oBg', oBg)
}).catch(err=>{ }).catch(err => {
console.log(err); console.log(err)
}) })
} }
} }
...@@ -57,4 +57,3 @@ export default { ...@@ -57,4 +57,3 @@ export default {
animation: img-action 18s animation: img-action 18s
} }
</style> </style>
<template>
<el-dialog
center
title="用户注册"
:visible.sync="dialogVisible"
:before-close="handleClose"
width="720px"
custom-class="reg-dialog"
>
<el-form ref="regForm" :model="regForm" label-width="80px" class="reg-dialog-form">
<el-form-item label="用户名:" :rules="rules.loginName">
<el-input v-model="regForm.loginName" requred></el-input>
</el-form-item>
<el-form-item label="密码:">
<el-input type="password" v-model="regForm.password"></el-input>
</el-form-item>
<el-form-item label="确认密码:">
<el-input type="password" v-model="regForm.comfirm"></el-input>
</el-form-item>
<el-row>
<el-col :span="12">
<el-form-item label="姓名:">
<el-input v-model="regForm.userName"></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="联系方式:">
<el-input v-model="regForm.mobile"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-form-item label="所属公司:">
<el-select v-model="regForm.companyCode" placeholder="请选择" class="sigle-select">
<el-option label="区域一" value="shanghai"></el-option>
<el-option label="区域二" value="beijing"></el-option>
</el-select>
</el-form-item>
<el-row>
<el-col :span="12">
<el-form-item label="部门:">
<el-select v-model="regForm.departCode" placeholder="请选择">
<el-option label="区域一" value="shanghai"></el-option>
<el-option label="区域二" value="beijing"></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="职务:">
<el-select v-model="regForm.postCode" placeholder="请选择">
<el-option label="区域一" value="shanghai"></el-option>
<el-option label="区域二" value="beijing"></el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-form-item label="所属站点:">
<el-select v-model="regForm.stationCode" placeholder="请选择" class="sigle-select">
<el-option label="区域一" value="shanghai"></el-option>
<el-option label="区域二" value="beijing"></el-option>
</el-select>
</el-form-item>
<el-form-item class="form-action" flex="main:left cross:center">
<el-button size="default" @click="submit" type="primary" class="button-submit">提交</el-button>
</el-form-item>
</el-form>
</el-dialog>
</template>
<script>
export default {
name: "DialogReg",
props: {
isVisible: {
type: Boolean,
default: false
}
},
computed: {
dialogVisible() {
return this.isVisible;
}
},
data() {
return {
company: [],
regForm: {
loginName: "",
password: "",
comfirm: "",
userName: "",
mobile: "",
companyCode: [],
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: "用户名不能为空" }]
})
};
},
methods: {
handleClose(done) {
this.$event.$emit("e-reg-dialog", false);
}
}
};
</script>
<style lang="scss">
$login-dialog-lable-width: 70px;
$login-dialog-font: 13px;
.reg-dialog {
background: #fff;
box-shadow: 0 8px 20px 0 rgba(0, 0, 0, 0.06);
border-radius: 9px;
.reg-dialog-form {
width: 370px;
.el-form-item {
margin-bottom: 20px;
.el-input__inner {
height: 35px;
line-height: 35px;
border-radius: 2px;
}
}
.form-action {
.button-submit {
width: 145px;
height: 35px;
border-radius: 2px;
letter-spacing: 2px;
font-size: 14px;
line-height: 35px;
display: flex;
justify-content: center;
box-sizing: border-box;
span {
transform: translateY(-12px);
}
}
}
}
.el-dialog__title {
font-size: 20px;
color: #333;
}
.el-dialog__body {
display: flex;
justify-content: center;
.el-form-item__label {
width: $login-dialog-lable-width;
text-align: right;
font-size: $login-dialog-font;
}
.el-form-item__content {
margin-left: $login-dialog-lable-width;
font-size: $login-dialog-font;
}
}
.sigle-select {
width: 290px;
}
}
</style>
\ No newline at end of file \ No newline at end of file
...@@ -32,33 +32,9 @@ ...@@ -32,33 +32,9 @@
<el-col>登录日志列表</el-col> <el-col>登录日志列表</el-col>
</el-row> </el-row>
<el-table <el-table
:data="tableData" :table="tableData"
border v-loading="tableLoading"
style="margin: 20px 0;"
> >
<el-table-column
align="center"
width="60px"
label="序号"
type='index'
></el-table-column>
<el-table-column
v-for="(item, index) in tableColumns"
:key="index"
:label="item.label"
:prop="item.prop"
:width="item.width"
align="center"
>
<template slot-scope="scope">
<template v-if="item.formatter">
{{item.formatter(scope.row)}}
</template>
<template v-else>
{{tableData[scope.$index][item.prop]}}
</template>
</template>
</el-table-column>
</el-table> </el-table>
<el-pagination <el-pagination
background background
...@@ -75,10 +51,12 @@ ...@@ -75,10 +51,12 @@
</template> </template>
<script> <script>
import { getLoginlogs } from '@api/userManage'
export default { export default {
name: 'loginLogs', name: 'loginLogs',
data () { data () {
return { return {
tableLoading: false,
times: [], times: [],
searchForm: { searchForm: {
beginTime: '', beginTime: '',
...@@ -86,58 +64,135 @@ export default { ...@@ -86,58 +64,135 @@ export default {
field: '', field: '',
loginType: '' loginType: ''
}, },
tableData: [{ // tableData: [{
loginTime: '2019-08-16 14:45:21', // loginTime: '2019-08-16 14:45:21',
loginUser: 'abc123', // loginUser: 'abc123',
userName: '张三', // userName: '张三',
phone: '13511111111', // phone: '13511111111',
loginType: 'PC', // loginType: 'PC',
loginDevice: 'win10/chrome' // loginDevice: 'win10/chrome'
}, { // }, {
loginTime: '2019-08-16 14:45:21', // loginTime: '2019-08-16 14:45:21',
loginUser: 'abc123', // loginUser: 'abc123',
userName: '李四', // userName: '李四',
phone: '13511111111', // phone: '13511111111',
loginType: '小程序', // loginType: '小程序',
loginDevice: 'iphone8' // loginDevice: 'iphone8'
}, { // }, {
loginTime: '2019-08-16 14:45:21', // loginTime: '2019-08-16 14:45:21',
loginUser: 'abc123', // loginUser: 'abc123',
userName: '王五', // userName: '王五',
phone: '13511111111', // phone: '13511111111',
loginType: 'PC', // loginType: 'PC',
loginDevice: 'win10/chrome' // loginDevice: 'win10/chrome'
}], // }],
tableColumns: [{ // tableColumns: [{
label: '登录时间', // label: '登录时间',
prop: 'loginTime' // prop: 'loginTime'
}, { // }, {
label: '登录用户', // label: '登录用户',
prop: 'loginUser' // prop: 'loginUser'
}, { // }, {
label: '姓名', // label: '姓名',
prop: 'userName' // prop: 'userName'
}, { // }, {
label: '联系电话', // label: '联系电话',
prop: 'phone' // prop: 'phone'
}, { // }, {
label: '登录方式', // label: '登录方式',
prop: 'loginType' // prop: 'loginType'
}, { // }, {
label: '登录设备', // label: '登录设备',
prop: 'loginDevice' // prop: 'loginDevice'
}], // }],
tableData: {
border: true,
align: 'center',
// height: parseInt(this.$client_height() - 140),
data: [],
column: [
{
label: '登录时间',
prop: 'loginTime'
},
{
label: '登录用户',
prop: 'loginUser'
},
{
label: '姓名',
prop: 'userName'
},
{
label: '联系电话',
prop: 'phone'
},
{
label: '登录方式',
prop: 'loginType'
},
{
label: '登录设备',
prop: 'loginDevice'
}
],
number: {
label: '序号',
width: '50px',
index: index => {
++index
return index < 10 && index > 0 ? '0' + index : index
}
},
console: {
}
},
// 页码 // 页码
currentPage: 1, currentPage: 1,
pageSize: 10, pageSize: 10,
total: 30 total: 10
} }
}, },
mounted() {
this.loadingGetList()
},
methods: { methods: {
loadingGetList() {
this.tableLoading = true
this.getList()
},
getParams() {
return Object.assign(
{
pageCount: this.pageSize,
pageSize: this.pageNum
},
this.searchForm
)
},
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
})
.catch(err => {
this.tableLoading = false
console.log(err)
})
},
// 搜索 // 搜索
handleSearch () { handleSearch () {
console.log(this.searchForm) this.loadingGetList()
}, },
// 页码 // 页码
......
...@@ -11,7 +11,23 @@ process.env.VUE_APP_BUILD_TIME = require('dayjs')().format('YYYY-M-D HH:mm:ss') ...@@ -11,7 +11,23 @@ process.env.VUE_APP_BUILD_TIME = require('dayjs')().format('YYYY-M-D HH:mm:ss')
// 基础路径 注意发布之前要先修改这里 // 基础路径 注意发布之前要先修改这里
let publicPath = '/' let publicPath = '/'
const CDN_DOMAIN = 'https://cdn.bootcss.com'
const cdn = {
css: [
`${CDN_DOMAIN}/element-ui/2.11.1/theme-chalk/index.css`,
`${CDN_DOMAIN}/nprogress/0.2.0/nprogress.min.css`
],
js: [
`${CDN_DOMAIN}/vue/2.6.10/vue.min.js`,
`${CDN_DOMAIN}/vue-router/3.0.6/vue-router.min.js`,
`${CDN_DOMAIN}/element-ui/2.11.1/index.js`,
`${CDN_DOMAIN}/vuex/3.1.1/vuex.min.js`,
`${CDN_DOMAIN}/axios/0.19.0/axios.min.js`,
`${CDN_DOMAIN}/js-cookie/2.2.0/js.cookie.min.js`,
`${CDN_DOMAIN}/nprogress/0.2.0/nprogress.min.js`
// `${CDN_DOMAIN}/lodash.js/4.17.15/lodash.min.js`
]
}
module.exports = { module.exports = {
publicPath, // 根据你的实际情况更改这里 publicPath, // 根据你的实际情况更改这里
lintOnSave: true, lintOnSave: true,
...@@ -27,6 +43,16 @@ module.exports = { ...@@ -27,6 +43,16 @@ module.exports = {
} }
}, },
configureWebpack: config => { configureWebpack: config => {
config.externals = {
'vue': 'Vue',
'element-ui': 'ELEMENT',
'vue-router': 'VueRouter',
'vuex': 'Vuex',
'axios': 'axios',
'js-cookie': 'Cookies',
'nprogress': 'NProgress'
// 'lodash':'lodash'
}
// 非开发环境 // 非开发环境
if (process.env.NODE_ENV !== 'development') { if (process.env.NODE_ENV !== 'development') {
config.optimization.minimizer[0].options.terserOptions.compress.warnings = false config.optimization.minimizer[0].options.terserOptions.compress.warnings = false
...@@ -34,6 +60,14 @@ module.exports = { ...@@ -34,6 +60,14 @@ module.exports = {
config.optimization.minimizer[0].options.terserOptions.compress.drop_debugger = true config.optimization.minimizer[0].options.terserOptions.compress.drop_debugger = true
config.optimization.minimizer[0].options.terserOptions.compress.pure_funcs = ['console.log'] config.optimization.minimizer[0].options.terserOptions.compress.pure_funcs = ['console.log']
} }
// const Plugins = [
// new MiniCssExtractPlugin({
// // Options similar to the same options in webpackOptions.output
// // both options are optional
// filename: devMode ? 'css/[name].css' : 'css/[name].[hash].css',
// chunkFilename: devMode ? 'css/[id].css' : 'css/[id].[hash].css',
// })]
// config.plugins = [...config.plugins, ...Plugins]
}, },
// 默认设置: https://github.com/vuejs/vue-cli/tree/dev/packages/%40vue/cli-service/lib/config/base.js // 默认设置: https://github.com/vuejs/vue-cli/tree/dev/packages/%40vue/cli-service/lib/config/base.js
...@@ -54,6 +88,9 @@ module.exports = { ...@@ -54,6 +88,9 @@ 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.
return resultCss.replace(/process.env.VUE_APP_ELEMENT_COLOR/g, process.env.VUE_APP_ELEMENT_COLOR)
},
matchColors: [ matchColors: [
...forElementUI.getElementUISeries(process.env.VUE_APP_ELEMENT_COLOR) // Element-ui主色系列 ...forElementUI.getElementUISeries(process.env.VUE_APP_ELEMENT_COLOR) // Element-ui主色系列
], ],
...@@ -96,6 +133,12 @@ module.exports = { ...@@ -96,6 +133,12 @@ module.exports = {
config.resolve.alias config.resolve.alias
.set('@', resolve('src')) .set('@', resolve('src'))
.set('@api', resolve('src/api')) .set('@api', resolve('src/api'))
config.plugin('html')
.tap(args => {
// args[0].minify.removeComments = false;
args[0].cdn = cdn
return args
})
// 判断环境加入模拟数据 // 判断环境加入模拟数据
// 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!