1.7版本发布,详情查看版本说明
@@ -1,5 +1,5 @@
|
||||
'use strict'
|
||||
module.exports = {
|
||||
NODE_ENV: '"production"',
|
||||
BASE_API: '"http://api.auauz.net"'
|
||||
BASE_API: '"https://api.auauz.net"'
|
||||
}
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1.0">
|
||||
<title>el-admin</title>
|
||||
</head>
|
||||
<body>
|
||||
<div id="app"></div>
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"axios": "0.18.0",
|
||||
"element-ui": "^2.6.1",
|
||||
"element-ui": "2.4.6",
|
||||
"connect": "3.6.6",
|
||||
"js-cookie": "2.2.0",
|
||||
"normalize.css": "7.0.0",
|
||||
|
||||
32
src/api/dept.js
Normal file
@@ -0,0 +1,32 @@
|
||||
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
|
||||
})
|
||||
}
|
||||
24
src/api/dict.js
Normal file
@@ -0,0 +1,24 @@
|
||||
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
|
||||
})
|
||||
}
|
||||
37
src/api/dictDetail.js
Normal file
@@ -0,0 +1,37 @@
|
||||
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
|
||||
})
|
||||
}
|
||||
37
src/api/job.js
Normal file
@@ -0,0 +1,37 @@
|
||||
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
|
||||
})
|
||||
}
|
||||
@@ -1,9 +1,9 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 获取所有的Role
|
||||
export function getRoleTree() {
|
||||
export function getAll() {
|
||||
return request({
|
||||
url: 'api/roles/tree',
|
||||
url: 'api/roles/all',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
@@ -32,6 +32,9 @@ export default {
|
||||
if (value !== editorValue) {
|
||||
this.editor.setValue(this.value)
|
||||
}
|
||||
},
|
||||
height(value) {
|
||||
this.editor.setSize('auto', this.height)
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
|
||||
30
src/components/iframe/index.vue
Normal file
@@ -0,0 +1,30 @@
|
||||
<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>
|
||||
83
src/components/placard/index.vue
Normal file
@@ -0,0 +1,83 @@
|
||||
<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>
|
||||
26
src/config/index.js
Normal file
@@ -0,0 +1,26 @@
|
||||
/**
|
||||
* @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
|
||||
}
|
||||
1
src/icons/svg/Steve-Jobs.svg
Normal file
|
After Width: | Height: | Size: 6.2 KiB |
1
src/icons/svg/anq.svg
Normal file
@@ -0,0 +1 @@
|
||||
<?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>
|
||||
|
After Width: | Height: | Size: 2.7 KiB |
1
src/icons/svg/date.svg
Normal file
@@ -0,0 +1 @@
|
||||
<?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>
|
||||
|
After Width: | Height: | Size: 2.6 KiB |
1
src/icons/svg/dept.svg
Normal file
|
After Width: | Height: | Size: 4.5 KiB |
1
src/icons/svg/dictionary.svg
Normal file
@@ -0,0 +1 @@
|
||||
<?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>
|
||||
|
After Width: | Height: | Size: 1.3 KiB |
@@ -1 +1 @@
|
||||
<?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>
|
||||
|
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 1.9 KiB |
1
src/icons/svg/gonggao.svg
Normal file
@@ -0,0 +1 @@
|
||||
<?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>
|
||||
|
After Width: | Height: | Size: 1.2 KiB |
1
src/icons/svg/phone.svg
Normal file
@@ -0,0 +1 @@
|
||||
<?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>
|
||||
|
After Width: | Height: | Size: 2.7 KiB |
1
src/icons/svg/swagger.svg
Normal file
@@ -0,0 +1 @@
|
||||
<?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>
|
||||
|
After Width: | Height: | Size: 2.6 KiB |
1
src/icons/svg/sys-tools.svg
Normal file
@@ -0,0 +1 @@
|
||||
<?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>
|
||||
|
After Width: | Height: | Size: 2.6 KiB |
1
src/icons/svg/user1.svg
Normal file
@@ -0,0 +1 @@
|
||||
<?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>
|
||||
|
After Width: | Height: | Size: 883 B |
21
src/mixins/initDict.js
Normal file
@@ -0,0 +1,21 @@
|
||||
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)
|
||||
})
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,6 @@
|
||||
import router from './router'
|
||||
import store from './store'
|
||||
import Config from '@/config'
|
||||
import NProgress from 'nprogress' // progress bar
|
||||
import 'nprogress/nprogress.css'// progress bar style
|
||||
import { getToken } from '@/utils/auth' // getToken from cookie
|
||||
@@ -12,7 +13,7 @@ const whiteList = ['/login']// no redirect whitelist
|
||||
|
||||
router.beforeEach((to, from, next) => {
|
||||
if (to.meta.title) {
|
||||
document.title = to.meta.title + ' - eladmin'
|
||||
document.title = to.meta.title + ' - ' + Config.webName
|
||||
}
|
||||
NProgress.start() // start progress bar
|
||||
if (getToken()) {
|
||||
|
||||
@@ -2,19 +2,18 @@ const getters = {
|
||||
sidebar: state => state.app.sidebar,
|
||||
device: state => state.app.device,
|
||||
token: state => state.user.token,
|
||||
avatar: state => state.user.avatar,
|
||||
visitedViews: state => state.tagsView.visitedViews,
|
||||
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,
|
||||
user: state => state.user.user,
|
||||
loadMenus: state => state.user.loadMenus,
|
||||
permission_routers: state => state.permission.routers,
|
||||
addRouters: state => state.permission.addRouters,
|
||||
socketApi: state => state.api.socketApi,
|
||||
imagesUploadApi: state => state.api.imagesUploadApi,
|
||||
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
|
||||
|
||||
@@ -8,7 +8,11 @@ const api = {
|
||||
// 修改头像
|
||||
updateAvatarApi: baseUrl + '/api/users/updateAvatar',
|
||||
// 上传文件到七牛云
|
||||
qiNiuUploadApi: baseUrl + '/api/qiNiuContent'
|
||||
qiNiuUploadApi: baseUrl + '/api/qiNiuContent',
|
||||
// Sql 监控
|
||||
sqlApi: baseUrl + '/druid',
|
||||
// swagger
|
||||
swaggerApi: baseUrl + '/swagger-ui.html'
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,14 +1,10 @@
|
||||
import { login, getInfo } from '@/api/login'
|
||||
import { getToken, setToken, removeToken } from '@/utils/auth'
|
||||
import { parseTime } from '@/utils/index'
|
||||
|
||||
const user = {
|
||||
state: {
|
||||
token: getToken(),
|
||||
name: '',
|
||||
email: '',
|
||||
avatar: '',
|
||||
createTime: '',
|
||||
user: {},
|
||||
roles: [],
|
||||
// 第一次加载菜单时用到
|
||||
loadMenus: false
|
||||
@@ -18,21 +14,12 @@ const user = {
|
||||
SET_TOKEN: (state, token) => {
|
||||
state.token = token
|
||||
},
|
||||
SET_NAME: (state, name) => {
|
||||
state.name = name
|
||||
},
|
||||
SET_AVATAR: (state, avatar) => {
|
||||
state.avatar = avatar
|
||||
SET_USER: (state, user) => {
|
||||
state.user = user
|
||||
},
|
||||
SET_ROLES: (state, roles) => {
|
||||
state.roles = roles
|
||||
},
|
||||
SET_CREATE_TIME: (state, createTime) => {
|
||||
state.createTime = createTime
|
||||
},
|
||||
SET_EMAIL: (state, email) => {
|
||||
state.email = email
|
||||
},
|
||||
SET_LOAD_MENUS: (state, loadMenus) => {
|
||||
state.loadMenus = loadMenus
|
||||
}
|
||||
@@ -95,10 +82,7 @@ export const setUserInfo = (res, commit) => {
|
||||
} else {
|
||||
commit('SET_ROLES', res.roles)
|
||||
}
|
||||
commit('SET_NAME', res.username)
|
||||
commit('SET_AVATAR', res.avatar)
|
||||
commit('SET_EMAIL', res.email)
|
||||
commit('SET_CREATE_TIME', parseTime(res.createTime))
|
||||
commit('SET_USER', res)
|
||||
}
|
||||
|
||||
export default user
|
||||
|
||||
@@ -87,7 +87,7 @@ a:hover {
|
||||
|
||||
//main-container全局样式
|
||||
.app-main{
|
||||
min-height: 100%
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.app-container {
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import Cookies from 'js-cookie'
|
||||
import Config from '@/config'
|
||||
|
||||
const TokenKey = 'Admin-Token'
|
||||
const TokenKey = Config.TokenKey
|
||||
|
||||
export function getToken() {
|
||||
return Cookies.get(TokenKey)
|
||||
@@ -8,7 +9,7 @@ export function getToken() {
|
||||
|
||||
export function setToken(token, rememberMe) {
|
||||
if (rememberMe) {
|
||||
return Cookies.set(TokenKey, token, { expires: 1 })
|
||||
return Cookies.set(TokenKey, token, { expires: Config.tokenCookieExpires })
|
||||
} else return Cookies.set(TokenKey, token)
|
||||
}
|
||||
|
||||
|
||||
178
src/utils/md5.js
@@ -1,178 +0,0 @@
|
||||
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) {
|
||||
if (value && value instanceof Array && value.length > 0) {
|
||||
const roles = store.getters && store.getters.roles
|
||||
const permissionRoles = value
|
||||
|
||||
const hasPermission = roles.some(role => {
|
||||
return permissionRoles.includes(role)
|
||||
})
|
||||
|
||||
@@ -3,11 +3,12 @@ import router from '@/router'
|
||||
import { Notification, MessageBox } from 'element-ui'
|
||||
import store from '../store'
|
||||
import { getToken } from '@/utils/auth'
|
||||
import Config from '@/config'
|
||||
|
||||
// 创建axios实例
|
||||
const service = axios.create({
|
||||
baseURL: process.env.BASE_API, // api 的 base_url
|
||||
timeout: 900000 // 请求超时时间
|
||||
timeout: Config.timeout // 请求超时时间
|
||||
})
|
||||
|
||||
// request拦截器
|
||||
|
||||
@@ -29,6 +29,10 @@ export default {
|
||||
},
|
||||
mounted() {
|
||||
this.$refs.md.$refs.toolbar_left.img_file = []
|
||||
const that = this
|
||||
window.onresize = function temp() {
|
||||
that.height = document.documentElement.clientHeight - 200 + 'px'
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
imgAdd(pos, $file) {
|
||||
|
||||
@@ -192,6 +192,12 @@ export default {
|
||||
'\n' +
|
||||
'# application:\n'
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
const that = this
|
||||
window.onresize = function temp() {
|
||||
that.height = document.documentElement.clientHeight - 210 + 'px'
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<div class="app-container">
|
||||
<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">
|
||||
<template slot-scope="scope">
|
||||
<div>{{ scope.$index + 1 }}</div>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<div>
|
||||
<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-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">
|
||||
<template slot-scope="scope">
|
||||
<div>{{ scope.$index + 1 }}</div>
|
||||
|
||||
@@ -4,6 +4,11 @@
|
||||
<breadcrumb class="breadcrumb-container"/>
|
||||
|
||||
<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'">
|
||||
<el-tooltip content="全屏" effect="dark" placement="bottom">
|
||||
<screenfull class="screenfull right-menu-item"/>
|
||||
@@ -12,7 +17,7 @@
|
||||
|
||||
<el-dropdown class="avatar-container right-menu-item" trigger="click">
|
||||
<div class="avatar-wrapper">
|
||||
<img :src="avatar" class="user-avatar">
|
||||
<img :src="user.avatar" class="user-avatar">
|
||||
<i class="el-icon-caret-bottom"/>
|
||||
</div>
|
||||
<el-dropdown-menu slot="dropdown">
|
||||
@@ -40,17 +45,19 @@ import { mapGetters } from 'vuex'
|
||||
import Breadcrumb from '@/components/Breadcrumb'
|
||||
import Hamburger from '@/components/Hamburger'
|
||||
import Screenfull from '@/components/Screenfull'
|
||||
import Placard from '@/components/placard'
|
||||
|
||||
export default {
|
||||
components: {
|
||||
Breadcrumb,
|
||||
Hamburger,
|
||||
Placard,
|
||||
Screenfull
|
||||
},
|
||||
computed: {
|
||||
...mapGetters([
|
||||
'sidebar',
|
||||
'avatar',
|
||||
'user',
|
||||
'device'
|
||||
])
|
||||
},
|
||||
|
||||
@@ -25,13 +25,12 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { md5 } from '@/utils/md5'
|
||||
import Config from '@/config'
|
||||
import Cookies from 'js-cookie'
|
||||
export default {
|
||||
name: 'Login',
|
||||
data() {
|
||||
return {
|
||||
md5Pwd: '',
|
||||
loginForm: {
|
||||
username: '',
|
||||
password: '',
|
||||
@@ -59,27 +58,25 @@ export default {
|
||||
methods: {
|
||||
getCookie() {
|
||||
const username = Cookies.get('username')
|
||||
const password = Cookies.get('password')
|
||||
let password = Cookies.get('password')
|
||||
const rememberMe = Cookies.get('rememberMe')
|
||||
// 保存cookie里面的加密后的密码
|
||||
this.md5Pwd = password === undefined ? '' : password
|
||||
password = password === undefined ? '' : password
|
||||
this.loginForm = {
|
||||
username: username === undefined ? '' : username,
|
||||
password: this.md5Pwd,
|
||||
password: password,
|
||||
rememberMe: rememberMe === undefined ? false : Boolean(rememberMe)
|
||||
}
|
||||
},
|
||||
handleLogin() {
|
||||
this.$refs.loginForm.validate(valid => {
|
||||
let pass = this.loginForm.password
|
||||
if (pass !== this.md5Pwd) { pass = md5(pass) }
|
||||
const user = { username: this.loginForm.username, password: pass, rememberMe: this.loginForm.rememberMe }
|
||||
const user = this.loginForm
|
||||
if (valid) {
|
||||
this.loading = true
|
||||
if (user.rememberMe) {
|
||||
Cookies.set('username', user.username, { expires: 1 })
|
||||
Cookies.set('password', user.password, { expires: 1 })
|
||||
Cookies.set('rememberMe', user.rememberMe, { expires: 1 })
|
||||
Cookies.set('username', user.username, { expires: Config.passCookieExpires })
|
||||
Cookies.set('password', user.password, { expires: Config.passCookieExpires })
|
||||
Cookies.set('rememberMe', user.rememberMe, { expires: Config.passCookieExpires })
|
||||
} else {
|
||||
Cookies.remove('username')
|
||||
Cookies.remove('password')
|
||||
@@ -106,11 +103,12 @@ export default {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
background-image:url( https://aurora-1255840532.cos.ap-chengdu.myqcloud.com/1547428971990.jpg);
|
||||
height: 100%;
|
||||
background-image:url( https://aurora-1255840532.cos.ap-chengdu.myqcloud.com/1547428971990.jpg);
|
||||
background-size: cover;
|
||||
}
|
||||
.title {
|
||||
margin: 0px auto 40px auto;
|
||||
margin: 0px auto 30px auto;
|
||||
text-align: center;
|
||||
color: #707070;
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<div class="app-container">
|
||||
<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="requestIp" label="IP"/>
|
||||
<el-table-column prop="description" label="描述"/>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<div class="app-container">
|
||||
<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="requestIp" label="IP"/>
|
||||
<el-table-column prop="description" label="描述"/>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<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-button type="info" size="mini" circle @click="doLock"><svg-icon :icon-class="ico"/></el-button>
|
||||
</el-tooltip>
|
||||
@@ -55,6 +55,10 @@ export default {
|
||||
},
|
||||
mounted: function() {
|
||||
this.initWebSocket()
|
||||
const that = this
|
||||
window.onresize = function temp() {
|
||||
that.height = document.documentElement.clientHeight - 94.5 + 'px;'
|
||||
}
|
||||
},
|
||||
beforeDestroy: function() {
|
||||
// 页面离开时断开连接,清除定时器
|
||||
@@ -65,15 +69,6 @@ export default {
|
||||
parseTime,
|
||||
initWebSocket() {
|
||||
this.connection(this)
|
||||
// 断开重连机制,尝试发送消息,捕获异常发生时重连
|
||||
this.timer = window.setInterval(() => {
|
||||
try {
|
||||
this.stompClient.send('test')
|
||||
} catch (err) {
|
||||
console.log('断线了: ' + err)
|
||||
this.connection()
|
||||
}
|
||||
}, 5000)
|
||||
},
|
||||
connection(_this) {
|
||||
const socket = new SockJS(this.socketApi)// 连接服务端提供的通信接口,连接以后才可以订阅广播消息和个人消息
|
||||
|
||||
@@ -2,19 +2,13 @@
|
||||
<div class="app-container">
|
||||
<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">
|
||||
<template slot-scope="scope">
|
||||
<div>{{ scope.$index + 1 }}</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column 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 :show-overflow-tooltip="true" prop="key" label="KEY"/>
|
||||
<el-table-column prop="value" label="VALUE">
|
||||
<template slot-scope="scope">
|
||||
<div style="word-break:keep-all;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;">
|
||||
|
||||
15
src/views/monitor/sql/index.vue
Normal file
@@ -0,0 +1,15 @@
|
||||
<template>
|
||||
<elFrame :src="sqlApi"/>
|
||||
</template>
|
||||
<script>
|
||||
import { mapGetters } from 'vuex'
|
||||
import elFrame from '@/components/iframe/index'
|
||||
export default {
|
||||
components: { elFrame },
|
||||
computed: {
|
||||
...mapGetters([
|
||||
'sqlApi'
|
||||
])
|
||||
}
|
||||
}
|
||||
</script>
|
||||
106
src/views/system/dept/index.vue
Normal file
@@ -0,0 +1,106 @@
|
||||
<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>
|
||||
43
src/views/system/dept/module/edit.vue
Normal file
@@ -0,0 +1,43 @@
|
||||
<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>
|
||||
126
src/views/system/dept/module/form.vue
Normal file
@@ -0,0 +1,126 @@
|
||||
<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>
|
||||
54
src/views/system/dept/module/header.vue
Normal file
@@ -0,0 +1,54 @@
|
||||
<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>
|
||||
139
src/views/system/dict/index.vue
Normal file
@@ -0,0 +1,139 @@
|
||||
<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>
|
||||
40
src/views/system/dict/module/edit.vue
Normal file
@@ -0,0 +1,40 @@
|
||||
<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>
|
||||