Browse Source

修改单位设施和培训演练的orgId

“yueshang” 1 year ago
parent
commit
c73dc11236
2 changed files with 19 additions and 6 deletions
  1. 13 0
      src/views/backend/orgDrill/index.vue
  2. 6 6
      src/views/unitorg/fpd/index.vue

+ 13 - 0
src/views/backend/orgDrill/index.vue

@@ -285,6 +285,19 @@ export default {
     }
   },
   props: ["orgId"],
+  watch: {
+    orgId: { //深度监听,可监听到对象、数组的变化
+      handler(newV, oldV) {
+        if (this.orgId !== null) {
+          this.queryParams.orgId = this.orgId
+          this.form.orgId = this.orgId
+          this.getList()
+        }
+      },
+      deep: true,
+      immediate: true
+    }
+  },
   created() {
     this.getList()
 

+ 6 - 6
src/views/unitorg/fpd/index.vue

@@ -299,12 +299,12 @@ export default {
         //   this.getTreeselect()
         //   return
         // }
-        // if (this.orgId !== null) {
-        //   this.queryParams.orgId = this.orgId
-        //   this.form.orgId = this.orgId
-        //   this.getListFpdByOrgId()
-        //   this.getTreeselect()
-        // }
+        if (this.orgId !== null) {
+          this.queryParams.orgId = this.orgId
+          this.form.orgId = this.orgId
+          // this.getListFpdByOrgId()
+          // this.getTreeselect()
+        }
         this.getList()
         this.getTreeselect()
       },