Quellcode durchsuchen

forest-通知公告

qinhouyu vor 1 Jahr
Ursprung
Commit
8137bb7d69
2 geänderte Dateien mit 22 neuen und 5 gelöschten Zeilen
  1. 8 1
      src/api/forest.js
  2. 14 4
      src/views/forest.vue

+ 8 - 1
src/api/forest.js

@@ -363,7 +363,14 @@ export function sendMessage(param) {
     data:param
   })
 }
-
+// 左侧获取通知公共
+export function getLatestNotice() {
+  return request({
+    url: '/system/notice/getLatestNotice',
+    method: 'get',
+    params: {},
+  })
+}
 // 事件审核
 export function eventExamine(param) {
   return request({

+ 14 - 4
src/views/forest.vue

@@ -7,18 +7,18 @@
     <div class="visual-body">
       <!-- 左侧 -->
       <div class="leftbar" ref="left">
-        <!-- 1 基本情况 -->
+        <!-- 1 通知公告 -->
         <div class="forthis">
           <dv-border-box-13 backgroundColor="rgba(12, 19, 38, .90)" style="padding-bottom: 1rem;">
             <img src="../assets/images/integrated/light.png" style="width: 100%; margin-top: .4rem;" />
             <div class="this-title">
-              <span>基本情况</span>
+              <span>通知公告</span>
               <dv-decoration-3 style="width:150px;height:15px;margin-right: 1rem;" />
             </div>
             <div class="i-list-con h-14">
               <div class="d-l-con no_hover">
                 <div class="d-l-l-text w-100p no-weight">
-                  <h4 class="line-h-1 w-100p" v-html="forestInfo">{{ forestInfo }}</h4>
+                  <h4 class="line-h-1 w-100p" v-html="noticeContent">{{ noticeContent }}</h4>
                 </div>
               </div>
             </div>
@@ -458,6 +458,7 @@
     getEventPush,
     getBaseInfo,
     getTodayEvents,
+    getLatestNotice,
     getDeptEventCount,
     getWeather,
     getEventList,
@@ -540,7 +541,7 @@
       this.getSuperMapUrl();
 
       setTimeout(() => {
-        this.getBaseInfo()
+        this.getLatestNotice()
         this.getTodayEvents(this.getCurrentDataStr())
         this.getDeptEventCount(this.getCurrentDataStr())
         this.getWeather(this.getCurrentDataStr())
@@ -562,6 +563,7 @@
     },
     data() {
       return {
+        noticeContent: '', //通知公告
         nextbutton:false,
         title:"",
         //左侧资源
@@ -1023,6 +1025,14 @@
         //事件信息弹出
         this.$refs.eventdetailsdialog.showEventDialog(eventCode)
       },
+      getLatestNotice() {
+        //左侧获取通知公告
+        getLatestNotice().then(res => {
+          if (res.code == 200) {
+            this.noticeContent = res.data.noticeContent //通知公告
+          }
+        })
+      },
       getFirespread(eventCode) {
         this.$refs.firespread.showEventDialog(eventCode);
         this.$refs.firespread.fireControlViewList()