修改测试bug

This commit is contained in:
guanj
2025-07-10 16:32:49 +08:00
parent 226031a451
commit 2f5ab61e9c
57 changed files with 1962 additions and 1143 deletions

View File

@@ -48,13 +48,13 @@ const initChart = () => {
},
tooltip: {
trigger: 'axis',
axisPointer: {
type: 'shadow',
label: {
color: '#fff',
fontSize: 16
}
},
// axisPointer: {
// type: 'shadow',
// label: {
// color: '#fff',
// fontSize: 16
// }
// },
textStyle: {
color: '#fff',
fontStyle: 'normal',
@@ -67,7 +67,10 @@ const initChart = () => {
formatter: function (params: any) {
let tips = `<strong>${params[0]?.name}</strong></br>` // 标题加粗
params?.forEach((item: any) => {
const value = item.value === 3.14159 ? '暂无数据' : Math.round(item.value * 100) / 100 // 处理特殊值
const value =
item.value === 3.14159 || item.value === 0.14159
? '暂无数据'
: Math.round(item.value * 100) / 100 // 处理特殊值
tips += `<div style=" display: flex;justify-content: space-between;">
<span>${item.marker}
${item.seriesName}:
@@ -164,7 +167,7 @@ const handlerBar = (options: any) => {
item.itemStyle = Object.assign(
{
color: (params: any) => {
if (params.value == 0 || params.value == 3.14159) {
if (params.value == 0 || params.value == 3.14159 || params.value == 0.14159) {
return '#ccc'
} else {
return props.options?.color

View File

@@ -87,8 +87,8 @@ const GetEchar = async (name: string) => {
geo: {
map: name,
zoom: 1.2,
// top: 0,
zoom: 1.1,
// top: 10,
// bottom: 0,
roam: true,
label: {
@@ -187,6 +187,12 @@ const GetEchar = async (name: string) => {
}
}
})
myCharts.value.on('datarangeselected', function (params: any) {
// 手动调用restore方法恢复地图的默认颜色映射
myCharts.value.dispatchAction({
type: 'restore'
})
})
}
const MapReturn = (name: string) => {