diff --git a/src/components/ScaleScreen/src/ScaleScreen.vue b/src/components/ScaleScreen/src/ScaleScreen.vue index 7ea8bfbf..8cabbae8 100644 --- a/src/components/ScaleScreen/src/ScaleScreen.vue +++ b/src/components/ScaleScreen/src/ScaleScreen.vue @@ -186,7 +186,8 @@ const updateScale = () => { // 获取真实视口尺寸 const currentWidth = document.body.clientWidth - const currentHeight = document.body.clientHeight + let currentHeight = document.body.clientHeight + if (currentWidth < 3000) currentHeight = currentHeight - 10 // 获取大屏最终的宽高 const realWidth = state.width || state.originalWidth const realHeight = state.height || state.originalHeight @@ -203,7 +204,7 @@ if (currentWidth < 3000) { scale = heightScale state.isScroll = true - styles.box.overflow = 'auto' + styles.box['overflow-x'] = 'auto' } else { state.isScroll = false styles.box.overflow = 'hidden' diff --git a/src/views/visualization/components/SBYXZT.vue b/src/views/visualization/components/SBYXZT.vue index f9721126..383e4bc1 100644 --- a/src/views/visualization/components/SBYXZT.vue +++ b/src/views/visualization/components/SBYXZT.vue @@ -83,21 +83,25 @@ name: 'AI智能监控', value: [0, 0, 0], img: d01, + key: 1, }, { name: '水质监测', value: [0, 0, 0], img: d02, + key: 3, }, { name: '土壤监测', value: [0, 0, 0], img: d03, + key: 2, }, { name: '气象监测', value: [0, 0, 0], img: d04, + key: 4, }, ] @@ -159,8 +163,9 @@ base_id: props.baseId ?? (Data.currentTab == -99 ? null : Data.currentTab), parent: visualizationStore.getAddresId, }) - Object.keys(resData).map((e, index) => { - Data.list[index].value = resData[e].slice(1) + Object.keys(resData).map((e) => { + const zindex = Data.list.findIndex(({ key }: any) => key == e) + Data.list[zindex].value = resData[e].slice(1) }) } let timerTabIndex = 1 diff --git a/src/views/visualization/index.vue b/src/views/visualization/index.vue index e89f81ce..77274ea4 100644 --- a/src/views/visualization/index.vue +++ b/src/views/visualization/index.vue @@ -10,36 +10,36 @@ >