Reiskuchen 5 jaren geleden
bovenliggende
commit
2340b3eb7b
1 gewijzigde bestanden met toevoegingen van 8 en 6 verwijderingen
  1. 8 6
      ys_vue/src/views/Home.vue

+ 8 - 6
ys_vue/src/views/Home.vue

@@ -39,7 +39,7 @@
                   <p class="popover-title">
                     <span
                       style="cursor: pointer;"
-                      @click="locationHerf(item.refId, item.noticeType)"
+                      @click="locationHerf(item.id, item.refId, item.noticeType)"
                     >{{item.projectName}}</span>
                   </p>
                   <p>{{item.content}}</p>
@@ -57,7 +57,7 @@
                   <p class="popover-title">
                     <span
                       style="cursor: pointer;"
-                      @click="locationHerf(item.refId, item.noticeType)"
+                      @click="locationHerf(item.id, item.refId, item.noticeType)"
                     >{{item.projectName}}</span>
                   </p>
                   <p>{{item.content}}</p>
@@ -75,7 +75,7 @@
                   <p class="popover-title">
                     <span
                       style="cursor: pointer;"
-                      @click="locationHerf(item.refId, item.noticeType)"
+                      @click="locationHerf(item.id, item.refId, item.noticeType)"
                     >{{item.projectName}}</span>
                   </p>
                   <p>{{item.content}}</p>
@@ -461,7 +461,7 @@ export default {
       );
     },
     //点击消息的跳转
-    locationHerf(id, type) {
+    locationHerf(id, refid, type) {
       this.http.post(
         this.port.notice.read,
         {
@@ -469,6 +469,8 @@ export default {
         },
         res => {
           if (res.code == "ok") {
+            //重新读取一次消息
+            this.loadNotice();
           } else {
             this.$message({
               message: res.msg,
@@ -485,13 +487,13 @@ export default {
       );
       if (type == 0) {
         //审批 跳转到模具详情
-        this.$router.push("/moldList/" + id);
+        this.$router.push("/moldList/" + refid);
       } else if (type == 1) {
         //警告 跳转到运行监测
         this.$router.push("/detection");
       } else if (type == 2) {
         //保养 跳转到运行监测详情
-        this.$router.push("/detection/" + id);
+        this.$router.push("/detection/" + refid);
       }
     },
     //标签页面切换时