From ef179d8ae7b91869d886530eda85a3dd1a00a3e0 Mon Sep 17 00:00:00 2001
From: X_Rian <904416525@qq.com>
Date: Mon, 24 Jun 2024 14:27:58 +0800
Subject: [PATCH] =?UTF-8?q?flx=EF=BC=9A=E4=BF=AE=E6=94=B9=E6=80=BB?=
=?UTF-8?q?=E8=A7=88=E5=A4=A7=E5=B1=8F=E6=A0=B7=E5=BC=8F=E9=97=AE=E9=A2=98?=
=?UTF-8?q?=20=E6=8C=87=E6=8C=A5=E9=83=A8=E5=A4=A7=E5=B1=8F=E6=98=BE?=
=?UTF-8?q?=E7=A4=BA=E9=97=AE=E9=A2=98?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../commandScreen/components/radarMapOption.vue | 10 +++++-----
.../overviewScreen/commandCenter/rightAll.vue | 16 +++++++++++++++-
2 files changed, 20 insertions(+), 6 deletions(-)
diff --git a/src/views/commandScreen/components/radarMapOption.vue b/src/views/commandScreen/components/radarMapOption.vue
index 9f80fa1..1cd40bd 100644
--- a/src/views/commandScreen/components/radarMapOption.vue
+++ b/src/views/commandScreen/components/radarMapOption.vue
@@ -58,15 +58,15 @@ function radarMapEchart() {
'
' +
props.randerInfo.indicator[index].name +
":" +
- item * 100 +
+ (item * 100).toFixed(2) +
"%
";
} else {
- htmlobj = "
" + props.randerInfo.indicator[index].name + ":" + item * 100 + "%
";
+ htmlobj = "" + props.randerInfo.indicator[index].name + ":" + (item * 100).toFixed(2) + "%
";
}
return htmlobj;
})
.join("");
- console.log(11111111, textHTML);
+ // console.log(11111111, textHTML);
return textHTML;
}
}
@@ -85,12 +85,12 @@ function radarMapEchart() {
const itemUp =
props.randerInfo.workerList[index] > 1
? props.randerInfo.workerList[index]
- : props.randerInfo.workerList[index] * 100 + "%";
+ : (props.randerInfo.workerList[index] * 100).toFixed(2) + "%";
htmlobj = "" + props.randerInfo.indicator[index].name + ":" + itemUp + "
";
return htmlobj;
})
.join("");
- console.log(11111111, textHTML);
+ // console.log(11111111, textHTML);
return textHTML;
}
}
diff --git a/src/views/overviewScreen/commandCenter/rightAll.vue b/src/views/overviewScreen/commandCenter/rightAll.vue
index 01c5ee7..5ad520c 100644
--- a/src/views/overviewScreen/commandCenter/rightAll.vue
+++ b/src/views/overviewScreen/commandCenter/rightAll.vue
@@ -658,8 +658,10 @@ function getManAnalysisEchart() {
},
legend: {
trigger: "item",
+ type: "scroll", //legend要多,进行分页处理
position: "inside",
top: "3%",
+ left: "1%",
x: "center",
textStyle: {
color: "#fff"
@@ -667,7 +669,19 @@ function getManAnalysisEchart() {
itemWidth: 10,
itemHeight: 10,
icon: "roundRect",
- data: workerRegionInfo.workerRegionList.map((item: any) => item.regionName)
+ data: workerRegionInfo.workerRegionList.map((item: any) => item.regionName),
+ formatter: function (data: any) {
+ if (workerRegionInfo.workerRegionList && workerRegionInfo.workerRegionList.length) {
+ for (let i = 0; i < workerRegionInfo.workerRegionList.length; i++) {
+ if (data === workerRegionInfo.workerRegionList[i].regionName) {
+ if (data == "无") return;
+
+ const newData = data.length > 5 ? data.substr(0, 5) + "..." : data;
+ return newData;
+ }
+ }
+ }
+ }
},
// color: ["#2BA5FF", "#F97766", "#1EF1FF", "#1EF1FF"],
grid: {