Commit e2b35708 authored by hangjun83's avatar hangjun83

前端框架初始化提交

parent f8a1dac2
# xboot-front
> 作者主要为后端开发 能力经验有限 如有错误欢迎指正!
### 宣传视频
- [作者亲自制作XBoot文字快闪宣传视频](http://www.bilibili.com/av30284667)
- [作者亲自制作其他项目宣传视频](https://www.bilibili.com/video/av23121122/)
### 宣传官网
- 官网地址:http://xb.exrick.cn
- 官网源码:https://github.com/Exrick/xboot-show
### 在线Demo
- 在线Demo:http://xboot.exrick.cn
- 单点登录测试页:http://sso.exrick.cn
- 统一认证平台访问地址:http://xboot.exrick.cn/authorize
### 最新最全面在线文档
https://www.kancloud.cn/exrick/xboot/content
### 后端项目地址:[XBoot](https://github.com/Exrick/xboot)
> 涉及技术:Spring Boot 2.x/Spring Security/JWT/Spring Data JPA+Mybatis-Plus/Redis/Elasticsearch 分布式限流/同步锁/验证码/SnowFlake雪花算法ID生成 动态权限管理 数据权限 代码生成 日志记录 定时任务 第三方账号、短信登录
### 项目简介
- 项目基于 Vue-Cli 4.x 创建
- 主要Main组件框架基于iView-admin 1.0版本 修复其部分BUG
- UI组件库升级至iView/View UI 4.x
- 后端加载动态权限菜单 多方式轻松权限控制至按钮显示
- 提供Vue空白模版,只需修改后端请求和对应实体字段即可完成页面开发
- 多语言切换、消息管理、第三方社交账号或短信登录
- iView使用图标库 [ionicons](http://ionicons.com/) 额外图标库 [vue-awesome](https://github.com/Justineo/vue-awesome)
- 现已提供封装的带后端真实接口数据的组件,详见XBoot业务组件菜单
![](https://ooo.0o0.ooo/2019/04/29/5cc70cac4b7a4.png)
### 截图预览
- PC
![QQ截图20180826163917.png](https://ooo.0o0.ooo/2021/07/01/t6RXqn8LeaY5Nu1.png)
![QQ截图20180826164058.png](https://ooo.0o0.ooo/2021/07/01/TQZqrxog4ufX2SR.png)
![QQ截图20180826164144.png](https://ooo.0o0.ooo/2021/07/01/t7RdWhkbzZCawce.png)
- iPad Mini 5
<img src=https://ooo.0o0.ooo/2021/07/01/gXl5OKkJHEIwf3N.png width=600/>
- iPhone X
<img src=https://ooo.0o0.ooo/2021/07/01/LdNPiKMlOESvfW8.png width=300/>
### [完整版截图细节展示](https://github.com/Exrick/x-boot/wiki/%E5%AE%8C%E6%95%B4%E7%89%88%E6%88%AA%E5%9B%BE%E7%BB%86%E8%8A%82%E5%B1%95%E7%A4%BA)
### 系统架构
<img src="https://ooo.0o0.ooo/2019/05/01/5cc87695f109d.png" width="600px"/>
### 主要所用技术
<img src=https://ooo.0o0.ooo/2019/11/25/gUiynavBAHd6hY8.jpg width=1000/>
- [Vue 2.6.x](https://cn.vuejs.org/)
- [Vue Cli 4.x](https://github.com/vuejs/vue-cli)[官方中文文档](https://github.com/vuejs/vue-cli/tree/dev/docs/zh/config)
- Vue Router
- [Vuex](https://vuex.vuejs.org/zh-cn/)
- [vue-i18n](https://github.com/kazupon/vue-i18n):国际化多语言插件 使用5.0.x版本
- [iView/View UI](https://www.iviewui.com/)
- [iview-admin](https://github.com/iview/iview-admin)
- [iview-area](https://github.com/iview/iview-area):城市级联组件
- [wangeditor](https://github.com/wangfupeng1988/wangEditor):轻量富文本编辑器
- [gitalk](https://github.com/gitalk/gitalk):基于github issue评论插件
- [vue-stomp](https://github.com/FlySkyBear/vue-stomp)
- [vue-json-pretty](https://github.com/leezng/vue-json-pretty):Json美化
- [Print.js](http://printjs.crabbly.com/):打印
- ES6
- webpack
- axios
- echarts
- cookie
- 第三方插件或服务
- [hotjar](https://github.com/Exrick/xmall/blob/master/study/hotjar.md):一体化分析和反馈
- [Vaptcha人机验证码](https://www.vaptcha.com/)
### 最新最全面在线文档
> 第一时间更新,文档永不收费
https://www.kancloud.cn/exrick/xboot/content
### 本地开发构建运行
- 启动后端 [x-boot](https://github.com/Exrick/x-boot) 项目后,在 `vue.config.js` 中修改你的后端接口地址代理配置
- 在项目根文件夹下先后执行命令 `npm install` (若有报错请使用[cnpm](https://npm.taobao.org/))、 `npm run dev`
- 前台端口默认9999 http://localhost:9999
### 部署
- 执行过命令 `npm install` 后,执行 `npm run build` 将打包生成的 `dist` 静态文件放置Nginx服务器中,并配置反向代理。当然还可放置Spring Web等其他项目resources静态资源文件夹下可避免跨域(不推荐)。
- Nginx配置详见开发文档部署部分
### 开发指南及技术栈说明
- [XBoot前端开发配置及部署说明【必读】](https://github.com/Exrick/xboot-front/wiki/XBoot%E5%89%8D%E7%AB%AF%E5%BC%80%E5%8F%91%E9%85%8D%E7%BD%AE%E5%8F%8A%E9%83%A8%E7%BD%B2%E8%AF%B4%E6%98%8E%E3%80%90%E5%BF%85%E8%AF%BB%E3%80%91)
- [如何使用XBoot前端Vue模板快速开发增删改页面](https://github.com/Exrick/xboot-front/wiki/%E5%A6%82%E4%BD%95%E4%BD%BF%E7%94%A8XBoot%E5%89%8D%E7%AB%AFVue%E6%A8%A1%E6%9D%BF%E5%BF%AB%E9%80%9F%E5%BC%80%E5%8F%91%E5%A2%9E%E5%88%A0%E6%94%B9%E9%A1%B5%E9%9D%A2)
- [顶部菜单四种样式位置切换](https://github.com/Exrick/xboot-front/wiki/%E9%A1%B6%E9%83%A8%E8%8F%9C%E5%8D%95%E5%9B%9B%E7%A7%8D%E6%A0%B7%E5%BC%8F%E4%BD%8D%E7%BD%AE%E5%88%87%E6%8D%A2)
- [首页跟随顶部菜单切换](https://github.com/Exrick/xboot-front/wiki/%E9%A6%96%E9%A1%B5%E8%B7%9F%E9%9A%8F%E9%A1%B6%E9%83%A8%E8%8F%9C%E5%8D%95%E5%88%87%E6%8D%A2)
- [数据字典全局使用配置](https://github.com/Exrick/xboot-front/wiki/%E6%95%B0%E6%8D%AE%E5%AD%97%E5%85%B8%E5%85%A8%E5%B1%80%E4%BD%BF%E7%94%A8%E9%85%8D%E7%BD%AE)
### 学习记录(更新中)
1. [axios请求封装 统一异常处理](https://github.com/Exrick/x-boot-front/wiki/axios%E8%AF%B7%E6%B1%82%E5%B0%81%E8%A3%85-%E7%BB%9F%E4%B8%80%E5%BC%82%E5%B8%B8%E5%A4%84%E7%90%86)
2. [动态路由菜单加载](https://github.com/Exrick/xboot-front/wiki/%E5%8A%A8%E6%80%81%E8%B7%AF%E7%94%B1%E8%8F%9C%E5%8D%95%E5%8A%A0%E8%BD%BD)
3. [多维度控制权限至按钮显示](https://github.com/Exrick/xboot-front/wiki/%E5%A4%9A%E7%BB%B4%E5%BA%A6%E6%8E%A7%E5%88%B6%E6%9D%83%E9%99%90%E8%87%B3%E6%8C%89%E9%92%AE%E6%98%BE%E7%A4%BA)
4. [基于Websocket实现发送消息后右上角消息图标红点实时显示](https://github.com/Exrick/x-boot/wiki/%E5%9F%BA%E4%BA%8EWebsocket%E5%AE%9E%E7%8E%B0%E5%8F%91%E9%80%81%E6%B6%88%E6%81%AF%E5%90%8E%E5%8F%B3%E4%B8%8A%E8%A7%92%E6%B6%88%E6%81%AF%E5%9B%BE%E6%A0%87%E7%BA%A2%E7%82%B9%E5%AE%9E%E6%97%B6%E6%98%BE%E7%A4%BA)
5. [动态组件单页操作](https://github.com/Exrick/xboot-front/wiki/%E5%8A%A8%E6%80%81%E7%BB%84%E4%BB%B6%E5%8D%95%E9%A1%B5%E6%93%8D%E4%BD%9C)
### Docker下前端端集群部署(更新中)
> 后端端集群部署请跳转至[x-boot](https://github.com/Exrick/x-boot)项目查看
1.[Docker的安装与常用命令](https://github.com/Exrick/x-boot/wiki/Docker%E7%9A%84%E5%AE%89%E8%A3%85%E4%B8%8E%E5%B8%B8%E7%94%A8%E5%91%BD%E4%BB%A4)
2.Nginx集群搭建
3.XBoot前端集群部署及负载均衡配置
### 作者其他项目推荐
- [XMall微信小程序APP前端 现已开源!](https://github.com/Exrick/xmall-weapp)
[![WX20190924-234416@2x.png](https://s2.ax1x.com/2019/10/06/ucEsBD.md.png)](https://www.bilibili.com/video/av70226175)
- [XMall:基于SOA架构的分布式电商购物商城](https://github.com/Exrick/xmall)
![](https://ooo.0o0.ooo/2018/07/22/5b54615b95788.jpg)
- [XPay个人免签收款支付系统](https://github.com/Exrick/xpay)
- 机器学习笔记
- [Machine-Learning](https://github.com/Exrick/Machine-Learning)
### 技术疑问交流
- QQ交流群 `475743731(付费)`,可获取各项目详细图文文档、疑问解答 [![](http://pub.idqqimg.com/wpa/images/group.png)](http://shang.qq.com/wpa/qunwpa?idkey=7b60cec12ba93ebed7568b0a63f22e6e034c0d1df33125ac43ed753342ec6ce7)
- 免费交流群 `562962309` [![](http://pub.idqqimg.com/wpa/images/group.png)](http://shang.qq.com/wpa/qunwpa?idkey=52f6003e230b26addeed0ba6cf343fcf3ba5d97829d17f5b8fa5b151dba7e842)
- 作者博客:[http://blog.exrick.cn](http://blog.exrick.cn)
### [捐赠](http://xpay.exrick.cn/pay)
\ No newline at end of file
{"metricId":"0422e8ec-20ee-4a55-b9a4-605aa59155ea","metrics":{"from":"2022-03-28T14:45:00.198Z","to":"2022-03-31T06:34:53.760Z","successfulInstalls":2,"failedInstalls":0}}
\ No newline at end of file
module.exports = {
presets: [
[
'@vue/app',
{
useBuiltIns: 'entry'
}
]
]
}
{
"name": "xboot-front",
"version": "3.3.4",
"description": "XBoot前后端分离开发平台",
"author": "Exrick <1012139570@qq.com>",
"private": true,
"scripts": {
"dev": "vue-cli-service serve",
"build": "vue-cli-service build"
},
"dependencies": {
"@mapbox/mapbox-gl-geocoder": "^4.7.1",
"apexcharts": "^3.27.1",
"axios": "^0.21.1",
"core-js": "^3.14.0",
"countup.js": "^2.0.7",
"date-fns": "^2.22.1",
"dplayer": "^1.26.0",
"echarts": "^5.1.2",
"file-saver": "^2.0.5",
"html2canvas": "^1.0.0-rc.7",
"view-design": "^4.6.1",
"viewerjs": "^1.9.2",
"js-cookie": "^2.2.1",
"mapbox-gl": "^2.3.0",
"print-js": "^1.6.0",
"vue": "^2.6.14",
"vue-apexcharts": "^1.6.1",
"vue-clipboard2": "^0.3.1",
"vue-cropper": "^0.5.6",
"vue-i18n": "^8.24.4",
"vue-json-pretty": "^1.8.0",
"vue-lazyload": "^1.3.3",
"vue-router": "^3.5.1",
"vuedraggable": "^2.24.3",
"vuex": "^3.6.2"
},
"devDependencies": {
"@babel/polyfill": "^7.12.1",
"@vue/cli-plugin-babel": "^4.5.13",
"@vue/cli-plugin-router": "^4.5.13",
"@vue/cli-plugin-vuex": "^4.5.13",
"@vue/cli-service": "^4.5.13",
"compression-webpack-plugin": "^6.1.1",
"less": "^4.1.1",
"less-loader": "^7.3.0",
"vue-template-compiler": "^2.6.14"
}
}
module.exports = {
plugins: {
autoprefixer: {}
}
}
// 打包后仍可修改的配置
const config = {
baseApi: "/xboot", // 请求路径统一前缀
vaptchaID: "5dce36188713b71e70a41eb7", // vaptcha验证码ID
mapboxToken: "pk.eyJ1IjoiZXhyaWNrIiwiYSI6ImNramIxOW8wdTF1MmYycXA5bTI0M2lnN3kifQ.eUZCUCh8hS9RZQ7hKySqOg" // mapbox地图accessToken
}
\ No newline at end of file
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<link rel="icon" href="<%= BASE_URL %>logo.png">
<title>XBoot前后端分离一站式开发平台springboot 2.x iview 前后端分离_vue_集成activiti工作流 iview admin 动态数据权限 权限按钮显示 spring security
elasticsearch 分布式限流_同步锁</title>
<meta name="keywords"
content="前后端分离,xboot,iview,iview admin,前后端分离工作流,vue集成activiti工作流,elasticsearch,security,动态数据权限,springboot,分布式限流_同步锁">
<meta name="description"
content="xboot前后端分离开发平台springboot 2.x iview 前后端分离_vue_集成activiti工作流 iview admin 动态数据权限 权限按钮显示 spring security elasticsearch 分布式限流_同步锁">
<script src="<%= BASE_URL %>config.js" type="text/javascript"></script>
<!-- 部署CDN优化 -->
<!-- <script src="https://cdn.jsdelivr.net/npm/vue@2.6.14/dist/vue.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/vuex@3.6.2/dist/vuex.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/vue-i18n@8.24.4/dist/vue-i18n.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/vue-router@3.5.1/dist/vue-router.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/axios@0.21.1/dist/axios.min.js"></script>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/view-design@4.6.1/dist/styles/iview.css">
<script src="https://cdn.jsdelivr.net/npm/view-design@4.6.1/dist/iview.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/vue-lazyload@1.3.3/vue-lazyload.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/echarts@5.1.2/dist/echarts.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/apexcharts@3.27.1/dist/apexcharts.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/vue-apexcharts@1.6.1/dist/vue-apexcharts.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/dplayer@1.26.0/dist/DPlayer.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/print-js@1.6.0/dist/print.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/vue-json-pretty@1.8.0/lib/vue-json-pretty.min.js"></script>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/vue-json-pretty@1.8.0/lib/styles.css">
<script src="https://cdn.jsdelivr.net/npm/html2canvas@1.0.0-rc.7/dist/html2canvas.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/js-cookie@2.2.1/src/js.cookie.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/sortablejs@1.8.4/Sortable.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/vuedraggable@2.24.3/dist/vuedraggable.umd.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/viewerjs@1.9.2/dist/viewer.min.js"></script>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/viewerjs@1.9.2/dist/viewer.min.css"> -->
<script src="//cdn.jsdelivr.net/npm/leancloud-storage@4.10.1/dist/av-min.js"></script>
<!-- mapbox -->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/mapbox-gl@2.3.0/dist/mapbox-gl.css">
<link rel="stylesheet"
href="https://cdn.jsdelivr.net/npm/@mapbox/mapbox-gl-geocoder@4.7.1/dist/mapbox-gl-geocoder.css">
<script>
var _hmt = _hmt || [];
(function () {
var hm = document.createElement("script");
hm.src = "https://hm.baidu.com/hm.js?64e52d9ed8f5acc3eb7d60058e2fb7ab";
var s = document.getElementsByTagName("script")[0];
s.parentNode.insertBefore(hm, s);
})();
</script>
<style>
.page-loading-wrap {
padding: 120px;
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
}
.la-timer,
.la-timer>div {
position: relative;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
.la-timer {
display: block;
font-size: 0;
color: #fff;
}
.la-timer.la-dark {
color: #333;
}
.la-timer>div {
display: inline-block;
float: none;
background-color: currentColor;
border: 0 solid currentColor;
}
.la-timer {
width: 32px;
height: 32px;
}
.la-timer>div {
width: 32px;
height: 32px;
background: transparent;
border-width: 2px;
border-radius: 100%;
}
.la-timer>div:before,
.la-timer>div:after {
position: absolute;
top: 14px;
left: 14px;
display: block;
width: 2px;
margin-top: -1px;
margin-left: -1px;
content: "";
background: currentColor;
border-radius: 2px;
-webkit-transform-origin: 1px 1px 0;
-moz-transform-origin: 1px 1px 0;
-ms-transform-origin: 1px 1px 0;
-o-transform-origin: 1px 1px 0;
transform-origin: 1px 1px 0;
-webkit-animation: timer-loader 1250ms infinite linear;
-moz-animation: timer-loader 1250ms infinite linear;
-o-animation: timer-loader 1250ms infinite linear;
animation: timer-loader 1250ms infinite linear;
-webkit-animation-delay: -625ms;
-moz-animation-delay: -625ms;
-o-animation-delay: -625ms;
animation-delay: -625ms;
}
.la-timer>div:before {
height: 12px;
}
.la-timer>div:after {
height: 8px;
-webkit-animation-duration: 15s;
-moz-animation-duration: 15s;
-o-animation-duration: 15s;
animation-duration: 15s;
-webkit-animation-delay: -7.5s;
-moz-animation-delay: -7.5s;
-o-animation-delay: -7.5s;
animation-delay: -7.5s;
}
@-webkit-keyframes timer-loader {
0% {
-webkit-transform: rotate(0deg);
transform: rotate(0deg);
}
100% {
-webkit-transform: rotate(360deg);
transform: rotate(360deg);
}
}
@-moz-keyframes timer-loader {
0% {
-moz-transform: rotate(0deg);
transform: rotate(0deg);
}
100% {
-moz-transform: rotate(360deg);
transform: rotate(360deg);
}
}
@-o-keyframes timer-loader {
0% {
-o-transform: rotate(0deg);
transform: rotate(0deg);
}
100% {
-o-transform: rotate(360deg);
transform: rotate(360deg);
}
}
@keyframes timer-loader {
0% {
-webkit-transform: rotate(0deg);
-moz-transform: rotate(0deg);
-o-transform: rotate(0deg);
transform: rotate(0deg);
}
100% {
-webkit-transform: rotate(360deg);
-moz-transform: rotate(360deg);
-o-transform: rotate(360deg);
transform: rotate(360deg);
}
}
</style>
</head>
<body>
<noscript>
<strong>We're sorry but xboot-front doesn't work properly without JavaScript enabled. Please enable it to
continue.</strong>
</noscript>
<div id="app">
<div class="page-loading-wrap">
<div style="color: #4e9ff5" class="la-timer">
<div></div>
</div>
<h4 style="margin-top:20px;font-size:14px;font-weight:400;color: #515a6e;">正在加载资源...</h4>
</div>
</div>
<!-- built files will be auto injected -->
</body>
</html>
\ No newline at end of file
<template>
<div id="main" class="app-main">
<router-view></router-view>
</div>
</template>
<script>
export default {
data() {
return {};
},
computed: {
mainTheme() {
return this.$store.state.theme.theme.mainTheme;
},
},
mounted() {
this.changeMode();
},
beforeDestroy() {},
methods: {
changeMode() {
let v = this.mainTheme;
if (v == "darkMode") {
document.getElementsByTagName("body")[0].className = "darkMode";
} else if (v == "weakMode") {
document.getElementsByTagName("body")[0].className = "weakMode";
} else {
document.getElementsByTagName("body")[0].className = "";
}
},
},
watch: {
mainTheme() {
this.changeMode();
},
},
};
</script>
<style lang="less">
html,
body {
width: 100%;
height: 100%;
background: #f0f0f0;
/* overflow: hidden; */
}
.app-main {
width: 100%;
height: 100%;
}
.br button {
margin-right: 8px;
}
.operation button {
margin-right: 8px;
}
.operation .brr button {
margin-right: 0px !important;
}
.ivu-btn-text:focus {
box-shadow: none !important;
}
.ivu-tag {
cursor: pointer;
}
.block-tool .ivu-tooltip,
.block-tool .ivu-tooltip-rel {
display: block;
}
.block-pop .ivu-poptip,
.block-pop .ivu-poptip-rel {
display: block;
}
.form-noheight {
.ivu-form-item-content {
line-height: unset !important;
}
}
.modal-fullscreen {
z-index: 1;
position: absolute;
right: 43px;
top: 14px;
overflow: hidden;
cursor: pointer;
.model-fullscreen-icon {
font-size: 18px;
color: #999;
-webkit-transition: color 0.2s ease;
transition: color 0.2s ease;
position: relative;
top: 1px;
&:hover {
color: #444;
}
}
}
.viewer-container {
z-index: 2050 !important;
}
// 修改drawer层级 避免固定nav时遮挡
.ivu-drawer-mask,
.ivu-drawer-wrap {
z-index: 1002;
}
.ivu-drawer-wrap-1 {
z-index: 1003;
}
.ivu-drawer-wrap-2 {
z-index: 1004;
}
// 修改Message层级
.ivu-message {
z-index: 9999 !important;
}
// 修改Menu层级
.ivu-menu {
z-index: 0;
}
// 暗黑
.darkMode {
filter: invert(1) hue-rotate(180deg);
transition: all 300ms;
img,
video {
filter: invert(1) hue-rotate(180deg);
}
}
// 色弱
.weakMode {
touch-action: none;
filter: invert(80%);
}
</style>
// 统一请求路径前缀在libs/axios.js中修改
import { getRequest, postRequest, putRequest, getNoAuthRequest, postNoAuthRequest } from '@/libs/axios';
// 文件上传接口
export const uploadFile = "/upload/file"
// 验证码渲染图片接口
export const drawCodeImage = "/common/captcha/draw/"
// 获取菜单
export const getMenuList = "/adminapi/permission/menu/list"
// 获取数据字典
export const getDictData = "/dictData/getByType/"
// 获取菜单
/*export const getMenuList = (params) => {
return getRequest('/permission/menulist', params)
}*/
// 登陆
export const login = (params) => {
return postNoAuthRequest('/auth/login', params)
}
// 获取用户登录信息
export const userInfo = (params) => {
return getRequest('/user/info', params)
}
// 注册
export const regist = (params) => {
return postNoAuthRequest('/user/regist', params)
}
//登出
export const logout = (params) => {
return getRequest('/auth/logout', params)
}
// 个人中心修改密码
export const changePass = (params) => {
return postRequest('/auth/resetPassword', params)
}
// 解锁
export const unlock = (params) => {
return postRequest('/user/unlock', params)
}
// 获取用户数据 多条件
export const getUserListData = (params) => {
return getRequest('/user/listByPage', params)
}
// 通过用户名搜索
export const searchUserByName = (username, params) => {
return getRequest('/user/searchByName/'+username, params)
}
// 获取全部用户数据
export const getAllUserData = (params) => {
return getRequest('/user/getAll', params)
}
// 添加用户
export const addUser = (params) => {
return postRequest('/user/add', params)
}
// 编辑用户
export const editUser = (params) => {
return postRequest('/user/edit', params)
}
// 启用用户
export const enableUser = (id, params) => {
return postRequest(`/user/enable/${id}`, params)
}
// 禁用用户
export const disableUser = (id, params) => {
return postRequest(`/user/disable/${id}`, params)
}
// 删除用户
export const deleteUser = (params) => {
return postRequest('/user/delByIds', params)
}
// 重置用户密码
export const resetUserPass = (params) => {
return postRequest('/user/resetPass', params)
}
// 获取全部角色数据
export const getAllRoleList = (params) => {
return getRequest('/permission/role/getAllList', params)
}
// 分页获取角色数据
export const getRoleList = (params) => {
return getRequest('/permission/role/getAllByPage', params)
}
// 添加角色
export const addRole = (params) => {
return postRequest('/permission/role/add', params)
}
// 编辑角色
export const editRole = (params) => {
return postRequest('/permission/role/edit', params)
}
// 设为或取消注册角色
export const setDefaultRole = (params) => {
return postRequest('/role/setDefault', params)
}
// 分配角色权限
export const editRolePerm = (params) => {
return postRequest('/permission/role/editRolePermission', params)
}
// 删除角色
export const deleteRole = (params) => {
return postRequest('/permission/role/delByIds', params)
}
// 添加菜单权限
export const addMenus = (params) => {
return postRequest('/permission/add', params)
}
// 编辑菜单权限
export const editMenus = (params) => {
return postRequest('/permission/menu/edit', params)
}
// 删除菜单权限
export const deleteMenus = (params) => {
return postRequest('/permission/menu/del', params)
}
// 添加权限
export const addSubMenus = (params) => {
return postRequest('/permission/menu/sub_add', params)
}
// 获取全部权限数据
export const getAllPermissionList = (params) => {
return getRequest('/permission/menu/all', params)
}
//======================================================
// 加载数据
export const loadPermission = (id, params) => {
return getRequest(`/permission/getByParentId/${id}`, params)
}
// 添加权限
export const addPermission = (params) => {
return postRequest('/permission/add', params)
}
// 编辑权限
export const editPermission = (params) => {
return postRequest('/permission/edit', params)
}
// 删除权限
export const deletePermission = (params) => {
return postRequest('/permission/delByIds', params)
}
// 搜索权限
export const searchPermission = (params) => {
return getRequest('/permission/search', params)
}
// 获取全部字典
export const getAllDictList = (params) => {
return getRequest('/dict/getAll', params)
}
// 添加字典
export const addDict = (params) => {
return postRequest('/dict/add', params)
}
// 编辑字典
export const editDict = (params) => {
return postRequest('/dict/edit', params)
}
// 删除字典
export const deleteDict = (params) => {
return postRequest('/dict/delByIds', params)
}
// 搜索字典
export const searchDict = (params) => {
return getRequest('/dict/search', params)
}
// 获取全部字典数据
export const getAllDictDataList = (params) => {
return getRequest('/dictData/getByCondition', params)
}
// 添加字典数据
export const addDictData = (params) => {
return postRequest('/dictData/add', params)
}
// 编辑字典数据
export const editDictData = (params) => {
return postRequest('/dictData/edit', params)
}
// 删除字典数据
export const deleteData = (params) => {
return postRequest('/dictData/delByIds', params)
}
// 通过类型获取字典数据
export const getDictDataByType = (type, params) => {
return getRequest(`/permission/dictData/${type}`, params)
}
// 分页获取日志数据
export const getLogListData = (params) => {
return getRequest('/log/getAllByPage', params)
}
// 删除日志
export const deleteLog = (params) => {
return postRequest('/log/delByIds', params)
}
// 清空日志
export const deleteAllLog = (params) => {
return postRequest('/log/delAll', params)
}
// 分页获取Redis数据
export const getRedisData = (params) => {
return getRequest('/redis/getAllByPage', params)
}
// 通过key获取Redis信息
export const getRedisByKey = (key, params) => {
return getRequest(`/redis/getByKey/${key}`, params)
}
// 获取Redis键值数量
export const getRedisKeySize = (params) => {
return getRequest('/redis/getKeySize', params)
}
// 获取Redis内存
export const getRedisMemory = (params) => {
return getRequest('/redis/getMemory', params)
}
// 获取Redis信息
export const getRedisInfo = (params) => {
return getRequest('/redis/info', params)
}
// 添加编辑Redis
export const saveRedis = (params) => {
return postRequest('/redis/save', params)
}
// 删除Redis
export const deleteRedis = (params) => {
return postRequest('/redis/delByKeys', params)
}
// 清空Redis
export const deleteAllRedis = (params) => {
return postRequest('/redis/delAll', params)
}
// 分页获取定时任务数据
export const getQuartzListData = (params) => {
return getRequest('/quartzJob/getAllByPage', params)
}
// 添加定时任务
export const addQuartz = (params) => {
return postRequest('/quartzJob/add', params)
}
// 编辑定时任务
export const editQuartz = (params) => {
return postRequest('/quartzJob/edit', params)
}
// 暂停定时任务
export const pauseQuartz = (params) => {
return postRequest('/quartzJob/pause', params)
}
// 恢复定时任务
export const resumeQuartz = (params) => {
return postRequest('/quartzJob/resume', params)
}
// 删除定时任务
export const deleteQuartz = (params) => {
return postRequest('/quartzJob/delByIds', params)
}
// base64上传
export const base64Upload = (params) => {
return postRequest('/upload/file', params)
}
\ No newline at end of file
// 统一请求路径前缀在libs/axios.js中修改
import { getRequest, getNoAuthRequest, postNoAuthRequest, postRequest, putRequest } from '@/libs/axios';
// 认证
export const siteInfo = (id, params) => {
return getNoAuthRequest('/oauth2/info/' + id, params)
}
// 认证
export const authorize = (params) => {
return postNoAuthRequest('/oauth2/authorize', params)
}
// 认证过
export const authorized = (params) => {
return postRequest('/oauth2/authorized', params)
}
// 获取token
export const token = (params) => {
return getNoAuthRequest('/oauth2/token', params)
}
// 获取随机secretKey
export const getSecretKey = (params) => {
return getRequest('/client/getSecretKey', params)
}
// 获取客户端
export const getClientDataList = (params) => {
return getRequest('/client/getByCondition', params)
}
// 添加客户端
export const addClient = (params) => {
return postRequest('/client/save', params)
}
// 编辑客户端
export const updateClient = (params) => {
return putRequest('/client/update', params)
}
// 删除客户端
export const deleteClient = (params) => {
return postRequest('/client/delByIds', params)
}
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg width="1361px" height="609px" viewBox="0 0 1361 609" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<!-- Generator: Sketch 46.2 (44496) - http://www.bohemiancoding.com/sketch -->
<title>Group 21</title>
<desc>Created with Sketch.</desc>
<defs></defs>
<g id="Ant-Design-Pro-3.0" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="账户密码登录-校验" transform="translate(-79.000000, -82.000000)">
<g id="Group-21" transform="translate(77.000000, 73.000000)">
<g id="Group-18" opacity="0.8" transform="translate(74.901416, 569.699158) rotate(-7.000000) translate(-74.901416, -569.699158) translate(4.901416, 525.199158)">
<ellipse id="Oval-11" fill="#CFDAE6" opacity="0.25" cx="63.5748792" cy="32.468367" rx="21.7830479" ry="21.766008"></ellipse>
<ellipse id="Oval-3" fill="#CFDAE6" opacity="0.599999964" cx="5.98746479" cy="13.8668601" rx="5.2173913" ry="5.21330997"></ellipse>
<path d="M38.1354514,88.3520215 C43.8984227,88.3520215 48.570234,83.6838647 48.570234,77.9254015 C48.570234,72.1669383 43.8984227,67.4987816 38.1354514,67.4987816 C32.3724801,67.4987816 27.7006688,72.1669383 27.7006688,77.9254015 C27.7006688,83.6838647 32.3724801,88.3520215 38.1354514,88.3520215 Z" id="Oval-3-Copy" fill="#CFDAE6" opacity="0.45"></path>
<path d="M64.2775582,33.1704963 L119.185836,16.5654915" id="Path-12" stroke="#CFDAE6" stroke-width="1.73913043" stroke-linecap="round" stroke-linejoin="round"></path>
<path d="M42.1431708,26.5002681 L7.71190162,14.5640702" id="Path-16" stroke="#E0B4B7" stroke-width="0.702678964" opacity="0.7" stroke-linecap="round" stroke-linejoin="round" stroke-dasharray="1.405357899873153,2.108036953469981"></path>
<path d="M63.9262187,33.521561 L43.6721326,69.3250951" id="Path-15" stroke="#BACAD9" stroke-width="0.702678964" stroke-linecap="round" stroke-linejoin="round" stroke-dasharray="1.405357899873153,2.108036953469981"></path>
<g id="Group-17" transform="translate(126.850922, 13.543654) rotate(30.000000) translate(-126.850922, -13.543654) translate(117.285705, 4.381889)" fill="#CFDAE6">
<ellipse id="Oval-4" opacity="0.45" cx="9.13482653" cy="9.12768076" rx="9.13482653" ry="9.12768076"></ellipse>
<path d="M18.2696531,18.2553615 C18.2696531,13.2142826 14.1798519,9.12768076 9.13482653,9.12768076 C4.08980114,9.12768076 0,13.2142826 0,18.2553615 L18.2696531,18.2553615 Z" id="Oval-4" transform="translate(9.134827, 13.691521) scale(-1, -1) translate(-9.134827, -13.691521) "></path>
</g>
</g>
<g id="Group-14" transform="translate(216.294700, 123.725600) rotate(-5.000000) translate(-216.294700, -123.725600) translate(106.294700, 35.225600)">
<ellipse id="Oval-2" fill="#CFDAE6" opacity="0.25" cx="29.1176471" cy="29.1402439" rx="29.1176471" ry="29.1402439"></ellipse>
<ellipse id="Oval-2" fill="#CFDAE6" opacity="0.3" cx="29.1176471" cy="29.1402439" rx="21.5686275" ry="21.5853659"></ellipse>
<ellipse id="Oval-2-Copy" stroke="#CFDAE6" opacity="0.4" cx="179.019608" cy="138.146341" rx="23.7254902" ry="23.7439024"></ellipse>
<ellipse id="Oval-2" fill="#BACAD9" opacity="0.5" cx="29.1176471" cy="29.1402439" rx="10.7843137" ry="10.7926829"></ellipse>
<path d="M29.1176471,39.9329268 L29.1176471,18.347561 C23.1616351,18.347561 18.3333333,23.1796097 18.3333333,29.1402439 C18.3333333,35.1008781 23.1616351,39.9329268 29.1176471,39.9329268 Z" id="Oval-2" fill="#BACAD9"></path>
<g id="Group-9" opacity="0.45" transform="translate(172.000000, 131.000000)" fill="#E6A1A6">
<ellipse id="Oval-2-Copy-2" cx="7.01960784" cy="7.14634146" rx="6.47058824" ry="6.47560976"></ellipse>
<path d="M0.549019608,13.6219512 C4.12262681,13.6219512 7.01960784,10.722722 7.01960784,7.14634146 C7.01960784,3.56996095 4.12262681,0.670731707 0.549019608,0.670731707 L0.549019608,13.6219512 Z" id="Oval-2-Copy-2" transform="translate(3.784314, 7.146341) scale(-1, 1) translate(-3.784314, -7.146341) "></path>
</g>
<ellipse id="Oval-10" fill="#CFDAE6" cx="218.382353" cy="138.685976" rx="1.61764706" ry="1.61890244"></ellipse>
<ellipse id="Oval-10-Copy-2" fill="#E0B4B7" opacity="0.35" cx="179.558824" cy="175.381098" rx="1.61764706" ry="1.61890244"></ellipse>
<ellipse id="Oval-10-Copy" fill="#E0B4B7" opacity="0.35" cx="180.098039" cy="102.530488" rx="2.15686275" ry="2.15853659"></ellipse>
<path d="M28.9985381,29.9671598 L171.151018,132.876024" id="Path-11" stroke="#CFDAE6" opacity="0.8"></path>
</g>
<g id="Group-10" opacity="0.799999952" transform="translate(1054.100635, 36.659317) rotate(-11.000000) translate(-1054.100635, -36.659317) translate(1026.600635, 4.659317)">
<ellipse id="Oval-7" stroke="#CFDAE6" stroke-width="0.941176471" cx="43.8135593" cy="32" rx="11.1864407" ry="11.2941176"></ellipse>
<g id="Group-12" transform="translate(34.596774, 23.111111)" fill="#BACAD9">
<ellipse id="Oval-7" opacity="0.45" cx="9.18534718" cy="8.88888889" rx="8.47457627" ry="8.55614973"></ellipse>
<path d="M9.18534718,17.4450386 C13.8657264,17.4450386 17.6599235,13.6143199 17.6599235,8.88888889 C17.6599235,4.16345787 13.8657264,0.332739156 9.18534718,0.332739156 L9.18534718,17.4450386 Z" id="Oval-7"></path>
</g>
<path d="M34.6597385,24.809694 L5.71666084,4.76878945" id="Path-2" stroke="#CFDAE6" stroke-width="0.941176471"></path>
<ellipse id="Oval" stroke="#CFDAE6" stroke-width="0.941176471" cx="3.26271186" cy="3.29411765" rx="3.26271186" ry="3.29411765"></ellipse>
<ellipse id="Oval-Copy" fill="#F7E1AD" cx="2.79661017" cy="61.1764706" rx="2.79661017" ry="2.82352941"></ellipse>
<path d="M34.6312443,39.2922712 L5.06366663,59.785082" id="Path-10" stroke="#CFDAE6" stroke-width="0.941176471"></path>
</g>
<g id="Group-19" opacity="0.33" transform="translate(1282.537219, 446.502867) rotate(-10.000000) translate(-1282.537219, -446.502867) translate(1142.537219, 327.502867)">
<g id="Group-17" transform="translate(141.333539, 104.502742) rotate(275.000000) translate(-141.333539, -104.502742) translate(129.333539, 92.502742)" fill="#BACAD9">
<circle id="Oval-4" opacity="0.45" cx="11.6666667" cy="11.6666667" r="11.6666667"></circle>
<path d="M23.3333333,23.3333333 C23.3333333,16.8900113 18.1099887,11.6666667 11.6666667,11.6666667 C5.22334459,11.6666667 0,16.8900113 0,23.3333333 L23.3333333,23.3333333 Z" id="Oval-4" transform="translate(11.666667, 17.500000) scale(-1, -1) translate(-11.666667, -17.500000) "></path>
</g>
<circle id="Oval-5-Copy-6" fill="#CFDAE6" cx="201.833333" cy="87.5" r="5.83333333"></circle>
<path d="M143.5,88.8126685 L155.070501,17.6038544" id="Path-17" stroke="#BACAD9" stroke-width="1.16666667"></path>
<path d="M17.5,37.3333333 L127.466252,97.6449735" id="Path-18" stroke="#BACAD9" stroke-width="1.16666667"></path>
<polyline id="Path-19" stroke="#CFDAE6" stroke-width="1.16666667" points="143.902597 120.302281 174.935455 231.571342 38.5 147.510847 126.366941 110.833333"></polyline>
<path d="M159.833333,99.7453842 L195.416667,89.25" id="Path-20" stroke="#E0B4B7" stroke-width="1.16666667" opacity="0.6"></path>
<path d="M205.333333,82.1372105 L238.719406,36.1666667" id="Path-24" stroke="#BACAD9" stroke-width="1.16666667"></path>
<path d="M266.723424,132.231988 L207.083333,90.4166667" id="Path-25" stroke="#CFDAE6" stroke-width="1.16666667"></path>
<circle id="Oval-5" fill="#C1D1E0" cx="156.916667" cy="8.75" r="8.75"></circle>
<circle id="Oval-5-Copy-3" fill="#C1D1E0" cx="39.0833333" cy="148.75" r="5.25"></circle>
<circle id="Oval-5-Copy-2" fill-opacity="0.6" fill="#D1DEED" cx="8.75" cy="33.25" r="8.75"></circle>
<circle id="Oval-5-Copy-4" fill-opacity="0.6" fill="#D1DEED" cx="243.833333" cy="30.3333333" r="5.83333333"></circle>
<circle id="Oval-5-Copy-5" fill="#E0B4B7" cx="175.583333" cy="232.75" r="5.25"></circle>
</g>
</g>
</g>
</g>
</svg>
\ No newline at end of file
<svg width="144" height="160" viewBox="0 0 144 160" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M35.9992 33.9911H18.001C18.001 103.581 74.4093 160 143.999 160V141.999C84.3482 141.999 35.9992 93.6421 35.9992 33.9911Z" fill="#F6F7F9"/>
<path d="M143.999 -37.9991V-56C94.2896 -56 54 -15.7104 54 33.9912C54 83.7007 94.2896 124.001 143.999 124.001V106C104.231 106 72.0009 73.7619 72.0009 33.9938C72.0009 -5.76102 104.231 -37.9991 143.999 -37.9991Z" fill="#F6F7F9"/>
<path d="M143.999 -20.0012C114.169 -20.0012 89.999 4.16904 89.999 33.9909C89.999 63.8206 114.169 87.9988 143.999 87.9988V33.9988L197.999 33.9909C197.999 4.16904 173.831 -20.0012 143.999 -20.0012Z" fill="#F6F7F9"/>
</svg>
<svg width="133" height="107" viewBox="0 0 133 107" fill="none" xmlns="http://www.w3.org/2000/svg">
<g clip-path="url(#clip0)">
<path d="M73.7875 -41.8512C56.873 -31.8828 51.2451 -10.0992 61.2095 6.81757C71.1892 23.7374 92.9683 29.36 109.884 19.3894C126.8 9.41884 132.431 -12.3691 122.454 -29.2814L104.401 -59.906L73.7875 -41.8512Z" fill="#F6F7F9"/>
<path d="M92.0943 88.2154C109.009 78.2511 114.642 56.4614 104.676 39.5536C94.7011 22.6297 72.9083 17.0113 55.9955 26.9801C39.0876 36.946 33.4566 58.7381 43.4317 75.6526L61.4827 106.277L92.0943 88.2154Z" fill="#F6F7F9"/>
<path d="M148.611 54.9222C138.987 60.5945 126.586 57.3903 120.914 47.7667C115.241 38.1421 118.444 25.7417 128.068 20.0694C137.692 14.3964 150.093 17.5996 155.766 27.2243C161.438 36.8479 158.235 49.2492 148.611 54.9222Z" fill="#F6F7F9"/>
<path d="M33.0723 23.2276C24.6523 28.1906 13.797 25.3839 8.83348 16.9629C3.87052 8.54286 6.67711 -2.30563 15.0971 -7.26858C23.5152 -12.2304 34.3667 -9.43228 39.3302 -1.01126C44.2938 7.40977 41.4903 18.2658 33.0723 23.2276Z" fill="#F6F7F9"/>
</g>
<defs>
<clipPath id="clip0">
<rect x="104.56" y="-60" width="121.371" height="121.371" transform="rotate(59.4839 104.56 -60)" fill="white"/>
</clipPath>
</defs>
</svg>
<svg width="153" height="147" viewBox="0 0 153 147" fill="none" xmlns="http://www.w3.org/2000/svg">
<g clip-path="url(#clip0)">
<path d="M172.001 118.835C172.001 134.389 159.165 147.001 143.334 147.001C127.502 147.001 114.668 134.389 114.668 118.835C114.668 103.278 127.502 90.6685 143.334 90.6685C159.165 90.6685 172.001 103.278 172.001 118.835Z" fill="#F6F7F9"/>
<path d="M136.168 51.937C136.168 65.5495 124.938 76.5833 111.084 76.5833C97.2299 76.5833 86.0002 65.5495 86.0002 51.937C86.0002 38.3261 97.2299 27.2908 111.084 27.2908C124.938 27.2908 136.168 38.3261 136.168 51.937Z" fill="#F6F7F9"/>
<path d="M86.0003 104.749C86.0003 128.084 66.7479 147 42.9993 147C19.2524 147 0 128.084 0 104.749C0 81.4151 19.2524 62.5001 42.9993 62.5001C66.7479 62.5001 86.0003 81.4151 86.0003 104.749Z" fill="#F6F7F9"/>
<path d="M71.6689 13.2094C71.6689 32.6547 55.6249 48.4188 35.8344 48.4188C16.044 48.4188 0 32.6547 0 13.2094C0 -6.23587 16.044 -22 35.8344 -22C55.6249 -22 71.6689 -6.23587 71.6689 13.2094Z" fill="#F6F7F9"/>
<path d="M172.001 -0.875322C172.001 10.7918 162.374 20.2494 150.499 20.2494C138.625 20.2494 129 10.7918 129 -0.875322C129 -12.5425 138.625 -22 150.499 -22C162.374 -22 172.001 -12.5425 172.001 -0.875322Z" fill="#F6F7F9"/>
<path d="M164.832 69.5401C164.832 73.4291 161.624 76.5816 157.666 76.5816C153.708 76.5816 150.499 73.4291 150.499 69.5401C150.499 65.6526 153.708 62.5001 157.666 62.5001C161.624 62.5001 164.832 65.6526 164.832 69.5401Z" fill="#F6F7F9"/>
<path d="M111.084 2.64588C111.084 8.48027 106.271 13.209 100.333 13.209C94.3972 13.209 89.5845 8.48027 89.5845 2.64588C89.5845 -3.18689 94.3972 -7.91565 100.333 -7.91565C106.271 -7.91565 111.084 -3.18689 111.084 2.64588Z" fill="#F6F7F9"/>
</g>
<defs>
<clipPath id="clip0">
<rect y="-22" width="172" height="169" fill="white"/>
</clipPath>
</defs>
</svg>
<svg width="129" height="135" viewBox="0 0 129 135" fill="none" xmlns="http://www.w3.org/2000/svg">
<g clip-path="url(#clip0)">
<path d="M24.333 37.6673C10.8994 37.6673 0 26.7721 0 13.333C0 -0.10614 10.8994 -11 24.333 -11C37.7707 -11 48.6659 -0.104748 48.6659 13.333C48.6659 26.7707 59.5626 37.6673 73.0003 37.6673C86.438 37.6673 97.3332 26.7721 97.3332 13.3344C97.3332 -0.103355 108.23 -11 121.668 -11C135.105 -11 146.001 -0.104748 146.001 13.333C146.001 26.7707 135.105 37.6659 121.668 37.6659C81.3461 37.6659 48.6673 70.3586 48.6673 110.665C48.6673 124.096 37.7721 134.998 24.3344 134.998C10.8966 134.998 0 124.105 0 110.668C0 97.2299 10.8953 86.3332 24.333 86.3332C37.7707 86.3332 48.6631 75.438 48.6631 62.0003C48.6631 48.5626 37.7721 37.6673 24.333 37.6673Z" fill="#F6F7F9"/>
<path d="M66.917 95.4575C66.917 73.6072 84.6167 55.9158 106.46 55.9158C128.304 55.9172 146.001 73.6072 146.001 95.4575C146.001 117.298 128.304 135.001 106.457 135.001C84.614 135.001 66.917 117.298 66.917 95.4575Z" fill="#F6F7F9"/>
</g>
<defs>
<clipPath id="clip0">
<rect y="-11" width="146" height="146" fill="white"/>
</clipPath>
</defs>
</svg>
This diff is collapsed.
This diff is collapsed.
/* Logo 字体 */
@font-face {
font-family: "iconfont logo";
src: url('https://at.alicdn.com/t/font_985780_km7mi63cihi.eot?t=1545807318834');
src: url('https://at.alicdn.com/t/font_985780_km7mi63cihi.eot?t=1545807318834#iefix') format('embedded-opentype'),
url('https://at.alicdn.com/t/font_985780_km7mi63cihi.woff?t=1545807318834') format('woff'),
url('https://at.alicdn.com/t/font_985780_km7mi63cihi.ttf?t=1545807318834') format('truetype'),
url('https://at.alicdn.com/t/font_985780_km7mi63cihi.svg?t=1545807318834#iconfont') format('svg');
}
.logo {
font-family: "iconfont logo";
font-size: 160px;
font-style: normal;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
/* tabs */
.nav-tabs {
position: relative;
}
.nav-tabs .nav-more {
position: absolute;
right: 0;
bottom: 0;
height: 42px;
line-height: 42px;
color: #666;
}
#tabs {
border-bottom: 1px solid #eee;
}
#tabs li {
cursor: pointer;
width: 100px;
height: 40px;
line-height: 40px;
text-align: center;
font-size: 16px;
border-bottom: 2px solid transparent;
position: relative;
z-index: 1;
margin-bottom: -1px;
color: #666;
}
#tabs .active {
border-bottom-color: #f00;
color: #222;
}
.tab-container .content {
display: none;
}
/* 页面布局 */
.main {
padding: 30px 100px;
width: 960px;
margin: 0 auto;
}
.main .logo {
color: #333;
text-align: left;
margin-bottom: 30px;
line-height: 1;
height: 110px;
margin-top: -50px;
overflow: hidden;
*zoom: 1;
}
.main .logo a {
font-size: 160px;
color: #333;
}
.helps {
margin-top: 40px;
}
.helps pre {
padding: 20px;
margin: 10px 0;
border: solid 1px #e7e1cd;
background-color: #fffdef;
overflow: auto;
}
.icon_lists {
width: 100% !important;
overflow: hidden;
*zoom: 1;
}
.icon_lists li {
width: 100px;
margin-bottom: 10px;
margin-right: 20px;
text-align: center;
list-style: none !important;
cursor: default;
}
.icon_lists li .code-name {
line-height: 1.2;
}
.icon_lists .icon {
display: block;
height: 100px;
line-height: 100px;
font-size: 42px;
margin: 10px auto;
color: #333;
-webkit-transition: font-size 0.25s linear, width 0.25s linear;
-moz-transition: font-size 0.25s linear, width 0.25s linear;
transition: font-size 0.25s linear, width 0.25s linear;
}
.icon_lists .icon:hover {
font-size: 100px;
}
.icon_lists .svg-icon {
/* 通过设置 font-size 来改变图标大小 */
width: 1em;
/* 图标和文字相邻时,垂直对齐 */
vertical-align: -0.15em;
/* 通过设置 color 来改变 SVG 的颜色/fill */
fill: currentColor;
/* path 和 stroke 溢出 viewBox 部分在 IE 下会显示
normalize.css 中也包含这行 */
overflow: hidden;
}
.icon_lists li .name,
.icon_lists li .code-name {
color: #666;
}
/* markdown 样式 */
.markdown {
color: #666;
font-size: 14px;
line-height: 1.8;
}
.highlight {
line-height: 1.5;
}
.markdown img {
vertical-align: middle;
max-width: 100%;
}
.markdown h1 {
color: #404040;
font-weight: 500;
line-height: 40px;
margin-bottom: 24px;
}
.markdown h2,
.markdown h3,
.markdown h4,
.markdown h5,
.markdown h6 {
color: #404040;
margin: 1.6em 0 0.6em 0;
font-weight: 500;
clear: both;
}
.markdown h1 {
font-size: 28px;
}
.markdown h2 {
font-size: 22px;
}
.markdown h3 {
font-size: 16px;
}
.markdown h4 {
font-size: 14px;
}
.markdown h5 {
font-size: 12px;
}
.markdown h6 {
font-size: 12px;
}
.markdown hr {
height: 1px;
border: 0;
background: #e9e9e9;
margin: 16px 0;
clear: both;
}
.markdown p {
margin: 1em 0;
}
.markdown>p,
.markdown>blockquote,
.markdown>.highlight,
.markdown>ol,
.markdown>ul {
width: 80%;
}
.markdown ul>li {
list-style: circle;
}
.markdown>ul li,
.markdown blockquote ul>li {
margin-left: 20px;
padding-left: 4px;
}
.markdown>ul li p,
.markdown>ol li p {
margin: 0.6em 0;
}
.markdown ol>li {
list-style: decimal;
}
.markdown>ol li,
.markdown blockquote ol>li {
margin-left: 20px;
padding-left: 4px;
}
.markdown code {
margin: 0 3px;
padding: 0 5px;
background: #eee;
border-radius: 3px;
}
.markdown strong,
.markdown b {
font-weight: 600;
}
.markdown>table {
border-collapse: collapse;
border-spacing: 0px;
empty-cells: show;
border: 1px solid #e9e9e9;
width: 95%;
margin-bottom: 24px;
}
.markdown>table th {
white-space: nowrap;
color: #333;
font-weight: 600;
}
.markdown>table th,
.markdown>table td {
border: 1px solid #e9e9e9;
padding: 8px 16px;
text-align: left;
}
.markdown>table th {
background: #F7F7F7;
}
.markdown blockquote {
font-size: 90%;
color: #999;
border-left: 4px solid #e9e9e9;
padding-left: 0.8em;
margin: 1em 0;
}
.markdown blockquote p {
margin: 0;
}
.markdown .anchor {
opacity: 0;
transition: opacity 0.3s ease;
margin-left: 8px;
}
.markdown .waiting {
color: #ccc;
}
.markdown h1:hover .anchor,
.markdown h2:hover .anchor,
.markdown h3:hover .anchor,
.markdown h4:hover .anchor,
.markdown h5:hover .anchor,
.markdown h6:hover .anchor {
opacity: 1;
display: inline-block;
}
.markdown>br,
.markdown>p>br {
clear: both;
}
.hljs {
display: block;
background: white;
padding: 0.5em;
color: #333333;
overflow-x: auto;
}
.hljs-comment,
.hljs-meta {
color: #969896;
}
.hljs-string,
.hljs-variable,
.hljs-template-variable,
.hljs-strong,
.hljs-emphasis,
.hljs-quote {
color: #df5000;
}
.hljs-keyword,
.hljs-selector-tag,
.hljs-type {
color: #a71d5d;
}
.hljs-literal,
.hljs-symbol,
.hljs-bullet,
.hljs-attribute {
color: #0086b3;
}
.hljs-section,
.hljs-name {
color: #63a35c;
}
.hljs-tag {
color: #333333;
}
.hljs-title,
.hljs-attr,
.hljs-selector-id,
.hljs-selector-class,
.hljs-selector-attr,
.hljs-selector-pseudo {
color: #795da3;
}
.hljs-addition {
color: #55a532;
background-color: #eaffea;
}
.hljs-deletion {
color: #bd2c00;
background-color: #ffecec;
}
.hljs-link {
text-decoration: underline;
}
/* 代码高亮 */
/* PrismJS 1.15.0
https://prismjs.com/download.html#themes=prism&languages=markup+css+clike+javascript */
/**
* prism.js default theme for JavaScript, CSS and HTML
* Based on dabblet (http://dabblet.com)
* @author Lea Verou
*/
code[class*="language-"],
pre[class*="language-"] {
color: black;
background: none;
text-shadow: 0 1px white;
font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;
text-align: left;
white-space: pre;
word-spacing: normal;
word-break: normal;
word-wrap: normal;
line-height: 1.5;
-moz-tab-size: 4;
-o-tab-size: 4;
tab-size: 4;
-webkit-hyphens: none;
-moz-hyphens: none;
-ms-hyphens: none;
hyphens: none;
}
pre[class*="language-"]::-moz-selection,
pre[class*="language-"] ::-moz-selection,
code[class*="language-"]::-moz-selection,
code[class*="language-"] ::-moz-selection {
text-shadow: none;
background: #b3d4fc;
}
pre[class*="language-"]::selection,
pre[class*="language-"] ::selection,
code[class*="language-"]::selection,
code[class*="language-"] ::selection {
text-shadow: none;
background: #b3d4fc;
}
@media print {
code[class*="language-"],
pre[class*="language-"] {
text-shadow: none;
}
}
/* Code blocks */
pre[class*="language-"] {
padding: 1em;
margin: .5em 0;
overflow: auto;
}
:not(pre)>code[class*="language-"],
pre[class*="language-"] {
background: #f5f2f0;
}
/* Inline code */
:not(pre)>code[class*="language-"] {
padding: .1em;
border-radius: .3em;
white-space: normal;
}
.token.comment,
.token.prolog,
.token.doctype,
.token.cdata {
color: slategray;
}
.token.punctuation {
color: #999;
}
.namespace {
opacity: .7;
}
.token.property,
.token.tag,
.token.boolean,
.token.number,
.token.constant,
.token.symbol,
.token.deleted {
color: #905;
}
.token.selector,
.token.attr-name,
.token.string,
.token.char,
.token.builtin,
.token.inserted {
color: #690;
}
.token.operator,
.token.entity,
.token.url,
.language-css .token.string,
.style .token.string {
color: #9a6e3a;
background: hsla(0, 0%, 100%, .5);
}
.token.atrule,
.token.attr-value,
.token.keyword {
color: #07a;
}
.token.function,
.token.class-name {
color: #DD4A68;
}
.token.regex,
.token.important,
.token.variable {
color: #e90;
}
.token.important,
.token.bold {
font-weight: bold;
}
.token.italic {
font-style: italic;
}
.token.entity {
cursor: help;
}
This diff is collapsed.
@font-face {font-family: "iconfont";
src: url('iconfont.eot?t=1610615140780'); /* IE9 */
src: url('iconfont.eot?t=1610615140780#iefix') format('embedded-opentype'), /* IE6-IE8 */
url('data:application/x-font-woff2;charset=utf-8;base64,d09GMgABAAAAAAeUAAsAAAAADlwAAAdFAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHEIGVgCECgqOXItkATYCJAMkCxQABCAFhG0HeBsIDCMR9oOSwpL9M8G2hZPXrPDZ/W0zQyUjzZp8CC/7NzOJe7cquVeIW+NgOB9AFufqgI2KMEN5lt6jH6RdrpylBwFwqSut/+4/YUOAuUKSrCDUmXRst75Wku0AmwMI7a4UqPj/v1/p5PEAyTv57LtMZVFtNw8tcHJEgy3OWfqrGaK+D3UGaurXlvOBAFDgiVCQXFtJDSRwMHUEqnp179oeUsYOroFGIJmEin05FzIPPCQ6nd4CMDd4fPINookEUPAM5rYVXfI6IVOTtDNsnD4OrTwCFNN5AfArAQxAKACON66otCwC6InKYFAaOXQDYIYRtRQ/V9XctaHaCG2Ktlc7o+so9mU2IzBbeizxL4+DAB4iJFCACEC9HVD7JSVAcxAwQFMREEBzR8AB2lAEAqCNQMAD2hQEIqDtlU9nOAN2UEYve41mAF4AzTNUj0DN1fJWnoBC+JRu3s6siLMSJ3v3YDkl11WWne1kgzHMPqqroXCxR5TbTdiWpNLJ2I70KNicnvzI7cmLe5THoesrYbcFcpiFSR9v7UrZVATHRB9i3QKbTFA38w5+b3mgffVmdDybcxHNeqCHqTMz3zOW/55X6+EqduQvhrgHjauezHpqhkscabT/Q48gOWwGYIXxLuHce49sgZwce6MXi8SRmfcQzRUGiNSRhWc09bY5c/nNlxEiSTMvzqo02G69Ut7dSTVQcdUzi16QbQGGIDJj+GW9H7SvORwYZAhbP8CUW7jis5l+V9Pk3qj8/M2H988dg78Uv7MsJj5o78YLuy6c+8+t1zj6zE1Pa/+CGa/0dIXsa2uFMfZtsCu0AKi8btEgHW1+cv3/UGgYb2drZltp5UkDXEOF9Dj5zE5vy6qgjOqwocrVtlLRw08N6WJ70CFo+27xhK1VTHqxu1UIW+SnzxSZEzCVG+umgTh2dUQ548z4ZvCwSr+elT8Jn8Yd+qZ9q4H5OH82AmaykUNGcndn6SBP+77riGZRkbuqP6+VXoEEzsZURIvRzexkTDkgKaMnYcOqmdva8wlxkBWuOzw3B027G9BPzBT7eU58FcrAn/H1uFgOM8V7Wl38u137Z0Ur0e5Sr1rEuwqHMEIg8X7SUB+/qGoiPCG+/W8u40GvV83MIzOGvg+NvtXaa0q3dnw+8lKqNrZ+GFAod7Zbd+JSfl7LzVEhK84Oc57sFmdtm2ANGuWIUfsXyYMmR48P3mWDnrROGqlkqDuXpcS0jRkTk+VgsKVfblGjOv7R3x2hv/cPJSlJzmOwOZTf5zExMW1Tlu20Sx+prpOBpA57P46x/vvpC8+MMT9db+maXWRq9W3Z34ce7m5lynSZsHrPwR5pa25/uPj5waXGkgsfn3ct73XUc8G2ohGDxg5AgadpYoZTkWXzntxWjdm5+VOb8UO/n7Qcl/jP22hrqy2jY9FweXuTUsKVLx42rFlCb1RKW7q785qeEeMnBreecGBg5JLayJYDV+4fk+Q0cUDvNgvgzQY+57y9ued051m2ItZXV1HX1WArtQZn4sm1zNqRzFaP0QnkeCM/syubI7vmTm8SbQE0RyoIvzfpnisJb4UGiLai4W65wWzuzC6N/Isyf8xUf4xeGXuW0Z3cc29vbKbhgdUlmW294/wENuDw0mnUusmR5XRAenK3uMjONMc0KJP8mYvuY7uh1qfW18k8Lf2xsw9Io5aky3uGlEXA1q5bicXJtwuZNpDUug13yB5TVUPiLaUhVQFm+qfR5fW8/eEtHkwIc+PmeewzuMDlRxcdWe0WXx47TU7vFNLfWY/SI/WxUy6I/QyRcPd1seSPafM/x7W+Zuhzds50upBeWseG0ezMfhM9kv8VS63MvH99oZRv8ppTnBD91+y8gcbO38Y4d84LLZ9Fq7mFX1zcwzbRjwcM0z94L/xwae4wl9JOoe0kvTZE6WOmHnTsN9ffGlxafjlt3qd4jB0HAPp37AazBKxDrB+rYJ1iY1gp63/2lqkXm8GBDQIAtpl+D+g/cOXMSlmsh2Pzl5xoa0j9TVL/QGa9sgZ3Qukwcrn8N6zorKAaunG3AIArF1SMVtYnBodokQ3CEgAyekLIUgCKNQOgEMJmvJnW6NBZQQMZHRKgEOEBDBL8iRw1FHioiAUBEjJAQQjyD1ZhwQAwEE4GEIzJBAiM2AsUzXEWGIy4LQEJUF8DD0d8BwKMhIGCOmI5pgrrNoROF8ZOcIT+AzQEr2yXnMLqb9TZdpxWBcx/5JlS0JR1vvSFHnmKHeanbkUUKA4O7uRiaG2AyOGBg5STSDxXlarasRyCW5wWOYydeMIjoP9gaQheNZdT4eG/UWfbcUOfKvYfeaa5AxqUqDsQv/S+U59baZyfuoWgV4HTmYMD3NGL1soHQKxe64GDlJgGZOMZFY6luurL5Y3uXevx+vo1byIvKWGEIzwRiEgkIhMFqkOfi3wLfjseE1mUO4zktbPzKqXtC6kPO00y5X5ndHiTPyX6IG9bLAAAAAA=') format('woff2'),
url('iconfont.woff?t=1610615140780') format('woff'),
url('iconfont.ttf?t=1610615140780') format('truetype'), /* chrome, firefox, opera, Safari, Android, iOS 4.2+ */
url('iconfont.svg?t=1610615140780#iconfont') format('svg'); /* iOS 4.1- */
}
.iconfont {
font-family: "iconfont" !important;
font-size: 16px;
font-style: normal;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
.icon-menu-unfold:before {
content: "\e60b";
}
.icon-menu-fold:before {
content: "\e6be";
}
.icon-dingding:before {
content: "\e608";
}
.icon-qq:before {
content: "\e61c";
}
.icon-weibo:before {
content: "\e67a";
}
.icon-github:before {
content: "\e677";
}
.icon-weixin:before {
content: "\e686";
}
.icon-qiyeweixin:before {
content: "\e6af";
}
This diff is collapsed.
{
"id": "2113600",
"name": "xboot",
"font_family": "iconfont",
"css_prefix_text": "icon-",
"description": "",
"glyphs": [
{
"icon_id": "8265654",
"name": "menu-unfold",
"font_class": "menu-unfold",
"unicode": "e60b",
"unicode_decimal": 58891
},
{
"icon_id": "11551010",
"name": "menu-fold",
"font_class": "menu-fold",
"unicode": "e6be",
"unicode_decimal": 59070
},
{
"icon_id": "1327163",
"name": "钉钉",
"font_class": "dingding",
"unicode": "e608",
"unicode_decimal": 58888
},
{
"icon_id": "15475799",
"name": "qq",
"font_class": "qq",
"unicode": "e61c",
"unicode_decimal": 58908
},
{
"icon_id": "2742669",
"name": "微博",
"font_class": "weibo",
"unicode": "e67a",
"unicode_decimal": 59002
},
{
"icon_id": "3876518",
"name": "github",
"font_class": "github",
"unicode": "e677",
"unicode_decimal": 58999
},
{
"icon_id": "6742309",
"name": "微信",
"font_class": "weixin",
"unicode": "e686",
"unicode_decimal": 59014
},
{
"icon_id": "15643736",
"name": "企业微信",
"font_class": "qiyeweixin",
"unicode": "e6af",
"unicode_decimal": 59055
}
]
}
This diff is collapsed.
import axios from 'axios';
import { getStore, setStore } from './storage';
import { router } from '../router/index';
import { Message } from 'view-design';
import Cookies from 'js-cookie';
// 统一请求路径前缀
let base = '/adminapi';
// 超时设定
axios.defaults.timeout = 15000;
axios.interceptors.request.use(config => {
return config;
}, err => {
Message.error('请求超时');
return Promise.resolve(err);
});
// http response 拦截器
axios.interceptors.response.use(response => {
const data = response.data;
// 根据返回的code值来做不同的处理(和后端约定)
switch (data.code) {
case 401:
// 未登录 清除已登录状态 清除锁屏状态
Cookies.set('userInfo', '');
Cookies.set("locking", "0");
setStore('accessToken', '');
if (router.history.current.name != "login") {
if (data.message !== null) {
Message.error(data.message);
} else {
Message.error("未知错误,请重新登录");
}
router.push('/login');
}
break;
case 403:
// 没有权限
if (data.message !== null) {
Message.error(data.message);
} else {
Message.error("未知错误");
}
break;
case 500:
// 错误
if (data.message !== null) {
Message.error(data.message);
} else {
Message.error("未知错误");
}
break;
default:
return data;
}
return data;
}, (err) => {
const response = err.response
if(response.status == 401){
// 未登录 清除已登录状态 清除锁屏状态
Cookies.set('userInfo', '');
Cookies.set("locking", "0");
setStore('accessToken', '');
if (router.history.current.name != "login") {
if (response.data.message !== null) {
Message.error(response.data.message);
} else {
Message.error("未知错误,请重新登录");
}
router.push('/login');
}
}
// 返回状态码不为200时候的错误处理
Message.error(response.data.message);
return Promise.resolve(err);
});
export const getRequest = (url, params) => {
let accessToken = getStore('authenticate');
return axios({
method: 'get',
url: `${base}${url}`,
params: params,
headers: {
'authorization': accessToken
}
});
};
export const postRequest = (url, params) => {
let accessToken = getStore("authenticate");
return axios({
method: 'post',
url: `${base}${url}`,
data: params,
transformRequest: [function (data) {
let ret = '';
for (let it in data) {
ret += encodeURIComponent(it) + '=' + encodeURIComponent(data[it]) + '&';
}
ret = ret.substring(0, ret.length - 1);
return ret;
}],
headers: {
'Content-Type': 'application/x-www-form-urlencoded',
'authorization': accessToken
}
});
};
export const putRequest = (url, params) => {
let accessToken = getStore("authenticate");
return axios({
method: 'put',
url: `${base}${url}`,
data: params,
transformRequest: [function (data) {
let ret = '';
for (let it in data) {
ret += encodeURIComponent(it) + '=' + encodeURIComponent(data[it]) + '&';
}
ret = ret.substring(0, ret.length - 1);
return ret;
}],
headers: {
'Content-Type': 'application/x-www-form-urlencoded',
'authorization': accessToken
}
});
};
export const postBodyRequest = (url, params) => {
let accessToken = getStore('authenticate');
return axios({
method: 'post',
url: `${base}${url}`,
data: params,
headers: {
'authorization': accessToken
}
});
};
/**
* 无需token验证的GET请求 避免旧token过期导致请求失败
* @param {*} url
* @param {*} params
*/
export const getNoAuthRequest = (url, params) => {
return axios({
method: 'get',
url: `${base}${url}`,
params: params
});
};
export const postNoAuthRequest = (url, params) => {
return axios({
method: 'post',
url: `${base}${url}`,
data: params,
transformRequest: [function (data) {
let ret = '';
for (let it in data) {
ret += encodeURIComponent(it) + '=' + encodeURIComponent(data[it]) + '&';
}
ret = ret.substring(0, ret.length - 1);
return ret;
}],
headers: {
'Content-Type': 'application/x-www-form-urlencoded'
}
});
};
const hasPermission = {
install (Vue, options) {
Vue.directive('has', {
inserted (el, binding, vnode) {
let permTypes = vnode.context.$route.meta.permTypes;
if (permTypes&&!permTypes.includes(binding.value)) {
el.parentNode.removeChild(el);
}
}
});
}
};
export default hasPermission;
import { getStore } from './storage';
const hasRole = {
install (Vue, options) {
Vue.directive('hasRole', {
inserted (el, binding) {
let roles = getStore("roles");
if (roles&&!roles.includes(binding.value)) {
el.parentNode.removeChild(el);
}
}
});
}
};
export default hasRole;
This diff is collapsed.
export default (url) =>()=>import(`@/views/${url}.vue`)
export const shortcuts = [
{
text: '今日',
value() {
var end = new Date();
var start = new Date();
end.setTime(start.getTime());
return [start, end];
}
},
{
text: '昨日',
value() {
var end = new Date();
var start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24);
end.setTime(end.getTime() - 3600 * 1000 * 24);
return [start, end];
}
},
{
text: '本周',
value() {
var now = new Date(); // 当前日期
var nowDayOfWeek = now.getDay(); // 今天本周的第几天
var nowDay = now.getDate(); // 当前日
var nowMonth = now.getMonth(); // 当前月
var day = nowDayOfWeek || 7;
var start = new Date(now.getFullYear(), nowMonth, nowDay + 1 - day);
var end = new Date(now.getFullYear(), nowMonth, nowDay + 7 - day);
start.setTime(start.getTime());
end.setTime(end.getTime());
return [start, end];
}
},
{
text: '本月',
value() {
var now = new Date(); // 当前日期
var nowYear = now.getYear(); // 当前年
nowYear += (nowYear < 2000) ? 1900 : 0;
var nowMonth = now.getMonth(); // 当前月
// 本月天数
var monthStartDate = new Date(nowYear, nowMonth, 1);
var monthEndDate = new Date(nowYear, nowMonth + 1, 1);
var days = (monthEndDate - monthStartDate) / (1000 * 60 * 60 * 24);
var start = new Date(nowYear, nowMonth, 1);
var end = new Date(nowYear, nowMonth, days);
start.setTime(start.getTime());
end.setTime(end.getTime());
return [start, end];
}
}
]
/**
* 存储localStorage
*/
export const setStore = (name, content) => {
if (!name) return;
if (typeof content !== 'string') {
content = JSON.stringify(content);
}
window.localStorage.setItem(name, content);
}
/**
* 获取localStorage
*/
export const getStore = name => {
if (!name) return;
return window.localStorage.getItem(name);
}
/**
* 删除localStorage
*/
export const removeStore = name => {
if (!name) return;
window.localStorage.removeItem(name);
}
var idTmr;
function getExplorer () {
var explorer = window.navigator.userAgent;
if (explorer.indexOf('MSIE') >= 0) {
// ie
return 'ie';
} else if (explorer.indexOf('Firefox') >= 0) {
// firefox
return 'Firefox';
} else if (explorer.indexOf('Chrome') >= 0) {
// Chrome
return 'Chrome';
} else if (explorer.indexOf('Opera') >= 0) {
// Opera
return 'Opera';
} else if (explorer.indexOf('Safari') >= 0) {
// Safari
return 'Safari';
};
};
function tranform (table, aId, name) {
let tableHead = table.$children[0].$el;
let tableBody = table.$children[1].$el;
let tableInnerHTML = '<thead><tr>';
if (table.$children.length !== 1) {
let len = tableBody.rows.length;
let i = -1;
while (i < len) {
if (i == -1) {
Array.from(tableHead.rows[0].children).forEach((td) => {
tableInnerHTML = tableInnerHTML + '<th>' + td.children[0].children[0].innerHTML + '</th>';
});
tableInnerHTML += '</tr><thead><tbody>';
} else {
tableInnerHTML += '<tr>';
Array.from(tableBody.rows[i].children).forEach((td) => {
tableInnerHTML = tableInnerHTML + '<td>' + td.children[0].children[0].innerHTML + '</td>';
});
tableInnerHTML += '</tr>';
}
i++;
}
tableInnerHTML += '</tbody>';
}
if (getExplorer() !== 'Safari' && name.substr(-1, 4) !== '.xls') {
name += '.xls';
}
if (getExplorer() == 'ie') {
var curTbl = table;
var oXL = new ActiveXObject('Excel.Application');
var oWB = oXL.Workbooks.Add();
var xlsheet = oWB.Worksheets(1);
var sel = document.body.createTextRange();
sel.moveToElementText(curTbl);
sel.select();
sel.execCommand('Copy');
xlsheet.Paste();
oXL.Visible = true;
try {
var fname = oXL.Application.GetSaveAsFilename('Excel.xls', 'Excel Spreadsheets (*.xls), *.xls');
} catch (e) {
print('Nested catch caught ' + e);
} finally {
oWB.SaveAs(fname);
// oWB.Close(savechanges = false);
oXL.Quit();
oXL = null;
idTmr = setInterval(Cleanup(), 1);
}
} else {
tableToExcel(tableInnerHTML, aId, name);
}
}
function Cleanup () {
window.clearInterval(idTmr);
// CollectGarbage();
}
let tableToExcel = (function () {
let uri = 'data:application/vnd.ms-excel;base64,';
let template = '<html><head><meta charset="UTF-8"></head><body><table>{table}</table></body></html>';
let base64 = function (s) { return window.btoa(unescape(encodeURIComponent(s))); };
let format = function (s, c) {
return s.replace(/{(\w+)}/g, function (m, p) { return c[p]; });
};
return function (table, aId, name) {
let ctx = {worksheet: name || 'Worksheet', table: table};
document.getElementById(aId).href = uri + base64(format(template, ctx));
document.getElementById(aId).download = name;
document.getElementById(aId).click();
};
})();
const table2excel = {};
table2excel.transform = tranform;
export default table2excel;
This diff is collapsed.
/**
* 用户名
* @param rule 验证规则(不含特殊字符)
* @param value 需要验证的值
* @param callback 回调函数
*/
export const validateUsername = (rule, value, callback) => {
var reg = /^[a-zA-Z0-9_\u4e00-\u9fa5]{1,16}$/;
if (value.length > 16) {
callback(new Error('长度不能超过16个字符'));
} else if (!reg.test(value)) {
callback(new Error('仅支持大小写英文、中文和下划线_'));
} else {
callback();
}
};
/**
* 密码格式验证
* @param rule 验证规则(不少于6位)
* @param value 需要验证的值
* @param callback 回调函数
*/
export const validatePassword = (rule, value, callback) => {
if (value.length < 6) {
callback(new Error('密码长度不得小于6位'));
} else {
callback();
}
};
/**
* 手机号码格式验证
* @param rule 验证规则
* @param value 需要验证的值
* @param callback 回调函数
*/
export const validateMobile = (rule, value, callback) => {
var reg = /^[1][3,4,5,6,7,8,9][0-9]{9}$/;
if (!reg.test(value)) {
callback(new Error('手机号格式错误'));
} else {
callback();
}
};
/**
* 身份证号码格式验证
* @param rule 验证规则(是否满足18位)
* @param value 需要验证的值
* @param callback 回调函数
*/
export const validateIDCard = (rule, value, callback) => {
const reg = /^[1-9]\d{5}(18|19|([23]\d))\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/;
if (!reg.test(value)) {
callback(new Error('身份证号码格式错误'));
} else {
callback();
}
};
\ No newline at end of file
{
"name": "zh",
"options": {
"months": [
"1月",
"2月",
"3月",
"4月",
"5月",
"6月",
"7月",
"8月",
"9月",
"10月",
"11月",
"12月"
],
"shortMonths": [
"1月",
"2月",
"3月",
"4月",
"5月",
"6月",
"7月",
"8月",
"9月",
"10月",
"11月",
"12月"
],
"days": [
"星期日",
"星期一",
"星期二",
"星期三",
"星期四",
"星期五",
"星期六"
],
"shortDays": [
"周日",
"周一",
"周二",
"周三",
"周四",
"周五",
"周六"
],
"toolbar": {
"exportToSVG": "下载 SVG",
"exportToPNG": "下载 PNG",
"exportToCSV": "下载 CSV",
"menu": "菜单",
"selection": "选择",
"selectionZoom": "选择缩放",
"zoomIn": "放大",
"zoomOut": "缩小",
"pan": "平移",
"reset": "重置缩放"
}
}
}
\ No newline at end of file
import Vue from 'vue';
import VueI18n from 'vue-i18n';
import zhLocale from './lang/zh-CN';
import enLocale from './lang/en-US';
import zhCnLocale from 'view-design/src/locale/lang/zh-CN';
import enUsLocale from 'view-design/src/locale/lang/en-US';
Vue.use(VueI18n);
// 根据浏览器信息自动设置语言
const navLang = navigator.language;
const localLang = (navLang == 'zh-CN' || navLang == 'en-US') ? navLang : false;
if (localStorage.lang == "undefined") {
localStorage.lang = ""
}
const lang = localStorage.lang || localLang || 'zh-CN';
if (!localStorage.lang) {
localStorage.lang = lang;
}
Vue.config.lang = lang;
// 多语言配置 vue-i18n 6.x+
Vue.locale = () => { };
const messages = {
'zh-CN': Object.assign(zhCnLocale, zhLocale),
'en-US': Object.assign(enUsLocale, enLocale)
};
const i18n = new VueI18n({
locale: lang,
messages
});
export default i18n;
export default {
xboot: 'XBoot is an excellent one-station front-end and back-end separation fast development platform',
usernameLogin: 'Username Sign in',
mobileLogin: 'Phone',
autoLogin: 'Remember me',
forgetPass: 'Forget password',
otherLogin: 'Sign in with',
regist: 'Register',
register: "Register",
registering: "Registering...",
registerNow: "No account yet?Register now",
loginNow: "Sign in with an account",
login: 'Sign in',
logining: 'Signing in...',
home: 'Home',
searchMenu: 'Search Menu...',
fullscreen: 'Fullscreen',
exitFullscreen: 'Exit Fullscreen',
Notifications: 'Notifications',
showMore: 'View More',
markAll: 'Mark all as read',
refresh: 'Refresh',
noNewMes: 'There are no new unread messages',
userCenter: 'Account Center',
changePass: 'Change Password',
logout: 'Sign out',
closeAll: 'Close All',
closeOthers: 'Close Others',
docs: 'Docs',
fullVersion: 'XBoot Plus',
rights: 'All Rights Reserved',
sso: "XBoot Authentication Platform",
authorize: "Authorize",
authorizeAndSignin: "Authorize and Sign in",
authorizing: "Authorizing...",
wants: "wants to access your account",
wants2: "",
authAquire: "Public data only",
aquireInfo: "Limited access to your public data",
afterAuth: "Authorizing will redirect to",
relateTitle: "Bind XBoot's Account",
relate: "Bind",
relating: "Binding...",
themeTitle: "Theme Style Setting",
wholeSetting: "Whole Style Preset",
lightblue: "Light Blue Style",
topNav: "Menu Top Fixed Style",
darkblue: "Dark Blue Style",
darkMode: "Dark Mode",
dark: "Dark Style",
middle: "Neutral Style",
white: "Light White Style",
sideMenu: "Side Menu Style",
navMenu: "Navigation Style",
navMode: "Navigation Mode",
rightTop: "Right Top",
topFix: "Top Fixed",
navType: "Nav Show Type",
horizontal: "Horizontal",
sliceNum: "Default show number",
singleDrop: "Single Dropdown",
iconBreadcrumb: "Icon+Breadcrumb",
showIcon: "Show Icon",
dropMenu: "DropMenu Type",
appStyle: "App Icon Style",
listStyle: "List Mode",
contentArea: "Content Area",
enableTags: "Enable Multi-Tags",
showLogo: "Show Logo",
showFold: "Show Fold Menu Icon",
showSearchMenu: "Show Search Menu",
showFooter: "Show Footer",
sideMenuWidth: "Side Menu Width",
otherSetting: "Other Setting",
weakMode: "Weak Mode",
themeInfo: "This is mainly for previewing the layout. It is recommended that only some functions are opened or closed for users in the production environment"
};
export default {
xboot: 'XBoot 是很不错的一站式前后端分离快速开发平台',
usernameLogin: '账户密码登录',
mobileLogin: '手机短信登录',
autoLogin: '自动登录',
forgetPass: '忘记密码',
otherLogin: '其他方式登录',
regist: '注册账户',
register: "注册",
registering: "注册中...",
registerNow: "还没有账号?立即注册",
loginNow: "使用已有账号登录",
login: '登录',
logining: '登录中...',
home: '首页',
searchMenu: '搜索菜单...',
fullscreen: '全屏',
exitFullscreen: '退出全屏',
Notifications: '消息通知',
markAll: '标记所有已读',
refresh: '刷新',
noNewMes: '暂无新的未读消息',
showMore: '查看更多',
userCenter: '个人中心',
changePass: '修改密码',
logout: '退出登录',
closeAll: '关闭全部',
closeOthers: '关闭其他',
docs: '开发文档',
fullVersion: 'XBoot完整版',
rights: '版权所有',
sso: "XBoot统一认证平台",
authorize: '授权',
authorizeAndSignin: "授权并登录",
authorizing: "授权中...",
wants: "想要获取您的账户",
wants2: "的权限",
authAquire: "授权后,将获得以下用户数据",
aquireInfo: "获得您的昵称、头像、性别",
afterAuth: "授权后将会跳转至",
relateTitle: "绑定XBoot账号",
relate: "立即绑定",
relating: "绑定中...",
themeTitle: "主题样式配置",
wholeSetting: "整套风格预设",
lightblue: "亮蓝色风格",
topNav: "顶部菜单风格",
darkblue: "暗蓝色风格",
darkMode: "暗黑模式",
dark: "黑色风格",
middle: "中性风格",
white: "亮白色风格",
sideMenu: "侧边菜单风格",
navMenu: "导航栏风格",
navMode: "导航栏模式",
rightTop: "右上侧",
topFix: "顶部置顶",
navType: "导航菜单展示",
horizontal: "横向多菜单",
sliceNum: "默认显示个数",
singleDrop: "单个下拉菜单",
iconBreadcrumb: "图标+面包屑",
showIcon: "是否显示图标",
dropMenu: "下拉菜单展示",
appStyle: "App图标应用",
listStyle: "列表模式",
contentArea: "内容区域",
enableTags: "启用Tags多标签",
showLogo: "显示Logo",
showFold: "显示折叠菜单图标",
showSearchMenu: "显示搜索菜单",
showFooter: "显示页脚",
sideMenuWidth: "侧边菜单宽度",
otherSetting: "其他设置",
weakMode: "色弱模式",
themeInfo: "主题配置主要用于预览布局效果,建议在生产环境仅为用户开放部分功能或关闭该功能"
};
// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import ViewUI from 'view-design'
import 'view-design/dist/styles/iview.css';
import App from './App'
import { router } from './router/index'
import store from './store'
import i18n from '@/locale'
import { getRequest, postRequest, putRequest, postBodyRequest, getNoAuthRequest, postNoAuthRequest } from '@/libs/axios'
import { setStore, getStore, removeStore } from '@/libs/storage'
import { format } from "date-fns";
import util from '@/libs/util'
import hasPermission from '@/libs/hasPermission'
import hasRole from '@/libs/hasRole'
import iviewArea from '@/views/my-components/iview-area';
import XIcon from '@/views/my-components/xboot/x-icon'
import VueLazyload from 'vue-lazyload'
import VueClipboard from 'vue-clipboard2'
import VueApexCharts from 'vue-apexcharts'
import './assets/iconfont/iconfont.css'
import '@babel/polyfill'
Vue.config.productionTip = false
Vue.use(VueLazyload, {
error: require('./assets/img-error.png'),
loading: require('./assets/loading2.gif')
})
Vue.use(ViewUI, {
i18n: (key, value) => i18n.t(key, value)
});
Vue.use(VueClipboard);
Vue.use(hasPermission);
Vue.use(hasRole);
Vue.use(iviewArea);
Vue.use(XIcon);
Vue.use(VueApexCharts)
Vue.component('apexchart', VueApexCharts)
// 挂载全局使用的方法
Vue.prototype.getRequest = getRequest;
Vue.prototype.postRequest = postRequest;
Vue.prototype.putRequest = putRequest;
Vue.prototype.postBodyRequest = postBodyRequest;
Vue.prototype.getNoAuthRequest = getNoAuthRequest;
Vue.prototype.postNoAuthRequest = postNoAuthRequest;
Vue.prototype.setStore = setStore;
Vue.prototype.getStore = getStore;
Vue.prototype.removeStore = removeStore;
Vue.prototype.format = format;
/* eslint-disable no-new */
new Vue({
el: '#app',
router,
store,
i18n,
render: h => h(App),
data: {
currentPageName: ''
},
mounted() {
// 加载默认主题主题
this.$store.commit('setMainTheme', 'parimary');
this.$store.commit("setMenuTheme", "black");
this.$store.commit("setNavTheme", "primary");
this.$store.commit("setFixNav", true);
this.$store.commit("setShowTags", true);
this.$store.commit("setMenuWidth", 250);
this.$store.commit('setTheme', localStorage.theme);
// 初始化菜单
util.initRouter(this);
// 设置用户信息
this.$store.commit("setUserInfo", { nickname: localStorage.nickname, avatar: localStorage.avatar });
// 显示打开的页面的列表
this.$store.commit('setOpenedList');
this.$store.commit('initCachepage');
}
})
import Vue from 'vue';
import ViewUI from 'view-design';
import Util from '../libs/util';
import VueRouter from 'vue-router';
import Cookies from 'js-cookie';
import { routers, otherRouter } from './router';
import store from '../store';
Vue.use(VueRouter);
// 路由配置
const RouterConfig = {
mode: 'history',
routes: routers
};
export const router = new VueRouter(RouterConfig);
router.beforeEach((to, from, next) => {
ViewUI.LoadingBar.start();
Util.title(to.meta.title);
var name = to.name;
if (Cookies.get('locking') == '1' && name !== 'locking') {
// 判断当前是否是锁定状态
next({
replace: true,
name: 'locking'
});
} else if (Cookies.get('locking') == '0' && name == 'locking') {
next(false);
} else {
// 白名单
var whiteList = name != 'login' && name != 'regist' && name != 'regist-result' && name != 'authorize';
if (!Cookies.get('userInfo') && whiteList) {
// 判断是否已经登录且前往的页面不是登录页
next({
name: 'login'
});
} else if (Cookies.get('userInfo') && name == 'login') {
// 判断是否已经登录且前往的是登录页
Util.title();
next({
name: 'home_index'
});
} else {
Util.toDefaultPage([...routers], name, router, next);
}
}
});
router.afterEach((to) => {
Util.openNewPage(router.app, to.name, to.params, to.query);
ViewUI.LoadingBar.finish();
window.scrollTo(0, 0);
});
import Main from '@/views/Main.vue';
// 不作为Main组件的子页面展示的页面单独写,如下
export const loginRouter = {
path: '/login',
name: 'login',
meta: {
title: '登录 - 管理平台'
},
component: () => import('@/views/login.vue')
};
/*export const registRouter = {
path: '/regist',
name: 'regist',
meta: {
title: '注册 - 管理平台'
},
component: () => import('@/views/regist.vue')
};*/
/*export const registResult = {
path: '/regist-result',
name: 'regist-result',
meta: {
title: '注册结果 - 管理平台'
},
component: () => import('@/views/regist-result.vue')
};*/
export const authorizeRouter = {
path: '/authorize',
name: 'authorize',
meta: {
title: 'XBoot统一认证平台 - X-Boot前后端分离开发平台 '
},
component: () => import('@/views/authorize.vue')
};
// export const page404 = {
// path: '/*',
// name: 'error-404',
// meta: {
// title: '404-页面不存在'
// },
// component: () => import('@/views/error-page/404.vue')
// };
export const page403 = {
path: '/403',
meta: {
title: '403-权限不足'
},
name: 'error-403',
component: () => import('@/views/error-page/403.vue')
};
export const page500 = {
path: '/500',
meta: {
title: '500-服务端错误'
},
name: 'error-500',
component: () => import('@/views/error-page/500.vue')
};
// 作为Main组件的子页面展示但是不在左侧菜单显示的路由写在otherRouter里
export const otherRouter = {
path: '/',
name: 'otherRouter',
redirect: '/home',
component: Main,
children: [
{ path: 'home', title: { i18n: 'home' }, name: 'home_index', component: () => import('@/views/home/home.vue') },
{ path: 'change-pass', title: '修改密码', name: 'change_pass', component: () => import('@/views/change-pass/change-pass.vue') },
{ path: 'message', title: '消息中心', name: 'message_index', component: () => import('@/views/message/message.vue') },
{ path: 'message-send-detail', title: '消息发送详情', name: 'message_send_detail', component: () => import('@/views/sys/message-manage/messageSendDetail.vue') }
]
};
export const appRouter = [];
// 所有上面定义的路由都要写在下面的routers里
export const routers = [
loginRouter,
authorizeRouter,
otherRouter,
...appRouter,
page500,
page403
];
import Vue from 'vue';
import Vuex from 'vuex';
import app from './modules/app';
import user from './modules/user';
import theme from './modules/theme';
Vue.use(Vuex);
const store = new Vuex.Store({
state: {
// 状态
},
mutations: {
// 改变方法
},
actions: {
},
modules: {
app,
user,
theme
}
});
export default store;
import { otherRouter } from '@/router/router';
import { router } from '@/router/index';
import util from '@/libs/util';
import Vue from 'vue';
const app = {
state: {
loading: false, // 全局加载动画
added: false, // 加载路由标识
navList: [], // 顶部菜单
currNav: "平台首页", // 当前顶部菜单name
currNavTitle: "平台首页", // 当前顶部菜单标题
cachePage: [],
lang: '',
pageOpenedList: [{
title: '首页',
path: '',
name: 'home_index'
}],
currentPageName: '',
currentPath: [
{
title: '首页',
path: '',
name: 'home_index'
}
],
// 面包屑数组
menuList: [],
routers: [
otherRouter
],
tagsList: [...otherRouter.children],
messageCount: 0,
// 在这里定义你不想要缓存的页面的name属性值(参见路由配置router.js)
dontCache: ['test', 'test']
},
mutations: {
// 动态添加主界面路由,需要缓存
updateAppRouter(state, routes) {
state.routers.push(...routes);
router.addRoutes(routes);
},
// 动态添加全局路由404、500等页面,不需要缓存
updateDefaultRouter(state, routes) {
router.addRoutes(routes);
},
setTheme(state, v) {
state.theme = v;
},
setLoading(state, v) {
state.loading = v;
},
setAdded(state, v) {
state.added = v;
},
setNavList(state, list) {
state.navList = list;
},
setCurrNav(state, v) {
state.currNav = v;
},
setCurrNavTitle(state, v) {
state.currNavTitle = v;
},
setTagsList(state, list) {
state.tagsList.push(...list);
},
updateMenulist(state, routes) {
state.menuList = routes;
},
closePage(state, name) {
state.cachePage.forEach((item, index) => {
if (item == name) {
state.cachePage.splice(index, 1);
}
});
},
initCachepage(state) {
if (localStorage.cachePage) {
state.cachePage = JSON.parse(localStorage.cachePage);
}
},
removeTag(state, name) {
state.pageOpenedList.map((item, index) => {
if (item.name == name) {
state.pageOpenedList.splice(index, 1);
}
});
},
pageOpenedList(state, get) {
let openedPage = state.pageOpenedList[get.index];
if (get.argu) {
openedPage.argu = get.argu;
}
if (get.query) {
openedPage.query = get.query;
}
state.pageOpenedList.splice(get.index, 1, openedPage);
localStorage.pageOpenedList = JSON.stringify(state.pageOpenedList);
},
clearAllTags(state) {
state.pageOpenedList.splice(1);
state.cachePage.length = 0;
localStorage.pageOpenedList = JSON.stringify(state.pageOpenedList);
},
clearOtherTags(state, vm) {
let currentName = vm.$route.name;
let currentIndex = 0;
state.pageOpenedList.forEach((item, index) => {
if (item.name == currentName) {
currentIndex = index;
}
});
if (currentIndex == 0) {
state.pageOpenedList.splice(1);
} else {
state.pageOpenedList.splice(currentIndex + 1);
state.pageOpenedList.splice(1, currentIndex - 1);
}
let newCachepage = state.cachePage.filter(item => {
return item == currentName;
});
state.cachePage = newCachepage;
localStorage.pageOpenedList = JSON.stringify(state.pageOpenedList);
},
setOpenedList(state) {
state.pageOpenedList = localStorage.pageOpenedList ? JSON.parse(localStorage.pageOpenedList) : [otherRouter.children[0]];
},
setCurrentPath(state, pathArr) {
state.currentPath = pathArr;
},
setCurrentPageName(state, name) {
state.currentPageName = name;
},
switchLang(state, lang) {
state.lang = lang;
localStorage.lang = lang;
Vue.config.lang = lang;
},
setMessageCount(state, count) {
state.messageCount = count;
},
increateTag(state, tagObj) {
if (!util.oneOf(tagObj.name, state.dontCache)) {
state.cachePage.push(tagObj.name);
localStorage.cachePage = JSON.stringify(state.cachePage);
}
state.pageOpenedList.push(tagObj);
localStorage.pageOpenedList = JSON.stringify(state.pageOpenedList);
}
}
};
export default app;
const theme = {
state: {
theme: {
mainTheme: "parimary", // primary light darkmode
menuTheme: "darkblue", // 侧边菜单主题 darkblue light dark black
navTheme: "light", // 导航栏主题 light darkblue primary black
menuWidth: 220, // 侧边菜单宽度
navType: "1", // 导航菜单展示方式 1菜单模式 2单个下拉菜单 3图标
sliceNum: 4, // 导航菜单顶部菜单模式时默认显示个数
navShowType: "app", // 下拉菜单展示方式 app图标 list列表(navType 1、3)
showNavMenuIcon: true, // 是否显示图标(navType 1)
fixNav: false, // 是否固定顶部导航
showFold: true, // 显示折叠菜单图标
showLogo: true, // 是否显示Logo
showTags: true, // 是否显示多标签
showSearch: true, // 是否显示搜索菜单
showFooter: true, // 是否显示页脚
weakMode: false, // 色弱模式
}
},
mutations: {
setTheme(state, v) {
if (v && v != "undefined") {
state.theme = JSON.parse(v);
localStorage.theme = JSON.stringify(state.theme);
}
},
setMainTheme(state, v) {
state.theme.mainTheme = v;
localStorage.theme = JSON.stringify(state.theme);
},
setMenuTheme(state, v) {
state.theme.menuTheme = v;
localStorage.theme = JSON.stringify(state.theme);
},
setNavTheme(state, v) {
state.theme.navTheme = v;
localStorage.theme = JSON.stringify(state.theme);
},
setMenuWidth(state, v) {
state.theme.menuWidth = v;
localStorage.theme = JSON.stringify(state.theme);
},
setNavType(state, v) {
state.theme.navType = v;
localStorage.theme = JSON.stringify(state.theme);
},
setSliceNum(state, v) {
state.theme.sliceNum = v;
localStorage.theme = JSON.stringify(state.theme);
},
setNavShowType(state, v) {
state.theme.navShowType = v;
localStorage.theme = JSON.stringify(state.theme);
},
setShowNavMenuIcon(state, v) {
state.theme.showNavMenuIcon = v;
localStorage.theme = JSON.stringify(state.theme);
},
setFixNav(state, v) {
state.theme.fixNav = v;
localStorage.theme = JSON.stringify(state.theme);
},
setShowFold(state, v) {
state.theme.showFold = v;
localStorage.theme = JSON.stringify(state.theme);
},
setShowLogo(state, v) {
state.theme.showLogo = v;
localStorage.theme = JSON.stringify(state.theme);
},
setShowTags(state, v) {
state.theme.showTags = v;
localStorage.theme = JSON.stringify(state.theme);
},
setShowSearch(state, v) {
state.theme.showSearch = v;
localStorage.theme = JSON.stringify(state.theme);
},
setShowFooter(state, v) {
state.theme.showFooter = v;
localStorage.theme = JSON.stringify(state.theme);
},
setWeakMode(state, v) {
state.theme.weakMode = v;
localStorage.theme = JSON.stringify(state.theme);
}
}
};
export default theme;
import Cookies from 'js-cookie';
const user = {
state: {
nickname: "",
avatar: ""
},
mutations: {
setUserInfo(state, v) {
state.nickname = v.nickname;
state.avatar = v.avatar;
localStorage.nickname = v.nickname;
localStorage.avatar = v.avatar;
},
setNickname(state, v) {
state.nickname = v;
localStorage.nickname = v;
},
setAvatar(state, v) {
state.avatar = v;
localStorage.avatar = v;
},
logout() {
Cookies.remove('userInfo');
// 清空打开的页面等数据 保留语言、主题等配置数据
let lang = localStorage.lang, theme = localStorage.theme;
localStorage.clear();
localStorage.lang = lang;
localStorage.theme = theme;
}
}
};
export default user;
.drawer-footer {
z-index: 10;
width: 100%;
position: absolute;
bottom: 0;
left: 0;
border-top: 1px solid #e8e8e8;
padding: 10px 16px;
text-align: left;
background: #fff;
}
.drawer-content {
overflow: auto;
}
.drawer-content::-webkit-scrollbar {
display: none;
}
.drawer-header {
display: flex;
align-items: center;
margin-bottom: 16px;
font-size: 16px;
color: rgba(0, 0, 0, 0.85);
}
.drawer-title {
font-size: 16px;
color: rgba(0, 0, 0, 0.85);
display: block;
margin-bottom: 16px;
}
\ No newline at end of file
.edit-head {
display: flex;
align-items: center;
justify-content: space-between;
position: relative;
.back-title {
color: #515a6e;
display: flex;
align-items: center;
}
.head-name {
display: inline-block;
height: 20px;
line-height: 20px;
font-size: 16px;
color: #17233d;
font-weight: 500;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.window-close {
z-index: 1;
font-size: 12px;
position: absolute;
right: 0px;
top: -5px;
overflow: hidden;
cursor: pointer;
.ivu-icon-ios-close {
color: #999;
transition: color .2s ease;
}
}
.window-close .ivu-icon-ios-close:hover {
color: #444;
}
}
\ No newline at end of file
.search {
.operation {
margin-bottom: 2vh;
}
.select-count {
font-weight: 600;
color: #40a9ff;
}
.select-clear {
margin-left: 10px;
}
.page {
margin-top: 2vh;
}
.drop-down {
margin-left: 5px;
}
}
.tree-list {
position: relative;
min-height: 80px;
}
.drawer-footer {
z-index: 10;
width: 100%;
position: absolute;
bottom: 0;
left: 0;
border-top: 1px solid #e8e8e8;
padding: 10px 16px;
text-align: left;
background: #fff;
}
\ No newline at end of file
.search {
.operation {
margin-bottom: 2vh;
}
.select-count {
font-weight: 600;
color: #40a9ff;
}
.select-title {
font-weight: 600;
color: #40a9ff;
}
.select-clear {
margin-left: 10px;
}
.page {
margin-top: 2vh;
}
.drop-down {
margin-left: 5px;
}
}
.tree-bar {
overflow: auto;
margin-top: 5px;
position: relative;
min-height: 80px;
}
.tree-bar::-webkit-scrollbar {
width: 6px;
height: 6px;
}
.tree-bar::-webkit-scrollbar-thumb {
border-radius: 4px;
-webkit-box-shadow: inset 0 0 2px #d1d1d1;
background: #e4e4e4;
}
.expand {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
.icon {
cursor: pointer;
}
:hover {
color: #1890ff !important;
}
}
\ No newline at end of file
.search {
.operation {
margin-bottom: 2vh;
}
.select-title {
font-weight: 600;
color: #40a9ff;
}
.select-clear {
margin-left: 10px;
}
}
.tree-bar {
overflow: auto;
margin-top: 5px;
position: relative;
min-height: 80px;
}
.tree-bar::-webkit-scrollbar {
width: 6px;
height: 6px;
}
.tree-bar::-webkit-scrollbar-thumb {
border-radius: 4px;
-webkit-box-shadow: inset 0 0 2px #d1d1d1;
background: #e4e4e4;
}
\ No newline at end of file
This diff is collapsed.
.authorize {
height: 100%;
background: url('../assets/background.svg');
background-color: #f0f2f5;
.other-thing {
margin-top: 3vh;
}
.ivu-tabs-nav-container {
line-height: 2;
font-size: 17px;
box-sizing: border-box;
white-space: nowrap;
overflow: hidden;
position: relative;
zoom: 1;
}
.form {
padding-top: 1vh;
.input-verify {
width: 70%;
}
}
.code-image {
.ivu-spin-fix .ivu-spin-main {
height: 20px;
}
}
.back,
.forget-pass,
.other-way {
font-size: 14px;
}
.icons {
display: flex;
align-items: center;
}
.other-icon {
cursor: pointer;
margin-left: 10px;
display: flex;
align-items: center;
color: rgba(0, 0, 0, .2);
:hover {
color: #2d8cf0;
}
}
.layout {
display: flex;
flex-direction: column;
justify-content: space-between;
height: 100%;
}
.logos-wrap {
margin-top: 8vh;
margin-bottom: 5vh;
display: flex;
flex-direction: column;
align-items: center;
.logos {
width: 300px;
position: relative;
display: flex;
align-items: center;
justify-content: space-between;
.site-logo {
box-shadow: 0 1px 5px rgba(27, 31, 35, .15);
}
.top {
z-index: 1;
}
.line {
position: absolute;
top: 50%;
left: 0;
width: 100%;
content: "";
border-bottom: 2px dashed #e1e4e8;
}
}
.auth-title {
color: #24292e;
font-size: 24px;
font-weight: 400;
margin-top: 20px;
}
}
.auth-card {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
width: 100%;
.auth-info-wrap {
width: 100%;
border-bottom: 1px solid #e1e4e8;
padding: 24px;
.auth-detail {
height: 40px;
display: flex;
align-items: center;
.auth-pic {
margin-right: 16px;
}
.auth-detail-href {
font-weight: 500;
}
.auth-detail-title {
font-weight: 500;
color: #24292e;
}
.auth-detail-sub-title {
font-size: 12px;
color: #586069
}
.auth-detail-strong {
font-weight: 500;
}
}
}
.button-confirm {
width: 100%;
padding: 0 24px;
margin-top: 24px;
}
.to-wrap {
display: flex;
flex-direction: column;
align-items: center;
font-size: 12px;
margin: 16px 0 24px 0;
color: #586069;
}
.to-strong {
font-size: 12px;
color: #24292e;
font-weight: 600;
font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Helvetica, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji;
}
}
}
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
<style lang="less">
@import './403.less';
</style>
<template>
<div class="error403">
<div class="error403-body-con">
<Card>
<div class="error403-body-con-title">4<span class="error403-0-span"><Icon type="android-lock"></Icon></span><span class="error403-key-span"><Icon size="220" type="ios-bolt"></Icon></span></div>
<p class="error403-body-con-message">You don't have permission</p>
<div class="error403-btn-con">
<Button @click="goHome" size="large" style="width: 200px;" type="text">返回首页</Button>
<Button @click="backPage" size="large" style="width: 200px;margin-left: 40px;" type="primary">返回上一页</Button>
</div>
</Card>
</div>
</div>
</template>
<script>
export default {
name: 'Error403',
methods: {
backPage () {
this.$router.go(-1);
},
goHome () {
this.$router.push({
name: 'home_index'
});
}
}
};
</script>
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment