From 7b6ef37fe211a2ba3ef4dac4fa036a8a39a7b050 Mon Sep 17 00:00:00 2001 From: jiayu Date: Wed, 28 May 2025 16:53:52 +0800 Subject: [PATCH] =?UTF-8?q?=E6=95=B0=E6=8D=AE=E5=A4=A7=E5=B1=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.development | 3 +- .env.production | 3 +- .../bigdata/components/alarm-info.vue | 17 +++++--- .../bigdata/components/bigdata-left.vue | 10 ++++- .../bigdata/components/bigdata-right.vue | 14 +++++-- .../bigdata/components/party-member.vue | 16 +++++--- .../bigdata/components/village-info-small.vue | 11 ++++- .../bigdata/components/village-info.vue | 11 ++++- .../bigdata/components/village-news.vue | 40 ++++++++++++++++--- .../business/bigdata/components/weather.vue | 14 ++++--- 10 files changed, 108 insertions(+), 31 deletions(-) diff --git a/.env.development b/.env.development index 1312594..b9d16f5 100644 --- a/.env.development +++ b/.env.development @@ -1,5 +1,6 @@ NODE_ENV=development VITE_APP_TITLE='数字乡村云平台' -VITE_APP_API_URL='http://192.168.34.155:1024' +# VITE_APP_API_URL='http://192.168.34.155:1024' +VITE_APP_API_URL='http://jxjzw.zhgdyun.com:10248/village' # VITE_APP_API_URL='http://jxjzw.zhgdyun.com:11026' VITE_MQTT_URL='ws://jxj.zhgdyun.com:8083/mqtt' \ No newline at end of file diff --git a/.env.production b/.env.production index 595895d..a8d05b5 100644 --- a/.env.production +++ b/.env.production @@ -1,4 +1,5 @@ NODE_ENV=production VITE_APP_TITLE='数字乡村云平台' -VITE_APP_API_URL='http://jxjzw.zhgdyun.com:11026' +# VITE_APP_API_URL='http://jxjzw.zhgdyun.com:11026' +VITE_APP_API_URL='http://jxjzw.zhgdyun.com:10248/village' VITE_MQTT_URL='ws://jxj.zhgdyun.com:8083/mqtt' \ No newline at end of file diff --git a/src/views/business/bigdata/components/alarm-info.vue b/src/views/business/bigdata/components/alarm-info.vue index cdbd564..1a2eb1c 100644 --- a/src/views/business/bigdata/components/alarm-info.vue +++ b/src/views/business/bigdata/components/alarm-info.vue @@ -300,14 +300,21 @@ alarmTabValue.value = value; }; + const initHeight = () => { + let height = document.querySelector('.bigdata-right').clientHeight; + let height1 = document.querySelector('.bigdata-right-1').clientHeight; + let height3 = document.querySelector('.bigdata-right-3').clientHeight; + let otherHeight = 76; + let gapHeight = 40; + contentMaxHeight.value = `${height - otherHeight - gapHeight - height1 - height3}px`; + }; + onMounted(async () => { await getTableList(); await queryConfigPage(); - nextTick(() => { - let height = document.querySelector('.bigdata-right-2').clientHeight; - let otherHeight = 76; - contentMaxHeight.value = `${height - otherHeight}px`; - }); + initHeight(); + + window.addEventListener('resize', initHeight); }); const handleEdit = () => { alarmInfoDialogRef.value.showModal(isEdit.value ? alarmInfoData.value : null); diff --git a/src/views/business/bigdata/components/bigdata-left.vue b/src/views/business/bigdata/components/bigdata-left.vue index 3d1bea8..8cc5feb 100644 --- a/src/views/business/bigdata/components/bigdata-left.vue +++ b/src/views/business/bigdata/components/bigdata-left.vue @@ -21,15 +21,21 @@ const left1Height = ref(); const left2Height = ref(); const left3Height = ref(); - onMounted(() => { + + const initHeight = () => { let height = document.documentElement.clientHeight; let topHeight = 170; let bottomHeight = 30; contentHeight.value = height - topHeight - bottomHeight; - left1Height.value = Number(contentHeight.value * 0.3189).toFixed(2); left2Height.value = Number(contentHeight.value * 0.2054).toFixed(2); left3Height.value = Number(contentHeight.value * 0.4245).toFixed(2); + }; + + onMounted(() => { + initHeight(); + + window.addEventListener('resize', initHeight); }); diff --git a/src/views/business/bigdata/components/bigdata-right.vue b/src/views/business/bigdata/components/bigdata-right.vue index c7d5fec..a8a9cb1 100644 --- a/src/views/business/bigdata/components/bigdata-right.vue +++ b/src/views/business/bigdata/components/bigdata-right.vue @@ -3,10 +3,10 @@
-
+
-
+
@@ -21,7 +21,8 @@ const left1Height = ref(); const left2Height = ref(); const left3Height = ref(); - onMounted(() => { + + const initHeight = () => { let height = document.documentElement.clientHeight; let topHeight = 170; let bottomHeight = 30; @@ -30,6 +31,13 @@ left1Height.value = Number(contentHeight.value * 0.3189).toFixed(2); left2Height.value = Number(contentHeight.value * 0.4245).toFixed(2); left3Height.value = Number(contentHeight.value * 0.2054).toFixed(2); + console.log(left1Height.value, left2Height.value, left3Height.value); + }; + + onMounted(() => { + initHeight(); + + window.addEventListener('resize', initHeight); }); diff --git a/src/views/business/bigdata/components/party-member.vue b/src/views/business/bigdata/components/party-member.vue index dbf1548..510623b 100644 --- a/src/views/business/bigdata/components/party-member.vue +++ b/src/views/business/bigdata/components/party-member.vue @@ -104,14 +104,20 @@ } }; + const initHeight = () => { + let height = document.querySelector('.bigdata-left').clientHeight; + let height1 = document.querySelector('.bigdata-left-1').clientHeight; + let height2 = document.querySelector('.bigdata-left-2').clientHeight; + let otherHeight = 76; + let gapHeight = 40; + contentMaxHeight.value = `${height - otherHeight - height1 - height2 - gapHeight}px`; + }; + onMounted(async () => { // await getPartyMember(); await queryConfigPage(); - nextTick(() => { - let height = document.querySelector('.bigdata-left-3').clientHeight; - let otherHeight = 76; - contentMaxHeight.value = `${height - otherHeight}px`; - }); + initHeight(); + window.addEventListener('resize', initHeight); }); const handleEdit = () => { partyMemberDialogRef.value.showModal(isEdit.value ? partyMemberData.value : null); diff --git a/src/views/business/bigdata/components/village-info-small.vue b/src/views/business/bigdata/components/village-info-small.vue index d1cde83..3b906c3 100644 --- a/src/views/business/bigdata/components/village-info-small.vue +++ b/src/views/business/bigdata/components/village-info-small.vue @@ -56,11 +56,18 @@ const res = await bigdataApi.queryVillage(); villageInfo.value = res.data; }; - onMounted(async () => { - await getVillageInfo(); + + const initHeight = () => { let height = document.querySelector('.bigdata-left-1').clientHeight; let otherHeight = 76; contentMaxHeight.value = `${height - otherHeight}px`; + }; + + onMounted(async () => { + await getVillageInfo(); + initHeight(); + + window.addEventListener('resize', initHeight); }); const handleEdit = () => { villageInfoDialogRef.value.showModal(villageInfo.value); diff --git a/src/views/business/bigdata/components/village-info.vue b/src/views/business/bigdata/components/village-info.vue index 5fe55ec..480170b 100644 --- a/src/views/business/bigdata/components/village-info.vue +++ b/src/views/business/bigdata/components/village-info.vue @@ -68,14 +68,21 @@ villageInfo.value = res.data; villageInfo.value.villageImageList = villageInfo.value?.imageUrl?.split(',') || []; }; - onMounted(async () => { - await getVillageInfo(); + + const initHeight = () => { let height = document.documentElement.clientHeight; let topHeight = 170; let bottomHeight = 30; let otherHeight = 76; contentHeight.value = `${height - topHeight - bottomHeight}px`; contentMaxHeight.value = `${height - topHeight - bottomHeight - otherHeight}px`; + }; + + onMounted(async () => { + await getVillageInfo(); + initHeight(); + + window.addEventListener('resize', initHeight); }); const handleEdit = () => { villageInfoDialogRef.value.showModal(villageInfo.value); diff --git a/src/views/business/bigdata/components/village-news.vue b/src/views/business/bigdata/components/village-news.vue index ba1ef26..ad751ba 100644 --- a/src/views/business/bigdata/components/village-news.vue +++ b/src/views/business/bigdata/components/village-news.vue @@ -2,7 +2,17 @@
- + + +
{{ index + 1 }} @@ -15,9 +25,7 @@
-
- 暂无乡村新闻 -
+
暂无乡村新闻
@@ -33,7 +41,7 @@ () => useUserStore().getCurrentVillageId, (value) => { getList(); - }, + } ); const newsList = ref([]); @@ -138,4 +146,26 @@ font-size: 16px; color: #ffffff; } + + :deep(.slick-arrow.custom-slick-arrow) { + width: 25px; + height: 25px; + font-size: 25px; + color: #fff; + background-color: rgba(31, 45, 61, 0.11); + transition: ease all 0.3s; + opacity: 0.3; + z-index: 1; + } + :deep(.slick-arrow.custom-slick-arrow:before) { + display: none; + } + :deep(.slick-arrow.custom-slick-arrow:hover) { + color: #fff; + opacity: 0.5; + } + + :deep(.slick-slide h3) { + color: #fff; + } diff --git a/src/views/business/bigdata/components/weather.vue b/src/views/business/bigdata/components/weather.vue index 19e3e88..ab2fdbc 100644 --- a/src/views/business/bigdata/components/weather.vue +++ b/src/views/business/bigdata/components/weather.vue @@ -182,14 +182,18 @@ } }; + const initHeight = () => { + let height = document.querySelector('.bigdata-right-1').clientHeight; + let otherHeight = 76; + contentMaxHeight.value = `${height - otherHeight}px`; + }; + onMounted(async () => { await queryCapacity(); await queryConfigPage(); - nextTick(() => { - let height = document.querySelector('.bigdata-right-1').clientHeight; - let otherHeight = 76; - contentMaxHeight.value = `${height - otherHeight}px`; - }); + initHeight(); + + window.addEventListener('resize', initHeight); }); const handleEdit = () => { weatherDialogRef.value.showModal(isEdit.value ? weatherData.value : null);