Jelajahi Sumber

Merge branch '165' of http://47.111.81.118:3000/uskycloud/usky-web-mobile into 165

fanghuisheng 1 bulan lalu
induk
melakukan
c80768d115

+ 3 - 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>
@@ -179,6 +179,8 @@ function init() {
         dataList.value = requset.data.records;
         state.loading = false;
         pmReportReaders.value = requset.data.records[0].pmReportReaders;
+        state.tabsList[0].name=state.tabsList[0].name+'('+pmReportReaders.value.read+')';
+        state.tabsList[1].name=state.tabsList[1].name+'('+pmReportReaders.value.unRead+')';
         reportDetailData.value.treeSelectNodes = proxy.$common.findTreeNodes(tree.value, tabsCurrent.value == 0 ? pmReportReaders.value.readAlready : pmReportReaders.value.readNotAlready);
         var imgs = JSON.parse(dataList.value[0].reportImage);
         var files = JSON.parse(dataList.value[0].reportFile);

+ 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(() => {});
   }