update 调整websocket

This commit is contained in:
zk
2024-05-20 15:25:12 +08:00
parent 60be7c4fe2
commit 510f34953f
6 changed files with 16 additions and 10 deletions
+1 -1
View File
@@ -75,7 +75,7 @@
}
}
function setValue(result) {
function setValue(result = {}) {
let { alerdyreceive = '', totalacceptance = '' } = result;
setStatistics(result);
if (alerdyreceive || totalacceptance) {
+3 -2
View File
@@ -77,9 +77,10 @@
function initChart() {
const myChart = echarts.init(document.querySelector('.RadarCharts'));
let countList = radarList.value.map((item) => item?.userCount);
let countList = radarList?.value.map((item) => item?.userCount);
if (countList.length < 1) return;
let max = Math.max(...countList);
const indicator = radarList.value.map((item) => ({ name: item?.hospitalName, max: max }));
const indicator = radarList?.value.map((item) => ({ name: item?.hospitalName, max: max }));
const option = radarCharts({ indicator, countList });
myChart.setOption(option);
window.addEventListener('resize', () => {
+1 -1
View File
@@ -89,7 +89,7 @@
}
} catch {
setSpin(false);
const { xData, yData } = JSON.parse(getSession(LEFT_KEY2));
const { xData, yData } = getSession(LEFT_KEY2) ? JSON.parse(getSession(LEFT_KEY2)) : {};
initChart(xData, yData);
}
}