update 调整websocket
This commit is contained in:
@@ -75,7 +75,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
function setValue(result) {
|
||||
function setValue(result = {}) {
|
||||
let { alerdyreceive = '', totalacceptance = '' } = result;
|
||||
setStatistics(result);
|
||||
if (alerdyreceive || totalacceptance) {
|
||||
|
||||
@@ -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', () => {
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user