commit
549fbe2998
|
@ -3,6 +3,7 @@ import { getRouters } from '@/api/vadmin/menu'
|
||||||
import Layout from '@/layout/index'
|
import Layout from '@/layout/index'
|
||||||
import ParentView from '@/components/ParentView';
|
import ParentView from '@/components/ParentView';
|
||||||
import { handleTree } from "@/utils/ruoyi";
|
import { handleTree } from "@/utils/ruoyi";
|
||||||
|
import de from 'element-ui/src/locale/lang/de'
|
||||||
const permission = {
|
const permission = {
|
||||||
state: {
|
state: {
|
||||||
routes: [],
|
routes: [],
|
||||||
|
@ -24,28 +25,11 @@ const permission = {
|
||||||
return new Promise(resolve => {
|
return new Promise(resolve => {
|
||||||
// 向后端请求路由数据
|
// 向后端请求路由数据
|
||||||
getRouters().then(res => {
|
getRouters().then(res => {
|
||||||
let tempData = handleTree(res.data, "id");
|
const data = handleTree(res.data, "id");
|
||||||
tempData[2].children.push({
|
|
||||||
component: "vadmin/monitor/server/index",
|
|
||||||
hidden: false,
|
|
||||||
id: 97,
|
|
||||||
meta: {title: "服务监控", icon: "server", noCache: false},
|
|
||||||
name: "server",
|
|
||||||
orderNum: 3,
|
|
||||||
parentId: 66,
|
|
||||||
path: "server",
|
|
||||||
redirect: "server"
|
|
||||||
})
|
|
||||||
const data = tempData
|
|
||||||
|
|
||||||
|
|
||||||
// console.log("handleTree:", data)
|
|
||||||
const sdata = JSON.parse(JSON.stringify(data))
|
const sdata = JSON.parse(JSON.stringify(data))
|
||||||
const rdata = JSON.parse(JSON.stringify(data))
|
const rdata = JSON.parse(JSON.stringify(data))
|
||||||
const sidebarRoutes = filterAsyncRouter(sdata)
|
const sidebarRoutes = filterAsyncRouter(sdata)
|
||||||
// console.log(sidebarRoutes)
|
|
||||||
const rewriteRoutes = filterAsyncRouter(rdata, false, true)
|
const rewriteRoutes = filterAsyncRouter(rdata, false, true)
|
||||||
// console.log(rewriteRoutes)
|
|
||||||
rewriteRoutes.push({ path: '*', redirect: '/404', hidden: true })
|
rewriteRoutes.push({ path: '*', redirect: '/404', hidden: true })
|
||||||
commit('SET_ROUTES', rewriteRoutes)
|
commit('SET_ROUTES', rewriteRoutes)
|
||||||
commit('SET_SIDEBAR_ROUTERS', sidebarRoutes)
|
commit('SET_SIDEBAR_ROUTERS', sidebarRoutes)
|
||||||
|
|
|
@ -327,7 +327,7 @@ export default {
|
||||||
cancelButtonText: '放弃'
|
cancelButtonText: '放弃'
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
cleanMonitorLog().then(results => {
|
cleanMonitorLog().then(results => {
|
||||||
this.msgSuccess( '清除记录成功!')
|
this.msgSuccess('清除记录成功!')
|
||||||
}).catch(error => {
|
}).catch(error => {
|
||||||
this.$message.warning(error.msg || '清除记录失败,请重试!')
|
this.$message.warning(error.msg || '清除记录失败,请重试!')
|
||||||
})
|
})
|
||||||
|
@ -405,12 +405,16 @@ export default {
|
||||||
}
|
}
|
||||||
|
|
||||||
.server-monitor-top {
|
.server-monitor-top {
|
||||||
padding: 0 10px;
|
padding: 10px 10px;
|
||||||
text-align: justify-all;
|
text-align: justify-all;
|
||||||
|
overflow-x: scroll;
|
||||||
|
display: flex;
|
||||||
}
|
}
|
||||||
|
|
||||||
.server-monitor-bottom {
|
.server-monitor-bottom {
|
||||||
text-align: left;
|
text-align: left;
|
||||||
|
overflow-x: scroll;
|
||||||
|
display: flex;
|
||||||
}
|
}
|
||||||
|
|
||||||
.server-information {
|
.server-information {
|
||||||
|
@ -489,6 +493,7 @@ export default {
|
||||||
min-width: 500px;
|
min-width: 500px;
|
||||||
margin: 10px;
|
margin: 10px;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
|
overflow-x: scroll;
|
||||||
}
|
}
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
|
Loading…
Reference in New Issue