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 14879eb0..46a593b6 100644
--- a/ruoyi-ui/src/utils/request.js
+++ b/ruoyi-ui/src/utils/request.js
@@ -66,6 +66,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 69d144d2..83e06630 100644
--- a/ruoyi-ui/src/views/index.vue
+++ b/ruoyi-ui/src/views/index.vue
@@ -119,9 +119,9 @@
QQ群:满42799195
- 满170157040 满130643120
-
- 225920371满170157040 满130643120 满225920371
+
+ 201705537
diff --git a/ruoyi-ui/src/views/login.vue b/ruoyi-ui/src/views/login.vue
index 8ec1aca4..132007a0 100644
--- a/ruoyi-ui/src/views/login.vue
+++ b/ruoyi-ui/src/views/login.vue
@@ -18,7 +18,7 @@
-
+
{
- this.codeUrl = "data:image/gif;base64," + res.img;
- this.loginForm.uuid = res.uuid;
+ this.captchaOnOff = res.captchaOnOff === undefined ? true : res.captchaOnOff;
+ if (this.captchaOnOff) {
+ this.codeUrl = "data:image/gif;base64," + res.img;
+ this.loginForm.uuid = res.uuid;
+ }
});
},
getCookie() {
@@ -130,7 +134,9 @@ export default {
this.$router.push({ path: this.redirect || "/" }).catch(()=>{});
}).catch(() => {
this.loading = false;
- this.getCode();
+ if (this.captchaOnOff) {
+ this.getCode();
+ }
});
}
});
diff --git a/ruoyi-ui/src/views/monitor/job/index.vue b/ruoyi-ui/src/views/monitor/job/index.vue
index 424286af..9583f70a 100644
--- a/ruoyi-ui/src/views/monitor/job/index.vue
+++ b/ruoyi-ui/src/views/monitor/job/index.vue
@@ -114,17 +114,30 @@
执行一次
+ icon="el-icon-edit"
+ @click="handleUpdate(scope.row)"
+ v-hasPermi="['monitor:job:edit']"
+ >修改
详细
+ icon="el-icon-delete"
+ @click="handleDelete(scope.row)"
+ v-hasPermi="['monitor:job:remove']"
+ >删除
+ handleCommand(command, scope.row)" v-hasPermi="['monitor:job:changeStatus', 'monitor:job:query']">
+
+ 更多
+
+
+ 执行一次
+ 任务详细
+ 调度日志
+
+