2 Commity a5b2b4f732 ... 72f590444f

Autor SHA1 Wiadomość Data
  王杰 72f590444f fix(sand-monitor): 更新采砂区和监控设备数量显示 1 miesiąc temu
  王杰 956ec5ab9b feat(announcement):优化公告展示与管理功能- 扩大公告弹窗宽度以提升展示效果 1 miesiąc temu

+ 19 - 4
src/views/announce-detail-popup/index.vue

@@ -46,7 +46,7 @@ export default {
   top: 50%;
   left: 50%;
   transform: translate(-50%, -50%);
-  width: px-to-rem(455);
+  width: px-to-rem(1155);
   z-index: 9999;
   .announce-detail-popup-title {
     background: url('@/assets/image/common/popup_title_bg.png') no-repeat;
@@ -63,9 +63,18 @@ export default {
       margin-left: px-to-rem(20);
     }
   }
+
   .announce-detail-popup-content {
     background: rgba(35, 61, 108, 0.8);
     padding: px-to-rem(18);
+    max-height: 80vh; // 限制最大高度
+    overflow-y: auto;  // 允许垂直滚动
+    img {
+     width: 100%;
+     height: auto;
+     object-fit: contain;
+     margin-top: px-to-rem(11);
+    }
     .title {
       font-weight: bold;
       font-size: px-to-rem(16);
@@ -73,6 +82,7 @@ export default {
       text-align: center;
       padding: 0 px-to-rem(0) px-to-rem(9) px-to-rem(0);
     }
+
     .time {
       text-align: right;
       font-weight: 400;
@@ -80,15 +90,20 @@ export default {
       color: #ffffff;
       margin-bottom: px-to-rem(11);
     }
+
     .content {
       font-weight: 400;
       font-size: 14px;
       color: #ffffff;
     }
-    img {
-      width: px-to-rem(416);
-      height: px-to-rem(221);
+
+    .announcement-image {
+      width: 100%;
       margin-top: px-to-rem(11);
+      :deep(.el-image__inner) {
+        max-width: 100%;
+        height: auto;
+      }
     }
   }
 }

+ 1 - 1
src/views/announcement-management/index.vue

@@ -92,7 +92,7 @@
           <el-input v-model="form.announcementName"></el-input>
         </el-form-item>
         <el-form-item label="公告内容" prop="announcementContent">
-          <el-input type="textarea" :rows="7" v-model="form.announcementContent" maxlength="500"> </el-input>
+          <el-input type="textarea" :rows="7" v-model="form.announcementContent" maxlength="1000"> </el-input>
         </el-form-item>
         <el-form-item label="上传图片" prop="images">
           <el-upload

+ 1 - 13
src/views/components/layerList/index.vue

@@ -104,8 +104,7 @@ export default {
           children: [
             { id: '4-1', type: 'plan', label: '2025年度渭河兴平段水灾害防御工作方案' },
             { id: '4-2', type: 'plan', label: '2025年度渭河水灾害防御工作方案' },
-            { id: '4-3', type: 'plan', label: '陕西省防汛应急预案' },
-            { id: '4-4', type: 'plan', label: '陕西省渭河生态区保护中心关于解除渭河洪水防御Ⅲ级应急响应的通知' }
+            { id: '4-3', type: 'plan', label: '陕西省防汛应急预案' }
           ]
         }
       ],
@@ -224,17 +223,6 @@ export default {
     getFloodPlanList() {
       getFloodPreventionList().then((res) => {
         const newItems = res.data.records.map((item) => ({ ...item, type: 'plan', label: item.planName }))
-         // 手动添加的通知
-        newItems.push({
-          "id": 15,
-          "label": "陕西省渭河生态区保护中心关于解除渭河洪水防御Ⅲ级应急响应的通知",
-          "planName": "陕西省渭河生态区保护中心关于解除渭河洪水防御Ⅲ级应急响应的通知",
-          "planFile": "https://eos.xian-2.cmecloud.cn/kf-shanxixian/ppt/7f67f2e619424e52bbb06fa60119061d.pptx?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Date=20251009T162017Z&X-Amz-SignedHeaders=host&X-Amz-Expires=604800&X-Amz-Credential=ENLBuns9lVTfgMbiwGT9uRVYJml8%2F20251009%2Fxian2%2Fs3%2Faws4_request&X-Amz-Signature=934d9cc00739219b4196ee3401e91aefb9bdd603ac580cf2b7fa19015eebf744",
-          "fileName": "陕西省渭河生态区保护中心关于解除渭河洪水防御Ⅲ级应急响应的通知.pptx",
-          "createrName": "王杰",
-          "createrTime": "2025-10-09T16:20:19.000+00:00",
-          "type": "plan"
-        })
         this.treeData.forEach((item) => {
           if (item.id == '4') {
             item.children = newItems

+ 0 - 4
src/views/components/layerList/planDialog.vue

@@ -53,8 +53,6 @@ export default {
           return { ...item, imageList: this.imgsTwo }
         } else if (item.id == '14') {
           return { ...item, imageList: this.imgsThree }
-        } else if (item.id == '15') {
-          return { ...item, imageList: this.imgsFour }
         }
         console.info(item)
         return item
@@ -69,8 +67,6 @@ export default {
       this.imgsTwo = imagesRequireContext2.keys().map((imagePath2) => imagesRequireContext2(imagePath2))
       const imagesRequireContext3 = require.context('@/assets/image/planThree', false, /\.png$|\.jpg$/)
       this.imgsThree = imagesRequireContext3.keys().map((imagePath3) => imagesRequireContext3(imagePath3))
-      const imagesRequireContext4 = require.context('@/assets/image/planFour', false, /\.png$|\.jpg$/)
-      this.imgsFour = imagesRequireContext4.keys().map((imagePath4) => imagesRequireContext4(imagePath4))
     },
     openFullscreen(index) {
       const img = this.$el.querySelectorAll('.main-image')[index].querySelector('img')

+ 56 - 5
src/views/comprehensive-overview/left.vue

@@ -8,20 +8,46 @@
               <template v-if="noticeList.length > 0">
                 <div class="img-txt" v-if="noticeList.length > 0" @click="toSee(noticeList[0])">
                   <template v-if="noticeList[0].images != null">
-                    <el-image class="img" :src="noticeList[0].images"></el-image>
+                    <el-image class="img" :src="noticeList[0].images" fit="cover"></el-image>
                   </template>
                   <template v-else>
                     <el-image class="img" :src="defaultImg"></el-image>
                   </template>
-                  <div class="txt">{{ noticeList[0].announcementName }}</div>
+                  <div class="txt ddd" @click="toSee(item)" >{{ noticeList[0].announcementName }}</div>
                 </div>
+                <el-carousel
+                    class="list-carousel"
+                    indicator-position="none"
+                    arrow="never"
+                    :autoplay="true"
+                    :interval="3000"
+                    height="200px">
+                    <el-carousel-item v-for="(itemGroup, index) in groupedNoticeList" :key="index">
+                      <div class="list" v-for="item in itemGroup" :key="item.id">
+                        <div class="left">
+                          <template v-if="item.images != null">
+                            <el-image class="img" :src="item.images" fit="cover"></el-image>
+                          </template>
+                          <template v-else>
+                            <el-image class="img" :src="defaultSmallImg" fit="cover"></el-image>
+                          </template>
+                        </div>
+                        <div class="right">
+                          <div class="title">{{ item.announcementName }}</div>
+                          <div class="date">{{ formatDate(item.createTime) }}</div>
+                          <div class="detailBtn" @click="toSee(item)">详情</div>
+                        </div>
+                      </div>
+                    </el-carousel-item>
+                  </el-carousel>
+                <!-- div class="list-box">
                 <div class="list" v-for="item in noticeDataList" :key="item.id">
                   <div class="left">
                     <template v-if="item.images != null">
-                      <el-image :src="item.images" class="img"></el-image>
+                      <el-image class="img" :src="item.images" fit="cover" ></el-image>
                     </template>
                     <template v-else>
-                      <el-image :src="defaultSmallImg" class="img"></el-image>
+                      <el-image class="img" :src="defaultSmallImg" fit="cover" ></el-image>
                     </template>
                   </div>
                   <div class="right">
@@ -30,6 +56,7 @@
                     <div class="detailBtn" @click="toSee(item)">详情</div>
                   </div>
                 </div>
+                </div -->
               </template>
               <template v-else>
                 <div class="noData">
@@ -124,6 +151,7 @@
 </template>
 
 <script>
+import { Carousel, CarouselItem } from 'element-ui'
 import moment from 'moment'
 import BasePanelLeft from '@/components/base-panel/base-panel-left'
 import BaseMain from '@/components/base-main/base-main.vue'
@@ -132,9 +160,24 @@ import ImgUrl from '@/assets/image/comprehensive/bg1.png'
 import ImgUrl2 from '@/assets/image/comprehensive/bg2.png'
 export default {
   components: {
+    'el-carousel': Carousel,
+    'el-carousel-item': CarouselItem,
     BaseMain,
     BasePanelLeft
   },
+  computed: {
+    groupedNoticeList() {
+      if (!this.noticeDataList || this.noticeDataList.length === 0) {
+        return []
+      }
+      const groups = []
+      const itemsPerGroup = 2
+      for (let i = 0; i < this.noticeDataList.length; i += itemsPerGroup) {
+        groups.push(this.noticeDataList.slice(i, i + itemsPerGroup))
+      }
+      return groups
+    }
+  },
   data() {
     return {
       noticeList: [],
@@ -151,7 +194,7 @@ export default {
       return moment(date).format('YYYY-MM-DD HH:mm:ss')
     },
     fetchData() {
-      getAnnouncementList({ announcementStatus: '1', pageNum: 1, pageSize: 3 }).then((res) => {
+      getAnnouncementList({ announcementStatus: '1', pageNum: 1, pageSize: 10 }).then((res) => {
         this.noticeList = res.data.records
         this.noticeDataList = this.noticeList.splice(1, this.noticeList.length)
       })
@@ -164,6 +207,7 @@ export default {
 </script>
 
 <style lang="scss" scoped>
+
 .comprehensive-container {
   position: absolute;
   top: px-to-rem(30);
@@ -211,6 +255,7 @@ export default {
       :deep(.el-image__inner) {
         height: px-to-rem(182);
         width: 100%;
+        object-position: center 5%;
       }
       .txt {
         width: px-to-rem(337);
@@ -227,6 +272,11 @@ export default {
         text-align: left;
         padding-left: px-to-rem(10);
       }
+      .ddd {
+          overflow: hidden;
+          white-space: nowrap;
+          text-overflow: ellipsis;
+      }
     }
     .list {
       display: flex;
@@ -242,6 +292,7 @@ export default {
         height: px-to-rem(80);
         :deep(.el-image__inner) {
           height: px-to-rem(80);
+          object-position: center 5%;
         }
       }
       .right {

+ 2 - 2
src/views/sand-monitor/left.vue

@@ -9,7 +9,7 @@
               <img src="@/assets/image/sand-monitor/采砂区.png" style="width: 0.38rem; height: 0.32rem" />
               <div class="item-content">
                 <span class="label">采砂区个数</span>
-                <span class="value" style="color: #4183d3">2个</span>
+                <span class="value" style="color: #4183d3">3个</span>
               </div>
             </div>
             <img src="@/assets/image/sand-monitor/icon-bg.png" style="width: 1.6rem" />
@@ -19,7 +19,7 @@
               <img src="@/assets/image/sand-monitor/监控设备.png" style="width: 0.32rem; height: 0.3rem" />
               <div class="item-content">
                 <span class="label">监控设备</span>
-                <span class="value" style="color: #fcd294">2个</span>
+                <span class="value" style="color: #fcd294">3个</span>
               </div>
             </div>
             <img src="@/assets/image/sand-monitor/icon-bg.png" style="width: 1.6rem" />

+ 2 - 1
vue.config.js

@@ -33,7 +33,8 @@ module.exports = defineConfig({
         new NodePolyfillPlugin()
       ]
       return {
-        module: { unknownContextCritical: false }, // 配置加载的模块类型,cesium时必须配置
+        // 配置加载的模块类型,cesium时必须配置
+        module: { unknownContextCritical: false },
         plugins: plugins
       }
     } else {