Commit 94585f26 by zhengjie

1.7版本发布,详情查看版本说明

parent 0642c462
'use strict' 'use strict'
module.exports = { module.exports = {
NODE_ENV: '"production"', NODE_ENV: '"production"',
BASE_API: '"http://api.auauz.net"' BASE_API: '"https://api.auauz.net"'
} }
...@@ -3,7 +3,6 @@ ...@@ -3,7 +3,6 @@
<head> <head>
<meta charset="utf-8"> <meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1.0"> <meta name="viewport" content="width=device-width,initial-scale=1.0">
<title>el-admin</title>
</head> </head>
<body> <body>
<div id="app"></div> <div id="app"></div>
......
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
}, },
"dependencies": { "dependencies": {
"axios": "0.18.0", "axios": "0.18.0",
"element-ui": "^2.6.1", "element-ui": "2.4.6",
"connect": "3.6.6", "connect": "3.6.6",
"js-cookie": "2.2.0", "js-cookie": "2.2.0",
"normalize.css": "7.0.0", "normalize.css": "7.0.0",
......
import request from '@/utils/request'
export function getDepts(params) {
return request({
url: 'api/dept',
method: 'get',
params
})
}
export function add(data) {
return request({
url: 'api/dept',
method: 'post',
data
})
}
export function del(id) {
return request({
url: 'api/dept/' + id,
method: 'delete'
})
}
export function edit(data) {
return request({
url: 'api/dept',
method: 'put',
data
})
}
import request from '@/utils/request'
export function add(data) {
return request({
url: 'api/dict',
method: 'post',
data
})
}
export function del(id) {
return request({
url: 'api/dict/' + id,
method: 'delete'
})
}
export function edit(data) {
return request({
url: 'api/dict',
method: 'put',
data
})
}
import request from '@/utils/request'
export function get(dictName) {
const params = {
dictName,
page: 0,
size: 9999
}
return request({
url: 'api/dictDetail',
method: 'get',
params
})
}
export function add(data) {
return request({
url: 'api/dictDetail',
method: 'post',
data
})
}
export function del(id) {
return request({
url: 'api/dictDetail/' + id,
method: 'delete'
})
}
export function edit(data) {
return request({
url: 'api/dictDetail',
method: 'put',
data
})
}
import request from '@/utils/request'
export function getAllJob(deptId) {
const params = {
deptId,
page: 0,
size: 9999
}
return request({
url: 'api/job',
method: 'get',
params
})
}
export function add(data) {
return request({
url: 'api/job',
method: 'post',
data
})
}
export function del(id) {
return request({
url: 'api/job/' + id,
method: 'delete'
})
}
export function edit(data) {
return request({
url: 'api/job',
method: 'put',
data
})
}
import request from '@/utils/request' import request from '@/utils/request'
// 获取所有的Role // 获取所有的Role
export function getRoleTree() { export function getAll() {
return request({ return request({
url: 'api/roles/tree', url: 'api/roles/all',
method: 'get' method: 'get'
}) })
} }
......
...@@ -32,6 +32,9 @@ export default { ...@@ -32,6 +32,9 @@ export default {
if (value !== editorValue) { if (value !== editorValue) {
this.editor.setValue(this.value) this.editor.setValue(this.value)
} }
},
height(value) {
this.editor.setSize('auto', this.height)
} }
}, },
mounted() { mounted() {
......
<template>
<div v-loading="loading" :style="'height:'+ height">
<iframe :src="src" frameborder="no" style="width: 100%;height: 100%" scrolling="auto"/>
</div>
</template>
<script>
export default {
props: {
src: {
type: String,
required: true
}
},
data() {
return {
height: document.documentElement.clientHeight - 94.5 + 'px;',
loading: true
}
},
mounted: function() {
setTimeout(() => {
this.loading = false
}, 230)
const that = this
window.onresize = function temp() {
that.height = document.documentElement.clientHeight - 94.5 + 'px;'
}
}
}
</script>
<template>
<div>
<svg
t="1508738709248"
class="screenfull-svg"
viewBox="0 0 1024 1024"
version="1.1"
xmlns="http://www.w3.org/2000/svg"
p-id="2069"
xmlns:xlink="http://www.w3.org/1999/xlink"
width="32"
height="32"
@click="click"><path d="M921.9 468.6H749.6c-9.4 0-18.4 3.8-25 10.5-6.6 6.7-10.3 15.7-10.3 25.1v11.1c0 19.6 15.9 35.5 35.4 35.5h172.2c19.5 0 35.3-15.9 35.3-35.5v-11.1c0-9.4-3.7-18.4-10.3-25.1-6.6-6.7-15.6-10.5-25-10.5zM522.4 163.9c-53.6 42.6-165.7 102.3-246.3 159.8h-0.1c-0.9 0.6-1.8 3.8-2.8 4.3-9.5 5.4-13.8 20.1-65.6 20.1h-101c-26 0-42 12.2-42 39.6V631c0 27.4 14.7 40.9 42 40.9H208c51.5 0.1 55.7 14.8 65.2 20.1 0.9 0.5 1.8 3.7 2.7 4.3h0.1c78.2 57.5 191 121.8 246.4 162.7 16.7 12.3 72.1 33.9 72.1-42.1v-614c0-76.1-55.9-51.8-72.1-39z m159 167.8c9.2 16.1 27.3 20.2 40.5 9l141.5-119.3c13.3-11.1 16.5-33.2 7.4-49.4l-5.2-9.1c-9.1-16.1-27.3-20.1-40.5-9L683.6 273.2c-13.2 11.2-16.5 33.2-7.4 49.4l5.2 9.1z m40.4 347.4c-13.2-11.1-31.3-7-40.4 9l-5.2 9.1c-9.1 16.1-5.8 38.2 7.4 49.4L825.1 866c13.2 11.1 31.3 7.1 40.4-9l5.2-9.1c9.1-16.1 5.8-38.2-7.4-49.4L721.8 679.1z m0 0" p-id="1259"/></svg>
<el-dialog :visible.sync="dialogTableVisible" width="60%" title="更新公告">
<blockquote class="my-blockquote">1.7版本更新说明</blockquote>
<div class="my-code">
<div style="font-weight: bold">一、后端</div>
<ol>
<li>完成部门管理,岗位管理,字典管理,完成数据权限</li>
<li>用户权限加入到缓存,避免重复请求数据库</li>
<li>修复七牛云存储中文名下载失败的bug</li>
<li>修复上级目录选择自己导致列表不显示的bug</li>
<li>大量细节优化</li>
<li>【文档】已更新至1.7版本,访问地址:<a target="_blank" href="https://docs.auauz.net" style="color: #317EF3">https://docs.auauz.net</a></li>
</ol>
<div style="font-weight: bold">二、前端</div>
<ol>
<li>优化实时控制台全屏后高宽自适应</li>
<li>七牛云列表显示添加【文件类型】字段</li>
<li>sm.ms图床列表添加【缩略图】显示</li>
<li>提供外链嵌入内部菜单的组件(可参考Sql监控或者接口文档菜单)</li>
<li>重新设计个人中心页面</li>
<li>取消无意义的前端MD5加密</li>
<li>前端新增全局配置文件,文件位于src/config 下,目前可配置:网站名称、Cookie过期天数、TokenKey、请求超时时间</li>
<li>大量细节优化</li>
</ol>
</div>
</el-dialog>
</div>
</template>
<script>
export default {
data() {
return {
dialogTableVisible: false
}
},
methods: {
click() {
this.dialogTableVisible = true
}
}
}
</script>
<style scoped>
.screenfull-svg {
display: inline-block;
cursor: pointer;
fill: #5a5e66;;
width: 20px;
height: 20px;
vertical-align: 10px;
}
.my-blockquote{
margin: 0px 0px 10px;
padding: 12px;
line-height: 22px;
border-left: 5px solid #00437B;
border-radius: 0 2px 2px 0;
background-color: #f2f2f2;
}
.my-code{
position: relative;
padding: 15px;
line-height: 20px;
border-left: 5px solid #ddd;
color: #333;
font-family: Courier New;
font-size: 12px
}
</style>
/**
* @description 系统全局配置
*/
export default {
/**
* @description 记住密码状态下的token在Cookie中存储的天数,默认1天
*/
tokenCookieExpires: 1,
/**
* @description 记住密码状态下的密码在Cookie中存储的天数,默认1天
*/
passCookieExpires: 1,
/**
* @description 此处修改网站名称
*/
webName: 'eladmin',
/**
* @description token key
*/
TokenKey: 'EL-ADMIN-TOEKN',
/**
* @description 请求超时时间,毫秒(默认2分钟)
*/
timeout: 1200000
}
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1553488917000" class="icon" style="" viewBox="0 0 1027 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2886" xmlns:xlink="http://www.w3.org/1999/xlink" width="200.5859375" height="200"><defs><style type="text/css"></style></defs><path d="M512 750.933333c-112.64 0-211.626667-119.466667-245.76-242.346666-34.133333 0-61.44-44.373333-61.44-102.4 0-17.066667 3.413333-34.133333 6.826667-47.786667-3.413333-20.48-6.826667-47.786667-6.826667-68.266667C204.8 129.706667 341.333333 0 508.586667 0S819.2 133.12 819.2 290.133333c0 20.48-3.413333 47.786667-6.826667 68.266667 3.413333 13.653333 6.826667 30.72 6.826667 47.786667 0 58.026667-27.306667 102.4-61.44 102.4-34.133333 122.88-133.12 242.346667-245.76 242.346666z m-235.52-279.893333h6.826667c3.413333 3.413333 10.24 6.826667 10.24 10.24 30.72 129.706667 129.706667 235.52 218.453333 235.52s187.733333-105.813333 218.453333-235.52c0-6.826667 6.826667-10.24 10.24-10.24 3.413333-3.413333 10.24 0 17.066667 0h3.413333c10.24 0 27.306667-27.306667 27.306667-68.266667 0-13.653333-3.413333-30.72-6.826667-40.96v-10.24c0-13.653333 3.413333-40.96 3.413334-61.44C785.066667 150.186667 658.773333 34.133333 508.586667 34.133333 358.4 34.133333 238.933333 150.186667 238.933333 290.133333c0 20.48 3.413333 47.786667 6.826667 64.853334v10.24c-3.413333 10.24-6.826667 23.893333-6.826667 40.96 0 40.96 17.066667 68.266667 27.306667 68.266666h3.413333c0-3.413333 3.413333-3.413333 6.826667-3.413333z" fill="#bfbfbf" p-id="2887"></path><path d="M1006.933333 1024H17.066667c-10.24 0-17.066667-6.826667-17.066667-17.066667v-40.96c0-116.053333 75.093333-218.453333 184.32-259.413333l112.64-30.72c6.826667 0 13.653333 0 17.066667 3.413333 51.2 58.026667 122.88 136.533333 197.973333 136.533334s143.36-78.506667 197.973333-136.533334c3.413333-3.413333 10.24-6.826667 17.066667-3.413333l109.226667 30.72c112.64 37.546667 191.146667 150.186667 191.146666 266.24v30.72c-3.413333 13.653333-10.24 20.48-20.48 20.48zM34.133333 989.866667h955.733334v-13.653334c0-98.986667-71.68-201.386667-167.253334-235.52l-98.986666-27.306666c-54.613333 61.44-129.706667 139.946667-215.04 139.946666s-160.426667-78.506667-215.04-139.946666l-98.986667 27.306666c-95.573333 34.133333-160.426667 122.88-160.426667 225.28v23.893334zM785.066667 375.466667h-51.2c-6.826667 0-13.653333-6.826667-17.066667-13.653334 0-3.413333-23.893333-109.226667-30.72-184.32-3.413333-30.72-30.72-58.026667-61.44-58.026666-23.893333 0-40.96 13.653333-58.026667 30.72-17.066667 13.653333-34.133333 20.48-54.613333 20.48-27.306667 0-47.786667 0-64.853333-20.48s-34.133333-30.72-47.786667-30.72c-40.96 0-71.68 30.72-75.093333 68.266666l-17.066667 170.666667c0 3.413333-3.413333 10.24-6.826667 10.24s-6.826667 6.826667-13.653333 6.826667c0 0-23.893333-3.413333-51.2-3.413334-10.24 0-17.066667-6.826667-17.066667-17.066666s10.24-17.066667 20.48-17.066667c13.653333 0 27.306667 0 37.546667 3.413333l17.066667-153.6c3.413333-58.026667 54.613333-102.4 109.226666-102.4 27.306667 0 54.613333 23.893333 71.68 44.373334 6.826667 6.826667 17.066667 6.826667 37.546667 6.826666 10.24 0 20.48-3.413333 30.72-13.653333 20.48-17.066667 47.786667-37.546667 81.92-37.546667 51.2 0 92.16 37.546667 95.573333 88.746667 3.413333 58.026667 20.48 136.533333 27.306667 167.253333H785.066667c10.24 0 17.066667 6.826667 17.066666 17.066667s-6.826667 17.066667-17.066666 17.066667z" fill="#bfbfbf" p-id="2888"></path><path d="M324.266667 426.666667c-3.413333 0-10.24 0-13.653334-3.413334l-51.2-51.2c-6.826667-6.826667-6.826667-17.066667 0-23.893333s17.066667-6.826667 23.893334 0l51.2 51.2c6.826667 6.826667 6.826667 17.066667 0 23.893333 0 3.413333-6.826667 3.413333-10.24 3.413334zM699.733333 426.666667c-3.413333 0-6.826667 0-10.24-3.413334-6.826667-6.826667-10.24-17.066667-3.413333-23.893333l34.133333-51.2c6.826667-6.826667 17.066667-10.24 23.893334-3.413333s10.24 17.066667 3.413333 23.893333l-34.133333 51.2c-3.413333 3.413333-6.826667 6.826667-13.653334 6.826667zM563.2 426.666667c-3.413333 0-6.826667 0-10.24-3.413334 0 0-20.48-13.653333-40.96-13.653333s-40.96 13.653333-40.96 13.653333c-6.826667 6.826667-17.066667 3.413333-23.893333-3.413333-6.826667-6.826667-3.413333-17.066667 3.413333-23.893333 0 0 27.306667-20.48 61.44-20.48s61.44 20.48 61.44 20.48c6.826667 6.826667 10.24 17.066667 3.413333 23.893333-3.413333 3.413333-6.826667 6.826667-13.653333 6.826667zM631.466667 614.4c-27.306667 0-51.2-20.48-71.68-37.546667-17.066667-17.066667-34.133333-30.72-54.613334-30.72-17.066667 0-30.72 13.653333-47.786666 30.72-17.066667 17.066667-37.546667 37.546667-68.266667 37.546667-44.373333 0-58.026667-13.653333-81.92-37.546667l-17.066667-17.066666c-6.826667-6.826667-6.826667-17.066667 0-23.893334s17.066667-6.826667 23.893334 0l17.066666 17.066667c23.893333 23.893333 27.306667 27.306667 54.613334 27.306667 13.653333 0 27.306667-13.653333 44.373333-27.306667 20.48-20.48 40.96-40.96 71.68-40.96 30.72 0 54.613333 20.48 75.093333 40.96 17.066667 13.653333 34.133333 27.306667 47.786667 27.306667 30.72 0 34.133333-3.413333 54.613333-27.306667 3.413333-6.826667 10.24-10.24 17.066667-17.066667s17.066667-6.826667 23.893333 0 6.826667 17.066667 0 23.893334c-6.826667 6.826667-10.24 13.653333-17.066666 17.066666-13.653333 23.893333-27.306667 37.546667-71.68 37.546667zM529.066667 648.533333h-34.133334c-10.24 0-17.066667-6.826667-17.066666-17.066666s6.826667-17.066667 17.066666-17.066667h34.133334c10.24 0 17.066667 6.826667 17.066666 17.066667s-6.826667 17.066667-17.066666 17.066666z" fill="#bfbfbf" p-id="2889"></path><path d="M631.466667 512c-47.786667 0-85.333333-37.546667-85.333334-85.333333s37.546667-85.333333 85.333334-85.333334 85.333333 37.546667 85.333333 85.333334-37.546667 85.333333-85.333333 85.333333z m0-136.533333c-27.306667 0-51.2 23.893333-51.2 51.2s23.893333 51.2 51.2 51.2 51.2-23.893333 51.2-51.2-23.893333-51.2-51.2-51.2zM392.533333 512C344.746667 512 307.2 474.453333 307.2 426.666667s37.546667-85.333333 85.333333-85.333334 85.333333 37.546667 85.333334 85.333334-37.546667 85.333333-85.333334 85.333333z m0-136.533333c-27.306667 0-51.2 23.893333-51.2 51.2s23.893333 51.2 51.2 51.2 51.2-23.893333 51.2-51.2-23.893333-51.2-51.2-51.2z" fill="#bfbfbf" p-id="2890"></path></svg>
\ No newline at end of file
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1553935360914" class="icon" style="" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="6244" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><defs><style type="text/css"></style></defs><path d="M957.217391 86.372174C957.217391 86.372174 957.217391 608.211478 957.217391 608.211478 957.217391 639.510261 949.782261 670.630957 934.956522 701.573565 920.086261 732.605217 900.674783 762.568348 876.633043 791.685565 852.591304 820.758261 825.121391 848.317217 794.267826 874.273391 763.369739 900.274087 732.070957 923.425391 700.326957 943.727304 668.538435 964.073739 637.68487 980.992 607.721739 994.437565 577.758609 1007.88313 551.490783 1017.09913 528.918261 1022.130087 528.918261 1022.130087 518.233043 1024 518.233043 1024 518.233043 1024 508.438261 1022.130087 508.438261 1022.130087 485.286957 1017.09913 458.440348 1007.88313 427.853913 994.437565 397.267478 980.992 365.523478 964.073739 332.577391 943.727304 299.631304 923.425391 267.308522 900.274087 235.52 874.273391 203.776 848.317217 175.415652 820.758261 150.483478 791.685565 125.551304 762.568348 105.382957 732.605217 89.978435 701.573565 74.48487 670.630957 66.782609 639.510261 66.782609 608.211478 66.782609 608.211478 66.782609 86.372174 66.782609 86.372174 66.782609 86.372174 103.290435 80.717913 103.290435 80.717913 103.290435 80.717913 512.890435 0 512.890435 0 512.890435 0 930.504348 80.717913 930.504348 80.717913 930.504348 80.717913 957.217391 86.372174 957.217391 86.372174 957.217391 86.372174 957.217391 86.372174 957.217391 86.372174ZM513.024 75.553391C513.024 75.553391 508.082087 74.529391 508.082087 74.529391 508.082087 74.529391 156.538435 137.527652 156.538435 137.527652 156.538435 137.527652 156.538435 466.765913 156.538435 466.765913 156.538435 466.765913 513.024 466.765913 513.024 466.765913 513.024 466.765913 513.024 75.553391 513.024 75.553391 513.024 75.553391 513.024 75.553391 513.024 75.553391ZM867.461565 466.765913C867.461565 466.765913 513.024 466.765913 513.024 466.765913 513.024 466.765913 513.024 935.401739 513.024 935.401739 535.81913 929.881043 560.617739 921.466435 587.419826 910.113391 614.177391 898.760348 640.623304 885.359304 666.713043 869.865739 692.847304 854.372174 717.957565 837.186783 742.13287 818.265043 766.308174 799.343304 787.634087 778.99687 806.288696 757.314783 824.898783 735.677217 839.724522 713.149217 850.810435 689.730783 861.94087 666.35687 867.461565 642.582261 867.461565 618.496 867.461565 618.496 867.461565 466.765913 867.461565 466.765913 867.461565 466.765913 867.461565 466.765913 867.461565 466.765913Z" p-id="6245" fill="#8a8a8a"></path></svg>
\ No newline at end of file
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1553935012815" class="icon" style="" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5330" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><defs><style type="text/css"></style></defs><path d="M453.22752 781.67168 170.31936 781.67168 170.31936 409.18016l650.45632 0c11.6864 0 21.15968-9.47328 21.15968-21.15968L841.93536 218.68032l0-12.3904c0-11.6864-9.47328-21.15968-21.15968-21.15968l-11.8784 0L660.94464 185.13024l0-35.97184c0-11.6864-9.47328-21.15968-21.15968-21.15968-11.68768 0-21.15968 9.47328-21.15968 21.15968l0 35.97184L356.24704 185.13024l0-35.97184c0-11.6864-9.47328-21.15968-21.15968-21.15968s-21.15968 9.47328-21.15968 21.15968l0 35.97184L161.04064 185.13024l-11.88096 0c-11.6864 0-21.15968 9.47328-21.15968 21.15968l0 12.3904 0 169.34144 0 402.4192c0 18.49984 14.8224 33.55008 33.04064 33.55008l292.18816 0c11.6864 0 21.15968-9.472 21.15968-21.15968C474.38848 791.14496 464.91392 781.67168 453.22752 781.67168zM170.31936 227.4496l143.60832 0 0 35.97184c0 11.6864 9.47328 21.15968 21.15968 21.15968s21.15968-9.472 21.15968-21.15968l0-35.97184 262.37696 0 0 35.97184c0 11.6864 9.472 21.15968 21.15968 21.15968 11.6864 0 21.15968-9.472 21.15968-21.15968l0-35.97184L799.616 227.4496l0 139.41248L170.31936 366.86208 170.31936 227.4496zM690.49984 483.10016c-113.83808 0-206.44992 92.61312-206.44992 206.45248 0 113.83552 92.61184 206.44736 206.44992 206.44736s206.44992-92.61312 206.44992-206.44736C896.94976 575.71328 804.33792 483.10016 690.49984 483.10016zM690.49984 853.68064c-90.50112 0-164.13056-73.62816-164.13056-164.13184s73.62816-164.13184 164.13056-164.13184c90.5024 0 164.13184 73.62816 164.13184 164.13184S781.00224 853.68064 690.49984 853.68064zM390.10304 640.81536l-143.8848 0c-11.68768 0-21.15968 9.472-21.15968 21.15968 0 11.68512 9.472 21.1584 21.15968 21.1584l143.8848 0c11.6864 0 21.15968-9.47328 21.15968-21.1584C411.26144 650.28736 401.78816 640.81536 390.10304 640.81536zM390.10304 521.32608l-143.8848 0c-11.68768 0-21.15968 9.47328-21.15968 21.1584 0 11.68768 9.472 21.15968 21.15968 21.15968l143.8848 0c11.6864 0 21.15968-9.472 21.15968-21.15968C411.26144 530.80064 401.78816 521.32608 390.10304 521.32608zM803.1744 668.39296l-91.51488 0 0-50.78272c0-11.68768-9.472-21.15968-21.1584-21.15968s-21.15968 9.472-21.15968 21.15968l0 71.9424c0 11.68512 9.47328 21.1584 21.15968 21.1584l112.67328 0c11.6864 0 21.15968-9.47328 21.15968-21.1584C824.33536 677.86496 814.8608 668.39296 803.1744 668.39296z" p-id="5331" fill="#8a8a8a"></path></svg>
\ No newline at end of file
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1553478255619" class="icon" style="" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1799" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><defs><style type="text/css"></style></defs><path d="M329.285097 317.714062l-8.422833 4.428869c-8.78099 4.584412-13.528108 14.84715-11.923564 24.415063 1.644453 4.909823 3.491521 9.864672 5.492084 14.747889 2.030239 4.854565 4.230348 9.652847 6.53688 14.293541 5.621021 7.891737 16.246009 11.824303 25.699312 8.858762l9.041934-2.868327c14.741749-3.860934 31.115672-0.056282 42.62582 11.512195 11.549034 11.526521 15.374152 27.863604 11.549034 42.570561l-2.882654 9.126868c-2.958378 9.438976 0.938372 20.042475 8.830109 25.706475 4.634554 2.328022 9.403161 4.52813 14.323217 6.529717 4.876054 2.043542 9.80839 3.846608 14.739702 5.478781 9.538237 1.603521 19.87363-3.123131 24.414039-11.910261l4.402263-8.388041c7.67889-13.144368 21.915126-22.002107 38.267559-22.002107 16.338107 0 30.547737 8.829086 38.255279 21.931498l4.41352 8.459672c4.584412 8.78713 14.84715 13.513782 24.414039 11.910261 4.91187-1.632173 9.851369-3.462868 14.734586-5.478781 4.882194-2.030239 9.66615-4.201695 14.322194-6.529717 7.891737-5.622044 11.809977-16.253172 8.843412-25.706475l-2.852978-9.041934c-3.859911-14.733563-0.069585-31.085996 11.484565-42.655496 11.55415-11.525498 27.878954-15.372106 42.599214-11.512195l9.097192 2.88163c9.426697 2.952238 20.044522-0.937348 25.693172-8.829086 2.313695-4.656043 4.527107-9.411347 6.54302-14.322194 2.029216-4.883217 3.847631-9.80839 5.495154-14.748912 1.616824-9.581216-3.108804-19.843954-11.911284-24.429389l-8.402367-4.400217c-13.132088-7.665587-21.98778-21.901823-21.98778-38.255279 0-16.32378 8.830109-30.589692 21.974477-38.268582l8.416693-4.443196c8.80248-4.571109 13.528108-14.832823 11.924587-24.400736-1.6465-4.910846-3.479241-9.850345-5.493108-14.733563-2.031263-4.868891-4.202719-9.680477-6.529717-14.308891-5.622044-7.890714-16.253172-11.82328-25.708522-8.842389l-9.05626 2.852978c-14.747889 3.861958-31.071669 0.057305-42.654472-11.512195-11.55415-11.55415-15.344476-27.877931-11.484565-42.612517l2.852978-9.05626c2.966565-9.44-0.951675-20.043499-8.856715-25.692149-4.641717-2.328022-9.397021-4.542456-14.307867-6.544043-4.883217-2.029216-9.82374-3.846608-14.734586-5.465478-9.567913-1.632173-19.872606 3.123131-24.414039 11.895935l-4.400217 8.389064c-7.67889 13.174044-21.931498 22.002107-38.268582 22.002107-16.309454 0-30.576389-8.828063-38.267559-22.002107l-4.387937-8.389064c-4.554736-8.771781-14.8318-13.528108-24.405853-11.895935-4.954849 1.604544-9.873882 3.435239-14.763239 5.4225-4.883217 2.044566-9.688663 4.217045-14.323217 6.545066-7.891737 5.649674-11.808954 16.266475-8.830109 25.735128l2.826372 9.05626c3.882424 14.762215 0.057305 31.085996-11.491729 42.612517-11.510148 11.5695-27.849278 15.373129-42.611493 11.526521l-9.070586-2.867304c-9.44-2.980891-20.063965 0.951675-25.686009 8.842389-2.342348 4.628414-4.52813 9.44-6.53688 14.308891-2.036379 4.882194-3.847631 9.822716-5.492084 14.733563-1.603521 9.581216 3.142573 19.85828 11.923564 24.443715l8.402367 4.400217c13.156648 7.67889 21.986757 21.944801 21.986757 38.268582C351.251388 295.79689 342.421278 310.019823 329.285097 317.714062zM511.977999 171.706687c59.532885 0 107.795075 48.275493 107.795075 107.779725 0 59.490929-48.26219 107.752096-107.795075 107.752096-59.533908 0-107.752096-48.26219-107.752096-107.752096C404.226926 219.98218 452.445114 171.706687 511.977999 171.706687z" p-id="1800" fill="#bfbfbf"></path><path d="M924.647713 689.174212 798.570249 689.174212 798.570249 581.650313c0-26.387997-21.476127-47.850821-47.864124-47.850821L276.2543 533.799492c-26.386974 0-47.851844 21.462824-47.851844 47.850821l0 107.523899L99.345124 689.174212c-20.419052 0-36.95568 16.550954-36.95568 36.948517l0 184.771237c0 20.399609 16.536628 36.962843 36.95568 36.962843l273.965675 0c20.397562 0 36.947494-16.564257 36.947494-36.962843L410.258293 726.122729c0-20.398586-16.550954-36.948517-36.947494-36.948517l-123.103736 0L250.207064 581.650313c0-14.366196 11.68104-26.047236 26.047236-26.047236l474.451826 0c14.364149 0 26.062586 11.68104 26.062586 26.047236l0 107.523899L650.689201 689.174212c-20.412912 0-36.962843 16.550954-36.962843 36.948517l0 184.771237c0 20.399609 16.549931 36.962843 36.962843 36.962843l273.958512 0c20.397562 0 36.96182-16.564257 36.96182-36.962843L961.609533 726.122729C961.609533 705.725166 945.044252 689.174212 924.647713 689.174212z" p-id="1801" fill="#bfbfbf"></path></svg>
\ No newline at end of file
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1554868028575" class="icon" style="" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1497" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><defs><style type="text/css"></style></defs><path d="M558.409143 658.285714h-92.818286l-28.379428 62.427429a18.285714 18.285714 0 1 1-33.28-15.140572l91.428571-201.142857a18.285714 18.285714 0 0 1 33.28 0l91.428571 201.142857a18.285714 18.285714 0 1 1-33.28 15.140572L558.409143 658.285714z m-16.64-36.571428L512 556.178286 482.230857 621.714286h59.538286zM329.142857 128h475.428572a18.285714 18.285714 0 1 1 0 36.571429H329.142857a91.428571 91.428571 0 0 0 0 182.857142h475.428572a18.285714 18.285714 0 0 1 18.285714 18.285715v512a18.285714 18.285714 0 0 1-18.285714 18.285714H329.142857A128 128 0 0 1 201.142857 768V256A128 128 0 0 1 329.142857 128zM237.714286 345.6V768A91.428571 91.428571 0 0 0 329.142857 859.428571h457.142857v-475.428571H329.142857a127.634286 127.634286 0 0 1-91.428571-38.4zM329.142857 274.285714a18.285714 18.285714 0 0 1 0-36.571428h438.857143a18.285714 18.285714 0 1 1 0 36.571428H329.142857z" p-id="1498" fill="#bfbfbf"></path></svg>
\ No newline at end of file
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1545876716801" class="icon" style="" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2040" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><defs><style type="text/css"></style></defs><path d="M861.658611 876.885408 164.03803 876.885408c-56.431244 0-102.340853-45.911656-102.340853-102.345969l0-518.621814c0-56.43329 45.910633-102.345969 102.340853-102.345969L861.658611 153.571654c31.7931 0 53.361325 9.448186 64.100924 28.083615 11.435447 19.834744 7.302313 42.0937-11.340279 61.066821l-11.351536 11.55722 0.001023 0.001023c-0.045025 0.045025-0.601704 0.61296-1.64957 1.679245-0.103354 0.106424-0.205685 0.209778-0.305969 0.312108l-30.90487 31.462572c-0.024559 0.024559-0.050142 0.050142-0.073678 0.074701-27.242458 27.733645-70.074985 71.338768-123.530454 125.759215L619.241466 543.229259c-26.452465 26.931373-52.902884 53.858652-79.356372 80.785931l-6.842849 6.969739c-3.352351 3.415796-7.936763 5.339612-12.721743 5.339612-0.008186 0-0.016373 0-0.023536 0-4.79419-0.007163-9.381671-1.943258-12.729929-5.373381l-354.881566-363.519294c-6.876618-7.04444-6.740518-18.329461 0.302899-25.206078 7.04444-6.877641 18.329461-6.741541 25.206078 0.302899l342.16494 350.493629c24.486694-24.925692 48.969295-49.848315 73.448826-74.772984l295.180859-300.509215c10.350742-10.534937 7.335059-15.766079 5.885034-18.279319-3.749394-6.507204-15.85613-10.238179-33.215496-10.238179L164.03803 189.222619c-36.774555 0-66.691935 29.919427-66.691935 66.696028l0 518.621814c0 36.775578 29.91738 66.696028 66.691935 66.696028L861.658611 841.23649c36.775578 0 66.696028-29.919427 66.696028-66.696028L928.35464 324.875159c-0.01535-3.1569 0.242524-47.771003 25.434276-88.073918 5.216815-8.347109 16.21531-10.885931 24.562419-5.66707 8.347109 5.217838 10.884908 16.214287 5.66707 24.562419-19.908422 31.851429-20.016893 68.64645-20.015869 69.013817 0.001023 0.055259 0.001023 0.058328 0.001023 0.113587l0 449.715445C964.004581 830.973752 918.092925 876.885408 861.658611 876.885408z" p-id="2041"></path></svg> <?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1554009929581" class="icon" style="" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2851" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><defs><style type="text/css"></style></defs><path d="M511.471952 957.559056c-51.013955 0-93.475781-37.318473-101.502932-86.07185l-199.795618 0c-32.961053 0-59.794291-26.834261-59.794291-59.827038 0-12.417319 3.735224-24.277935 10.811684-34.336434l83.646513-111.561431 533.235518 0 83.515524 111.364948c7.306713 10.484212 11.008167 22.246587 11.008167 34.532917 0 32.9938-26.833238 59.827038-59.794291 59.827038l-199.861112 0C604.914986 920.241606 562.485907 957.559056 511.471952 957.559056zM261.61307 699.312805l-73.293289 97.734961c-2.751786 3.964455-4.390168 9.174325-4.390168 14.612403 0 14.481414 11.762375 26.276536 26.243789 26.276536l231.969715 0 0 16.774739c0 38.202647 31.093441 69.296088 69.328835 69.296088 38.202647 0 69.296088-31.093441 69.296088-69.296088l0-16.774739 232.03521 0c14.481414 0 26.243789-11.795122 26.243789-26.276536 0-5.373606-1.605635-10.516959-4.652145-14.875403l-73.096806-97.472983L261.61307 699.311782zM786.461219 613.240955l-550.011281 0 0-188.951187c0-112.348386 68.673891-213.392858 172.142677-255.101499l0-3.113028c0-56.715033 46.164304-102.879337 102.879337-102.879337 56.715033 0 102.84659 46.164304 102.84659 102.879337l0 3.113028c103.468786 41.708641 172.142677 142.753113 172.142677 255.101499L786.461219 613.240955zM270.00044 579.690453l482.910277 0 0-155.400685c0-102.158899-64.67669-193.668827-160.969751-227.677789l-11.172926-3.964455 0-26.571261c0-38.235394-31.093441-69.328835-69.296088-69.328835-38.235394 0-69.328835 31.093441-69.328835 69.328835l0 26.571261-11.172926 3.964455c-96.294085 34.008962-160.969751 125.51889-160.969751 227.677789L270.00044 579.690453z" p-id="2852" fill="#8a8a8a"></path></svg>
\ No newline at end of file \ No newline at end of file
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1554279845314" class="icon" style="" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1258" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><defs><style type="text/css"></style></defs><path d="M921.9 468.6H749.6c-9.4 0-18.4 3.8-25 10.5-6.6 6.7-10.3 15.7-10.3 25.1v11.1c0 19.6 15.9 35.5 35.4 35.5h172.2c19.5 0 35.3-15.9 35.3-35.5v-11.1c0-9.4-3.7-18.4-10.3-25.1-6.6-6.7-15.6-10.5-25-10.5zM522.4 163.9c-53.6 42.6-165.7 102.3-246.3 159.8h-0.1c-0.9 0.6-1.8 3.8-2.8 4.3-9.5 5.4-13.8 20.1-65.6 20.1h-101c-26 0-42 12.2-42 39.6V631c0 27.4 14.7 40.9 42 40.9H208c51.5 0.1 55.7 14.8 65.2 20.1 0.9 0.5 1.8 3.7 2.7 4.3h0.1c78.2 57.5 191 121.8 246.4 162.7 16.7 12.3 72.1 33.9 72.1-42.1v-614c0-76.1-55.9-51.8-72.1-39z m159 167.8c9.2 16.1 27.3 20.2 40.5 9l141.5-119.3c13.3-11.1 16.5-33.2 7.4-49.4l-5.2-9.1c-9.1-16.1-27.3-20.1-40.5-9L683.6 273.2c-13.2 11.2-16.5 33.2-7.4 49.4l5.2 9.1z m40.4 347.4c-13.2-11.1-31.3-7-40.4 9l-5.2 9.1c-9.1 16.1-5.8 38.2 7.4 49.4L825.1 866c13.2 11.1 31.3 7.1 40.4-9l5.2-9.1c9.1-16.1 5.8-38.2-7.4-49.4L721.8 679.1z m0 0" p-id="1259"></path></svg>
\ No newline at end of file
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1554009861477" class="icon" style="" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1989" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><defs><style type="text/css"></style></defs><path d="M756.081 1012.218 291.154 1012.218c-68.473 0-123.982-55.975-123.982-125.054L167.172 136.836c0-69.078 55.512-125.054 123.982-125.054l464.928 0c68.474 0 123.984 55.975 123.984 125.054l0 750.328C880.066 956.242 824.555 1012.218 756.081 1012.218L756.081 1012.218zM818.062 136.836c0-34.516-27.751-62.526-61.98-62.526L291.154 74.31c-34.228 0-61.991 28.01-61.991 62.526l0 31.268 588.899 0L818.062 136.836 818.062 136.836zM818.062 230.63 229.163 230.63l0 499.242 588.899 0L818.062 230.63 818.062 230.63zM818.062 792.398 229.163 792.398l0 94.766c0 34.54 27.765 62.526 61.991 62.526l464.928 0c34.229 0 61.98-27.986 61.98-62.526L818.062 792.398 818.062 792.398zM523.623 918.429c-25.668 0-46.482-20.993-46.482-46.896 0-25.903 20.816-46.895 46.482-46.895 25.664 0 46.477 20.993 46.477 46.895S549.287 918.429 523.623 918.429L523.623 918.429z" p-id="1990" fill="#8a8a8a"></path><path d="M756.081 1017.218 291.154 1017.218c-71.121 0-128.982-58.342-128.982-130.054L162.172 136.836c0-71.712 57.861-130.054 128.982-130.054l464.928 0c71.122 0 128.984 58.342 128.984 130.054l0 750.328C885.066 958.876 827.204 1017.218 756.081 1017.218zM291.154 16.783c-65.607 0-118.982 53.856-118.982 120.054l0 750.328c0 66.198 53.375 120.054 118.982 120.054l464.927 0c65.608 0 118.985-53.855 118.985-120.054L875.066 136.836c0-66.198-53.376-120.054-118.984-120.054L291.154 16.782zM756.082 954.69 291.154 954.69c-36.939 0-66.991-30.292-66.991-67.526l0-99.766 598.899 0 0.001 99.766C823.063 924.398 793.016 954.69 756.082 954.69zM234.163 797.398l0 89.766c0 31.72 25.566 57.526 56.991 57.526l464.928 0c31.419 0 56.98-25.807 56.98-57.526l0-89.766L234.163 797.398zM523.623 923.429c-28.387 0-51.482-23.28-51.482-51.896s23.096-51.895 51.482-51.895c28.385 0 51.477 23.279 51.477 51.895S552.008 923.429 523.623 923.429zM523.623 829.639c-22.873 0-41.482 18.794-41.482 41.895 0 23.102 18.609 41.896 41.482 41.896 22.871 0 41.477-18.794 41.477-41.896C565.1 848.433 546.494 829.639 523.623 829.639zM823.062 734.872 224.163 734.872 224.163 225.63l598.899 0L823.062 734.872zM234.163 724.872l578.899 0L813.062 235.63 234.163 235.63 234.163 724.872zM823.062 173.104 224.163 173.104l0-36.268c0-37.234 30.052-67.526 66.991-67.526l464.927 0c36.934 0 66.98 30.292 66.98 67.526L823.061 173.104zM234.163 163.104l578.899 0 0-26.268c0-31.72-25.562-57.526-56.98-57.526L291.154 79.31c-31.425 0-56.991 25.806-56.991 57.526L234.163 163.104z" p-id="1991" fill="#8a8a8a"></path></svg>
\ No newline at end of file
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1553861152984" class="icon" style="" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="3388" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><defs><style type="text/css"></style></defs><path d="M306.689473 349.006765l408.370805-0.3776c22.463618 0 40.678468-18.213827 40.678468-40.678468 0-22.463618-18.21485-40.677445-40.678468-40.677445l-408.370805 0.3776c-22.465664 0-40.679491 18.203594-40.679491 40.678468C266.009981 330.792938 284.223808 349.006765 306.689473 349.006765z" p-id="3389" fill="#bfbfbf"></path><path d="M306.689473 511.719614l408.370805-0.3776c22.463618 0 40.678468-18.213827 40.678468-40.677445 0-22.463618-18.21485-40.677445-40.678468-40.677445l-408.370805 0.3776c-22.465664 0-40.679491 18.202571-40.679491 40.677445C266.009981 493.505787 284.223808 511.719614 306.689473 511.719614z" p-id="3390" fill="#bfbfbf"></path><path d="M877.157095 624.190175l-0.337691-482.536968c-1.905396-43.141566-37.141922-77.602426-80.721463-77.751828l-573.366649 0.327458c-43.220361 1.917676-77.763085 37.302581-77.763085 80.999802l0 43.220361-0.335644 0 0.277316 645.76761 0.058328 0 0 43.220361c0 44.928259 36.428677 81.354889 81.357959 81.354889l40.677445 0 0 0.229221 120.088052-0.217964c22.465664 0 40.679491-18.213827 40.679491-40.677445 0-22.465664-18.213827-40.679491-40.679491-40.679491l-104.773252 0.189312c-39.148625-3.783163-53.509704-17.011442-56.051597-58.137095l-0.278339-623.272269 0.23843 32.224935c-0.972141-69.328995 14.937201-81.882915 80.204693-82.804914l-9.414417-0.099261 419.393859-0.23843c60.562331 1.429559 78.277808 12.652158 79.114872 70.174246l0 3.744277c0 2.99931 0 5.998621-0.081864 9.245572l0.081864-4.080945 0.25685 367.961466-160.131047 0.217964 0 0.11768-43.220361 0c-44.928259 0-81.354889 36.418444-81.354889 81.357959l0 40.677445-0.278339 0 0.257873 195.506742c-2.62171 12.93152 1.033539 26.874067 11.062963 36.903491 4.031826 4.030803 8.721639 7.021927 13.68672 9.006118 4.90573 2.087545 10.287297 3.25002 15.927761 3.25002 14.20349 0 26.656103-7.290033 33.924647-18.304901l271.679609-272.363178c3.01773-1.826602 5.838985-3.932566 8.303106-6.463202 7.704472-7.398504 12.532431-17.749246 12.532431-29.278837C878.171192 629.950366 877.793592 627.031896 877.157095 624.190175zM592.290139 819.2395l-0.078795-67.76129c0.556679-61.910025 14.896268-77.462233 82.549088-77.462233l-82.071204 0.545422-0.497327 73.223698-0.099261-73.79982 145.274688-0.197498L592.290139 819.2395z" p-id="3391" fill="#bfbfbf"></path></svg>
\ No newline at end of file
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1553828490559" class="icon" style="" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1684" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><defs><style type="text/css"></style></defs><path d="M898.831744 900.517641 103.816972 900.517641c-36.002982 0-65.363683-29.286-65.363683-65.313541l0-554.949184c0-36.041868 29.361725-65.326844 65.363683-65.326844l795.015795 0c36.002982 0 65.198931 29.284977 65.198931 65.326844l0 554.949184C964.030675 871.231641 934.834726 900.517641 898.831744 900.517641L898.831744 900.517641zM103.816972 255.593236c-13.576203 0-24.711821 11.085476-24.711821 24.662703l0 554.949184c0 13.576203 11.136641 24.662703 24.711821 24.662703l795.015795 0c13.577227 0 24.547069-11.086499 24.547069-24.662703l0-554.949184c0-13.577227-10.970866-24.662703-24.547069-24.662703L103.816972 255.593236 103.816972 255.593236zM664.346245 251.774257c-11.161201 0-20.332071-9.080819-20.332071-20.332071l0-101.278661c0-13.576203-11.047614-24.623817-24.699542-24.623817L383.181611 105.539708c-13.576203 0-24.712845 11.04659-24.712845 24.623817l0 101.278661c0 11.252275-9.041934 20.332071-20.332071 20.332071-11.20111 0-20.319791-9.080819-20.319791-20.332071l0-101.278661c0-35.989679 29.323862-65.275679 65.364707-65.275679l236.133022 0c36.06745 0 65.402569 29.284977 65.402569 65.275679l0 101.278661C684.717202 242.694461 675.636383 251.774257 664.346245 251.774257L664.346245 251.774257zM413.233044 521.725502 75.694471 521.725502c-11.163247 0-20.333094-9.117658-20.333094-20.35663 0-11.252275 9.169847-20.332071 20.333094-20.332071l337.538573 0c11.277858 0 20.319791 9.080819 20.319791 20.332071C433.552835 512.607844 424.510902 521.725502 413.233044 521.725502L413.233044 521.725502zM912.894018 521.725502 575.367725 521.725502c-11.213389 0-20.332071-9.117658-20.332071-20.35663 0-11.252275 9.118682-20.332071 20.332071-20.332071l337.526293 0c11.290137 0 20.332071 9.080819 20.332071 20.332071C933.226089 512.607844 924.184155 521.725502 912.894018 521.725502L912.894018 521.725502zM557.56322 634.217552 445.085496 634.217552c-11.213389 0-20.332071-9.079796-20.332071-20.331048l0-168.763658c0-11.251252 9.118682-20.332071 20.332071-20.332071l112.478747 0c11.290137 0 20.370956 9.080819 20.370956 20.332071l0 168.763658C577.934177 625.137757 568.853357 634.217552 557.56322 634.217552L557.56322 634.217552zM465.417567 593.514525l71.827909 0L537.245476 465.454918l-71.827909 0L465.417567 593.514525 465.417567 593.514525z" p-id="1685" fill="#bfbfbf"></path></svg>
\ No newline at end of file
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1553934943780" class="icon" style="" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4263" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><defs><style type="text/css"></style></defs><path d="M512 256s-97.2-4.8-144-96c16.8 113.6 108 192 144 192s127.2-78.8 144-192c-46.8 91.2-144 96-144 96z" fill="#8a8a8a" p-id="4264"></path><path d="M928 448C928 218.4 741.6 32 512 32S96 218.4 96 448c0 186.8 122.8 344.4 292.4 397.2-42 35.2-68.4 88-68.4 146.8h64c0-70.8 57.2-128 128-128s128 57.2 128 128h64c0-58.8-26.4-111.6-68.4-146.8 169.6-52.8 292.4-210.4 292.4-397.2z m-416 352c-194.4 0-352-157.6-352-352s157.6-352 352-352 352 157.6 352 352-157.6 352-352 352z" fill="#8a8a8a" p-id="4265"></path></svg>
\ No newline at end of file
import { get } from '@/api/dictDetail'
export default {
data() {
return {
dicts: []
}
},
methods: {
async getDict(name) {
return new Promise((resolve, reject) => {
get(name).then(res => {
this.dicts = res.content
resolve(res)
}).catch(err => {
reject(err)
})
})
}
}
}
import router from './router' import router from './router'
import store from './store' import store from './store'
import Config from '@/config'
import NProgress from 'nprogress' // progress bar import NProgress from 'nprogress' // progress bar
import 'nprogress/nprogress.css'// progress bar style import 'nprogress/nprogress.css'// progress bar style
import { getToken } from '@/utils/auth' // getToken from cookie import { getToken } from '@/utils/auth' // getToken from cookie
...@@ -12,7 +13,7 @@ const whiteList = ['/login']// no redirect whitelist ...@@ -12,7 +13,7 @@ const whiteList = ['/login']// no redirect whitelist
router.beforeEach((to, from, next) => { router.beforeEach((to, from, next) => {
if (to.meta.title) { if (to.meta.title) {
document.title = to.meta.title + ' - eladmin' document.title = to.meta.title + ' - ' + Config.webName
} }
NProgress.start() // start progress bar NProgress.start() // start progress bar
if (getToken()) { if (getToken()) {
......
...@@ -2,19 +2,18 @@ const getters = { ...@@ -2,19 +2,18 @@ const getters = {
sidebar: state => state.app.sidebar, sidebar: state => state.app.sidebar,
device: state => state.app.device, device: state => state.app.device,
token: state => state.user.token, token: state => state.user.token,
avatar: state => state.user.avatar,
visitedViews: state => state.tagsView.visitedViews, visitedViews: state => state.tagsView.visitedViews,
cachedViews: state => state.tagsView.cachedViews, cachedViews: state => state.tagsView.cachedViews,
name: state => state.user.name,
createTime: state => state.user.createTime,
email: state => state.user.email,
roles: state => state.user.roles, roles: state => state.user.roles,
user: state => state.user.user,
loadMenus: state => state.user.loadMenus, loadMenus: state => state.user.loadMenus,
permission_routers: state => state.permission.routers, permission_routers: state => state.permission.routers,
addRouters: state => state.permission.addRouters, addRouters: state => state.permission.addRouters,
socketApi: state => state.api.socketApi, socketApi: state => state.api.socketApi,
imagesUploadApi: state => state.api.imagesUploadApi, imagesUploadApi: state => state.api.imagesUploadApi,
updateAvatarApi: state => state.api.updateAvatarApi, updateAvatarApi: state => state.api.updateAvatarApi,
qiNiuUploadApi: state => state.api.qiNiuUploadApi qiNiuUploadApi: state => state.api.qiNiuUploadApi,
sqlApi: state => state.api.sqlApi,
swaggerApi: state => state.api.swaggerApi
} }
export default getters export default getters
...@@ -8,7 +8,11 @@ const api = { ...@@ -8,7 +8,11 @@ const api = {
// 修改头像 // 修改头像
updateAvatarApi: baseUrl + '/api/users/updateAvatar', updateAvatarApi: baseUrl + '/api/users/updateAvatar',
// 上传文件到七牛云 // 上传文件到七牛云
qiNiuUploadApi: baseUrl + '/api/qiNiuContent' qiNiuUploadApi: baseUrl + '/api/qiNiuContent',
// Sql 监控
sqlApi: baseUrl + '/druid',
// swagger
swaggerApi: baseUrl + '/swagger-ui.html'
} }
} }
......
import { login, getInfo } from '@/api/login' import { login, getInfo } from '@/api/login'
import { getToken, setToken, removeToken } from '@/utils/auth' import { getToken, setToken, removeToken } from '@/utils/auth'
import { parseTime } from '@/utils/index'
const user = { const user = {
state: { state: {
token: getToken(), token: getToken(),
name: '', user: {},
email: '',
avatar: '',
createTime: '',
roles: [], roles: [],
// 第一次加载菜单时用到 // 第一次加载菜单时用到
loadMenus: false loadMenus: false
...@@ -18,21 +14,12 @@ const user = { ...@@ -18,21 +14,12 @@ const user = {
SET_TOKEN: (state, token) => { SET_TOKEN: (state, token) => {
state.token = token state.token = token
}, },
SET_NAME: (state, name) => { SET_USER: (state, user) => {
state.name = name state.user = user
},
SET_AVATAR: (state, avatar) => {
state.avatar = avatar
}, },
SET_ROLES: (state, roles) => { SET_ROLES: (state, roles) => {
state.roles = roles state.roles = roles
}, },
SET_CREATE_TIME: (state, createTime) => {
state.createTime = createTime
},
SET_EMAIL: (state, email) => {
state.email = email
},
SET_LOAD_MENUS: (state, loadMenus) => { SET_LOAD_MENUS: (state, loadMenus) => {
state.loadMenus = loadMenus state.loadMenus = loadMenus
} }
...@@ -95,10 +82,7 @@ export const setUserInfo = (res, commit) => { ...@@ -95,10 +82,7 @@ export const setUserInfo = (res, commit) => {
} else { } else {
commit('SET_ROLES', res.roles) commit('SET_ROLES', res.roles)
} }
commit('SET_NAME', res.username) commit('SET_USER', res)
commit('SET_AVATAR', res.avatar)
commit('SET_EMAIL', res.email)
commit('SET_CREATE_TIME', parseTime(res.createTime))
} }
export default user export default user
...@@ -87,7 +87,7 @@ a:hover { ...@@ -87,7 +87,7 @@ a:hover {
//main-container全局样式 //main-container全局样式
.app-main{ .app-main{
min-height: 100% height: 100%;
} }
.app-container { .app-container {
......
import Cookies from 'js-cookie' import Cookies from 'js-cookie'
import Config from '@/config'
const TokenKey = 'Admin-Token' const TokenKey = Config.TokenKey
export function getToken() { export function getToken() {
return Cookies.get(TokenKey) return Cookies.get(TokenKey)
...@@ -8,7 +9,7 @@ export function getToken() { ...@@ -8,7 +9,7 @@ export function getToken() {
export function setToken(token, rememberMe) { export function setToken(token, rememberMe) {
if (rememberMe) { if (rememberMe) {
return Cookies.set(TokenKey, token, { expires: 1 }) return Cookies.set(TokenKey, token, { expires: Config.tokenCookieExpires })
} else return Cookies.set(TokenKey, token) } else return Cookies.set(TokenKey, token)
} }
......
export function md5(sMessage) {
function RotateLeft(lValue, iShiftBits) {
return (lValue << iShiftBits) | (lValue >>> (32 - iShiftBits))
}
function AddUnsigned(lX, lY) {
var lX4, lY4, lX8, lY8, lResult
lX8 = (lX & 0x80000000)
lY8 = (lY & 0x80000000)
lX4 = (lX & 0x40000000)
lY4 = (lY & 0x40000000)
lResult = (lX & 0x3FFFFFFF) + (lY & 0x3FFFFFFF)
if (lX4 & lY4) return (lResult ^ 0x80000000 ^ lX8 ^ lY8)
if (lX4 | lY4) {
if (lResult & 0x40000000) return (lResult ^ 0xC0000000 ^ lX8 ^ lY8)
else return (lResult ^ 0x40000000 ^ lX8 ^ lY8)
} else return (lResult ^ lX8 ^ lY8)
}
function F(x, y, z) {
return (x & y) | ((~x) & z)
}
function G(x, y, z) {
return (x & z) | (y & (~z))
}
function H(x, y, z) {
return (x ^ y ^ z)
}
function I(x, y, z) {
return (y ^ (x | (~z)))
}
function FF(a, b, c, d, x, s, ac) {
a = AddUnsigned(a, AddUnsigned(AddUnsigned(F(b, c, d), x), ac))
return AddUnsigned(RotateLeft(a, s), b)
}
function GG(a, b, c, d, x, s, ac) {
a = AddUnsigned(a, AddUnsigned(AddUnsigned(G(b, c, d), x), ac))
return AddUnsigned(RotateLeft(a, s), b)
}
function HH(a, b, c, d, x, s, ac) {
a = AddUnsigned(a, AddUnsigned(AddUnsigned(H(b, c, d), x), ac))
return AddUnsigned(RotateLeft(a, s), b)
}
function II(a, b, c, d, x, s, ac) {
a = AddUnsigned(a, AddUnsigned(AddUnsigned(I(b, c, d), x), ac))
return AddUnsigned(RotateLeft(a, s), b)
}
function ConvertToWordArray(sMessage) {
var lWordCount
var lMessageLength = sMessage.length
var lNumberOfWords_temp1 = lMessageLength + 8
var lNumberOfWords_temp2 = (lNumberOfWords_temp1 - (lNumberOfWords_temp1 % 64)) / 64
var lNumberOfWords = (lNumberOfWords_temp2 + 1) * 16
var lWordArray = Array(lNumberOfWords - 1)
var lBytePosition = 0
var lByteCount = 0
while (lByteCount < lMessageLength) {
lWordCount = (lByteCount - (lByteCount % 4)) / 4
lBytePosition = (lByteCount % 4) * 8
lWordArray[lWordCount] = (lWordArray[lWordCount] | (sMessage.charCodeAt(lByteCount) << lBytePosition))
lByteCount++
}
lWordCount = (lByteCount - (lByteCount % 4)) / 4
lBytePosition = (lByteCount % 4) * 8
lWordArray[lWordCount] = lWordArray[lWordCount] | (0x80 << lBytePosition)
lWordArray[lNumberOfWords - 2] = lMessageLength << 3
lWordArray[lNumberOfWords - 1] = lMessageLength >>> 29
return lWordArray
}
function WordToHex(lValue) {
var WordToHexValue = ''
var WordToHexValue_temp = ''
var lByte, lCount
for (lCount = 0; lCount <= 3; lCount++) {
lByte = (lValue >>> (lCount * 8)) & 255
WordToHexValue_temp = '0' + lByte.toString(16)
WordToHexValue = WordToHexValue + WordToHexValue_temp.substr(WordToHexValue_temp.length - 2, 2)
}
return WordToHexValue
}
var x = []
var k, AA, BB, CC, DD, a, b, c, d
var S11 = 7
var S12 = 12
var S13 = 17
var S14 = 22
var S21 = 5
var S22 = 9
var S23 = 14
var S24 = 20
var S31 = 4
var S32 = 11
var S33 = 16
var S34 = 23
var S41 = 6
var S42 = 10
var S43 = 15
var S44 = 21
x = ConvertToWordArray(sMessage)
a = 0x67452301
b = 0xEFCDAB89
c = 0x98BADCFE
d = 0x10325476
for (k = 0; k < x.length; k += 16) {
AA = a
BB = b
CC = c
DD = d
a = FF(a, b, c, d, x[k + 0], S11, 0xD76AA478)
d = FF(d, a, b, c, x[k + 1], S12, 0xE8C7B756)
c = FF(c, d, a, b, x[k + 2], S13, 0x242070DB)
b = FF(b, c, d, a, x[k + 3], S14, 0xC1BDCEEE)
a = FF(a, b, c, d, x[k + 4], S11, 0xF57C0FAF)
d = FF(d, a, b, c, x[k + 5], S12, 0x4787C62A)
c = FF(c, d, a, b, x[k + 6], S13, 0xA8304613)
b = FF(b, c, d, a, x[k + 7], S14, 0xFD469501)
a = FF(a, b, c, d, x[k + 8], S11, 0x698098D8)
d = FF(d, a, b, c, x[k + 9], S12, 0x8B44F7AF)
c = FF(c, d, a, b, x[k + 10], S13, 0xFFFF5BB1)
b = FF(b, c, d, a, x[k + 11], S14, 0x895CD7BE)
a = FF(a, b, c, d, x[k + 12], S11, 0x6B901122)
d = FF(d, a, b, c, x[k + 13], S12, 0xFD987193)
c = FF(c, d, a, b, x[k + 14], S13, 0xA679438E)
b = FF(b, c, d, a, x[k + 15], S14, 0x49B40821)
a = GG(a, b, c, d, x[k + 1], S21, 0xF61E2562)
d = GG(d, a, b, c, x[k + 6], S22, 0xC040B340)
c = GG(c, d, a, b, x[k + 11], S23, 0x265E5A51)
b = GG(b, c, d, a, x[k + 0], S24, 0xE9B6C7AA)
a = GG(a, b, c, d, x[k + 5], S21, 0xD62F105D)
d = GG(d, a, b, c, x[k + 10], S22, 0x2441453)
c = GG(c, d, a, b, x[k + 15], S23, 0xD8A1E681)
b = GG(b, c, d, a, x[k + 4], S24, 0xE7D3FBC8)
a = GG(a, b, c, d, x[k + 9], S21, 0x21E1CDE6)
d = GG(d, a, b, c, x[k + 14], S22, 0xC33707D6)
c = GG(c, d, a, b, x[k + 3], S23, 0xF4D50D87)
b = GG(b, c, d, a, x[k + 8], S24, 0x455A14ED)
a = GG(a, b, c, d, x[k + 13], S21, 0xA9E3E905)
d = GG(d, a, b, c, x[k + 2], S22, 0xFCEFA3F8)
c = GG(c, d, a, b, x[k + 7], S23, 0x676F02D9)
b = GG(b, c, d, a, x[k + 12], S24, 0x8D2A4C8A)
a = HH(a, b, c, d, x[k + 5], S31, 0xFFFA3942)
d = HH(d, a, b, c, x[k + 8], S32, 0x8771F681)
c = HH(c, d, a, b, x[k + 11], S33, 0x6D9D6122)
b = HH(b, c, d, a, x[k + 14], S34, 0xFDE5380C)
a = HH(a, b, c, d, x[k + 1], S31, 0xA4BEEA44)
d = HH(d, a, b, c, x[k + 4], S32, 0x4BDECFA9)
c = HH(c, d, a, b, x[k + 7], S33, 0xF6BB4B60)
b = HH(b, c, d, a, x[k + 10], S34, 0xBEBFBC70)
a = HH(a, b, c, d, x[k + 13], S31, 0x289B7EC6)
d = HH(d, a, b, c, x[k + 0], S32, 0xEAA127FA)
c = HH(c, d, a, b, x[k + 3], S33, 0xD4EF3085)
b = HH(b, c, d, a, x[k + 6], S34, 0x4881D05)
a = HH(a, b, c, d, x[k + 9], S31, 0xD9D4D039)
d = HH(d, a, b, c, x[k + 12], S32, 0xE6DB99E5)
c = HH(c, d, a, b, x[k + 15], S33, 0x1FA27CF8)
b = HH(b, c, d, a, x[k + 2], S34, 0xC4AC5665)
a = II(a, b, c, d, x[k + 0], S41, 0xF4292244)
d = II(d, a, b, c, x[k + 7], S42, 0x432AFF97)
c = II(c, d, a, b, x[k + 14], S43, 0xAB9423A7)
b = II(b, c, d, a, x[k + 5], S44, 0xFC93A039)
a = II(a, b, c, d, x[k + 12], S41, 0x655B59C3)
d = II(d, a, b, c, x[k + 3], S42, 0x8F0CCC92)
c = II(c, d, a, b, x[k + 10], S43, 0xFFEFF47D)
b = II(b, c, d, a, x[k + 1], S44, 0x85845DD1)
a = II(a, b, c, d, x[k + 8], S41, 0x6FA87E4F)
d = II(d, a, b, c, x[k + 15], S42, 0xFE2CE6E0)
c = II(c, d, a, b, x[k + 6], S43, 0xA3014314)
b = II(b, c, d, a, x[k + 13], S44, 0x4E0811A1)
a = II(a, b, c, d, x[k + 4], S41, 0xF7537E82)
d = II(d, a, b, c, x[k + 11], S42, 0xBD3AF235)
c = II(c, d, a, b, x[k + 2], S43, 0x2AD7D2BB)
b = II(b, c, d, a, x[k + 9], S44, 0xEB86D391)
a = AddUnsigned(a, AA)
b = AddUnsigned(b, BB)
c = AddUnsigned(c, CC)
d = AddUnsigned(d, DD)
}
var temp = WordToHex(a) + WordToHex(b) + WordToHex(c) + WordToHex(d)
return temp.toLowerCase()
}
...@@ -9,7 +9,6 @@ export default function checkPermission(value) { ...@@ -9,7 +9,6 @@ export default function checkPermission(value) {
if (value && value instanceof Array && value.length > 0) { if (value && value instanceof Array && value.length > 0) {
const roles = store.getters && store.getters.roles const roles = store.getters && store.getters.roles
const permissionRoles = value const permissionRoles = value
const hasPermission = roles.some(role => { const hasPermission = roles.some(role => {
return permissionRoles.includes(role) return permissionRoles.includes(role)
}) })
......
...@@ -3,11 +3,12 @@ import router from '@/router' ...@@ -3,11 +3,12 @@ import router from '@/router'
import { Notification, MessageBox } from 'element-ui' import { Notification, MessageBox } from 'element-ui'
import store from '../store' import store from '../store'
import { getToken } from '@/utils/auth' import { getToken } from '@/utils/auth'
import Config from '@/config'
// 创建axios实例 // 创建axios实例
const service = axios.create({ const service = axios.create({
baseURL: process.env.BASE_API, // api 的 base_url baseURL: process.env.BASE_API, // api 的 base_url
timeout: 900000 // 请求超时时间 timeout: Config.timeout // 请求超时时间
}) })
// request拦截器 // request拦截器
......
...@@ -29,6 +29,10 @@ export default { ...@@ -29,6 +29,10 @@ export default {
}, },
mounted() { mounted() {
this.$refs.md.$refs.toolbar_left.img_file = [] this.$refs.md.$refs.toolbar_left.img_file = []
const that = this
window.onresize = function temp() {
that.height = document.documentElement.clientHeight - 200 + 'px'
}
}, },
methods: { methods: {
imgAdd(pos, $file) { imgAdd(pos, $file) {
......
...@@ -192,6 +192,12 @@ export default { ...@@ -192,6 +192,12 @@ export default {
'\n' + '\n' +
'# application:\n' '# application:\n'
} }
},
mounted() {
const that = this
window.onresize = function temp() {
that.height = document.documentElement.clientHeight - 210 + 'px'
}
} }
} }
</script> </script>
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<div class="app-container"> <div class="app-container">
<eHeader :query="query"/> <eHeader :query="query"/>
<!--表格渲染--> <!--表格渲染-->
<el-table v-loading="loading" :data="data" size="small" border style="width: 100%;"> <el-table v-loading="loading" :data="data" size="small" style="width: 100%;">
<el-table-column label="序号" width="80" align="center"> <el-table-column label="序号" width="80" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<div>{{ scope.$index + 1 }}</div> <div>{{ scope.$index + 1 }}</div>
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<div> <div>
<el-button v-if="checkPermission(['ADMIN','JOB_ALL','JOB_EDIT'])" type="success" size="mini" @click="to">生成代码</el-button> <el-button v-if="checkPermission(['ADMIN','JOB_ALL','JOB_EDIT'])" type="success" size="mini" @click="to">生成代码</el-button>
<el-dialog :visible.sync="dialog" title="代码生成配置" append-to-body width="800px"> <el-dialog :visible.sync="dialog" title="代码生成配置" append-to-body width="800px">
<el-table v-loading="loading" :data="data" size="small" border style="width: 100%;"> <el-table v-loading="loading" :data="data" size="small" style="width: 100%;">
<el-table-column label="序号" width="80" align="center"> <el-table-column label="序号" width="80" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<div>{{ scope.$index + 1 }}</div> <div>{{ scope.$index + 1 }}</div>
......
...@@ -4,6 +4,11 @@ ...@@ -4,6 +4,11 @@
<breadcrumb class="breadcrumb-container"/> <breadcrumb class="breadcrumb-container"/>
<div class="right-menu"> <div class="right-menu">
<template>
<el-tooltip content="更新公告" effect="dark" placement="bottom">
<Placard class="screenfull right-menu-item"/>
</el-tooltip>
</template>
<template v-if="device!=='mobile'"> <template v-if="device!=='mobile'">
<el-tooltip content="全屏" effect="dark" placement="bottom"> <el-tooltip content="全屏" effect="dark" placement="bottom">
<screenfull class="screenfull right-menu-item"/> <screenfull class="screenfull right-menu-item"/>
...@@ -12,7 +17,7 @@ ...@@ -12,7 +17,7 @@
<el-dropdown class="avatar-container right-menu-item" trigger="click"> <el-dropdown class="avatar-container right-menu-item" trigger="click">
<div class="avatar-wrapper"> <div class="avatar-wrapper">
<img :src="avatar" class="user-avatar"> <img :src="user.avatar" class="user-avatar">
<i class="el-icon-caret-bottom"/> <i class="el-icon-caret-bottom"/>
</div> </div>
<el-dropdown-menu slot="dropdown"> <el-dropdown-menu slot="dropdown">
...@@ -40,17 +45,19 @@ import { mapGetters } from 'vuex' ...@@ -40,17 +45,19 @@ import { mapGetters } from 'vuex'
import Breadcrumb from '@/components/Breadcrumb' import Breadcrumb from '@/components/Breadcrumb'
import Hamburger from '@/components/Hamburger' import Hamburger from '@/components/Hamburger'
import Screenfull from '@/components/Screenfull' import Screenfull from '@/components/Screenfull'
import Placard from '@/components/placard'
export default { export default {
components: { components: {
Breadcrumb, Breadcrumb,
Hamburger, Hamburger,
Placard,
Screenfull Screenfull
}, },
computed: { computed: {
...mapGetters([ ...mapGetters([
'sidebar', 'sidebar',
'avatar', 'user',
'device' 'device'
]) ])
}, },
......
...@@ -25,13 +25,12 @@ ...@@ -25,13 +25,12 @@
</template> </template>
<script> <script>
import { md5 } from '@/utils/md5' import Config from '@/config'
import Cookies from 'js-cookie' import Cookies from 'js-cookie'
export default { export default {
name: 'Login', name: 'Login',
data() { data() {
return { return {
md5Pwd: '',
loginForm: { loginForm: {
username: '', username: '',
password: '', password: '',
...@@ -59,27 +58,25 @@ export default { ...@@ -59,27 +58,25 @@ export default {
methods: { methods: {
getCookie() { getCookie() {
const username = Cookies.get('username') const username = Cookies.get('username')
const password = Cookies.get('password') let password = Cookies.get('password')
const rememberMe = Cookies.get('rememberMe') const rememberMe = Cookies.get('rememberMe')
// 保存cookie里面的加密后的密码 // 保存cookie里面的加密后的密码
this.md5Pwd = password === undefined ? '' : password password = password === undefined ? '' : password
this.loginForm = { this.loginForm = {
username: username === undefined ? '' : username, username: username === undefined ? '' : username,
password: this.md5Pwd, password: password,
rememberMe: rememberMe === undefined ? false : Boolean(rememberMe) rememberMe: rememberMe === undefined ? false : Boolean(rememberMe)
} }
}, },
handleLogin() { handleLogin() {
this.$refs.loginForm.validate(valid => { this.$refs.loginForm.validate(valid => {
let pass = this.loginForm.password const user = this.loginForm
if (pass !== this.md5Pwd) { pass = md5(pass) }
const user = { username: this.loginForm.username, password: pass, rememberMe: this.loginForm.rememberMe }
if (valid) { if (valid) {
this.loading = true this.loading = true
if (user.rememberMe) { if (user.rememberMe) {
Cookies.set('username', user.username, { expires: 1 }) Cookies.set('username', user.username, { expires: Config.passCookieExpires })
Cookies.set('password', user.password, { expires: 1 }) Cookies.set('password', user.password, { expires: Config.passCookieExpires })
Cookies.set('rememberMe', user.rememberMe, { expires: 1 }) Cookies.set('rememberMe', user.rememberMe, { expires: Config.passCookieExpires })
} else { } else {
Cookies.remove('username') Cookies.remove('username')
Cookies.remove('password') Cookies.remove('password')
...@@ -106,11 +103,12 @@ export default { ...@@ -106,11 +103,12 @@ export default {
display: flex; display: flex;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
background-image:url( https://aurora-1255840532.cos.ap-chengdu.myqcloud.com/1547428971990.jpg);
height: 100%; height: 100%;
background-image:url( https://aurora-1255840532.cos.ap-chengdu.myqcloud.com/1547428971990.jpg);
background-size: cover;
} }
.title { .title {
margin: 0px auto 40px auto; margin: 0px auto 30px auto;
text-align: center; text-align: center;
color: #707070; color: #707070;
} }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<div class="app-container"> <div class="app-container">
<eHeader :query="query"/> <eHeader :query="query"/>
<!--表格渲染--> <!--表格渲染-->
<el-table v-loading="loading" :data="data" size="small" border style="width: 100%;"> <el-table v-loading="loading" :data="data" size="small" style="width: 100%;">
<el-table-column prop="username" label="用户名"/> <el-table-column prop="username" label="用户名"/>
<el-table-column prop="requestIp" label="IP"/> <el-table-column prop="requestIp" label="IP"/>
<el-table-column prop="description" label="描述"/> <el-table-column prop="description" label="描述"/>
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<div class="app-container"> <div class="app-container">
<eHeader :query="query"/> <eHeader :query="query"/>
<!--表格渲染--> <!--表格渲染-->
<el-table v-loading="loading" :data="data" size="small" border style="width: 100%;"> <el-table v-loading="loading" :data="data" size="small" style="width: 100%;">
<el-table-column prop="username" label="用户名"/> <el-table-column prop="username" label="用户名"/>
<el-table-column prop="requestIp" label="IP"/> <el-table-column prop="requestIp" label="IP"/>
<el-table-column prop="description" label="描述"/> <el-table-column prop="description" label="描述"/>
......
<template> <template>
<div :style="'width:' + width" class="container"> <div :style="'min-width:' + width" class="container">
<el-tooltip :content="content" class="lock item" effect="dark" placement="left"> <el-tooltip :content="content" class="lock item" effect="dark" placement="left">
<el-button type="info" size="mini" circle @click="doLock"><svg-icon :icon-class="ico"/></el-button> <el-button type="info" size="mini" circle @click="doLock"><svg-icon :icon-class="ico"/></el-button>
</el-tooltip> </el-tooltip>
...@@ -55,6 +55,10 @@ export default { ...@@ -55,6 +55,10 @@ export default {
}, },
mounted: function() { mounted: function() {
this.initWebSocket() this.initWebSocket()
const that = this
window.onresize = function temp() {
that.height = document.documentElement.clientHeight - 94.5 + 'px;'
}
}, },
beforeDestroy: function() { beforeDestroy: function() {
// 页面离开时断开连接,清除定时器 // 页面离开时断开连接,清除定时器
...@@ -65,15 +69,6 @@ export default { ...@@ -65,15 +69,6 @@ export default {
parseTime, parseTime,
initWebSocket() { initWebSocket() {
this.connection(this) this.connection(this)
// 断开重连机制,尝试发送消息,捕获异常发生时重连
this.timer = window.setInterval(() => {
try {
this.stompClient.send('test')
} catch (err) {
console.log('断线了: ' + err)
this.connection()
}
}, 5000)
}, },
connection(_this) { connection(_this) {
const socket = new SockJS(this.socketApi)// 连接服务端提供的通信接口,连接以后才可以订阅广播消息和个人消息 const socket = new SockJS(this.socketApi)// 连接服务端提供的通信接口,连接以后才可以订阅广播消息和个人消息
......
...@@ -2,19 +2,13 @@ ...@@ -2,19 +2,13 @@
<div class="app-container"> <div class="app-container">
<eHeader :query="query"/> <eHeader :query="query"/>
<!--表格渲染--> <!--表格渲染-->
<el-table v-loading="loading" :data="data" size="small" border style="width: 100%;"> <el-table v-loading="loading" :data="data" size="small" style="width: 100%;">
<el-table-column label="序号" width="80" align="center"> <el-table-column label="序号" width="80" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<div>{{ scope.$index + 1 }}</div> <div>{{ scope.$index + 1 }}</div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="key" label="KEY"> <el-table-column :show-overflow-tooltip="true" prop="key" label="KEY"/>
<template slot-scope="scope">
<div style="word-break:keep-all;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;">
{{ scope.row.key }}
</div>
</template>
</el-table-column>
<el-table-column prop="value" label="VALUE"> <el-table-column prop="value" label="VALUE">
<template slot-scope="scope"> <template slot-scope="scope">
<div style="word-break:keep-all;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;"> <div style="word-break:keep-all;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;">
......
<template>
<elFrame :src="sqlApi"/>
</template>
<script>
import { mapGetters } from 'vuex'
import elFrame from '@/components/iframe/index'
export default {
components: { elFrame },
computed: {
...mapGetters([
'sqlApi'
])
}
}
</script>
<template>
<div class="app-container">
<eHeader :query="query"/>
<!--表格渲染-->
<tree-table v-loading="loading" :expand-all="true" :data="data" :columns="columns" size="small">
<el-table-column label="状态" align="center">
<template slot-scope="scope">
<div v-for="item in dicts" :key="item.id">
<el-tag v-if="scope.row.enabled.toString() === item.value" :type="scope.row.enabled ? '' : 'info'">{{ item.label }}</el-tag>
</div>
</template>
</el-table-column>
<el-table-column prop="createTime" label="创建日期">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.createTime) }}</span>
</template>
</el-table-column>
<el-table-column label="操作" width="150px" align="center">
<template slot-scope="scope">
<edit v-if="checkPermission(['ADMIN','DEPT_ALL','DEPT_EDIT'])" :data="scope.row" :sup_this="sup_this"/>
<el-popover
v-if="checkPermission(['ADMIN','DEPT_ALL','DEPT_DELETE'])"
:ref="scope.row.id"
placement="top"
width="180">
<p>确定删除本条数据吗?</p>
<div style="text-align: right; margin: 0">
<el-button size="mini" type="text" @click="$refs[scope.row.id].doClose()">取消</el-button>
<el-button :loading="delLoading" type="primary" size="mini" @click="subDelete(scope.row.id)">确定</el-button>
</div>
<el-button slot="reference" :disabled="scope.row.id === 1" type="danger" size="mini">删除</el-button>
</el-popover>
</template>
</el-table-column>
</tree-table>
</div>
</template>
<script>
import treeTable from '@/components/TreeTable'
import checkPermission from '@/utils/permission'
import initData from '@/mixins/initData'
import initDict from '@/mixins/initDict'
import { del } from '@/api/dept'
import { parseTime } from '@/utils/index'
import eHeader from './module/header'
import edit from './module/edit'
export default {
components: { eHeader, edit, treeTable },
mixins: [initData, initDict],
data() {
return {
columns: [
{
text: '名称',
value: 'name'
}
],
delLoading: false, sup_this: this
}
},
created() {
this.$nextTick(() => {
this.init()
// 加载数据字典
this.getDict('dept_status')
})
},
methods: {
parseTime,
checkPermission,
beforeInit() {
this.url = 'api/dept'
const sort = 'id,desc'
this.params = { page: this.page, size: this.size, sort: sort }
const query = this.query
const value = query.value
const enabled = query.enabled
if (value) { this.params['name'] = value }
if (enabled !== '' && enabled !== null) { this.params['enabled'] = enabled }
return true
},
subDelete(id) {
this.delLoading = true
del(id).then(res => {
this.delLoading = false
this.$refs[id].doClose()
this.init()
this.$notify({
title: '删除成功',
type: 'success',
duration: 2500
})
}).catch(err => {
this.delLoading = false
this.$refs[id].doClose()
console.log(err.response.data.message)
})
}
}
}
</script>
<style scoped>
</style>
<template>
<div>
<el-button size="mini" type="success" @click="to">编辑</el-button>
<eForm ref="form" :sup_this="sup_this" :is-add="false"/>
</div>
</template>
<script>
import eForm from './form'
export default {
components: { eForm },
props: {
data: {
type: Object,
required: true
},
sup_this: {
type: Object,
required: true
}
},
methods: {
to() {
const _this = this.$refs.form
_this.getDepts()
_this.form = {
id: this.data.id,
name: this.data.name,
pid: this.data.pid,
createTime: this.data.createTime,
enabled: this.data.enabled.toString()
}
_this.dialog = true
}
}
}
</script>
<style scoped>
div{
display: inline-block;
margin-right: 3px;
}
</style>
<template>
<el-dialog :append-to-body="true" :visible.sync="dialog" :title="isAdd ? '新增部门' : '编辑部门'" width="500px">
<el-form ref="form" :model="form" :rules="rules" size="small" label-width="80px">
<el-form-item label="名称" prop="name">
<el-input v-model="form.name" style="width: 370px;"/>
</el-form-item>
<el-form-item v-if="form.pid !== 0" label="状态" prop="enabled">
<el-radio v-for="item in dicts" :key="item.id" v-model="form.enabled" :label="item.value">{{ item.label }}</el-radio>
</el-form-item>
<el-form-item v-if="form.pid !== 0" style="margin-bottom: 0px;" label="上级部门">
<treeselect v-model="form.pid" :options="depts" style="width: 370px;" placeholder="选择上级类目" />
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="text" @click="cancel">取消</el-button>
<el-button :loading="loading" type="primary" @click="doSubmit">确认</el-button>
</div>
</el-dialog>
</template>
<script>
import { add, edit, getDepts } from '@/api/dept'
import initDict from '@/mixins/initDict'
import Treeselect from '@riophae/vue-treeselect'
import '@riophae/vue-treeselect/dist/vue-treeselect.css'
export default {
components: { Treeselect },
mixins: [initDict],
props: {
isAdd: {
type: Boolean,
required: true
},
sup_this: {
type: Object,
default: null
}
},
data() {
return {
loading: false, dialog: false, depts: [],
form: {
id: '',
name: '',
pid: 1,
enabled: 'true'
},
rules: {
name: [
{ required: true, message: '请输入名称', trigger: 'blur' }
]
}
}
},
created() {
this.$nextTick(() => {
// 加载数据字典
this.getDict('dept_status')
})
},
methods: {
cancel() {
this.resetForm()
},
doSubmit() {
this.$refs['form'].validate((valid) => {
if (valid) {
this.loading = true
if (this.isAdd) {
this.doAdd()
} else this.doEdit()
}
})
},
doAdd() {
add(this.form).then(res => {
this.resetForm()
this.$notify({
title: '添加成功',
type: 'success',
duration: 2500
})
this.loading = false
this.$parent.$parent.init()
}).catch(err => {
this.loading = false
console.log(err.response.data.message)
})
},
doEdit() {
edit(this.form).then(res => {
this.resetForm()
this.$notify({
title: '修改成功',
type: 'success',
duration: 2500
})
this.loading = false
this.sup_this.init()
}).catch(err => {
this.loading = false
console.log(err.response.data.message)
})
},
resetForm() {
this.dialog = false
this.$refs['form'].resetFields()
this.form = {
id: '',
name: '',
pid: 1,
enabled: 'true'
}
},
getDepts() {
getDepts({ enabled: true }).then(res => {
this.depts = res.content
})
}
}
}
</script>
<style scoped>
</style>
<template>
<div class="head-container">
<!-- 搜索 -->
<el-input v-model="query.value" clearable placeholder="输入部门名称搜索" style="width: 200px;" class="filter-item" @keyup.enter.native="toQuery"/>
<el-select v-model="query.enabled" clearable placeholder="状态" class="filter-item" style="width: 90px" @change="toQuery">
<el-option v-for="item in enabledTypeOptions" :key="item.key" :label="item.display_name" :value="item.key"/>
</el-select>
<el-button class="filter-item" size="mini" type="primary" icon="el-icon-search" @click="toQuery">搜索</el-button>
<!-- 新增 -->
<div style="display: inline-block;margin: 0px 2px;">
<el-button
v-if="checkPermission(['ADMIN','DEPT_ALL','DEPT_CREATE'])"
class="filter-item"
size="mini"
type="primary"
icon="el-icon-plus"
@click="add">新增</el-button>
<eForm ref="form" :is-add="true"/>
</div>
</div>
</template>
<script>
import checkPermission from '@/utils/permission' // 权限判断函数
import eForm from './form'
export default {
components: { eForm },
props: {
query: {
type: Object,
required: true
}
},
data() {
return {
enabledTypeOptions: [
{ key: 'true', display_name: '正常' },
{ key: 'false', display_name: '禁用' }
]
}
},
methods: {
checkPermission,
toQuery() {
this.$parent.page = 0
this.$parent.init()
},
add() {
this.$refs.form.getDepts()
this.$refs.form.dialog = true
}
}
}
</script>
<template>
<div class="app-container">
<el-row :gutter="10">
<el-col :xs="24" :sm="24" :md="10" :lg="10" :xl="10">
<el-card class="box-card">
<div slot="header" class="clearfix">
<span>字典列表</span>
<el-button
v-if="checkPermission(['ADMIN','DICT_ALL','DICT_CREATE'])"
class="filter-item"
size="mini"
style="float: right;padding: 4px 10px"
type="primary"
icon="el-icon-plus"
@click="$refs.header.$refs.form.dialog = true">新增</el-button>
</div>
<eHeader ref="header" :query="query" :sup_this="sup_this"/>
<!--表格渲染-->
<el-table v-loading="loading" :data="data" size="small" highlight-current-row style="width: 100%;" @current-change="handleCurrentChange">
<el-table-column :show-overflow-tooltip="true" prop="name" label="名称"/>
<el-table-column :show-overflow-tooltip="true" prop="remark" label="描述"/>
<el-table-column label="操作" width="150px" align="center">
<template slot-scope="scope">
<edit v-if="checkPermission(['ADMIN','DICT_ALL','DICT_EDIT'])" :data="scope.row" :sup_this="sup_this"/>
<el-popover
v-if="checkPermission(['ADMIN','DICT_ALL','DICT_DELETE'])"
:ref="scope.row.id"
placement="top"
width="180">
<p>此操作将删除字典与对应的字典详情,确定要删除吗?</p>
<div style="text-align: right; margin: 0">
<el-button size="mini" type="text" @click="$refs[scope.row.id].doClose()">取消</el-button>
<el-button :loading="delLoading" type="primary" size="mini" @click="subDelete(scope.row.id)">确定</el-button>
</div>
<el-button slot="reference" type="danger" size="mini">删除</el-button>
</el-popover>
</template>
</el-table-column>
</el-table>
<!--分页组件-->
<el-pagination
:total="total"
style="margin-top: 8px;"
layout="total, prev, pager, next, sizes"
@size-change="sizeChange"
@current-change="pageChange"/>
</el-card>
</el-col>
<el-col :xs="24" :sm="24" :md="14" :lg="14" :xl="14">
<el-card class="box-card">
<div slot="header" class="clearfix">
<span>字典详情
<span style="color: #317EF3">
{{ this.$refs.dictDetail ? this.$refs.dictDetail.dictName : '' }}
</span>
</span>
<el-button
v-if="checkPermission(['ADMIN','DICT_ALL','DICT_CREATE']) && this.$refs.dictDetail && this.$refs.dictDetail.dictName"
class="filter-item"
size="mini"
style="float: right;padding: 4px 10px"
type="primary"
icon="el-icon-plus"
@click="$refs.dictDetail.$refs.header.$refs.form.dialog = true">新增</el-button>
</div>
<dictDetail ref="dictDetail"/>
</el-card>
</el-col>
</el-row>
</div>
</template>
<script>
import checkPermission from '@/utils/permission'
import initData from '@/mixins/initData'
import { del } from '@/api/dict'
import eHeader from './module/header'
import edit from './module/edit'
import dictDetail from '../dictDetail/index'
export default {
components: { eHeader, edit, dictDetail },
mixins: [initData],
data() {
return {
delLoading: false, sup_this: this
}
},
created() {
this.$nextTick(() => {
this.init()
})
},
methods: {
checkPermission,
beforeInit() {
this.url = 'api/dict'
const sort = 'id,desc'
this.params = { page: this.page, size: this.size, sort: sort }
const query = this.query
const type = query.type
const value = query.value
if (type && value) { this.params[type] = value }
if (this.$refs.dictDetail) {
this.$refs.dictDetail.data = []
this.$refs.dictDetail.dictName = ''
}
return true
},
subDelete(id) {
this.delLoading = true
del(id).then(res => {
this.delLoading = false
this.$refs[id].doClose()
this.init()
this.$notify({
title: '删除成功',
type: 'success',
duration: 2500
})
}).catch(err => {
this.delLoading = false
this.$refs[id].doClose()
console.log(err.response.data.message)
})
},
handleCurrentChange(val) {
if (val) {
this.$refs.dictDetail.dictName = val.name
this.$refs.dictDetail.dictId = val.id
this.$refs.dictDetail.init()
}
}
}
}
</script>
<style scoped>
</style>
<template>
<div>
<el-button size="mini" type="success" @click="to">编辑</el-button>
<eForm ref="form" :sup_this="sup_this" :is-add="false"/>
</div>
</template>
<script>
import eForm from './form'
export default {
components: { eForm },
props: {
data: {
type: Object,
required: true
},
sup_this: {
type: Object,
required: true
}
},
methods: {
to() {
const _this = this.$refs.form
_this.form = {
id: this.data.id,
name: this.data.name,
remark: this.data.remark
}
_this.dialog = true
}
}
}
</script>
<style scoped>
div{
display: inline-block;
margin-right: 3px;
}
</style>
<template>
<el-dialog :append-to-body="true" :visible.sync="dialog" :title="isAdd ? '新增字典' : '编辑字典'" width="500px">
<el-form ref="form" :model="form" :rules="rules" size="small" label-width="80px">
<el-form-item label="字典名称" prop="name">
<el-input v-model="form.name" style="width: 370px;"/>
</el-form-item>
<el-form-item label="描述">
<el-input v-model="form.remark" style="width: 370px;"/>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="text" @click="cancel">取消</el-button>
<el-button :loading="loading" type="primary" @click="doSubmit">确认</el-button>
</div>
</el-dialog>
</template>
<script>
import { add, edit } from '@/api/dict'
export default {
props: {
isAdd: {
type: Boolean,
required: true
},
sup_this: {
type: Object,
default: null
}
},
data() {
return {
loading: false, dialog: false,
form: {
id: '',
name: '',
remark: ''
},
rules: {
name: [
{ required: true, message: '请输入名称', trigger: 'blur' }
]
}
}
},
methods: {
cancel() {
this.resetForm()
},
doSubmit() {
this.$refs['form'].validate((valid) => {
if (valid) {
this.loading = true
if (this.isAdd) {
this.doAdd()
} else this.doEdit()
}
})
},
doAdd() {
add(this.form).then(res => {
this.resetForm()
this.$notify({
title: '添加成功',
type: 'success',
duration: 2500
})
this.loading = false
this.sup_this.init()
}).catch(err => {
this.loading = false
console.log(err.response.data.message)
})
},
doEdit() {
edit(this.form).then(res => {
this.resetForm()
this.$notify({
title: '修改成功',
type: 'success',
duration: 2500
})
this.loading = false
this.sup_this.init()
}).catch(err => {
this.loading = false
console.log(err.response.data.message)
})
},
resetForm() {
this.dialog = false
this.$refs['form'].resetFields()
this.form = {
id: '',
name: '',
remark: ''
}
}
}
}
</script>
<style scoped>
</style>
<template>
<div class="head-container">
<!-- 搜索 -->
<el-input v-model="query.value" clearable placeholder="输入搜索内容" style="width: 200px;" class="filter-item" @keyup.enter.native="toQuery"/>
<el-select v-model="query.type" clearable placeholder="类型" class="filter-item" style="width: 130px">
<el-option v-for="item in queryTypeOptions" :key="item.key" :label="item.display_name" :value="item.key"/>
</el-select>
<el-button class="filter-item" size="mini" type="primary" icon="el-icon-search" @click="toQuery">搜索</el-button>
<div style="display: inline-block;margin: 0px 2px;">
<eForm ref="form" :is-add="true" :sup_this="sup_this"/>
</div>
</div>
</template>
<script>
import checkPermission from '@/utils/permission' // 权限判断函数
import eForm from './form'
export default {
components: { eForm },
props: {
query: {
type: Object,
required: true
},
sup_this: {
type: Object,
required: true
}
},
data() {
return {
queryTypeOptions: [
{ key: 'name', display_name: '字典名称' },
{ key: 'remark', display_name: '描述' }
]
}
},
methods: {
checkPermission,
toQuery() {
this.sup_this.page = 0
this.sup_this.init()
}
}
}
</script>
<template>
<div>
<div v-if="dictName === ''">
<div class="my-code">点击字典查看详情</div>
</div>
<div v-else>
<eHeader ref="header" :query="query" :dict-id="dictId"/>
<!--表格渲染-->
<el-table v-loading="loading" :data="data" size="small" style="width: 100%;">
<el-table-column prop="label" label="字典标签"/>
<el-table-column prop="value" label="字典值"/>
<el-table-column prop="sort" label="排序"/>
<el-table-column label="操作" width="150px" align="center">
<template slot-scope="scope">
<edit v-if="checkPermission(['ADMIN','DICT_ALL','DICT_EDIT'])" :dict-id="dictId" :data="scope.row" :sup_this="sup_this"/>
<el-popover
v-if="checkPermission(['ADMIN','DICT_ALL','DICT_DELETE'])"
:ref="scope.row.id"
placement="top"
width="180">
<p>确定删除本条数据吗?</p>
<div style="text-align: right; margin: 0">
<el-button size="mini" type="text" @click="$refs[scope.row.id].doClose()">取消</el-button>
<el-button :loading="delLoading" type="primary" size="mini" @click="subDelete(scope.row.id)">确定</el-button>
</div>
<el-button slot="reference" type="danger" size="mini">删除</el-button>
</el-popover>
</template>
</el-table-column>
</el-table>
<!--分页组件-->
<el-pagination
:total="total"
style="margin-top: 8px;"
layout="total, prev, pager, next, sizes"
@size-change="sizeChange"
@current-change="pageChange"/>
</div>
</div>
</template>
<script>
import checkPermission from '@/utils/permission'
import initData from '@/mixins/initData'
import { del } from '@/api/dictDetail'
import eHeader from './module/header'
import edit from './module/edit'
export default {
components: { eHeader, edit },
mixins: [initData],
data() {
return {
delLoading: false, sup_this: this, dictName: '', dictId: 0
}
},
created() {
this.loading = false
},
methods: {
checkPermission,
beforeInit() {
this.url = 'api/dictDetail'
this.params = { page: this.page, size: this.size, dictName: this.dictName }
const query = this.query
const value = query.value
if (value) { this.params['label'] = value }
return true
},
subDelete(id) {
this.delLoading = true
del(id).then(res => {
this.delLoading = false
this.$refs[id].doClose()
this.init()
this.$notify({
title: '删除成功',
type: 'success',
duration: 2500
})
}).catch(err => {
this.delLoading = false
this.$refs[id].doClose()
console.log(err.response.data.message)
})
}
}
}
</script>
<style scoped>
.my-code{
padding: 15px;
line-height: 20px;
border-left: 3px solid #ddd;
color: #333;
font-family: Courier New;
font-size: 12px
}
</style>
<template>
<div>
<el-button size="mini" type="success" @click="to">编辑</el-button>
<eForm ref="form" :sup_this="sup_this" :is-add="false" :dict-id="dictId"/>
</div>
</template>
<script>
import eForm from './form'
export default {
components: { eForm },
props: {
data: {
type: Object,
required: true
},
sup_this: {
type: Object,
required: true
},
dictId: {
type: Number,
required: true
}
},
methods: {
to() {
const _this = this.$refs.form
_this.form = {
id: this.data.id,
label: this.data.label,
value: this.data.value,
sort: this.data.sort
}
_this.dialog = true
}
}
}
</script>
<style scoped>
div{
display: inline-block;
margin-right: 3px;
}
</style>
<template>
<el-dialog :append-to-body="true" :visible.sync="dialog" :title="isAdd ? '新增字典详情' : '编辑字典详情'" width="500px">
<el-form ref="form" :model="form" :rules="rules" size="small" label-width="80px">
<el-form-item label="字典标签" prop="label">
<el-input v-model="form.label" style="width: 370px;"/>
</el-form-item>
<el-form-item label="字典值">
<el-input v-model="form.value" style="width: 370px;"/>
</el-form-item>
<el-form-item label="排序">
<el-input v-model="form.sort" style="width: 370px;"/>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="text" @click="cancel">取消</el-button>
<el-button :loading="loading" type="primary" @click="doSubmit">确认</el-button>
</div>
</el-dialog>
</template>
<script>
import { add, edit } from '@/api/dictDetail'
export default {
props: {
isAdd: {
type: Boolean,
required: true
},
sup_this: {
type: Object,
default: null
},
dictId: {
type: Number,
required: true
}
},
data() {
return {
loading: false, dialog: false,
form: {
id: '',
label: '',
value: '',
sort: '999'
},
rules: {
label: [
{ required: true, message: '请输入字典标签', trigger: 'blur' }
]
}
}
},
methods: {
cancel() {
this.resetForm()
},
doSubmit() {
this.form['dict'] = { id: this.dictId }
this.$refs['form'].validate((valid) => {
if (valid) {
this.loading = true
if (this.isAdd) {
this.doAdd()
} else this.doEdit()
}
})
},
doAdd() {
add(this.form).then(res => {
this.resetForm()
this.$notify({
title: '添加成功',
type: 'success',
duration: 2500
})
this.loading = false
this.$parent.$parent.init()
}).catch(err => {
this.loading = false
console.log(err.response.data.message)
})
},
doEdit() {
edit(this.form).then(res => {
this.resetForm()
this.$notify({
title: '修改成功',
type: 'success',
duration: 2500
})
this.loading = false
this.sup_this.init()
}).catch(err => {
this.loading = false
console.log(err.response.data.message)
})
},
resetForm() {
this.dialog = false
this.$refs['form'].resetFields()
this.form = {
id: '',
label: '',
value: '',
sort: '999'
}
}
}
}
</script>
<style scoped>
</style>
<template>
<div class="head-container">
<!-- 搜索 -->
<el-input v-model="query.value" clearable placeholder="输入字典标签查询" style="width: 200px;" class="filter-item" @keyup.enter.native="toQuery"/>
<el-button class="filter-item" size="mini" type="primary" icon="el-icon-search" @click="toQuery">搜索</el-button>
<div style="display: inline-block;margin: 0px 2px;">
<eForm ref="form" :is-add="true" :dict-id="dictId"/>
</div>
</div>
</template>
<script>
import checkPermission from '@/utils/permission' // 权限判断函数
import eForm from './form'
export default {
components: { eForm },
props: {
query: {
type: Object,
required: true
},
dictId: {
type: Number,
required: true
}
},
data() {
return {}
},
methods: {
checkPermission,
toQuery() {
this.$parent.page = 0
this.$parent.init()
}
}
}
</script>
<template>
<div class="app-container">
<eHeader :query="query"/>
<!--表格渲染-->
<el-table v-loading="loading" :data="data" size="small" style="width: 100%;">
<el-table-column prop="name" label="名称"/>
<el-table-column label="所属部门">
<template slot-scope="scope">
<div>{{ scope.row.dept.name }}</div>
</template>
</el-table-column>
<el-table-column prop="sort" label="排序">
<template slot-scope="scope">
{{ scope.row.sort }}
</template>
</el-table-column>
<el-table-column label="状态" align="center">
<template slot-scope="scope">
<div v-for="item in dicts" :key="item.id">
<el-tag v-if="scope.row.enabled.toString() === item.value" :type="scope.row.enabled ? '' : 'info'">{{ item.label }}</el-tag>
</div>
</template>
</el-table-column>
<el-table-column prop="createTime" label="创建日期">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.createTime) }}</span>
</template>
</el-table-column>
<el-table-column label="操作" width="150px" align="center">
<template slot-scope="scope">
<edit v-if="checkPermission(['ADMIN','USERJOB_ALL','USERJOB_EDIT'])" :data="scope.row" :sup_this="sup_this"/>
<el-popover
v-if="checkPermission(['ADMIN','USERJOB_ALL','USERJOB_DELETE'])"
:ref="scope.row.id"
placement="top"
width="180">
<p>确定删除本条数据吗?</p>
<div style="text-align: right; margin: 0">
<el-button size="mini" type="text" @click="$refs[scope.row.id].doClose()">取消</el-button>
<el-button :loading="delLoading" type="primary" size="mini" @click="subDelete(scope.row.id)">确定</el-button>
</div>
<el-button slot="reference" type="danger" size="mini">删除</el-button>
</el-popover>
</template>
</el-table-column>
</el-table>
<!--分页组件-->
<el-pagination
:total="total"
style="margin-top: 8px;"
layout="total, prev, pager, next, sizes"
@size-change="sizeChange"
@current-change="pageChange"/>
</div>
</template>
<script>
import checkPermission from '@/utils/permission'
import initData from '@/mixins/initData'
import initDict from '@/mixins/initDict'
import { del } from '@/api/job'
import { parseTime } from '@/utils/index'
import eHeader from './module/header'
import edit from './module/edit'
export default {
components: { eHeader, edit },
mixins: [initData, initDict],
data() {
return {
delLoading: false, sup_this: this
}
},
created() {
this.$nextTick(() => {
this.init()
// 加载数据字典
this.getDict('job_status')
})
},
methods: {
parseTime,
checkPermission,
beforeInit() {
this.url = 'api/job'
const sort = 'sort,asc'
this.params = { page: this.page, size: this.size, sort: sort }
const query = this.query
const value = query.value
const enabled = query.enabled
if (value) { this.params['name'] = value }
if (enabled !== '' && enabled !== null) { this.params['enabled'] = enabled }
return true
},
subDelete(id) {
this.delLoading = true
del(id).then(res => {
this.delLoading = false
this.$refs[id].doClose()
this.init()
this.$notify({
title: '删除成功',
type: 'success',
duration: 2500
})
}).catch(err => {
this.delLoading = false
this.$refs[id].doClose()
console.log(err.response.data.message)
})
}
}
}
</script>
<style scoped>
</style>
<template>
<div>
<el-button size="mini" type="success" @click="to">编辑</el-button>
<eForm ref="form" :sup_this="sup_this" :is-add="false"/>
</div>
</template>
<script>
import eForm from './form'
export default {
components: { eForm },
props: {
data: {
type: Object,
required: true
},
sup_this: {
type: Object,
required: true
}
},
methods: {
to() {
const _this = this.$refs.form
_this.getDepts()
_this.form = {
id: this.data.id,
name: this.data.name,
sort: this.data.sort,
enabled: this.data.enabled.toString(),
createTime: this.data.createTime,
dept: { id: this.data.dept.id }
}
_this.deptId = this.data.dept.id
_this.dialog = true
}
}
}
</script>
<style scoped>
div{
display: inline-block;
margin-right: 3px;
}
</style>
<template>
<el-dialog :append-to-body="true" :visible.sync="dialog" :title="isAdd ? '新增岗位' : '编辑岗位'" width="500px">
<el-form ref="form" :model="form" :rules="rules" size="small" label-width="80px">
<el-form-item label="名称" prop="name">
<el-input v-model="form.name" style="width: 370px;"/>
</el-form-item>
<el-form-item label="排序" prop="sort">
<el-input v-model.number="form.sort" placeholder="序号越小越靠前" style="width: 370px;"/>
</el-form-item>
<el-form-item v-if="form.pid !== 0" label="状态" prop="enabled">
<el-radio v-for="item in dicts" :key="item.id" v-model="form.enabled" :label="item.value">{{ item.label }}</el-radio>
</el-form-item>
<el-form-item label="所属部门">
<treeselect v-model="deptId" :options="depts" style="width: 370px" placeholder="选择部门" />
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="text" @click="cancel">取消</el-button>
<el-button :loading="loading" type="primary" @click="doSubmit">确认</el-button>
</div>
</el-dialog>
</template>
<script>
import { getDepts } from '@/api/dept'
import { add, edit } from '@/api/job'
import Treeselect from '@riophae/vue-treeselect'
import '@riophae/vue-treeselect/dist/vue-treeselect.css'
import initDict from '@/mixins/initDict'
export default {
components: { Treeselect },
mixins: [initDict],
props: {
isAdd: {
type: Boolean,
required: true
},
sup_this: {
type: Object,
default: null
}
},
data() {
return {
loading: false, dialog: false, depts: [], deptId: null,
form: {
id: '',
name: '',
sort: 999,
enabled: 'true',
createTime: '',
dept: { id: '' }
},
rules: {
name: [
{ required: true, message: '请输入名称', trigger: 'blur' }
],
sort: [
{ required: true, message: '请输入序号', trigger: 'blur', type: 'number' }
]
}
}
},
created() {
this.$nextTick(() => {
// 加载数据字典
this.getDict('job_status')
})
},
methods: {
cancel() {
this.resetForm()
},
doSubmit() {
if (this.deptId === null || this.deptId === undefined) {
this.$message({
message: '所属部门不能为空',
type: 'warning'
})
} else {
this.form.dept.id = this.deptId
this.$refs['form'].validate((valid) => {
if (valid) {
this.loading = true
if (this.isAdd) {
this.doAdd()
} else this.doEdit()
}
})
}
},
doAdd() {
add(this.form).then(res => {
this.resetForm()
this.$notify({
title: '添加成功',
type: 'success',
duration: 2500
})
this.loading = false
this.$parent.$parent.init()
}).catch(err => {
this.loading = false
console.log(err.response.data.message)
})
},
doEdit() {
edit(this.form).then(res => {
this.resetForm()
this.$notify({
title: '修改成功',
type: 'success',
duration: 2500
})
this.loading = false
this.sup_this.init()
}).catch(err => {
this.loading = false
console.log(err.response.data.message)
})
},
resetForm() {
this.dialog = false
this.$refs['form'].resetFields()
this.deptId = null
this.form = {
id: '',
name: '',
sort: 999,
enabled: 'true',
createTime: '',
dept: { id: '' }
}
},
getDepts() {
getDepts({ enabled: true }).then(res => {
this.depts = res.content
})
}
}
}
</script>
<style scoped>
</style>
<template>
<div class="head-container">
<!-- 搜索 -->
<el-input v-model="query.value" clearable placeholder="输入岗位名称搜索" style="width: 200px;" class="filter-item" @keyup.enter.native="toQuery"/>
<el-select v-model="query.enabled" clearable placeholder="状态" class="filter-item" style="width: 90px" @change="toQuery">
<el-option v-for="item in enabledTypeOptions" :key="item.key" :label="item.display_name" :value="item.key"/>
</el-select>
<el-button class="filter-item" size="mini" type="primary" icon="el-icon-search" @click="toQuery">搜索</el-button>
<!-- 新增 -->
<div style="display: inline-block;margin: 0px 2px;">
<el-button
v-if="checkPermission(['ADMIN','USERJOB_ALL','USERJOB_CREATE'])"
class="filter-item"
size="mini"
type="primary"
icon="el-icon-plus"
@click="add">新增</el-button>
<eForm ref="form" :is-add="true"/>
</div>
</div>
</template>
<script>
import checkPermission from '@/utils/permission' // 权限判断函数
import eForm from './form'
export default {
components: { eForm },
props: {
query: {
type: Object,
required: true
}
},
data() {
return {
enabledTypeOptions: [
{ key: 'true', display_name: '正常' },
{ key: 'false', display_name: '禁用' }
]
}
},
methods: {
checkPermission,
add() {
this.$refs.form.getDepts()
this.$refs.form.dialog = true
},
toQuery() {
this.$parent.page = 0
this.$parent.init()
}
}
}
</script>
<template> <template>
<div class="app-container"> <div class="app-container">
<eHeader :menus="menus" :query="query"/> <eHeader :query="query"/>
<!--表格渲染--> <!--表格渲染-->
<tree-table v-loading="loading" :data="data" :expand-all="true" :columns="columns" border size="small"> <tree-table v-loading="loading" :data="data" :expand-all="true" :columns="columns" size="small">
<el-table-column prop="icon" label="图标" align="center" width="80px"> <el-table-column prop="icon" label="图标" align="center" width="80px">
<template slot-scope="scope"> <template slot-scope="scope">
<svg-icon :icon-class="scope.row.icon" /> <svg-icon :icon-class="scope.row.icon" />
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
</el-table-column> </el-table-column>
<el-table-column label="操作" width="150px" align="center"> <el-table-column label="操作" width="150px" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<edit v-if="checkPermission(['ADMIN','MENU_ALL','MENU_EDIT'])" :menus="menus" :data="scope.row" :sup_this="sup_this"/> <edit v-if="checkPermission(['ADMIN','MENU_ALL','MENU_EDIT'])" :data="scope.row" :sup_this="sup_this"/>
<el-popover <el-popover
v-if="checkPermission(['ADMIN','MENU_ALL','MENU_DELETE'])" v-if="checkPermission(['ADMIN','MENU_ALL','MENU_DELETE'])"
:ref="scope.row.id" :ref="scope.row.id"
...@@ -51,7 +51,7 @@ ...@@ -51,7 +51,7 @@
import checkPermission from '@/utils/permission' // 权限判断函数 import checkPermission from '@/utils/permission' // 权限判断函数
import treeTable from '@/components/TreeTable' import treeTable from '@/components/TreeTable'
import initData from '@/mixins/initData' import initData from '@/mixins/initData'
import { del, getMenusTree } from '@/api/menu' import { del } from '@/api/menu'
import { parseTime } from '@/utils/index' import { parseTime } from '@/utils/index'
import eHeader from './module/header' import eHeader from './module/header'
import edit from './module/edit' import edit from './module/edit'
...@@ -66,11 +66,10 @@ export default { ...@@ -66,11 +66,10 @@ export default {
value: 'name' value: 'name'
} }
], ],
delLoading: false, sup_this: this, menus: [] delLoading: false, sup_this: this
} }
}, },
created() { created() {
this.getMenus()
this.$nextTick(() => { this.$nextTick(() => {
this.init() this.init()
}) })
...@@ -103,14 +102,6 @@ export default { ...@@ -103,14 +102,6 @@ export default {
this.$refs[id].doClose() this.$refs[id].doClose()
console.log(err.response.data.message) console.log(err.response.data.message)
}) })
},
getMenus() {
getMenusTree().then(res => {
this.menus = []
const menu = { id: 0, label: '顶级类目', children: [] }
menu.children = res
this.menus.push(menu)
})
} }
} }
} }
......
<template> <template>
<div> <div>
<el-button size="mini" type="success" @click="to">编辑</el-button> <el-button size="mini" type="success" @click="to">编辑</el-button>
<eForm ref="form" :menus="menus" :sup_this="sup_this" :is-add="false"/> <eForm ref="form" :sup_this="sup_this" :is-add="false"/>
</div> </div>
</template> </template>
<script> <script>
...@@ -16,15 +16,12 @@ export default { ...@@ -16,15 +16,12 @@ export default {
sup_this: { sup_this: {
type: Object, type: Object,
required: true required: true
},
menus: {
type: Array,
required: true
} }
}, },
methods: { methods: {
to() { to() {
const _this = this.$refs.form const _this = this.$refs.form
_this.getMenus()
_this.form = { id: this.data.id, component: this.data.component, name: this.data.name, sort: this.data.sort, pid: this.data.pid, path: this.data.path, iframe: this.data.iframe.toString(), roles: [], icon: this.data.icon } _this.form = { id: this.data.id, component: this.data.component, name: this.data.name, sort: this.data.sort, pid: this.data.pid, path: this.data.path, iframe: this.data.iframe.toString(), roles: [], icon: this.data.icon }
_this.dialog = true _this.dialog = true
} }
......
...@@ -42,17 +42,13 @@ ...@@ -42,17 +42,13 @@
</template> </template>
<script> <script>
import { add, edit } from '@/api/menu' import { add, edit, getMenusTree } from '@/api/menu'
import Treeselect from '@riophae/vue-treeselect' import Treeselect from '@riophae/vue-treeselect'
import IconSelect from '@/components/IconSelect' import IconSelect from '@/components/IconSelect'
import '@riophae/vue-treeselect/dist/vue-treeselect.css' import '@riophae/vue-treeselect/dist/vue-treeselect.css'
export default { export default {
components: { Treeselect, IconSelect }, components: { Treeselect, IconSelect },
props: { props: {
menus: {
type: Array,
required: true
},
isAdd: { isAdd: {
type: Boolean, type: Boolean,
required: true required: true
...@@ -64,7 +60,7 @@ export default { ...@@ -64,7 +60,7 @@ export default {
}, },
data() { data() {
return { return {
loading: false, dialog: false, loading: false, dialog: false, menus: [],
form: { name: '', sort: 999, path: '', component: '', iframe: 'false', roles: [], pid: 0, icon: '' }, form: { name: '', sort: 999, path: '', component: '', iframe: 'false', roles: [], pid: 0, icon: '' },
rules: { rules: {
name: [ name: [
...@@ -105,7 +101,6 @@ export default { ...@@ -105,7 +101,6 @@ export default {
}) })
this.loading = false this.loading = false
this.$parent.$parent.init() this.$parent.$parent.init()
this.$parent.$parent.getMenus()
}).catch(err => { }).catch(err => {
this.loading = false this.loading = false
console.log(err.response.data.message) console.log(err.response.data.message)
...@@ -121,7 +116,6 @@ export default { ...@@ -121,7 +116,6 @@ export default {
}) })
this.loading = false this.loading = false
this.sup_this.init() this.sup_this.init()
this.sup_this.getMenus()
}).catch(err => { }).catch(err => {
this.loading = false this.loading = false
console.log(err.response.data.message) console.log(err.response.data.message)
...@@ -134,6 +128,14 @@ export default { ...@@ -134,6 +128,14 @@ export default {
}, },
selected(name) { selected(name) {
this.form.icon = name this.form.icon = name
},
getMenus() {
getMenusTree().then(res => {
this.menus = []
const menu = { id: 0, label: '顶级类目', children: [] }
menu.children = res
this.menus.push(menu)
})
} }
} }
} }
......
...@@ -11,8 +11,8 @@ ...@@ -11,8 +11,8 @@
size="mini" size="mini"
type="primary" type="primary"
icon="el-icon-plus" icon="el-icon-plus"
@click="$refs.form.dialog = true">新增</el-button> @click="add">新增</el-button>
<eForm ref="form" :menus="menus" :is-add="true"/> <eForm ref="form" :is-add="true"/>
</div> </div>
</div> </div>
</template> </template>
...@@ -26,10 +26,6 @@ export default { ...@@ -26,10 +26,6 @@ export default {
query: { query: {
type: Object, type: Object,
required: true required: true
},
menus: {
type: Array,
required: true
} }
}, },
data() { data() {
...@@ -42,6 +38,10 @@ export default { ...@@ -42,6 +38,10 @@ export default {
toQuery() { toQuery() {
this.$parent.page = 0 this.$parent.page = 0
this.$parent.init() this.$parent.init()
},
add() {
this.$refs.form.getMenus()
this.$refs.form.dialog = true
} }
} }
} }
......
<template> <template>
<div class="app-container"> <div class="app-container">
<eHeader :permissions="permissions" :query="query"/> <eHeader :query="query"/>
<!--表格渲染--> <!--表格渲染-->
<tree-table v-loading="loading" :data="data" :expand-all="true" :columns="columns" border size="small"> <tree-table v-loading="loading" :data="data" :expand-all="true" :columns="columns" size="small">
<el-table-column prop="createTime" label="创建日期"> <el-table-column prop="createTime" label="创建日期">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ parseTime(scope.row.createTime) }}</span> <span>{{ parseTime(scope.row.createTime) }}</span>
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
</el-table-column> </el-table-column>
<el-table-column label="操作" width="150px" align="center"> <el-table-column label="操作" width="150px" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<edit v-if="checkPermission(['ADMIN','PERMISSION_ALL','PERMISSION_EDIT'])" :permissions="permissions" :data="scope.row" :sup_this="sup_this"/> <edit v-if="checkPermission(['ADMIN','PERMISSION_ALL','PERMISSION_EDIT'])" :data="scope.row" :sup_this="sup_this"/>
<el-popover <el-popover
v-if="checkPermission(['ADMIN','PERMISSION_ALL','PERMISSION_DELETE'])" v-if="checkPermission(['ADMIN','PERMISSION_ALL','PERMISSION_DELETE'])"
:ref="scope.row.id" :ref="scope.row.id"
...@@ -34,7 +34,6 @@ import checkPermission from '@/utils/permission' // 权限判断函数 ...@@ -34,7 +34,6 @@ import checkPermission from '@/utils/permission' // 权限判断函数
import treeTable from '@/components/TreeTable' import treeTable from '@/components/TreeTable'
import initData from '@/mixins/initData' import initData from '@/mixins/initData'
import { del } from '@/api/permission' import { del } from '@/api/permission'
import { getPermissionTree } from '@/api/permission'
import { parseTime } from '@/utils/index' import { parseTime } from '@/utils/index'
import eHeader from './module/header' import eHeader from './module/header'
import edit from './module/edit' import edit from './module/edit'
...@@ -53,11 +52,10 @@ export default { ...@@ -53,11 +52,10 @@ export default {
value: 'alias' value: 'alias'
} }
], ],
delLoading: false, sup_this: this, permissions: [] delLoading: false, sup_this: this
} }
}, },
created() { created() {
this.getPermissions()
this.$nextTick(() => { this.$nextTick(() => {
this.init() this.init()
}) })
...@@ -90,14 +88,6 @@ export default { ...@@ -90,14 +88,6 @@ export default {
this.$refs[id].doClose() this.$refs[id].doClose()
console.log(err.response.data.message) console.log(err.response.data.message)
}) })
},
getPermissions() {
getPermissionTree().then(res => {
this.permissions = []
const permission = { id: 0, label: '顶级类目', children: [] }
permission.children = res
this.permissions.push(permission)
})
} }
} }
} }
......
<template> <template>
<div> <div>
<el-button size="mini" type="success" @click="to">编辑</el-button> <el-button size="mini" type="success" @click="to">编辑</el-button>
<eForm ref="form" :permissions="permissions" :sup_this="sup_this" :is-add="false"/> <eForm ref="form" :sup_this="sup_this" :is-add="false"/>
</div> </div>
</template> </template>
<script> <script>
...@@ -16,15 +16,12 @@ export default { ...@@ -16,15 +16,12 @@ export default {
sup_this: { sup_this: {
type: Object, type: Object,
required: true required: true
},
permissions: {
type: Array,
required: true
} }
}, },
methods: { methods: {
to() { to() {
const _this = this.$refs.form const _this = this.$refs.form
_this.getPermissions()
_this.form = { id: this.data.id, name: this.data.name, alias: this.data.alias, pid: this.data.pid } _this.form = { id: this.data.id, name: this.data.name, alias: this.data.alias, pid: this.data.pid }
_this.dialog = true _this.dialog = true
} }
......
...@@ -19,16 +19,12 @@ ...@@ -19,16 +19,12 @@
</template> </template>
<script> <script>
import { add, edit } from '@/api/permission' import { add, edit, getPermissionTree } from '@/api/permission'
import Treeselect from '@riophae/vue-treeselect' import Treeselect from '@riophae/vue-treeselect'
import '@riophae/vue-treeselect/dist/vue-treeselect.css' import '@riophae/vue-treeselect/dist/vue-treeselect.css'
export default { export default {
components: { Treeselect }, components: { Treeselect },
props: { props: {
permissions: {
type: Array,
required: true
},
isAdd: { isAdd: {
type: Boolean, type: Boolean,
required: true required: true
...@@ -40,7 +36,7 @@ export default { ...@@ -40,7 +36,7 @@ export default {
}, },
data() { data() {
return { return {
loading: false, dialog: false, loading: false, dialog: false, permissions: [],
form: { name: '', alias: '', pid: 0 }, form: { name: '', alias: '', pid: 0 },
rules: { rules: {
name: [ name: [
...@@ -78,7 +74,6 @@ export default { ...@@ -78,7 +74,6 @@ export default {
}) })
this.loading = false this.loading = false
this.$parent.$parent.init() this.$parent.$parent.init()
this.$parent.$parent.getPermissions()
}).catch(err => { }).catch(err => {
this.loading = false this.loading = false
console.log(err.response.data.message) console.log(err.response.data.message)
...@@ -94,7 +89,6 @@ export default { ...@@ -94,7 +89,6 @@ export default {
}) })
this.loading = false this.loading = false
this.sup_this.init() this.sup_this.init()
this.sup_this.getPermissions()
}).catch(err => { }).catch(err => {
this.loading = false this.loading = false
console.log(err.response.data.message) console.log(err.response.data.message)
...@@ -104,6 +98,14 @@ export default { ...@@ -104,6 +98,14 @@ export default {
this.dialog = false this.dialog = false
this.$refs['form'].resetFields() this.$refs['form'].resetFields()
this.form = { name: '', alias: '', pid: 0 } this.form = { name: '', alias: '', pid: 0 }
},
getPermissions() {
getPermissionTree().then(res => {
this.permissions = []
const permission = { id: 0, label: '顶级类目', children: [] }
permission.children = res
this.permissions.push(permission)
})
} }
} }
} }
......
...@@ -11,8 +11,8 @@ ...@@ -11,8 +11,8 @@
size="mini" size="mini"
type="primary" type="primary"
icon="el-icon-plus" icon="el-icon-plus"
@click="$refs.form.dialog = true">新增</el-button> @click="add">新增</el-button>
<eForm ref="form" :permissions="permissions" :is-add="true"/> <eForm ref="form" :is-add="true"/>
</div> </div>
</div> </div>
</template> </template>
...@@ -26,10 +26,6 @@ export default { ...@@ -26,10 +26,6 @@ export default {
query: { query: {
type: Object, type: Object,
required: true required: true
},
permissions: {
type: Array,
required: true
} }
}, },
data() { data() {
...@@ -42,6 +38,10 @@ export default { ...@@ -42,6 +38,10 @@ export default {
toQuery() { toQuery() {
this.$parent.page = 0 this.$parent.page = 0
this.$parent.init() this.$parent.init()
},
add() {
this.$refs.form.getPermissions()
this.$refs.form.dialog = true
} }
} }
} }
......
...@@ -3,8 +3,9 @@ ...@@ -3,8 +3,9 @@
<eHeader :query="query"/> <eHeader :query="query"/>
<!--表格渲染--> <!--表格渲染-->
<div :style="'height: auto;max-height:' + height + 'overflow-y: auto;'"> <div :style="'height: auto;max-height:' + height + 'overflow-y: auto;'">
<el-table v-loading="loading" :data="data" highlight-current-row size="small" border style="width: 100%;" @current-change="handleCurrentChange"> <el-table v-loading="loading" :data="data" highlight-current-row size="small" style="width: 100%;" @current-change="handleCurrentChange">
<el-table-column prop="name" label="名称"/> <el-table-column prop="name" label="名称"/>
<el-table-column prop="dataScope" label="数据权限"/>
<el-table-column prop="remark" label="描述"/> <el-table-column prop="remark" label="描述"/>
<el-table-column prop="createTime" label="创建日期"> <el-table-column prop="createTime" label="创建日期">
<template slot-scope="scope"> <template slot-scope="scope">
...@@ -53,7 +54,7 @@ ...@@ -53,7 +54,7 @@
type="info" type="info"
@click="savePermission">保存</el-button> @click="savePermission">保存</el-button>
</div> </div>
<div :style="'min-height: 200px;max-height:' + height + 'overflow-y: auto;'"> <div style="min-height: 320px;max-height:500px;overflow-y: auto;">
<el-tree <el-tree
ref="permission" ref="permission"
:data="permissions" :data="permissions"
...@@ -78,7 +79,7 @@ ...@@ -78,7 +79,7 @@
type="info" type="info"
@click="saveMenu">保存</el-button> @click="saveMenu">保存</el-button>
</div> </div>
<div :style="'min-height: 207px;max-height:' + height + 'overflow-y: auto;'"> <div style="min-height: 320px;max-height:500px;overflow-y: auto;">
<el-tree <el-tree
ref="menu" ref="menu"
:data="menus" :data="menus"
...@@ -124,6 +125,12 @@ export default { ...@@ -124,6 +125,12 @@ export default {
this.init() this.init()
}) })
}, },
mounted: function() {
const that = this
window.onresize = function temp() {
that.height = document.documentElement.clientHeight - 94.5 - 260 + 'px;'
}
},
methods: { methods: {
parseTime, parseTime,
checkPermission, checkPermission,
...@@ -167,34 +174,36 @@ export default { ...@@ -167,34 +174,36 @@ export default {
}) })
}, },
handleCurrentChange(val) { handleCurrentChange(val) {
const _this = this if (val) {
// 清空权限与菜单的选中 const _this = this
this.$refs.permission.setCheckedKeys([]) // 清空权限与菜单的选中
this.$refs.menu.setCheckedKeys([]) this.$refs.permission.setCheckedKeys([])
// 保存当前的角色id this.$refs.menu.setCheckedKeys([])
this.currentId = val.id // 保存当前的角色id
// 点击后显示按钮 this.currentId = val.id
this.showButton = true // 点击后显示按钮
// 初始化 this.showButton = true
this.menuIds = [] // 初始化
this.permissionIds = [] this.menuIds = []
// 菜单数据需要特殊处理 this.permissionIds = []
val.menus.forEach(function(data, index) { // 菜单数据需要特殊处理
let add = true val.menus.forEach(function(data, index) {
for (let i = 0; i < val.menus.length; i++) { let add = true
if (data.id === val.menus[i].pid) { for (let i = 0; i < val.menus.length; i++) {
add = false if (data.id === val.menus[i].pid) {
break add = false
break
}
} }
} if (add) {
if (add) { _this.menuIds.push(data.id)
_this.menuIds.push(data.id) }
} })
}) // 处理权限数据
// 处理权限数据 val.permissions.forEach(function(data, index) {
val.permissions.forEach(function(data, index) { _this.permissionIds.push(data.id)
_this.permissionIds.push(data.id) })
}) }
}, },
savePermission() { savePermission() {
this.permissionLoading = true this.permissionLoading = true
......
...@@ -21,7 +21,14 @@ export default { ...@@ -21,7 +21,14 @@ export default {
methods: { methods: {
to() { to() {
const _this = this.$refs.form const _this = this.$refs.form
_this.form = { id: this.data.id, name: this.data.name, remark: this.data.remark, permissions: [] } _this.deptIds = []
_this.form = { id: this.data.id, name: this.data.name, remark: this.data.remark, depts: this.data.depts, dataScope: this.data.dataScope }
if (_this.form.dataScope === '自定义') {
_this.getDepts()
}
for (let i = 0; i < _this.form.depts.length; i++) {
_this.deptIds[i] = _this.form.depts[i].id
}
_this.dialog = true _this.dialog = true
} }
} }
......
<template> <template>
<el-dialog :visible.sync="dialog" :title="isAdd ? '新增角色' : '编辑角色'" append-to-body width="500px"> <el-dialog :visible.sync="dialog" :title="isAdd ? '新增角色' : '编辑角色'" append-to-body width="500px">
<el-form ref="form" :model="form" :rules="rules" size="small" label-width="66px"> <el-form ref="form" :model="form" :rules="rules" size="small" label-width="80px">
<el-form-item label="名称" prop="name"> <el-form-item label="角色名称" prop="name">
<el-input v-model="form.name" style="width: 370px;"/> <el-input v-model="form.name" style="width: 370px;"/>
</el-form-item> </el-form-item>
<el-form-item style="margin-top: -10px;" label="描述"> <el-form-item label="数据范围">
<el-select v-model="form.dataScope" style="width: 370px" placeholder="请选择数据范围" @change="changeScope">
<el-option
v-for="item in dateScopes"
:key="item"
:label="item"
:value="item"/>
</el-select>
</el-form-item>
<el-form-item v-if="form.dataScope === '自定义'" label="数据权限">
<treeselect v-model="deptIds" :options="depts" multiple style="width: 370px" placeholder="请选择" />
</el-form-item>
<el-form-item label="描述信息">
<el-input v-model="form.remark" style="width: 370px;" rows="5" type="textarea"/> <el-input v-model="form.remark" style="width: 370px;" rows="5" type="textarea"/>
</el-form-item> </el-form-item>
</el-form> </el-form>
...@@ -16,8 +28,12 @@ ...@@ -16,8 +28,12 @@
</template> </template>
<script> <script>
import { getDepts } from '@/api/dept'
import { add, edit } from '@/api/role' import { add, edit } from '@/api/role'
import Treeselect from '@riophae/vue-treeselect'
import '@riophae/vue-treeselect/dist/vue-treeselect.css'
export default { export default {
components: { Treeselect },
props: { props: {
isAdd: { isAdd: {
type: Boolean, type: Boolean,
...@@ -30,8 +46,9 @@ export default { ...@@ -30,8 +46,9 @@ export default {
}, },
data() { data() {
return { return {
loading: false, dialog: false, dateScopes: ['全部', '本级', '自定义'],
form: { name: '', permissions: [], remark: '' }, loading: false, dialog: false, depts: [], deptIds: [],
form: { name: '', depts: [], remark: '', dataScope: '本级' },
rules: { rules: {
name: [ name: [
{ required: true, message: '请输入名称', trigger: 'blur' } { required: true, message: '请输入名称', trigger: 'blur' }
...@@ -44,16 +61,31 @@ export default { ...@@ -44,16 +61,31 @@ export default {
this.resetForm() this.resetForm()
}, },
doSubmit() { doSubmit() {
this.$refs['form'].validate((valid) => { if (this.form.dataScope === '自定义' && this.deptIds.length === 0) {
if (valid) { this.$message({
this.loading = true message: '自定义数据权限不能为空',
if (this.isAdd) { type: 'warning'
this.doAdd() })
} else this.doEdit() } else {
} else { this.form.depts = []
return false if (this.form.dataScope === '自定义') {
for (let i = 0; i < this.deptIds.length; i++) {
this.form.depts.push({
id: this.deptIds[i]
})
}
} }
}) this.$refs['form'].validate((valid) => {
if (valid) {
this.loading = true
if (this.isAdd) {
this.doAdd()
} else this.doEdit()
} else {
return false
}
})
}
}, },
doAdd() { doAdd() {
add(this.form).then(res => { add(this.form).then(res => {
...@@ -88,7 +120,17 @@ export default { ...@@ -88,7 +120,17 @@ export default {
resetForm() { resetForm() {
this.dialog = false this.dialog = false
this.$refs['form'].resetFields() this.$refs['form'].resetFields()
this.form = { name: '', permissions: [], remark: '' } this.form = { name: '', depts: [], remark: '', dataScope: '本级' }
},
getDepts() {
getDepts({ enabled: true }).then(res => {
this.depts = res.content
})
},
changeScope() {
if (this.form.dataScope === '自定义') {
this.getDepts()
}
} }
} }
} }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<div class="app-container"> <div class="app-container">
<eHeader :query="query"/> <eHeader :query="query"/>
<!--表格渲染--> <!--表格渲染-->
<el-table v-loading="loading" :data="data" size="small" border style="width: 100%;"> <el-table v-loading="loading" :data="data" size="small" style="width: 100%;">
<el-table-column :show-overflow-tooltip="true" prop="jobName" width="100px" label="任务名称"/> <el-table-column :show-overflow-tooltip="true" prop="jobName" width="100px" label="任务名称"/>
<el-table-column :show-overflow-tooltip="true" prop="beanName" label="Bean名称"/> <el-table-column :show-overflow-tooltip="true" prop="beanName" label="Bean名称"/>
<el-table-column :show-overflow-tooltip="true" prop="methodName" width="90px" label="执行方法"/> <el-table-column :show-overflow-tooltip="true" prop="methodName" width="90px" label="执行方法"/>
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
<el-button class="filter-item" size="mini" type="primary" icon="el-icon-search" @click="toQuery">搜索</el-button> <el-button class="filter-item" size="mini" type="primary" icon="el-icon-search" @click="toQuery">搜索</el-button>
</div> </div>
<!--表格渲染--> <!--表格渲染-->
<el-table v-loading="loading" :data="data" size="small" border style="width: 100%;margin-top: -10px;"> <el-table v-loading="loading" :data="data" size="small" style="width: 100%;margin-top: -10px;">
<el-table-column :show-overflow-tooltip="true" prop="jobName" label="任务名称"/> <el-table-column :show-overflow-tooltip="true" prop="jobName" label="任务名称"/>
<el-table-column :show-overflow-tooltip="true" prop="beanName" label="Bean名称"/> <el-table-column :show-overflow-tooltip="true" prop="beanName" label="Bean名称"/>
<el-table-column :show-overflow-tooltip="true" prop="methodName" label="执行方法"/> <el-table-column :show-overflow-tooltip="true" prop="methodName" label="执行方法"/>
......
<template> <template>
<div class="app-container"> <div class="app-container">
<div id="content-main" style="width:600px;"> <el-row :gutter="20">
<el-card shadow="never" class="box-card user-info"> <el-col :xs="24" :sm="24" :md="8" :lg="6" :xl="5">
<div class="avatar-content"> <el-card class="box-card">
<el-upload <div slot="header" class="clearfix">
:show-file-list="false" <span>个人信息</span>
:on-success="handleSuccess" </div>
:on-error="handleError" <div>
:headers="headers" <div style="text-align: center">
:action="updateAvatarApi" <el-upload
class="avatar-uploader"> :show-file-list="false"
<img v-if="avatar" :src="avatar" title="点击上传头像" class="avatar"> :on-success="handleSuccess"
<i v-else class="el-icon-plus avatar-uploader-icon"/> :on-error="handleError"
</el-upload> :headers="headers"
</div> :action="updateAvatarApi"
<div class="user-info-content"> class="avatar-uploader">
<div>登录账号:{{ name }}</div> <img v-if="user.avatar" :src="user.avatar" title="点击上传头像" class="avatar">
<div>注册时间:{{ createTime }}</div> <i v-else class="el-icon-plus avatar-uploader-icon"/>
<div>账号状态:<span style="color: #909399">正常</span></div> </el-upload>
</div> </div>
</el-card> <ul class="user-info">
<li><svg-icon icon-class="user1" /> 用户名称 <div class="user-right">{{ user.username }}</div></li>
<el-card shadow="never" class="box-card reset-pass"> <li><svg-icon icon-class="phone" /> 手机号码 <div class="user-right">{{ user.phone }}</div></li>
<h4 class="account-label-icon">登录密码:</h4> <li><svg-icon icon-class="email" /> 用户邮箱 <div class="user-right">{{ user.email }}</div></li>
<updatePass/> <li><svg-icon icon-class="dept" /> 所属部门 <div class="user-right"> {{ user.dept }} / {{ user.job }}</div></li>
<p>安全性高的密码可使账号更安全,建议设置同时包含字母,数字,符号的密码。</p> <li><svg-icon icon-class="date" /> 创建日期 <div class="user-right">{{ parseTime(user.createTime) }}</div></li>
</el-card> <li>
<svg-icon icon-class="anq" /> 安全设置
<el-card shadow="never" class="box-card reset-email"> <div class="user-right">
<h4 class="account-label-icon">邮箱验证:</h4> <a @click="$refs.pass.dialog = true">修改密码</a>
<updateEmail :email="email"/> <a @click="$refs.email.dialog = true">修改邮箱</a>
<p>你的邮箱:{{ formatEmail(email) }} </p> </div>
<h4>绑定邮箱可用于</h4> </li>
<ul> </ul>
<li>安全管理,密码重置与修改</li> </div>
<li>账号使用,使用邮箱登录系统</li> </el-card>
</ul> </el-col>
</el-card> <el-col :xs="24" :sm="24" :md="16" :lg="18" :xl="19">
</div> <el-card class="box-card">
<div slot="header" class="clearfix">
<span>操作日志</span>
<div style="display:inline-block;float: right;cursor: pointer" @click="refresh"><i :class="ico"/></div>
</div>
<log ref="log"/>
</el-card>
</el-col>
</el-row>
<updateEmail ref="email" :email="user.email"/>
<updatePass ref="pass"/>
</div> </div>
</template> </template>
...@@ -46,13 +56,16 @@ import { mapGetters } from 'vuex' ...@@ -46,13 +56,16 @@ import { mapGetters } from 'vuex'
import { regEmail } from '@/utils/index' import { regEmail } from '@/utils/index'
import updatePass from './center/updatePass' import updatePass from './center/updatePass'
import updateEmail from './center/updateEmail' import updateEmail from './center/updateEmail'
import log from './center/log'
import { getToken } from '@/utils/auth' import { getToken } from '@/utils/auth'
import store from '@/store' import store from '@/store'
import { parseTime } from '@/utils/index'
export default { export default {
name: 'Center', name: 'Center',
components: { updatePass, updateEmail }, components: { updatePass, updateEmail, log },
data() { data() {
return { return {
ico: 'el-icon-refresh',
headers: { headers: {
'Authorization': 'Bearer ' + getToken() 'Authorization': 'Bearer ' + getToken()
} }
...@@ -60,14 +73,15 @@ export default { ...@@ -60,14 +73,15 @@ export default {
}, },
computed: { computed: {
...mapGetters([ ...mapGetters([
'avatar', 'user',
'name',
'email',
'createTime',
'updateAvatarApi' 'updateAvatarApi'
]) ])
}, },
created() {
store.dispatch('GetInfo').then(() => {})
},
methods: { methods: {
parseTime,
formatEmail(mail) { formatEmail(mail) {
return regEmail(mail) return regEmail(mail)
}, },
...@@ -87,11 +101,48 @@ export default { ...@@ -87,11 +101,48 @@ export default {
type: 'error', type: 'error',
duration: 2500 duration: 2500
}) })
},
refresh() {
this.ico = 'el-icon-loading'
this.$refs.log.init()
setTimeout(() => {
this.ico = 'el-icon-refresh'
}, 300)
} }
} }
} }
</script> </script>
<style rel="stylesheet/scss" lang="scss"> <style rel="stylesheet/scss" lang="scss">
.box-card{border:0;border-bottom:1px solid #ECEDFE;border-radius:unset;h4{height:26px;margin:0 0 7px;line-height:26px;font-size:1.1rem;font-weight:500;color:#444242;display:inline-block}p{font-family:Lantinghei;font-size:90%;color:#747474}ul{padding:0;margin:7px 0 0;list-style:none;font-size:80%}li{float:left;margin:0 30px 10px 0!important}li:before{width:8px;height:8px;background-color:#52acd9;color:#52acd9;display:inline-block;border-radius:50%;margin-right:5px;content:'';box-sizing:border-box}}.user-info{height:170px}.reset-email{border-bottom:0}.avatar-content,.user-info-content{float:left}.user-info-content{font-family:Lantinghei;position:relative;font-size:14px;margin:25px;div{margin-bottom:15px}}.avatar-uploader-icon{font-size:28px;width:120px;height:120px;line-height:120px;text-align:center}.avatar{width:120px;height:120px;display:block;border-radius:50%} .avatar-uploader-icon {
font-size: 28px;
width: 120px;
height: 120px;
line-height: 120px;
text-align: center
}
.avatar {
width: 120px;
height: 120px;
display: block;
border-radius: 50%
}
.user-info {
padding-left: 0px;
list-style: none;
li{
border-bottom: 1px solid #F0F3F4;
border-top: 1px solid #F0F3F4;
padding: 11px 0px;
font-size: 13px;
}
.user-right {
float: right;
a{
color: #317EF3;
}
}
}
</style> </style>
<template>
<div>
<!--表格渲染-->
<el-table v-loading="loading" :data="data" size="small" style="width: 100%;">
<el-table-column prop="description" label="行为"/>
<el-table-column prop="requestIp" label="IP"/>
<el-table-column prop="time" label="请求耗时" align="center">
<template slot-scope="scope">
<el-tag v-if="scope.row.time <= 300">{{ scope.row.time }}ms</el-tag>
<el-tag v-else-if="scope.row.time <= 1000" type="warning">{{ scope.row.time }}ms</el-tag>
<el-tag v-else type="danger">{{ scope.row.time }}ms</el-tag>
</template>
</el-table-column>
<el-table-column prop="createTime" label="创建日期" width="180px">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.createTime) }}</span>
</template>
</el-table-column>
</el-table>
<!--分页组件-->
<el-pagination
:total="total"
style="margin-top: 8px;"
layout="total, prev, pager, next, sizes"
@size-change="sizeChange"
@current-change="pageChange"/>
</div>
</template>
<script>
import initData from '@/mixins/initData'
import { parseTime } from '@/utils/index'
export default {
mixins: [initData],
created() {
this.$nextTick(() => {
this.init()
})
},
methods: {
parseTime,
beforeInit() {
this.url = 'api/logs/user'
const sort = 'id,desc'
this.params = { page: this.page, size: this.size, sort: sort }
return true
}
}
}
</script>
<style scoped>
</style>
<template> <template>
<div style="display: inline-block"> <div style="display: inline-block;">
<el-button size="mini" class="button" type="info" @click="dialog = true">修改</el-button>
<el-dialog :visible.sync="dialog" :title="title" append-to-body width="475px" @close="cancel"> <el-dialog :visible.sync="dialog" :title="title" append-to-body width="475px" @close="cancel">
<el-form ref="form" :model="form" :rules="rules" size="small" label-width="88px"> <el-form ref="form" :model="form" :rules="rules" size="small" label-width="88px">
<el-form-item label="新邮箱" prop="email"> <el-form-item label="新邮箱" prop="email">
...@@ -24,7 +23,6 @@ ...@@ -24,7 +23,6 @@
<script> <script>
import store from '@/store' import store from '@/store'
import { md5 } from '@/utils/md5'
import { validatEmail } from '@/utils/validate' import { validatEmail } from '@/utils/validate'
import { validPass, updateEmail } from '@/api/user' import { validPass, updateEmail } from '@/api/user'
import { resetEmail } from '@/api/code' import { resetEmail } from '@/api/code'
...@@ -37,7 +35,7 @@ export default { ...@@ -37,7 +35,7 @@ export default {
}, },
data() { data() {
const validatePass = (rule, value, callback) => { const validatePass = (rule, value, callback) => {
validPass(md5(value)).then(res => { validPass(value).then(res => {
if (res.status === 200) { if (res.status === 200) {
callback() callback()
} else { } else {
...@@ -114,7 +112,7 @@ export default { ...@@ -114,7 +112,7 @@ export default {
this.$refs['form'].validate((valid) => { this.$refs['form'].validate((valid) => {
if (valid) { if (valid) {
this.loading = true this.loading = true
this.user = { email: this.form.email, password: md5(this.form.pass) } this.user = { email: this.form.email, password: this.form.pass }
updateEmail(this.form.code, this.user).then(res => { updateEmail(this.form.code, this.user).then(res => {
this.loading = false this.loading = false
this.resetForm() this.resetForm()
......
<template> <template>
<div style="display: inline-block"> <div style="display: inline-block">
<el-button size="mini" class="button" type="info" @click="dialog = true">修改</el-button>
<el-dialog :visible.sync="dialog" :title="title" append-to-body width="500px" @close="cancel"> <el-dialog :visible.sync="dialog" :title="title" append-to-body width="500px" @close="cancel">
<el-form ref="form" :model="form" :rules="rules" size="small" label-width="88px"> <el-form ref="form" :model="form" :rules="rules" size="small" label-width="88px">
<el-form-item label="旧密码" prop="oldPass"> <el-form-item label="旧密码" prop="oldPass">
...@@ -23,12 +22,11 @@ ...@@ -23,12 +22,11 @@
<script> <script>
import store from '@/store' import store from '@/store'
import { md5 } from '@/utils/md5'
import { validPass, updatePass } from '@/api/user' import { validPass, updatePass } from '@/api/user'
export default { export default {
data() { data() {
const validatePass = (rule, value, callback) => { const validatePass = (rule, value, callback) => {
validPass(md5(value)).then(res => { validPass(value).then(res => {
if (res.status === 200) { if (res.status === 200) {
callback() callback()
} else { } else {
...@@ -67,7 +65,7 @@ export default { ...@@ -67,7 +65,7 @@ export default {
this.$refs['form'].validate((valid) => { this.$refs['form'].validate((valid) => {
if (valid) { if (valid) {
this.loading = true this.loading = true
updatePass(md5(this.form.confirmPass)).then(res => { updatePass(this.form.confirmPass).then(res => {
this.resetForm() this.resetForm()
this.$notify({ this.$notify({
title: '密码修改成功,请重新登录', title: '密码修改成功,请重新登录',
......
<template> <template>
<div class="app-container"> <div class="app-container">
<eHeader :roles="roles" :query="query"/> <el-row :gutter="20">
<!--表格渲染--> <el-col :xs="24" :sm="24" :md="4" :lg="4" :xl="4">
<el-table v-loading="loading" :data="data" size="small" border style="width: 100%;"> <div class="head-container">
<el-table-column prop="username" label="用户名"/> <el-input v-model="deptName" clearable placeholder="输入部门名称搜索" prefix-icon="el-icon-search" style="width: 100%;" class="filter-item" @input="getDeptDatas"/>
<el-table-column label="头像"> </div>
<template slot-scope="scope"> <el-tree :data="depts" :props="defaultProps" :expand-on-click-node="false" default-expand-all @node-click="handleNodeClick"/>
<img :src="scope.row.avatar" class="el-avatar"> </el-col>
</template> <el-col :xs="24" :sm="24" :md="20" :lg="20" :xl="20">
</el-table-column> <eHeader :query="query" :sup_this="sup_this"/>
<el-table-column prop="email" label="邮箱"/> <!--表格渲染-->
<el-table-column label="状态"> <el-table v-loading="loading" :data="data" size="small" style="width: 100%;">
<template slot-scope="scope"> <el-table-column prop="username" label="用户名"/>
<span>{{ scope.row.enabled ? '激活':'锁定' }}</span> <el-table-column prop="phone" label="电话"/>
</template> <el-table-column :show-overflow-tooltip="true" prop="email" label="邮箱"/>
</el-table-column> <el-table-column label="部门 / 岗位">
<el-table-column prop="createTime" label="注册日期"> <template slot-scope="scope">
<template slot-scope="scope"> <div>{{ scope.row.dept.name }} / {{ scope.row.job.name }}</div>
<span>{{ parseTime(scope.row.createTime) }}</span> </template>
</template> </el-table-column>
</el-table-column> <el-table-column label="状态" align="center">
<el-table-column label="操作" width="150px" align="center"> <template slot-scope="scope">
<template slot-scope="scope"> <div v-for="item in dicts" :key="item.id">
<edit v-if="checkPermission(['ADMIN','USER_ALL','USER_EDIT'])" :data="scope.row" :roles="roles" :sup_this="sup_this"/> <el-tag v-if="scope.row.enabled.toString() === item.value" :type="scope.row.enabled ? '' : 'info'">{{ item.label }}</el-tag>
<el-popover </div>
v-if="checkPermission(['ADMIN','USER_ALL','USER_DELETE'])" </template>
:ref="scope.row.id" </el-table-column>
placement="top" <el-table-column :show-overflow-tooltip="true" prop="createTime" label="创建日期">
width="180"> <template slot-scope="scope">
<p>确定删除本条数据吗?</p> <span>{{ parseTime(scope.row.createTime) }}</span>
<div style="text-align: right; margin: 0"> </template>
<el-button size="mini" type="text" @click="$refs[scope.row.id].doClose()">取消</el-button> </el-table-column>
<el-button :loading="delLoading" type="primary" size="mini" @click="subDelete(scope.row.id)">确定</el-button> <el-table-column label="操作" width="140" align="center">
</div> <template slot-scope="scope">
<el-button slot="reference" type="danger" size="mini">删除</el-button> <edit v-if="checkPermission(['ADMIN','USER_ALL','USER_EDIT'])" :data="scope.row" :sup_this="sup_this"/>
</el-popover> <el-popover
</template> v-if="checkPermission(['ADMIN','USER_ALL','USER_DELETE'])"
</el-table-column> :ref="scope.row.id"
</el-table> placement="top"
<!--分页组件--> width="180">
<el-pagination <p>确定删除本条数据吗?</p>
:total="total" <div style="text-align: right; margin: 0">
style="margin-top: 8px;" <el-button size="mini" type="text" @click="$refs[scope.row.id].doClose()">取消</el-button>
layout="total, prev, pager, next, sizes" <el-button :loading="delLoading" type="primary" size="mini" @click="subDelete(scope.row.id)">确定</el-button>
@size-change="sizeChange" </div>
@current-change="pageChange"/> <el-button slot="reference" type="danger" size="mini">删除</el-button>
</el-popover>
</template>
</el-table-column>
</el-table>
<!--分页组件-->
<el-pagination
:total="total"
style="margin-top: 8px;"
layout="total, prev, pager, next, sizes"
@size-change="sizeChange"
@current-change="pageChange"/>
</el-col>
</el-row>
</div> </div>
</template> </template>
<script> <script>
import checkPermission from '@/utils/permission' import checkPermission from '@/utils/permission'
import initData from '@/mixins/initData' import initData from '@/mixins/initData'
import initDict from '@/mixins/initDict'
import { del } from '@/api/user' import { del } from '@/api/user'
import { getRoleTree } from '@/api/role' import { getDepts } from '@/api/dept'
import { parseTime } from '@/utils/index' import { parseTime } from '@/utils/index'
import eHeader from './module/header' import eHeader from './module/header'
import edit from './module/edit' import edit from './module/edit'
export default { export default {
components: { eHeader, edit }, components: { eHeader, edit },
mixins: [initData], mixins: [initData, initDict],
data() { data() {
return { return {
roles: [], delLoading: false, sup_this: this height: document.documentElement.clientHeight - 180 + 'px;',
delLoading: false, sup_this: this, deptName: '', depts: [], deptId: null,
defaultProps: {
children: 'children',
label: 'name'
}
} }
}, },
created() { created() {
this.getRoles() this.getDeptDatas()
console.log(this.dicts)
this.$nextTick(() => { this.$nextTick(() => {
this.init() this.init()
// 加载数据字典
this.getDict('user_status')
}) })
}, },
mounted: function() {
const that = this
window.onresize = function temp() {
that.height = document.documentElement.clientHeight - 180 + 'px;'
}
},
methods: { methods: {
parseTime, parseTime,
checkPermission, checkPermission,
...@@ -80,7 +108,7 @@ export default { ...@@ -80,7 +108,7 @@ export default {
const type = query.type const type = query.type
const value = query.value const value = query.value
const enabled = query.enabled const enabled = query.enabled
this.params = { page: this.page, size: this.size, sort: sort } this.params = { page: this.page, size: this.size, sort: sort, deptId: this.deptId }
if (type && value) { this.params[type] = value } if (type && value) { this.params[type] = value }
if (enabled !== '' && enabled !== null) { this.params['enabled'] = enabled } if (enabled !== '' && enabled !== null) { this.params['enabled'] = enabled }
return true return true
...@@ -102,15 +130,25 @@ export default { ...@@ -102,15 +130,25 @@ export default {
console.log(err.response.data.message) console.log(err.response.data.message)
}) })
}, },
getRoles() { getDeptDatas() {
getRoleTree().then(res => { const sort = 'id,desc'
this.roles = res const params = { sort: sort }
if (this.deptName) { params['name'] = this.deptName }
getDepts(params).then(res => {
this.depts = res.content
}) })
},
handleNodeClick(data) {
if (data.pid === 0) {
this.deptId = null
} else {
this.deptId = data.id
}
this.init()
} }
} }
} }
</script> </script>
<style scoped> <style scoped>
</style> </style>
<template> <template>
<div> <div>
<el-button size="mini" type="success" @click="to">编辑</el-button> <el-button size="mini" type="success" @click="to">编辑</el-button>
<eForm ref="form" :roles="roles" :sup_this="sup_this" :is-add="false"/> <eForm ref="form" :sup_this="sup_this" :is-add="false"/>
</div> </div>
</template> </template>
<script> <script>
...@@ -9,10 +9,6 @@ import eForm from './form' ...@@ -9,10 +9,6 @@ import eForm from './form'
export default { export default {
components: { eForm }, components: { eForm },
props: { props: {
roles: {
type: Array,
required: true
},
data: { data: {
type: Object, type: Object,
required: true required: true
...@@ -26,11 +22,16 @@ export default { ...@@ -26,11 +22,16 @@ export default {
methods: { methods: {
to() { to() {
const _this = this.$refs.form const _this = this.$refs.form
_this.getRoles()
_this.getDepts()
_this.roleIds = [] _this.roleIds = []
_this.form = { id: this.data.id, username: this.data.username, email: this.data.email, enabled: this.data.enabled.toString(), roles: [] } _this.form = { id: this.data.id, username: this.data.username, phone: this.data.phone, email: this.data.email, enabled: this.data.enabled.toString(), roles: [], dept: { id: this.data.dept.id }, job: { id: this.data.job.id }}
this.data.roles.forEach(function(data, index) { this.data.roles.forEach(function(data, index) {
_this.roleIds.push(data.id) _this.roleIds.push(data.id)
}) })
_this.deptId = this.data.dept.id
_this.jobId = this.data.job.id
_this.getJobs(_this.deptId)
_this.dialog = true _this.dialog = true
} }
} }
......
<template> <template>
<el-dialog :visible.sync="dialog" :title="isAdd ? '新增用户' : '编辑用户'" append-to-body width="500px"> <el-dialog :visible.sync="dialog" :title="isAdd ? '新增用户' : '编辑用户'" append-to-body width="570px">
<el-form ref="form" :model="form" :rules="rules" size="small" label-width="66px"> <el-form ref="form" :inline="true" :model="form" :rules="rules" size="small" label-width="66px">
<el-form-item label="用户名" prop="username"> <el-form-item label="用户名" prop="username">
<el-input v-model="form.username" style="width: 370px;"/> <el-input v-model="form.username"/>
</el-form-item>
<el-form-item label="状态" prop="enabled">
<el-radio v-for="item in dicts" :key="item.id" v-model="form.enabled" :label="item.value">{{ item.label }}</el-radio>
</el-form-item>
<el-form-item label="电话" prop="phone">
<el-input v-model.number="form.phone" />
</el-form-item> </el-form-item>
<el-form-item label="邮箱" prop="email"> <el-form-item label="邮箱" prop="email">
<el-input v-model="form.email" style="width: 370px;"/> <el-input v-model="form.email" />
</el-form-item> </el-form-item>
<el-form-item label="状态" prop="enabled"> <el-form-item label="部门">
<el-radio v-model="form.enabled" label="true">激活</el-radio> <treeselect v-model="deptId" :options="depts" :style="style" placeholder="选择部门" @select="selectFun" />
<el-radio v-model="form.enabled" label="false" >锁定</el-radio> </el-form-item>
<el-form-item label="岗位">
<el-select v-model="jobId" :style="style" placeholder="请先选择部门">
<el-option
v-for="(item, index) in jobs"
:key="item.name + index"
:label="item.name"
:value="item.id"/>
</el-select>
</el-form-item> </el-form-item>
<el-form-item style="margin-bottom: 0px;" label="角色"> <el-form-item style="margin-bottom: 0px;" label="角色">
<treeselect v-model="roleIds" :multiple="true" :options="roles" style="width: 370px;" placeholder="请选择角色" /> <el-select v-model="roleIds" style="width: 450px;" multiple placeholder="请选择">
<el-option
v-for="(item, index) in roles"
:key="item.name + index"
:label="item.name"
:value="item.id"/>
</el-select>
</el-form-item> </el-form-item>
</el-form> </el-form>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
...@@ -23,17 +43,18 @@ ...@@ -23,17 +43,18 @@
</template> </template>
<script> <script>
import { add, edit } from '@/api/user' import { add, edit } from '@/api/user'
import { getDepts } from '@/api/dept'
import { getAll } from '@/api/role'
import { getAllJob } from '@/api/job'
import initDict from '@/mixins/initDict'
import Treeselect from '@riophae/vue-treeselect' import Treeselect from '@riophae/vue-treeselect'
import '@riophae/vue-treeselect/dist/vue-treeselect.css' import '@riophae/vue-treeselect/dist/vue-treeselect.css'
export default { export default {
name: 'Form',
components: { Treeselect }, components: { Treeselect },
mixins: [initDict],
props: { props: {
roles: {
type: Array,
required: true
},
isAdd: { isAdd: {
type: Boolean, type: Boolean,
required: true required: true
...@@ -44,44 +65,88 @@ export default { ...@@ -44,44 +65,88 @@ export default {
} }
}, },
data() { data() {
const validPhone = (rule, value, callback) => {
if (!value) {
callback(new Error('请输入电话号码'))
} else if (!this.isvalidPhone(value)) {
callback(new Error('请输入正确的11位手机号码'))
} else {
callback()
}
}
return { return {
dialog: false, loading: false, form: { username: '', email: '', enabled: 'false', roles: [] }, roleIds: [], dialog: false, loading: false, form: { username: '', email: '', enabled: 'false', roles: [], job: { id: '' }, dept: { id: '' }, phone: null },
roleIds: [], roles: [], depts: [], deptId: null, jobId: null, jobs: [], style: 'width: 184px',
rules: { rules: {
username: [ username: [
{ required: true, message: '请输入用户名', trigger: 'blur' }, { required: true, message: '请输入用户名', trigger: 'blur' },
{ min: 3, max: 20, message: '长度在 3 到 20 个字符', trigger: 'blur' } { min: 2, max: 20, message: '长度在 2 到 20 个字符', trigger: 'blur' }
], ],
email: [ email: [
{ required: true, message: '请输入邮箱地址', trigger: 'blur' }, { required: true, message: '请输入邮箱地址', trigger: 'blur' },
{ type: 'email', message: '请输入正确的邮箱地址', trigger: 'blur' } { type: 'email', message: '请输入正确的邮箱地址', trigger: 'blur' }
], ],
phone: [
{ required: true, trigger: 'blur', validator: validPhone }
],
enabled: [ enabled: [
{ required: true, message: '状态不能为空', trigger: 'blur' } { required: true, message: '状态不能为空', trigger: 'blur' }
] ]
} }
} }
}, },
created() {
this.$nextTick(() => {
// 加载数据字典
this.getDict('user_status')
})
const explorer = navigator.userAgent
if (explorer.indexOf('Chrome') >= 0) {
this.style = 'width: 184px'
} else {
this.style = 'width: 172px'
}
},
methods: { methods: {
cancel() { cancel() {
this.resetForm() this.resetForm()
}, },
doSubmit() { doSubmit() {
this.$refs['form'].validate((valid) => { if (this.deptId === null || this.deptId === undefined) {
if (valid) { this.$message({
this.loading = true message: '部门不能为空',
this.form.roles = [] type: 'warning'
const _this = this })
this.roleIds.forEach(function(data, index) { } else if (this.jobId === null) {
const role = { id: data } this.$message({
_this.form.roles.push(role) message: '岗位不能为空',
}) type: 'warning'
if (this.isAdd) { })
this.doAdd() } else if (this.roleIds.length === 0) {
} else this.doEdit() this.$message({
} else { message: '角色不能为空',
return false type: 'warning'
} })
}) } else {
this.form.dept.id = this.deptId
this.form.job.id = this.jobId
this.$refs['form'].validate((valid) => {
if (valid) {
this.loading = true
this.form.roles = []
const _this = this
this.roleIds.forEach(function(data, index) {
const role = { id: data }
_this.form.roles.push(role)
})
if (this.isAdd) {
this.doAdd()
} else this.doEdit()
} else {
return false
}
})
}
}, },
doAdd() { doAdd() {
add(this.form).then(res => { add(this.form).then(res => {
...@@ -93,7 +158,7 @@ export default { ...@@ -93,7 +158,7 @@ export default {
duration: 2500 duration: 2500
}) })
this.loading = false this.loading = false
this.$parent.$parent.init() this.sup_this.init()
}).catch(err => { }).catch(err => {
this.loading = false this.loading = false
console.log(err.response.data.message) console.log(err.response.data.message)
...@@ -117,8 +182,36 @@ export default { ...@@ -117,8 +182,36 @@ export default {
resetForm() { resetForm() {
this.dialog = false this.dialog = false
this.$refs['form'].resetFields() this.$refs['form'].resetFields()
this.deptId = null
this.jobId = null
this.roleIds = [] this.roleIds = []
this.form = { username: '', email: '', enabled: 'false', roles: [] } this.form = { username: '', email: '', enabled: 'false', roles: [], job: { id: '' }, dept: { id: '' }, phone: null }
},
getRoles() {
getAll().then(res => {
this.roles = res
}).catch(err => {
console.log(err.response.data.message)
})
},
getJobs(id) {
getAllJob(id).then(res => {
this.jobs = res.content
}).catch(err => {
console.log(err.response.data.message)
})
},
getDepts() {
getDepts({ enabled: true }).then(res => {
this.depts = res.content
})
},
isvalidPhone(str) {
const reg = /^1[3|4|5|7|8][0-9]\d{8}$/
return reg.test(str)
},
selectFun(node, instanceId) {
this.getJobs(node.id)
} }
} }
} }
......
...@@ -17,8 +17,8 @@ ...@@ -17,8 +17,8 @@
size="mini" size="mini"
type="primary" type="primary"
icon="el-icon-plus" icon="el-icon-plus"
@click="$refs.form.dialog = true">新增</el-button> @click="add">新增</el-button>
<eForm ref="form" :roles="roles" :is-add="true"/> <eForm ref="form" :sup_this="sup_this" :is-add="true"/>
</div> </div>
<!-- 导出 --> <!-- 导出 -->
<el-button <el-button
...@@ -40,11 +40,11 @@ import eForm from './form' ...@@ -40,11 +40,11 @@ import eForm from './form'
export default { export default {
components: { eForm }, components: { eForm },
props: { props: {
roles: { query: {
type: Array, type: Object,
required: true required: true
}, },
query: { sup_this: {
type: Object, type: Object,
required: true required: true
} }
...@@ -64,10 +64,15 @@ export default { ...@@ -64,10 +64,15 @@ export default {
}, },
methods: { methods: {
checkPermission, checkPermission,
add() {
this.$refs.form.getDepts()
this.$refs.form.getRoles()
this.$refs.form.dialog = true
},
// 去查询 // 去查询
toQuery() { toQuery() {
this.$parent.page = 0 this.sup_this.page = 0
this.$parent.init() this.sup_this.init()
}, },
// 导出 // 导出
download() { download() {
......
...@@ -2,12 +2,12 @@ ...@@ -2,12 +2,12 @@
<div class="app-container"> <div class="app-container">
<eHeader :query="query"/> <eHeader :query="query"/>
<!--表格渲染--> <!--表格渲染-->
<el-table v-loading="loading" :data="data" size="small" border style="width: 100%;"> <el-table v-loading="loading" :data="data" size="small" style="width: 100%;">
<el-table-column prop="filename" label="文件名"/> <el-table-column prop="filename" label="文件名"/>
<el-table-column prop="username" label="上传者"/> <el-table-column prop="username" label="上传者"/>
<el-table-column :show-overflow-tooltip="true" prop="url" label="链接地址"> <el-table-column :show-overflow-tooltip="true" prop="url" label="缩略图">
<template slot-scope="scope"> <template slot-scope="scope">
<a :href="scope.row.url" style="color: #42b983" target="_blank">{{ scope.row.url }}</a> <a :href="scope.row.url" style="color: #42b983" target="_blank"><img :src="scope.row.url" alt="点击打开" class="el-avatar"></a>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="size" label="文件大小"/> <el-table-column prop="size" label="文件大小"/>
......
...@@ -2,11 +2,10 @@ ...@@ -2,11 +2,10 @@
<div> <div>
<blockquote class="my-blockquote">注意</blockquote> <blockquote class="my-blockquote">注意</blockquote>
<pre class="my-code"> <pre class="my-code">
1、尽量使用英文文件名进行上传,中文文件名在私有空间下下载会出现问题 1、配置时外链域名需带上协议,也就是必须http/https开头
2、配置时外链域名需带上协议,也就是必须http/https开头 2、如果七牛云中存在数据,使用同步按钮即可将数据同步到数据库
3、如果七牛云中存在数据,使用同步按钮即可将数据同步到数据库 3、本次集成了七牛云的常用操作,如:上传,下载,删除,同步,支持私有空间上传下载
4、本次集成了七牛云的常用操作,如:上传,下载,删除,同步,支持私有空间上传下载 4、项目中配置存入数据库,如需测试,请使用临时空间进行测试,测试完成及时修改配置,反正数据泄露</pre>
5、项目中配置存入数据库,如需测试,请使用临时空间进行测试,测试完成及时修改配置,反正数据泄露</pre>
<blockquote class="my-blockquote"> 开始使用</blockquote> <blockquote class="my-blockquote"> 开始使用</blockquote>
<pre class="my-code"> <pre class="my-code">
#引入依赖 #引入依赖
......
...@@ -2,17 +2,21 @@ ...@@ -2,17 +2,21 @@
<div class="app-container"> <div class="app-container">
<eHeader :query="query"/> <eHeader :query="query"/>
<!--表格渲染--> <!--表格渲染-->
<el-table v-loading="loading" :data="data" size="small" border style="width: 100%;"> <el-table v-loading="loading" :data="data" size="small" style="width: 100%;">
<el-table-column :show-overflow-tooltip="true" prop="key" label="文件名"/> <el-table-column :show-overflow-tooltip="true" label="文件名">
<el-table-column prop="bucket" label="空间名称"/> <template slot-scope="scope">
<el-table-column :show-overflow-tooltip="true" prop="url" label="地址/私有空间需下载访问"> <span>{{ scope.row.key }}</span>
</template>
</el-table-column>
<el-table-column :show-overflow-tooltip="true" label="文件类型">
<template slot-scope="scope"> <template slot-scope="scope">
<a :href="scope.row.url" style="color: #42b983" target="_blank">{{ scope.row.url }}</a> <span>{{ getExtensionName(scope.row.key) }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="bucket" label="空间名称"/>
<el-table-column prop="size" label="文件大小"/> <el-table-column prop="size" label="文件大小"/>
<el-table-column prop="type" label="空间类型"/> <el-table-column prop="type" label="空间类型"/>
<el-table-column width="180px" prop="updateTime" label="更新日期"> <el-table-column width="180px" prop="updateTime" label="创建日期">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ parseTime(scope.row.updateTime) }}</span> <span>{{ parseTime(scope.row.updateTime) }}</span>
</template> </template>
...@@ -116,11 +120,18 @@ export default { ...@@ -116,11 +120,18 @@ export default {
this.newWin = window.open() this.newWin = window.open()
download(id).then(res => { download(id).then(res => {
this.downloadLoading = false this.downloadLoading = false
this.url = res this.url = res.url
}).catch(err => { }).catch(err => {
this.downloadLoading = false this.downloadLoading = false
console.log(err.response.data.message) console.log(err.response.data.message)
}) })
},
getExtensionName(name) {
const dot = name.lastIndexOf('.')
if ((dot > -1) && (dot < (name.length - 1))) {
return name.substring(dot + 1)
}
return name
} }
} }
} }
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
class="upload-demo" class="upload-demo"
multiple> multiple>
<el-button size="small" type="primary">点击上传</el-button> <el-button size="small" type="primary">点击上传</el-button>
<div slot="tip" style="display: block;" class="el-upload__tip">请勿上传违法文件,且文件不超过5M</div> <div slot="tip" style="display: block;" class="el-upload__tip">请勿上传违法文件,且文件不超过15M</div>
</el-upload> </el-upload>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button type="primary" @click="doSubmit">确认</el-button> <el-button type="primary" @click="doSubmit">确认</el-button>
......
<template>
<elFrame :src="swaggerApi"/>
</template>
<script>
import { mapGetters } from 'vuex'
import elFrame from '@/components/iframe/index'
export default {
components: { elFrame },
computed: {
...mapGetters([
'swaggerApi'
])
}
}
</script>
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