Merge branch 'dev-3.5' of https://git.mesalab.cn/nezha/nezha-fronted into dev-3.5-route

This commit is contained in:
zhangyu
2022-09-01 14:12:25 +08:00
9 changed files with 148 additions and 42 deletions

View File

@@ -256,7 +256,7 @@
}
.doc-content > h1 {
color: #e6522c;
font-size: 22px;
font-size: 24px;
}
.doc-content > h2 {
@@ -343,6 +343,7 @@ article {
/*外部引用 样式end*/
.explore .introduce-view .title-heard.info-room{
position: relative;
.logs-content {
font-size: 16px;
ul li{
@@ -356,6 +357,10 @@ article {
padding: 5px;
background-color: $--background-color-empty;
}
.log-link:hover{
cursor: pointer;
border-bottom: 1px solid #3C92F1;
}
.fillbox{
display: block;
line-height: 25px;
@@ -368,7 +373,7 @@ article {
}
> h1,.page-header {
color: #e6522c;
font-size: 22px;
font-size: 24px;
font-weight: 600;
text-transform: uppercase;
margin-top: 15px;
@@ -378,6 +383,20 @@ article {
text-decoration: none;
}
}
> h1,.page-header-one {
color: #e6522c;
font-size: 22px;
font-weight: 600;
margin-top: 15px;
text-transform: none;
}
> h1,.page-header-two {
color: #e6522c;
font-size: 20px;
font-weight: 600;
margin-top: 15px;
text-transform: none;
}
.title-heard__divider{
margin: 5px 0 5px 0;
}
@@ -416,4 +435,20 @@ article {
}
}
}
.catalog{
position: absolute;
top: 75px;
right: 25px;
background-color: $--background-color-empty;
padding: 15px 10px;
ul li{
margin: 3px 14px 3px 24px;
list-style: circle;
color: #3C92F1;
}
span:hover{
cursor: pointer;
border-bottom: 1px solid #3C92F1;
}
}
}

View File

@@ -110,6 +110,9 @@ export default {
this.$nextTick(() => {
d3.select(`#bubble-svg-${this.chartId}`).selectAll('g').remove()// 清空作图区域
const svg = document.getElementById(`bubble-svg-${this.chartId}`)
if (!svg) {
return false
}
const width = svg.getBoundingClientRect().width
const height = svg.getBoundingClientRect().height
// 定义布局方式

View File

@@ -141,8 +141,11 @@ export default {
// 获取svg宽高 初始化画布
const svgDom = document.getElementById(`sankey-svg-${this.chartId}`)
const width = svgDom && svgDom.getBoundingClientRect().width
const height = svgDom && svgDom.getBoundingClientRect().height
if (!svgDom) {
return false
}
const width = svgDom.getBoundingClientRect().width
const height = svgDom.getBoundingClientRect().height
const margin1 = 100
const margin2 = 50
const svg = d3.select(`#sankey-svg-${this.chartId}`)

View File

@@ -214,7 +214,7 @@ export function sysObjectIdInput (rule, value, callback) {
if (sysId.test(value)) {
callback()
} else {
callback(new Error(vm.$t('validate.sysId')))
callback(new Error(vm.$t('overall.oid')))
}
}, 100)
}

File diff suppressed because one or more lines are too long

View File

@@ -1,7 +1,7 @@
<template>
<div id="app">
<browser-window-zoom />
<keep-alive>
<keep-alive exclude="login">
<router-view style="height: 100%"/>
</keep-alive>
</div>

View File

@@ -1,5 +1,7 @@
import { getUUID } from './components/common/js/common'
import router from './router'
import axios from 'axios'
import { getUUID } from './components/common/js/common'
const CancelToken = axios.CancelToken // 申明CancelToken
export const requestsArr = []
// 清除掉请求完成的实例 防止占用内存
@@ -83,6 +85,7 @@ axios.interceptors.response.use(
window.location.href = '/'
} else if (response.status === 200) {
if (accountErrorCode.indexOf(response.data.code) !== -1 && noJumpPath.indexOf(window.location.hash) == -1) {
sessionStorage.setItem('nz-previous-page', router.currentRoute.fullPath)
window.location.href = '/'
}
} else {

View File

@@ -149,6 +149,7 @@ router.beforeEach((to, from, next) => {
resolve()
} else {
localStorage.removeItem('nz-token')
sessionStorage.setItem('nz-previous-page', to.fullPath)
next({ path: '/login' })
}
})
@@ -179,6 +180,7 @@ router.beforeEach((to, from, next) => {
if (loginWhiteList.indexOf(to.path) !== -1) {
next()
} else {
sessionStorage.setItem('nz-previous-page', to.fullPath)
next({ path: '/login' })
}
}

View File

@@ -142,12 +142,22 @@ const user = {
}
})
}
router.push({
path: path[0],
query: {
t: +new Date()
}
})
// 登录成功后跳回到原来页面
if (sessionStorage.getItem('nz-previous-page')) {
const route = sessionStorage.getItem('nz-previous-page')
router.push({
path: route
}).then(() => {
sessionStorage.removeItem('nz-previous-page')
})
} else {
router.push({
path: path[0],
query: {
t: +new Date()
}
})
}
})
get('/sys/user/profile').then(response => {
if (response.code === 200) {