update 调整银川大屏和西安大屏

This commit is contained in:
zk
2024-05-17 13:07:39 +08:00
parent 45aec85fad
commit 13faaa92a6
15 changed files with 145 additions and 88 deletions
+6 -6
View File
@@ -54,13 +54,13 @@
async function getList() {
setSpin(true);
try {
const { code, result } = (await getDetail({})) || {};
const { code, result } = (await getDetail({ dataType: props.setting.dataType })) || {};
setSpin(!spinning.value);
if (code != 200 || !Array.isArray(result)) {
if (code != 200) {
return;
}
setSession(LEFT_KEY3, JSON.stringify(result[0]));
setValue(result[0]);
setSession(LEFT_KEY3, JSON.stringify(result));
setValue(result);
} catch {
const result = JSON.parse(getSession(LEFT_KEY3));
setValue(result);
@@ -76,9 +76,9 @@
function initChart() {
const myChart = echarts.init(document.querySelector('.RadarCharts'));
let countList = radarList.value.map((item) => item.value);
let countList = radarList.value.map((item) => item?.userCount);
let max = Math.max(...countList);
const indicator = radarList.value.map((item) => ({ name: item.name, max: max }));
const indicator = radarList.value.map((item) => ({ name: item?.hospitalName, max: max }));
const option = radarCharts({ indicator, countList });
myChart.setOption(option);
window.addEventListener('resize', () => {