openatc-components 0.3.81 → 0.3.82

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -237,7 +237,7 @@ export default {
237
237
  })
238
238
  },
239
239
  firstInit () {
240
- if (this.$route.query !== undefined && Object.keys(this.$route.query).length) {
240
+ if (this.$route.query !== undefined && Object.keys(this.$route.query).length && this.$route.query.agentid !== undefined) {
241
241
  this.agentId = this.$route.query.agentid
242
242
  setIframdevid(this.agentId)
243
243
  this.registerMessage() // 注册消息
@@ -315,10 +315,11 @@ export default {
315
315
  // },
316
316
  agentId: {
317
317
  handler: function (val1, val2) {
318
- if (val1 !== val2 && val2 !== undefined) {
318
+ if (val1 !== val2) {
319
319
  this.init()
320
320
  }
321
- }
321
+ },
322
+ immediate: true
322
323
  }
323
324
  },
324
325
  data () {
@@ -1313,9 +1314,7 @@ export default {
1313
1314
  }
1314
1315
  },
1315
1316
  mounted () {
1316
- if (this.agentId !== undefined) {
1317
- this.init()
1318
- }
1317
+ // this.init()
1319
1318
  }
1320
1319
  }
1321
1320
  </script>
@@ -134,7 +134,7 @@ export default {
134
134
  watch: {
135
135
  $route: {
136
136
  handler: function (val, oldVal) {
137
- if (val.query !== undefined) {
137
+ if (val.query !== undefined && val.query.agentid !== undefined) {
138
138
  this.resetCrossDiagram()
139
139
  }
140
140
  },
@@ -164,7 +164,7 @@ export default {
164
164
  }
165
165
  },
166
166
  created () {
167
- if (this.$route.query !== undefined && Object.keys(this.$route.query).length) {
167
+ if (this.$route.query !== undefined && Object.keys(this.$route.query).length && this.$route.query.agentid !== undefined) {
168
168
  this.resetCrossDiagram()
169
169
  }
170
170
  },
@@ -96,7 +96,8 @@ export default {
96
96
  this.agentId = val
97
97
  },
98
98
  // 深度观察监听
99
- deep: true
99
+ deep: true,
100
+ immediate: true
100
101
  },
101
102
  Token: {
102
103
  handler: function (val) {
@@ -258,7 +259,7 @@ export default {
258
259
  })
259
260
  },
260
261
  firstInit () {
261
- if (this.$route.query !== undefined && Object.keys(this.$route.query).length) {
262
+ if (this.$route.query !== undefined && Object.keys(this.$route.query).length && this.$route.query.agentid !== undefined) {
262
263
  this.agentId = this.$route.query.agentid
263
264
  setIframdevid(this.agentId)
264
265
  this.registerMessage() // 注册消息
@@ -227,7 +227,6 @@ export default {
227
227
  this.globalParamModel = this.$store.getters.globalParamModel
228
228
  this.PhaseDataModel = new PhaseDataModel()
229
229
  this.CrossDiagramMgr = new CrossDiagramMgr()
230
- // if (this.$route.query !== undefined && Object.keys(this.$route.query).length) {
231
230
  this.agentId = this.AgentId
232
231
  setIframdevid(this.agentId)
233
232
  this.registerMessage() // 注册消息