Просмотр исходного кода

消息中心跳转报告详情,补充已读接口调用逻辑

ming 2 месяцев назад
Родитель
Сommit
79eed8ec34

+ 1 - 1
src/pages/business/common/projectMange/record/details.vue

@@ -69,7 +69,7 @@
         </view>
 
         <view class="content-area-center mb10">
-          <view class="content-area-center-top font12">附件 </view>
+          <view class="content-area-center-top">附件 </view>
           <view v-if="item.reportFile">
             <uni-link v-for="(file, index) in JSON.parse(item.reportFile)" :key="index" :href="file.url" text="file.url" style="color: rgba(0, 0, 0, 0.7)">{{ file.name }}</uni-link>
           </view>

+ 16 - 1
src/pages/common/appMessage/index.vue

@@ -43,6 +43,8 @@ import { onLoad, onShow, onReady, onHide, onLaunch, onUnload, onNavigationBarBut
 import { ref, reactive, computed, getCurrentInstance, toRefs, inject } from "vue";
 /*----------------------------------接口引入-----------------------------------*/
 import { getMceList, updateMceReceiveStatus } from "@/api/mine/info.js";
+import { projectApi } from "@/api/business/project.js";
+
 /*----------------------------------组件引入-----------------------------------*/
 /*----------------------------------store引入-----------------------------------*/
 /*----------------------------------公共方法引入-----------------------------------*/
@@ -70,7 +72,20 @@ function goContentDetails(e) {
   if (e.infoType == 4) {
     proxy.$tab.navigateTo(`/pages/business/fireIot/alarmManage/alarmDetails/index?contentId=${e.contentId}`).then(() => {});
   } else if (e.infoType == 5) {
-    proxy.$tab.navigateTo(`/pages/business/common/projectMange/record/details?reportId=${e.moduleId}`).then(() => {});
+
+    if (e.readFlag != 1) {
+      projectApi()
+        .ReportRecordReadFlag({ reportId: e.id })
+        .then((res) => {
+          if (res.status == "SUCCESS") {
+            proxy.$tab.navigateTo(`/pages/business/common/projectMange/record/details?reportId=${e.moduleId}`);
+          } else {
+            proxy.$modal.msgError("读取异常");
+          }
+        });
+    } else {
+        proxy.$tab.navigateTo(`/pages/business/common/projectMange/record/details?reportId=${e.moduleId}`);
+      }
   } else {
     proxy.$tab.navigateTo(`/pages/common/appMessage/details?contentId=${e.contentId}`).then(() => {});
   }