1
23
src/App.vue
Normal file
@ -0,0 +1,23 @@
|
||||
<template>
|
||||
<div id="app">
|
||||
<router-view />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'App'
|
||||
}
|
||||
</script>
|
||||
<script>
|
||||
// 声明: 百度统计统计相关下载使用量无别的用途
|
||||
// 可自行删除
|
||||
var _hmt = _hmt || [];
|
||||
(function() {
|
||||
var hm = document.createElement("script");
|
||||
hm.src = "https://hm.baidu.com/hm.js?1d2d61263f13e4b288c8da19ad3ff56d";
|
||||
var s = document.getElementsByTagName("script")[0];
|
||||
s.parentNode.insertBefore(hm, s);
|
||||
})();
|
||||
</script>
|
||||
|
||||
62
src/api/admin/dict/data.js
Normal file
@ -0,0 +1,62 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询字典数据列表
|
||||
export function listData(query) {
|
||||
return request({
|
||||
url: '/api/v1/dict/data?dictType=' + query.dictType,
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询字典数据详细
|
||||
export function getData(dictCode) {
|
||||
return request({
|
||||
url: '/api/v1/dict/data/' + dictCode,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 根据字典类型查询字典数据信息
|
||||
export function getDicts(dictType) {
|
||||
return request({
|
||||
url: '/api/v1/dict-data/option-select?dictType=' + dictType,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增字典数据
|
||||
export function addData(data) {
|
||||
return request({
|
||||
url: '/api/v1/dict/data',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改字典数据
|
||||
export function updateData(data) {
|
||||
return request({
|
||||
url: '/api/v1/dict/data/' + data.dictCode,
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除字典数据
|
||||
export function delData(dictCode) {
|
||||
return request({
|
||||
url: '/api/v1/dict/data',
|
||||
method: 'delete',
|
||||
data: dictCode
|
||||
})
|
||||
}
|
||||
|
||||
// 导出字典数据
|
||||
export function exportData(query) {
|
||||
return request({
|
||||
url: '/api/v1/dict/data/export',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
62
src/api/admin/dict/type.js
Normal file
@ -0,0 +1,62 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询字典类型列表
|
||||
export function listType(query) {
|
||||
return request({
|
||||
url: '/api/v1/dict/type',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询字典类型详细
|
||||
export function getType(dictId) {
|
||||
return request({
|
||||
url: '/api/v1/dict/type/' + dictId,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增字典类型
|
||||
export function addType(data) {
|
||||
return request({
|
||||
url: '/api/v1/dict/type',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改字典类型
|
||||
export function updateType(data) {
|
||||
return request({
|
||||
url: '/api/v1/dict/type/' + data.id,
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除字典类型
|
||||
export function delType(dictId) {
|
||||
return request({
|
||||
url: '/api/v1/dict/type',
|
||||
method: 'delete',
|
||||
data: dictId
|
||||
})
|
||||
}
|
||||
|
||||
// 导出字典类型
|
||||
export function exportType(query) {
|
||||
return request({
|
||||
url: '/api/v1/dict/type/export',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 获取字典选择框列表
|
||||
export function optionselect() {
|
||||
return request({
|
||||
url: '/api/v1/dict/type-option-select',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
46
src/api/admin/sys-api.js
Normal file
@ -0,0 +1,46 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询SysApi列表
|
||||
export function listSysApi(query) {
|
||||
return request({
|
||||
url: '/api/v1/sys-api',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询SysApi详细
|
||||
export function getSysApi(id) {
|
||||
return request({
|
||||
url: '/api/v1/sys-api/' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增SysApi
|
||||
export function addSysApi(data) {
|
||||
return request({
|
||||
url: '/api/v1/sys-api',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改SysApi
|
||||
export function updateSysApi(data) {
|
||||
return request({
|
||||
url: '/api/v1/sys-api/' + data.id,
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除SysApi
|
||||
export function delSysApi(data) {
|
||||
return request({
|
||||
url: '/api/v1/sys-api',
|
||||
method: 'delete',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
68
src/api/admin/sys-config.js
Normal file
@ -0,0 +1,68 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询参数列表
|
||||
export function listConfig(query) {
|
||||
return request({
|
||||
url: '/api/v1/config',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询参数详细
|
||||
export function getConfig(configId) {
|
||||
return request({
|
||||
url: '/api/v1/config/' + configId,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 根据参数键名查询参数值
|
||||
export function getConfigKey(configKey) {
|
||||
return request({
|
||||
url: '/api/v1/configKey/' + configKey,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增参数配置
|
||||
export function addConfig(data) {
|
||||
return request({
|
||||
url: '/api/v1/config',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改参数配置
|
||||
export function updateConfig(data) {
|
||||
return request({
|
||||
url: '/api/v1/config/' + data.id,
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除参数配置
|
||||
export function delConfig(data) {
|
||||
return request({
|
||||
url: '/api/v1/config',
|
||||
method: 'delete',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
export function getSetConfig(query) {
|
||||
return request({
|
||||
url: '/api/v1/set-config',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
export function updateSetConfig(data) {
|
||||
return request({
|
||||
url: '/api/v1/set-config',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
60
src/api/admin/sys-dept.js
Normal file
@ -0,0 +1,60 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
export function getDeptList(query) {
|
||||
return request({
|
||||
url: '/api/v1/dept',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询部门详细
|
||||
export function getDept(deptId) {
|
||||
return request({
|
||||
url: '/api/v1/dept/' + deptId,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 查询部门下拉树结构
|
||||
export function treeselect() {
|
||||
return request({
|
||||
url: '/api/v1/deptTree',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 根据角色ID查询部门树结构
|
||||
export function roleDeptTreeselect(roleId) {
|
||||
return request({
|
||||
url: '/api/v1/roleDeptTreeselect/' + roleId,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增部门
|
||||
export function addDept(data) {
|
||||
return request({
|
||||
url: '/api/v1/dept',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改部门
|
||||
export function updateDept(data, id) {
|
||||
return request({
|
||||
url: '/api/v1/dept/' + id,
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除部门
|
||||
export function delDept(data) {
|
||||
return request({
|
||||
url: '/api/v1/dept',
|
||||
method: 'delete',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
28
src/api/admin/sys-login-log.js
Normal file
@ -0,0 +1,28 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询SysLoginlog列表
|
||||
export function listSysLoginlog(query) {
|
||||
return request({
|
||||
url: '/api/v1/sys-login-log',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询SysLoginlog详细
|
||||
export function getSysLoginlog(ID) {
|
||||
return request({
|
||||
url: '/api/v1/sys-login-log/' + ID,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 删除SysLoginlog
|
||||
export function delSysLoginlog(data) {
|
||||
return request({
|
||||
url: '/api/v1/sys-login-log',
|
||||
method: 'delete',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
61
src/api/admin/sys-menu.js
Normal file
@ -0,0 +1,61 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询菜单列表
|
||||
export function listMenu(query) {
|
||||
return request({
|
||||
url: '/api/v1/menu',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询菜单详细
|
||||
export function getMenu(menuId) {
|
||||
return request({
|
||||
url: '/api/v1/menu/' + menuId,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 查询菜单下拉树结构
|
||||
// export function treeselect() {
|
||||
// return request({
|
||||
// url: '/api/v1/menuTreeselect',
|
||||
// method: 'get'
|
||||
// })
|
||||
// }
|
||||
|
||||
// 根据角色ID查询菜单下拉树结构
|
||||
export function roleMenuTreeselect(roleId) {
|
||||
return request({
|
||||
url: '/api/v1/roleMenuTreeselect/' + roleId,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增菜单
|
||||
export function addMenu(data) {
|
||||
return request({
|
||||
url: '/api/v1/menu',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改菜单
|
||||
export function updateMenu(data, id) {
|
||||
return request({
|
||||
url: '/api/v1/menu/' + id,
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除菜单
|
||||
export function delMenu(data) {
|
||||
return request({
|
||||
url: '/api/v1/menu',
|
||||
method: 'delete',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
28
src/api/admin/sys-opera-log.js
Normal file
@ -0,0 +1,28 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 清空操作日志
|
||||
export function cleanOperlog() {
|
||||
return request({
|
||||
url: '/api/v1/operlog/clean',
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
|
||||
// 查询SysOperlog列表
|
||||
export function listSysOperlog(query) {
|
||||
return request({
|
||||
url: '/api/v1/sys-opera-log',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 删除SysOperlog
|
||||
export function delSysOperlog(data) {
|
||||
return request({
|
||||
url: '/api/v1/sys-opera-log',
|
||||
method: 'delete',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
46
src/api/admin/sys-post.js
Normal file
@ -0,0 +1,46 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询岗位列表
|
||||
export function listPost(query) {
|
||||
return request({
|
||||
url: '/api/v1/post',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询岗位详细
|
||||
export function getPost(postId) {
|
||||
return request({
|
||||
url: '/api/v1/post/' + postId,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增岗位
|
||||
export function addPost(data) {
|
||||
return request({
|
||||
url: '/api/v1/post',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改岗位
|
||||
export function updatePost(data, id) {
|
||||
return request({
|
||||
url: '/api/v1/post/' + id,
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除岗位
|
||||
export function delPost(postId) {
|
||||
return request({
|
||||
url: '/api/v1/post',
|
||||
method: 'delete',
|
||||
data: postId
|
||||
})
|
||||
}
|
||||
|
||||
88
src/api/admin/sys-role.js
Normal file
@ -0,0 +1,88 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询角色列表
|
||||
export function listRole(query) {
|
||||
return request({
|
||||
url: '/api/v1/role',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询角色详细
|
||||
export function getRole(roleId) {
|
||||
return request({
|
||||
url: '/api/v1/role/' + roleId,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增角色
|
||||
export function addRole(data) {
|
||||
return request({
|
||||
url: '/api/v1/role',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改角色
|
||||
export function updateRole(data, roleId) {
|
||||
return request({
|
||||
url: '/api/v1/role/' + roleId,
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 角色数据权限
|
||||
export function dataScope(data) {
|
||||
return request({
|
||||
url: '/api/v1/roledatascope',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 角色状态修改
|
||||
export function changeRoleStatus(roleId, status) {
|
||||
const data = {
|
||||
roleId,
|
||||
status
|
||||
}
|
||||
return request({
|
||||
url: '/api/v1/role-status',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除角色
|
||||
export function delRole(roleId) {
|
||||
return request({
|
||||
url: '/api/v1/role',
|
||||
method: 'delete',
|
||||
data: roleId
|
||||
})
|
||||
}
|
||||
|
||||
export function getListrole(id) {
|
||||
return request({
|
||||
url: '/api/v1/menu/role/' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
export function getRoutes() {
|
||||
return request({
|
||||
url: '/api/v1/menurole',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// export function getMenuNames() {
|
||||
// return request({
|
||||
// url: '/api/v1/menuids',
|
||||
// method: 'get'
|
||||
// })
|
||||
// }
|
||||
135
src/api/admin/sys-user.js
Normal file
@ -0,0 +1,135 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询用户列表
|
||||
export function listUser(query) {
|
||||
return request({
|
||||
url: '/api/v1/sys-user',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询用户详细
|
||||
export function getUser(userId) {
|
||||
return request({
|
||||
url: '/api/v1/sys-user/' + userId,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
export function getUserInit() {
|
||||
return request({
|
||||
url: '/api/v1/sys-user/',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增用户
|
||||
export function addUser(data) {
|
||||
return request({
|
||||
url: '/api/v1/sys-user',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改用户
|
||||
export function updateUser(data) {
|
||||
return request({
|
||||
url: '/api/v1/sys-user',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除用户
|
||||
export function delUser(data) {
|
||||
return request({
|
||||
url: '/api/v1/sys-user',
|
||||
method: 'delete',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 导出用户
|
||||
export function exportUser(query) {
|
||||
return request({
|
||||
url: '/api/v1/sys-user/export',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 用户密码重置
|
||||
export function resetUserPwd(userId, password) {
|
||||
const data = {
|
||||
userId,
|
||||
password
|
||||
}
|
||||
return request({
|
||||
url: '/api/v1/user/pwd/reset',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 用户状态修改
|
||||
export function changeUserStatus(e) {
|
||||
const data = {
|
||||
userId: e.userId,
|
||||
status: e.status
|
||||
}
|
||||
return request({
|
||||
url: '/api/v1/user/status',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改用户个人信息
|
||||
export function updateUserProfile(data) {
|
||||
return request({
|
||||
url: '/api/v1/sys-user/profile',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 下载用户导入模板
|
||||
export function importTemplate() {
|
||||
return request({
|
||||
url: '/api/v1/sys-user/importTemplate',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 用户密码重置
|
||||
export function updateUserPwd(oldPassword, newPassword) {
|
||||
const data = {
|
||||
oldPassword,
|
||||
newPassword
|
||||
}
|
||||
return request({
|
||||
url: '/api/v1/user/pwd/set',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 用户头像上传
|
||||
export function uploadAvatar(data) {
|
||||
return request({
|
||||
url: '/api/v1/user/avatar',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 查询用户个人信息
|
||||
export function getUserProfile() {
|
||||
return request({
|
||||
url: '/api/v1/user/profile',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
62
src/api/job/sys-job.js
Normal file
@ -0,0 +1,62 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询SysJob列表
|
||||
export function listSysJob(query) {
|
||||
return request({
|
||||
url: '/api/v1/sysjob',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询SysJob详细
|
||||
export function getSysJob(jobId) {
|
||||
return request({
|
||||
url: '/api/v1/sysjob/' + jobId,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增SysJob
|
||||
export function addSysJob(data) {
|
||||
return request({
|
||||
url: '/api/v1/sysjob',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改SysJob
|
||||
export function updateSysJob(data) {
|
||||
return request({
|
||||
url: '/api/v1/sysjob',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除SysJob
|
||||
export function delSysJob(data) {
|
||||
return request({
|
||||
url: '/api/v1/sysjob',
|
||||
method: 'delete',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 移除SysJob
|
||||
export function removeJob(jobId) {
|
||||
return request({
|
||||
url: '/api/v1/job/remove/' + jobId,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 启动SysJob
|
||||
export function startJob(jobId) {
|
||||
return request({
|
||||
url: '/api/v1/job/start/' + jobId,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
17
src/api/login.js
Normal file
@ -0,0 +1,17 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 获取验证码
|
||||
export function getCodeImg() {
|
||||
return request({
|
||||
url: '/api/v1/captcha',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 查询 此接口不在验证数据权限
|
||||
export function getSetting() {
|
||||
return request({
|
||||
url: '/api/v1/app-config',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
9
src/api/monitor/server.js
Normal file
@ -0,0 +1,9 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询服务器详细
|
||||
export function getServer() {
|
||||
return request({
|
||||
url: '/api/v1/server-monitor',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
17
src/api/remote-search.js
Normal file
@ -0,0 +1,17 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
export function searchUser(name) {
|
||||
return request({
|
||||
url: '/search/user',
|
||||
method: 'get',
|
||||
params: { name }
|
||||
})
|
||||
}
|
||||
|
||||
export function transactionList(query) {
|
||||
return request({
|
||||
url: '/transaction/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
43
src/api/schedule.js
Normal file
@ -0,0 +1,43 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
export function list(data) {
|
||||
return request({
|
||||
url: 'api/v1/schedule/list',
|
||||
method: 'get',
|
||||
params: data
|
||||
})
|
||||
}
|
||||
|
||||
export function add(data) {
|
||||
return request({
|
||||
url: 'api/v1/schedule/add',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function edit(data) {
|
||||
return request({
|
||||
url: 'api/v1/schedule/update',
|
||||
method: 'put',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function getSchedule(id) {
|
||||
return request({
|
||||
url: 'api/v1/schedule/query',
|
||||
method: 'get',
|
||||
params: {
|
||||
id
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
export function deleteSchedule(data) {
|
||||
return request({
|
||||
url: 'api/v1/schedule/delete',
|
||||
method: 'delete',
|
||||
data
|
||||
})
|
||||
}
|
||||
20
src/api/table.js
Normal file
@ -0,0 +1,20 @@
|
||||
// 查询列表
|
||||
export function getItems(f, query) {
|
||||
query = query || { pageSize: 10000 }
|
||||
return f(query)
|
||||
}
|
||||
|
||||
export function setItems(response, k, v) {
|
||||
const data = []
|
||||
k = k || 'id'
|
||||
v = v || 'name'
|
||||
if (response.data && response.data.list && response.data.list.length > 0) {
|
||||
response.data.list.forEach(e => {
|
||||
data.push({
|
||||
key: e[k].toString(),
|
||||
value: e[v].toString()
|
||||
})
|
||||
})
|
||||
return data
|
||||
}
|
||||
}
|
||||
103
src/api/tools/gen.js
Normal file
@ -0,0 +1,103 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询生成表数据
|
||||
export function listTable(query) {
|
||||
return request({
|
||||
url: '/api/v1/sys/tables/page',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
// 查询db数据库列表
|
||||
export function listDbTable(query) {
|
||||
return request({
|
||||
url: '/api/v1/db/tables/page',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询表详细信息
|
||||
export function getGenTable(tableId) {
|
||||
return request({
|
||||
url: '/api/v1/sys/tables/info/' + tableId,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
export function getGenTableInfo(tablename) {
|
||||
return request({
|
||||
url: '/api/v1/sys/tables?tableName=' + tablename,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 修改代码生成信息
|
||||
export function updateGenTable(data) {
|
||||
return request({
|
||||
url: '/api/v1/sys/tables/info',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 导入表
|
||||
export function importTable(data) {
|
||||
return request({
|
||||
url: '/api/v1/sys/tables/info',
|
||||
method: 'post',
|
||||
params: data
|
||||
})
|
||||
}
|
||||
// 预览生成代码
|
||||
export function previewTable(tableId) {
|
||||
return request({
|
||||
url: '/api/v1/gen/preview/' + tableId,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
// 删除表数据
|
||||
export function delTable(tableId) {
|
||||
return request({
|
||||
url: '/api/v1/sys/tables/info/' + tableId,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
|
||||
// 生成代码到项目
|
||||
export function toProjectTable(tableId) {
|
||||
return request({
|
||||
url: '/api/v1/gen/toproject/' + tableId,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 生成接口数据到迁移脚本
|
||||
export function apiToFile(tableId) {
|
||||
return request({
|
||||
url: '/api/v1/gen/apitofile/' + tableId,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
export function toProjectTableCheckRole(tableId, ischeckrole) {
|
||||
return request({
|
||||
url: '/api/v1/gen/toproject/' + tableId + '?ischeckrole=' + ischeckrole,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 生成菜单到数据库
|
||||
export function toDBTable(tableId) {
|
||||
return request({
|
||||
url: '/api/v1/gen/todb/' + tableId,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
export function getTableTree() {
|
||||
return request({
|
||||
url: '/api/v1/gen/tabletree',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
36
src/api/user.js
Normal file
@ -0,0 +1,36 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// login 登陆
|
||||
export function login(data) {
|
||||
return request({
|
||||
url: '/api/v1/login',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// logout 退出
|
||||
export function logout() {
|
||||
return request({
|
||||
url: '/api/v1/logout',
|
||||
method: 'post'
|
||||
})
|
||||
}
|
||||
|
||||
// refreshtoken 刷新token
|
||||
export function refreshtoken(data) {
|
||||
return request({
|
||||
url: '/refreshtoken',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// getInfo 获取用户基本信息
|
||||
export function getInfo() {
|
||||
return request({
|
||||
url: '/api/v1/getinfo',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
9
src/api/ws.js
Normal file
@ -0,0 +1,9 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询SysJob列表
|
||||
export function unWsLogout(id, group) {
|
||||
return request({
|
||||
url: '/wslogout/' + id + '/' + group,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
BIN
src/assets/401_images/401.gif
Normal file
|
After Width: | Height: | Size: 160 KiB |
BIN
src/assets/404_images/404.png
Normal file
|
After Width: | Height: | Size: 96 KiB |
BIN
src/assets/404_images/404_cloud.png
Normal file
|
After Width: | Height: | Size: 4.7 KiB |
BIN
src/assets/custom-theme/fonts/element-icons.ttf
Normal file
BIN
src/assets/custom-theme/fonts/element-icons.woff
Normal file
1
src/assets/custom-theme/index.css
Normal file
39
src/assets/dark.svg
Normal file
@ -0,0 +1,39 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg width="52px" height="45px" viewBox="0 0 52 45" version="1.1"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<defs>
|
||||
<filter x="-9.4%" y="-6.2%" width="118.8%" height="122.5%" filterUnits="objectBoundingBox" id="filter-1">
|
||||
<feOffset dx="0" dy="1" in="SourceAlpha" result="shadowOffsetOuter1"></feOffset>
|
||||
<feGaussianBlur stdDeviation="1" in="shadowOffsetOuter1" result="shadowBlurOuter1"></feGaussianBlur>
|
||||
<feColorMatrix values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.15 0" type="matrix" in="shadowBlurOuter1" result="shadowMatrixOuter1"></feColorMatrix>
|
||||
<feMerge>
|
||||
<feMergeNode in="shadowMatrixOuter1"></feMergeNode>
|
||||
<feMergeNode in="SourceGraphic"></feMergeNode>
|
||||
</feMerge>
|
||||
</filter>
|
||||
<rect id="path-2" x="0" y="0" width="48" height="40" rx="4"></rect>
|
||||
<filter x="-4.2%" y="-2.5%" width="108.3%" height="110.0%" filterUnits="objectBoundingBox" id="filter-4">
|
||||
<feOffset dx="0" dy="1" in="SourceAlpha" result="shadowOffsetOuter1"></feOffset>
|
||||
<feGaussianBlur stdDeviation="0.5" in="shadowOffsetOuter1" result="shadowBlurOuter1"></feGaussianBlur>
|
||||
<feColorMatrix values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.1 0" type="matrix" in="shadowBlurOuter1"></feColorMatrix>
|
||||
</filter>
|
||||
</defs>
|
||||
<g id="配置面板" width="48" height="40" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
||||
<g id="setting-copy-2" width="48" height="40" transform="translate(-1190.000000, -136.000000)">
|
||||
<g id="Group-8" width="48" height="40" transform="translate(1167.000000, 0.000000)">
|
||||
<g id="Group-5-Copy-5" filter="url(#filter-1)" transform="translate(25.000000, 137.000000)">
|
||||
<mask id="mask-3" fill="white">
|
||||
<use xlink:href="#path-2"></use>
|
||||
</mask>
|
||||
<g id="Rectangle-18">
|
||||
<use fill="black" fill-opacity="1" filter="url(#filter-4)" xlink:href="#path-2"></use>
|
||||
<use fill="#F0F2F5" fill-rule="evenodd" xlink:href="#path-2"></use>
|
||||
</g>
|
||||
<rect id="Rectangle-11" fill="#FFFFFF" mask="url(#mask-3)" x="0" y="0" width="48" height="10"></rect>
|
||||
<rect id="Rectangle-18" fill="#303648" mask="url(#mask-3)" x="0" y="0" width="16" height="40"></rect>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 2.5 KiB |
BIN
src/assets/icons/12-01.png
Normal file
|
After Width: | Height: | Size: 5.7 KiB |
BIN
src/assets/icons/AU-01.png
Normal file
|
After Width: | Height: | Size: 4.3 KiB |
BIN
src/assets/icons/Access.png
Normal file
|
After Width: | Height: | Size: 9.3 KiB |
BIN
src/assets/icons/AndroidStudio.png
Normal file
|
After Width: | Height: | Size: 18 KiB |
BIN
src/assets/icons/Awesome.png
Normal file
|
After Width: | Height: | Size: 13 KiB |
BIN
src/assets/icons/AwesomeVue.png
Normal file
|
After Width: | Height: | Size: 18 KiB |
BIN
src/assets/icons/Clion-01-01.png
Normal file
|
After Width: | Height: | Size: 15 KiB |
BIN
src/assets/icons/Dm-01-01.png
Normal file
|
After Width: | Height: | Size: 2.3 KiB |
BIN
src/assets/icons/Edge-01.png
Normal file
|
After Width: | Height: | Size: 17 KiB |
BIN
src/assets/icons/Excel.png
Normal file
|
After Width: | Height: | Size: 5.9 KiB |
BIN
src/assets/icons/Ic-01.png
Normal file
|
After Width: | Height: | Size: 4.3 KiB |
BIN
src/assets/icons/Idea.png
Normal file
|
After Width: | Height: | Size: 13 KiB |
BIN
src/assets/icons/Link.png
Normal file
|
After Width: | Height: | Size: 5.1 KiB |
BIN
src/assets/icons/OneDrive.png
Normal file
|
After Width: | Height: | Size: 8.1 KiB |
BIN
src/assets/icons/OneNote.png
Normal file
|
After Width: | Height: | Size: 4.7 KiB |
BIN
src/assets/icons/PDFbeifen.png
Normal file
|
After Width: | Height: | Size: 5.1 KiB |
BIN
src/assets/icons/Phpstorm-01.png
Normal file
|
After Width: | Height: | Size: 14 KiB |
BIN
src/assets/icons/PictureUnknow.png
Normal file
|
After Width: | Height: | Size: 4.6 KiB |
BIN
src/assets/icons/Pictureloadingfailed.png
Normal file
|
After Width: | Height: | Size: 5.5 KiB |
BIN
src/assets/icons/Pl-01.png
Normal file
|
After Width: | Height: | Size: 3.0 KiB |
BIN
src/assets/icons/Pn-01.png
Normal file
|
After Width: | Height: | Size: 3.8 KiB |
BIN
src/assets/icons/PowerPoint.png
Normal file
|
After Width: | Height: | Size: 8.5 KiB |
BIN
src/assets/icons/PowerShell.png
Normal file
|
After Width: | Height: | Size: 12 KiB |
BIN
src/assets/icons/Pycharm.png
Normal file
|
After Width: | Height: | Size: 14 KiB |
BIN
src/assets/icons/Typora.png
Normal file
|
After Width: | Height: | Size: 10 KiB |
BIN
src/assets/icons/UTools.png
Normal file
|
After Width: | Height: | Size: 10 KiB |
BIN
src/assets/icons/Unknow.png
Normal file
|
After Width: | Height: | Size: 4.9 KiB |
BIN
src/assets/icons/Visio.png
Normal file
|
After Width: | Height: | Size: 7.7 KiB |
BIN
src/assets/icons/VisualStudio.png
Normal file
|
After Width: | Height: | Size: 15 KiB |
BIN
src/assets/icons/Web.png
Normal file
|
After Width: | Height: | Size: 7.8 KiB |
BIN
src/assets/icons/Webstorm.png
Normal file
|
After Width: | Height: | Size: 16 KiB |
BIN
src/assets/icons/Windows.png
Normal file
|
After Width: | Height: | Size: 8.1 KiB |
BIN
src/assets/icons/WindowsTerminal_PRE-01.png
Normal file
|
After Width: | Height: | Size: 6.8 KiB |
BIN
src/assets/icons/Word.png
Normal file
|
After Width: | Height: | Size: 5.6 KiB |
BIN
src/assets/icons/Wordbeifen.png
Normal file
|
After Width: | Height: | Size: 5.5 KiB |
BIN
src/assets/icons/Zip.png
Normal file
|
After Width: | Height: | Size: 4.3 KiB |
BIN
src/assets/icons/adobe-01-01-01.png
Normal file
|
After Width: | Height: | Size: 7.0 KiB |
BIN
src/assets/icons/bianxingjingang.png
Normal file
|
After Width: | Height: | Size: 24 KiB |
BIN
src/assets/icons/bianxingjingang1.png
Normal file
|
After Width: | Height: | Size: 27 KiB |
BIN
src/assets/icons/chayue2.png
Normal file
|
After Width: | Height: | Size: 6.8 KiB |
BIN
src/assets/icons/daiyue.png
Normal file
|
After Width: | Height: | Size: 10 KiB |
BIN
src/assets/icons/excelbeifen.png
Normal file
|
After Width: | Height: | Size: 5.5 KiB |
BIN
src/assets/icons/fl-01-01.png
Normal file
|
After Width: | Height: | Size: 4.2 KiB |
BIN
src/assets/icons/nasa.png
Normal file
|
After Width: | Height: | Size: 26 KiB |
BIN
src/assets/icons/pf-01.png
Normal file
|
After Width: | Height: | Size: 3.5 KiB |
BIN
src/assets/icons/picture.png
Normal file
|
After Width: | Height: | Size: 8.5 KiB |
BIN
src/assets/icons/pptbeifen.png
Normal file
|
After Width: | Height: | Size: 4.2 KiB |
BIN
src/assets/icons/rar.png
Normal file
|
After Width: | Height: | Size: 3.9 KiB |
BIN
src/assets/icons/tubiaozhizuomo3-01.png
Normal file
|
After Width: | Height: | Size: 3.6 KiB |
BIN
src/assets/icons/tubiaozhizuomoban-01.png
Normal file
|
After Width: | Height: | Size: 7.6 KiB |
BIN
src/assets/icons/tubiaozhizuomoban10-01.png
Normal file
|
After Width: | Height: | Size: 4.2 KiB |
BIN
src/assets/icons/tubiaozhizuomoban11.png
Normal file
|
After Width: | Height: | Size: 5.0 KiB |
BIN
src/assets/icons/tubiaozhizuomoban2-01-01.png
Normal file
|
After Width: | Height: | Size: 3.5 KiB |
BIN
src/assets/icons/tubiaozhizuomoban4-01.png
Normal file
|
After Width: | Height: | Size: 8.3 KiB |
BIN
src/assets/icons/tubiaozhizuomoban5-01.png
Normal file
|
After Width: | Height: | Size: 6.2 KiB |
BIN
src/assets/icons/tubiaozhizuomoban6-01.png
Normal file
|
After Width: | Height: | Size: 3.5 KiB |
BIN
src/assets/icons/tubiaozhizuomoban7-01-01.png
Normal file
|
After Width: | Height: | Size: 3.9 KiB |
BIN
src/assets/icons/tubiaozhizuomoban8-01.png
Normal file
|
After Width: | Height: | Size: 2.5 KiB |
BIN
src/assets/icons/tubiaozhizuomoban9-01.png
Normal file
|
After Width: | Height: | Size: 6.2 KiB |
BIN
src/assets/icons/txtbeifen.png
Normal file
|
After Width: | Height: | Size: 5.1 KiB |
BIN
src/assets/icons/video.png
Normal file
|
After Width: | Height: | Size: 3.8 KiB |
BIN
src/assets/icons/video2.png
Normal file
|
After Width: | Height: | Size: 5.6 KiB |
BIN
src/assets/icons/voice.png
Normal file
|
After Width: | Height: | Size: 5.0 KiB |
BIN
src/assets/icons/wendang.png
Normal file
|
After Width: | Height: | Size: 4.3 KiB |
BIN
src/assets/icons/wenjianjia.png
Normal file
|
After Width: | Height: | Size: 3.4 KiB |
39
src/assets/light.svg
Normal file
@ -0,0 +1,39 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg width="52px" height="45px" viewBox="0 0 52 45" version="1.1"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<defs>
|
||||
<filter x="-9.4%" y="-6.2%" width="118.8%" height="122.5%" filterUnits="objectBoundingBox" id="filter-1">
|
||||
<feOffset dx="0" dy="1" in="SourceAlpha" result="shadowOffsetOuter1"></feOffset>
|
||||
<feGaussianBlur stdDeviation="1" in="shadowOffsetOuter1" result="shadowBlurOuter1"></feGaussianBlur>
|
||||
<feColorMatrix values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.15 0" type="matrix" in="shadowBlurOuter1" result="shadowMatrixOuter1"></feColorMatrix>
|
||||
<feMerge>
|
||||
<feMergeNode in="shadowMatrixOuter1"></feMergeNode>
|
||||
<feMergeNode in="SourceGraphic"></feMergeNode>
|
||||
</feMerge>
|
||||
</filter>
|
||||
<rect id="path-2" x="0" y="0" width="48" height="40" rx="4"></rect>
|
||||
<filter x="-4.2%" y="-2.5%" width="108.3%" height="110.0%" filterUnits="objectBoundingBox" id="filter-4">
|
||||
<feOffset dx="0" dy="1" in="SourceAlpha" result="shadowOffsetOuter1"></feOffset>
|
||||
<feGaussianBlur stdDeviation="0.5" in="shadowOffsetOuter1" result="shadowBlurOuter1"></feGaussianBlur>
|
||||
<feColorMatrix values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.1 0" type="matrix" in="shadowBlurOuter1"></feColorMatrix>
|
||||
</filter>
|
||||
</defs>
|
||||
<g id="配置面板" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
||||
<g id="setting-copy-2" transform="translate(-1254.000000, -136.000000)">
|
||||
<g id="Group-8" transform="translate(1167.000000, 0.000000)">
|
||||
<g id="Group-5" filter="url(#filter-1)" transform="translate(89.000000, 137.000000)">
|
||||
<mask id="mask-3" fill="white">
|
||||
<use xlink:href="#path-2"></use>
|
||||
</mask>
|
||||
<g id="Rectangle-18">
|
||||
<use fill="black" fill-opacity="1" filter="url(#filter-4)" xlink:href="#path-2"></use>
|
||||
<use fill="#F0F2F5" fill-rule="evenodd" xlink:href="#path-2"></use>
|
||||
</g>
|
||||
<rect id="Rectangle-18" fill="#FFFFFF" mask="url(#mask-3)" x="0" y="0" width="16" height="40"></rect>
|
||||
<rect id="Rectangle-11" fill="#FFFFFF" mask="url(#mask-3)" x="0" y="0" width="48" height="10"></rect>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 2.5 KiB |
BIN
src/assets/login.png
Normal file
|
After Width: | Height: | Size: 30 KiB |
BIN
src/assets/logo/logo.png
Normal file
|
After Width: | Height: | Size: 7.0 KiB |
110
src/assets/particles.json
Normal file
@ -0,0 +1,110 @@
|
||||
{
|
||||
"particles": {
|
||||
"number": {
|
||||
"value": 60,
|
||||
"density": {
|
||||
"enable": true,
|
||||
"value_area": 800
|
||||
}
|
||||
},
|
||||
"color": {
|
||||
"value": "#ffffff"
|
||||
},
|
||||
"shape": {
|
||||
"type": "circle",
|
||||
"stroke": {
|
||||
"width": 0,
|
||||
"color": "#000000"
|
||||
},
|
||||
"polygon": {
|
||||
"nb_sides": 5
|
||||
},
|
||||
"image": {
|
||||
"src": "img/github.svg",
|
||||
"width": 100,
|
||||
"height": 100
|
||||
}
|
||||
},
|
||||
"opacity": {
|
||||
"value": 0.5,
|
||||
"random": false,
|
||||
"anim": {
|
||||
"enable": false,
|
||||
"speed": 1,
|
||||
"opacity_min": 0.1,
|
||||
"sync": false
|
||||
}
|
||||
},
|
||||
"size": {
|
||||
"value": 3,
|
||||
"random": true,
|
||||
"anim": {
|
||||
"enable": false,
|
||||
"speed": 40,
|
||||
"size_min": 0.1,
|
||||
"sync": false
|
||||
}
|
||||
},
|
||||
"line_linked": {
|
||||
"enable": true,
|
||||
"distance": 150,
|
||||
"color": "#ffffff",
|
||||
"opacity": 0.4,
|
||||
"width": 1
|
||||
},
|
||||
"move": {
|
||||
"enable": true,
|
||||
"speed": 4,
|
||||
"direction": "none",
|
||||
"random": false,
|
||||
"straight": false,
|
||||
"out_mode": "out",
|
||||
"bounce": false,
|
||||
"attract": {
|
||||
"enable": false,
|
||||
"rotateX": 100,
|
||||
"rotateY": 1200
|
||||
}
|
||||
}
|
||||
},
|
||||
"interactivity": {
|
||||
"detect_on": "Window",
|
||||
"events": {
|
||||
"onhover": {
|
||||
"enable": true,
|
||||
"mode": "grab"
|
||||
},
|
||||
"onclick": {
|
||||
"enable": true,
|
||||
"mode": "push"
|
||||
},
|
||||
"resize": true
|
||||
},
|
||||
"modes": {
|
||||
"grab": {
|
||||
"distance": 140,
|
||||
"line_linked": {
|
||||
"opacity": 1
|
||||
}
|
||||
},
|
||||
"bubble": {
|
||||
"distance": 400,
|
||||
"size": 40,
|
||||
"duration": 2,
|
||||
"opacity": 8,
|
||||
"speed": 3
|
||||
},
|
||||
"repulse": {
|
||||
"distance": 200,
|
||||
"duration": 0.4
|
||||
},
|
||||
"push": {
|
||||
"particles_nb": 4
|
||||
},
|
||||
"remove": {
|
||||
"particles_nb": 2
|
||||
}
|
||||
}
|
||||
},
|
||||
"retina_detect": true
|
||||
}
|
||||
111
src/components/BackToTop/index.vue
Normal file
@ -0,0 +1,111 @@
|
||||
<template>
|
||||
<transition :name="transitionName">
|
||||
<div v-show="visible" :style="customStyle" class="back-to-ceiling" @click="backToTop">
|
||||
<svg width="16" height="16" viewBox="0 0 17 17" xmlns="http://www.w3.org/2000/svg" class="Icon Icon--backToTopArrow" aria-hidden="true" style="height:16px;width:16px"><path d="M12.036 15.59a1 1 0 0 1-.997.995H5.032a.996.996 0 0 1-.997-.996V8.584H1.03c-1.1 0-1.36-.633-.578-1.416L7.33.29a1.003 1.003 0 0 1 1.412 0l6.878 6.88c.782.78.523 1.415-.58 1.415h-3.004v7.004z" /></svg>
|
||||
</div>
|
||||
</transition>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'BackToTop',
|
||||
props: {
|
||||
visibilityHeight: {
|
||||
type: Number,
|
||||
default: 400
|
||||
},
|
||||
backPosition: {
|
||||
type: Number,
|
||||
default: 0
|
||||
},
|
||||
customStyle: {
|
||||
type: Object,
|
||||
default: function() {
|
||||
return {
|
||||
right: '50px',
|
||||
bottom: '50px',
|
||||
width: '40px',
|
||||
height: '40px',
|
||||
'border-radius': '4px',
|
||||
'line-height': '45px',
|
||||
background: '#e7eaf1'
|
||||
}
|
||||
}
|
||||
},
|
||||
transitionName: {
|
||||
type: String,
|
||||
default: 'fade'
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
visible: false,
|
||||
interval: null,
|
||||
isMoving: false
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
window.addEventListener('scroll', this.handleScroll)
|
||||
},
|
||||
beforeDestroy() {
|
||||
window.removeEventListener('scroll', this.handleScroll)
|
||||
if (this.interval) {
|
||||
clearInterval(this.interval)
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
handleScroll() {
|
||||
this.visible = window.pageYOffset > this.visibilityHeight
|
||||
},
|
||||
backToTop() {
|
||||
if (this.isMoving) return
|
||||
const start = window.pageYOffset
|
||||
let i = 0
|
||||
this.isMoving = true
|
||||
this.interval = setInterval(() => {
|
||||
const next = Math.floor(this.easeInOutQuad(10 * i, start, -start, 500))
|
||||
if (next <= this.backPosition) {
|
||||
window.scrollTo(0, this.backPosition)
|
||||
clearInterval(this.interval)
|
||||
this.isMoving = false
|
||||
} else {
|
||||
window.scrollTo(0, next)
|
||||
}
|
||||
i++
|
||||
}, 16.7)
|
||||
},
|
||||
easeInOutQuad(t, b, c, d) {
|
||||
if ((t /= d / 2) < 1) return c / 2 * t * t + b
|
||||
return -c / 2 * (--t * (t - 2) - 1) + b
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.back-to-ceiling {
|
||||
position: fixed;
|
||||
display: inline-block;
|
||||
text-align: center;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.back-to-ceiling:hover {
|
||||
background: #d5dbe7;
|
||||
}
|
||||
|
||||
.fade-enter-active,
|
||||
.fade-leave-active {
|
||||
transition: opacity .5s;
|
||||
}
|
||||
|
||||
.fade-enter,
|
||||
.fade-leave-to {
|
||||
opacity: 0
|
||||
}
|
||||
|
||||
.back-to-ceiling .Icon {
|
||||
fill: #9aaabf;
|
||||
background: none;
|
||||
}
|
||||
</style>
|
||||
67
src/components/Bar.vue
Normal file
@ -0,0 +1,67 @@
|
||||
<template>
|
||||
<div :style="{ padding: '0 0 32px 32px' }">
|
||||
<h4 :style="{ marginBottom: '20px' }">{{ title }}</h4>
|
||||
<v-chart
|
||||
height="254"
|
||||
:data="arr"
|
||||
:force-fit="true"
|
||||
:padding="['auto', 'auto', '40', '50']"
|
||||
>
|
||||
<v-tooltip />
|
||||
<v-axis />
|
||||
<v-bar position="x*y" />
|
||||
</v-chart>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'Bar',
|
||||
props: {
|
||||
title: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
list: {
|
||||
type: Array,
|
||||
default: () => {}
|
||||
},
|
||||
scale: {
|
||||
type: Array,
|
||||
default: () => {
|
||||
return [{
|
||||
dataKey: 'x',
|
||||
min: 2
|
||||
}, {
|
||||
dataKey: 'y',
|
||||
title: '时间',
|
||||
min: 1,
|
||||
max: 22
|
||||
}]
|
||||
}
|
||||
},
|
||||
tooltip: {
|
||||
type: Array,
|
||||
default: () => {
|
||||
return [
|
||||
'x*y',
|
||||
(x, y) => ({
|
||||
name: x,
|
||||
value: y
|
||||
})
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
arr: []
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
setTimeout(_ => {
|
||||
this.arr = this.list
|
||||
}, 300)
|
||||
}
|
||||
}
|
||||
</script>
|
||||
82
src/components/Breadcrumb/index.vue
Normal file
@ -0,0 +1,82 @@
|
||||
<template>
|
||||
<el-breadcrumb class="app-breadcrumb" separator="/">
|
||||
<transition-group name="breadcrumb">
|
||||
<el-breadcrumb-item v-for="(item,index) in levelList" :key="item.path">
|
||||
<span v-if="item.redirect==='noRedirect'||index==levelList.length-1" class="no-redirect">{{ item.meta.title }}</span>
|
||||
<a v-else @click.prevent="handleLink(item)">{{ item.meta.title }}</a>
|
||||
</el-breadcrumb-item>
|
||||
</transition-group>
|
||||
</el-breadcrumb>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { compile } from 'path-to-regexp'
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
levelList: null
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
$route(route) {
|
||||
// if you go to the redirect page, do not update the breadcrumbs
|
||||
if (route.path.startsWith('/redirect/')) {
|
||||
return
|
||||
}
|
||||
this.getBreadcrumb()
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getBreadcrumb()
|
||||
},
|
||||
methods: {
|
||||
getBreadcrumb() {
|
||||
// only show routes with meta.title
|
||||
let matched = this.$route.matched.filter(item => item.meta && item.meta.title)
|
||||
const first = matched[0]
|
||||
|
||||
if (!this.isDashboard(first)) {
|
||||
matched = [{ path: '/index', meta: { title: '首页' }}].concat(matched)
|
||||
}
|
||||
|
||||
this.levelList = matched.filter(item => item.meta && item.meta.title && item.meta.breadcrumb !== false)
|
||||
},
|
||||
isDashboard(route) {
|
||||
const name = route && route.name
|
||||
if (!name) {
|
||||
return false
|
||||
}
|
||||
return name.trim() === '首页'
|
||||
},
|
||||
pathCompile(path) {
|
||||
// To solve this problem https://github.com/PanJiaChen/vue-element-admin/issues/561
|
||||
const { params } = this.$route
|
||||
var toPath = compile(path)
|
||||
return toPath(params)
|
||||
},
|
||||
handleLink(item) {
|
||||
const { redirect, path } = item
|
||||
if (redirect) {
|
||||
this.$router.push(redirect)
|
||||
return
|
||||
}
|
||||
this.$router.push(this.pathCompile(path))
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.app-breadcrumb.el-breadcrumb {
|
||||
display: inline-block;
|
||||
font-size: 14px;
|
||||
line-height: 50px;
|
||||
margin-left: 8px;
|
||||
|
||||
.no-redirect {
|
||||
color: #97a8be;
|
||||
cursor: text;
|
||||
}
|
||||
}
|
||||
</style>
|
||||