0) {
const tmpPath = path.substring(1, path.length);
activePath = "/" + tmpPath.substring(0, tmpPath.indexOf("/"));
@@ -100,7 +100,7 @@ export default {
}
var routes = this.activeRoutes(activePath);
if (routes.length === 0) {
- activePath = this.currentIndex || this.routers[0].path
+ activePath = this.currentIndex || this.defaultRouter()
this.activeRoutes(activePath);
}
return activePath;
@@ -121,6 +121,17 @@ export default {
const width = document.body.getBoundingClientRect().width / 3;
this.visibleNumber = parseInt(width / 85);
},
+ // 默认激活的路由
+ defaultRouter() {
+ let router;
+ Object.keys(this.routers).some((key) => {
+ if (!this.routers[key].hidden) {
+ router = this.routers[key].path;
+ return true;
+ }
+ });
+ return router;
+ },
// 菜单选择事件
handleSelect(key, keyPath) {
this.currentIndex = key;
@@ -158,25 +169,27 @@ export default {
diff --git a/ruoyi-ui/src/router/index.js b/ruoyi-ui/src/router/index.js
index 7f0b1059..5b3b4fe3 100644
--- a/ruoyi-ui/src/router/index.js
+++ b/ruoyi-ui/src/router/index.js
@@ -5,8 +5,6 @@ Vue.use(Router)
/* Layout */
import Layout from '@/layout'
-import ParentView from '@/components/ParentView';
-import InnerLink from '@/layout/components/InnerLink'
/**
* Note: 路由配置项
@@ -23,6 +21,7 @@ import InnerLink from '@/layout/components/InnerLink'
title: 'title' // 设置该路由在侧边栏和面包屑中展示的名字
icon: 'svg-name' // 设置该路由的图标,对应路径src/assets/icons/svg
breadcrumb: false // 如果设置为false,则不会在breadcrumb面包屑中显示
+ activeMenu: '/system/user' // 当路由设置了该属性,则会高亮相对应的侧边栏。
}
*/
@@ -82,7 +81,7 @@ export const constantRoutes = [
]
},
{
- path: '/auth',
+ path: '/system/user-auth',
component: Layout,
hidden: true,
children: [
@@ -90,12 +89,12 @@ export const constantRoutes = [
path: 'role/:userId(\\d+)',
component: (resolve) => require(['@/views/system/user/authRole'], resolve),
name: 'AuthRole',
- meta: { title: '分配角色'}
+ meta: { title: '分配角色', activeMenu: '/system/user'}
}
]
},
{
- path: '/auth',
+ path: '/system/role-auth',
component: Layout,
hidden: true,
children: [
@@ -103,46 +102,46 @@ export const constantRoutes = [
path: 'user/:roleId(\\d+)',
component: (resolve) => require(['@/views/system/role/authUser'], resolve),
name: 'AuthUser',
- meta: { title: '分配用户'}
+ meta: { title: '分配用户', activeMenu: '/system/role'}
}
]
},
{
- path: '/dict',
+ path: '/system/dict-data',
component: Layout,
hidden: true,
children: [
{
- path: 'type/data/:dictId(\\d+)',
+ path: 'index/:dictId(\\d+)',
component: (resolve) => require(['@/views/system/dict/data'], resolve),
name: 'Data',
- meta: { title: '字典数据', icon: '' }
+ meta: { title: '字典数据', activeMenu: '/system/dict'}
}
]
},
{
- path: '/job',
+ path: '/monitor/job-log',
component: Layout,
hidden: true,
children: [
{
- path: 'log',
+ path: 'index',
component: (resolve) => require(['@/views/monitor/job/log'], resolve),
name: 'JobLog',
- meta: { title: '调度日志' }
+ meta: { title: '调度日志', activeMenu: '/monitor/job'}
}
]
},
{
- path: '/gen',
+ path: '/tool/gen-edit',
component: Layout,
hidden: true,
children: [
{
- path: 'edit/:tableId(\\d+)',
+ path: 'index/:tableId(\\d+)',
component: (resolve) => require(['@/views/tool/gen/editTable'], resolve),
name: 'GenEdit',
- meta: { title: '修改生成配置' }
+ meta: { title: '修改生成配置', activeMenu: '/tool/gen'}
}
]
}
diff --git a/ruoyi-ui/src/utils/request.js b/ruoyi-ui/src/utils/request.js
index a510d2da..6a7cbfa3 100644
--- a/ruoyi-ui/src/utils/request.js
+++ b/ruoyi-ui/src/utils/request.js
@@ -64,6 +64,7 @@ service.interceptors.response.use(res => {
location.href = '/index';
})
}).catch(() => {});
+ return Promise.reject('error')
} else if (code === 500) {
Message({
message: msg,
diff --git a/ruoyi-ui/src/utils/zipdownload.js b/ruoyi-ui/src/utils/zipdownload.js
index ac2745bc..8a1b8198 100644
--- a/ruoyi-ui/src/utils/zipdownload.js
+++ b/ruoyi-ui/src/utils/zipdownload.js
@@ -32,9 +32,11 @@ export function resolveBlob(res, mimeType) {
var result = patt.exec(contentDisposition)
var fileName = result[1]
fileName = fileName.replace(/\"/g, '')
+ aLink.style.display = 'none'
aLink.href = URL.createObjectURL(blob)
aLink.setAttribute('download', fileName) // 设置下载文件名称
document.body.appendChild(aLink)
aLink.click()
+ URL.revokeObjectURL(aLink.href);//清除引用
document.body.removeChild(aLink);
}
diff --git a/ruoyi-ui/src/views/index.vue b/ruoyi-ui/src/views/index.vue
index 1fc8586c..37c439b1 100644
--- a/ruoyi-ui/src/views/index.vue
+++ b/ruoyi-ui/src/views/index.vue
@@ -120,9 +120,9 @@
QQ群:满937441
满887144332 满180251782 满104180207
- 满186866453
-
- 201396349满186866453 满201396349
+
+ 101456076
diff --git a/ruoyi-ui/src/views/monitor/job/index.vue b/ruoyi-ui/src/views/monitor/job/index.vue
index a1bb4e20..53cfb32b 100644
--- a/ruoyi-ui/src/views/monitor/job/index.vue
+++ b/ruoyi-ui/src/views/monitor/job/index.vue
@@ -126,7 +126,7 @@
@click="handleDelete(scope.row)"
v-hasPermi="['monitor:job:remove']"
>删除
- handleCommand(command, scope.row)">
+ handleCommand(command, scope.row)" v-hasPermi="['monitor:job:changeStatus', 'monitor:job:query']">
更多
@@ -451,7 +451,7 @@ export default {
/** 任务日志列表查询 */
handleJobLog(row) {
const jobId = row.jobId || 0;
- this.$router.push({ path: '/job/log', query: { jobId: jobId } })
+ this.$router.push({ path: '/monitor/job-log/index', query: { jobId: jobId } })
},
/** 新增按钮操作 */
handleAdd() {
diff --git a/ruoyi-ui/src/views/monitor/job/log.vue b/ruoyi-ui/src/views/monitor/job/log.vue
index e3a427ee..25db43f3 100644
--- a/ruoyi-ui/src/views/monitor/job/log.vue
+++ b/ruoyi-ui/src/views/monitor/job/log.vue
@@ -229,7 +229,7 @@ export default {
} else {
this.getList();
}
- this.getDicts("sys_job_status").then(response => {
+ this.getDicts("sys_common_status").then(response => {
this.statusOptions = response.data;
});
this.getDicts("sys_job_group").then(response => {
diff --git a/ruoyi-ui/src/views/system/dict/index.vue b/ruoyi-ui/src/views/system/dict/index.vue
index 4bf733f2..20cf5ce9 100644
--- a/ruoyi-ui/src/views/system/dict/index.vue
+++ b/ruoyi-ui/src/views/system/dict/index.vue
@@ -118,7 +118,7 @@
-
+
{{ scope.row.dictType }}
diff --git a/ruoyi-ui/src/views/system/menu/index.vue b/ruoyi-ui/src/views/system/menu/index.vue
index 507ae509..059f8d85 100644
--- a/ruoyi-ui/src/views/system/menu/index.vue
+++ b/ruoyi-ui/src/views/system/menu/index.vue
@@ -89,7 +89,7 @@
-
+
@@ -144,7 +144,13 @@
-
+
+
+
+
+
+ 是否外链
+
是
否
@@ -152,22 +158,46 @@
-
+
+
+
+
+
+ 路由地址
+
-
+
+
+
+
+
+ 组件路径
+
-
+
+
+
+
+
+ 权限字符
+
-
+
+
+
+
+
+ 显示状态
+
-
+
+
+
+
+
+ 菜单状态
+
-
+
+
+
+
+
+ 是否缓存
+
缓存
不缓存
diff --git a/ruoyi-ui/src/views/system/role/index.vue b/ruoyi-ui/src/views/system/role/index.vue
index af824da2..27167c9d 100644
--- a/ruoyi-ui/src/views/system/role/index.vue
+++ b/ruoyi-ui/src/views/system/role/index.vue
@@ -139,7 +139,7 @@
@click="handleDelete(scope.row)"
v-hasPermi="['system:role:remove']"
>删除
- handleCommand(command, scope.row)">
+ handleCommand(command, scope.row)" v-hasPermi="['system:role:edit']">
更多
@@ -164,11 +164,17 @@
-
+
-
+
+
+
+
+
+ 权限字符
+
@@ -568,7 +574,7 @@ export default {
/** 分配用户操作 */
handleAuthUser: function(row) {
const roleId = row.roleId;
- this.$router.push("/auth/user/" + roleId);
+ this.$router.push("/system/role-auth/user/" + roleId);
},
/** 提交按钮 */
submitForm: function() {
diff --git a/ruoyi-ui/src/views/system/user/index.vue b/ruoyi-ui/src/views/system/user/index.vue
index 7208dcf1..0fe25360 100644
--- a/ruoyi-ui/src/views/system/user/index.vue
+++ b/ruoyi-ui/src/views/system/user/index.vue
@@ -182,7 +182,7 @@
@click="handleDelete(scope.row)"
v-hasPermi="['system:user:remove']"
>删除
- handleCommand(command, scope.row)">
+ handleCommand(command, scope.row)" v-hasPermi="['system:user:resetPwd', 'system:user:edit']">
更多
@@ -242,7 +242,7 @@
-
+
@@ -328,15 +328,14 @@
drag
>
-
- 将文件拖到此处,或
-
点击上传
+
将文件拖到此处,或点击上传
+
+
+ 是否更新已经存在的用户数据
+
+
仅允许导入xls、xlsx格式文件。
+
下载模板
-
- 是否更新已经存在的用户数据
- 下载模板
-
-
提示:仅允许导入“xls”或“xlsx”格式文件!