update 调整银川大屏和西安大屏
This commit is contained in:
@@ -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', () => {
|
||||
|
||||
Reference in New Issue
Block a user