zhengnaiwen_citu il y a 6 mois
Parent
commit
c3266cf77a

+ 1 - 0
src/layout/components/LayoutNotification.vue

@@ -179,6 +179,7 @@ export default {
         this.$message.error('无效的地址')
         return
       }
+      this.onSet(item)
       this.$router.push(item.tag.route)
       this.visible = false
     },

+ 11 - 4
src/views/workOrder/approval/index.vue

@@ -53,12 +53,19 @@ export default {
       itemData: {}
     }
   },
-  created () {
-    if (this.$route.query.id) {
-      // 获取数据明细
-      this.onGetDetails(this.$route.query.id)
+  watch: {
+    '$route.query.id' (val) {
+      if (val) {
+        this.onGetDetails(val)
+      }
     }
   },
+  // created () {
+  //   if (this.$route.query.id) {
+  //     // 获取数据明细
+  //     this.onGetDetails(this.$route.query.id)
+  //   }
+  // },
   methods: {
     onClose () {
       this.$router.push(this.$route.path)

+ 5 - 4
src/views/workOrder/myOrder/index.vue

@@ -28,10 +28,11 @@ export default {
       loading: false
     }
   },
-  created () {
-    if (this.$route.query.id) {
-      // 获取数据明细
-      this.onGetDetails(this.$route.query.id)
+  watch: {
+    '$route.query.id' (val) {
+      if (val) {
+        this.onGetDetails(val)
+      }
     }
   },
   methods: {