联调二级评估页面

This commit is contained in:
guanj
2025-08-11 16:13:51 +08:00
parent 8d613f7a57
commit aa3dbb6c5d
22 changed files with 864 additions and 474 deletions

View File

@@ -3,13 +3,13 @@ const dataProcessing = (arr: any[]) => {
.filter(item => typeof item === 'number' || (typeof item === 'string' && !isNaN(parseFloat(item))))
.map(item => (typeof item === 'number' ? item : parseFloat(item)))
}
const calculateValue = (o:number,value: number, num: number, isMin: boolean) => {
const calculateValue = (o: number, value: number, num: number, isMin: boolean) => {
if (value === 0) {
return 0
}else if(value>0&& Math.abs(value)<1 && isMin==true){
return 0
}else if(value>-1&& value<0 && isMin==false){
return 0
} else if (value > 0 && Math.abs(value) < 1 && isMin == true) {
return 0
} else if (value > -1 && value < 0 && isMin == false) {
return 0
}
let base
if (Math.abs(o) >= 100) {
@@ -46,7 +46,7 @@ const calculateValue = (o:number,value: number, num: number, isMin: boolean) =>
// 处理y轴最大最小值
export const yMethod = (arr: any) => {
let num = 0.2
let num = 0.1
let numList = dataProcessing(arr)
let maxValue = 0
let minValue = 0
@@ -54,11 +54,13 @@ export const yMethod = (arr: any) => {
let min = 0
maxValue = Math.max(...numList)
minValue = Math.min(...numList)
console.log("🚀 ~ yMethod ~ maxValue:", maxValue,minValue)
const o = maxValue - minValue
if (Math.abs(o) >= 300) {
num = 0.02
}
const o=maxValue-minValue
min = calculateValue( o,minValue, num, true)
max = calculateValue(o,maxValue, num, false)
min = calculateValue(o, minValue, num, true)
max = calculateValue(o, maxValue, num, false)
// if (-100 >= minValue) {
// min = Math.floor((minValue + num * minValue) / 100) * 100
// } else if (-10 >= minValue && minValue > -100) {

View File

@@ -4,7 +4,8 @@ import { ElLoading, ElNotification, type LoadingOptions } from 'element-plus'
import { refreshToken } from '@/api/user-boot/user'
import router from '@/router/index'
import { useAdminInfo } from '@/stores/adminInfo'
import { debounce } from 'lodash-es';
let loginExpireTimer:any = null
window.requests = []
window.tokenRefreshing = false
const pendingMap = new Map()
@@ -167,12 +168,19 @@ function createAxios<Data = any, T = ApiPromise<Data>>(
}
} else if (response.data.code == 'A0024' || response.data.code == 'null') {
// // 登录失效
ElNotification({
type: 'error',
message: response.data.message
})
adminInfo.removeToken()
router.push({ name: 'login' })
// 清除上一次的定时器
if (loginExpireTimer) {
clearTimeout(loginExpireTimer)
}
loginExpireTimer = setTimeout(() => {
ElNotification({
type: 'error',
message: response.data.message
})
adminInfo.removeToken()
router.push({ name: 'login' })
loginExpireTimer = null // 执行后清空定时器
}, 100) // 可根据实际情况调整延迟时间
return Promise.reject(response.data)
} else {
if (options.showCodeMessage) {